Class: Io::Flow::V0::Models::PaymentMethodSummaryApplepay

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

Instance Attribute Summary collapse

Attributes inherited from PaymentMethodSummary

#type

Instance Method Summary collapse

Methods inherited from PaymentMethodSummary

from_json, #to_hash

Constructor Details

#initialize(incoming = {}) ⇒ PaymentMethodSummaryApplepay

Returns a new instance of PaymentMethodSummaryApplepay.



57955
57956
57957
57958
57959
57960
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57955

def initialize(incoming={})
  super(:type => PaymentMethodSummary::Types::PAYMENT_METHOD_SUMMARY_APPLEPAY)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:merchant_of_record], 'PaymentMethodSummaryApplepay')
  @merchant_of_record = (x = opts.delete(:merchant_of_record); x.is_a?(::Io::Flow::V0::Models::MerchantOfRecord) ? x : ::Io::Flow::V0::Models::MerchantOfRecord.apply(x))
end

Instance Attribute Details

#merchant_of_recordObject (readonly)

Returns the value of attribute merchant_of_record.



57953
57954
57955
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57953

def merchant_of_record
  @merchant_of_record
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



57966
57967
57968
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57966

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

#subtype_to_hashObject



57970
57971
57972
57973
57974
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57970

def subtype_to_hash
  {
    :merchant_of_record => merchant_of_record.value
  }
end

#to_jsonObject



57962
57963
57964
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 57962

def to_json
  JSON.dump(to_hash)
end