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.



41135
41136
41137
41138
41139
41140
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41135

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.



41133
41134
41135
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41133

def company_name
  @company_name
end

#numberObject (readonly)

Returns the value of attribute number.



41133
41134
41135
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41133

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



41146
41147
41148
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41146

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

#to_hashObject



41150
41151
41152
41153
41154
41155
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41150

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

#to_jsonObject



41142
41143
41144
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 41142

def to_json
  JSON.dump(to_hash)
end