Skip to content

Commit b6cd2e4

Browse files
feat(api): api update
1 parent 87a0726 commit b6cd2e4

17 files changed

+1237
-9
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-033643979990e894363554df06218fabe4493feaa569a013dbdf9a72aa21c45f.yml
3-
openapi_spec_hash: dd9d320ad178bafa06f1eac2977e2ca7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-7936e3f73bbe1d59d27fd7a8a226985927b38fdec1c936c77577381699fb6140.yml
3+
openapi_spec_hash: 1d3f9ed5fbdb0e40d56d6acd9d1736e2
44
config_hash: e6db17547fe854b1c240407cf4c6dc9e

lib/orb/models/customer.rb

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,19 @@ class Customer < Orb::Internal::Type::BaseModel
289289
# @return [Boolean, nil]
290290
optional :automatic_tax_enabled, Orb::Internal::Type::Boolean, nil?: true
291291

292+
# @!attribute payment_configuration
293+
# Payment configuration for the customer, applicable when using Orb Invoicing with
294+
# a supported payment provider such as Stripe.
295+
#
296+
# @return [Orb::Models::Customer::PaymentConfiguration, nil]
297+
optional :payment_configuration, -> { Orb::Customer::PaymentConfiguration }, nil?: true
298+
292299
# @!attribute reporting_configuration
293300
#
294301
# @return [Orb::Models::Customer::ReportingConfiguration, nil]
295302
optional :reporting_configuration, -> { Orb::Customer::ReportingConfiguration }, nil?: true
296303

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)
304+
# @!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, payment_configuration: nil, reporting_configuration: nil)
298305
# Some parameter documentations has been truncated, see {Orb::Models::Customer}
299306
# for more details.
300307
#
@@ -363,6 +370,8 @@ class Customer < Orb::Internal::Type::BaseModel
363370
#
364371
# @param automatic_tax_enabled [Boolean, nil] Whether automatic tax calculation is enabled for this customer. This field is nu
365372
#
373+
# @param payment_configuration [Orb::Models::Customer::PaymentConfiguration, nil] Payment configuration for the customer, applicable when using Orb Invoicing with
374+
#
366375
# @param reporting_configuration [Orb::Models::Customer::ReportingConfiguration, nil]
367376

368377
# @see Orb::Models::Customer#hierarchy
@@ -448,6 +457,60 @@ module ProviderType
448457
end
449458
end
450459

460+
# @see Orb::Models::Customer#payment_configuration
461+
class PaymentConfiguration < Orb::Internal::Type::BaseModel
462+
# @!attribute payment_providers
463+
# Provider-specific payment configuration.
464+
#
465+
# @return [Array<Orb::Models::Customer::PaymentConfiguration::PaymentProvider>, nil]
466+
optional :payment_providers,
467+
-> { Orb::Internal::Type::ArrayOf[Orb::Customer::PaymentConfiguration::PaymentProvider] }
468+
469+
# @!method initialize(payment_providers: nil)
470+
# Payment configuration for the customer, applicable when using Orb Invoicing with
471+
# a supported payment provider such as Stripe.
472+
#
473+
# @param payment_providers [Array<Orb::Models::Customer::PaymentConfiguration::PaymentProvider>] Provider-specific payment configuration.
474+
475+
class PaymentProvider < Orb::Internal::Type::BaseModel
476+
# @!attribute provider_type
477+
# The payment provider to configure.
478+
#
479+
# @return [Symbol, Orb::Models::Customer::PaymentConfiguration::PaymentProvider::ProviderType]
480+
required :provider_type, enum: -> { Orb::Customer::PaymentConfiguration::PaymentProvider::ProviderType }
481+
482+
# @!attribute excluded_payment_method_types
483+
# List of Stripe payment method types to exclude for this customer. Excluded
484+
# payment methods will not be available for the customer to select during payment,
485+
# and will not be used for auto-collection. If a customer's default payment method
486+
# becomes excluded, Orb will attempt to use the next available compatible payment
487+
# method for auto-collection.
488+
#
489+
# @return [Array<String>, nil]
490+
optional :excluded_payment_method_types, Orb::Internal::Type::ArrayOf[String]
491+
492+
# @!method initialize(provider_type:, excluded_payment_method_types: nil)
493+
# Some parameter documentations has been truncated, see
494+
# {Orb::Models::Customer::PaymentConfiguration::PaymentProvider} for more details.
495+
#
496+
# @param provider_type [Symbol, Orb::Models::Customer::PaymentConfiguration::PaymentProvider::ProviderType] The payment provider to configure.
497+
#
498+
# @param excluded_payment_method_types [Array<String>] List of Stripe payment method types to exclude for this customer. Excluded payme
499+
500+
# The payment provider to configure.
501+
#
502+
# @see Orb::Models::Customer::PaymentConfiguration::PaymentProvider#provider_type
503+
module ProviderType
504+
extend Orb::Internal::Type::Enum
505+
506+
STRIPE = :stripe
507+
508+
# @!method self.values
509+
# @return [Array<Symbol>]
510+
end
511+
end
512+
end
513+
451514
# @see Orb::Models::Customer#reporting_configuration
452515
class ReportingConfiguration < Orb::Internal::Type::BaseModel
453516
# @!attribute exempt

