Class: ShellCardManagementApIs::CustomerController

Inherits:
BaseController show all
Defined in:
lib/shell_card_management_ap_is/controllers/customer_controller.rb

Overview

CustomerController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #new_parameter, #new_request_builder, #new_response_handler, user_agent

Constructor Details

This class inherits a constructor from ShellCardManagementApIs::BaseController

Instance Method Details

#audit_report(request_id, body: nil) ⇒ AuditResponse

This operation allows users to fetch audit data of account or card operations performed by users of a given customer The audit data includes details of below API operations

  • Order Card

  • Create Card Group

  • PIN reminder

  • Move Cards

  • Update Card Status

  • Update Card Group

  • Auto renew

  • Bulk card order

  • Bulk card block

  • Bulk Card Order (Multi Account)

  • BCOSummary

  • BCOMultiAccountSummary

  • BCBSummary

  • Mobile Payment Registration

  • Fund Transfer (Scheduled & Realtime)

  • Delivery Address Update.

to RFC 4122 standards) for requests and responses. This will be played back in the response from the request.

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (AuditReq) (defaults to: nil)

    Optional parameter: request body

Returns:



344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 344

def audit_report(request_id,
                 body: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/customer-management/v1/auditreport',
                                 Server::SHELL)
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BearerToken')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(AuditResponse.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request due to'\
                              ' something that is perceived to be a client error (e.g.,'\
                              ' malformed request syntax, invalid request message framing, or'\
                              ' deceptive request routing).\n",
                             ErrorObjectErrorException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectErrorException)
                .local_error('404',
                             "The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.\n",
                             ErrorObjectErrorException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectErrorException))
    .execute
end

#cardgroups(request_id, body) ⇒ CardGroupRes

This API allows querying the card group details from the Shell Cards Platform. It provides flexible search criteria and supports paging. When the account is not passed in the input and card group type is configured as ‘Vertical’ in the cards platform, this API will return all card groups from the payer as well as from all the accounts under the payer. When the account is not passed in the input and card group type is configured as ‘Horizontal’ in cards platform, this API will return all card groups configured directly under the payer. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. here

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (CardGroupReq)

    Required parameter: TODO: type description

Returns:



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
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 280

def cardgroups(request_id,
               body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/customer-management/v1/cardgroups',
                                 Server::SHELL)
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BearerToken')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(CardGroupRes.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request due to'\
                              ' something that is perceived to be a client error (e.g.,'\
                              ' malformed request syntax, invalid request message framing, or'\
                              ' deceptive request routing).\n",
                             ErrorObjectErrorException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectErrorException)
                .local_error('404',
                             "The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.\n",
                             ErrorObjectErrorException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectErrorException))
    .execute
end

#customercardtypev(request_id, body) ⇒ CardTypeRes

This API provides allows querying the active card types that are associated to the given account.

The API returns the card type configurations, purchase categories associated with the card type and the card type restriction limits. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. here

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (CardTypeReq)

    Required parameter: TODO: type description

Returns:



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
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 223

def customercardtypev(request_id,
                      body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/customer-management/v1/cardtype',
                                 Server::SHELL)
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BearerToken')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(CardTypeRes.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request due to'\
                              ' something that is perceived to be a client error (e.g.,'\
                              ' malformed request syntax, invalid request message framing, or'\
                              ' deceptive request routing).\n",
                             ErrorObjectErrorException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectErrorException)
                .local_error('404',
                             "The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.\n",
                             ErrorObjectErrorException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectErrorException))
    .execute
end

#customercreatecardgroup(request_id, body) ⇒ CreateCardGroupRes

This API allows creating a new Card Group in the Shell Cards Platform. It will also allow moving of cards (up to 500 cards) into the newly created card-group. Move Card requests are queued after passing the below validations

  • Given PAN matches with only one

card.

  • Card is allowed to be moved to the Target Card Group and/or

Target account requested.

  • There is no pending Move Card request for

the same card in the queue which is submitted on the same date (customer’s local) and is yet to be processed or has been processed successfully to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. description here

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (CreateCardGroupRequest)

    Required parameter: TODO: type

Returns:



404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 404

def customercreatecardgroup(request_id,
                            body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/customer-management/v1/createcardgroup',
                                 Server::SHELL)
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BearerToken')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(CreateCardGroupRes.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request due to'\
                              ' something that is perceived to be a client error (e.g.,'\
                              ' malformed request syntax, invalid request message framing, or'\
                              ' deceptive request routing).\n",
                             ErrorObjectErrorException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectErrorException)
                .local_error('404',
                             "The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.\n",
                             ErrorObjectErrorException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectErrorException))
    .execute
end

#customerdetail(request_id, body) ⇒ CustomerRes

This API allows querying the card delivery addresses of a given account from the Shell Cards Platform. Only active delivery addresses will be returned. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. here

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (CustomerReq)

    Required parameter: TODO: type description

Returns:



