Class: InfaktApiClient::User::CompanyData

Inherits:
Object
  • Object
show all
Defined in:
lib/infakt_api_client/user.rb

Overview

Represents company-specific information for a user in the Infakt API system. Contains detailed business information such as company name, address details, tax identification numbers, and contact information.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ CompanyData

Returns a new instance of CompanyData.



38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# File 'lib/infakt_api_client/user.rb', line 38

def initialize(data)
  @first_name = data["first_name"]
  @last_name = data["last_name"]
  @company_name = data["company_name"]
  @owner_name = data["owner_name"]
  @owner_surname = data["owner_surname"]
  @street = data["street"]
  @street_name = data["street_name"]
  @street_number = data["street_number"]
  @flat_number = data["flat_number"]
  @city = data["city"]
  @postal_code = data["postal_code"]
  @tax_id = data["tax_id"]
  @pesel = data["pesel"]
  @regon = data["regon"]
  @phone_number = data["phone_number"]
  @mailing_company_name = data["mailing_company_name"]
  @mailing_street = data["mailing_street"]
  @mailing_city = data["mailing_city"]
  @mailing_postal_code = data["mailing_postal_code"]
  @business_activity_code = data["business_activity_code"]
end

Instance Attribute Details

#business_activity_codeObject (readonly)

Returns the value of attribute business_activity_code.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def business_activity_code
  @business_activity_code
end

#cityObject (readonly)

Returns the value of attribute city.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def city
  @city
end

#company_nameObject (readonly)

Returns the value of attribute company_name.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def company_name
  @company_name
end

#first_nameObject (readonly)

Returns the value of attribute first_name.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def first_name
  @first_name
end

#flat_numberObject (readonly)

Returns the value of attribute flat_number.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def flat_number
  @flat_number
end

#last_nameObject (readonly)

Returns the value of attribute last_name.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def last_name
  @last_name
end

#mailing_cityObject (readonly)

Returns the value of attribute mailing_city.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def mailing_city
  @mailing_city
end

#mailing_company_nameObject (readonly)

Returns the value of attribute mailing_company_name.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def mailing_company_name
  @mailing_company_name
end

#mailing_postal_codeObject (readonly)

Returns the value of attribute mailing_postal_code.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def mailing_postal_code
  @mailing_postal_code
end

#mailing_streetObject (readonly)

Returns the value of attribute mailing_street.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def mailing_street
  @mailing_street
end

#owner_nameObject (readonly)

Returns the value of attribute owner_name.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def owner_name
  @owner_name
end

#owner_surnameObject (readonly)

Returns the value of attribute owner_surname.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def owner_surname
  @owner_surname
end

#peselObject (readonly)

Returns the value of attribute pesel.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def pesel
  @pesel
end

#phone_numberObject (readonly)

Returns the value of attribute phone_number.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def phone_number
  @phone_number
end

#postal_codeObject (readonly)

Returns the value of attribute postal_code.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def postal_code
  @postal_code
end

#regonObject (readonly)

Returns the value of attribute regon.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def regon
  @regon
end

#streetObject (readonly)

Returns the value of attribute street.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def street
  @street
end

#street_nameObject (readonly)

Returns the value of attribute street_name.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def street_name
  @street_name
end

#street_numberObject (readonly)

Returns the value of attribute street_number.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def street_number
  @street_number
end

#tax_idObject (readonly)

Returns the value of attribute tax_id.



32
33
34
# File 'lib/infakt_api_client/user.rb', line 32

def tax_id
  @tax_id
end

Instance Method Details

#full_addressObject



61
62
63
# File 'lib/infakt_api_client/user.rb', line 61

def full_address
  [street, city, postal_code].compact.join(", ")
end