Class: Io::Flow::V0::Models::TaxRegistrationForm

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 = {}) ⇒ TaxRegistrationForm

Returns a new instance of TaxRegistrationForm.



53632
53633
53634
53635
53636
53637
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53632

def initialize(incoming={})
  opts = HttpClient::Helper.symbolize_keys(incoming)
  HttpClient::Preconditions.require_keys(opts, [:number], 'TaxRegistrationForm')
  @number = HttpClient::Preconditions.assert_class('number', opts.delete(:number), String)
  @company_name = (x = opts.delete(:company_name); x.nil? ? nil : HttpClient::Preconditions.assert_class('company_name', x, String))
end

Instance Attribute Details

#company_nameObject (readonly)

Returns the value of attribute company_name.



53630
53631
53632
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53630

def company_name
  @company_name
end

#numberObject (readonly)

Returns the value of attribute number.



53630
53631
53632
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53630

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



53643
53644
53645
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53643

def copy(incoming={})
  TaxRegistrationForm.new(to_hash.merge(HttpClient::Helper.symbolize_keys(incoming)))
end

#to_hashObject



53647
53648
53649
53650
53651
53652
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53647

def to_hash
  {
    :number => number,
    :company_name => company_name
  }
end

#to_jsonObject



53639
53640
53641
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 53639

def to_json
  JSON.dump(to_hash)
end