Class: Io::Flow::V0::Models::RateForm
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::RateForm
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Overview
Represents the parts of an organization rate that can be updated.
Instance Attribute Summary collapse
-
#base ⇒ Object
readonly
Returns the value of attribute base.
-
#effective_at ⇒ Object
readonly
Returns the value of attribute effective_at.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ RateForm
constructor
A new instance of RateForm.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ RateForm
Returns a new instance of RateForm.
28446 28447 28448 28449 28450 28451 28452 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28446 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) HttpClient::Preconditions.require_keys(opts, [:base, :target, :effective_at], 'RateForm') @base = HttpClient::Preconditions.assert_class('base', opts.delete(:base), String) @target = HttpClient::Preconditions.assert_class('target', opts.delete(:target), String) @effective_at = HttpClient::Preconditions.assert_class('effective_at', HttpClient::Helper.to_date_time_iso8601(opts.delete(:effective_at)), DateTime) end |
Instance Attribute Details
#base ⇒ Object (readonly)
Returns the value of attribute base.
28444 28445 28446 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28444 def base @base end |
#effective_at ⇒ Object (readonly)
Returns the value of attribute effective_at.
28444 28445 28446 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28444 def effective_at @effective_at end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
28444 28445 28446 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28444 def target @target end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
28458 28459 28460 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28458 def copy(incoming={}) RateForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
28462 28463 28464 28465 28466 28467 28468 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28462 def to_hash { :base => base, :target => target, :effective_at => effective_at } end |
#to_json ⇒ Object
28454 28455 28456 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 28454 def to_json JSON.dump(to_hash) end |