Class: Io::Flow::V0::Models::PaymentMethodStoredDetailsCardInitial

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

Overview

Indicates that this transaction is the first in a sequence.

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 = {}) ⇒ PaymentMethodStoredDetailsCardInitial

Returns a new instance of PaymentMethodStoredDetailsCardInitial.



57871
57872
57873
57874
57875
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57871

def initialize(incoming={})
  super(:type => PaymentMethodStoredDetailsCard::Types::PAYMENT_METHOD_STORED_DETAILS_CARD_INITIAL)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  @reference = (x = opts.delete(:reference); x.nil? ? nil : HttpClient::Preconditions.assert_class('reference', x, String))
end

Instance Attribute Details

#referenceObject (readonly)

Returns the value of attribute reference.



57869
57870
57871
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57869

def reference
  @reference
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



57881
57882
57883
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57881

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

#subtype_to_hashObject



57885
57886
57887
57888
57889
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57885

def subtype_to_hash
  {
    :reference => reference
  }
end

#to_jsonObject



57877
57878
57879
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57877

def to_json
  JSON.dump(to_hash)
end