Class: Pago::V2026_04::Models::CustomerPaymentMethodCard
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ id: "id", created_at: "created_at", modified_at: "modified_at", processor: "processor", customer_id: "customer_id", type: "type", method_metadata: "method_metadata", is_default: "is_default" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "processor", "customer_id", "type", "method_metadata", "is_default"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
- #customer_id ⇒ String readonly
-
#id ⇒ String
readonly
The ID of the object.
-
#is_default ⇒ Boolean
readonly
Whether this payment method is the customer's default payment method.
- #method_metadata ⇒ Models::PaymentMethodCardMetadata readonly
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
- #processor ⇒ String readonly
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, modified_at:, processor:, customer_id:, type:, method_metadata:, is_default:) ⇒ CustomerPaymentMethodCard
constructor
A new instance of CustomerPaymentMethodCard.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(id:, created_at:, modified_at:, processor:, customer_id:, type:, method_metadata:, is_default:) ⇒ CustomerPaymentMethodCard
Returns a new instance of CustomerPaymentMethodCard.
18483 18484 18485 18486 18487 18488 18489 18490 18491 18492 18493 18494 18495 18496 18497 18498 18499 18500 18501 18502 |
# File 'lib/pago/v2026_04/models.rb', line 18483 def initialize( id:, created_at:, modified_at:, processor:, customer_id:, type:, method_metadata:, is_default: ) super() assign(:id, id) assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:processor, processor) assign(:customer_id, customer_id) assign(:type, type) assign(:method_metadata, ) assign(:is_default, is_default) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
18461 18462 18463 |
# File 'lib/pago/v2026_04/models.rb', line 18461 def created_at @created_at end |
#customer_id ⇒ String (readonly)
18471 18472 18473 |
# File 'lib/pago/v2026_04/models.rb', line 18471 def customer_id @customer_id end |
#id ⇒ String (readonly)
The ID of the object.
18457 18458 18459 |
# File 'lib/pago/v2026_04/models.rb', line 18457 def id @id end |
#is_default ⇒ Boolean (readonly)
Whether this payment method is the customer's default payment method.
18481 18482 18483 |
# File 'lib/pago/v2026_04/models.rb', line 18481 def is_default @is_default end |
#method_metadata ⇒ Models::PaymentMethodCardMetadata (readonly)
18477 18478 18479 |
# File 'lib/pago/v2026_04/models.rb', line 18477 def @method_metadata end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
18465 18466 18467 |
# File 'lib/pago/v2026_04/models.rb', line 18465 def modified_at @modified_at end |
#processor ⇒ String (readonly)
18468 18469 18470 |
# File 'lib/pago/v2026_04/models.rb', line 18468 def processor @processor end |
#type ⇒ String (readonly)
18474 18475 18476 |
# File 'lib/pago/v2026_04/models.rb', line 18474 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomerPaymentMethodCard?
18506 18507 18508 18509 18510 18511 18512 18513 18514 18515 18516 18517 18518 18519 18520 18521 18522 18523 18524 |
# File 'lib/pago/v2026_04/models.rb', line 18506 def self.from_json(data) data = ::JSON.parse(data) if data.is_a?(String) data = ::Pago::Serde.object(data) return nil if data.nil? wrap_raw( new( id: (data.key?("id") ? data["id"] : ::Pago::UNSET), created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), processor: (data.key?("processor") ? data["processor"] : ::Pago::UNSET), customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), method_metadata: (data.key?("method_metadata") ? Models::PaymentMethodCardMetadata.from_json(data["method_metadata"]) : ::Pago::UNSET), is_default: (data.key?("is_default") ? data["is_default"] : ::Pago::UNSET) ), data ) end |