Class: Io::Flow::V0::Models::PaymentMethodDataAuthorizeApplepay

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

Instance Attribute Summary collapse

Attributes inherited from PaymentMethodData

#type

Instance Method Summary collapse

Methods inherited from PaymentMethodData

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ PaymentMethodDataAuthorizeApplepay

Returns a new instance of PaymentMethodDataAuthorizeApplepay.



50745
50746
50747
50748
50749
50750
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50745

def initialize(incoming={})
  super(:type => PaymentMethodData::Types::PAYMENT_METHOD_DATA_AUTHORIZE_APPLEPAY)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:token], 'PaymentMethodDataAuthorizeApplepay')
  @token = HttpClient::Preconditions.assert_class('token', opts.delete(:token), String)
end

Instance Attribute Details

#tokenObject (readonly)

Returns the value of attribute token.



50743
50744
50745
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50743

def token
  @token
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



50756
50757
50758
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50756

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

#subtype_to_hashObject



50760
50761
50762
50763
50764
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50760

def subtype_to_hash
  {
    :token => token
  }
end

#to_jsonObject



50752
50753
50754
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50752

def to_json
  JSON.dump(to_hash)
end