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.



47652
47653
47654
47655
47656
47657
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47652

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.



47650
47651
47652
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47650

def company_name
  @company_name
end

#numberObject (readonly)

Returns the value of attribute number.



47650
47651
47652
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47650

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



47663
47664
47665
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47663

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

#to_hashObject



47667
47668
47669
47670
47671
47672
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47667

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

#to_jsonObject



47659
47660
47661
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 47659

def to_json
  JSON.dump(to_hash)
end