Class: Io::Flow::V0::Models::PaymentMethodStoredDetailsCardSubsequent

Inherits:
PaymentMethodStoredDetailsCard show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Overview

Indicates that this is a transaction with a previously stored card. In those cases, CVV may not be required, but additional information can help ensure that the transaction is approved.

Instance Attribute Summary collapse

Attributes inherited from PaymentMethodStoredDetailsCard

#type

Instance Method Summary collapse

Methods inherited from PaymentMethodStoredDetailsCard

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ PaymentMethodStoredDetailsCardSubsequent

Returns a new instance of PaymentMethodStoredDetailsCardSubsequent.



57900
57901
57902
57903
57904
57905
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57900

def initialize(incoming={})
  super(:type => PaymentMethodStoredDetailsCard::Types::PAYMENT_METHOD_STORED_DETAILS_CARD_SUBSEQUENT)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @reference = (x = opts.delete(:reference); x.nil? ? nil : HttpClient::Preconditions.assert_class('reference', x, String))
  @previous_transaction_details = (x = opts.delete(:previous_transaction_details); x.nil? ? nil : (x = x; x.is_a?(::Io::Flow::V0::Models::TransactionNetworkDetailsCard) ? x : ::Io::Flow::V0::Models::TransactionNetworkDetailsCard.new(x)))
end

Instance Attribute Details

#previous_transaction_detailsObject (readonly)

Returns the value of attribute previous_transaction_details.



57898
57899
57900
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57898

def previous_transaction_details
  @previous_transaction_details
end

#referenceObject (readonly)

Returns the value of attribute reference.



57898
57899
57900
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57898

def reference
  @reference
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



57911
57912
57913
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57911

def copy(incoming={})
  PaymentMethodStoredDetailsCardSubsequent.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#subtype_to_hashObject



57915
57916
57917
57918
57919
57920
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57915

def subtype_to_hash
  {
    :reference => reference,
    :previous_transaction_details => previous_transaction_details.nil? ? nil : previous_transaction_details.to_hash
  }
end

#to_jsonObject



57907
57908
57909
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57907

def to_json
  JSON.dump(to_hash)
end