Skip to content

Commit c557aa7

Browse files
feat(api): api update
1 parent 9d2ed65 commit c557aa7

11 files changed

Lines changed: 38 additions & 38 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 116
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-62651294c6bdd7c8d1c183fe4e5ba844a7ac29d80bef9e150739354a9c431ab4.yml
3-
openapi_spec_hash: 46c5d7f541c0c2143b975be9725c9189
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-9d6e0a988df83c0e2baa559ef57ec96981669a7a294de2188adb2cd6bbc0be8a.yml
3+
openapi_spec_hash: 7f5e7221872d7ee799141f546c394f48
44
config_hash: 3c3524be9607afb24d2139ce26ce5389

lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class LedgerCreateEntryByExternalIDParams < Orb::Internal::Type::BaseModel
5050
# An ISO 8601 format date that identifies the origination credit block to expire
5151
#
5252
# @return [Time, nil]
53-
required :expiry_date, Time, nil?: true
53+
optional :expiry_date, Time, nil?: true
5454

5555
# @!attribute invoice_settings
5656
# Passing `invoice_settings` automatically generates an invoice for the newly
@@ -100,7 +100,7 @@ class LedgerCreateEntryByExternalIDParams < Orb::Internal::Type::BaseModel
100100
enum: -> { Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason },
101101
nil?: true
102102

103-
# @!method initialize(amount:, entry_type:, expiry_date:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
103+
# @!method initialize(amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
104104
# Some parameter documentations has been truncated, see
105105
# {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams} for more
106106
# details.
@@ -109,8 +109,6 @@ class LedgerCreateEntryByExternalIDParams < Orb::Internal::Type::BaseModel
109109
#
110110
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType]
111111
#
112-
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
113-
#
114112
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
115113
#
116114
# @param block_id [String] The ID of the block to reverse a decrement from.
@@ -121,6 +119,8 @@ class LedgerCreateEntryByExternalIDParams < Orb::Internal::Type::BaseModel
121119
#
122120
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
123121
#
122+
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
123+
#
124124
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
125125
#
126126
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed

lib/orb/models/customers/credits/ledger_create_entry_params.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class LedgerCreateEntryParams < Orb::Internal::Type::BaseModel
4747
# An ISO 8601 format date that identifies the origination credit block to expire
4848
#
4949
# @return [Time, nil]
50-
required :expiry_date, Time, nil?: true
50+
optional :expiry_date, Time, nil?: true
5151

5252
# @!attribute invoice_settings
5353
# Passing `invoice_settings` automatically generates an invoice for the newly
@@ -97,16 +97,14 @@ class LedgerCreateEntryParams < Orb::Internal::Type::BaseModel
9797
enum: -> { Orb::Customers::Credits::LedgerCreateEntryParams::VoidReason },
9898
nil?: true
9999

100-
# @!method initialize(amount:, entry_type:, expiry_date:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
100+
# @!method initialize(amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
101101
# Some parameter documentations has been truncated, see
102102
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams} for more details.
103103
#
104104
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
105105
#
106106
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType]
107107
#
108-
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
109-
#
110108
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
111109
#
112110
# @param block_id [String] The ID of the block to reverse a decrement from.
@@ -117,6 +115,8 @@ class LedgerCreateEntryParams < Orb::Internal::Type::BaseModel
117115
#
118116
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
119117
#
118+
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
119+
#
120120
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
121121
#
122122
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed

lib/orb/resources/customers/credits/ledger.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,16 +250,14 @@ def list(customer_id, params = {})
250250
# that was originally decremented from, and `amount` indicates how many credits to
251251
# return to the customer, up to the block's initial balance.
252252
#
253-
# @overload create_entry(customer_id, amount:, entry_type:, expiry_date:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
253+
# @overload create_entry(customer_id, amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
254254
#
255255
# @param customer_id [String]
256256
#
257257
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
258258
#
259259
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType]
260260
#
261-
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
262-
#
263261
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
264262
#
265263
# @param block_id [String] The ID of the block to reverse a decrement from.
@@ -270,6 +268,8 @@ def list(customer_id, params = {})
270268
#
271269
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
272270
#
271+
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
272+
#
273273
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
274274
#
275275
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
@@ -409,16 +409,14 @@ def create_entry(customer_id, params)
409409
# that was originally decremented from, and `amount` indicates how many credits to
410410
# return to the customer, up to the block's initial balance.
411411
#
412-
# @overload create_entry_by_external_id(external_customer_id, amount:, entry_type:, expiry_date:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
412+
# @overload create_entry_by_external_id(external_customer_id, amount:, entry_type:, target_expiry_date:, block_id:, currency: nil, description: nil, effective_date: nil, expiry_date: nil, invoice_settings: nil, metadata: nil, per_unit_cost_basis: nil, void_reason: nil, request_options: {})
413413
#
414414
# @param external_customer_id [String]
415415
#
416416
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
417417
#
418418
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType]
419419
#
420-
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
421-
#
422420
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
423421
#
424422
# @param block_id [String] The ID of the block to reverse a decrement from.
@@ -429,6 +427,8 @@ def create_entry(customer_id, params)
429427
#
430428
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
431429
#
430+
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
431+
#
432432
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
433433
#
434434
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed

rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ module Orb
107107
amount: Float,
108108
entry_type:
109109
Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType::OrSymbol,
110-
expiry_date: T.nilable(Time),
111110
target_expiry_date: Date,
112111
block_id: String,
113112
currency: T.nilable(String),
114113
description: T.nilable(String),
115114
effective_date: T.nilable(Time),
115+
expiry_date: T.nilable(Time),
116116
invoice_settings:
117117
T.nilable(
118118
Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::OrHash
@@ -131,8 +131,6 @@ module Orb
131131
# decrement or void operations.
132132
amount:,
133133
entry_type:,
134-
# An ISO 8601 format date that identifies the origination credit block to expire
135-
expiry_date:,
136134
# A future date (specified in YYYY-MM-DD format) used for expiration change,
137135
# denoting when credits transferred (as part of a partial block expiration) should
138136
# expire.
@@ -149,6 +147,8 @@ module Orb
149147
# An ISO 8601 format date that denotes when this credit balance should become
150148
# available for use.
151149
effective_date: nil,
150+
# An ISO 8601 format date that identifies the origination credit block to expire
151+
expiry_date: nil,
152152
# Passing `invoice_settings` automatically generates an invoice for the newly
153153
# added credits. If `invoice_settings` is passed, you must specify
154154
# per_unit_cost_basis, as the calculation of the invoice total is done on that

rbi/orb/models/customers/credits/ledger_create_entry_params.rbi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,12 @@ module Orb
107107
amount: Float,
108108
entry_type:
109109
Orb::Customers::Credits::LedgerCreateEntryParams::EntryType::OrSymbol,
110-
expiry_date: T.nilable(Time),
111110
target_expiry_date: Date,
112111
block_id: String,
113112
currency: T.nilable(String),
114113
description: T.nilable(String),
115114
effective_date: T.nilable(Time),
115+
expiry_date: T.nilable(Time),
116116
invoice_settings:
117117
T.nilable(
118118
Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::OrHash
@@ -131,8 +131,6 @@ module Orb
131131
# decrement or void operations.
132132
amount:,
133133
entry_type:,
134-
# An ISO 8601 format date that identifies the origination credit block to expire
135-
expiry_date:,
136134
# A future date (specified in YYYY-MM-DD format) used for expiration change,
137135
# denoting when credits transferred (as part of a partial block expiration) should
138136
# expire.
@@ -149,6 +147,8 @@ module Orb
149147
# An ISO 8601 format date that denotes when this credit balance should become
150148
# available for use.
151149
effective_date: nil,
150+
# An ISO 8601 format date that identifies the origination credit block to expire
151+
expiry_date: nil,
152152
# Passing `invoice_settings` automatically generates an invoice for the newly
153153
# added credits. If `invoice_settings` is passed, you must specify
154154
# per_unit_cost_basis, as the calculation of the invoice total is done on that

rbi/orb/resources/customers/credits/ledger.rbi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,12 @@ module Orb
248248
amount: Float,
249249
entry_type:
250250
Orb::Customers::Credits::LedgerCreateEntryParams::EntryType::OrSymbol,
251-
expiry_date: T.nilable(Time),
252251
target_expiry_date: Date,
253252
block_id: String,
254253
currency: T.nilable(String),
255254
description: T.nilable(String),
256255
effective_date: T.nilable(Time),
256+
expiry_date: T.nilable(Time),
257257
invoice_settings:
258258
T.nilable(
259259
Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings::OrHash
@@ -275,8 +275,6 @@ module Orb
275275
# decrement or void operations.
276276
amount:,
277277
entry_type:,
278-
# An ISO 8601 format date that identifies the origination credit block to expire
279-
expiry_date:,
280278
# A future date (specified in YYYY-MM-DD format) used for expiration change,
281279
# denoting when credits transferred (as part of a partial block expiration) should
282280
# expire.
@@ -293,6 +291,8 @@ module Orb
293291
# An ISO 8601 format date that denotes when this credit balance should become
294292
# available for use.
295293
effective_date: nil,
294+
# An ISO 8601 format date that identifies the origination credit block to expire
295+
expiry_date: nil,
296296
# Passing `invoice_settings` automatically generates an invoice for the newly
297297
# added credits. If `invoice_settings` is passed, you must specify
298298
# per_unit_cost_basis, as the calculation of the invoice total is done on that
@@ -427,12 +427,12 @@ module Orb
427427
amount: Float,
428428
entry_type:
429429
Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType::OrSymbol,
430-
expiry_date: T.nilable(Time),
431430
target_expiry_date: Date,
432431
block_id: String,
433432
currency: T.nilable(String),
434433
description: T.nilable(String),
435434
effective_date: T.nilable(Time),
435+
expiry_date: T.nilable(Time),
436436
invoice_settings:
437437
T.nilable(
438438
Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings::OrHash
@@ -454,8 +454,6 @@ module Orb
454454
# decrement or void operations.
455455
amount:,
456456
entry_type:,
457-
# An ISO 8601 format date that identifies the origination credit block to expire
458-
expiry_date:,
459457
# A future date (specified in YYYY-MM-DD format) used for expiration change,
460458
# denoting when credits transferred (as part of a partial block expiration) should
461459
# expire.
@@ -472,6 +470,8 @@ module Orb
472470
# An ISO 8601 format date that denotes when this credit balance should become
473471
# available for use.
474472
effective_date: nil,
473+
# An ISO 8601 format date that identifies the origination credit block to expire
474+
expiry_date: nil,
475475
# Passing `invoice_settings` automatically generates an invoice for the newly
476476
# added credits. If `invoice_settings` is passed, you must specify
477477
# per_unit_cost_basis, as the calculation of the invoice total is done on that

sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ module Orb
5050
def initialize: (
5151
amount: Float,
5252
entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::entry_type,
53-
expiry_date: Time?,
5453
target_expiry_date: Date,
5554
block_id: String,
5655
?currency: String?,
5756
?description: String?,
5857
?effective_date: Time?,
58+
?expiry_date: Time?,
5959
?invoice_settings: Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings?,
6060
?metadata: ::Hash[Symbol, String?]?,
6161
?per_unit_cost_basis: String?,

sig/orb/models/customers/credits/ledger_create_entry_params.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,12 @@ module Orb
5050
def initialize: (
5151
amount: Float,
5252
entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryParams::entry_type,
53-
expiry_date: Time?,
5453
target_expiry_date: Date,
5554
block_id: String,
5655
?currency: String?,
5756
?description: String?,
5857
?effective_date: Time?,
58+
?expiry_date: Time?,
5959
?invoice_settings: Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings?,
6060
?metadata: ::Hash[Symbol, String?]?,
6161
?per_unit_cost_basis: String?,

sig/orb/resources/customers/credits/ledger.rbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ module Orb
2222
String customer_id,
2323
amount: Float,
2424
entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryParams::entry_type,
25-
expiry_date: Time?,
2625
target_expiry_date: Date,
2726
block_id: String,
2827
?currency: String?,
2928
?description: String?,
3029
?effective_date: Time?,
30+
?expiry_date: Time?,
3131
?invoice_settings: Orb::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings?,
3232
?metadata: ::Hash[Symbol, String?]?,
3333
?per_unit_cost_basis: String?,
@@ -39,12 +39,12 @@ module Orb
3939
String external_customer_id,
4040
amount: Float,
4141
entry_type: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::entry_type,
42-
expiry_date: Time?,
4342
target_expiry_date: Date,
4443
block_id: String,
4544
?currency: String?,
4645
?description: String?,
4746
?effective_date: Time?,
47+
?expiry_date: Time?,
4848
?invoice_settings: Orb::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings?,
4949
?metadata: ::Hash[Symbol, String?]?,
5050
?per_unit_cost_basis: String?,

0 commit comments

Comments
 (0)