Class: ShellCardManagementApIs::CustomerController
- Inherits:
-
BaseController
- Object
- BaseController
- ShellCardManagementApIs::CustomerController
- Defined in:
- lib/shell_card_management_ap_is/controllers/customer_controller.rb
Overview
CustomerController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#accounts(apikey, request_id, body: nil) ⇒ AccountResponse
This API allows querying the customer account details from the Shell Cards Platform.
-
#auditreport(apikey, 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.
-
#card_type(apikey, request_id, body: nil) ⇒ CardTypeResponse
This operation allows querying card types that are associated to the given account and are allowed to be shown to users.
-
#cardgroups(apikey, request_id, body: nil) ⇒ CardGroupResponse
This operation allows querying the card group details .
-
#createcardgroup(apikey, request_id, body: nil) ⇒ CreateCardGroupResponse
This API allows creating a new Card Group in the Shell Cards Platform.
-
#customer(apikey, request_id, body: nil) ⇒ CustomerDetailResponse
This API allows querying the card delivery addresses of a given account from the Shell Cards Platform.
-
#loggedinuser(apikey, request_id, body: nil) ⇒ LoggedInUserResponse
This API allows querying the user data of the logged in user.</br> This API will return the user access details such as payers and/or accounts.
-
#payers(apikey, request_id, body: nil) ⇒ PayerResponse
This API allows querying the payer accounts details from the Shell Cards Platform.
-
#updatecardgroup(apikey, request_id, body: nil) ⇒ UpdateCardGroupResponse
This API allows updating or removing a Card Group in the Shell Cards Platform.
Methods inherited from BaseController
#initialize, #new_api_call_builder, #new_parameter, #new_request_builder, #new_response_handler, user_agent
Constructor Details
This class inherits a constructor from ShellCardManagementApIs::BaseController
Instance Method Details
#accounts(apikey, request_id, body: nil) ⇒ AccountResponse
This API allows querying the customer account details from the Shell Cards Platform. It provides a flexible search criterion and supports paging“. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 190 def accounts(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/customer/accounts', Server::SHELL) .header_param(new_parameter(apikey, key: 'apikey')) .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('BasicAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(AccountResponse.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\r\n error (e.g.,'\ ' malformed request syntax, invalid \r\n request message'\ ' framing, or deceptive request routing).", APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'The server understood the request but refuses to authorize it'\ '.', APIException) .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.', APIException) .local_error('500', 'The server encountered an unexpected condition the prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#auditreport(apikey, 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.
specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request.
372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 372 def auditreport(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/customer/auditreport', Server::SHELL) .header_param(new_parameter(apikey, key: 'apikey')) .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('BasicAuth'))) .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\r\n error (e.g.,'\ ' malformed request syntax, invalid \r\n request message'\ ' framing, or deceptive request routing).", APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'The server understood the request but refuses to authorize it'\ '.', APIException) .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.', APIException) .local_error('500', 'The server encountered an unexpected condition the prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#card_type(apikey, request_id, body: nil) ⇒ CardTypeResponse
This operation allows querying card types that are associated to the given account and are allowed to be shown to users. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. Body
243 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 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 243 def card_type(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v2/customer/cardtype', Server::SHELL) .header_param(new_parameter(apikey, key: 'apikey')) .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('BasicAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(CardTypeResponse.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\r\n error (e.g.,'\ ' malformed request syntax, invalid \r\n request message'\ ' framing, or deceptive request routing).", APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'The server understood the request but refuses to authorize it'\ '.', APIException) .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.', APIException) .local_error('500', 'The server encountered an unexpected condition the prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#cardgroups(apikey, request_id, body: nil) ⇒ CardGroupResponse
This operation allows querying the card group details . It provides flexible search criteria and supports paging.\ When the card group type is configured as ‘Vertical’ in cards platform, this operation will return all card groups from the given account or if no account is passed in the input, then will return card groups from all the accounts under the payer. When the card group type is configured as ‘Horizontal’ in cards platform, this API will return all card groups configured directly under the payer. Accounts with cancelled status will not be considered for cardgroups search for the configured (E.g., SFH) set of client apps. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request.
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 |
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 303 def cardgroups(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/customer/cardgroups', Server::SHELL) .header_param(new_parameter(apikey, key: 'apikey')) .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('BasicAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(CardGroupResponse.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\r\n error (e.g.,'\ ' malformed request syntax, invalid \r\n request message'\ ' framing, or deceptive request routing).", APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'The server understood the request but refuses to authorize it'\ '.', APIException) .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.', APIException) .local_error('500', 'The server encountered an unexpected condition the prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#createcardgroup(apikey, request_id, body: nil) ⇒ CreateCardGroupResponse
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
and is yet to be processed or has been processed
successfully specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. request body
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 |
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 435 def createcardgroup(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/customer/createcardgroup', Server::SHELL) .header_param(new_parameter(apikey, key: 'apikey')) .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('BasicAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(CreateCardGroupResponse.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\r\n error (e.g.,'\ ' malformed request syntax, invalid \r\n request message'\ ' framing, or deceptive request routing).", APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'The server understood the request but refuses to authorize it'\ '.', APIException) .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.', APIException) .local_error('500', 'The server encountered an unexpected condition the prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#customer(apikey, request_id, body: nil) ⇒ CustomerDetailResponse
This API allows querying the card delivery addresses of a given account from the Shell Cards Platform. Only active delivery addresses will be returned. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. request body
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 171 172 173 174 175 176 177 178 |
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 137 def customer(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/customer/customer', Server::SHELL) .header_param(new_parameter(apikey, key: 'apikey')) .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('BasicAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(CustomerDetailResponse.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\r\n error (e.g.,'\ ' malformed request syntax, invalid \r\n request message'\ ' framing, or deceptive request routing).", APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'The server understood the request but refuses to authorize it'\ '.', FleetmanagementV1CustomerCustomer403ErrorException) .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.', APIException) .local_error('500', 'The server encountered an unexpected condition the prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#loggedinuser(apikey, request_id, body: nil) ⇒ LoggedInUserResponse
This API allows querying the user data of the logged in user.</br> This API will return the user access details such as payers and/or accounts. </br> This API will also validate that logged in user has access to the requested API, on failure it will return HasAPIAccess flag as false in response.</br> specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. Logged in user request body
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 61 62 63 64 |
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 23 def loggedinuser(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/user/loggedinuser', Server::SHELL) .header_param(new_parameter(apikey, key: 'apikey')) .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('BasicAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(LoggedInUserResponse.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\r\n error (e.g.,'\ ' malformed request syntax, invalid \r\n request message'\ ' framing, or deceptive request routing).", FleetmanagementV1UserLoggedinuser400ErrorException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', FleetmanagementV1UserLoggedinuser401ErrorException) .local_error('403', 'The server understood the request but refuses to authorize it'\ '.', FleetmanagementV1UserLoggedinuser403ErrorException) .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.', FleetmanagementV1UserLoggedinuser404ErrorException) .local_error('500', 'The server encountered an unexpected condition the prevented'\ ' it from fulfilling the request.', FleetmanagementV1UserLoggedinuser500ErrorException)) .execute end |
#payers(apikey, request_id, body: nil) ⇒ PayerResponse
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. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. body
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 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 83 def payers(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/customer/payers', Server::SHELL) .header_param(new_parameter(apikey, key: 'apikey')) .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('BasicAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(PayerResponse.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\r\n error (e.g.,'\ ' malformed request syntax, invalid \r\n request message'\ ' framing, or deceptive request routing).", FleetmanagementV1CustomerPayers400ErrorException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'The server understood the request but refuses to authorize it'\ '.', APIException) .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.', FleetmanagementV1CustomerPayers404ErrorException) .local_error('500', 'The server encountered an unexpected condition the prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#updatecardgroup(apikey, request_id, body: nil) ⇒ UpdateCardGroupResponse
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 at Microservices after passing the basic validations. specific environment which needs to be passed by the client. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. customer card group
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 |
# File 'lib/shell_card_management_ap_is/controllers/customer_controller.rb', line 494 def updatecardgroup(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/customer/updatecardgroup', Server::SHELL) .header_param(new_parameter(apikey, key: 'apikey')) .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('BasicAuth'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(UpdateCardGroupResponse.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\r\n error (e.g.,'\ ' malformed request syntax, invalid \r\n request message'\ ' framing, or deceptive request routing).", APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'The server understood the request but refuses to authorize it'\ '.', APIException) .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.', APIException) .local_error('500', 'The server encountered an unexpected condition the prevented'\ ' it from fulfilling the request.', APIException)) .execute end |