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.



52849
52850
52851
52852
52853
52854
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52849

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.



52847
52848
52849
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52847

def token
  @token
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



52860
52861
52862
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52860

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

#subtype_to_hashObject



52864
52865
52866
52867
52868
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52864

def subtype_to_hash
  {
    :token => token
  }
end

#to_jsonObject



52856
52857
52858
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 52856

def to_json
  JSON.dump(to_hash)
end