Class: Io::Flow::V0::Models::PaymentMethodCardPciDetails
- Inherits:
-
PaymentMethodCard
- Object
- PaymentMethodCard
- Io::Flow::V0::Models::PaymentMethodCardPciDetails
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#card_number ⇒ Object
readonly
Returns the value of attribute card_number.
-
#expiration_month ⇒ Object
readonly
Returns the value of attribute expiration_month.
-
#expiration_year ⇒ Object
readonly
Returns the value of attribute expiration_year.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from PaymentMethodCard
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentMethodCardPciDetails
constructor
A new instance of PaymentMethodCardPciDetails.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from PaymentMethodCard
Constructor Details
#initialize(incoming = {}) ⇒ PaymentMethodCardPciDetails
Returns a new instance of PaymentMethodCardPciDetails.
57058 57059 57060 57061 57062 57063 57064 57065 57066 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57058 def initialize(incoming={}) super(:type => PaymentMethodCard::Types::PAYMENT_METHOD_CARD_PCI_DETAILS) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:card_number, :expiration_month, :expiration_year, :name], 'PaymentMethodCardPciDetails') @card_number = (x = opts.delete(:card_number); x.is_a?(::Io::Flow::V0::Models::CardNumber) ? x : ::Io::Flow::V0::Models::CardNumber.from_json(x)) @expiration_month = HttpClient::Preconditions.assert_class('expiration_month', opts.delete(:expiration_month), Integer) @expiration_year = HttpClient::Preconditions.assert_class('expiration_year', opts.delete(:expiration_year), Integer) @name = HttpClient::Preconditions.assert_class('name', opts.delete(:name), String) end |
Instance Attribute Details
#card_number ⇒ Object (readonly)
Returns the value of attribute card_number.
57056 57057 57058 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57056 def card_number @card_number end |
#expiration_month ⇒ Object (readonly)
Returns the value of attribute expiration_month.
57056 57057 57058 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57056 def expiration_month @expiration_month end |
#expiration_year ⇒ Object (readonly)
Returns the value of attribute expiration_year.
57056 57057 57058 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57056 def expiration_year @expiration_year end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
57056 57057 57058 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57056 def name @name end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
57072 57073 57074 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57072 def copy(incoming={}) PaymentMethodCardPciDetails.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
57076 57077 57078 57079 57080 57081 57082 57083 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57076 def subtype_to_hash { :card_number => card_number.to_hash, :expiration_month => expiration_month, :expiration_year => expiration_year, :name => name } end |
#to_json ⇒ Object
57068 57069 57070 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57068 def to_json JSON.dump(to_hash) end |