Class: Io::Flow::V0::Models::PaymentMethodSummaryIdeal

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

Returns a new instance of PaymentMethodSummaryIdeal.



53684
53685
53686
53687
53688
53689
53690
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53684

def initialize(incoming={})
  super(:type => PaymentMethodSummary::Types::PAYMENT_METHOD_SUMMARY_IDEAL)
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:merchant_of_record], 'PaymentMethodSummaryIdeal')
  @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))
  @issuer = (x = opts.delete(:issuer); x.nil? ? nil : HttpClient::Preconditions.assert_class('issuer', x, String))
end

Instance Attribute Details

#issuerObject (readonly)

Returns the value of attribute issuer.



53682
53683
53684
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53682

def issuer
  @issuer
end

#merchant_of_recordObject (readonly)

Returns the value of attribute merchant_of_record.



53682
53683
53684
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53682

def merchant_of_record
  @merchant_of_record
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53696
53697
53698
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53696

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

#subtype_to_hashObject



53700
53701
53702
53703
53704
53705
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53700

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

#to_jsonObject



53692
53693
53694
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53692

def to_json
  JSON.dump(to_hash)
end