Class: Orb::Models::Customer::DefaultPaymentMethod

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

Overview

See Also:

  • Orb::Models::Customer#default_payment_method

Defined Under Namespace

Modules: PaymentMethodType

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(id:, created_at:, customer_id:, default:, external_payment_method_id:, payment_method_type:, provider_type:) ⇒ Object

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

A payment method represents a customer's stored payment instrument held with an external payment provider (such as Adyen or Stripe).

The serialization is intentionally minimal for now; provider-pulled details (e.g. card display metadata) will be added over time.

Parameters:

  • id (String)

    The Orb-assigned unique identifier for the payment method.

  • created_at (Time)

    The time at which the payment method was created.

  • customer_id (String)

    The ID of the Orb customer this payment method is attached to.

  • default (Boolean)

    Whether this is the customer's default payment method.

  • external_payment_method_id (String)

    The identifier of this payment method in the external payment provider.

  • payment_method_type (Symbol, Orb::Models::Customer::DefaultPaymentMethod::PaymentMethodType)

    The type of the underlying payment instrument, e.g. card or us_bank_account.

  • provider_type (String, nil)

    The external payment provider this method belongs to, derived from the linked pa



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

Instance Attribute Details

#created_atTime

The time at which the payment method was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :created_at, Time

#customer_idString

The ID of the Orb customer this payment method is attached to.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :customer_id, String

#defaultBoolean

Whether this is the customer's default payment method.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


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

required :default, Orb::Internal::Type::Boolean

#external_payment_method_idString

The identifier of this payment method in the external payment provider.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :external_payment_method_id, String

#idString

The Orb-assigned unique identifier for the payment method.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#payment_method_typeSymbol, Orb::Models::Customer::DefaultPaymentMethod::PaymentMethodType

The type of the underlying payment instrument, e.g. card or us_bank_account.

Parameters:

  • value (Orb::Models::Customer::DefaultPaymentMethod::payment_method_type)

Returns:



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

required :payment_method_type, enum: -> { Orb::Customer::DefaultPaymentMethod::PaymentMethodType }

#provider_typeString?

The external payment provider this method belongs to, derived from the linked payment gateway connection (e.g. adyen or stripe). Null if the connection has been removed.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :provider_type, String, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


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

def to_hash: -> {