Class: Pago::V2026_04::Models::PaymentMethodCardMetadata
- Inherits:
-
Model
- Object
- Model
- Pago::V2026_04::Models::PaymentMethodCardMetadata
show all
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary
collapse
- JSON_KEYS =
{
brand: "brand",
last4: "last4",
exp_month: "exp_month",
exp_year: "exp_year",
wallet: "wallet"
}.freeze
- REQUIRED_KEYS =
["brand", "last4", "exp_month", "exp_year"].freeze
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(brand:, last4:, exp_month:, exp_year:, wallet: ::Pago::UNSET) ⇒ PaymentMethodCardMetadata
Returns a new instance of PaymentMethodCardMetadata.
35623
35624
35625
35626
35627
35628
35629
35630
35631
35632
35633
35634
35635
35636
|
# File 'lib/pago/v2026_04/models.rb', line 35623
def initialize(
brand:,
last4:,
exp_month:,
exp_year:,
wallet: ::Pago::UNSET
)
super()
assign(:brand, brand)
assign(:last4, last4)
assign(:exp_month, exp_month)
assign(:exp_year, exp_year)
assign(:wallet, wallet)
end
|
Instance Attribute Details
#brand ⇒ String
35609
35610
35611
|
# File 'lib/pago/v2026_04/models.rb', line 35609
def brand
@brand
end
|
#exp_month ⇒ Integer
35615
35616
35617
|
# File 'lib/pago/v2026_04/models.rb', line 35615
def exp_month
@exp_month
end
|
#exp_year ⇒ Integer
35618
35619
35620
|
# File 'lib/pago/v2026_04/models.rb', line 35618
def exp_year
@exp_year
end
|
#last4 ⇒ String
35612
35613
35614
|
# File 'lib/pago/v2026_04/models.rb', line 35612
def last4
@last4
end
|
#wallet ⇒ String?
35621
35622
35623
|
# File 'lib/pago/v2026_04/models.rb', line 35621
def wallet
@wallet
end
|
Class Method Details
35640
35641
35642
35643
35644
35645
35646
35647
35648
35649
35650
35651
35652
35653
35654
35655
|
# File 'lib/pago/v2026_04/models.rb', line 35640
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(
brand: (data.key?("brand") ? data["brand"] : ::Pago::UNSET),
last4: (data.key?("last4") ? data["last4"] : ::Pago::UNSET),
exp_month: (data.key?("exp_month") ? data["exp_month"] : ::Pago::UNSET),
exp_year: (data.key?("exp_year") ? data["exp_year"] : ::Pago::UNSET),
wallet: (data.key?("wallet") ? data["wallet"] : ::Pago::UNSET)
),
data
)
end
|