Class: Io::Flow::V0::Models::PaymentMethodSummaryGooglepay

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

Returns a new instance of PaymentMethodSummaryGooglepay.



53657
53658
53659
53660
53661
53662
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53657

def initialize(incoming={})
  super(:type => PaymentMethodSummary::Types::PAYMENT_METHOD_SUMMARY_GOOGLEPAY)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:merchant_of_record], 'PaymentMethodSummaryGooglepay')
  @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.



53655
53656
53657
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53655

def merchant_of_record
  @merchant_of_record
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53668
53669
53670
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53668

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

#subtype_to_hashObject



53672
53673
53674
53675
53676
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53672

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

#to_jsonObject



53664
53665
53666
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53664

def to_json
  JSON.dump(to_hash)
end