lib/orb/models/customer_create_params.rb

Lines changed: 65 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel
9090
# @return [Hash{Symbol=>String, nil}, nil]
9191
optional :metadata, Orb::Internal::Type::HashOf[String, nil?: true], nil?: true
9292

93+
# @!attribute payment_configuration
94+
# Payment configuration for the customer, applicable when using Orb Invoicing with
95+
# a supported payment provider such as Stripe.
96+
#
97+
# @return [Orb::Models::CustomerCreateParams::PaymentConfiguration, nil]
98+
optional :payment_configuration, -> { Orb::CustomerCreateParams::PaymentConfiguration }, nil?: true
99+
93100
# @!attribute payment_provider
94101
# This is used for creating charges or invoices in an external system via Orb.
95102
# When not in test mode, the connection must first be configured in the Orb
@@ -277,7 +284,7 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel
277284
# @return [String, nil]
278285
optional :timezone, String, nil?: true
279286

280-
# @!method initialize(email:, name:, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, timezone: nil, request_options: {})
287+
# @!method initialize(email:, name:, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, timezone: nil, request_options: {})
281288
# Some parameter documentations has been truncated, see
282289
# {Orb::Models::CustomerCreateParams} for more details.
283290
#
@@ -305,6 +312,8 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel
305312
#
306313
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
307314
#
315+
# @param payment_configuration [Orb::Models::CustomerCreateParams::PaymentConfiguration, nil] Payment configuration for the customer, applicable when using Orb Invoicing with
316+
#
308317
# @param payment_provider [Symbol, Orb::Models::CustomerCreateParams::PaymentProvider, nil] This is used for creating charges or invoices in an external system via Orb. Whe
309318
#
310319
# @param payment_provider_id [String, nil] The ID of this customer in an external payments solution, such as Stripe. This i
@@ -321,6 +330,61 @@ class CustomerCreateParams < Orb::Internal::Type::BaseModel
321330
#
322331
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
323332

333+
class PaymentConfiguration < Orb::Internal::Type::BaseModel
334+
# @!attribute payment_providers
335+
# Provider-specific payment configuration.
336+
#
337+
# @return [Array<Orb::Models::CustomerCreateParams::PaymentConfiguration::PaymentProvider>, nil]
338+
optional :payment_providers,
339+
-> { Orb::Internal::Type::ArrayOf[Orb::CustomerCreateParams::PaymentConfiguration::PaymentProvider] }
340+
341+
# @!method initialize(payment_providers: nil)
342+
# Payment configuration for the customer, applicable when using Orb Invoicing with
343+
# a supported payment provider such as Stripe.
344+
#
345+
# @param payment_providers [Array<Orb::Models::CustomerCreateParams::PaymentConfiguration::PaymentProvider>] Provider-specific payment configuration.
346+
347+
class PaymentProvider < Orb::Internal::Type::BaseModel
348+
# @!attribute provider_type
349+
# The payment provider to configure.
350+
#
351+
# @return [Symbol, Orb::Models::CustomerCreateParams::PaymentConfiguration::PaymentProvider::ProviderType]
352+
required :provider_type,
353+
enum: -> { Orb::CustomerCreateParams::PaymentConfiguration::PaymentProvider::ProviderType }
354+
355+
# @!attribute excluded_payment_method_types
356+
# List of Stripe payment method types to exclude for this customer. Excluded
357+
# payment methods will not be available for the customer to select during payment,
358+
# and will not be used for auto-collection. If a customer's default payment method
359+
# becomes excluded, Orb will attempt to use the next available compatible payment
360+
# method for auto-collection.
361+
#
362+
# @return [Array<String>, nil]
363+
optional :excluded_payment_method_types, Orb::Internal::Type::ArrayOf[String]
364+
365+
# @!method initialize(provider_type:, excluded_payment_method_types: nil)
366+
# Some parameter documentations has been truncated, see
367+
# {Orb::Models::CustomerCreateParams::PaymentConfiguration::PaymentProvider} for
368+
# more details.
369+
#
370+
# @param provider_type [Symbol, Orb::Models::CustomerCreateParams::PaymentConfiguration::PaymentProvider::ProviderType] The payment provider to configure.
371+
#
372+
# @param excluded_payment_method_types [Array<String>] List of Stripe payment method types to exclude for this customer. Excluded payme
373+
374+
# The payment provider to configure.
375+
#
376+
# @see Orb::Models::CustomerCreateParams::PaymentConfiguration::PaymentProvider#provider_type
377+
module ProviderType
378+
extend Orb::Internal::Type::Enum
379+
380+
STRIPE = :stripe
381+
382+
# @!method self.values
383+
# @return [Array<Symbol>]
384+
end
385+
end
386+
end
387+
324388
# This is used for creating charges or invoices in an external system via Orb.
325389
# When not in test mode, the connection must first be configured in the Orb
326390
# webapp.

