Class: Io::Flow::V0::Models::PaymentMethodDataAuthorizeCard
- Inherits:
-
PaymentMethodData
- Object
- PaymentMethodData
- Io::Flow::V0::Models::PaymentMethodDataAuthorizeCard
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#card_data ⇒ Object
readonly
Returns the value of attribute card_data.
-
#cvv ⇒ Object
readonly
Returns the value of attribute cvv.
-
#device_fingerprint_details ⇒ Object
readonly
Returns the value of attribute device_fingerprint_details.
Attributes inherited from PaymentMethodData
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentMethodDataAuthorizeCard
constructor
A new instance of PaymentMethodDataAuthorizeCard.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from PaymentMethodData
Constructor Details
#initialize(incoming = {}) ⇒ PaymentMethodDataAuthorizeCard
Returns a new instance of PaymentMethodDataAuthorizeCard.
50772 50773 50774 50775 50776 50777 50778 50779 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50772 def initialize(incoming={}) super(:type => PaymentMethodData::Types::PAYMENT_METHOD_DATA_AUTHORIZE_CARD) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:card_data, :device_fingerprint_details], 'PaymentMethodDataAuthorizeCard') @card_data = (x = opts.delete(:card_data); x.is_a?(::Io::Flow::V0::Models::PaymentMethodCard) ? x : ::Io::Flow::V0::Models::PaymentMethodCard.from_json(x)) @device_fingerprint_details = (x = opts.delete(:device_fingerprint_details); x.is_a?(::Io::Flow::V0::Models::DeviceFingerprintDetails) ? x : ::Io::Flow::V0::Models::DeviceFingerprintDetails.from_json(x)) @cvv = (x = opts.delete(:cvv); x.nil? ? nil : HttpClient::Preconditions.assert_class('cvv', x, String)) end |
Instance Attribute Details
#card_data ⇒ Object (readonly)
Returns the value of attribute card_data.
50770 50771 50772 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50770 def card_data @card_data end |
#cvv ⇒ Object (readonly)
Returns the value of attribute cvv.
50770 50771 50772 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50770 def cvv @cvv end |
#device_fingerprint_details ⇒ Object (readonly)
Returns the value of attribute device_fingerprint_details.
50770 50771 50772 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50770 def device_fingerprint_details @device_fingerprint_details end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
50785 50786 50787 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50785 def copy(incoming={}) PaymentMethodDataAuthorizeCard.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
50789 50790 50791 50792 50793 50794 50795 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50789 def subtype_to_hash { :card_data => card_data.to_hash, :device_fingerprint_details => device_fingerprint_details.to_hash, :cvv => cvv } end |
#to_json ⇒ Object
50781 50782 50783 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50781 def to_json JSON.dump(to_hash) end |