Class: GlobalSign::OrganizationInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/global_sign/organization_info.rb,
lib/global_sign/organization_info/credit_agency.rb

Defined Under Namespace

Modules: CreditAgency

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(organization_name:, credit_agency: nil, organization_code: nil, organization_address:) ⇒ OrganizationInfo

Returns a new instance of OrganizationInfo.



5
6
7
8
9
10
# File 'lib/global_sign/organization_info.rb', line 5

def initialize(organization_name:, credit_agency: nil, organization_code: nil, organization_address:)
  @organization_name    = organization_name
  @credit_agency        = credit_agency
  @organization_code    = organization_code
  @organization_address = organization_address_params(organization_address)
end

Instance Attribute Details

#credit_agencyObject

Returns the value of attribute credit_agency.



3
4
5
# File 'lib/global_sign/organization_info.rb', line 3

def credit_agency
  @credit_agency
end

#organization_addressObject

Returns the value of attribute organization_address.



3
4
5
# File 'lib/global_sign/organization_info.rb', line 3

def organization_address
  @organization_address
end

#organization_codeObject

Returns the value of attribute organization_code.



3
4
5
# File 'lib/global_sign/organization_info.rb', line 3

def organization_code
  @organization_code
end

#organization_nameObject

Returns the value of attribute organization_name.



3
4
5
# File 'lib/global_sign/organization_info.rb', line 3

def organization_name
  @organization_name
end

Instance Method Details

#organization_address_params(organization_address) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
24
# File 'lib/global_sign/organization_info.rb', line 12

def organization_address_params(organization_address)
  {
    AddressLine1: organization_address.address_line1,
    AddressLine2: organization_address.address_line2,
    AddressLine3: organization_address.address_line3,
    City:         organization_address.city,
    Region:       organization_address.region,
    PostalCode:   organization_address.postal_code,
    Country:      organization_address.country,
    Phone:        organization_address.phone,
    Fax:          organization_address.fax
  }
end