Class: Io::Flow::V0::Models::PaymentMethodSummary
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::PaymentMethodSummary
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Direct Known Subclasses
PaymentMethodSummaryAfterpay, PaymentMethodSummaryApplepay, PaymentMethodSummaryCard, PaymentMethodSummaryGooglepay, PaymentMethodSummaryIdeal, PaymentMethodSummaryKlarna, PaymentMethodSummaryPaypal, PaymentMethodSummaryUndefinedType
Defined Under Namespace
Modules: Types
Instance Attribute Summary collapse
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(incoming = {}) ⇒ PaymentMethodSummary
constructor
A new instance of PaymentMethodSummary.
- #subtype_to_hash ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ PaymentMethodSummary
Returns a new instance of PaymentMethodSummary.
12530 12531 12532 12533 12534 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12530 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:type], 'PaymentMethodSummary') @type = HttpClient::Preconditions.assert_class('type', opts.delete(:type), String) end |
Instance Attribute Details
#type ⇒ Object (readonly)
Returns the value of attribute type.
12528 12529 12530 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12528 def type @type end |
Class Method Details
.from_json(hash) ⇒ Object
Instance Method Details
#subtype_to_hash ⇒ Object
12536 12537 12538 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12536 def subtype_to_hash raise 'Cannot serialize an instance of payment_method_summary directly - must use one of the specific types: payment_method_summary_card, payment_method_summary_klarna, payment_method_summary_afterpay, payment_method_summary_applepay, payment_method_summary_googlepay, payment_method_summary_paypal, payment_method_summary_ideal' end |
#to_hash ⇒ Object
12540 12541 12542 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 12540 def to_hash subtype_to_hash.merge(:type => @type) end |