Class: Pago::V2026_04::Models::CustomerPaymentMethodGeneric
- 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", is_default: "is_default" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "processor", "customer_id", "type", "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.
-
#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:, is_default:) ⇒ CustomerPaymentMethodGeneric
constructor
A new instance of CustomerPaymentMethodGeneric.
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:, is_default:) ⇒ CustomerPaymentMethodGeneric
Returns a new instance of CustomerPaymentMethodGeneric.
18727 18728 18729 18730 18731 18732 18733 18734 18735 18736 18737 18738 18739 18740 18741 18742 18743 18744 |
# File 'lib/pago/v2026_04/models.rb', line 18727 def initialize( id:, created_at:, modified_at:, processor:, customer_id:, type:, 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(:is_default, is_default) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
18708 18709 18710 |
# File 'lib/pago/v2026_04/models.rb', line 18708 def created_at @created_at end |
#customer_id ⇒ String (readonly)
18718 18719 18720 |
# File 'lib/pago/v2026_04/models.rb', line 18718 def customer_id @customer_id end |
#id ⇒ String (readonly)
The ID of the object.
18704 18705 18706 |
# File 'lib/pago/v2026_04/models.rb', line 18704 def id @id end |
#is_default ⇒ Boolean (readonly)
Whether this payment method is the customer's default payment method.
18725 18726 18727 |
# File 'lib/pago/v2026_04/models.rb', line 18725 def is_default @is_default end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
18712 18713 18714 |
# File 'lib/pago/v2026_04/models.rb', line 18712 def modified_at @modified_at end |
#processor ⇒ String (readonly)
18715 18716 18717 |
# File 'lib/pago/v2026_04/models.rb', line 18715 def processor @processor end |
#type ⇒ String (readonly)
18721 18722 18723 |
# File 'lib/pago/v2026_04/models.rb', line 18721 def type @type end |
Class Method Details
.from_json(data) ⇒ CustomerPaymentMethodGeneric?
18748 18749 18750 18751 18752 18753 18754 18755 18756 18757 18758 18759 18760 18761 18762 18763 18764 18765 |
# File 'lib/pago/v2026_04/models.rb', line 18748 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), is_default: (data.key?("is_default") ? data["is_default"] : ::Pago::UNSET) ), data ) end |