Skip to content

Commit a703c63

Browse files
feat(api): api update
1 parent 49c2213 commit a703c63

File tree

7 files changed

+38
-16
lines changed

7 files changed

+38
-16
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: 139
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-3c7ee3ec9931aaeeb5e015a598812cde9edc09f114adb8759ef4c2054c90f7dc.yml
3-
openapi_spec_hash: a14720041156fe4f353449142edacf0d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-563cf1475c193333d5f8cab934fbf844e439db6218c5b9eccb089b5c1d797b4b.yml
3+
openapi_spec_hash: f2b06aac248aecb248e975af25f3911c
44
config_hash: 3279841440b02d4e8303c961d6983492

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ class InvoiceSettings < Orb::Internal::Type::BaseModel
260260
# based on the invoice or issuance date, depending on the account's configured due
261261
# date calculation method. A value of '0' here represents that the invoice is due
262262
# on issue, whereas a value of '30' represents that the customer has 30 days to
263-
# pay the invoice. Do not set this field if you want to set a custom due date.
263+
# pay the invoice. You must set either `net_terms` or `custom_due_date`, but not
264+
# both.
264265
#
265266
# @return [Integer, nil]
266267
optional :net_terms, Integer, nil?: true

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,8 @@ class InvoiceSettings < Orb::Internal::Type::BaseModel
258258
# based on the invoice or issuance date, depending on the account's configured due
259259
# date calculation method. A value of '0' here represents that the invoice is due
260260
# on issue, whereas a value of '30' represents that the customer has 30 days to
261-
# pay the invoice. Do not set this field if you want to set a custom due date.
261+
# pay the invoice. You must set either `net_terms` or `custom_due_date`, but not
262+
# both.
262263
#
263264
# @return [Integer, nil]
264265
optional :net_terms, Integer, nil?: true

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,12 @@ def list(customer_id, params = {})
187187
# also generate a one-off invoice for the customer for the credits pre-purchase.
188188
# Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
189189
# on the invoice are calculated by multiplying the cost basis with the number of
190-
# credit units added. Additionally, Orb also enforces invoice generation when a
191-
# non-zero `per_unit_cost_basis` value is provided.
190+
# credit units added.
191+
#
192+
# - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
193+
# and `invoice_settings` must be included
194+
# - if `invoice_settings` is passed, one of either `custom_due_date` or
195+
# `net_terms` is required to determine the due date
192196
#
193197
# ## Deducting Credits
194198
#
@@ -349,8 +353,12 @@ def create_entry(customer_id, params)
349353
# also generate a one-off invoice for the customer for the credits pre-purchase.
350354
# Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
351355
# on the invoice are calculated by multiplying the cost basis with the number of
352-
# credit units added. Additionally, Orb also enforces invoice generation when a
353-
# non-zero `per_unit_cost_basis` value is provided.
356+
# credit units added.
357+
#
358+
# - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
359+
# and `invoice_settings` must be included
360+
# - if `invoice_settings` is passed, one of either `custom_due_date` or
361+
# `net_terms` is required to determine the due date
354362
#
355363
# ## Deducting Credits
356364
#

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ module Orb
439439
# based on the invoice or issuance date, depending on the account's configured due
440440
# date calculation method. A value of '0' here represents that the invoice is due
441441
# on issue, whereas a value of '30' represents that the customer has 30 days to
442-
# pay the invoice. Do not set this field if you want to set a custom due date.
442+
# pay the invoice. You must set either `net_terms` or `custom_due_date`, but not
443+
# both.
443444
sig { returns(T.nilable(Integer)) }
444445
attr_accessor :net_terms
445446

@@ -495,7 +496,8 @@ module Orb
495496
# based on the invoice or issuance date, depending on the account's configured due
496497
# date calculation method. A value of '0' here represents that the invoice is due
497498
# on issue, whereas a value of '30' represents that the customer has 30 days to
498-
# pay the invoice. Do not set this field if you want to set a custom due date.
499+
# pay the invoice. You must set either `net_terms` or `custom_due_date`, but not
500+
# both.
499501
net_terms: nil,
500502
# If true, the new credit block will require that the corresponding invoice is
501503
# paid before it can be drawn down from.

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,8 @@ module Orb
439439
# based on the invoice or issuance date, depending on the account's configured due
440440
# date calculation method. A value of '0' here represents that the invoice is due
441441
# on issue, whereas a value of '30' represents that the customer has 30 days to
442-
# pay the invoice. Do not set this field if you want to set a custom due date.
442+
# pay the invoice. You must set either `net_terms` or `custom_due_date`, but not
443+
# both.
443444
sig { returns(T.nilable(Integer)) }
444445
attr_accessor :net_terms
445446

@@ -495,7 +496,8 @@ module Orb
495496
# based on the invoice or issuance date, depending on the account's configured due
496497
# date calculation method. A value of '0' here represents that the invoice is due
497498
# on issue, whereas a value of '30' represents that the customer has 30 days to
498-
# pay the invoice. Do not set this field if you want to set a custom due date.
499+
# pay the invoice. You must set either `net_terms` or `custom_due_date`, but not
500+
# both.
499501
net_terms: nil,
500502
# If true, the new credit block will require that the corresponding invoice is
501503
# paid before it can be drawn down from.

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

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,12 @@ module Orb
180180
# also generate a one-off invoice for the customer for the credits pre-purchase.
181181
# Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
182182
# on the invoice are calculated by multiplying the cost basis with the number of
183-
# credit units added. Additionally, Orb also enforces invoice generation when a
184-
# non-zero `per_unit_cost_basis` value is provided.
183+
# credit units added.
184+
#
185+
# - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
186+
# and `invoice_settings` must be included
187+
# - if `invoice_settings` is passed, one of either `custom_due_date` or
188+
# `net_terms` is required to determine the due date
185189
#
186190
# ## Deducting Credits
187191
#
@@ -369,8 +373,12 @@ module Orb
369373
# also generate a one-off invoice for the customer for the credits pre-purchase.
370374
# Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
371375
# on the invoice are calculated by multiplying the cost basis with the number of
372-
# credit units added. Additionally, Orb also enforces invoice generation when a
373-
# non-zero `per_unit_cost_basis` value is provided.
376+
# credit units added.
377+
#
378+
# - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
379+
# and `invoice_settings` must be included
380+
# - if `invoice_settings` is passed, one of either `custom_due_date` or
381+
# `net_terms` is required to determine the due date
374382
#
375383
# ## Deducting Credits
376384
#

0 commit comments

Comments
 (0)