Class: Io::Flow::V0::Models::ExperiencePaymentMethodRuleForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperiencePaymentMethodRuleForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#payment_method_id ⇒ Object
readonly
Returns the value of attribute payment_method_id.
-
#tags ⇒ Object
readonly
Returns the value of attribute tags.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExperiencePaymentMethodRuleForm
constructor
A new instance of ExperiencePaymentMethodRuleForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExperiencePaymentMethodRuleForm
Returns a new instance of ExperiencePaymentMethodRuleForm.
15567 15568 15569 15570 15571 15572 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15567 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:payment_method_id, :tags], 'ExperiencePaymentMethodRuleForm') @payment_method_id = HttpClient::Preconditions.assert_class('payment_method_id', opts.delete(:payment_method_id), String) = HttpClient::Preconditions.assert_class('tags', opts.delete(:tags), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::ExperiencePaymentMethodTag) ? x : ::Io::Flow::V0::Models::ExperiencePaymentMethodTag.apply(x)) } end |
Instance Attribute Details
#payment_method_id ⇒ Object (readonly)
Returns the value of attribute payment_method_id.
15565 15566 15567 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15565 def payment_method_id @payment_method_id end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
15565 15566 15567 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15565 def end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
15578 15579 15580 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15578 def copy(incoming={}) ExperiencePaymentMethodRuleForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
15582 15583 15584 15585 15586 15587 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15582 def to_hash { :payment_method_id => payment_method_id, :tags => .map { |o| o.value } } end |
#to_json ⇒ Object
15574 15575 15576 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 15574 def to_json JSON.dump(to_hash) end |