card-management-sdk 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (198) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +88 -0
  4. data/lib/shell_card_management_ap_is/api_helper.rb +10 -0
  5. data/lib/shell_card_management_ap_is/client.rb +85 -0
  6. data/lib/shell_card_management_ap_is/configuration.rb +117 -0
  7. data/lib/shell_card_management_ap_is/controllers/base_controller.rb +66 -0
  8. data/lib/shell_card_management_ap_is/controllers/card_controller.rb +1047 -0
  9. data/lib/shell_card_management_ap_is/controllers/customer_controller.rb +538 -0
  10. data/lib/shell_card_management_ap_is/controllers/o_auth_authorization_controller.rb +42 -0
  11. data/lib/shell_card_management_ap_is/controllers/restriction_controller.rb +496 -0
  12. data/lib/shell_card_management_ap_is/exceptions/api_exception.rb +10 -0
  13. data/lib/shell_card_management_ap_is/exceptions/default_error_exception.rb +32 -0
  14. data/lib/shell_card_management_ap_is/exceptions/error_object_exception.rb +54 -0
  15. data/lib/shell_card_management_ap_is/exceptions/error_user_access_error1_exception.rb +32 -0
  16. data/lib/shell_card_management_ap_is/exceptions/o_auth_provider_exception.rb +48 -0
  17. data/lib/shell_card_management_ap_is/http/auth/basic_auth.rb +50 -0
  18. data/lib/shell_card_management_ap_is/http/auth/bearer_token.rb +89 -0
  19. data/lib/shell_card_management_ap_is/http/http_call_back.rb +10 -0
  20. data/lib/shell_card_management_ap_is/http/http_method_enum.rb +10 -0
  21. data/lib/shell_card_management_ap_is/http/http_request.rb +10 -0
  22. data/lib/shell_card_management_ap_is/http/http_response.rb +10 -0
  23. data/lib/shell_card_management_ap_is/models/account_access.rb +128 -0
  24. data/lib/shell_card_management_ap_is/models/account_request.rb +252 -0
  25. data/lib/shell_card_management_ap_is/models/account_response.rb +111 -0
  26. data/lib/shell_card_management_ap_is/models/account_response_accounts_items.rb +750 -0
  27. data/lib/shell_card_management_ap_is/models/account_restriction_request.rb +131 -0
  28. data/lib/shell_card_management_ap_is/models/account_restriction_response.rb +60 -0
  29. data/lib/shell_card_management_ap_is/models/account_velocity_limit.rb +145 -0
  30. data/lib/shell_card_management_ap_is/models/accounts.rb +65 -0
  31. data/lib/shell_card_management_ap_is/models/address.rb +174 -0
  32. data/lib/shell_card_management_ap_is/models/audit_request.rb +256 -0
  33. data/lib/shell_card_management_ap_is/models/audit_response.rb +111 -0
  34. data/lib/shell_card_management_ap_is/models/audit_response_audits_items.rb +450 -0
  35. data/lib/shell_card_management_ap_is/models/auto_renew_card_request.rb +111 -0
  36. data/lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb +98 -0
  37. data/lib/shell_card_management_ap_is/models/auto_renew_card_response.rb +92 -0
  38. data/lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb +64 -0
  39. data/lib/shell_card_management_ap_is/models/bank_account.rb +192 -0
  40. data/lib/shell_card_management_ap_is/models/base_model.rb +62 -0
  41. data/lib/shell_card_management_ap_is/models/bundle_restriction.rb +166 -0
  42. data/lib/shell_card_management_ap_is/models/cancel_card_request.rb +107 -0
  43. data/lib/shell_card_management_ap_is/models/cancel_card_response.rb +127 -0
  44. data/lib/shell_card_management_ap_is/models/card.rb +696 -0
  45. data/lib/shell_card_management_ap_is/models/card_block_schedule.rb +65 -0
  46. data/lib/shell_card_management_ap_is/models/card_day_time_restrictions.rb +159 -0
  47. data/lib/shell_card_management_ap_is/models/card_delivery_contact.rb +230 -0
  48. data/lib/shell_card_management_ap_is/models/card_detail.rb +661 -0
  49. data/lib/shell_card_management_ap_is/models/card_detail_auto_renew_enum.rb +28 -0
  50. data/lib/shell_card_management_ap_is/models/card_details_request.rb +260 -0
  51. data/lib/shell_card_management_ap_is/models/card_details_response.rb +1058 -0
  52. data/lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb +60 -0
  53. data/lib/shell_card_management_ap_is/models/card_details_response_card_delivery_address.rb +227 -0
  54. data/lib/shell_card_management_ap_is/models/card_details_response_fuel_sets_items.rb +58 -0
  55. data/lib/shell_card_management_ap_is/models/card_details_response_international_pos_language_code_enum.rb +118 -0
  56. data/lib/shell_card_management_ap_is/models/card_details_response_international_pos_language_id_enum.rb +118 -0
  57. data/lib/shell_card_management_ap_is/models/card_details_response_local_pos_language_code_enum.rb +118 -0
  58. data/lib/shell_card_management_ap_is/models/card_details_response_local_pos_language_id_enum.rb +118 -0
  59. data/lib/shell_card_management_ap_is/models/card_details_response_non_fuel_sets_items.rb +58 -0
  60. data/lib/shell_card_management_ap_is/models/card_details_response_pin_delivery_address.rb +231 -0
  61. data/lib/shell_card_management_ap_is/models/card_details_response_pin_type_enum.rb +23 -0
  62. data/lib/shell_card_management_ap_is/models/card_details_response_reissue_setting_enum.rb +26 -0
  63. data/lib/shell_card_management_ap_is/models/card_details_response_renewed_card_reissue_setting_enum.rb +25 -0
  64. data/lib/shell_card_management_ap_is/models/card_details_response_status_id_enum.rb +83 -0
  65. data/lib/shell_card_management_ap_is/models/card_group_request.rb +178 -0
  66. data/lib/shell_card_management_ap_is/models/card_group_response.rb +109 -0
  67. data/lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb +301 -0
  68. data/lib/shell_card_management_ap_is/models/card_move_request.rb +163 -0
  69. data/lib/shell_card_management_ap_is/models/card_move_request_cards_items.rb +80 -0
  70. data/lib/shell_card_management_ap_is/models/card_move_response.rb +112 -0
  71. data/lib/shell_card_management_ap_is/models/card_move_response_error_cards_items.rb +112 -0
  72. data/lib/shell_card_management_ap_is/models/card_move_response_successful_requests_items.rb +97 -0
  73. data/lib/shell_card_management_ap_is/models/card_search_response.rb +126 -0
  74. data/lib/shell_card_management_ap_is/models/card_summary_request.rb +52 -0
  75. data/lib/shell_card_management_ap_is/models/card_summary_response.rb +82 -0
  76. data/lib/shell_card_management_ap_is/models/card_type_request.rb +145 -0
  77. data/lib/shell_card_management_ap_is/models/card_type_response.rb +79 -0
  78. data/lib/shell_card_management_ap_is/models/card_type_response_customer_card_types_items.rb +470 -0
  79. data/lib/shell_card_management_ap_is/models/card_type_response_error.rb +60 -0
  80. data/lib/shell_card_management_ap_is/models/card_usage_restrictions.rb +281 -0
  81. data/lib/shell_card_management_ap_is/models/col_co_access.rb +88 -0
  82. data/lib/shell_card_management_ap_is/models/create_bundle_request.rb +167 -0
  83. data/lib/shell_card_management_ap_is/models/create_bundle_request_restrictions.rb +147 -0
  84. data/lib/shell_card_management_ap_is/models/create_bundle_response.rb +98 -0
  85. data/lib/shell_card_management_ap_is/models/create_bundle_response_data_items.rb +125 -0
  86. data/lib/shell_card_management_ap_is/models/create_bundle_response_data_items_cards_items.rb +50 -0
  87. data/lib/shell_card_management_ap_is/models/create_card_group_request.rb +161 -0
  88. data/lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb +84 -0
  89. data/lib/shell_card_management_ap_is/models/create_card_group_response.rb +130 -0
  90. data/lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb +81 -0
  91. data/lib/shell_card_management_ap_is/models/create_card_group_response_successful_requests_items.rb +71 -0
  92. data/lib/shell_card_management_ap_is/models/create_card_response.rb +65 -0
  93. data/lib/shell_card_management_ap_is/models/customer_contract.rb +63 -0
  94. data/lib/shell_card_management_ap_is/models/customer_detail_request.rb +123 -0
  95. data/lib/shell_card_management_ap_is/models/customer_detail_response.rb +437 -0
  96. data/lib/shell_card_management_ap_is/models/day_time_restrictions.rb +162 -0
  97. data/lib/shell_card_management_ap_is/models/default_error_fault.rb +60 -0
  98. data/lib/shell_card_management_ap_is/models/default_error_fault_detail.rb +50 -0
  99. data/lib/shell_card_management_ap_is/models/delete_bundle_request.rb +126 -0
  100. data/lib/shell_card_management_ap_is/models/delete_bundle_response.rb +60 -0
  101. data/lib/shell_card_management_ap_is/models/delivery_address_update.rb +112 -0
  102. data/lib/shell_card_management_ap_is/models/delivery_address_update_references.rb +102 -0
  103. data/lib/shell_card_management_ap_is/models/delivery_address_update_request.rb +129 -0
  104. data/lib/shell_card_management_ap_is/models/delivery_address_update_response.rb +94 -0
  105. data/lib/shell_card_management_ap_is/models/delivery_addresses.rb +258 -0
  106. data/lib/shell_card_management_ap_is/models/eid_access.rb +75 -0
  107. data/lib/shell_card_management_ap_is/models/error_details.rb +81 -0
  108. data/lib/shell_card_management_ap_is/models/error_status.rb +60 -0
  109. data/lib/shell_card_management_ap_is/models/error_user_access.rb +50 -0
  110. data/lib/shell_card_management_ap_is/models/error_user_access_error.rb +60 -0
  111. data/lib/shell_card_management_ap_is/models/finance_currency.rb +98 -0
  112. data/lib/shell_card_management_ap_is/models/generate_pin_key_response.rb +60 -0
  113. data/lib/shell_card_management_ap_is/models/invoice_distribution_method.rb +99 -0
  114. data/lib/shell_card_management_ap_is/models/location_restrictions.rb +125 -0
  115. data/lib/shell_card_management_ap_is/models/location_restrictions_country_restrictions.rb +65 -0
  116. data/lib/shell_card_management_ap_is/models/location_restrictions_network_restrictions_items.rb +77 -0
  117. data/lib/shell_card_management_ap_is/models/location_restrictions_partner_site_restrictions_items.rb +95 -0
  118. data/lib/shell_card_management_ap_is/models/location_restrictions_shell_site_restrictions_items.rb +95 -0
  119. data/lib/shell_card_management_ap_is/models/logged_in_user_request.rb +107 -0
  120. data/lib/shell_card_management_ap_is/models/logged_in_user_response.rb +394 -0
  121. data/lib/shell_card_management_ap_is/models/o_auth_provider_error_enum.rb +45 -0
  122. data/lib/shell_card_management_ap_is/models/o_auth_token.rb +100 -0
  123. data/lib/shell_card_management_ap_is/models/order_card_enquiry.rb +502 -0
  124. data/lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb +208 -0
  125. data/lib/shell_card_management_ap_is/models/order_card_enquiry_req_reference_type_enum.rb +32 -0
  126. data/lib/shell_card_management_ap_is/models/order_card_enquiry_request.rb +51 -0
  127. data/lib/shell_card_management_ap_is/models/order_card_enquiry_response.rb +79 -0
  128. data/lib/shell_card_management_ap_is/models/order_card_request.rb +60 -0
  129. data/lib/shell_card_management_ap_is/models/order_card_response.rb +90 -0
  130. data/lib/shell_card_management_ap_is/models/payer_access.rb +147 -0
  131. data/lib/shell_card_management_ap_is/models/payer_details.rb +1412 -0
  132. data/lib/shell_card_management_ap_is/models/payer_request.rb +126 -0
  133. data/lib/shell_card_management_ap_is/models/payer_response.rb +115 -0
  134. data/lib/shell_card_management_ap_is/models/payers.rb +109 -0
  135. data/lib/shell_card_management_ap_is/models/pin_advice_types.rb +80 -0
  136. data/lib/shell_card_management_ap_is/models/pin_delivery_contact.rb +242 -0
  137. data/lib/shell_card_management_ap_is/models/pin_delivery_details.rb +169 -0
  138. data/lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb +137 -0
  139. data/lib/shell_card_management_ap_is/models/pin_reminder_reference.rb +99 -0
  140. data/lib/shell_card_management_ap_is/models/pin_reminder_request.rb +135 -0
  141. data/lib/shell_card_management_ap_is/models/pin_reminder_response.rb +90 -0
  142. data/lib/shell_card_management_ap_is/models/product_all_of0.rb +62 -0
  143. data/lib/shell_card_management_ap_is/models/product_group.rb +116 -0
  144. data/lib/shell_card_management_ap_is/models/product_restrictions.rb +66 -0
  145. data/lib/shell_card_management_ap_is/models/purchase_categories.rb +114 -0
  146. data/lib/shell_card_management_ap_is/models/purchase_category1_all_of0.rb +140 -0
  147. data/lib/shell_card_management_ap_is/models/purchase_category_request.rb +114 -0
  148. data/lib/shell_card_management_ap_is/models/purchase_category_response.rb +69 -0
  149. data/lib/shell_card_management_ap_is/models/replace_card_settings.rb +641 -0
  150. data/lib/shell_card_management_ap_is/models/restriction_card_request.rb +115 -0
  151. data/lib/shell_card_management_ap_is/models/restriction_card_request_cards_items.rb +220 -0
  152. data/lib/shell_card_management_ap_is/models/restriction_card_response.rb +91 -0
  153. data/lib/shell_card_management_ap_is/models/restriction_card_response_data_items.rb +240 -0
  154. data/lib/shell_card_management_ap_is/models/restriction_search_card_request.rb +50 -0
  155. data/lib/shell_card_management_ap_is/models/restriction_search_card_request_filters.rb +177 -0
  156. data/lib/shell_card_management_ap_is/models/restriction_search_card_request_filters_cards_items.rb +63 -0
  157. data/lib/shell_card_management_ap_is/models/restriction_search_card_response.rb +79 -0
  158. data/lib/shell_card_management_ap_is/models/restriction_search_card_response_data_items.rb +514 -0
  159. data/lib/shell_card_management_ap_is/models/role.rb +102 -0
  160. data/lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb +249 -0
  161. data/lib/shell_card_management_ap_is/models/schedule_card_block_request.rb +77 -0
  162. data/lib/shell_card_management_ap_is/models/schedule_card_block_response.rb +91 -0
  163. data/lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb +89 -0
  164. data/lib/shell_card_management_ap_is/models/search_account_limit_request.rb +50 -0
  165. data/lib/shell_card_management_ap_is/models/search_account_limit_request_filters.rb +118 -0
  166. data/lib/shell_card_management_ap_is/models/search_account_limit_response.rb +70 -0
  167. data/lib/shell_card_management_ap_is/models/search_account_limit_response_data.rb +106 -0
  168. data/lib/shell_card_management_ap_is/models/search_card.rb +66 -0
  169. data/lib/shell_card_management_ap_is/models/search_card_request.rb +72 -0
  170. data/lib/shell_card_management_ap_is/models/search_card_response_restrictions.rb +99 -0
  171. data/lib/shell_card_management_ap_is/models/search_product_restriction.rb +78 -0
  172. data/lib/shell_card_management_ap_is/models/search_request.rb +724 -0
  173. data/lib/shell_card_management_ap_is/models/submitted_card.rb +183 -0
  174. data/lib/shell_card_management_ap_is/models/summary_of_bundle_request.rb +50 -0
  175. data/lib/shell_card_management_ap_is/models/summary_of_bundle_response.rb +79 -0
  176. data/lib/shell_card_management_ap_is/models/summary_of_bundle_response_data_items.rb +123 -0
  177. data/lib/shell_card_management_ap_is/models/summary_of_bundle_response_data_items_card_bundles_items.rb +86 -0
  178. data/lib/shell_card_management_ap_is/models/summary_request.rb +598 -0
  179. data/lib/shell_card_management_ap_is/models/summary_response.rb +184 -0
  180. data/lib/shell_card_management_ap_is/models/summaryof_bundle.rb +126 -0
  181. data/lib/shell_card_management_ap_is/models/update_bundle_request.rb +194 -0
  182. data/lib/shell_card_management_ap_is/models/update_bundle_response.rb +70 -0
  183. data/lib/shell_card_management_ap_is/models/update_card.rb +316 -0
  184. data/lib/shell_card_management_ap_is/models/update_card_group_request.rb +258 -0
  185. data/lib/shell_card_management_ap_is/models/update_card_group_response.rb +130 -0
  186. data/lib/shell_card_management_ap_is/models/update_card_group_response_move_card_references_items.rb +77 -0
  187. data/lib/shell_card_management_ap_is/models/update_card_renewal_address.rb +163 -0
  188. data/lib/shell_card_management_ap_is/models/update_card_status_request.rb +124 -0
  189. data/lib/shell_card_management_ap_is/models/update_card_status_response.rb +133 -0
  190. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request.rb +112 -0
  191. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb +105 -0
  192. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_response.rb +60 -0
  193. data/lib/shell_card_management_ap_is/models/url_enum.rb +23 -0
  194. data/lib/shell_card_management_ap_is/models/usage_restrictions.rb +311 -0
  195. data/lib/shell_card_management_ap_is/utilities/date_time_helper.rb +11 -0
  196. data/lib/shell_card_management_ap_is/utilities/file_wrapper.rb +16 -0
  197. data/lib/shell_card_management_ap_is.rb +288 -0
  198. metadata +283 -0
