Class: Io::Flow::V0::Models::IndirectTax

Inherits:
Object
  • Object
show all
Defined in:
lib/flow_commerce/flow_api_v0_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject (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

#numberObject (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_hashObject



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_jsonObject



45819
45820
45821
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 45819

def to_json
  JSON.dump(to_hash)
end