Class: Io::Flow::V0::Models::PaymentMethodDataValidateApplepay

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

Returns a new instance of PaymentMethodDataValidateApplepay.



57687
57688
57689
57690
57691
57692
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57687

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

Instance Attribute Details

#validation_urlObject (readonly)

Returns the value of attribute validation_url.



57685
57686
57687
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57685

def validation_url
  @validation_url
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



57698
57699
57700
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57698

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

#subtype_to_hashObject



57702
57703
57704
57705
57706
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57702

def subtype_to_hash
  {
    :validation_url => validation_url
  }
end

#to_jsonObject



57694
57695
57696
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57694

def to_json
  JSON.dump(to_hash)
end