Skip to content

Commit f8c9f2c

Browse files
feat(api): api update
1 parent d1fc414 commit f8c9f2c

File tree

4 files changed

+9
-33
lines changed

4 files changed

+9
-33
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-b6ec9a6bf40b74575d917ab145b2413bc61dcd6989bb9d1aa41624bf3437599e.yml
3-
openapi_spec_hash: 53cf9363c3bd9649e0af5f713abdcba7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-b330498c2bfb80605f4c406e8b228c0a4ece85247b21f62f93273a00abb53d35.yml
3+
openapi_spec_hash: 16a82d0eb23b68218d584e385bee43da
44
config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2

lib/orb/models/unit_config.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,10 @@ class UnitConfig < Orb::Internal::Type::BaseModel
99
# @return [String]
1010
required :unit_amount, String
1111

12-
# @!attribute scaling_factor
13-
# Multiplier to scale rated quantity by
14-
#
15-
# @return [Float, nil]
16-
optional :scaling_factor, Float, nil?: true
17-
18-
# @!method initialize(unit_amount:, scaling_factor: nil)
12+
# @!method initialize(unit_amount:)
1913
# Configuration for unit pricing
2014
#
2115
# @param unit_amount [String] Rate per unit of usage
22-
#
23-
# @param scaling_factor [Float, nil] Multiplier to scale rated quantity by
2416
end
2517
end
2618
end

rbi/orb/models/unit_config.rbi

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,15 @@ module Orb
99
sig { returns(String) }
1010
attr_accessor :unit_amount
1111

12-
# Multiplier to scale rated quantity by
13-
sig { returns(T.nilable(Float)) }
14-
attr_accessor :scaling_factor
15-
1612
# Configuration for unit pricing
17-
sig do
18-
params(unit_amount: String, scaling_factor: T.nilable(Float)).returns(
19-
T.attached_class
20-
)
21-
end
13+
sig { params(unit_amount: String).returns(T.attached_class) }
2214
def self.new(
2315
# Rate per unit of usage
24-
unit_amount:,
25-
# Multiplier to scale rated quantity by
26-
scaling_factor: nil
16+
unit_amount:
2717
)
2818
end
2919

30-
sig do
31-
override.returns(
32-
{ unit_amount: String, scaling_factor: T.nilable(Float) }
33-
)
34-
end
20+
sig { override.returns({ unit_amount: String }) }
3521
def to_hash
3622
end
3723
end

sig/orb/models/unit_config.rbs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
module Orb
22
module Models
3-
type unit_config = { unit_amount: String, scaling_factor: Float? }
3+
type unit_config = { unit_amount: String }
44

55
class UnitConfig < Orb::Internal::Type::BaseModel
66
attr_accessor unit_amount: String
77

8-
attr_accessor scaling_factor: Float?
8+
def initialize: (unit_amount: String) -> void
99

10-
def initialize: (unit_amount: String, ?scaling_factor: Float?) -> void
11-
12-
def to_hash: -> { unit_amount: String, scaling_factor: Float? }
10+
def to_hash: -> { unit_amount: String }
1311
end
1412
end
1513
end

0 commit comments

Comments
 (0)