Class: ShellCardManagementApIs::ColCoAccess
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::ColCoAccess
- Defined in:
- lib/shell_card_management_ap_is/models/col_co_access.rb
Overview
ColCoAccess Model.
Instance Attribute Summary collapse
-
#col_co_code ⇒ String
Collecting company code.
-
#col_co_country_name ⇒ String
Collecting company’s Country name.
-
#col_co_id ⇒ String
Collecting company ID.
-
#issuing_country_number ⇒ String
Issuing Country Number.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(col_co_id = SKIP, col_co_code = SKIP, col_co_country_name = SKIP, issuing_country_number = SKIP) ⇒ ColCoAccess
constructor
A new instance of ColCoAccess.
Methods inherited from BaseModel
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_code ⇒ String
Collecting company code.
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_name ⇒ String
Collecting company’s Country name. ex: United Kingdom
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_id ⇒ String
Collecting company ID.
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_number ⇒ String
Issuing Country Number.
ex: 032 - Czech Republic
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 |
.names ⇒ Object
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 |
.nullables ⇒ Object
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 |
.optionals ⇒ Object
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 |