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.
-
#q ⇒ Object
readonly
Returns the value of attribute q.
-
#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.
38936 38937 38938 38939 38940 38941 38942 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38936 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) @tags = 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)) } @q = (x = opts.delete(:q); x.nil? ? nil : HttpClient::Preconditions.assert_class('q', x, String)) end |
Instance Attribute Details
#payment_method_id ⇒ Object (readonly)
Returns the value of attribute payment_method_id.
38934 38935 38936 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38934 def payment_method_id @payment_method_id end |
#q ⇒ Object (readonly)
Returns the value of attribute q.
38934 38935 38936 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38934 def q @q end |
#tags ⇒ Object (readonly)
Returns the value of attribute tags.
38934 38935 38936 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38934 def @tags end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
38948 38949 38950 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38948 def copy(incoming={}) ExperiencePaymentMethodRuleForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
38952 38953 38954 38955 38956 38957 38958 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38952 def to_hash { :payment_method_id => payment_method_id, :tags => .map { |o| o.value }, :q => q } end |
#to_json ⇒ Object
38944 38945 38946 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 38944 def to_json JSON.dump(to_hash) end |