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.



51250
51251
51252
51253
51254
51255
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51250

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.



51248
51249
51250
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51248

def merchant_of_record
  @merchant_of_record
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



51261
51262
51263
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51261

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

#subtype_to_hashObject



51265
51266
51267
51268
51269
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51265

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

#to_jsonObject



51257
51258
51259
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 51257

def to_json
  JSON.dump(to_hash)
end