Class: Clerk::Models::Components::PaymentSource
- Inherits:
-
Object
- Object
- Clerk::Models::Components::PaymentSource
- Includes:
- Crystalline::MetadataFields
- Defined in:
- lib/clerk/models/components/payment_source.rb
Overview
The payment source associated with this subscription.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(object:, id:, payer_id:, payment_method:, gateway:, gateway_external_id:, last4:, status:, wallet_type:, card_type:, created_at:, updated_at:, expiry_year: nil, expiry_month: nil, is_default: nil, gateway_external_account_id: nil, is_removable: nil) ⇒ PaymentSource
constructor
A new instance of PaymentSource.
Methods included from Crystalline::MetadataFields
#field, #fields, included, #marshal_single, #to_dict, #to_json
Constructor Details
#initialize(object:, id:, payer_id:, payment_method:, gateway:, gateway_external_id:, last4:, status:, wallet_type:, card_type:, created_at:, updated_at:, expiry_year: nil, expiry_month: nil, is_default: nil, gateway_external_account_id: nil, is_removable: nil) ⇒ PaymentSource
Returns a new instance of PaymentSource.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/clerk/models/components/payment_source.rb', line 51 def initialize(object:, id:, payer_id:, payment_method:, gateway:, gateway_external_id:, last4:, status:, wallet_type:, card_type:, created_at:, updated_at:, expiry_year: nil, expiry_month: nil, is_default: nil, gateway_external_account_id: nil, is_removable: nil) @object = object @id = id @payer_id = payer_id @payment_method = payment_method @gateway = gateway @gateway_external_id = gateway_external_id @last4 = last4 @status = status @wallet_type = wallet_type @card_type = card_type @created_at = created_at @updated_at = updated_at @expiry_year = expiry_year @expiry_month = expiry_month @is_default = is_default @gateway_external_account_id = gateway_external_account_id @is_removable = is_removable end |
Instance Method Details
#==(other) ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/clerk/models/components/payment_source.rb', line 72 def ==(other) return false unless other.is_a? self.class return false unless @object == other.object return false unless @id == other.id return false unless @payer_id == other.payer_id return false unless @payment_method == other.payment_method return false unless @gateway == other.gateway return false unless @gateway_external_id == other.gateway_external_id return false unless @last4 == other.last4 return false unless @status == other.status return false unless @wallet_type == other.wallet_type return false unless @card_type == other.card_type return false unless @created_at == other.created_at return false unless @updated_at == other.updated_at return false unless @expiry_year == other.expiry_year return false unless @expiry_month == other.expiry_month return false unless @is_default == other.is_default return false unless @gateway_external_account_id == other.gateway_external_account_id return false unless @is_removable == other.is_removable true end |