Skip to content

Commit b3fa16d

Browse files
feat(api): api update
1 parent 5c9df30 commit b3fa16d

32 files changed

+1060
-157
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-cbce25283cb9c3282e03e08b7ee81395436af7d0eb480ffcbab307b5bf1c92a0.yml
3-
openapi_spec_hash: c286edf46db95dee05eb6f180ac24ab0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-ef726ad139fa29757029206ee08150434fc6c52005fec6d42c7d2bcd3aa7ab47.yml
3+
openapi_spec_hash: e622beb7c26f9b0dd641bd5c92735a5b
44
config_hash: dd4343ce95871032ef6e0735a4ca038c

lib/orb/models/allocation.rb

Lines changed: 63 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,72 @@ class Allocation < Orb::Internal::Type::BaseModel
1818
# @return [Orb::Models::CustomExpiration, nil]
1919
required :custom_expiration, -> { Orb::CustomExpiration }, nil?: true
2020

21-
# @!method initialize(allows_rollover:, currency:, custom_expiration:)
21+
# @!attribute filters
22+
#
23+
# @return [Array<Orb::Models::Allocation::Filter>, nil]
24+
optional :filters, -> { Orb::Internal::Type::ArrayOf[Orb::Allocation::Filter] }
25+
26+
# @!method initialize(allows_rollover:, currency:, custom_expiration:, filters: nil)
2227
# @param allows_rollover [Boolean]
2328
# @param currency [String]
2429
# @param custom_expiration [Orb::Models::CustomExpiration, nil]
30+
# @param filters [Array<Orb::Models::Allocation::Filter>]
31+
32+
class Filter < Orb::Internal::Type::BaseModel
33+
# @!attribute field
34+
# The property of the price to filter on.
35+
#
36+
# @return [Symbol, Orb::Models::Allocation::Filter::Field]
37+
required :field, enum: -> { Orb::Allocation::Filter::Field }
38+
39+
# @!attribute operator
40+
# Should prices that match the filter be included or excluded.
41+
#
42+
# @return [Symbol, Orb::Models::Allocation::Filter::Operator]
43+
required :operator, enum: -> { Orb::Allocation::Filter::Operator }
44+
45+
# @!attribute values
46+
# The IDs or values that match this filter.
47+
#
48+
# @return [Array<String>]
49+
required :values, Orb::Internal::Type::ArrayOf[String]
50+
51+
# @!method initialize(field:, operator:, values:)
52+
# @param field [Symbol, Orb::Models::Allocation::Filter::Field] The property of the price to filter on.
53+
#
54+
# @param operator [Symbol, Orb::Models::Allocation::Filter::Operator] Should prices that match the filter be included or excluded.
55+
#
56+
# @param values [Array<String>] The IDs or values that match this filter.
57+
58+
# The property of the price to filter on.
59+
#
60+
# @see Orb::Models::Allocation::Filter#field
61+
module Field
62+
extend Orb::Internal::Type::Enum
63+
64+
PRICE_ID = :price_id
65+
ITEM_ID = :item_id
66+
PRICE_TYPE = :price_type
67+
CURRENCY = :currency
68+
PRICING_UNIT_ID = :pricing_unit_id
69+
70+
# @!method self.values
71+
# @return [Array<Symbol>]
72+
end
73+
74+
# Should prices that match the filter be included or excluded.
75+
#
76+
# @see Orb::Models::Allocation::Filter#operator
77+
module Operator
78+
extend Orb::Internal::Type::Enum
79+
80+
INCLUDES = :includes
81+
EXCLUDES = :excludes
82+
83+
# @!method self.values
84+
# @return [Array<Symbol>]
85+
end
86+
end
2587
end
2688
end
2789
end

lib/orb/models/customer.rb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,19 @@ class Customer < Orb::Internal::Type::BaseModel
282282
# @return [Orb::Models::Customer::AccountingSyncConfiguration, nil]
283283
optional :accounting_sync_configuration, -> { Orb::Customer::AccountingSyncConfiguration }, nil?: true
284284

285+
# @!attribute automatic_tax_enabled
286+
# Whether automatic tax calculation is enabled for this customer. This field is
287+
# nullable for backwards compatibility but will always return a boolean value.
288+
#
289+
# @return [Boolean, nil]
290+
optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true
291+
285292
# @!attribute reporting_configuration
286293
#
287294
# @return [Orb::Models::Customer::ReportingConfiguration, nil]
288295
optional :reporting_configuration, -> { Orb::Customer::ReportingConfiguration }, nil?: true
289296

