Skip to content

Commit 4de7f17

Browse files
feat(api): api update
1 parent 6ada340 commit 4de7f17

12 files changed

+369
-29
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-672b562b91c2e644498b93b1940f8866576a6734a81346b324ed5792e9276bf3.yml
3-
openapi_spec_hash: 3c1a3cc113493afd824bdc6773a202bb
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-145c6652d32a05c9305e4674643e2aa7d559073e48dc252d6c3c0fe802ce7ec6.yml
3+
openapi_spec_hash: 6bbbbe1687099b69faee47fda12bf82c
44
config_hash: e6db17547fe854b1c240407cf4c6dc9e

lib/orb/models/customer_create_params.rb

Lines changed: 34 additions & 3 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, Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok, nil]
120+
# @return [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral, Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok, Orb::Models::CustomerCreateParams::TaxConfiguration::Stripe, 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, Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok, nil]
316+
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral, Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok, Orb::Models::CustomerCreateParams::TaxConfiguration::Stripe, 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
#
@@ -352,6 +352,8 @@ module TaxConfiguration
352352

353353
variant :anrok, -> { Orb::CustomerCreateParams::TaxConfiguration::Anrok }
354354

355+
variant :stripe, -> { Orb::CustomerCreateParams::TaxConfiguration::Stripe }
356+
355357
class Numeral < Orb::Internal::Type::BaseModel
356358
# @!attribute tax_exempt
357359
#
@@ -410,8 +412,37 @@ class Anrok < Orb::Internal::Type::BaseModel
410412
# @param tax_provider [Symbol, :anrok]
411413
end
412414

415+
class Stripe < Orb::Internal::Type::BaseModel
416+
# @!attribute tax_exempt
417+
#
418+
# @return [Boolean]
419+
required :tax_exempt, Orb::Internal::Type::Boolean
420+
421+
# @!attribute tax_provider
422+
#
423+
# @return [Symbol, :stripe]
424+
required :tax_provider, const: :stripe
425+
426+
# @!attribute automatic_tax_enabled
427+
# Whether to automatically calculate tax for this customer. When null, inherits
428+
# from account-level setting. When true or false, overrides the account setting.
429+
#
430+
# @return [Boolean, nil]
431+
optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true
432+
433+
# @!method initialize(tax_exempt:, automatic_tax_enabled: nil, tax_provider: :stripe)
434+
# Some parameter documentations has been truncated, see
435+
# {Orb::Models::CustomerCreateParams::TaxConfiguration::Stripe} for more details.
436+
#
437+
# @param tax_exempt [Boolean]
438+
#
439+
# @param automatic_tax_enabled [Boolean, nil] Whether to automatically calculate tax for this customer. When null, inherits fr
440+
#
441+
# @param tax_provider [Symbol, :stripe]
442+
end
443+
413444
# @!method self.variants
414-
# @return [Array(Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral, Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok)]
445+
# @return [Array(Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral, Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok, Orb::Models::CustomerCreateParams::TaxConfiguration::Stripe)]
415446
end
416447
end
417448
end

lib/orb/models/customer_update_by_external_id_params.rb

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel
123123

124124
# @!attribute tax_configuration
125125
#
126-
# @return [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok, nil]
126+
# @return [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Stripe, nil]
127127
optional :tax_configuration,
128128
union: -> { Orb::CustomerUpdateByExternalIDParams::TaxConfiguration },
129129
nil?: true
@@ -313,7 +313,7 @@ class CustomerUpdateByExternalIDParams < 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::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok, nil]
316+
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Stripe, 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
#
@@ -354,6 +354,8 @@ module TaxConfiguration
354354

355355
variant :anrok, -> { Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok }
356356

357+
variant :stripe, -> { Orb::CustomerUpdateByExternalIDParams::TaxConfiguration::Stripe }
358+
357359
class Numeral < Orb::Internal::Type::BaseModel
358360
# @!attribute tax_exempt
359361
#
@@ -414,8 +416,38 @@ class Anrok < Orb::Internal::Type::BaseModel
414416
# @param tax_provider [Symbol, :anrok]
415417
end
416418

419+
class Stripe < Orb::Internal::Type::BaseModel
420+
# @!attribute tax_exempt
421+
#
422+
# @return [Boolean]
423+
required :tax_exempt, Orb::Internal::Type::Boolean
424+
425+
# @!attribute tax_provider
426+
#
427+
# @return [Symbol, :stripe]
428+
required :tax_provider, const: :stripe
429+
430+
# @!attribute automatic_tax_enabled
431+
# Whether to automatically calculate tax for this customer. When null, inherits
432+
# from account-level setting. When true or false, overrides the account setting.
433+
#
434+
# @return [Boolean, nil]
435+
optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true
436+
437+
# @!method initialize(tax_exempt:, automatic_tax_enabled: nil, tax_provider: :stripe)
438+
# Some parameter documentations has been truncated, see
439+
# {Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Stripe} for
440+
# more details.
441+
#
442+
# @param tax_exempt [Boolean]
443+
#
444+
# @param automatic_tax_enabled [Boolean, nil] Whether to automatically calculate tax for this customer. When null, inherits fr
445+
#
446+
# @param tax_provider [Symbol, :stripe]
447+
end
448+
417449
# @!method self.variants
418-
# @return [Array(Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok)]
450+
# @return [Array(Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Stripe)]
419451
end
420452
end
421453
end

