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.



57118
57119
57120
57121
57122
57123
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57118

def initialize(incoming={})
  super(:type => PaymentMethodData::Types::PAYMENT_METHOD_DATA_AUTHORIZE_APPLEPAY)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:result], 'PaymentMethodDataAuthorizeApplepay')
  @result = (x = opts.delete(:result); x.is_a?(::Io::Flow::V0::Models::PaymentMethodDataAuthorizeApplepayResult) ? x : ::Io::Flow::V0::Models::PaymentMethodDataAuthorizeApplepayResult.from_json(x))
end

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result.



57116
57117
57118
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57116

def result
  @result
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



57129
57130
57131
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57129

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

#subtype_to_hashObject



57133
57134
57135
57136
57137
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57133

def subtype_to_hash
  {
    :result => result.to_hash
  }
end

#to_jsonObject



57125
57126
57127
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57125

def to_json
  JSON.dump(to_hash)
end