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.



50427
50428
50429
50430
50431
50432
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50427

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.



50425
50426
50427
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50425

def company_name
  @company_name
end

#numberObject (readonly)

Returns the value of attribute number.



50425
50426
50427
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50425

def number
  @number
end

Instance Method Details

#copy(incoming = {}) ⇒ Object



50438
50439
50440
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50438

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

#to_hashObject



50442
50443
50444
50445
50446
50447
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50442

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

#to_jsonObject



50434
50435
50436
# File 'lib/flow_commerce/flow_api_v0_client.rb', line 50434

def to_json
  JSON.dump(to_hash)
end