290-
# @!method initialize(id:, additional_emails:, auto_collection:, auto_issuance:, balance:, billing_address:, created_at:, currency:, email:, email_delivery:, exempt_from_automated_tax:, external_customer_id:, hierarchy:, metadata:, name:, payment_provider:, payment_provider_id:, portal_url:, shipping_address:, tax_id:, timezone:, accounting_sync_configuration: nil, reporting_configuration: nil)
297+
# @!method initialize(id:, additional_emails:, auto_collection:, auto_issuance:, balance:, billing_address:, created_at:, currency:, email:, email_delivery:, exempt_from_automated_tax:, external_customer_id:, hierarchy:, metadata:, name:, payment_provider:, payment_provider_id:, portal_url:, shipping_address:, tax_id:, timezone:, accounting_sync_configuration: nil, automatic_tax_enabled: nil, reporting_configuration: nil)
291298
# Some parameter documentations has been truncated, see {Orb::Models::Customer}
292299
# for more details.
293300
#
@@ -354,6 +361,8 @@ class Customer < Orb::Internal::Type::BaseModel
354361
#
355362
# @param accounting_sync_configuration [Orb::Models::Customer::AccountingSyncConfiguration, nil]
356363
#
364+
# @param automatic_tax_enabled [Boolean, nil] Whether automatic tax calculation is enabled for this customer. This field is nu
365+
#
357366
# @param reporting_configuration [Orb::Models::Customer::ReportingConfiguration, nil]
358367

359368
# @see Orb::Models::Customer#hierarchy

lib/orb/models/customer_create_params.rb

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel
117117

118118
# @!attribute tax_configuration
119119
#
120-
# @return [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral, nil]
120+
# @return [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral, Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok, nil]
121121
optional :tax_configuration, union: -> { Orb::CustomerCreateParams::TaxConfiguration }, nil?: true
122122

123123
# @!attribute tax_id
@@ -313,7 +313,7 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel
313313
#
314314
# @param shipping_address [Orb::Models::AddressInput, nil]
315315
#
316-
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral, nil]
316+
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral, Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok, nil]
317317
#
318318
# @param tax_id [Orb::Models::CustomerTaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
319319
#
@@ -350,6 +350,8 @@ module TaxConfiguration
350350

351351
variant :numeral, -> { Orb::CustomerCreateParams::TaxConfiguration::Numeral }
352352

353+
variant :anrok, -> { Orb::CustomerCreateParams::TaxConfiguration::Anrok }
354+
353355
class Numeral < Orb::Internal::Type::BaseModel
354356
# @!attribute tax_exempt
355357
#
@@ -361,13 +363,55 @@ class Numeral < Orb::Internal::Type::BaseModel
361363
# @return [Symbol, :numeral]
362364
required :tax_provider, const: :numeral
363365

364-
# @!method initialize(tax_exempt:, tax_provider: :numeral)
366+
# @!attribute automatic_tax_enabled
367+
# Whether to automatically calculate tax for this customer. When null, inherits
368+
# from account-level setting. When true or false, overrides the account setting.
369+
#
370+
# @return [Boolean, nil]
371+
optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true
372+
373+
# @!method initialize(tax_exempt:, automatic_tax_enabled: nil, tax_provider: :numeral)
374+
# Some parameter documentations has been truncated, see
375+
# {Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral} for more details.
376+
#
365377
# @param tax_exempt [Boolean]
378+
#
379+
# @param automatic_tax_enabled [Boolean, nil] Whether to automatically calculate tax for this customer. When null, inherits fr
380+
#
366381
# @param tax_provider [Symbol, :numeral]
367382
end
368383

384+
class Anrok < Orb::Internal::Type::BaseModel
385+
# @!attribute tax_exempt
386+
#
387+
# @return [Boolean]
388+
required :tax_exempt, Orb::Internal::Type::Boolean
389+
390+
# @!attribute tax_provider
391+
#
392+
# @return [Symbol, :anrok]
393+
required :tax_provider, const: :anrok
394+
395+
# @!attribute automatic_tax_enabled
396+
# Whether to automatically calculate tax for this customer. When null, inherits
397+
# from account-level setting. When true or false, overrides the account setting.
398+
#
399+
# @return [Boolean, nil]
400+
optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true
401+
402+
# @!method initialize(tax_exempt:, automatic_tax_enabled: nil, tax_provider: :anrok)
403+
# Some parameter documentations has been truncated, see
404+
# {Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok} for more details.
405+
#
406+
# @param tax_exempt [Boolean]
407+
#
408+
# @param automatic_tax_enabled [Boolean, nil] Whether to automatically calculate tax for this customer. When null, inherits fr
409+
#
410+
# @param tax_provider [Symbol, :anrok]
411+
end
412+
369413
# @!method self.variants
370-
# @return [Array(Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral)]
414+
# @return [Array(Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral, Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok)]
371415
end
372416
end
373417
end

