Class: ShellDataReportingApIs::CustomerController

Inherits:
BaseController show all
Defined in:
lib/shell_data_reporting_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 ShellDataReportingApIs::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_data_reporting_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",
                             ErrorObjectException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectException)
                .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",
                             ErrorObjectException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectException))
    .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_data_reporting_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",
                             ErrorObjectException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectException)
                .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",
                             ErrorObjectException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectException))
    .execute
end

#customer_price_list(request_id, body: nil) ⇒ CustomerPriceListRes

  • This operation fetches the International and National Price List and

discount values set on pump prices & List Prices

  • It allows searching price list and discount values set on pump prices

that are applicable for a given customer Note: Accounts with cancelled status will not be considered for this operation for the configured

  • When the search is based on customer specific price list then the

customer price list is returned based on the associated pricing customer.

  • The discount values set on pump prices, which are returned by the

operation are always customer specific values based on the customer associated price rules. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. request body

Parameters:

  • request_id (String)

    Required parameter: Mandatory UUID (according

  • body (CustomerPriceListReq) (defaults to: nil)

    Optional parameter: Customerdetails

Returns:



401
402
403
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
# File 'lib/shell_data_reporting_ap_is/controllers/customer_controller.rb', line 401

def customer_price_list(request_id,
                        body: nil)
  @api_call
    .request(new_request_builder(HttpMethodEnum::POST,
                                 '/customer-management/v1/pricelist',
                                 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(CustomerPriceListRes.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).',
                             ErrorObjectException)
                .local_error('401',
                             'The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.',
                             ErrorObjectException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectException)
                .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.',
                             ErrorObjectException)
                .local_error('500',
                             'The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.',
                             ErrorObjectException))
    .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_data_reporting_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",
                             ErrorObjectException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectException)
                .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",
                             ErrorObjectException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectException))
    .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_data_reporting_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",
                             ErrorObjectException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectException)
                .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",
                             ErrorObjectException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectException))
    .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_data_reporting_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",
                             ErrorObjectException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectException)
                .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",
                             ErrorObjectException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectException))
    .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_data_reporting_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",
                             ErrorObjectException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectException)
                .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",
                             ErrorObjectException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectException))
    .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_data_reporting_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",
                             ErrorObjectException)
                .local_error('401',
                             "The request has not been applied because it lacks valid '\
                              ' authentication credentials for the target resource.\n",
                             ErrorObjectException)
                .local_error('403',
                             'Forbidden',
                             ErrorObjectException)
                .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",
                             ErrorObjectException)
                .local_error('500',
                             "The server encountered an unexpected condition that  prevented'\
                              ' it from fulfilling the request.\n",
                             ErrorObjectException))
    .execute
end