Class: Orb::Models::PaymentMethodCreatedWebhookEvent::PaymentMethod

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

Overview

See Also:

  • Orb::Models::PaymentMethodCreatedWebhookEvent#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::PaymentMethodCreatedWebhookEvent::PaymentMethod 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::PaymentMethodCreatedWebhookEvent::PaymentMethod::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/payment_method_created_webhook_event.rb', line 102

Instance Attribute Details

#created_at ⇒ Time

The time at which the payment method was created.

Parameters:

  • value (Time)

Returns:

  • (Time)


67
# File 'lib/orb/models/payment_method_created_webhook_event.rb', line 67

required :created_at, Time

#customer_id ⇒ String

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

Parameters:

  • value (String)

Returns:

  • (String)


73
# File 'lib/orb/models/payment_method_created_webhook_event.rb', line 73

required :customer_id, String

#default ⇒ Boolean

Whether this is the customer's default payment method.

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


79
# File 'lib/orb/models/payment_method_created_webhook_event.rb', line 79

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

#external_payment_method_id ⇒ String

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

Parameters:

  • value (String)

Returns:

  • (String)


85
# File 'lib/orb/models/payment_method_created_webhook_event.rb', line 85

required :external_payment_method_id, String

#id ⇒ String

The Orb-assigned unique identifier for the payment method.

Parameters:

  • value (String)

Returns:

  • (String)


61
# File 'lib/orb/models/payment_method_created_webhook_event.rb', line 61

required :id, String

#payment_method_type ⇒ Symbol, Orb::Models::PaymentMethodCreatedWebhookEvent::PaymentMethod::PaymentMethodType

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

Parameters:

  • value (Orb::Models::PaymentMethodCreatedWebhookEvent::PaymentMethod::payment_method_type)

Returns:



91
92
# File 'lib/orb/models/payment_method_created_webhook_event.rb', line 91

required :payment_method_type,
enum: -> { Orb::PaymentMethodCreatedWebhookEvent::PaymentMethod::PaymentMethodType }

#provider_type ⇒ String?

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)


100
# File 'lib/orb/models/payment_method_created_webhook_event.rb', line 100

required :provider_type, String, nil?: true

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


75
# File 'sig/orb/models/payment_method_created_webhook_event.rbs', line 75

def to_hash: -> {