Class: Orb::Models::Customer::PaymentConfiguration::PaymentProvider

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/customer.rb,
sig/orb/models/customer.rbs

Defined Under Namespace

Modules: ProviderType

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(provider_type:, default_shared_payment_token: nil, excluded_payment_method_types: nil) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::Customer::PaymentConfiguration::PaymentProvider for more details.

Parameters:

  • provider_type (Symbol, Orb::Models::Customer::PaymentConfiguration::PaymentProvider::ProviderType)

    The payment provider to configure.

  • default_shared_payment_token (String, nil) (defaults to: nil)

    The ID of a shared payment token granted by an agent to use as the default payme

  • excluded_payment_method_types (Array<String>) (defaults to: nil)

    List of Stripe payment method types to exclude for this customer. Excluded payme



585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
# File 'lib/orb/models/customer.rb', line 585

class PaymentProvider < Orb::Internal::Type::BaseModel
  # @!attribute provider_type
  #   The payment provider to configure.
  #
  #   @return [Symbol, Orb::Models::Customer::PaymentConfiguration::PaymentProvider::ProviderType]
  required :provider_type, enum: -> { Orb::Customer::PaymentConfiguration::PaymentProvider::ProviderType }

  # @!attribute default_shared_payment_token
  #   The ID of a shared payment token granted by an agent to use as the default
  #   payment instrument for this customer. When set, auto-collection will use this
  #   token instead of the customer's default payment method.
  #
  #   @return [String, nil]
  optional :default_shared_payment_token, String, nil?: true

  # @!attribute excluded_payment_method_types
  #   List of Stripe payment method types to exclude for this customer. Excluded
  #   payment methods will not be available for the customer to select during payment,
  #   and will not be used for auto-collection. If a customer's default payment method
  #   becomes excluded, Orb will attempt to use the next available compatible payment
  #   method for auto-collection.
  #
  #   @return [Array<String>, nil]
  optional :excluded_payment_method_types, Orb::Internal::Type::ArrayOf[String]

  # @!method initialize(provider_type:, default_shared_payment_token: nil, excluded_payment_method_types: nil)
  #   Some parameter documentations has been truncated, see
  #   {Orb::Models::Customer::PaymentConfiguration::PaymentProvider} for more details.
  #
  #   @param provider_type [Symbol, Orb::Models::Customer::PaymentConfiguration::PaymentProvider::ProviderType] The payment provider to configure.
  #
  #   @param default_shared_payment_token [String, nil] The ID of a shared payment token granted by an agent to use as the default payme
  #
  #   @param excluded_payment_method_types [Array<String>] List of Stripe payment method types to exclude for this customer. Excluded payme

  # The payment provider to configure.
  #
  # @see Orb::Models::Customer::PaymentConfiguration::PaymentProvider#provider_type
  module ProviderType
    extend Orb::Internal::Type::Enum

    STRIPE = :stripe

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#default_shared_payment_tokenString?

The ID of a shared payment token granted by an agent to use as the default payment instrument for this customer. When set, auto-collection will use this token instead of the customer's default payment method.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


598
# File 'lib/orb/models/customer.rb', line 598

optional :default_shared_payment_token, String, nil?: true

#excluded_payment_method_typesArray<String>?

List of Stripe payment method types to exclude for this customer. Excluded payment methods will not be available for the customer to select during payment, and will not be used for auto-collection. If a customer's default payment method becomes excluded, Orb will attempt to use the next available compatible payment method for auto-collection.

Returns:

  • (Array<String>, nil)


608
# File 'lib/orb/models/customer.rb', line 608

optional :excluded_payment_method_types, Orb::Internal::Type::ArrayOf[String]

#provider_typeSymbol, Orb::Models::Customer::PaymentConfiguration::PaymentProvider::ProviderType

The payment provider to configure.

Parameters:

  • value (Orb::Models::Customer::PaymentConfiguration::PaymentProvider::provider_type)

Returns:



590
# File 'lib/orb/models/customer.rb', line 590

required :provider_type, enum: -> { Orb::Customer::PaymentConfiguration::PaymentProvider::ProviderType }

Instance Method Details

#to_hash{

Returns:

  • ({)


348
# File 'sig/orb/models/customer.rbs', line 348

def to_hash: -> {