lib/orb/models/customer_update_by_external_id_params.rb

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,15 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel
9090
# @return [String, nil]
9191
optional :name, String, nil?: true
9292

93+
# @!attribute payment_configuration
94+
# Payment configuration for the customer, applicable when using Orb Invoicing with
95+
# a supported payment provider such as Stripe.
96+
#
97+
# @return [Orb::Models::CustomerUpdateByExternalIDParams::PaymentConfiguration, nil]
98+
optional :payment_configuration,
99+
-> { Orb::CustomerUpdateByExternalIDParams::PaymentConfiguration },
100+
nil?: true
101+
93102
# @!attribute payment_provider
94103
# This is used for creating charges or invoices in an external system via Orb.
95104
# When not in test mode:
@@ -277,7 +286,7 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel
277286
# @return [Orb::Models::CustomerTaxID, nil]
278287
optional :tax_id, -> { Orb::CustomerTaxID }, nil?: true
279288

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: {})
289+
# @!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_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
281290
# Some parameter documentations has been truncated, see
282291
# {Orb::Models::CustomerUpdateByExternalIDParams} for more details.
283292
#
@@ -305,6 +314,8 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel
305314
#
306315
# @param name [String, nil] The full name of the customer
307316
#
317+
# @param payment_configuration [Orb::Models::CustomerUpdateByExternalIDParams::PaymentConfiguration, nil] Payment configuration for the customer, applicable when using Orb Invoicing with
318+
#
308319
# @param payment_provider [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::PaymentProvider, nil] This is used for creating charges or invoices in an external system via Orb. Whe
309320
#
310321
# @param payment_provider_id [String, nil] The ID of this customer in an external payments solution, such as Stripe. This i
@@ -319,6 +330,61 @@ class CustomerUpdateByExternalIDParams < Orb::Internal::Type::BaseModel
319330
#
320331
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
321332

333+
class PaymentConfiguration < Orb::Internal::Type::BaseModel
334+
# @!attribute payment_providers
335+
# Provider-specific payment configuration.
336+
#
337+
# @return [Array<Orb::Models::CustomerUpdateByExternalIDParams::PaymentConfiguration::PaymentProvider>, nil]
338+
optional :payment_providers,
339+
-> { Orb::Internal::Type::ArrayOf[Orb::CustomerUpdateByExternalIDParams::PaymentConfiguration::PaymentProvider] }
340+
341+
# @!method initialize(payment_providers: nil)
342+
# Payment configuration for the customer, applicable when using Orb Invoicing with
343+
# a supported payment provider such as Stripe.
344+
#
345+
# @param payment_providers [Array<Orb::Models::CustomerUpdateByExternalIDParams::PaymentConfiguration::PaymentProvider>] Provider-specific payment configuration.
346+
347+
class PaymentProvider < Orb::Internal::Type::BaseModel
348+
# @!attribute provider_type
349+
# The payment provider to configure.
350+
#
351+
# @return [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::PaymentConfiguration::PaymentProvider::ProviderType]
352+
required :provider_type,
353+
enum: -> { Orb::CustomerUpdateByExternalIDParams::PaymentConfiguration::PaymentProvider::ProviderType }
354+
355+
# @!attribute excluded_payment_method_types
356+
# List of Stripe payment method types to exclude for this customer. Excluded
357+
# payment methods will not be available for the customer to select during payment,
358+
# and will not be used for auto-collection. If a customer's default payment method
359+
# becomes excluded, Orb will attempt to use the next available compatible payment
360+
# method for auto-collection.
361+
#
362+
# @return [Array<String>, nil]
363+
optional :excluded_payment_method_types, Orb::Internal::Type::ArrayOf[String]
364+
365+
# @!method initialize(provider_type:, excluded_payment_method_types: nil)
366+
# Some parameter documentations has been truncated, see
367+
# {Orb::Models::CustomerUpdateByExternalIDParams::PaymentConfiguration::PaymentProvider}
368+
# for more details.
369+
#
370+
# @param provider_type [Symbol, Orb::Models::CustomerUpdateByExternalIDParams::PaymentConfiguration::PaymentProvider::ProviderType] The payment provider to configure.
371+
#
372+
# @param excluded_payment_method_types [Array<String>] List of Stripe payment method types to exclude for this customer. Excluded payme
373+
374+
# The payment provider to configure.
375+
#
376+
# @see Orb::Models::CustomerUpdateByExternalIDParams::PaymentConfiguration::PaymentProvider#provider_type
377+
module ProviderType
378+
extend Orb::Internal::Type::Enum
379+
380+
STRIPE = :stripe
381+
382+
# @!method self.values
383+
# @return [Array<Symbol>]
384+
end
385+
end
386+
end
387+
322388
# This is used for creating charges or invoices in an external system via Orb.
323389
# When not in test mode:
324390
#

0 commit comments

Comments
 (0)