Class: Pago::V2026_04::Models::PaymentMethodCard
- 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" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "processor", "customer_id", "type", "method_metadata"].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.
- #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:) ⇒ PaymentMethodCard
constructor
A new instance of PaymentMethodCard.
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:) ⇒ PaymentMethodCard
Returns a new instance of PaymentMethodCard.
35557 35558 35559 35560 35561 35562 35563 35564 35565 35566 35567 35568 35569 35570 35571 35572 35573 35574 |
# File 'lib/pago/v2026_04/models.rb', line 35557 def initialize( id:, created_at:, modified_at:, processor:, customer_id:, type:, method_metadata: ) 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, ) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
35539 35540 35541 |
# File 'lib/pago/v2026_04/models.rb', line 35539 def created_at @created_at end |
#customer_id ⇒ String (readonly)
35549 35550 35551 |
# File 'lib/pago/v2026_04/models.rb', line 35549 def customer_id @customer_id end |
#id ⇒ String (readonly)
The ID of the object.
35535 35536 35537 |
# File 'lib/pago/v2026_04/models.rb', line 35535 def id @id end |
#method_metadata ⇒ Models::PaymentMethodCardMetadata (readonly)
35555 35556 35557 |
# File 'lib/pago/v2026_04/models.rb', line 35555 def @method_metadata end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
35543 35544 35545 |
# File 'lib/pago/v2026_04/models.rb', line 35543 def modified_at @modified_at end |
#processor ⇒ String (readonly)
35546 35547 35548 |
# File 'lib/pago/v2026_04/models.rb', line 35546 def processor @processor end |
#type ⇒ String (readonly)
35552 35553 35554 |
# File 'lib/pago/v2026_04/models.rb', line 35552 def type @type end |
Class Method Details
.from_json(data) ⇒ PaymentMethodCard?
35578 35579 35580 35581 35582 35583 35584 35585 35586 35587 35588 35589 35590 35591 35592 35593 35594 35595 |
# File 'lib/pago/v2026_04/models.rb', line 35578 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) ), data ) end |