lib/orb/models/customer_update_by_external_id_params.rb

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel
3737
# @return [Boolean, nil]
3838
optional :auto_issuance, Orb::Internal::Type::Boolean, nil?: true
3939

40+
# @!attribute automatic_tax_enabled
41+
# Whether automatic tax calculation is enabled for this customer. When null,
42+
# inherits from account-level setting. When true or false, overrides the account
43+
# setting.
44+
#
45+
# @return [Boolean, nil]
46+
optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true
47+
4048
# @!attribute billing_address
4149
#
4250
# @return [Orb::Models::AddressInput, nil]
@@ -123,7 +131,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel
123131

124132
# @!attribute tax_configuration
125133
#
126-
# @return [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, nil]
134+
# @return [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok, nil]
127135
optional :tax_configuration,
128136
union: -> { Orb::CustomerUpdateByExternalIDParams::TaxConfiguration },
129137
nil?: true
@@ -277,7 +285,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel
277285
# @return [Orb::Models::CustomerTaxID, nil]
278286
optional :tax_id, -> { Orb::CustomerTaxID }, nil?: true
279287

280-
# @!method initialize(accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
288+
# @!method initialize(accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, automatic_tax_enabled: nil, billing_address: nil, currency: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
281289
# Some parameter documentations has been truncated, see
282290
# {Orb::Models::CustomerUpdateByExternalIDParams} for more details.
283291
#
@@ -289,6 +297,8 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel
289297
#
290298
# @param auto_issuance [Boolean, nil] Used to determine if invoices for this customer will be automatically issued. If
291299
#
300+
# @param automatic_tax_enabled [Boolean, nil] Whether automatic tax calculation is enabled for this customer. When null, inher
301+
#
292302
# @param billing_address [Orb::Models::AddressInput, nil]
293303
#
294304
# @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. If not
@@ -313,7 +323,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel
313323
#
314324
# @param shipping_address [Orb::Models::AddressInput, nil]
315325
#
316-
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, nil]
326+
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok, nil]
317327
#
318328
# @param tax_id [Orb::Models::CustomerTaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
319329
#
@@ -352,6 +362,8 @@ module TaxConfiguration
352362

353363
variant :numeral, -> { Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral }
354364

365+
variant :anrok, -> { Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok }
366+
355367
class Numeral < Orb::Internal::Type::BaseModel
356368
# @!attribute tax_exempt
357369
#
@@ -363,13 +375,57 @@ class Numeral < Orb::Internal::Type::BaseModel
363375
# @return [Symbol, :numeral]
364376
required :tax_provider, const: :numeral
365377

366-
# @!method initialize(tax_exempt:, tax_provider: :numeral)
378+
# @!attribute automatic_tax_enabled
379+
# Whether to automatically calculate tax for this customer. When null, inherits
380+
# from account-level setting. When true or false, overrides the account setting.
381+
#
382+
# @return [Boolean, nil]
383+
optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true
384+
385+
# @!method initialize(tax_exempt:, automatic_tax_enabled: nil, tax_provider: :numeral)
386+
# Some parameter documentations has been truncated, see
387+
# {Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral} for
388+
# more details.
389+
#
367390
# @param tax_exempt [Boolean]
391+
#
392+
# @param automatic_tax_enabled [Boolean, nil] Whether to automatically calculate tax for this customer. When null, inherits fr
393+
#
368394
# @param tax_provider [Symbol, :numeral]
369395
end
370396

397+
class Anrok < Orb::Internal::Type::BaseModel
398+
# @!attribute tax_exempt
399+
#
400+
# @return [Boolean]
401+
required :tax_exempt, Orb::Internal::Type::Boolean
402+
403+
# @!attribute tax_provider
404+
#
405+
# @return [Symbol, :anrok]
406+
required :tax_provider, const: :anrok
407+
408+
# @!attribute automatic_tax_enabled
409+
# Whether to automatically calculate tax for this customer. When null, inherits
410+
# from account-level setting. When true or false, overrides the account setting.
411+
#
412+
# @return [Boolean, nil]
413+
optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true
414+
415+
# @!method initialize(tax_exempt:, automatic_tax_enabled: nil, tax_provider: :anrok)
416+
# Some parameter documentations has been truncated, see
417+
# {Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok} for
418+
# more details.
419+
#
420+
# @param tax_exempt [Boolean]
421+
#
422+
# @param automatic_tax_enabled [Boolean, nil] Whether to automatically calculate tax for this customer. When null, inherits fr
423+
#
424+
# @param tax_provider [Symbol, :anrok]
425+
end
426+
371427
# @!method self.variants
372-
# @return [Array(Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral)]
428+
# @return [Array(Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok)]
373429
end
374430
end
375431
end

0 commit comments

Comments
 (0)