Class: Io::Flow::V0::Models::PaymentMethodDataAuthorizeGooglepay

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

Returns a new instance of PaymentMethodDataAuthorizeGooglepay.



57232
57233
57234
57235
57236
57237
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57232

def initialize(incoming={})
  super(:type => PaymentMethodData::Types::PAYMENT_METHOD_DATA_AUTHORIZE_GOOGLEPAY)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:payment_data], 'PaymentMethodDataAuthorizeGooglepay')
  @payment_data = HttpClient::Preconditions.assert_class('payment_data', HttpClient::Helper.to_object(opts.delete(:payment_data)), Hash)
end

Instance Attribute Details

#payment_dataObject (readonly)

Returns the value of attribute payment_data.



57230
57231
57232
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57230

def payment_data
  @payment_data
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



57243
57244
57245
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57243

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

#subtype_to_hashObject



57247
57248
57249
57250
57251
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57247

def subtype_to_hash
  {
    :payment_data => payment_data
  }
end

#to_jsonObject



57239
57240
57241
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57239

def to_json
  JSON.dump(to_hash)
end