Class: ShellCardManagementApIs::UpdateCard
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ShellCardManagementApIs::UpdateCard
- Defined in:
- lib/shell_card_management_ap_is/models/update_card.rb
Overview
Request entity object for UpdateCardRequest list
Instance Attribute Summary collapse
-
#account_id ⇒ Integer
Account Id of the customer.<br /> Optional if AccountNumber is passed, else Mandatory.
-
#account_number ⇒ String
Account Number of the customer.<br /> Optional if AccountId is passed, else Mandatory.
-
#caller ⇒ String
The caller to be notified with the status of the update card status request.
-
#card_expiry_date ⇒ String
Expiry date of the card.<br /> Mandatory if PAN is passed, else optional.<br /> Format: yyyyMMdd.
-
#card_id ⇒ Integer
Card Id of the card.<br /> Optional if PAN is passed, else Mandatory.
-
#card_settings ⇒ CardSettings
True/False.<br /> Pass True if a replacement order card request is to be placed, else False.<br /> Optional.Default value False.<br /> Replacement of a card is only applicable when the target status requested is either permanently Block or Damaged for the existing card.<br /> Request for Replacement card will be placed only when the Block card or Block damaged card request is successfully placed.<br /> The Replacement card request will be processed only when the permanent Block card request is successfully processed.
-
#col_co_code ⇒ Integer
Collecting company code of the customer.
-
#col_co_id ⇒ Integer
Collecting company id of the customer.
-
#is_replacement_chargeable ⇒ TrueClass | FalseClass
True/False<br /> Optional<br /> When not provided will considered as default value as True.<br /> If passed True, the replacement card will be chargeable, else replacement card will not be charged.
-
#notify_caller ⇒ TrueClass | FalseClass
True/False.<br /> Optional.<br /> Default: False<br /> If true, the caller would be notified back with the status as success or failure after the update card status request is processed.
-
#notify_caller_on_sync ⇒ TrueClass | FalseClass
True/False.<br /> Optional.<br /> Default: False<br /> If true, the caller would be notified back with the status as success or failed after the replacement card is synced with Gateway, if a replacement card was requested.
-
#order_card_replacement ⇒ TrueClass | FalseClass
True/False.<br /> Pass True if a replacement order card request is to be placed, else False.<br /> Optional.Default value False.<br /> Replacement of a card is only applicable when the target status requested is either permanently Block or Damaged for the existing card.<br /> Request for Replacement card will be placed only when the Block card or Block damaged card request is successfully placed.<br /> The Replacement card request will be processed only when the permanent Block card request is successfully processed.
-
#pan ⇒ String
PAN of the card.<br /> Optional if CardId is passed, else Mandatory.<br />.
-
#panid ⇒ Float
PANID of the card.
-
#payer_id ⇒ Integer
Payer id of the customer.<br /> Optional if PayerNumber is passed, else Mandatory.
-
#payer_number ⇒ String
PayerNumber of the customer.<br /> Optional if PayerId is passed, else Mandatory.
-
#reason_id ⇒ Integer
Reason id for updating the card status.
-
#reason_text ⇒ String
Reason text for updating the card status.
-
#target_status ⇒ Integer
The list of cards passed in ‘Cards’ parameter will be updated to this status.<br /> Mandatory.<br /> Allowed values –<br /> - TemporaryBlock<br /> - Unblock<br /> - Block<br /> - Damaged<br />.
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
Methods inherited from BaseModel
Constructor Details
#initialize(caller = SKIP, is_replacement_chargeable = SKIP, notify_caller = SKIP, notify_caller_on_sync = SKIP, order_card_replacement = SKIP, card_settings = SKIP, reason_id = SKIP, reason_text = SKIP, target_status = SKIP, account_id = SKIP, account_number = SKIP, card_expiry_date = SKIP, card_id = SKIP, col_co_code = SKIP, col_co_id = SKIP, pan = SKIP, panid = SKIP, payer_id = SKIP, payer_number = SKIP) ⇒ UpdateCard
Returns a new instance of UpdateCard.
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 244 def initialize(caller = SKIP, is_replacement_chargeable = SKIP, notify_caller = SKIP, notify_caller_on_sync = SKIP, order_card_replacement = SKIP, card_settings = SKIP, reason_id = SKIP, reason_text = SKIP, target_status = SKIP, account_id = SKIP, account_number = SKIP, card_expiry_date = SKIP, card_id = SKIP, col_co_code = SKIP, col_co_id = SKIP, pan = SKIP, panid = SKIP, payer_id = SKIP, payer_number = SKIP) @caller = caller unless caller == SKIP unless is_replacement_chargeable == SKIP @is_replacement_chargeable = is_replacement_chargeable end @notify_caller = notify_caller unless notify_caller == SKIP @notify_caller_on_sync = notify_caller_on_sync unless notify_caller_on_sync == SKIP @order_card_replacement = order_card_replacement unless order_card_replacement == SKIP @card_settings = card_settings unless card_settings == SKIP @reason_id = reason_id unless reason_id == SKIP @reason_text = reason_text unless reason_text == SKIP @target_status = target_status unless target_status == SKIP @account_id = account_id unless account_id == SKIP @account_number = account_number unless account_number == SKIP @card_expiry_date = card_expiry_date unless card_expiry_date == SKIP @card_id = card_id unless card_id == SKIP @col_co_code = col_co_code unless col_co_code == SKIP @col_co_id = col_co_id unless col_co_id == SKIP @pan = pan unless pan == SKIP @panid = panid unless panid == SKIP @payer_id = payer_id unless payer_id == SKIP @payer_number = payer_number unless payer_number == SKIP end |
Instance Attribute Details
#account_id ⇒ Integer
Account Id of the customer.<br /> Optional if AccountNumber is passed, else Mandatory.
128 129 130 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 128 def account_id @account_id end |
#account_number ⇒ String
Account Number of the customer.<br /> Optional if AccountId is passed, else Mandatory.
133 134 135 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 133 def account_number @account_number end |
#caller ⇒ String
The caller to be notified with the status of the update card status request. <br /> The caller will also be notified with the status of the replacement card order request, if any.<br /> Mandatory, if NotifyCaller is true. <br /> Maximum field length: 20<br /> Allowed values:<br />
-
NextGenUI: This value to be used by next gen UI application.<br />
-
Motix: This value to be used by MOTiX application.<br />
-
FleetHubUILifeTime: This value to be used by Fleet Hub UI application
for life time restriction cards.<br /> Note: The values passed in this field are case insensitive.
25 26 27 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 25 def caller @caller end |
#card_expiry_date ⇒ String
Expiry date of the card.<br /> Mandatory if PAN is passed, else optional.<br /> Format: yyyyMMdd
139 140 141 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 139 def card_expiry_date @card_expiry_date end |
#card_id ⇒ Integer
Card Id of the card.<br /> Optional if PAN is passed, else Mandatory.
144 145 146 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 144 def card_id @card_id end |
#card_settings ⇒ CardSettings
True/False.<br /> Pass True if a replacement order card request is to be placed, else False.<br /> Optional.Default value False.<br /> Replacement of a card is only applicable when the target status requested is either permanently Block or Damaged for the existing card.<br /> Request for Replacement card will be placed only when the Block card or Block damaged card request is successfully placed.<br /> The Replacement card request will be processed only when the permanent Block card request is successfully processed. <br /> In case of damaged card request, the replacement card request will be processed immediately.
82 83 84 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 82 def card_settings @card_settings end |
#col_co_code ⇒ Integer
Collecting company code of the customer. <br /> Optional if ColCoId is passed, else Mandatory.<br />
149 150 151 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 149 def col_co_code @col_co_code end |
#col_co_id ⇒ Integer
Collecting company id of the customer. <br /> Optional if ColCoCode is passed, else Mandatory.<br />
154 155 156 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 154 def col_co_id @col_co_id end |
#is_replacement_chargeable ⇒ TrueClass | FalseClass
True/False<br /> Optional<br /> When not provided will considered as default value as True.<br /> If passed True, the replacement card will be chargeable, else replacement card will not be charged.
33 34 35 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 33 def is_replacement_chargeable @is_replacement_chargeable end |
#notify_caller ⇒ TrueClass | FalseClass
True/False.<br /> Optional.<br /> Default: False<br /> If true, the caller would be notified back with the status as success or failure after the update card status request is processed. Notification API subscription required to use this feature , please refer API documetation for more details
43 44 45 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 43 def notify_caller @notify_caller end |
#notify_caller_on_sync ⇒ TrueClass | FalseClass
True/False.<br /> Optional.<br /> Default: False<br /> If true, the caller would be notified back with the status as success or failed after the replacement card is synced with Gateway, if a replacement card was requested.
52 53 54 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 52 def notify_caller_on_sync @notify_caller_on_sync end |
#order_card_replacement ⇒ TrueClass | FalseClass
True/False.<br /> Pass True if a replacement order card request is to be placed, else False.<br /> Optional.Default value False.<br /> Replacement of a card is only applicable when the target status requested is either permanently Block or Damaged for the existing card.<br /> Request for Replacement card will be placed only when the Block card or Block damaged card request is successfully placed.<br /> The Replacement card request will be processed only when the permanent Block card request is successfully processed. <br /> In case of damaged card request, the replacement card request will be processed immediately.
67 68 69 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 67 def order_card_replacement @order_card_replacement end |
#pan ⇒ String
PAN of the card.<br /> Optional if CardId is passed, else Mandatory.<br />
159 160 161 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 159 def pan @pan end |
#panid ⇒ Float
PANID of the card
163 164 165 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 163 def panid @panid end |
#payer_id ⇒ Integer
Payer id of the customer.<br /> Optional if PayerNumber is passed, else Mandatory.
168 169 170 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 168 def payer_id @payer_id end |
#payer_number ⇒ String
PayerNumber of the customer.<br /> Optional if PayerId is passed, else Mandatory.
173 174 175 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 173 def payer_number @payer_number end |
#reason_id ⇒ Integer
Reason id for updating the card status. Either Reason ID or Text is madatory when TargetStatus is ‘Block’ or ‘Damaged’. Else ignored. Possible values: 1 (Lost) 2 (Stolen) 3 (Card no longer required)
<br>When passed, the reason Id will be mapped to allowed reason IDs
configured for the card type of the card. If the given reason Id is not allowed for certain card types, then the request will be rejected as invalid ResonId
96 97 98 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 96 def reason_id @reason_id end |
#reason_text ⇒ String
Reason text for updating the card status. Possible Values: 1) Lost 2) Stolen 3) Card no longer required Optional – However, either Reason ID or Text is madatory when TargetStatus is ‘Block’ or ‘Damaged’. Else, Ignored. When Reason Text is passed and the Target Status is either Block or Damaged, the text will be validated with the allowed list of values configured for the card type of the card. If the text is not allowed, request will be rejected as invaid ResonText. Note: ‘Customer blocked’ will be used as the reason for ‘Temporary Block’.
112 113 114 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 112 def reason_text @reason_text end |
#target_status ⇒ Integer
The list of cards passed in ‘Cards’ parameter will be updated to this status.<br /> Mandatory.<br /> Allowed values –<br />
-
TemporaryBlock<br />
-
Unblock<br />
-
Block<br />
-
Damaged<br />
123 124 125 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 123 def target_status @target_status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 277 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. caller = hash.key?('Caller') ? hash['Caller'] : SKIP is_replacement_chargeable = hash.key?('IsReplacementChargeable') ? hash['IsReplacementChargeable'] : SKIP notify_caller = hash.key?('NotifyCaller') ? hash['NotifyCaller'] : SKIP notify_caller_on_sync = hash.key?('NotifyCallerOnSync') ? hash['NotifyCallerOnSync'] : SKIP order_card_replacement = hash.key?('OrderCardReplacement') ? hash['OrderCardReplacement'] : SKIP card_settings = CardSettings.from_hash(hash['CardSettings']) if hash['CardSettings'] reason_id = hash.key?('ReasonId') ? hash['ReasonId'] : SKIP reason_text = hash.key?('ReasonText') ? hash['ReasonText'] : SKIP target_status = hash.key?('TargetStatus') ? hash['TargetStatus'] : SKIP account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP card_expiry_date = hash.key?('CardExpiryDate') ? hash['CardExpiryDate'] : SKIP card_id = hash.key?('CardId') ? hash['CardId'] : SKIP col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP pan = hash.key?('PAN') ? hash['PAN'] : SKIP panid = hash.key?('PANID') ? hash['PANID'] : SKIP payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP # Create object from extracted values. UpdateCard.new(caller, is_replacement_chargeable, notify_caller, notify_caller_on_sync, order_card_replacement, card_settings, reason_id, reason_text, target_status, account_id, account_number, card_expiry_date, card_id, col_co_code, col_co_id, pan, panid, payer_id, payer_number) end |
.names ⇒ Object
A mapping from model property names to API property names.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 176 def self.names @_hash = {} if @_hash.nil? @_hash['caller'] = 'Caller' @_hash['is_replacement_chargeable'] = 'IsReplacementChargeable' @_hash['notify_caller'] = 'NotifyCaller' @_hash['notify_caller_on_sync'] = 'NotifyCallerOnSync' @_hash['order_card_replacement'] = 'OrderCardReplacement' @_hash['card_settings'] = 'CardSettings' @_hash['reason_id'] = 'ReasonId' @_hash['reason_text'] = 'ReasonText' @_hash['target_status'] = 'TargetStatus' @_hash['account_id'] = 'AccountId' @_hash['account_number'] = 'AccountNumber' @_hash['card_expiry_date'] = 'CardExpiryDate' @_hash['card_id'] = 'CardId' @_hash['col_co_code'] = 'ColCoCode' @_hash['col_co_id'] = 'ColCoId' @_hash['pan'] = 'PAN' @_hash['panid'] = 'PANID' @_hash['payer_id'] = 'PayerId' @_hash['payer_number'] = 'PayerNumber' @_hash end |
.nullables ⇒ Object
An array for nullable fields
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 226 def self.nullables %w[ caller reason_text target_status account_id account_number card_expiry_date card_id col_co_code col_co_id pan panid payer_id payer_number ] end |
.optionals ⇒ Object
An array for optional fields
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/shell_card_management_ap_is/models/update_card.rb', line 201 def self.optionals %w[ caller is_replacement_chargeable notify_caller notify_caller_on_sync order_card_replacement card_settings reason_id reason_text target_status account_id account_number card_expiry_date card_id col_co_code col_co_id pan panid payer_id payer_number ] end |