Class: Io::Flow::V0::Models::PaymentMethodSummaryKlarna
- Inherits:
-
PaymentMethodSummary
- Object
- PaymentMethodSummary
- Io::Flow::V0::Models::PaymentMethodSummaryKlarna
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#merchant_of_record ⇒ Object
readonly
Returns the value of attribute merchant_of_record.
Attributes inherited from PaymentMethodSummary
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ PaymentMethodSummaryKlarna
constructor
A new instance of PaymentMethodSummaryKlarna.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from PaymentMethodSummary
Constructor Details
#initialize(incoming = {}) ⇒ PaymentMethodSummaryKlarna
Returns a new instance of PaymentMethodSummaryKlarna.
58102 58103 58104 58105 58106 58107 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58102 def initialize(incoming={}) super(:type => PaymentMethodSummary::Types::PAYMENT_METHOD_SUMMARY_KLARNA) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:merchant_of_record], 'PaymentMethodSummaryKlarna') @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_record ⇒ Object (readonly)
Returns the value of attribute merchant_of_record.
58100 58101 58102 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58100 def merchant_of_record @merchant_of_record end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
58113 58114 58115 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58113 def copy(incoming={}) PaymentMethodSummaryKlarna.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
58117 58118 58119 58120 58121 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58117 def subtype_to_hash { :merchant_of_record => merchant_of_record.value } end |
#to_json ⇒ Object
58109 58110 58111 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58109 def to_json JSON.dump(to_hash) end |