Class: Io::Flow::V0::Models::ExperiencePaymentMethodRule
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::ExperiencePaymentMethodRule
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#experience_key ⇒ Object
readonly
Returns the value of attribute experience_key.
-
#payment_method_rules ⇒ Object
readonly
Returns the value of attribute payment_method_rules.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ ExperiencePaymentMethodRule
constructor
A new instance of ExperiencePaymentMethodRule.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ ExperiencePaymentMethodRule
Returns a new instance of ExperiencePaymentMethodRule.
30506 30507 30508 30509 30510 30511 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30506 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:experience_key, :payment_method_rules], 'ExperiencePaymentMethodRule') @experience_key = HttpClient::Preconditions.assert_class('experience_key', opts.delete(:experience_key), String) @payment_method_rules = HttpClient::Preconditions.assert_class('payment_method_rules', opts.delete(:payment_method_rules), Array).map { |v| (x = v; x.is_a?(::Io::Flow::V0::Models::PaymentMethodRule) ? x : ::Io::Flow::V0::Models::PaymentMethodRule.new(x)) } end |
Instance Attribute Details
#experience_key ⇒ Object (readonly)
Returns the value of attribute experience_key.
30504 30505 30506 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30504 def experience_key @experience_key end |
#payment_method_rules ⇒ Object (readonly)
Returns the value of attribute payment_method_rules.
30504 30505 30506 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30504 def payment_method_rules @payment_method_rules end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
30517 30518 30519 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30517 def copy(incoming={}) ExperiencePaymentMethodRule.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
30521 30522 30523 30524 30525 30526 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30521 def to_hash { :experience_key => experience_key, :payment_method_rules => payment_method_rules.map { |o| o.to_hash } } end |
#to_json ⇒ Object
30513 30514 30515 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 30513 def to_json JSON.dump(to_hash) end |