Class: Io::Flow::V0::Models::IndirectTax
- Inherits:
-
Object
- Object
- Io::Flow::V0::Models::IndirectTax
- Defined in:
- lib/flow_commerce/flow_api_v0_client.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
Instance Method Summary collapse
- #copy(incoming = {}) ⇒ Object
-
#initialize(incoming = {}) ⇒ IndirectTax
constructor
A new instance of IndirectTax.
- #to_hash ⇒ Object
- #to_json ⇒ Object
Constructor Details
#initialize(incoming = {}) ⇒ IndirectTax
Returns a new instance of IndirectTax.
45813 45814 45815 45816 45817 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45813 def initialize(incoming={}) opts = HttpClient::Helper.symbolize_keys(incoming) @number = (x = opts.delete(:number); x.nil? ? nil : HttpClient::Preconditions.assert_class('number', x, String)) @id = (x = opts.delete(:id); x.nil? ? nil : HttpClient::Preconditions.assert_class('id', x, String)) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
45811 45812 45813 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45811 def id @id end |
#number ⇒ Object (readonly)
Returns the value of attribute number.
45811 45812 45813 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45811 def number @number end |
Instance Method Details
#copy(incoming = {}) ⇒ Object
45823 45824 45825 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45823 def copy(incoming={}) IndirectTax.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming))) end |
#to_hash ⇒ Object
45827 45828 45829 45830 45831 45832 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45827 def to_hash { :number => number, :id => id } end |
#to_json ⇒ Object
45819 45820 45821 |
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45819 def to_json JSON.dump(to_hash) end |