125
126
127
128
129
130
131
132
133
134
135
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
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 125

def customerdetail(request_id,
                   body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/customer-management/v1/customer',
                                 Server::SHELL)
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BearerToken')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(CustomerRes.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request due to'\
                              ' something that is perceived to be a client error (e.g.,'\
                              ' malformed request syntax, invalid request message framing, or'\
                              ' deceptive request routing).\n",
                             ErrorObjectErrorException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectErrorException)
                .local_error('404',
                             "The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.\n",
                             ErrorObjectErrorException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectErrorException))
    .execute
end

#customerpayers(request_id, body) ⇒ PayerRes

This API allows querying the payer accounts details from the Shell Cards Platform. It provides flexible search criteria for searching payer information and supports paging. Paging is applicable only when all the payers passed in the input are from the same ColCo. However, paging will be ignored and the API will return all the matching data by merging the data queried from each ColCo when payers passed in the input are from multiple ColCos. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request.

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (PayerReq)

    Required parameter: TODO: type description here

Returns:

  • (PayerRes)

    Response from the API call.



76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 76

def customerpayers(request_id,
                   body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/customer-management/v1/payers',
                                 Server::SHELL)
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BearerToken')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(PayerRes.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request due to'\
                              ' something that is perceived to be a client error (e.g.,'\
                              ' malformed request syntax, invalid request message framing, or'\
                              ' deceptive request routing).\n",
                             ErrorObjectErrorException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectErrorException)
                .local_error('404',
                             "The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.\n",
                             ErrorObjectErrorException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectErrorException))
    .execute
end

#customerupdatecardgroup(request_id, body) ⇒ UpdateCardGroupRes

This API allows updating or removing a Card Group in the Shell Cards Platform. It also allows moving of cards out of a card group or from one card group to another existing card group. The request for updating or removing of the card group, creationg of a new card group (where-applicable) and moving of card into another card group will be queued after passing the basic validations. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. description here

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (UpdateCardGroupRequest)

    Required parameter: TODO: type

Returns:



458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 458

def customerupdatecardgroup(request_id,
                            body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/customer-management/v1/updatecardgroup',
                                 Server::SHELL)
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BearerToken')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(UpdateCardGroupRes.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request due to'\
                              ' something that is perceived to be a client error (e.g.,'\
                              ' malformed request syntax, invalid request message framing, or'\
                              ' deceptive request routing).\n",
                             ErrorObjectErrorException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectErrorException)
                .local_error('404',
                             "The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.\n",
                             ErrorObjectErrorException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectErrorException))
    .execute
end

#post_card_accounts(request_id, body) ⇒ AccountRes

This API allows querying the customer account details from the Shell Cards Platform. It provides a flexible search criterion and supports pagination. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request.

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (AccountReq)

    Required parameter: TODO: type description here

Returns:



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
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/controllers/customer_controller.rb', line 172

def post_card_accounts(request_id,
                       body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/customer-management/v1/accounts',
                                 Server::SHELL)
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BearerToken')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(AccountRes.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request due to'\
                              ' something that is perceived to be a client error (e.g.,'\
                              ' malformed request syntax, invalid request message framing, or'\
                              ' deceptive request routing).\n",
                             ErrorObjectErrorException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectErrorException)
                .local_error('404',
                             "The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.\n",
                             ErrorObjectErrorException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectErrorException))
    .execute
end

#user_loggedinuser(request_id, body) ⇒ LoggedInUserRes

This operation allows querying the user data of the logged in user. This operation should be called only after successful authentication of the end user in client application. This operation will return the user access details such as payers and/or accounts. This operation will also validate that logged in user has access to the requested operation, on failure it will return HasAPIAccess flag as false in the response. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. here

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (LoggedInUserReq)

    Required parameter: TODO: type description

Returns:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 22

def user_loggedinuser(request_id,
                      body)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/user-management/v1/loggedinuser',
                                 Server::SHELL)
               .header_param(new_parameter(request_id, key: 'RequestId'))
               .header_param(new_parameter('application/json', key: 'Content-Type'))
               .body_param(new_parameter(body))
               .header_param(new_parameter('application/json', key: 'accept'))
               .body_serializer(proc do |param| param.to_json unless param.nil? end)
               .auth(Single.new('BearerToken')))
    .response(new_response_handler
                .deserializer(APIHelper.method(:custom_type_deserializer))
                .deserialize_into(LoggedInUserRes.method(:from_hash))
                .local_error('400',
                             "The server cannot or will not process the request due to'\
                              ' something that is perceived to be a client error (e.g.,'\
                              ' malformed request syntax, invalid request message framing, or'\
                              ' deceptive request routing).\n",
                             ErrorObjectErrorException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectErrorException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectErrorException)
                .local_error('404',
                             "The origin server did not find a current representation  for'\
                              ' the target resource or is not willing to disclose  that one'\
                              ' exists.\n",
                             ErrorObjectErrorException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectErrorException))
    .execute
end