Class: Io::Flow::V0::Models::PaymentMethodSummaryPaypal
- Inherits:
-
PaymentMethodSummary
- Object
- PaymentMethodSummary
- Io::Flow::V0::Models::PaymentMethodSummaryPaypal
- 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 = {}) ⇒ PaymentMethodSummaryPaypal
constructor
A new instance of PaymentMethodSummaryPaypal.
- #subtype_to_hash ⇒ Object
- #to_json ⇒ Object
Methods inherited from PaymentMethodSummary
Constructor Details
#initialize(incoming = {}) ⇒ PaymentMethodSummaryPaypal
Returns a new instance of PaymentMethodSummaryPaypal.
58129 58130 58131 58132 58133 58134 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58129 def initialize(incoming={}) super(:type => PaymentMethodSummary::Types::PAYMENT_METHOD_SUMMARY_PAYPAL) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:merchant_of_record], 'PaymentMethodSummaryPaypal') @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.
58127 58128 58129 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58127 def merchant_of_record @merchant_of_record end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
58140 58141 58142 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58140 def copy(incoming={}) PaymentMethodSummaryPaypal.new(subtype_to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#subtype_to_hash ⇒ Object
58144 58145 58146 58147 58148 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58144 def subtype_to_hash { :merchant_of_record => merchant_of_record.value } end |
#to_json ⇒ Object
58136 58137 58138 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 58136 def to_json JSON.dump(to_hash) end |