Class: ShellCardManagementApIs::CardGroupRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::CardGroupRequest
- Defined in:
- lib/shell_card_management_ap_is/models/card_group_request.rb
Overview
CardGroupRequest Model.
Instance Attribute Summary collapse
-
#account ⇒ Array[Accounts]
PayerNumber of the customer.
-
#card_group_name ⇒ String
Card Group Name Optional.
-
#col_co_code ⇒ Integer
Collecting Company Code (Shell Code) of the selected payer.
-
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer.
-
#current_page ⇒ Integer
Page Number (as shown to the users) Optional Default value 1.
-
#page_size ⇒ Integer
Page Size – Number of records to show on a page.
-
#payer_id ⇒ Integer
Payer id of the customer.
-
#payer_number ⇒ String
PayerNumber of the customer.
-
#status ⇒ String
Card Group Status Mandatory Allowed values: • ALL • TERMINATED • ACTIVE.
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, account = SKIP, card_group_name = SKIP, status = SKIP, current_page = SKIP, page_size = SKIP) ⇒ CardGroupRequest
constructor
A new instance of CardGroupRequest.
Methods inherited from BaseModel
Constructor Details
#initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account = SKIP, card_group_name = SKIP, status = SKIP, current_page = SKIP, page_size = SKIP) ⇒ CardGroupRequest
Returns a new instance of CardGroupRequest.
121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 121 def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP, payer_number = SKIP, account = SKIP, card_group_name = SKIP, status = SKIP, current_page = SKIP, page_size = 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 @account = account unless account == SKIP @card_group_name = card_group_name unless card_group_name == SKIP @status = status unless status == SKIP @current_page = current_page unless current_page == SKIP @page_size = page_size unless page_size == SKIP end |
Instance Attribute Details
#account ⇒ Array[Accounts]
PayerNumber of the customer. Optional if PayerId is passed, else Mandatory. This input is a search criterion. Example: GB00123456
48 49 50 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 48 def account @account end |
#card_group_name ⇒ String
Card Group Name Optional. Minimum of 2 characters should be provided else not considered. CardGroups those have the entered value at any part
55 56 57 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 55 def card_group_name @card_group_name end |
#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. Example: 86 for Philippines 5 for UK
27 28 29 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 27 def col_co_code @col_co_code end |
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer. Optional if ColCoCode is passed else Mandatory. Example: 1 for Philippines 5 for UK
18 19 20 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 18 def col_co_id @col_co_id end |
#current_page ⇒ Integer
Page Number (as shown to the users) Optional Default value 1
70 71 72 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 70 def current_page @current_page end |
#page_size ⇒ Integer
Page Size – Number of records to show on a page. Optional Default value 50. Return all rows if -1 is supplied as page size.
77 78 79 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 77 def page_size @page_size end |
#payer_id ⇒ Integer
Payer id of the customer. Optional if PayerNumber is passed, else Mandatory. This input is a search criterion. Example: 123456
34 35 36 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 34 def payer_id @payer_id end |
#payer_number ⇒ String
PayerNumber of the customer. Optional if PayerId is passed, else Mandatory. This input is a search criterion. Example: GB00123456
41 42 43 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 41 def payer_number @payer_number end |
#status ⇒ String
Card Group Status Mandatory Allowed values: • ALL • TERMINATED • ACTIVE
64 65 66 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 64 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 136 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 # Parameter is an array, so we need to iterate through it account = nil unless hash['Account'].nil? account = [] hash['Account'].each do |structure| account << (Accounts.from_hash(structure) if structure) end end account = SKIP unless hash.key?('Account') card_group_name = hash.key?('CardGroupName') ? hash['CardGroupName'] : SKIP status = hash.key?('Status') ? hash['Status'] : SKIP current_page = hash.key?('CurrentPage') ? hash['CurrentPage'] : SKIP page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP # Create object from extracted values. CardGroupRequest.new(col_co_id, col_co_code, payer_id, payer_number, account, card_group_name, status, current_page, page_size) end |
.names ⇒ Object
A mapping from model property names to API property names.
80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 80 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['account'] = 'Account' @_hash['card_group_name'] = 'CardGroupName' @_hash['status'] = 'Status' @_hash['current_page'] = 'CurrentPage' @_hash['page_size'] = 'PageSize' @_hash end |
.nullables ⇒ Object
An array for nullable fields
110 111 112 113 114 115 116 117 118 119 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 110 def self.nullables %w[ col_co_id col_co_code payer_id payer_number card_group_name status ] end |
.optionals ⇒ Object
An array for optional fields
95 96 97 98 99 100 101 102 103 104 105 106 107 |
# File 'lib/shell_card_management_ap_is/models/card_group_request.rb', line 95 def self.optionals %w[ col_co_id col_co_code payer_id payer_number account card_group_name status current_page page_size ] end |