Class: ShellCardManagementApIs::ColCoAccess

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/shell_card_management_ap_is/models/col_co_access.rb

Overview

ColCoAccess Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(col_co_id = SKIP, col_co_code = SKIP, col_co_country_name = SKIP, issuing_country_number = SKIP) ⇒ ColCoAccess

Returns a new instance of ColCoAccess.



59
60
61
62
63
64
65
# File 'lib/shell_card_management_ap_is/models/col_co_access.rb', line 59

def initialize(col_co_id = SKIP, col_co_code = SKIP,
               col_co_country_name = SKIP, issuing_country_number = SKIP)
  @col_co_id = col_co_id unless col_co_id == SKIP
  @col_co_code = col_co_code unless col_co_code == SKIP
  @col_co_country_name = col_co_country_name unless col_co_country_name == SKIP
  @issuing_country_number = issuing_country_number unless issuing_country_number == SKIP
end

Instance Attribute Details

#col_co_codeString

Collecting company code.

Returns:

  • (String)


18
19
20
# File 'lib/shell_card_management_ap_is/models/col_co_access.rb', line 18

def col_co_code
  @col_co_code
end

#col_co_country_nameString

Collecting company’s Country name. ex: United Kingdom

Returns:

  • (String)


22
23
24
# File 'lib/shell_card_management_ap_is/models/col_co_access.rb', line 22

def col_co_country_name
  @col_co_country_name
end

#col_co_idString

Collecting company ID.

Returns:

  • (String)


14
15
16
# File 'lib/shell_card_management_ap_is/models/col_co_access.rb', line 14

def col_co_id
  @col_co_id
end

#issuing_country_numberString

Issuing Country Number.

ex: 032 - Czech Republic

Returns:

  • (String)


27
28
29
# File 'lib/shell_card_management_ap_is/models/col_co_access.rb', line 27

def issuing_country_number
  @issuing_country_number
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# File 'lib/shell_card_management_ap_is/models/col_co_access.rb', line 68

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
  col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
  col_co_country_name =
    hash.key?('ColCoCountryName') ? hash['ColCoCountryName'] : SKIP
  issuing_country_number =
    hash.key?('IssuingCountryNumber') ? hash['IssuingCountryNumber'] : SKIP

  # Create object from extracted values.
  ColCoAccess.new(col_co_id,
                  col_co_code,
                  col_co_country_name,
                  issuing_country_number)
end

.namesObject

A mapping from model property names to API property names.



30
31
32
33
34
35
36
37
# File 'lib/shell_card_management_ap_is/models/col_co_access.rb', line 30

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['col_co_id'] = 'ColCoId'
  @_hash['col_co_code'] = 'ColCoCode'
  @_hash['col_co_country_name'] = 'ColCoCountryName'
  @_hash['issuing_country_number'] = 'IssuingCountryNumber'
  @_hash
end

.nullablesObject

An array for nullable fields



50
51
52
53
54
55
56
57
# File 'lib/shell_card_management_ap_is/models/col_co_access.rb', line 50

def self.nullables
  %w[
    col_co_id
    col_co_code
    col_co_country_name
    issuing_country_number
  ]
end

.optionalsObject

An array for optional fields



40
41
42
43
44
45
46
47
# File 'lib/shell_card_management_ap_is/models/col_co_access.rb', line 40

def self.optionals
  %w[
    col_co_id
    col_co_code
    col_co_country_name
    issuing_country_number
  ]
end