class Io::Flow::V0::Models::PaymentMethodDataAuthorizeCard

Attributes

card_data[R]
cvv[R]
device_fingerprint_details[R]
stored_details_card[R]

Public Class Methods

new(incoming={}) click to toggle source
# 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

Public Instance Methods

copy(incoming={}) click to toggle source
# 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() click to toggle source
# 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() click to toggle source
# File lib/flow_commerce/flow_api_v0_client.rb, line 57209
def to_json
  JSON.dump(to_hash)
end