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.
-
#stored_details_card ⇒ Object
readonly
Returns the value of attribute stored_details_card.
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.
57199 57200 57201 57202 57203 57204 57205 57206 57207 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57199 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)) @stored_details_card = (x = opts.delete(:stored_details_card); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::PaymentMethodStoredDetailsCard) ? x : ::Io::Flow::V0::Models::PaymentMethodStoredDetailsCard.from_json(x))) end |
Instance Attribute Details
#card_data ⇒ Object (readonly)
Returns the value of attribute card_data.
57197 57198 57199 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57197 def card_data @card_data end |
#cvv ⇒ Object (readonly)
Returns the value of attribute cvv.
57197 57198 57199 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57197 def cvv @cvv end |
#device_fingerprint_details ⇒ Object (readonly)
Returns the value of attribute device_fingerprint_details.
57197 57198 57199 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57197 def device_fingerprint_details @device_fingerprint_details end |
#stored_details_card ⇒ Object (readonly)
Returns the value of attribute stored_details_card.
57197 57198 57199 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57197 def stored_details_card @stored_details_card end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
57213 57214 57215 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57213 def copy(incoming={}) PaymentMethodDataAuthorizeCard.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
57217 57218 57219 57220 57221 57222 57223 57224 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57217 def subtype_to_hash { :card_data => card_data.to_hash, :device_fingerprint_details => device_fingerprint_details.to_hash, :cvv => cvv, :stored_details_card => stored_details_card.nil? ? nil : stored_details_card.to_hash } end |
#to_json ⇒ Object
57209 57210 57211 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57209 def to_json JSON.dump(to_hash) end |