class Hithorizons::Country

Attributes

iso3[R]
name[R]

Public Class Methods

new(iso3, name, registration_number: false, tax_id: false, vat_id: false) click to toggle source
# File lib/hithorizons/country.rb, line 7
def initialize(iso3, name, registration_number: false, tax_id: false, vat_id: false)
  @iso3 = iso3
  @name = name
  @registration_number = registration_number
  @tax_id = tax_id
  @vat_id = vat_id
end

Public Instance Methods

registration_number(company) click to toggle source
# File lib/hithorizons/country.rb, line 39
def registration_number(company)
  return unless registration_number?

  company['NationalId']
end
registration_number?() click to toggle source
# File lib/hithorizons/country.rb, line 23
def registration_number?
  @registration_number
end
tax_id(company) click to toggle source
# File lib/hithorizons/country.rb, line 33
def tax_id(company)
  return unless tax_id?

  company['NationalId']
end
tax_id?() click to toggle source
# File lib/hithorizons/country.rb, line 19
def tax_id?
  @tax_id
end
vat_id(company) click to toggle source
# File lib/hithorizons/country.rb, line 27
def vat_id(company)
  return unless vat_id?

  company['NationalId']
end
vat_id?() click to toggle source
# File lib/hithorizons/country.rb, line 15
def vat_id?
  @vat_id
end