lib/orb/models/customer_update_params.rb

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel
121121

122122
# @!attribute tax_configuration
123123
#
124-
# @return [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateParams::TaxConfiguration::Anrok, nil]
124+
# @return [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateParams::TaxConfiguration::Anrok, Orb::Models::CustomerUpdateParams::TaxConfiguration::Stripe, nil]
125125
optional :tax_configuration, union: -> { Orb::CustomerUpdateParams::TaxConfiguration }, nil?: true
126126

127127
# @!attribute tax_id
@@ -309,7 +309,7 @@ class CustomerUpdateParams < Orb::Internal::Type::BaseModel
309309
#
310310
# @param shipping_address [Orb::Models::AddressInput, nil]
311311
#
312-
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateParams::TaxConfiguration::Anrok, nil]
312+
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateParams::TaxConfiguration::Anrok, Orb::Models::CustomerUpdateParams::TaxConfiguration::Stripe, nil]
313313
#
314314
# @param tax_id [Orb::Models::CustomerTaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
315315
#
@@ -350,6 +350,8 @@ module TaxConfiguration
350350

351351
variant :anrok, -> { Orb::CustomerUpdateParams::TaxConfiguration::Anrok }
352352

353+
variant :stripe, -> { Orb::CustomerUpdateParams::TaxConfiguration::Stripe }
354+
353355
class Numeral < Orb::Internal::Type::BaseModel
354356
# @!attribute tax_exempt
355357
#
@@ -408,8 +410,37 @@ class Anrok < Orb::Internal::Type::BaseModel
408410
# @param tax_provider [Symbol, :anrok]
409411
end
410412

413+
class Stripe < Orb::Internal::Type::BaseModel
414+
# @!attribute tax_exempt
415+
#
416+
# @return [Boolean]
417+
required :tax_exempt, Orb::Internal::Type::Boolean
418+
419+
# @!attribute tax_provider
420+
#
421+
# @return [Symbol, :stripe]
422+
required :tax_provider, const: :stripe
423+
424+
# @!attribute automatic_tax_enabled
425+
# Whether to automatically calculate tax for this customer. When null, inherits
426+
# from account-level setting. When true or false, overrides the account setting.
427+
#
428+
# @return [Boolean, nil]
429+
optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true
430+
431+
# @!method initialize(tax_exempt:, automatic_tax_enabled: nil, tax_provider: :stripe)
432+
# Some parameter documentations has been truncated, see
433+
# {Orb::Models::CustomerUpdateParams::TaxConfiguration::Stripe} for more details.
434+
#
435+
# @param tax_exempt [Boolean]
436+
#
437+
# @param automatic_tax_enabled [Boolean, nil] Whether to automatically calculate tax for this customer. When null, inherits fr
438+
#
439+
# @param tax_provider [Symbol, :stripe]
440+
end
441+
411442
# @!method self.variants
412-
# @return [Array(Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateParams::TaxConfiguration::Anrok)]
443+
# @return [Array(Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateParams::TaxConfiguration::Anrok, Orb::Models::CustomerUpdateParams::TaxConfiguration::Stripe)]
413444
end
414445
end
415446
end

lib/orb/resources/customers.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ class Customers
6262
#
6363
# @param shipping_address [Orb::Models::AddressInput, nil]
6464
#
65-
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral, Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok, nil]
65+
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerCreateParams::TaxConfiguration::Numeral, Orb::Models::CustomerCreateParams::TaxConfiguration::Anrok, Orb::Models::CustomerCreateParams::TaxConfiguration::Stripe, nil]
6666
#
6767
# @param tax_id [Orb::Models::CustomerTaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
6868
#
@@ -129,7 +129,7 @@ def create(params)
129129
#
130130
# @param shipping_address [Orb::Models::AddressInput, nil]
131131
#
132-
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateParams::TaxConfiguration::Anrok, nil]
132+
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateParams::TaxConfiguration::Anrok, Orb::Models::CustomerUpdateParams::TaxConfiguration::Stripe, nil]
133133
#
134134
# @param tax_id [Orb::Models::CustomerTaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
135135
#
@@ -367,7 +367,7 @@ def sync_payment_methods_from_gateway_by_external_customer_id(external_customer_
367367
#
368368
# @param shipping_address [Orb::Models::AddressInput, nil]
369369
#
370-
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok, nil]
370+
# @param tax_configuration [Orb::Models::NewAvalaraTaxConfiguration, Orb::Models::NewTaxJarConfiguration, Orb::Models::NewSphereConfiguration, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Numeral, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Anrok, Orb::Models::CustomerUpdateByExternalIDParams::TaxConfiguration::Stripe, nil]
371371
#
372372
# @param tax_id [Orb::Models::CustomerTaxID, nil] Tax IDs are commonly required to be displayed on customer invoices, which are ad
373373
#

