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.
52876 52877 52878 52879 52880 52881 52882 52883 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52876 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.
52874 52875 52876 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52874 def card_data @card_data end |
#cvv ⇒ Object (readonly)
Returns the value of attribute cvv.
52874 52875 52876 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52874 def cvv @cvv end |
#device_fingerprint_details ⇒ Object (readonly)
Returns the value of attribute device_fingerprint_details.
52874 52875 52876 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52874 def device_fingerprint_details @device_fingerprint_details end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
52889 52890 52891 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52889 def copy(incoming={}) PaymentMethodDataAuthorizeCard.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
52893 52894 52895 52896 52897 52898 52899 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52893 def subtype_to_hash { :card_data => card_data.to_hash, :device_fingerprint_details => device_fingerprint_details.to_hash, :cvv => cvv } end |
#to_json ⇒ Object
52885 52886 52887 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52885 def to_json JSON.dump(to_hash) end |