@@ -0,0 +1,1047 @@
1
+ # shell_card_management_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellCardManagementApIs
7
+ # CardController
8
+ class CardController < BaseController
9
+ # This API allows to search for Shell Cards in the Shell Card Platform. It
10
+ # provides flexible search criteria and supports paging.
11
+ # #### New version updates
12
+ # * Oauth authentication to access the API
13
+ # * New parameters have been added in the response. Below are the list of
14
+ # parameters added
15
+ # * IsEMVContact
16
+ # * IsEMVContactless
17
+ # * IsRFID
18
+ # * RFIDUID
19
+ # * EMAID
20
+ # * EVPrintedNumber
21
+ # * CardMediaCode
22
+ # #### Supported operations
23
+ # * Search cards by card id or PAN
24
+ # * Search cards by card status
25
+ # * Search cards by excluding card status
26
+ # * Search cards by date fields
27
+ # * Search cards by embossed fields
28
+ # * Search cards by card configuration fields
29
+ # * Search cards by included/excluded list of cards
30
+ # * Search cards by excluding card bundle Id
31
+ # @param [String] request_id Required parameter: Mandatory UUID (according
32
+ # to RFC 4122 standards) for requests and responses. This will be played
33
+ # back in the response from the request.
34
+ # @param [SearchCardRequest] body Optional parameter: requestbody
35
+ # @return [CardSearchResponse] response from the API call
36
+ def search_card(request_id,
37
+ body: nil)
38
+ new_api_call_builder
39
+ .request(new_request_builder(HttpMethodEnum::POST,
40
+ '/card-management/v1/search',
41
+ Server::DEFAULT)
42
+ .header_param(new_parameter(request_id, key: 'RequestId'))
43
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
44
+ .body_param(new_parameter(body))
45
+ .header_param(new_parameter('application/json', key: 'accept'))
46
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
47
+ .auth(Single.new('BearerToken')))
48
+ .response(new_response_handler
49
+ .deserializer(APIHelper.method(:custom_type_deserializer))
50
+ .deserialize_into(CardSearchResponse.method(:from_hash))
51
+ .local_error('400',
52
+ "The server cannot or will not process the request due to'\
53
+ ' something that is perceived to be a client error (e.g.,'\
54
+ ' malformed request syntax, invalid request message framing, or'\
55
+ ' deceptive request routing).\n",
56
+ ErrorObjectException)
57
+ .local_error('401',
58
+ "The request has not been applied because it lacks valid '\
59
+ ' authentication credentials for the target resource.\n",
60
+ ErrorObjectException)
61
+ .local_error('403',
62
+ 'Forbidden',
63
+ ErrorObjectException)
64
+ .local_error('404',
65
+ "The origin server did not find a current representation for'\
66
+ ' the target resource or is not willing to disclose that one'\
67
+ ' exists.\n",
68
+ ErrorObjectException)
69
+ .local_error('500',
70
+ "The server encountered an unexpected condition that prevented'\
71
+ ' it from fulfilling the request.\n",
72
+ ErrorObjectException))
73
+ .execute
74
+ end
75
+
76
+ # This API allows to search for fuel cards in the Shell Card Platform and
77
+ # returns a high-level summary count. It provides flexible search criteria.
78
+ # #### New version updates
79
+ # * Oauth authentication to access the API
80
+ # * Minor change in response structure with addition of Status parameter
81
+ #
82
+ # #### Supported operations
83
+ # * Search cards by card id or PAN
84
+ # * Search cards by card status
85
+ # * Search cards by excluding card status
86
+ # * Search cards by date fields
87
+ # * Search cards by embossed fields
88
+ # * Search cards by card configuration fields
89
+ # * Search cards by included/excluded list of cards
90
+ # @param [String] request_id Required parameter: Mandatory UUID (according
91
+ # to RFC 4122 standards) for requests and responses. This will be played
92
+ # back in the response from the request.
93
+ # @param [CardSummaryRequest] body Optional parameter: summary request
94
+ # body
95
+ # @return [CardSummaryResponse] response from the API call
96
+ def card_summary(request_id,
97
+ body: nil)
98
+ new_api_call_builder
99
+ .request(new_request_builder(HttpMethodEnum::POST,
100
+ '/card-management/v1/summary',
101
+ Server::DEFAULT)
102
+ .header_param(new_parameter(request_id, key: 'RequestId'))
103
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
104
+ .body_param(new_parameter(body))
105
+ .header_param(new_parameter('application/json', key: 'accept'))
106
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
107
+ .auth(Single.new('BearerToken')))
108
+ .response(new_response_handler
109
+ .deserializer(APIHelper.method(:custom_type_deserializer))
110
+ .deserialize_into(CardSummaryResponse.method(:from_hash))
111
+ .local_error('400',
112
+ "The server cannot or will not process the request due to'\
113
+ ' something that is perceived to be a client error (e.g.,'\
114
+ ' malformed request syntax, invalid request message framing, or'\
115
+ ' deceptive request routing).\n",
116
+ ErrorObjectException)
117
+ .local_error('401',
118
+ "The request has not been applied because it lacks valid '\
119
+ ' authentication credentials for the target resource.\n",
120
+ ErrorObjectException)
121
+ .local_error('403',
122
+ 'Forbidden',
123
+ ErrorObjectException)
124
+ .local_error('404',
125
+ "The origin server did not find a current representation for'\
126
+ ' the target resource or is not willing to disclose that one'\
127
+ ' exists.\n",
128
+ ErrorObjectException)
129
+ .local_error('500',
130
+ "The server encountered an unexpected condition that prevented'\
131
+ ' it from fulfilling the request.\n",
132
+ ErrorObjectException))
133
+ .execute
134
+ end
135
+
136
+ # This API allows ordering one or more fuel cards (up to 50). If the API
137
+ # call succeeds, the API will return a reference number and queue the
138
+ # request for asynchronous processing.
139
+ # #### New version updates
140
+ # * Oauth authentication to access the API
141
+ # * New parameters have been added in the response for the new PIN
142
+ # management changes. Below parameters needs to be derived from the new PIN
143
+ # encryption method explained in our Mobility Card PIN Management product.
144
+ # * SelfSelectedEncryptedPIN
145
+ # * SelfSelectedPINKeyID
146
+ # * SelfSelectedPINSessionKey
147
+ # * New parameters have been added in the response for card and pin
148
+ # delivery mechanism which gives the opportunity to deliver card & pin by
149
+ # email, SMS or post.
150
+ # Also the possibility to deliver card and pin to different address if
151
+ # the use case demands.
152
+ # * CardDeliveryType
153
+ # * PINDeliveryAddressType
154
+ # * PINAdviceType
155
+ # * PINContact
156
+ # * CardContact
157
+ # #### Supported operations
158
+ # * Order one or more cards (up to 50)
159
+ # * Order card with self selected PIN
160
+ # * Order card with vehicle registration number
161
+ # * Order card and add to new or exisitng card group
162
+ # * Order card and enable fleetId or odemeter input
163
+ # * Order card and specify product groups
164
+ # #### Validation rules
165
+ # * Number of cards per request does not exceed 50
166
+ # #### API response
167
+ # * A main reference number for the API request (**OrderReference**)
168
+ # * Individual reference numbers (**OrderCardReference**) for each new card
169
+ # @param [String] request_id Required parameter: Mandatory UUID (according
170
+ # to RFC 4122 standards) for requests and responses. This will be played
171
+ # back in the response from the request.
172
+ # @param [OrderCardRequest] body Optional parameter: Order card request
173
+ # body
174
+ # @return [OrderCardResponse] response from the API call
175
+ def order_card(request_id,
176
+ body: nil)
177
+ new_api_call_builder
178
+ .request(new_request_builder(HttpMethodEnum::POST,
179
+ '/card-management/v1/ordercard',
180
+ Server::DEFAULT)
181
+ .header_param(new_parameter(request_id, key: 'RequestId'))
182
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
183
+ .body_param(new_parameter(body))
184
+ .header_param(new_parameter('application/json', key: 'accept'))
185
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
186
+ .auth(Single.new('BearerToken')))
187
+ .response(new_response_handler
188
+ .deserializer(APIHelper.method(:custom_type_deserializer))
189
+ .deserialize_into(OrderCardResponse.method(:from_hash))
190
+ .local_error('400',
191
+ "The server cannot or will not process the request due to'\
192
+ ' something that is perceived to be a client error (e.g.,'\
193
+ ' malformed request syntax, invalid request message framing, or'\
194
+ ' deceptive request routing).\n",
195
+ ErrorObjectException)
196
+ .local_error('401',
197
+ "The request has not been applied because it lacks valid '\
198
+ ' authentication credentials for the target resource.\n",
199
+ ErrorObjectException)
200
+ .local_error('403',
201
+ 'Forbidden',
202
+ ErrorObjectException)
203
+ .local_error('404',
204
+ "The origin server did not find a current representation for'\
205
+ ' the target resource or is not willing to disclose that one'\
206
+ ' exists.\n",
207
+ ErrorObjectException)
208
+ .local_error('500',
209
+ "The server encountered an unexpected condition that prevented'\
210
+ ' it from fulfilling the request.\n",
211
+ ErrorObjectException))
212
+ .execute
213
+ end
214
+
215
+ # This API retrieves the card order status from the Shell Card Platform
216
+ # based on the given reference numbers.
217
+ # #### New version updates
218
+ # * Oauth authentication to access the API
219
+ # * Minor change in response structure with addition of Status parameter
220
+ # #### Supported operations
221
+ # * Get order status by Bulk Card Order Reference
222
+ # * Get order status by Order Reference (main reference for the order)
223
+ # * Get order status by Card Reference (individual card reference
224
+ # belonging to an order reference)
225
+ # @param [String] request_id Required parameter: Mandatory UUID (according
226
+ # to RFC 4122 standards) for requests and responses. This will be played
227
+ # back in the response from the request.
228
+ # @param [OrderCardEnquiryRequest] body Optional parameter: Order Card
229
+ # Enquiry request body
230
+ # @return [OrderCardEnquiryResponse] response from the API call
231
+ def order_card_enquiry(request_id,
232
+ body: nil)
233
+ new_api_call_builder
234
+ .request(new_request_builder(HttpMethodEnum::POST,
235
+ '/card-management/v1/ordercardenquiry',
236
+ Server::DEFAULT)
237
+ .header_param(new_parameter(request_id, key: 'RequestId'))
238
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
239
+ .body_param(new_parameter(body))
240
+ .header_param(new_parameter('application/json', key: 'accept'))
241
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
242
+ .auth(Single.new('BearerToken')))
243
+ .response(new_response_handler
244
+ .deserializer(APIHelper.method(:custom_type_deserializer))
245
+ .deserialize_into(OrderCardEnquiryResponse.method(:from_hash))
246
+ .local_error('400',
247
+ "The server cannot or will not process the request due to'\
248
+ ' something that is perceived to be a client error (e.g.,'\
249
+ ' malformed request syntax, invalid request message framing, or'\
250
+ ' deceptive request routing).\n",
251
+ ErrorObjectException)
252
+ .local_error('401',
253
+ "The request has not been applied because it lacks valid '\
254
+ ' authentication credentials for the target resource.\n",
255
+ ErrorObjectException)
256
+ .local_error('403',
257
+ 'Forbidden',
258
+ ErrorObjectException)
259
+ .local_error('404',
260
+ "The origin server did not find a current representation for'\
261
+ ' the target resource or is not willing to disclose that one'\
262
+ ' exists.\n",
263
+ ErrorObjectException)
264
+ .local_error('500',
265
+ "The server encountered an unexpected condition that prevented'\
266
+ ' it from fulfilling the request.\n",
267
+ ErrorObjectException))
268
+ .execute
269
+ end
270
+
271
+ # This API allows cancelling one or multiple cards (up to 500) within a
272
+ # single API call. This API allows updating of
273
+ # the card to the following status-
274
+ # * Block (Cancelled)
275
+ # #### New version updates
276
+ # * Oauth authentication to access the API
277
+ # * Change in the request body
278
+ # * PIN delivery address details have been added along with Email and
279
+ # Phone number for card and PIN delivery.
280
+ # Requests that passed the below validations are queued-
281
+ # * All Mandatory fields are passed.
282
+ # * Card is present in the Shell Card Platform.
283
+ # * Only one matching card is available in the cards platform for the
284
+ # given PAN and expiry date for Block requests.
285
+ # * Card is allowed to be moved to proposed state as per the card status
286
+ # transition configuration in cards platform.
287
+ # * A valid Reason Id or Reason Text is provided. The reason for card
288
+ # cancellation can be “Damaged” or “NoLongerRequired”.
289
+ # * For the given card, there is no Cancel request already submitted via
290
+ # this API and is being processed.
291
+ # * ‘IsReplacementChargeable’ is set to ‘False’ only to the configured
292
+ # customer, other customers need to set it as ‘True’ only. If other
293
+ # customers pass this value as ‘False’.
294
+ # Note- Shell Card Platform will maintain the list of customers, to whom
295
+ # ‘IsReplacementChargeable’ can be set as ‘False’.
296
+ # If all validations are passed, the request will be accepted and the API
297
+ # will return reference numbers for tracking purpose. If any of the
298
+ # validations fail, the API will return the appropriate error details on
299
+ # response. The API response will include-
300
+ # * A main reference number for the API request.
301
+ # * A list of successfully validated and accepted cards along with the
302
+ # individual reference numbers for each of the successful requests.
303
+ # * A list of cards for which at least validation has failed along with
304
+ # the appropriate error code and details.
305
+ # A permanent block (cancelled) request for the card will be queued in
306
+ # Shell Card Platform after the configured damaged card active period
307
+ # (configured as number of days).
308
+ #
309
+ # When a card is requested to be Blocked permanently (cancelled) for which
310
+ # a request has already been submitted to report as Damaged and the damaged
311
+ # card active period is not yet completed, the damaged card request will be
312
+ # marked as superseded and the new Block (cancelled) request will be
313
+ # processed.
314
+ # @param [String] request_id Required parameter: Mandatory UUID (according
315
+ # to RFC 4122 standards) for requests and responses. This will be played
316
+ # back in the response from the request.
317
+ # @param [CancelCardRequest] body Optional parameter: Update status request
318
+ # body
319
+ # @return [CancelCardResponse] response from the API call
320
+ def card_cancel(request_id,
321
+ body: nil)
322
+ new_api_call_builder
323
+ .request(new_request_builder(HttpMethodEnum::POST,
324
+ '/card-management/v1/cancel',
325
+ Server::DEFAULT)
326
+ .header_param(new_parameter(request_id, key: 'RequestId'))
327
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
328
+ .body_param(new_parameter(body))
329
+ .header_param(new_parameter('application/json', key: 'accept'))
330
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
331
+ .auth(Single.new('BearerToken')))
332
+ .response(new_response_handler
333
+ .deserializer(APIHelper.method(:custom_type_deserializer))
334
+ .deserialize_into(CancelCardResponse.method(:from_hash))
335
+ .local_error('400',
336
+ "The server cannot or will not process the request due to'\
337
+ ' something that is perceived to be a client error (e.g.,'\
338
+ ' malformed request syntax, invalid request message framing, or'\
339
+ ' deceptive request routing).\n",
340
+ ErrorObjectException)
341
+ .local_error('401',
342
+ "The request has not been applied because it lacks valid '\
343
+ ' authentication credentials for the target resource.\n",
344
+ ErrorObjectException)
345
+ .local_error('403',
346
+ 'Forbidden',
347
+ ErrorObjectException)
348
+ .local_error('404',
349
+ "The origin server did not find a current representation for'\
350
+ ' the target resource or is not willing to disclose that one'\
351
+ ' exists.\n",
352
+ ErrorObjectException)
353
+ .local_error('500',
354
+ "The server encountered an unexpected condition that prevented'\
355
+ ' it from fulfilling the request.\n",
356
+ ErrorObjectException))
357
+ .execute
358
+ end
359
+
360
+ # This API allows updating of the card status for one or more cards (up to
361
+ # 500) within a single API call. If the API call succeeds, the API will
362
+ # return a reference number and queue the request for asynchronous
363
+ # processing.
364
+ # #### New version updates
365
+ # * Oauth authentication to access the API
366
+ # * Change in the request body
367
+ # * Pin change related parameters - SelfSelectedEncryptedPIN,
368
+ # SelfSelectedPINKeyID, SelfSelectedPINSessionKey
369
+ # * PIN delivery address details have been added along with Email and
370
+ # Phone number for card and PIN delivery.
371
+ # * SaveForPINReminder - The given address will be used for sending PIN
372
+ # reminders in future when requested.
373
+ # * SaveForCardReissue - If this is specified, the contact address will
374
+ # be saved in cards platform for card reissue processing.
375
+ # #### Supported operations
376
+ # * Updating a card status to Temporary block, Unblock, Block (Cancelled)
377
+ # or Damaged
378
+ # * Requesting a replacement card when status is set to Block or Damaged
379
+ # #### Validation rules
380
+ # * Number of cards per request does not exceed 500
381
+ # * A card can be changed to proposed status as per the card status
382
+ # transition configuration in the Shell Card Platform
383
+ # * Locating a card -
384
+ # * If target status set to **TemporaryBlock**, then only one matching
385
+ # active card should exist in the Shell Card Platform for the given **PAN**
386
+ # and **CardExpiryDate**
387
+ # * If target status set to **Unblock** or **Block**, then only one
388
+ # matching card should exist in the Shell Card Platform for the given
389
+ # **PAN** and **CardExpiryDate**
390
+ # * A valid Reason Id or Reason Text is provided
391
+ # * If target status set to **Block** or **Damaged** and a
392
+ # **ReasonText** is provided, the value must be from the fixed list -
393
+ # *'Lost'*, *'Stolen'* or *'Card no longer required'*
394
+ # * For the given card, there is no Status Update request already
395
+ # submitted via this API and is being processed
396
+ # * The **OrderReplacementCard** field is set to True only for cards with
397
+ # a target status set to Block or Damaged
398
+ # #### API response
399
+ # * A main reference number for the API request
400
+ # (**OrderReplacementReference**)
401
+ # * A list of successfully validated and accepted cards along with the
402
+ # individual reference numbers (**UpdateCardReference**) for each of the
403
+ # successful request
404
+ # * A list of cards (**ErrorCards**) that failed validation along with the
405
+ # appropriate error code and message
406
+ # #### Asynchronous processing of valid API request
407
+ # * Replacement cards
408
+ # * Request for a replacement card will be placed only when the Block
409
+ # card or Block damaged card request is successfully placed.
410
+ # * The Replacement card request will be processed only when the
411
+ # permanent Block card request is successfully processed. In case of damaged
412
+ # card request, the replacement card request will be processed immediately.
413
+ # * Damaged cards
414
+ # * Setting a card to Damaged will automatically trigger a request to
415
+ # permanently block the card. This will only take effect once the ‘Damaged
416
+ # Active’ period has passed.
417
+ # * The Damaged card active period is the number of days after which a
418
+ # "Damaged" card request will be processed. This value is configured at
419
+ # ColCo level.
420
+ # * If a card is reported as damaged at 10pm local time on 1st Nov and
421
+ # the damaged card period is set to 10 days, then the block request will be
422
+ # submitted to the Shell Card Platform on 11th Nov 00-01 local time.
423
+ # * If during the damage card active period another request is made to
424
+ # set the card to Temporarily Blocked or Blocked permanently (cancelled),
425
+ # then the damaged card request will be marked as superseded and the new
426
+ # Temporary Block or Block (cancelled) will be processed.
427
+ # @param [String] request_id Required parameter: Mandatory UUID (according
428
+ # to RFC 4122 standards) for requests and responses. This will be played
429
+ # back in the response from the request.
430
+ # @param [UpdateCardStatusRequest] body Optional parameter: Update status
431
+ # request body
432
+ # @return [UpdateCardStatusResponse] response from the API call
433
+ def card_update_status(request_id,
434
+ body: nil)
435
+ new_api_call_builder
436
+ .request(new_request_builder(HttpMethodEnum::POST,
437
+ '/card-management/v1/updatestatus',
438
+ Server::DEFAULT)
439
+ .header_param(new_parameter(request_id, key: 'RequestId'))
440
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
441
+ .body_param(new_parameter(body))
442
+ .header_param(new_parameter('application/json', key: 'accept'))
443
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
444
+ .auth(Single.new('BearerToken')))
445
+ .response(new_response_handler
446
+ .deserializer(APIHelper.method(:custom_type_deserializer))
447
+ .deserialize_into(UpdateCardStatusResponse.method(:from_hash))
448
+ .local_error('400',
449
+ "The server cannot or will not process the request due to'\
450
+ ' something that is perceived to be a client error (e.g.,'\
451
+ ' malformed request syntax, invalid request message framing, or'\
452
+ ' deceptive request routing).\n",
453
+ ErrorObjectException)
454
+ .local_error('401',
455
+ "The request has not been applied because it lacks valid '\
456
+ ' authentication credentials for the target resource.\n",
457
+ ErrorObjectException)
458
+ .local_error('403',
459
+ 'Forbidden',
460
+ ErrorObjectException)
461
+ .local_error('404',
462
+ "The origin server did not find a current representation for'\
463
+ ' the target resource or is not willing to disclose that one'\
464
+ ' exists.\n",
465
+ ErrorObjectException)
466
+ .local_error('500',
467
+ "The server encountered an unexpected condition that prevented'\
468
+ ' it from fulfilling the request.\n",
469
+ ErrorObjectException))
470
+ .execute
471
+ end
472
+
473
+ # This API will allow querying the purchase categories of Card
474
+ # for the given country and/or card type.
475
+ # It will also include the below data associated with each of the purchase
476
+ # categories on it’s response.
477
+ # * List of fuel and non-fuel product sets associated.
478
+ # * List of products configured in each product set
479
+ # @param [String] apikey Required parameter: This is the API key of the
480
+ # specific environment which needs to be passed by the client.
481
+ # @param [String] request_id Required parameter: Mandatory UUID (according
482
+ # to RFC 4122 standards) for requests and responses. This will be played
483
+ # back in the response from the request.
484
+ # @param [PurchaseCategoryRequest] body Optional parameter: PurchaseCategory
485
+ # request body
486
+ # @return [PurchaseCategoryResponse] response from the API call
487
+ def purchase_category(apikey,
488
+ request_id,
489
+ body: nil)
490
+ new_api_call_builder
491
+ .request(new_request_builder(HttpMethodEnum::POST,
492
+ '/fleetmanagement/v1/master/purchasecategory',
493
+ Server::DEFAULT)
494
+ .header_param(new_parameter(apikey, key: 'apikey'))
495
+ .header_param(new_parameter(request_id, key: 'RequestId'))
496
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
497
+ .body_param(new_parameter(body))
498
+ .header_param(new_parameter('application/json', key: 'accept'))
499
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
500
+ .auth(Single.new('BasicAuth')))
501
+ .response(new_response_handler
502
+ .deserializer(APIHelper.method(:custom_type_deserializer))
503
+ .deserialize_into(PurchaseCategoryResponse.method(:from_hash))
504
+ .local_error('400',
505
+ "The server cannot or will not process the request due to'\
506
+ ' something that is perceived to be a client\r\n error (e.g.,'\
507
+ ' malformed request syntax, invalid \r\n request message framing,'\
508
+ ' or deceptive request routing).",
509
+ DefaultErrorException)
510
+ .local_error('401',
511
+ "The request has not been applied because it lacks valid '\
512
+ ' authentication credentials for the target resource.\r\n",
513
+ DefaultErrorException)
514
+ .local_error('403',
515
+ "The server understood the request but refuses to authorize it.'\
516
+ '\r\n",
517
+ ErrorUserAccessError1Exception)
518
+ .local_error('404',
519
+ "The origin server did not find a current representation for'\
520
+ ' the target resource or is not willing to disclose that one'\
521
+ ' exists.\r\n",
522
+ DefaultErrorException)
523
+ .local_error('500',
524
+ "The server encountered an unexpected condition the prevented it'\
525
+ ' from fulfilling the request.\r\n",
526
+ DefaultErrorException))
527
+ .execute
528
+ end
529
+
530
+ # This API allows to fetch details of a single fuel card from the Shell Card
531
+ # Platform. If a **CardId** request parameter is provided, this will return
532
+ # a single card. If a **PAN** request parameter is provided, this may
533
+ # result in multiple fuel cards matching the search criteria. The card
534
+ # details of the most recently issued card will be returned.
535
+ # #### Supported operations
536
+ # * Get card by card id or PAN
537
+ # @param [String] apikey Required parameter: This is the API key of the
538
+ # specific environment which needs to be passed by the client.
539
+ # @param [String] request_id Required parameter: Mandatory UUID (according
540
+ # to RFC 4122 standards) for requests and responses. This will be played
541
+ # back in the response from the request.
542
+ # @param [CardDetailsRequest] body Optional parameter: Card details request
543
+ # body
544
+ # @return [CardDetailsResponse] response from the API call
545
+ def card_details(apikey,
546
+ request_id,
547
+ body: nil)
548
+ new_api_call_builder
549
+ .request(new_request_builder(HttpMethodEnum::POST,
550
+ '/fleetmanagement/v1/card/card',
551
+ Server::DEFAULT)
552
+ .header_param(new_parameter(apikey, key: 'apikey'))
553
+ .header_param(new_parameter(request_id, key: 'RequestId'))
554
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
555
+ .body_param(new_parameter(body))
556
+ .header_param(new_parameter('application/json', key: 'accept'))
557
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
558
+ .auth(Single.new('BasicAuth')))
559
+ .response(new_response_handler
560
+ .deserializer(APIHelper.method(:custom_type_deserializer))
561
+ .deserialize_into(CardDetailsResponse.method(:from_hash))
562
+ .local_error('400',
563
+ "The server cannot or will not process the request due to'\
564
+ ' something that is perceived to be a client\r\n error (e.g.,'\
565
+ ' malformed request syntax, invalid \r\n request message framing,'\
566
+ ' or deceptive request routing).",
567
+ DefaultErrorException)
568
+ .local_error('401',
569
+ "The request has not been applied because it lacks valid '\
570
+ ' authentication credentials for the target resource.\r\n",
571
+ DefaultErrorException)
572
+ .local_error('403',
573
+ "The server understood the request but refuses to authorize it.'\
574
+ '\r\n",
575
+ ErrorUserAccessError1Exception)
576
+ .local_error('404',
577
+ "The origin server did not find a current representation for'\
578
+ ' the target resource or is not willing to disclose that one'\
579
+ ' exists.\r\n",
580
+ DefaultErrorException)
581
+ .local_error('500',
582
+ "The server encountered an unexpected condition the prevented it'\
583
+ ' from fulfilling the request.\r\n",
584
+ DefaultErrorException))
585
+ .execute
586
+ end
587
+
588
+ # This API allows to move one or more fuel cards (up to 500) across card
589
+ # groups within a single account or across accounts under the same payer. If
590
+ # the API call succeeds, the API will return a reference number and queue
591
+ # the request for asynchronous processing.
592
+ # #### Supported operations
593
+ # * Moving card to exisitng card group
594
+ # * Moving card to new card group
595
+ # * Removing a card from a card group
596
+ # #### Validation rules
597
+ # * Number of cards per request does not exceed 500
598
+ # * Given **PAN** for a card matches with only one card
599
+ # * A card is allowed to be moved to the **TargetCardGroupId** or
600
+ # **TargetAccountNumber**
601
+ # * A pending move request does not exist in the queue for a card
602
+ # submitted on the same date (customers local)
603
+ # * A card has not been moved as part of a previous request on the same
604
+ # date (customers local)
605
+ # #### API response
606
+ # * A main reference number for the API request
607
+ # (**MoveCardRequestReference**)
608
+ # * Individual reference numbers (**MoveCardReference**) for each card
609
+ # move request that passes validation
610
+ # * A list of cards (**ErrorCards**) that failed validation along with the
611
+ # appropriate error code and message
612
+ # #### Asynchronous processing of valid API request
613
+ # * Move card requests that have been submitted and processed will be
614
+ # reflected after midnight according to the customers local date
615
+ # @param [String] apikey Required parameter: This is the API key of the
616
+ # specific environment which needs to be passed by the client.
617
+ # @param [String] request_id Required parameter: Mandatory UUID (according
618
+ # to RFC 4122 standards) for requests and responses. This will be played
619
+ # back in the response from the request.
620
+ # @param [CardMoveRequest] body Optional parameter: Move cards request
621
+ # body.
622
+ # @return [CardMoveResponse] response from the API call
623
+ def card_move(apikey,
624
+ request_id,
625
+ body: nil)
626
+ new_api_call_builder
627
+ .request(new_request_builder(HttpMethodEnum::POST,
628
+ '/fleetmanagement/v1/card/move',
629
+ Server::DEFAULT)
630
+ .header_param(new_parameter(apikey, key: 'apikey'))
631
+ .header_param(new_parameter(request_id, key: 'RequestId'))
632
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
633
+ .body_param(new_parameter(body))
634
+ .header_param(new_parameter('application/json', key: 'accept'))
635
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
636
+ .auth(Single.new('BasicAuth')))
637
+ .response(new_response_handler
638
+ .deserializer(APIHelper.method(:custom_type_deserializer))
639
+ .deserialize_into(CardMoveResponse.method(:from_hash))
640
+ .local_error('400',
641
+ "The server cannot or will not process the request due to'\
642
+ ' something that is perceived to be a client\r\n error (e.g.,'\
643
+ ' malformed request syntax, invalid \r\n request message framing,'\
644
+ ' or deceptive request routing).",
645
+ DefaultErrorException)
646
+ .local_error('401',
647
+ "The request has not been applied because it lacks valid '\
648
+ ' authentication credentials for the target resource.\r\n",
649
+ DefaultErrorException)
650
+ .local_error('403',
651
+ "The server understood the request but refuses to authorize it.'\
652
+ '\r\n",
653
+ ErrorUserAccessError1Exception)
654
+ .local_error('404',
655
+ "The origin server did not find a current representation for'\
656
+ ' the target resource or is not willing to disclose that one'\
657
+ ' exists.\r\n",
658
+ DefaultErrorException)
659
+ .local_error('500',
660
+ "The server encountered an unexpected condition the prevented it'\
661
+ ' from fulfilling the request.\r\n",
662
+ DefaultErrorException))
663
+ .execute
664
+ end
665
+
666
+ # This API allows requesting a PIN reminder for a fuel card. If the API call
667
+ # succeeds, the API will return a reference number and queue the request for
668
+ # asynchronous processing.
669
+ # #### New version updates
670
+ # * Oauth authentication to access the API
671
+ # * Change in request body where PIN delivery type can be requested via
672
+ # Email, SMS or Post. PIN delivery contact can be set to different values
673
+ # based on previous contact details of card or pin delivery or can set
674
+ # specific contact details for this request.
675
+ # * PINAdviceType
676
+ # * PINContactType
677
+ # * PINDeliverTo
678
+ # * Please note that we have a **savePINReminder** parameter in order to
679
+ # save the contact details for future such requests.
680
+ # * Change in response body where Card details are also provided along
681
+ # with expiry date and PAN details.
682
+ # #### Supported operations
683
+ # * Request a pin reminder by card Id or PAN
684
+ # #### Validation rules
685
+ # * Given **PAN** or **CardId** is active
686
+ # * Given **PAN** matches only one active card
687
+ # * Requested card has PIN
688
+ # * There is no pending PIN Reminder request in the queue awaiting to be
689
+ # processed for the card
690
+ # * A PIN reminder request has not been successfully processed in the last
691
+ # 48 hours for the card
692
+ # @param [String] request_id Required parameter: Mandatory UUID (according
693
+ # to RFC 4122 standards) for requests and responses. This will be played
694
+ # back in the response from the request.
695
+ # @param [PINReminderRequest] body Optional parameter: PIN reminder request
696
+ # body
697
+ # @return [PINReminderResponse] response from the API call
698
+ def card_pin_reminder(request_id,
699
+ body: nil)
700
+ new_api_call_builder
701
+ .request(new_request_builder(HttpMethodEnum::POST,
702
+ '/card-management/v1/pinreminder',
703
+ Server::DEFAULT)
704
+ .header_param(new_parameter(request_id, key: 'RequestId'))
705
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
706
+ .body_param(new_parameter(body))
707
+ .header_param(new_parameter('application/json', key: 'accept'))
708
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
709
+ .auth(Single.new('BearerToken')))
710
+ .response(new_response_handler
711
+ .deserializer(APIHelper.method(:custom_type_deserializer))
712
+ .deserialize_into(PINReminderResponse.method(:from_hash))
713
+ .local_error('400',
714
+ "The server cannot or will not process the request due to'\
715
+ ' something that is perceived to be a client error (e.g.,'\
716
+ ' malformed request syntax, invalid request message framing, or'\
717
+ ' deceptive request routing).\r\n",
718
+ ErrorObjectException)
719
+ .local_error('401',
720
+ "The request has not been applied because it lacks valid '\
721
+ ' authentication credentials for the target resource.\r\n",
722
+ ErrorObjectException)
723
+ .local_error('403',
724
+ 'Forbidden',
725
+ ErrorObjectException)
726
+ .local_error('404',
727
+ "The origin server did not find a current representation for'\
728
+ ' the target resource or is not willing to disclose that one'\
729
+ ' exists.\r\n",
730
+ ErrorObjectException)
731
+ .local_error('500',
732
+ "The server encountered an unexpected condition that prevented'\
733
+ ' it from fulfilling the request.\r\n",
734
+ ErrorObjectException))
735
+ .execute
736
+ end
737
+
738
+ # This API allows scheduling Card Block / Unblock requests for one or
739
+ # multiple cards (up to 500 (configurable)) within a single API call. This
740
+ # API is used to perform the following Actions:
741
+ # >
742
+ # * AddOrUpdate (Schedule a new request or update an existing
743
+ # scheduled request for the overlapping period.
744
+ # * AddAndOverwriteAll (all the existing requests of the given card will
745
+ # be removed and a new request with the specified FromDate and ToDate will
746
+ # be added.)
747
+ # * Delete (Deletes the scheduled request for the same From and To date)
748
+ # * DeleteAll (Deletes all the scheduled requests for the given card)
749
+ # > Requests that passed the below validations are queue:
750
+ # * All Mandatory fields are passed in the request.
751
+ # * Card is present in the Shell Card Platform. Only one matching card is
752
+ # available in the cards platform for the given PAN and expiry date for the
753
+ # requests
754
+ # * The scheduled period start date or end date should be later than or
755
+ # equal to the current date.
756
+ # > If all validations are passed, the request will be accepted and saved in
757
+ # the intermediate queue and the API will return reference numbers for
758
+ # tracking purpose.
759
+ # > A background service will execute the block/unblock requests on a daily
760
+ # basis, based on the scheduled block or unblock date.
761
+ #
762
+ # * The newly added block/unblock request will have a status ‘A’ when it
763
+ # is yet to be moved to the actual queue.
764
+ # * When the request is moved to the actual queue table, the status will
765
+ # be updated as ‘P’ if the request has a value for ‘ToDate’, else, the
766
+ # status will be updated as ‘S’ or ‘F’ based on whether the request has been
767
+ # successfully moved to the actual queue table or if an error is encountered
768
+ # during processing.
769
+ #
770
+ # * When the unblock request is moved to the actual queue table, the
771
+ # status of the request will be changed from ‘P’ to ‘S’ or ‘F’ based on
772
+ # whether the request has been successfully moved to the actual queue table
773
+ # or if an error has occurred during processing.
774
+ # > If any of the validations fail, the API will return the appropriate
775
+ # error details in the response.
776
+ # > The API response will include:
777
+ # * An error entity holding the details of any error encountered.
778
+ # * A list of submitted cards along with the individual reference numbers
779
+ # for each of the request.
780
+ # @param [String] request_id Required parameter: Mandatory UUID (according
781
+ # to RFC 4122 standards) for requests and responses. This will be played
782
+ # back in the response from the request.
783
+ # @param [ScheduleCardBlockRequest] body Optional parameter: request body
784
+ # @return [ScheduleCardBlockResponse] response from the API call
785
+ def schedule_card_block(request_id,
786
+ body: nil)
787
+ new_api_call_builder
788
+ .request(new_request_builder(HttpMethodEnum::POST,
789
+ '/card-management/v1/schedulecardblock',
790
+ Server::DEFAULT)
791
+ .header_param(new_parameter(request_id, key: 'RequestId'))
792
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
793
+ .body_param(new_parameter(body))
794
+ .header_param(new_parameter('application/json', key: 'accept'))
795
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
796
+ .auth(Single.new('BearerToken')))
797
+ .response(new_response_handler
798
+ .deserializer(APIHelper.method(:custom_type_deserializer))
799
+ .deserialize_into(ScheduleCardBlockResponse.method(:from_hash))
800
+ .local_error('400',
801
+ "The server cannot or will not process the request due to'\
802
+ ' something that is perceived to be a client error (e.g.,'\
803
+ ' malformed request syntax, invalid request message framing, or'\
804
+ ' deceptive request routing).\n",
805
+ ErrorObjectException)
806
+ .local_error('401',
807
+ "The request has not been applied because it lacks valid '\
808
+ ' authentication credentials for the target resource.\n",
809
+ ErrorObjectException)
810
+ .local_error('403',
811
+ 'Forbidden',
812
+ ErrorObjectException)
813
+ .local_error('404',
814
+ "The origin server did not find a current representation for'\
815
+ ' the target resource or is not willing to disclose that one'\
816
+ ' exists.\n",
817
+ ErrorObjectException)
818
+ .local_error('500',
819
+ "The server encountered an unexpected condition that prevented'\
820
+ ' it from fulfilling the request.\n",
821
+ ErrorObjectException))
822
+ .execute
823
+ end
824
+
825
+ # This API allows to update the reissue indicator of a single card. If the
826
+ # API call succeeds, the API will return a reference number for tracking
827
+ # purposes and queue the request for asynchronous processing.
828
+ # #### Supported operations
829
+ # * Update the reissue indicator of a card to enable auto renewal
830
+ # * Update the reissue indicator of a card to disable auto renewal
831
+ # #### Validation rules
832
+ # * Card status must be either Active, Temporary Block (Customer),
833
+ # Temporary Block (Shell) or Pending Renewal, otherwise an error code 9016
834
+ # is returned
835
+ #
836
+ # #### API response
837
+ # * Returns a reference number for the API request
838
+ # (**AutoRenewReference**)
839
+ # #### Asynchronous processing of valid API request
840
+ # * If the provided card is superseded i.e. a replacement/new card is
841
+ # already issued, then the latest card's reissue indicator should be updated
842
+ # in the Shell Card Platform.
843
+ # * Providing a **PAN** request paramter may result in multiple fuel cards
844
+ # being located in the Shell Card Platform. The card details of the most
845
+ # recently issued card will be considered.
846
+ # @param [String] request_id Required parameter: Mandatory UUID (according
847
+ # to RFC 4122 standards) for requests and responses. This will be played
848
+ # back in the response from the request.
849
+ # @param [AutoRenewCardRequest] body Optional parameter: Auto renew request
850
+ # body
851
+ # @return [AutoRenewCardResponse] response from the API call
852
+ def auto_renew(request_id,
853
+ body: nil)
854
+ new_api_call_builder
855
+ .request(new_request_builder(HttpMethodEnum::POST,
856
+ '/card-management/v1/autorenew',
857
+ Server::DEFAULT)
858
+ .header_param(new_parameter(request_id, key: 'RequestId'))
859
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
860
+ .body_param(new_parameter(body))
861
+ .header_param(new_parameter('application/json', key: 'accept'))
862
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
863
+ .auth(Single.new('BearerToken')))
864
+ .response(new_response_handler
865
+ .deserializer(APIHelper.method(:custom_type_deserializer))
866
+ .deserialize_into(AutoRenewCardResponse.method(:from_hash))
867
+ .local_error('400',
868
+ "The server cannot or will not process the request due to'\
869
+ ' something that is perceived to be a client error (e.g.,'\
870
+ ' malformed request syntax, invalid request message framing, or'\
871
+ ' deceptive request routing).\n",
872
+ ErrorObjectException)
873
+ .local_error('401',
874
+ "The request has not been applied because it lacks valid '\
875
+ ' authentication credentials for the target resource.\n",
876
+ ErrorObjectException)
877
+ .local_error('403',
878
+ 'Forbidden',
879
+ ErrorObjectException)
880
+ .local_error('404',
881
+ "The origin server did not find a current representation for'\
882
+ ' the target resource or is not willing to disclose that one'\
883
+ ' exists.\n",
884
+ ErrorObjectException)
885
+ .local_error('500',
886
+ "The server encountered an unexpected condition that prevented'\
887
+ ' it from fulfilling the request.\n",
888
+ ErrorObjectException))
889
+ .execute
890
+ end
891
+
892
+ # This operation allows update the approval status of Mobile Payment
893
+ # Registration requests requiring for Fleet Manager approval.
894
+ # If the approval status is:
895
+ # * “Approved” then the request status will be changed to Pending for
896
+ # processing.
897
+ # * “Rejected” then status will be updated to “CI” (Failed) with appropriate
898
+ # error message.
899
+ # @param [String] request_id Required parameter: Mandatory UUID (according
900
+ # to RFC 4122 standards) for requests and responses. This will be played
901
+ # back in the response from the request.
902
+ # @param [UpdateMPayRegStatusRequest] body Optional parameter: Request
903
+ # body
904
+ # @return [UpdateMPayRegStatusResponse] response from the API call
905
+ def update_mobile_payment_registration_status(request_id,
906
+ body: nil)
907
+ new_api_call_builder
908
+ .request(new_request_builder(HttpMethodEnum::POST,
909
+ '/card-management/v1/updatemobilepaymentregistrationstatus',
910
+ Server::DEFAULT)
911
+ .header_param(new_parameter(request_id, key: 'RequestId'))
912
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
913
+ .body_param(new_parameter(body))
914
+ .header_param(new_parameter('application/json', key: 'accept'))
915
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
916
+ .auth(Single.new('BearerToken')))
917
+ .response(new_response_handler
918
+ .deserializer(APIHelper.method(:custom_type_deserializer))
919
+ .deserialize_into(UpdateMPayRegStatusResponse.method(:from_hash))
920
+ .local_error('400',
921
+ "The server cannot or will not process the request due to'\
922
+ ' something that is perceived to be a client error (e.g.,'\
923
+ ' malformed request syntax, invalid request message framing, or'\
924
+ ' deceptive request routing).\n",
925
+ ErrorObjectException)
926
+ .local_error('401',
927
+ "The request has not been applied because it lacks valid '\
928
+ ' authentication credentials for the target resource.\n",
929
+ ErrorObjectException)
930
+ .local_error('403',
931
+ 'Forbidden',
932
+ ErrorObjectException)
933
+ .local_error('404',
934
+ "The origin server did not find a current representation for'\
935
+ ' the target resource or is not willing to disclose that one'\
936
+ ' exists.\n",
937
+ ErrorObjectException)
938
+ .local_error('500',
939
+ "The server encountered an unexpected condition that prevented'\
940
+ ' it from fulfilling the request.\n",
941
+ ErrorObjectException))
942
+ .execute
943
+ end
944
+
945
+ # Get a new public key that will be used to encrypt data for selected PIN
946
+ # process when ordering new Shell Card. This encrypted data is used for
947
+ # further processing.
948
+ # @param [String] request_id Required parameter: Mandatory UUID (according
949
+ # to RFC 4122 standards) for requests and responses. This will be played
950
+ # back in the response from the request.
951
+ # @param [TrueClass | FalseClass] fleet Optional parameter: If the public
952
+ # key will be used a long time for multiple files this parameter will be
953
+ # true. If the parameter is true then public Key will be valid for 90 days.
954
+ # If the parameter is false then the key will be valid for one time. default
955
+ # value will be false.
956
+ # @return [GeneratePINKeyResponse] response from the API call
957
+ def get_key(request_id,
958
+ fleet: nil)
959
+ new_api_call_builder
960
+ .request(new_request_builder(HttpMethodEnum::GET,
961
+ '/pin-management/v1/generatepinkeys',
962
+ Server::DEFAULT)
963
+ .header_param(new_parameter(request_id, key: 'RequestId'))
964
+ .query_param(new_parameter(fleet, key: 'fleet'))
965
+ .header_param(new_parameter('application/json', key: 'accept'))
966
+ .auth(Single.new('BearerToken')))
967
+ .response(new_response_handler
968
+ .deserializer(APIHelper.method(:custom_type_deserializer))
969
+ .deserialize_into(GeneratePINKeyResponse.method(:from_hash))
970
+ .local_error('400',
971
+ "The server cannot or will not process the request due to'\
972
+ ' something that is perceived to be a client\r\n error (e.g.,'\
973
+ ' malformed request syntax, invalid \r\n request message framing,'\
974
+ ' or deceptive request routing).",
975
+ DefaultErrorException)
976
+ .local_error('401',
977
+ "The request has not been applied because it lacks valid '\
978
+ ' authentication credentials for the target resource.\r\n",
979
+ DefaultErrorException)
980
+ .local_error('403',
981
+ "The server understood the request but refuses to authorize it.'\
982
+ '\r\n",
983
+ ErrorUserAccessError1Exception)
984
+ .local_error('404',
985
+ "The origin server did not find a current representation for'\
986
+ ' the target resource or is not willing to disclose that one'\
987
+ ' exists.\r\n",
988
+ DefaultErrorException)
989
+ .local_error('500',
990
+ "The server encountered an unexpected condition the prevented it'\
991
+ ' from fulfilling the request.\r\n",
992
+ DefaultErrorException))
993
+ .execute
994
+ end
995
+
996
+ # This API allows users to update the card’s delivery addresses (card
997
+ # delivery address used for card re-issue and PIN delivery address used when
998
+ # PIN reminder is requested)
999
+ # #### Supported operations
1000
+ # * card delivery address update
1001
+ # @param [String] apikey Required parameter: This is the API key of the
1002
+ # specific environment which needs to be passed by the client.
1003
+ # @param [DeliveryAddressUpdateRequest] body Optional parameter: Delivery
1004
+ # Address Update Request Body
1005
+ # @return [DeliveryAddressUpdateResponse] response from the API call
1006
+ def delivery_address_update(apikey,
1007
+ body: nil)
1008
+ new_api_call_builder
1009
+ .request(new_request_builder(HttpMethodEnum::POST,
1010
+ '/fleetmanagement/v1/card/deliveryaddressupdate',
1011
+ Server::DEFAULT)
1012
+ .header_param(new_parameter(apikey, key: 'apikey'))
1013
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
1014
+ .body_param(new_parameter(body))
1015
+ .header_param(new_parameter('application/json', key: 'accept'))
1016
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
1017
+ .auth(Single.new('BasicAuth')))
1018
+ .response(new_response_handler
1019
+ .deserializer(APIHelper.method(:custom_type_deserializer))
1020
+ .deserialize_into(DeliveryAddressUpdateResponse.method(:from_hash))
1021
+ .local_error('400',
1022
+ "The server cannot or will not process the request due to'\
1023
+ ' something that is perceived to be a client\r\n error (e.g.,'\
1024
+ ' malformed request syntax, invalid \r\n request message framing,'\
1025
+ ' or deceptive request routing).",
1026
+ DefaultErrorException)
1027
+ .local_error('401',
1028
+ "The request has not been applied because it lacks valid '\
1029
+ ' authentication credentials for the target resource.\r\n",
1030
+ DefaultErrorException)
1031
+ .local_error('403',
1032
+ "The server understood the request but refuses to authorize it.'\
1033
+ '\r\n",
1034
+ ErrorUserAccessError1Exception)
1035
+ .local_error('404',
1036
+ "The origin server did not find a current representation for'\
1037
+ ' the target resource or is not willing to disclose that one'\
1038
+ ' exists.\r\n",
1039
+ DefaultErrorException)
1040
+ .local_error('500',
1041
+ "The server encountered an unexpected condition the prevented it'\
1042
+ ' from fulfilling the request.\r\n",
1043
+ DefaultErrorException))
1044
+ .execute
1045
+ end
1046
+ end
1047
+ end