rbi/orb/models/customer_create_params.rbi

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@ module Orb
126126
Orb::NewTaxJarConfiguration,
127127
Orb::NewSphereConfiguration,
128128
Orb::CustomerCreateParams::TaxConfiguration::Numeral,
129-
Orb::CustomerCreateParams::TaxConfiguration::Anrok
129+
Orb::CustomerCreateParams::TaxConfiguration::Anrok,
130+
Orb::CustomerCreateParams::TaxConfiguration::Stripe
130131
)
131132
)
132133
)
@@ -317,7 +318,8 @@ module Orb
317318
Orb::NewTaxJarConfiguration::OrHash,
318319
Orb::NewSphereConfiguration::OrHash,
319320
Orb::CustomerCreateParams::TaxConfiguration::Numeral::OrHash,
320-
Orb::CustomerCreateParams::TaxConfiguration::Anrok::OrHash
321+
Orb::CustomerCreateParams::TaxConfiguration::Anrok::OrHash,
322+
Orb::CustomerCreateParams::TaxConfiguration::Stripe::OrHash
321323
)
322324
),
323325
tax_id: T.nilable(Orb::CustomerTaxID::OrHash),
@@ -552,7 +554,8 @@ module Orb
552554
Orb::NewTaxJarConfiguration,
553555
Orb::NewSphereConfiguration,
554556
Orb::CustomerCreateParams::TaxConfiguration::Numeral,
555-
Orb::CustomerCreateParams::TaxConfiguration::Anrok
557+
Orb::CustomerCreateParams::TaxConfiguration::Anrok,
558+
Orb::CustomerCreateParams::TaxConfiguration::Stripe
556559
)
557560
),
558561
tax_id: T.nilable(Orb::CustomerTaxID),
@@ -621,7 +624,8 @@ module Orb
621624
Orb::NewTaxJarConfiguration,
622625
Orb::NewSphereConfiguration,
623626
Orb::CustomerCreateParams::TaxConfiguration::Numeral,
624-
Orb::CustomerCreateParams::TaxConfiguration::Anrok
627+
Orb::CustomerCreateParams::TaxConfiguration::Anrok,
628+
Orb::CustomerCreateParams::TaxConfiguration::Stripe
625629
)
626630
end
627631

@@ -723,6 +727,55 @@ module Orb
723727
end
724728
end
725729

730+
class Stripe < Orb::Internal::Type::BaseModel
731+
OrHash =
732+
T.type_alias do
733+
T.any(
734+
Orb::CustomerCreateParams::TaxConfiguration::Stripe,
735+
Orb::Internal::AnyHash
736+
)
737+
end
738+
739+
sig { returns(T::Boolean) }
740+
attr_accessor :tax_exempt
741+
742+
sig { returns(Symbol) }
743+
attr_accessor :tax_provider
744+
745+
# Whether to automatically calculate tax for this customer. When null, inherits
746+
# from account-level setting. When true or false, overrides the account setting.
747+
sig { returns(T.nilable(T::Boolean)) }
748+
attr_accessor :automatic_tax_enabled
749+
750+
sig do
751+
params(
752+
tax_exempt: T::Boolean,
753+
automatic_tax_enabled: T.nilable(T::Boolean),
754+
tax_provider: Symbol
755+
).returns(T.attached_class)
756+
end
757+
def self.new(
758+
tax_exempt:,
759+
# Whether to automatically calculate tax for this customer. When null, inherits
760+
# from account-level setting. When true or false, overrides the account setting.
761+
automatic_tax_enabled: nil,
762+
tax_provider: :stripe
763+
)
764+
end
765+
766+
sig do
767+
override.returns(
768+
{
769+
tax_exempt: T::Boolean,
770+
tax_provider: Symbol,
771+
automatic_tax_enabled: T.nilable(T::Boolean)
772+
}
773+
)
774+
end
775+
def to_hash
776+
end
777+
end
778+
726779
sig do
727780
override.returns(
728781
T::Array[Orb::CustomerCreateParams::TaxConfiguration::Variants]

0 commit comments

Comments
 (0)