Class: ShellCardManagementApIs::Payers
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::Payers
- Defined in:
- lib/shell_card_management_ap_is/models/payers.rb
Overview
Payers Model.
Instance Attribute Summary collapse
-
#col_co_code ⇒ Integer
Collecting Company Code (Shell Code) of the selected payer.
-
#col_co_id ⇒ Integer
Collecting Company Id of the payer.
-
#payer_group_id ⇒ Integer
Payer Group identifier of the customer.
-
#payer_id ⇒ Integer
Payer id of the customer.
-
#payer_name ⇒ String
Payer Name of the customer.
-
#payer_number ⇒ String
Payer Number of the customer.
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, payer_id = SKIP, payer_number = SKIP, payer_name = SKIP, payer_group_id = SKIP) ⇒ Payers
constructor
A new instance of Payers.
Methods inherited from BaseModel
Constructor Details
#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, payer_name = SKIP, payer_group_id = SKIP) ⇒ Payers
Returns a new instance of Payers.
74 75 76 77 78 79 80 81 82 83 |
# File 'lib/shell_card_management_ap_is/models/payers.rb', line 74 def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, payer_name = SKIP, payer_group_id = SKIP) @col_co_id = col_co_id unless col_co_id == SKIP @col_co_code = col_co_code unless col_co_code == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP @payer_name = payer_name unless payer_name == SKIP @payer_group_id = payer_group_id unless payer_group_id == SKIP end |
Instance Attribute Details
#col_co_code ⇒ Integer
Collecting Company Code (Shell Code) of the selected payer. Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia, Ukraine etc. It is optional for other countries if ColCoID is provided.
20 21 22 |
# File 'lib/shell_card_management_ap_is/models/payers.rb', line 20 def col_co_code @col_co_code end |
#col_co_id ⇒ Integer
Collecting Company Id of the payer
14 15 16 |
# File 'lib/shell_card_management_ap_is/models/payers.rb', line 14 def col_co_id @col_co_id end |
#payer_group_id ⇒ Integer
Payer Group identifier of the customer
36 37 38 |
# File 'lib/shell_card_management_ap_is/models/payers.rb', line 36 def payer_group_id @payer_group_id end |
#payer_id ⇒ Integer
Payer id of the customer.
24 25 26 |
# File 'lib/shell_card_management_ap_is/models/payers.rb', line 24 def payer_id @payer_id end |
#payer_name ⇒ String
Payer Name of the customer.
32 33 34 |
# File 'lib/shell_card_management_ap_is/models/payers.rb', line 32 def payer_name @payer_name end |
#payer_number ⇒ String
Payer Number of the customer.
28 29 30 |
# File 'lib/shell_card_management_ap_is/models/payers.rb', line 28 def payer_number @payer_number end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/shell_card_management_ap_is/models/payers.rb', line 86 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 payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP payer_name = hash.key?('PayerName') ? hash['PayerName'] : SKIP payer_group_id = hash.key?('PayerGroupId') ? hash['PayerGroupId'] : SKIP # Create object from extracted values. Payers.new(col_co_id, col_co_code, payer_id, payer_number, payer_name, payer_group_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
39 40 41 42 43 44 45 46 47 48 |
# File 'lib/shell_card_management_ap_is/models/payers.rb', line 39 def self.names @_hash = {} if @_hash.nil? @_hash['col_co_id'] = 'ColCoId' @_hash['col_co_code'] = 'ColCoCode' @_hash['payer_id'] = 'PayerId' @_hash['payer_number'] = 'PayerNumber' @_hash['payer_name'] = 'PayerName' @_hash['payer_group_id'] = 'PayerGroupId' @_hash end |
.nullables ⇒ Object
An array for nullable fields
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/shell_card_management_ap_is/models/payers.rb', line 63 def self.nullables %w[ col_co_id col_co_code payer_id payer_number payer_name payer_group_id ] end |
.optionals ⇒ Object
An array for optional fields
51 52 53 54 55 56 57 58 59 60 |
# File 'lib/shell_card_management_ap_is/models/payers.rb', line 51 def self.optionals %w[ col_co_id col_co_code payer_id payer_number payer_name payer_group_id ] end |