Class: Io::Flow::V0::Models::TierDefaultForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::TierDefaultForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Form to set the defualt tier for a given experience
Instance Attribute Summary collapse
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#default_tier ⇒ Object
readonly
Returns the value of attribute default_tier.
-
#experience ⇒ Object
readonly
Returns the value of attribute experience.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ TierDefaultForm
constructor
A new instance of TierDefaultForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ TierDefaultForm
Returns a new instance of TierDefaultForm.
25678 25679 25680 25681 25682 25683 25684 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25678 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:default_tier, :currency, :experience], 'TierDefaultForm') @default_tier = HttpClient::Preconditions.assert_class('default_tier', opts.delete(:default_tier), String) @currency = HttpClient::Preconditions.assert_class('currency', opts.delete(:currency), String) @experience = HttpClient::Preconditions.assert_class('experience', opts.delete(:experience), String) end |
Instance Attribute Details
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
25676 25677 25678 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25676 def currency @currency end |
#default_tier ⇒ Object (readonly)
Returns the value of attribute default_tier.
25676 25677 25678 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25676 def default_tier @default_tier end |
#experience ⇒ Object (readonly)
Returns the value of attribute experience.
25676 25677 25678 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25676 def experience @experience end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
25690 25691 25692 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25690 def copy(incoming={}) TierDefaultForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
25694 25695 25696 25697 25698 25699 25700 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25694 def to_hash { :default_tier => default_tier, :currency => currency, :experience => experience } end |
#to_json ⇒ Object
25686 25687 25688 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 25686 def to_json JSON.dump(to_hash) end |