Class: ShellCardManagementApIs::CardController
- Inherits:
-
BaseController
- Object
- BaseController
- ShellCardManagementApIs::CardController
- Defined in:
- lib/shell_card_management_ap_is/controllers/card_controller.rb
Overview
CardController
Constant Summary
Constants inherited from BaseController
Instance Attribute Summary
Attributes inherited from BaseController
Instance Method Summary collapse
-
#autorenew(request_id, body: nil) ⇒ AutoRenewCardResponse
This API allows to update the reissue indicator of a single card.
-
#card_move(apikey, request_id, body: nil) ⇒ CardMoveResponse
This API allows to move one or more fuel cards (up to 500) across card groups within a single account or across accounts under the same payer.
-
#cardcancel(request_id, body: nil) ⇒ CancelCardResponse
This API allows cancelling one or multiple cards (up to 500) within a single API call.
-
#carddetails(apikey, request_id, body: nil) ⇒ CardDetailsResponse
This API allows to fetch details of a single fuel card from the Shell Card Platform.
-
#cardordercard(request_id, body: nil) ⇒ OrderCardResponse
This API allows ordering one or more fuel cards (up to 50).
-
#cardordercardenquiry(request_id, body: nil) ⇒ OrderCardEnquiryResponse
This API retrieves the card order status from the Shell Card Platform based on the given reference numbers.
-
#cardpinreminder(request_id, body: nil) ⇒ PINReminderResponse
This API allows requesting a PIN reminder for a fuel card.
-
#cardsummary(request_id, body: nil) ⇒ CardSummaryResponse
This API allows to search for fuel cards in the Shell Card Platform and returns a high-level summary count.
-
#cardupdatestatus(request_id, body: nil) ⇒ UpdateCardStatusResponse
This API allows updating of the card status for one or more cards (up to 500) within a single API call.
-
#deliveryaddressupdate(apikey, body: nil) ⇒ DeliveryAddressUpdateResponse
This API allows users to update the card’s delivery addresses (card delivery address used for card re-issue and PIN delivery address used when PIN reminder is requested) #### Supported operations * card delivery address update specific environment which needs to be passed by the client.
-
#getkey(request_id, fleet: nil) ⇒ GeneratePINKeyResponse
Get a new public key that will be used to encrypt data for selected PIN process when ordering new Shell Card.
-
#purchase_category(apikey, request_id, body: nil) ⇒ PurchaseCategoryResponse
This API will allow querying the purchase categories of Card for the given country and/or card type.
-
#schedule_card_block(request_id, body: nil) ⇒ ScheduleCardBlockResponse
This API allows scheduling Card Block / Unblock requests for one or multiple cards (up to 500 (configurable)) within a single API call.
-
#searchcard(request_id, body: nil) ⇒ CardSearchResponse
This API allows to search for Shell Cards in the Shell Card Platform.
-
#updatemobilepaymentregistrationstatus(request_id, body: nil) ⇒ UpdateMPayRegStatusResponse
This operation allows update the approval status of Mobile Payment Registration requests requiring for Fleet Manager approval.
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
#autorenew(request_id, body: nil) ⇒ AutoRenewCardResponse
This API allows to update the reissue indicator of a single card. If the API call succeeds, the API will return a reference number for tracking purposes and queue the request for asynchronous processing. #### Supported operations
* Update the reissue indicator of a card to enable auto renewal
* Update the reissue indicator of a card to disable auto renewal
#### Validation rules
* Card status must be either Active, Temporary Block (Customer),
Temporary Block (Shell) or Pending Renewal, otherwise an error code 9016 is returned
#### API response
* Returns a reference number for the API request
(AutoRenewReference) #### Asynchronous processing of valid API request
* If the provided card is superseded i.e. a replacement/new card is
already issued, then the latest card’s reissue indicator should be updated in the Shell Card Platform.
* Providing a **PAN** request paramter may result in multiple fuel cards
being located in the Shell Card Platform. The card details of the most recently issued card will be considered. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. body
852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 852 def autorenew(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/card-management/v1/autorenew', 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(AutoRenewCardResponse.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).', APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'Forbidden', 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 that prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#card_move(apikey, request_id, body: nil) ⇒ CardMoveResponse
This API allows to move one or more fuel cards (up to 500) across card groups within a single account or across accounts under the same payer. If the API call succeeds, the API will return a reference number and queue the request for asynchronous processing. #### Supported operations
* Moving card to exisitng card group
* Moving card to new card group
* Removing a card from a card group
#### Validation rules
* Number of cards per request does not exceed 500
* Given **PAN** for a card matches with only one card
* A card is allowed to be moved to the **TargetCardGroupId** or
TargetAccountNumber
* A pending move request does not exist in the queue for a card
submitted on the same date (customers local)
* A card has not been moved as part of a previous request on the same
date (customers local) #### API response
* A main reference number for the API request
(MoveCardRequestReference)
* Individual reference numbers (**MoveCardReference**) for each card
move request that passes validation
* A list of cards (**ErrorCards**) that failed validation along with the
appropriate error code and message #### Asynchronous processing of valid API request
* Move card requests that have been submitted and processed will be
reflected after midnight according to the customers local date 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.
623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 623 def card_move(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/card/move', 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('BearerToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(CardMoveResponse.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 |
#cardcancel(request_id, body: nil) ⇒ CancelCardResponse
This API allows cancelling one or multiple cards (up to 500) within a single API call. This API allows updating of
the card to the following status-
-
Block (Cancelled)
#### New version updates
* Oauth authentication to access the API
* Change in the request body
* PIN delivery address details have been added along with Email and
Phone number for card and PIN delivery. Requests that passed the below validations are queued-
* All Mandatory fields are passed.
* Card is present in the Shell Card Platform.
* Only one matching card is available in the cards platform for the
given PAN and expiry date for Block requests.
* Card is allowed to be moved to proposed state as per the card status
transition configuration in cards platform.
* A valid Reason Id or Reason Text is provided. The reason for card
cancellation can be “Damaged” or “NoLongerRequired”.
* For the given card, there is no Cancel request already submitted via
this API and is being processed.
* ‘IsReplacementChargeable’ is set to ‘False’ only to the configured
customer, other customers need to set it as ‘True’ only. If other customers pass this value as ‘False’.
Note- Shell Card Platform will maintain the list of customers, to whom
‘IsReplacementChargeable’ can be set as ‘False’. If all validations are passed, the request will be accepted and the API will return reference numbers for tracking purpose. If any of the validations fail, the API will return the appropriate error details on response. The API response will include-
* A main reference number for the API request.
* A list of successfully validated and accepted cards along with the
individual reference numbers for each of the successful requests.
* A list of cards for which at least validation has failed along with
the appropriate error code and details.
A permanent block (cancelled) request for the card will be queued in
Shell Card Platform after the configured damaged card active period (configured as number of days).
When a card is requested to be Blocked permanently (cancelled) for which
a request has already been submitted to report as Damaged and the damaged card active period is not yet completed, the damaged card request will be marked as superseded and the new Block (cancelled) request will be processed. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. status request body
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 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 320 def cardcancel(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/card-management/v1/cancel', 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(CancelCardResponse.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.', APIException) .local_error('403', 'Forbidden', 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 that prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#carddetails(apikey, request_id, body: nil) ⇒ CardDetailsResponse
This API allows to fetch details of a single fuel card from the Shell Card Platform. If a CardId request parameter is provided, this will return a single card. If a PAN request parameter is provided, this may result in multiple fuel cards matching the search criteria. The card details of the most recently issued card will be returned.
#### Supported operations
* Get card by card id or PAN
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
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 545 def carddetails(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/card/card', 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('BearerToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(CardDetailsResponse.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 |
#cardordercard(request_id, body: nil) ⇒ OrderCardResponse
This API allows ordering one or more fuel cards (up to 50). If the API call succeeds, the API will return a reference number and queue the request for asynchronous processing. #### New version updates
* Oauth authentication to access the API
* New parameters have been added in the response for the new PIN
management changes. Below parameters needs to be derived from the new PIN encryption method explained in our Mobility Card PIN Management product.
* SelfSelectedEncryptedPIN
* SelfSelectedPINKeyID
* SelfSelectedPINSessionKey
* New parameters have been added in the response for card and pin
delivery mechanism which gives the opportunity to deliver card & pin by email, SMS or post.
Also the possibility to deliver card and pin to different address if
the use case demands.
* CardDeliveryType
* PINDeliveryAddressType
* PINAdviceType
* PINContact
* CardContact
#### Supported operations
* Order one or more cards (up to 50)
* Order card with self selected PIN
* Order card with vehicle registration number
* Order card and add to new or exisitng card group
* Order card and enable fleetId or odemeter input
* Order card and specify product groups
#### Validation rules
-
Number of cards per request does not exceed 50
#### API response
-
A main reference number for the API request (OrderReference)
-
Individual reference numbers (OrderCardReference) for each new card
to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. card request body
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 211 212 213 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 175 def cardordercard(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/card-management/v1/ordercard', 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(OrderCardResponse.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).', APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'Forbidden', 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 that prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#cardordercardenquiry(request_id, body: nil) ⇒ OrderCardEnquiryResponse
This API retrieves the card order status from the Shell Card Platform based on the given reference numbers.
#### New version updates
* Oauth authentication to access the API
* Minor change in response structure with addition of Status parameter
#### Supported operations
* Get order status by Bulk Card Order Reference
* Get order status by Order Reference (main reference for the order)
* Get order status by Card Reference (individual card reference
belonging to an order reference) to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. Enquiry request body
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 262 263 264 265 266 267 268 269 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 231 def cardordercardenquiry(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/card-management/v1/ordercardenquiry', 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(OrderCardEnquiryResponse.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).', APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'Forbidden', 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 that prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#cardpinreminder(request_id, body: nil) ⇒ PINReminderResponse
This API allows requesting a PIN reminder for a fuel card. If the API call succeeds, the API will return a reference number and queue the request for asynchronous processing. #### New version updates
* Oauth authentication to access the API
* Change in request body where PIN delivery type can be requested via
Email, SMS or Post. PIN delivery contact can be set to different values based on previous contact details of card or pin delivery or can set specific contact details for this request.
* PINAdviceType
* PINContactType
* PINDeliverTo
* Please note that we have a **savePINReminder** parameter in order to
save the contact details for future such requests.
* Change in response body where Card details are also provided along
with expiry date and PAN details. #### Supported operations
* Request a pin reminder by card Id or PAN
#### Validation rules
* Given **PAN** or **CardId** is active
* Given **PAN** matches only one active card
* Requested card has PIN
* There is no pending PIN Reminder request in the queue awaiting to be
processed for the card
* A PIN reminder request has not been successfully processed in the last
48 hours for the card to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. reminder request body
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 698 def cardpinreminder(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/card-management/v1/pinreminder', 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(PINReminderResponse.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 |
#cardsummary(request_id, body: nil) ⇒ CardSummaryResponse
This API allows to search for fuel cards in the Shell Card Platform and returns a high-level summary count. It provides flexible search criteria. #### New version updates
* Oauth authentication to access the API
* Minor change in response structure with addition of Status parameter
#### Supported operations
* Search cards by card id or PAN
* Search cards by card status
* Search cards by excluding card status
* Search cards by date fields
* Search cards by embossed fields
* Search cards by card configuration fields
* Search cards by included/excluded list of cards
to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. body
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 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 96 def cardsummary(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/card-management/v1/summary', 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(CardSummaryResponse.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.', APIException) .local_error('403', 'Forbidden', 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 that prevented'\ ' it from fulfilling the request.', ErrorObjectException)) .execute end |
#cardupdatestatus(request_id, body: nil) ⇒ UpdateCardStatusResponse
This API allows updating of the card status for one or more cards (up to 500) within a single API call. If the API call succeeds, the API will return a reference number and queue the request for asynchronous processing. #### New version updates
* Oauth authentication to access the API
* Change in the request body
* Pin change related parameters - SelfSelectedEncryptedPIN,
SelfSelectedPINKeyID, SelfSelectedPINSessionKey
* PIN delivery address details have been added along with Email and
Phone number for card and PIN delivery.
* SaveForPINReminder - The given address will be used for sending PIN
reminders in future when requested.
* SaveForCardReissue - If this is specified, the contact address will
be saved in cards platform for card reissue processing. #### Supported operations
* Updating a card status to Temporary block, Unblock, Block (Cancelled)
or Damaged
* Requesting a replacement card when status is set to Block or Damaged
#### Validation rules
* Number of cards per request does not exceed 500
* A card can be changed to proposed status as per the card status
transition configuration in the Shell Card Platform
* Locating a card -
* If target status set to **TemporaryBlock**, then only one matching
active card should exist in the Shell Card Platform for the given PAN and CardExpiryDate
* If target status set to **Unblock** or **Block**, then only one
matching card should exist in the Shell Card Platform for the given PAN and CardExpiryDate
* A valid Reason Id or Reason Text is provided
* If target status set to **Block** or **Damaged** and a
ReasonText is provided, the value must be from the fixed list - *‘Lost’*, *‘Stolen’* or *‘Card no longer required’*
* For the given card, there is no Status Update request already
submitted via this API and is being processed
* The **OrderReplacementCard** field is set to True only for cards with
a target status set to Block or Damaged #### API response
* A main reference number for the API request
(OrderReplacementReference)
* A list of successfully validated and accepted cards along with the
individual reference numbers (UpdateCardReference) for each of the successful request
* A list of cards (**ErrorCards**) that failed validation along with the
appropriate error code and message #### Asynchronous processing of valid API request
* Replacement cards
* Request for a replacement card will be placed only when the Block
card or Block damaged card request is successfully placed.
* The Replacement card request will be processed only when the
permanent Block card request is successfully processed. In case of damaged card request, the replacement card request will be processed immediately.
* Damaged cards
* Setting a card to Damaged will automatically trigger a request to
permanently block the card. This will only take effect once the ‘Damaged Active’ period has passed.
* The Damaged card active period is the number of days after which a
“Damaged” card request will be processed. This value is configured at ColCo level.
* If a card is reported as damaged at 10pm local time on 1st Nov and
the damaged card period is set to 10 days, then the block request will be submitted to the Shell Card Platform on 11th Nov 00-01 local time.
* If during the damage card active period another request is made to
set the card to Temporarily Blocked or Blocked permanently (cancelled), then the damaged card request will be marked as superseded and the new Temporary Block or Block (cancelled) will be processed. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. Update status request body
433 434 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 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 433 def cardupdatestatus(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/card-management/v1/updatestatus', 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(UpdateCardStatusResponse.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).', APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'Forbidden', 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 that prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#deliveryaddressupdate(apikey, body: nil) ⇒ DeliveryAddressUpdateResponse
This API allows users to update the card’s delivery addresses (card delivery address used for card re-issue and PIN delivery address used when PIN reminder is requested) #### Supported operations
* card delivery address update
specific environment which needs to be passed by the client. Address Update Request Body
1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 1006 def deliveryaddressupdate(apikey, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/card/deliveryaddressupdate', Server::SHELL) .header_param(new_parameter(apikey, key: 'apikey')) .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(DeliveryAddressUpdateResponse.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 |
#getkey(request_id, fleet: nil) ⇒ GeneratePINKeyResponse
Get a new public key that will be used to encrypt data for selected PIN process when ordering new Shell Card. This encrypted data is used for further processing. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. key will be used a long time for multiple files this parameter will be true. If the parameter is true then public Key will be valid for 90 days. If the parameter is false then the key will be valid for one time. default value will be false.
957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 957 def getkey(request_id, fleet: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::GET, '/pin-management/v1/generatepinkeys', Server::SHELL) .header_param(new_parameter(request_id, key: 'RequestId')) .query_param(new_parameter(fleet, key: 'fleet')) .header_param(new_parameter('application/json', key: 'accept')) .auth(Single.new('BearerToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(GeneratePINKeyResponse.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 |
#purchase_category(apikey, request_id, body: nil) ⇒ PurchaseCategoryResponse
This API will allow querying the purchase categories of Card
for the given country and/or card type.
It will also include the below data associated with each of the purchase
categories on it’s response.
* List of fuel and non-fuel product sets associated.
* List of products configured in each product set
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
487 488 489 490 491 492 493 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 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 487 def purchase_category(apikey, request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/fleetmanagement/v1/master/purchasecategory', 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('BearerToken'))) .response(new_response_handler .deserializer(APIHelper.method(:custom_type_deserializer)) .deserialize_into(PurchaseCategoryResponse.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 |
#schedule_card_block(request_id, body: nil) ⇒ ScheduleCardBlockResponse
This API allows scheduling Card Block / Unblock requests for one or multiple cards (up to 500 (configurable)) within a single API call. This API is used to perform the following Actions: >
* AddOrUpdate (Schedule a new request or update an existing
scheduled request for the overlapping period.
* AddAndOverwriteAll (all the existing requests of the given card will
be removed and a new request with the specified FromDate and ToDate will be added.)
* Delete (Deletes the scheduled request for the same From and To date)
* DeleteAll (Deletes all the scheduled requests for the given card)
> Requests that passed the below validations are queue:
-
All Mandatory fields are passed in the request.
-
Card is present in the Shell Card Platform. Only one matching card is
available in the cards platform for the given PAN and expiry date for the requests
-
The scheduled period start date or end date should be later than or
equal to the current date. > If all validations are passed, the request will be accepted and saved in the intermediate queue and the API will return reference numbers for tracking purpose. > A background service will execute the block/unblock requests on a daily basis, based on the scheduled block or unblock date.
* The newly added block/unblock request will have a status ‘A’ when it
is yet to be moved to the actual queue.
* When the request is moved to the actual queue table, the status will
be updated as ‘P’ if the request has a value for ‘ToDate’, else, the status will be updated as ‘S’ or ‘F’ based on whether the request has been successfully moved to the actual queue table or if an error is encountered during processing.
* When the unblock request is moved to the actual queue table, the
status of the request will be changed from ‘P’ to ‘S’ or ‘F’ based on whether the request has been successfully moved to the actual queue table or if an error has occurred during processing. > If any of the validations fail, the API will return the appropriate error details in the response. > The API response will include:
* An error entity holding the details of any error encountered.
* A list of submitted cards along with the individual reference numbers
for each of the request. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request.
785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 785 def schedule_card_block(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/card-management/v1/schedulecardblock', 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(ScheduleCardBlockResponse.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).', APIException) .local_error('401', 'The request has not been applied because it lacks valid '\ ' authentication credentials for the target resource.', APIException) .local_error('403', 'Forbidden', 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 that prevented'\ ' it from fulfilling the request.', APIException)) .execute end |
#searchcard(request_id, body: nil) ⇒ CardSearchResponse
This API allows to search for Shell Cards in the Shell Card Platform. It provides flexible search criteria and supports paging. #### New version updates
* Oauth authentication to access the API
* New parameters have been added in the response. Below are the list of
parameters added
* IsEMVContact
* IsEMVContactless
* IsRFID
* RFIDUID
* EMAID
* EVPrintedNumber
* CardMediaCode
#### Supported operations
* Search cards by card id or PAN
* Search cards by card status
* Search cards by excluding card status
* Search cards by date fields
* Search cards by embossed fields
* Search cards by card configuration fields
* Search cards by included/excluded list of cards
* Search cards by excluding card bundle Id
to RFC 4122 standards) for requests and responses. This will be played back in the response from the request.
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 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 36 def searchcard(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/card-management/v1/search', 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(CardSearchResponse.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 |
#updatemobilepaymentregistrationstatus(request_id, body: nil) ⇒ UpdateMPayRegStatusResponse
This operation allows update the approval status of Mobile Payment Registration requests requiring for Fleet Manager approval. If the approval status is:
-
“Approved” then the request status will be changed to Pending for
processing.
-
“Rejected” then status will be updated to “CI” (Failed) with
appropriate error message. to RFC 4122 standards) for requests and responses. This will be played back in the response from the request. body
905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 |
# File 'lib/shell_card_management_ap_is/controllers/card_controller.rb', line 905 def updatemobilepaymentregistrationstatus(request_id, body: nil) new_api_call_builder .request(new_request_builder(HttpMethodEnum::POST, '/card-management/v1/updatemobilepaymentregistrationstatus', 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(UpdateMPayRegStatusResponse.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.', APIException) .local_error('403', 'Forbidden', 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 that prevented'\ ' it from fulfilling the request.', APIException)) .execute end |