Class: ShellCardManagementApIs::ScheduleCardBlockCardsItems
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::ScheduleCardBlockCardsItems
- Defined in:
- lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb
Overview
ScheduleCardBlockCardsItems Model.
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account Id of the customer.
-
#account_number ⇒ String
Account Number of the customer.
-
#action ⇒ String
Action Mandatory Possible values are: • AddOrUpdate – adds a new request or updates any existing requests, with overlapping dates, for the card • AddAndOverwriteAll - all the existing requests of the given card will be removed and a new request with the specified FromDate and ToDate will be added.
-
#caller ⇒ String
The caller to be notified with the status of the scheduled card block / unblock request.
-
#card_expiry_date ⇒ String
Expiry date of the card.
-
#card_id ⇒ Integer
Unique Id of the card.
-
#col_co_code ⇒ Integer
Collecting Company Code (Shell Code) of the selected payer.
-
#col_co_id ⇒ Integer
Collecting Company Id of the selected payer.
-
#from_date ⇒ String
Effective start date of Block / Unblock Allowed Formats: – • yyyyMMdd • yyyyMMdd HH:mm Eg: 20230512 14:30, 20230512 Optional Default value: • If the card status is “Active” then Current date & Time • If the card status is “TemporaryBlock (Customer)” then null.
-
#notify_caller ⇒ TrueClass | FalseClass
True/False.
-
#pan ⇒ String
PAN of the card.
-
#panid ⇒ String
Card PAN ID.
-
#payer_id ⇒ Integer
Payer id of the customer.
-
#payer_number ⇒ String
PayerNumber of the customer.
-
#to_date ⇒ String
Effective end date of Block / Unblock Allowed Formats: – • yyyyMMdd • yyyyMMdd HH:mm Eg: 20230512 14:30, 20230512 Optional – When the Card status is Active else mandatory.
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(action = nil, col_co_code = SKIP, col_co_id = SKIP, account_id = SKIP, account_number = SKIP, payer_id = SKIP, payer_number = SKIP, card_id = SKIP, pan = SKIP, panid = SKIP, card_expiry_date = SKIP, from_date = SKIP, to_date = SKIP, caller = SKIP, notify_caller = SKIP) ⇒ ScheduleCardBlockCardsItems
constructor
A new instance of ScheduleCardBlockCardsItems.
Methods inherited from BaseModel
Constructor Details
#initialize(action = nil, col_co_code = SKIP, col_co_id = SKIP, account_id = SKIP, account_number = SKIP, payer_id = SKIP, payer_number = SKIP, card_id = SKIP, pan = SKIP, panid = SKIP, card_expiry_date = SKIP, from_date = SKIP, to_date = SKIP, caller = SKIP, notify_caller = SKIP) ⇒ ScheduleCardBlockCardsItems
Returns a new instance of ScheduleCardBlockCardsItems.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 190 def initialize(action = nil, col_co_code = SKIP, col_co_id = SKIP, account_id = SKIP, account_number = SKIP, payer_id = SKIP, payer_number = SKIP, card_id = SKIP, pan = SKIP, panid = SKIP, card_expiry_date = SKIP, from_date = SKIP, to_date = SKIP, caller = SKIP, notify_caller = SKIP) @col_co_code = col_co_code unless col_co_code == SKIP @col_co_id = col_co_id unless col_co_id == SKIP @account_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP @card_id = card_id unless card_id == SKIP @pan = pan unless pan == SKIP @panid = panid unless panid == SKIP @card_expiry_date = card_expiry_date unless card_expiry_date == SKIP @action = action @from_date = from_date unless from_date == SKIP @to_date = to_date unless to_date == SKIP @caller = caller unless caller == SKIP @notify_caller = notify_caller unless notify_caller == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Account Id of the customer. Optional if AccountNumber is passed, else Mandatory.
32 33 34 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 32 def account_id @account_id end |
#account_number ⇒ String
Account Number of the customer. Optional if AccountId is passed, else Mandatory.
37 38 39 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 37 def account_number @account_number end |
#action ⇒ String
Action Mandatory Possible values are: • AddOrUpdate – adds a new request or updates any existing requests, with overlapping dates, for the card • AddAndOverwriteAll - all the existing requests of the given card will be removed and a new request with the specified FromDate and ToDate will be added. • Delete – deletes any existing request with the same start date and end date for the card • DeleteAll – deletes all saved future dated requests (all block and unblock requests) of the card.
86 87 88 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 86 def action @action end |
#caller ⇒ String
The caller to be notified with the status of the scheduled card block / unblock request. Mandatory, if NotifyCaller is true. Maximum field length: 20
132 133 134 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 132 def caller @caller end |
#card_expiry_date ⇒ String
Expiry date of the card. Optional if CardId is passed, else Mandatory. Format: yyyyMMdd Example: 20170930
71 72 73 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 71 def card_expiry_date @card_expiry_date end |
#card_id ⇒ Integer
Unique Id of the card. Optional if PAN is passed, else Mandatory.
53 54 55 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 53 def card_id @card_id 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-Philippines 5-UK
19 20 21 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 19 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-Philippines 5-UK
27 28 29 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 27 def col_co_id @col_co_id end |
#from_date ⇒ String
Effective start date of Block / Unblock Allowed Formats: – • yyyyMMdd • yyyyMMdd HH:mm Eg: 20230512 14:30, 20230512 Optional Default value: • If the card status is “Active” then Current date & Time • If the card status is “TemporaryBlock (Customer)” then null. Note: • Time is considered only when “IsTimeSupported” is true else it will be treated as a date. • Time will be passed in UTC time-zone. • If the Card Status is “Temporary Block (Customer)” and FromDate is provided – The fromdate & time is considered as starting period of unblock request.
105 106 107 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 105 def from_date @from_date end |
#notify_caller ⇒ TrueClass | FalseClass
True/False. Optional. Default: False If true, the caller would be notified back with the status as success or failure after the scheduled card block / unblock request is processed.
140 141 142 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 140 def notify_caller @notify_caller end |
#pan ⇒ String
PAN of the card. Optional if CardId is passed, else Mandatory.
58 59 60 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 58 def pan @pan end |
#panid ⇒ String
Card PAN ID. Optional if CardId is given, else mandatory. Note: PANID is ignored if CardId is given.
64 65 66 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 64 def panid @panid end |
#payer_id ⇒ Integer
Payer id of the customer. Optional if PayerNumber is passed, else Mandatory. Example: 123456
43 44 45 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 43 def payer_id @payer_id end |
#payer_number ⇒ String
PayerNumber of the customer. Optional if PayerId is passed, else Mandatory.
48 49 50 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 48 def payer_number @payer_number end |
#to_date ⇒ String
Effective end date of Block / Unblock Allowed Formats: – • yyyyMMdd • yyyyMMdd HH:mm Eg: 20230512 14:30, 20230512 Optional – When the Card status is Active else mandatory. When not provided, the card will remain blocked until manually unblocked. Note: • Time is considered only when the “IsTimeSupported” flag is set as true, else it will be considered as only date. • Date & Time passed in the request will be considered in UTC time-zone. • If the card is currently in ‘Temporary Block (Customer)’ status, then this date is treated as the unblock date and is mandatory. • If the Card Status is “Temporary Block (Customer)” and FromDate & ToDate is provided - The request will be considered as a scheduled specific period unblock request.
125 126 127 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 125 def to_date @to_date end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 213 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. action = hash.key?('Action') ? hash['Action'] : nil col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP card_id = hash.key?('CardId') ? hash['CardId'] : SKIP pan = hash.key?('PAN') ? hash['PAN'] : SKIP panid = hash.key?('PANID') ? hash['PANID'] : SKIP card_expiry_date = hash.key?('CardExpiryDate') ? hash['CardExpiryDate'] : SKIP from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP to_date = hash.key?('ToDate') ? hash['ToDate'] : SKIP caller = hash.key?('Caller') ? hash['Caller'] : SKIP notify_caller = hash.key?('NotifyCaller') ? hash['NotifyCaller'] : SKIP # Create object from extracted values. ScheduleCardBlockCardsItems.new(action, col_co_code, col_co_id, account_id, account_number, payer_id, payer_number, card_id, pan, panid, card_expiry_date, from_date, to_date, caller, notify_caller) end |
.names ⇒ Object
A mapping from model property names to API property names.
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 143 def self.names @_hash = {} if @_hash.nil? @_hash['col_co_code'] = 'ColCoCode' @_hash['col_co_id'] = 'ColCoId' @_hash['account_id'] = 'AccountId' @_hash['account_number'] = 'AccountNumber' @_hash['payer_id'] = 'PayerId' @_hash['payer_number'] = 'PayerNumber' @_hash['card_id'] = 'CardId' @_hash['pan'] = 'PAN' @_hash['panid'] = 'PANID' @_hash['card_expiry_date'] = 'CardExpiryDate' @_hash['action'] = 'Action' @_hash['from_date'] = 'FromDate' @_hash['to_date'] = 'ToDate' @_hash['caller'] = 'Caller' @_hash['notify_caller'] = 'NotifyCaller' @_hash end |
.nullables ⇒ Object
An array for nullable fields
184 185 186 187 188 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 184 def self.nullables %w[ caller ] end |
.optionals ⇒ Object
An array for optional fields
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb', line 164 def self.optionals %w[ col_co_code col_co_id account_id account_number payer_id payer_number card_id pan panid card_expiry_date from_date to_date caller notify_caller ] end |