card-management-sdk 1.0.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -19
  3. data/lib/shell_card_management_ap_is/client.rb +2 -3
  4. data/lib/shell_card_management_ap_is/configuration.rb +15 -22
  5. data/lib/shell_card_management_ap_is/controllers/base_controller.rb +9 -9
  6. data/lib/shell_card_management_ap_is/controllers/card_controller.rb +434 -434
  7. data/lib/shell_card_management_ap_is/controllers/customer_controller.rb +261 -262
  8. data/lib/shell_card_management_ap_is/controllers/o_auth_authorization_controller.rb +11 -11
  9. data/lib/shell_card_management_ap_is/controllers/restriction_controller.rb +421 -291
  10. data/lib/shell_card_management_ap_is/exceptions/error_object_exception.rb +15 -15
  11. data/lib/shell_card_management_ap_is/exceptions/{error_user_access_error1_exception.rb → fleetmanagement_v1_customer_customer403_error_exception.rb} +17 -17
  12. data/lib/shell_card_management_ap_is/exceptions/{default_error_exception.rb → fleetmanagement_v1_customer_payers400_error_exception.rb} +20 -20
  13. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_customer_payers404_error_exception.rb +32 -0
  14. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser400_error_exception.rb +32 -0
  15. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser401_error_exception.rb +32 -0
  16. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser403_error_exception.rb +32 -0
  17. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser404_error_exception.rb +32 -0
  18. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser500_error_exception.rb +32 -0
  19. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard401_error_exception.rb +32 -0
  20. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard500_error_exception.rb +32 -0
  21. data/lib/shell_card_management_ap_is/exceptions/o_auth_provider_exception.rb +15 -15
  22. data/lib/shell_card_management_ap_is/http/auth/bearer_token.rb +54 -10
  23. data/lib/shell_card_management_ap_is/models/account_access.rb +3 -8
  24. data/lib/shell_card_management_ap_is/models/account_request.rb +17 -26
  25. data/lib/shell_card_management_ap_is/models/account_response.rb +2 -6
  26. data/lib/shell_card_management_ap_is/models/account_response_accounts_items.rb +29 -53
  27. data/lib/shell_card_management_ap_is/models/account_restriction_request.rb +28 -10
  28. data/lib/shell_card_management_ap_is/models/account_restriction_response.rb +60 -11
  29. data/lib/shell_card_management_ap_is/models/account_velocity_limit.rb +11 -19
  30. data/lib/shell_card_management_ap_is/models/accounts.rb +1 -2
  31. data/lib/shell_card_management_ap_is/models/address.rb +4 -11
  32. data/lib/shell_card_management_ap_is/models/audit_request.rb +37 -33
  33. data/lib/shell_card_management_ap_is/models/audit_response.rb +2 -6
  34. data/lib/shell_card_management_ap_is/models/audit_response_audits_items.rb +50 -63
  35. data/lib/shell_card_management_ap_is/models/auto_renew_card_request.rb +2 -5
  36. data/lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb +13 -5
  37. data/lib/shell_card_management_ap_is/models/auto_renew_card_response.rb +1 -3
  38. data/lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb +13 -3
  39. data/lib/shell_card_management_ap_is/models/bank_account.rb +5 -13
  40. data/lib/shell_card_management_ap_is/models/{search_account_limit_request_filters.rb → budle_details_request.rb} +29 -22
  41. data/lib/shell_card_management_ap_is/models/{create_bundle_response_data_items_cards_items.rb → bundle_card_restriction_status.rb} +4 -3
  42. data/lib/shell_card_management_ap_is/models/bundle_details_response.rb +181 -0
  43. data/lib/shell_card_management_ap_is/models/bundle_restriction.rb +86 -103
  44. data/lib/shell_card_management_ap_is/models/bundle_restriction_update.rb +185 -0
  45. data/lib/shell_card_management_ap_is/models/bundled_details_product_list.rb +116 -0
  46. data/lib/shell_card_management_ap_is/models/bundled_restrictions_list.rb +82 -0
  47. data/lib/shell_card_management_ap_is/models/cancel_card_request.rb +1 -3
  48. data/lib/shell_card_management_ap_is/models/cancel_card_response.rb +3 -6
  49. data/lib/shell_card_management_ap_is/models/card.rb +43 -51
  50. data/lib/shell_card_management_ap_is/models/card_block_schedule.rb +1 -2
  51. data/lib/shell_card_management_ap_is/models/{summary_of_bundle_response_data_items_card_bundles_items.rb → card_bundle.rb} +11 -18
  52. data/lib/shell_card_management_ap_is/models/card_contact.rb +222 -0
  53. data/lib/shell_card_management_ap_is/models/card_day_time_restrictions.rb +3 -9
  54. data/lib/shell_card_management_ap_is/models/card_delivery_address.rb +218 -0
  55. data/lib/shell_card_management_ap_is/models/card_delivery_contact.rb +7 -14
  56. data/lib/shell_card_management_ap_is/models/card_detail.rb +50 -61
  57. data/lib/shell_card_management_ap_is/models/card_details_request.rb +6 -14
  58. data/lib/shell_card_management_ap_is/models/card_details_response.rb +52 -89
  59. data/lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb +1 -2
  60. data/lib/shell_card_management_ap_is/models/card_details_response_card_delivery_address.rb +6 -15
  61. data/lib/shell_card_management_ap_is/models/card_details_response_fuel_sets_items.rb +1 -2
  62. data/lib/shell_card_management_ap_is/models/card_details_response_non_fuel_sets_items.rb +1 -2
  63. data/lib/shell_card_management_ap_is/models/card_details_response_pin_delivery_address.rb +6 -15
  64. data/lib/shell_card_management_ap_is/models/card_group_request.rb +6 -12
  65. data/lib/shell_card_management_ap_is/models/card_group_response.rb +2 -6
  66. data/lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb +10 -20
  67. data/lib/shell_card_management_ap_is/models/card_management_v1_cancel_request.rb +104 -0
  68. data/lib/shell_card_management_ap_is/models/card_management_v1_ordercard_request.rb +59 -0
  69. data/lib/shell_card_management_ap_is/models/card_management_v1_pinreminder_request.rb +130 -0
  70. data/lib/shell_card_management_ap_is/models/card_management_v1_updatestatus_request.rb +122 -0
  71. data/lib/shell_card_management_ap_is/models/card_move_request.rb +4 -9
  72. data/lib/shell_card_management_ap_is/models/card_move_request_cards_items.rb +1 -3
  73. data/lib/shell_card_management_ap_is/models/card_move_response.rb +2 -4
  74. data/lib/shell_card_management_ap_is/models/card_move_response_error_cards_items.rb +2 -5
  75. data/lib/shell_card_management_ap_is/models/card_move_response_successful_requests_items.rb +2 -5
  76. data/lib/shell_card_management_ap_is/models/{restriction_card_request.rb → card_restriction_req.rb} +42 -50
  77. data/lib/shell_card_management_ap_is/models/card_restriction_response.rb +96 -0
  78. data/lib/shell_card_management_ap_is/models/card_search_response.rb +2 -7
  79. data/lib/shell_card_management_ap_is/models/card_settings.rb +626 -0
  80. data/lib/shell_card_management_ap_is/models/card_summary_request.rb +3 -5
  81. data/lib/shell_card_management_ap_is/models/card_summary_response.rb +1 -3
  82. data/lib/shell_card_management_ap_is/models/card_type_request.rb +3 -7
  83. data/lib/shell_card_management_ap_is/models/card_type_response.rb +1 -3
  84. data/lib/shell_card_management_ap_is/models/card_type_response_customer_card_types_items.rb +15 -31
  85. data/lib/shell_card_management_ap_is/models/card_type_response_error.rb +1 -2
  86. data/lib/shell_card_management_ap_is/models/card_usage_restrictions.rb +5 -10
  87. data/lib/shell_card_management_ap_is/models/col_co_access.rb +2 -4
  88. data/lib/shell_card_management_ap_is/models/{location_restrictions_country_restrictions.rb → country_restriction.rb} +20 -21
  89. data/lib/shell_card_management_ap_is/models/create_bundle_request.rb +64 -62
  90. data/lib/shell_card_management_ap_is/models/create_bundle_response.rb +122 -47
  91. data/lib/shell_card_management_ap_is/models/create_card_group_request.rb +3 -9
  92. data/lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb +1 -3
  93. data/lib/shell_card_management_ap_is/models/create_card_group_response.rb +2 -5
  94. data/lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb +1 -3
  95. data/lib/shell_card_management_ap_is/models/create_card_group_response_successful_requests_items.rb +1 -3
  96. data/lib/shell_card_management_ap_is/models/create_card_response.rb +1 -2
  97. data/lib/shell_card_management_ap_is/models/customer_contract.rb +1 -2
  98. data/lib/shell_card_management_ap_is/models/customer_detail_request.rb +2 -5
  99. data/lib/shell_card_management_ap_is/models/customer_detail_response.rb +31 -45
  100. data/lib/shell_card_management_ap_is/models/day_time_restriction.rb +133 -0
  101. data/lib/shell_card_management_ap_is/models/day_time_restrictions.rb +52 -82
  102. data/lib/shell_card_management_ap_is/models/{summary_of_bundle_request.rb → default_error.rb} +10 -10
  103. data/lib/shell_card_management_ap_is/models/default_error_fault.rb +4 -5
  104. data/lib/shell_card_management_ap_is/models/delete_bundle_request.rb +14 -16
  105. data/lib/shell_card_management_ap_is/models/delete_bundle_response.rb +9 -10
  106. data/lib/shell_card_management_ap_is/models/delivery_address_update.rb +13 -11
  107. data/lib/shell_card_management_ap_is/models/delivery_address_update_references.rb +2 -5
  108. data/lib/shell_card_management_ap_is/models/delivery_address_update_references2.rb +98 -0
  109. data/lib/shell_card_management_ap_is/models/delivery_address_update_request.rb +3 -7
  110. data/lib/shell_card_management_ap_is/models/delivery_address_update_response.rb +5 -14
  111. data/lib/shell_card_management_ap_is/models/delivery_addresses.rb +7 -18
  112. data/lib/shell_card_management_ap_is/models/detail.rb +50 -0
  113. data/lib/shell_card_management_ap_is/models/eid_access.rb +1 -2
  114. data/lib/shell_card_management_ap_is/models/error_details.rb +1 -3
  115. data/lib/shell_card_management_ap_is/models/error_status.rb +1 -2
  116. data/lib/shell_card_management_ap_is/models/error_user_access_error.rb +1 -2
  117. data/lib/shell_card_management_ap_is/models/fault.rb +59 -0
  118. data/lib/shell_card_management_ap_is/models/filters.rb +702 -0
  119. data/lib/shell_card_management_ap_is/models/filters1.rb +579 -0
  120. data/lib/shell_card_management_ap_is/models/filters2.rb +200 -0
  121. data/lib/shell_card_management_ap_is/models/finance_currency.rb +1 -2
  122. data/lib/shell_card_management_ap_is/models/finance_currency2.rb +96 -0
  123. data/lib/shell_card_management_ap_is/models/{restriction_search_card_request.rb → fleetmanagement_v1_customer_payers400_error1.rb} +10 -10
  124. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_customer_payers404_error1.rb +50 -0
  125. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser400_error1.rb +50 -0
  126. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser401_error1.rb +50 -0
  127. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser404_error1.rb +50 -0
  128. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser500_error1.rb +50 -0
  129. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb +104 -0
  130. data/lib/shell_card_management_ap_is/models/fleetmanagement_v2_restriction_searchcard401_error1.rb +50 -0
  131. data/lib/shell_card_management_ap_is/models/fleetmanagement_v2_restriction_searchcard500_error1.rb +50 -0
  132. data/lib/shell_card_management_ap_is/models/generate_pin_key_response.rb +1 -2
  133. data/lib/shell_card_management_ap_is/models/invoice_distribution_method.rb +2 -4
  134. data/lib/shell_card_management_ap_is/models/{location_restrictions.rb → location_restriction.rb} +20 -35
  135. data/lib/shell_card_management_ap_is/models/logged_in_user_request.rb +2 -4
  136. data/lib/shell_card_management_ap_is/models/logged_in_user_response.rb +12 -25
  137. data/lib/shell_card_management_ap_is/models/{location_restrictions_network_restrictions_items.rb → network_restriction.rb} +18 -20
  138. data/lib/shell_card_management_ap_is/models/o_auth_token.rb +2 -6
  139. data/lib/shell_card_management_ap_is/models/order_card_enquiry.rb +48 -45
  140. data/lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb +5 -12
  141. data/lib/shell_card_management_ap_is/models/order_card_enquiry_request.rb +3 -4
  142. data/lib/shell_card_management_ap_is/models/order_card_enquiry_response.rb +1 -3
  143. data/lib/shell_card_management_ap_is/models/order_card_response.rb +1 -3
  144. data/lib/shell_card_management_ap_is/models/{location_restrictions_partner_site_restrictions_items.rb → partner_site_restriction.rb} +10 -12
  145. data/lib/shell_card_management_ap_is/models/payer_access.rb +3 -8
  146. data/lib/shell_card_management_ap_is/models/payer_details.rb +55 -96
  147. data/lib/shell_card_management_ap_is/models/payer_request.rb +9 -12
  148. data/lib/shell_card_management_ap_is/models/payer_response.rb +2 -6
  149. data/lib/shell_card_management_ap_is/models/payers.rb +2 -5
  150. data/lib/shell_card_management_ap_is/models/pin_advice_types.rb +5 -6
  151. data/lib/shell_card_management_ap_is/models/pin_contact.rb +234 -0
  152. data/lib/shell_card_management_ap_is/models/pin_deliver_to.rb +161 -0
  153. data/lib/shell_card_management_ap_is/models/pin_delivery_address.rb +222 -0
  154. data/lib/shell_card_management_ap_is/models/pin_delivery_contact.rb +7 -14
  155. data/lib/shell_card_management_ap_is/models/pin_delivery_details.rb +4 -11
  156. data/lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb +19 -17
  157. data/lib/shell_card_management_ap_is/models/pin_reminder_reference.rb +2 -5
  158. data/lib/shell_card_management_ap_is/models/pin_reminder_request.rb +2 -6
  159. data/lib/shell_card_management_ap_is/models/pin_reminder_response.rb +1 -3
  160. data/lib/shell_card_management_ap_is/models/product_all_of0.rb +1 -2
  161. data/lib/shell_card_management_ap_is/models/product_group.rb +2 -6
  162. data/lib/shell_card_management_ap_is/models/{product_restrictions.rb → product_restriction_card.rb} +9 -12
  163. data/lib/shell_card_management_ap_is/models/purchase_categories.rb +1 -4
  164. data/lib/shell_card_management_ap_is/models/purchase_category1_all_of0.rb +10 -15
  165. data/lib/shell_card_management_ap_is/models/purchase_category_request.rb +2 -5
  166. data/lib/shell_card_management_ap_is/models/purchase_category_response.rb +1 -2
  167. data/lib/shell_card_management_ap_is/models/replace_card_settings.rb +25 -40
  168. data/lib/shell_card_management_ap_is/models/restriction.rb +82 -0
  169. data/lib/shell_card_management_ap_is/models/{restriction_search_card_response_data_items.rb → restriction_card_list.rb} +284 -328
  170. data/lib/shell_card_management_ap_is/models/{restriction_card_request_cards_items.rb → restriction_cards_list.rb} +69 -82
  171. data/lib/shell_card_management_ap_is/models/restriction_product.rb +62 -0
  172. data/lib/shell_card_management_ap_is/models/{restriction_card_response_data_items.rb → restrictioncards_res.rb} +100 -114
  173. data/lib/shell_card_management_ap_is/models/role.rb +3 -6
  174. data/lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb +42 -39
  175. data/lib/shell_card_management_ap_is/models/schedule_card_block_request.rb +1 -2
  176. data/lib/shell_card_management_ap_is/models/schedule_card_block_response.rb +1 -3
  177. data/lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb +1 -3
  178. data/lib/shell_card_management_ap_is/models/search_account_limit_request.rb +79 -10
  179. data/lib/shell_card_management_ap_is/models/search_account_limit_response.rb +74 -20
  180. data/lib/shell_card_management_ap_is/models/search_card.rb +13 -3
  181. data/lib/shell_card_management_ap_is/models/search_card_request.rb +4 -6
  182. data/lib/shell_card_management_ap_is/models/{restriction_search_card_request_filters_cards_items.rb → search_card_restriction.rb} +19 -16
  183. data/lib/shell_card_management_ap_is/models/{restriction_search_card_request_filters.rb → search_card_restriction_req.rb} +72 -71
  184. data/lib/shell_card_management_ap_is/models/search_card_restriction_res.rb +89 -0
  185. data/lib/shell_card_management_ap_is/models/search_product_restriction.rb +3 -4
  186. data/lib/shell_card_management_ap_is/models/search_request.rb +25 -47
  187. data/lib/shell_card_management_ap_is/models/{location_restrictions_shell_site_restrictions_items.rb → shell_site_restriction.rb} +10 -17
  188. data/lib/shell_card_management_ap_is/models/submitted_card.rb +24 -9
  189. data/lib/shell_card_management_ap_is/models/summary_request.rb +21 -39
  190. data/lib/shell_card_management_ap_is/models/summary_response.rb +5 -11
  191. data/lib/shell_card_management_ap_is/models/{summary_of_bundle_response_data_items.rb → summaryofbundle_response.rb} +36 -33
  192. data/lib/shell_card_management_ap_is/models/{summaryof_bundle.rb → summaryofbundler_request.rb} +43 -36
  193. data/lib/shell_card_management_ap_is/models/update_bundle_request.rb +65 -70
  194. data/lib/shell_card_management_ap_is/models/update_bundle_response.rb +75 -21
  195. data/lib/shell_card_management_ap_is/models/update_card.rb +31 -20
  196. data/lib/shell_card_management_ap_is/models/update_card_group_request.rb +9 -17
  197. data/lib/shell_card_management_ap_is/models/update_card_group_response.rb +3 -6
  198. data/lib/shell_card_management_ap_is/models/update_card_group_response_move_card_references_items.rb +1 -3
  199. data/lib/shell_card_management_ap_is/models/update_card_renewal_address.rb +5 -11
  200. data/lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb +155 -0
  201. data/lib/shell_card_management_ap_is/models/update_card_status_request.rb +1 -3
  202. data/lib/shell_card_management_ap_is/models/update_card_status_response.rb +2 -5
  203. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request.rb +2 -5
  204. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb +3 -5
  205. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_response.rb +1 -2
  206. data/lib/shell_card_management_ap_is/models/usage_restriction.rb +1127 -0
  207. data/lib/shell_card_management_ap_is/models/{usage_restrictions.rb → usage_restrictions_card.rb} +74 -131
  208. data/lib/shell_card_management_ap_is/utilities/file_wrapper.rb +9 -9
  209. data/lib/shell_card_management_ap_is.rb +139 -95
  210. metadata +74 -38
  211. data/lib/shell_card_management_ap_is/models/create_bundle_request_restrictions.rb +0 -147
  212. data/lib/shell_card_management_ap_is/models/create_bundle_response_data_items.rb +0 -125
  213. data/lib/shell_card_management_ap_is/models/restriction_card_response.rb +0 -91
  214. data/lib/shell_card_management_ap_is/models/restriction_search_card_response.rb +0 -79
  215. data/lib/shell_card_management_ap_is/models/search_account_limit_response_data.rb +0 -106
  216. data/lib/shell_card_management_ap_is/models/search_card_response_restrictions.rb +0 -99
  217. data/lib/shell_card_management_ap_is/models/summary_of_bundle_response.rb +0 -79
  218. data/lib/shell_card_management_ap_is/models/url_enum.rb +0 -23
@@ -6,6 +6,157 @@
6
6
  module ShellCardManagementApIs
7
7
  # RestrictionController
8
8
  class RestrictionController < BaseController
9
+ # This API will allows querying card details including the day/time and
10
+ # product restrictions.
11
+ # #### Supported operations
12
+ # * Search by list of cards or bundle
13
+ # * Include card bundle details (optional)
14
+ # @param [String] apikey Required parameter: This is the API key of the
15
+ # specific environment which needs to be passed by the client.
16
+ # @param [String] request_id Required parameter: Mandatory UUID (according
17
+ # to RFC 4122 standards) for requests and responses. This will be played
18
+ # back in the response from the request.
19
+ # @param [SearchCardRestrictionReq] body Optional parameter: Restriction
20
+ # search card request body
21
+ # @return [SearchCardRestrictionRes] response from the API call.
22
+ def search_card_restriction(apikey,
23
+ request_id,
24
+ body: nil)
25
+ new_api_call_builder
26
+ .request(new_request_builder(HttpMethodEnum::POST,
27
+ '/fleetmanagement/v2/restriction/searchcard',
28
+ Server::SHELL)
29
+ .header_param(new_parameter(apikey, key: 'apikey'))
30
+ .header_param(new_parameter(request_id, key: 'RequestId'))
31
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
32
+ .body_param(new_parameter(body))
33
+ .header_param(new_parameter('application/json', key: 'accept'))
34
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
35
+ .auth(Single.new('BasicAuth')))
36
+ .response(new_response_handler
37
+ .deserializer(APIHelper.method(:custom_type_deserializer))
38
+ .deserialize_into(SearchCardRestrictionRes.method(:from_hash))
39
+ .local_error('400',
40
+ "The server cannot or will not process the request due to'\
41
+ ' something that is perceived to be a client\r\n error (e.g.,'\
42
+ ' malformed request syntax, invalid \r\n request message'\
43
+ ' framing, or deceptive request routing).",
44
+ APIException)
45
+ .local_error('401',
46
+ 'The request has not been applied because it lacks valid '\
47
+ ' authentication credentials for the target resource.',
48
+ FleetmanagementV2RestrictionSearchcard401ErrorException)
49
+ .local_error('403',
50
+ 'The server understood the request but refuses to authorize it'\
51
+ '.',
52
+ APIException)
53
+ .local_error('404',
54
+ 'The origin server did not find a current representation for'\
55
+ ' the target resource or is not willing to disclose that one'\
56
+ ' exists.',
57
+ APIException)
58
+ .local_error('500',
59
+ 'The server encountered an unexpected condition the prevented'\
60
+ ' it from fulfilling the request.',
61
+ FleetmanagementV2RestrictionSearchcard500ErrorException))
62
+ .execute
63
+ end
64
+
65
+ # The Card Limit and Restriction API is REST-based and employs Basic and
66
+ # ApiKey authentication. The API endpoints accept JSON-encoded request
67
+ # bodies, return JSON-encoded responses and use standard HTTP response
68
+ # codes.
69
+ # All resources are located in the Shell Card Platform. The Shell Card
70
+ # Platform is the overall platform that encompasses all the internal Shell
71
+ # systems used to manage resources. The internal workings of the platform
72
+ # are not important when interacting with the API. However, it is worth
73
+ # noting that the platform uses a microservice architecture to communicate
74
+ # with various backend systems and some API calls are processed
75
+ # asynchronously.
76
+ # All endpoints use the `POST` verb for retrieving, updating, creating and
77
+ # deleting resources in the Shell Card Platform. The endpoints that retrieve
78
+ # resources from the Shell Card Platform allow flexible search parameters in
79
+ # the API request body.
80
+ # **Important Note** - This operation allows setting or updating the
81
+ # restrictions on existing cards. (For up to 3 cards in a single call).
82
+ # All restrictions of the cards are submitted and executed after successful
83
+ # below condition.
84
+ # • The card exists.
85
+ # • Day time restriction cannot be set to restrict the use of a card on
86
+ # all days of the week i.e., the values for all the days in the restriction
87
+ # cannot be set to false.
88
+ # • Either of the usage, daytime, location or product restriction ‘Reset’
89
+ # is set to ‘True’ or applied on the card.
90
+ # • All the limits in the usage restriction profile for a card is not set
91
+ # to ‘0’/null.
92
+ # • If IsVelocityCeiling is ‘true’, API will validate below condition:
93
+ # Usage restrictions for a card are lower than Customer Card Type level
94
+ # limits, if there are no customer level overrides available then lower than
95
+ # OU card type limits.
96
+ # • In usage restrictions, the limits per transaction should be less than
97
+ # or equal to Daily, Daily should be less than or equal to Weekly, Weekly
98
+ # should be less than or equal to Monthly, Monthly should be less than or
99
+ # equal to Yearly (Annually). Exception being null/blank will be skipped.
100
+ # i.e., Daily value should be less than equal to Monthly value if Weekly
101
+ # value is null/blank. Lifetime limit is not considered for usage
102
+ # restrictions limits validation.
103
+ # • Apply the card type limit to Gateway when a value is NULL in the
104
+ # input. However, if the card type limit is NULL for the same field, then no
105
+ # limit will be applied in Gateway.
106
+ # • If ‘SetDefaultOnVelocityUpdate’ is ‘true’ then the operation will
107
+ # apply customer cardtype or OU level velocity limits on existing cards when
108
+ # restrictions are modified without providing custom values for all fields.
109
+ # @param [String] apikey Required parameter: This is the API key of the
110
+ # specific environment which needs to be passed by the client.
111
+ # @param [String] request_id Required parameter: Mandatory UUID (according
112
+ # to RFC 4122 standards) for requests and responses. This will be played
113
+ # back in the response from the request.
114
+ # @param [CardRestrictionReq] body Optional parameter: Card Restriction
115
+ # request body
116
+ # @return [CardRestrictionResponse] response from the API call.
117
+ def apply_restriction(apikey,
118
+ request_id,
119
+ body: nil)
120
+ new_api_call_builder
121
+ .request(new_request_builder(HttpMethodEnum::POST,
122
+ '/fleetmanagement/v2/restriction/card',
123
+ Server::SHELL)
124
+ .header_param(new_parameter(apikey, key: 'apikey'))
125
+ .header_param(new_parameter(request_id, key: 'RequestId'))
126
+ .header_param(new_parameter('application/json', key: 'Content-Type'))
127
+ .body_param(new_parameter(body))
128
+ .header_param(new_parameter('application/json', key: 'accept'))
129
+ .body_serializer(proc do |param| param.to_json unless param.nil? end)
130
+ .auth(Single.new('BasicAuth')))
131
+ .response(new_response_handler
132
+ .deserializer(APIHelper.method(:custom_type_deserializer))
133
+ .deserialize_into(CardRestrictionResponse.method(:from_hash))
134
+ .local_error('400',
135
+ "The server cannot or will not process the request due to'\
136
+ ' something that is perceived to be a client\r\n error (e.g.,'\
137
+ ' malformed request syntax, invalid \r\n request message'\
138
+ ' framing, or deceptive request routing).",
139
+ APIException)
140
+ .local_error('401',
141
+ 'The request has not been applied because it lacks valid '\
142
+ ' authentication credentials for the target resource.',
143
+ APIException)
144
+ .local_error('403',
145
+ 'The server understood the request but refuses to authorize it'\
146
+ '.',
147
+ APIException)
148
+ .local_error('404',
149
+ 'The origin server did not find a current representation for'\
150
+ ' the target resource or is not willing to disclose that one'\
151
+ ' exists.',
152
+ APIException)
153
+ .local_error('500',
154
+ 'The server encountered an unexpected condition the prevented'\
155
+ ' it from fulfilling the request.',
156
+ APIException))
157
+ .execute
158
+ end
159
+
9
160
  # This API enables clients to create a new card bundle and apply
10
161
  # restrictions.
11
162
  # #### Supported operations
@@ -35,49 +186,54 @@ module ShellCardManagementApIs
35
186
  # Monthly value if Weekly value is 0/blank.
36
187
  # * `0007` - Error returned if request parameters fail validation e.g.
37
188
  # mandatory check.
189
+ # @param [String] apikey Required parameter: This is the API key of the
190
+ # specific environment which needs to be passed by the client.
38
191
  # @param [String] request_id Required parameter: Mandatory UUID (according
39
192
  # to RFC 4122 standards) for requests and responses. This will be played
40
193
  # back in the response from the request.
41
- # @param [CreateBundleRequest] body Optional parameter: Create Bundle
42
- # Request body
43
- # @return [CreateBundleResponse] response from the API call
44
- def restriction_bundle_create(request_id,
45
- body: nil)
194
+ # @param [CreateBundleRequest] body Optional parameter: CreateBundle request
195
+ # body
196
+ # @return [CreateBundleResponse] response from the API call.
197
+ def create_bundle(apikey,
198
+ request_id,
199
+ body: nil)
46
200
  new_api_call_builder
47
201
  .request(new_request_builder(HttpMethodEnum::POST,
48
- '/card-restrictions/v1/bundles/create',
49
- Server::DEFAULT)
202
+ '/fleetmanagement/v1/restriction/createbundle',
203
+ Server::SHELL)
204
+ .header_param(new_parameter(apikey, key: 'apikey'))
50
205
  .header_param(new_parameter(request_id, key: 'RequestId'))
51
206
  .header_param(new_parameter('application/json', key: 'Content-Type'))
52
207
  .body_param(new_parameter(body))
53
208
  .header_param(new_parameter('application/json', key: 'accept'))
54
209
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
55
- .auth(Single.new('BearerToken')))
210
+ .auth(Single.new('BasicAuth')))
56
211
  .response(new_response_handler
57
- .deserializer(APIHelper.method(:custom_type_deserializer))
58
- .deserialize_into(CreateBundleResponse.method(:from_hash))
59
- .local_error('400',
60
- "The server cannot or will not process the request due to'\
61
- ' something that is perceived to be a client error (e.g.,'\
62
- ' malformed request syntax, invalid request message framing, or'\
63
- ' deceptive request routing).\n",
64
- ErrorObjectException)
65
- .local_error('401',
66
- "The request has not been applied because it lacks valid '\
67
- ' authentication credentials for the target resource.\n",
68
- ErrorObjectException)
69
- .local_error('403',
70
- 'Forbidden',
71
- ErrorObjectException)
72
- .local_error('404',
73
- "The origin server did not find a current representation for'\
74
- ' the target resource or is not willing to disclose that one'\
75
- ' exists.\n",
76
- ErrorObjectException)
77
- .local_error('500',
78
- "The server encountered an unexpected condition that prevented'\
79
- ' it from fulfilling the request.\n",
80
- ErrorObjectException))
212
+ .deserializer(APIHelper.method(:custom_type_deserializer))
213
+ .deserialize_into(CreateBundleResponse.method(:from_hash))
214
+ .local_error('400',
215
+ "The server cannot or will not process the request due to'\
216
+ ' something that is perceived to be a client\r\n error (e.g.,'\
217
+ ' malformed request syntax, invalid \r\n request message'\
218
+ ' framing, or deceptive request routing).",
219
+ APIException)
220
+ .local_error('401',
221
+ 'The request has not been applied because it lacks valid '\
222
+ ' authentication credentials for the target resource.',
223
+ APIException)
224
+ .local_error('403',
225
+ 'The server understood the request but refuses to authorize it'\
226
+ '.',
227
+ APIException)
228
+ .local_error('404',
229
+ 'The origin server did not find a current representation for'\
230
+ ' the target resource or is not willing to disclose that one'\
231
+ ' exists.',
232
+ APIException)
233
+ .local_error('500',
234
+ 'The server encountered an unexpected condition the prevented'\
235
+ ' it from fulfilling the request.',
236
+ APIException))
81
237
  .execute
82
238
  end
83
239
 
@@ -118,49 +274,54 @@ module ShellCardManagementApIs
118
274
  # for Update request action.
119
275
  # * `0007` - Error returned if request parameters fail validation e.g. at
120
276
  # least one card must be provided in the input.
277
+ # @param [String] apikey Required parameter: This is the API key of the
278
+ # specific environment which needs to be passed by the client.
121
279
  # @param [String] request_id Required parameter: Mandatory UUID (according
122
280
  # to RFC 4122 standards) for requests and responses. This will be played
123
281
  # back in the response from the request.
124
282
  # @param [UpdateBundleRequest] body Optional parameter: Update Bundle
125
- # Request body
126
- # @return [UpdateBundleResponse] response from the API call
127
- def restriction_bundle_update(request_id,
128
- body: nil)
283
+ # request body
284
+ # @return [UpdateBundleResponse] response from the API call.
285
+ def update_bundle(apikey,
286
+ request_id,
287
+ body: nil)
129
288
  new_api_call_builder
130
289
  .request(new_request_builder(HttpMethodEnum::POST,
131
- '/card-restrictions/v1/bundles/update',
132
- Server::DEFAULT)
290
+ '/fleetmanagement/v1/restriction/updatebundle',
291
+ Server::SHELL)
292
+ .header_param(new_parameter(apikey, key: 'apikey'))
133
293
  .header_param(new_parameter(request_id, key: 'RequestId'))
134
294
  .header_param(new_parameter('application/json', key: 'Content-Type'))
135
295
  .body_param(new_parameter(body))
136
296
  .header_param(new_parameter('application/json', key: 'accept'))
137
297
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
138
- .auth(Single.new('BearerToken')))
298
+ .auth(Single.new('BasicAuth')))
139
299
  .response(new_response_handler
140
- .deserializer(APIHelper.method(:custom_type_deserializer))
141
- .deserialize_into(UpdateBundleResponse.method(:from_hash))
142
- .local_error('400',
143
- "The server cannot or will not process the request due to'\
144
- ' something that is perceived to be a client error (e.g.,'\
145
- ' malformed request syntax, invalid request message framing, or'\
146
- ' deceptive request routing).\n",
147
- ErrorObjectException)
148
- .local_error('401',
149
- "The request has not been applied because it lacks valid '\
150
- ' authentication credentials for the target resource.\n",
151
- ErrorObjectException)
152
- .local_error('403',
153
- 'Forbidden',
154
- ErrorObjectException)
155
- .local_error('404',
156
- "The origin server did not find a current representation for'\
157
- ' the target resource or is not willing to disclose that one'\
158
- ' exists.\n",
159
- ErrorObjectException)
160
- .local_error('500',
161
- "The server encountered an unexpected condition that prevented'\
162
- ' it from fulfilling the request.\n",
163
- ErrorObjectException))
300
+ .deserializer(APIHelper.method(:custom_type_deserializer))
301
+ .deserialize_into(UpdateBundleResponse.method(:from_hash))
302
+ .local_error('400',
303
+ "The server cannot or will not process the request due to'\
304
+ ' something that is perceived to be a client\r\n error (e.g.,'\
305
+ ' malformed request syntax, invalid \r\n request message'\
306
+ ' framing, or deceptive request routing).",
307
+ APIException)
308
+ .local_error('401',
309
+ 'The request has not been applied because it lacks valid '\
310
+ ' authentication credentials for the target resource.',
311
+ APIException)
312
+ .local_error('403',
313
+ 'The server understood the request but refuses to authorize it'\
314
+ '.',
315
+ APIException)
316
+ .local_error('404',
317
+ 'The origin server did not find a current representation for'\
318
+ ' the target resource or is not willing to disclose that one'\
319
+ ' exists.',
320
+ APIException)
321
+ .local_error('500',
322
+ 'The server encountered an unexpected condition the prevented'\
323
+ ' it from fulfilling the request.',
324
+ APIException))
164
325
  .execute
165
326
  end
166
327
 
@@ -177,49 +338,54 @@ module ShellCardManagementApIs
177
338
  # Platform.
178
339
  # * `0007` - Error returned if request parameters fail validation e.g.
179
340
  # mandatory check.
341
+ # @param [String] apikey Required parameter: This is the API key of the
342
+ # specific environment which needs to be passed by the client.
180
343
  # @param [String] request_id Required parameter: Mandatory UUID (according
181
344
  # to RFC 4122 standards) for requests and responses. This will be played
182
345
  # back in the response from the request.
183
- # @param [DeleteBundleRequest] body Optional parameter: Delete Bundle
184
- # Request body
185
- # @return [DeleteBundleResponse] response from the API call
186
- def restriction_bundle_delete(request_id,
187
- body: nil)
346
+ # @param [DeleteBundleRequest] body Optional parameter: Update Bundle
347
+ # request body
348
+ # @return [DeleteBundleResponse] response from the API call.
349
+ def delete_bundle(apikey,
350
+ request_id,
351
+ body: nil)
188
352
  new_api_call_builder
189
353
  .request(new_request_builder(HttpMethodEnum::POST,
190
- '/card-restrictions/v1/bundles/delete',
191
- Server::DEFAULT)
354
+ '/fleetmanagement/v1/restriction/deletebundle',
355
+ Server::SHELL)
356
+ .header_param(new_parameter(apikey, key: 'apikey'))
192
357
  .header_param(new_parameter(request_id, key: 'RequestId'))
193
358
  .header_param(new_parameter('application/json', key: 'Content-Type'))
194
359
  .body_param(new_parameter(body))
195
360
  .header_param(new_parameter('application/json', key: 'accept'))
196
361
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
197
- .auth(Single.new('BearerToken')))
362
+ .auth(Single.new('BasicAuth')))
198
363
  .response(new_response_handler
199
- .deserializer(APIHelper.method(:custom_type_deserializer))
200
- .deserialize_into(DeleteBundleResponse.method(:from_hash))
201
- .local_error('400',
202
- "The server cannot or will not process the request due to'\
203
- ' something that is perceived to be a client error (e.g.,'\
204
- ' malformed request syntax, invalid request message framing, or'\
205
- ' deceptive request routing).\n",
206
- ErrorObjectException)
207
- .local_error('401',
208
- "The request has not been applied because it lacks valid '\
209
- ' authentication credentials for the target resource.\n",
210
- ErrorObjectException)
211
- .local_error('403',
212
- 'Forbidden',
213
- ErrorObjectException)
214
- .local_error('404',
215
- "The origin server did not find a current representation for'\
216
- ' the target resource or is not willing to disclose that one'\
217
- ' exists.\n",
218
- ErrorObjectException)
219
- .local_error('500',
220
- "The server encountered an unexpected condition that prevented'\
221
- ' it from fulfilling the request.\n",
222
- ErrorObjectException))
364
+ .deserializer(APIHelper.method(:custom_type_deserializer))
365
+ .deserialize_into(DeleteBundleResponse.method(:from_hash))
366
+ .local_error('400',
367
+ "The server cannot or will not process the request due to'\
368
+ ' something that is perceived to be a client\r\n error (e.g.,'\
369
+ ' malformed request syntax, invalid \r\n request message'\
370
+ ' framing, or deceptive request routing).",
371
+ APIException)
372
+ .local_error('401',
373
+ 'The request has not been applied because it lacks valid '\
374
+ ' authentication credentials for the target resource.',
375
+ APIException)
376
+ .local_error('403',
377
+ 'The server understood the request but refuses to authorize it'\
378
+ '.',
379
+ APIException)
380
+ .local_error('404',
381
+ 'The origin server did not find a current representation for'\
382
+ ' the target resource or is not willing to disclose that one'\
383
+ ' exists.',
384
+ APIException)
385
+ .local_error('500',
386
+ 'The server encountered an unexpected condition the prevented'\
387
+ ' it from fulfilling the request.',
388
+ APIException))
223
389
  .execute
224
390
  end
225
391
 
@@ -234,130 +400,86 @@ module ShellCardManagementApIs
234
400
  # left blank/null.
235
401
  # #### Supported operations
236
402
  # * Get summary of bundles by list of bundle Ids
403
+ # @param [String] apikey Required parameter: This is the API key of the
404
+ # specific environment which needs to be passed by the client.
237
405
  # @param [String] request_id Required parameter: Mandatory UUID (according
238
406
  # to RFC 4122 standards) for requests and responses. This will be played
239
407
  # back in the response from the request.
240
- # @param [SummaryOfBundleRequest] body Optional parameter: Summary Bundle
241
- # Request body
242
- # @return [SummaryOfBundleResponse] response from the API call
243
- def restriction_bundle_summary(request_id,
244
- body: nil)
245
- new_api_call_builder
246
- .request(new_request_builder(HttpMethodEnum::POST,
247
- '/card-restrictions/v1/bundles/Summary',
248
- Server::DEFAULT)
249
- .header_param(new_parameter(request_id, key: 'RequestId'))
250
- .header_param(new_parameter('application/json', key: 'Content-Type'))
251
- .body_param(new_parameter(body))
252
- .header_param(new_parameter('application/json', key: 'accept'))
253
- .body_serializer(proc do |param| param.to_json unless param.nil? end)
254
- .auth(Single.new('BearerToken')))
255
- .response(new_response_handler
256
- .deserializer(APIHelper.method(:custom_type_deserializer))
257
- .deserialize_into(SummaryOfBundleResponse.method(:from_hash))
258
- .local_error('400',
259
- "The server cannot or will not process the request due to'\
260
- ' something that is perceived to be a client error (e.g.,'\
261
- ' malformed request syntax, invalid request message framing, or'\
262
- ' deceptive request routing).\n",
263
- ErrorObjectException)
264
- .local_error('401',
265
- "The request has not been applied because it lacks valid '\
266
- ' authentication credentials for the target resource.\n",
267
- ErrorObjectException)
268
- .local_error('403',
269
- 'Forbidden',
270
- ErrorObjectException)
271
- .local_error('404',
272
- "The origin server did not find a current representation for'\
273
- ' the target resource or is not willing to disclose that one'\
274
- ' exists.\n",
275
- ErrorObjectException)
276
- .local_error('500',
277
- "The server encountered an unexpected condition that prevented'\
278
- ' it from fulfilling the request.\n",
279
- ErrorObjectException))
280
- .execute
281
- end
282
-
283
- # This API allows to set or update the restrictions for existing cards or
284
- # newly ordered cards under the same payer.
285
- # #### Supported operations
286
- # * Set or reset usage restrictions for cards
287
- # * Set or reset day/time restrictions for cards
288
- # * Set or reset product restrictions for cards
289
- # * Set or reset location restrictions for cards
290
- # @param [String] request_id Required parameter: Mandatory UUID (according
291
- # to RFC 4122 standards) for requests and responses. This will be played
292
- # back in the response from the request.
293
- # @param [RestrictionCardRequest] body Optional parameter: Summary Bundle
294
- # Request body
295
- # @return [RestrictionCardResponse] response from the API call
296
- def card_restriction(request_id,
408
+ # @param [SummaryofbundlerRequest] body Optional parameter: Summary of
409
+ # Bundle request body
410
+ # @return [SummaryofbundleResponse] response from the API call.
411
+ def summaryofbundles(apikey,
412
+ request_id,
297
413
  body: nil)
298
414
  new_api_call_builder
299
415
  .request(new_request_builder(HttpMethodEnum::POST,
300
- '/card-restrictions/v2/card',
301
- Server::DEFAULT)
416
+ '/fleetmanagement/v1/restriction/summaryofbundles',
417
+ Server::SHELL)
418
+ .header_param(new_parameter(apikey, key: 'apikey'))
302
419
  .header_param(new_parameter(request_id, key: 'RequestId'))
303
420
  .header_param(new_parameter('application/json', key: 'Content-Type'))
304
421
  .body_param(new_parameter(body))
305
422
  .header_param(new_parameter('application/json', key: 'accept'))
306
423
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
307
- .auth(Single.new('BearerToken')))
424
+ .auth(Single.new('BasicAuth')))
308
425
  .response(new_response_handler
309
- .deserializer(APIHelper.method(:custom_type_deserializer))
310
- .deserialize_into(RestrictionCardResponse.method(:from_hash))
311
- .local_error('400',
312
- "The server cannot or will not process the request due to'\
313
- ' something that is perceived to be a client error (e.g.,'\
314
- ' malformed request syntax, invalid request message framing, or'\
315
- ' deceptive request routing).\n",
316
- ErrorObjectException)
317
- .local_error('401',
318
- "The request has not been applied because it lacks valid '\
319
- ' authentication credentials for the target resource.\n",
320
- ErrorObjectException)
321
- .local_error('403',
322
- 'Forbidden',
323
- ErrorObjectException)
324
- .local_error('404',
325
- "The origin server did not find a current representation for'\
326
- ' the target resource or is not willing to disclose that one'\
327
- ' exists.\n",
328
- ErrorObjectException)
329
- .local_error('500',
330
- "The server encountered an unexpected condition that prevented'\
331
- ' it from fulfilling the request.\n",
332
- ErrorObjectException))
426
+ .deserializer(APIHelper.method(:custom_type_deserializer))
427
+ .deserialize_into(SummaryofbundleResponse.method(:from_hash))
428
+ .local_error('400',
429
+ "The server cannot or will not process the request due to'\
430
+ ' something that is perceived to be a client\r\n error (e.g.,'\
431
+ ' malformed request syntax, invalid \r\n request message'\
432
+ ' framing, or deceptive request routing).",
433
+ APIException)
434
+ .local_error('401',
435
+ 'The request has not been applied because it lacks valid '\
436
+ ' authentication credentials for the target resource.',
437
+ APIException)
438
+ .local_error('403',
439
+ 'The server understood the request but refuses to authorize it'\
440
+ '.',
441
+ APIException)
442
+ .local_error('404',
443
+ 'The origin server did not find a current representation for'\
444
+ ' the target resource or is not willing to disclose that one'\
445
+ ' exists.',
446
+ APIException)
447
+ .local_error('500',
448
+ 'The server encountered an unexpected condition the prevented'\
449
+ ' it from fulfilling the request.',
450
+ APIException))
333
451
  .execute
334
452
  end
335
453
 
336
- # This operation allows setting or updating the usage restrictions of an
337
- # existing account.
338
- # #### Validation rules
339
- # * The account exists.
340
- # * Day time restriction cannot be set to restrict the use of a card, under
341
- # the account, on all days of the week.
342
- # * Either of the usage, daytime or location is either marked for reset or
343
- # new restriction values provided for the account.
344
- # * In usage restrictions, the limits per transaction should be less than or
345
- # equal to Daily, Daily should be less than or equal to Weekly, Weekly
454
+ # This API allows setting or updating the usage restrictions of an existing
455
+ # account.
456
+ # Then validation rules applied for this API.
457
+ # The account exists.
458
+ # Day time restriction cannot be set to restrict the use of a card,
459
+ # under the account, on all days of the week.
460
+ # Either of the usage, daytime or location is either marked for reset
461
+ # or new restriction values provided for the account.
462
+ # In usage restrictions, the limits per transaction should be less than
463
+ # or equal to Daily, Daily should be less than or equal to Weekly, Weekly
346
464
  # should be less than or equal to Monthly. Exception being 0/blank will be
347
465
  # skipped, i.e., Daily value should be less than equal to Monthly value if
348
466
  # Weekly value is 0/blank.
467
+ # @param [String] apikey Required parameter: This is the API key of the
468
+ # specific environment which needs to be passed by the client.
349
469
  # @param [String] request_id Required parameter: Mandatory UUID (according
350
470
  # to RFC 4122 standards) for requests and responses. This will be played
351
471
  # back in the response from the request.
352
- # @param [AccountRestrictionRequest] body Optional parameter: Summary Bundle
353
- # Request body
354
- # @return [AccountRestrictionResponse] response from the API call
355
- def account_restriction(request_id,
472
+ # @param [AccountRestrictionRequest] body Optional parameter: Account
473
+ # Restriction request body
474
+ # @return [AccountRestrictionResponse] response from the API call.
475
+ def restriction_account(apikey,
476
+ request_id,
356
477
  body: nil)
357
478
  new_api_call_builder
358
479
  .request(new_request_builder(HttpMethodEnum::POST,
359
- '/card-restrictions/v1/Account',
360
- Server::DEFAULT)
480
+ '/fleetmanagement/v1/restriction/account',
481
+ Server::SHELL)
482
+ .header_param(new_parameter(apikey, key: 'apikey'))
361
483
  .header_param(new_parameter(request_id, key: 'RequestId'))
362
484
  .header_param(new_parameter('application/json', key: 'Content-Type'))
363
485
  .body_param(new_parameter(body))
@@ -365,131 +487,139 @@ module ShellCardManagementApIs
365
487
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
366
488
  .auth(Single.new('BearerToken')))
367
489
  .response(new_response_handler
368
- .deserializer(APIHelper.method(:custom_type_deserializer))
369
- .deserialize_into(AccountRestrictionResponse.method(:from_hash))
370
- .local_error('400',
371
- "The server cannot or will not process the request due to'\
372
- ' something that is perceived to be a client error (e.g.,'\
373
- ' malformed request syntax, invalid request message framing, or'\
374
- ' deceptive request routing).\n",
375
- ErrorObjectException)
376
- .local_error('401',
377
- "The request has not been applied because it lacks valid '\
378
- ' authentication credentials for the target resource.\n",
379
- ErrorObjectException)
380
- .local_error('403',
381
- 'Forbidden',
382
- ErrorObjectException)
383
- .local_error('404',
384
- "The origin server did not find a current representation for'\
385
- ' the target resource or is not willing to disclose that one'\
386
- ' exists.\n",
387
- ErrorObjectException)
388
- .local_error('500',
389
- "The server encountered an unexpected condition that prevented'\
390
- ' it from fulfilling the request.\n",
391
- ErrorObjectException))
490
+ .deserializer(APIHelper.method(:custom_type_deserializer))
491
+ .deserialize_into(AccountRestrictionResponse.method(:from_hash))
492
+ .local_error('400',
493
+ "The server cannot or will not process the request due to'\
494
+ ' something that is perceived to be a client\r\n error (e.g.,'\
495
+ ' malformed request syntax, invalid \r\n request message'\
496
+ ' framing, or deceptive request routing).",
497
+ APIException)
498
+ .local_error('401',
499
+ 'The request has not been applied because it lacks valid '\
500
+ ' authentication credentials for the target resource.',
501
+ APIException)
502
+ .local_error('403',
503
+ 'The server understood the request but refuses to authorize it'\
504
+ '.',
505
+ APIException)
506
+ .local_error('404',
507
+ 'The origin server did not find a current representation for'\
508
+ ' the target resource or is not willing to disclose that one'\
509
+ ' exists.',
510
+ APIException)
511
+ .local_error('500',
512
+ 'The server encountered an unexpected condition the prevented'\
513
+ ' it from fulfilling the request.',
514
+ APIException))
392
515
  .execute
393
516
  end
394
517
 
395
- # This operation will allow user to get account level limits for the given
396
- # account.
397
- # It returns the velocity limits if its overridden at the account else the
398
- # values will be null/empty.
518
+ # This API will allow user to get account level limits for the given
519
+ # account. It returns the velocity limits if its overridden at the account
520
+ # else the values will be null/empty.
521
+ # @param [String] apikey Required parameter: This is the API key of the
522
+ # specific environment which needs to be passed by the client.
399
523
  # @param [String] request_id Required parameter: Mandatory UUID (according
400
524
  # to RFC 4122 standards) for requests and responses. This will be played
401
525
  # back in the response from the request.
402
- # @param [SearchAccountLimitRequest] body Optional parameter: Summary Bundle
403
- # Request body
404
- # @return [SearchAccountLimitResponse] response from the API call
405
- def search_account_limit(request_id,
526
+ # @param [SearchAccountLimitRequest] body Optional parameter: Search Account
527
+ # Limit RequestBody
528
+ # @return [SearchAccountLimitResponse] response from the API call.
529
+ def search_account_limit(apikey,
530
+ request_id,
406
531
  body: nil)
407
532
  new_api_call_builder
408
533
  .request(new_request_builder(HttpMethodEnum::POST,
409
- '/card-restrictions/v1/searchaccountlimit',
410
- Server::DEFAULT)
534
+ '/fleetmanagement/v1/restriction/searchaccountlimit',
535
+ Server::SHELL)
536
+ .header_param(new_parameter(apikey, key: 'apikey'))
411
537
  .header_param(new_parameter(request_id, key: 'RequestId'))
412
538
  .header_param(new_parameter('application/json', key: 'Content-Type'))
413
539
  .body_param(new_parameter(body))
414
540
  .header_param(new_parameter('application/json', key: 'accept'))
415
541
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
416
- .auth(Single.new('BearerToken')))
542
+ .auth(Single.new('BasicAuth')))
417
543
  .response(new_response_handler
418
- .deserializer(APIHelper.method(:custom_type_deserializer))
419
- .deserialize_into(SearchAccountLimitResponse.method(:from_hash))
420
- .local_error('400',
421
- "The server cannot or will not process the request due to'\
422
- ' something that is perceived to be a client error (e.g.,'\
423
- ' malformed request syntax, invalid request message framing, or'\
424
- ' deceptive request routing).\n",
425
- ErrorObjectException)
426
- .local_error('401',
427
- "The request has not been applied because it lacks valid '\
428
- ' authentication credentials for the target resource.\n",
429
- ErrorObjectException)
430
- .local_error('403',
431
- 'Forbidden',
432
- ErrorObjectException)
433
- .local_error('404',
434
- "The origin server did not find a current representation for'\
435
- ' the target resource or is not willing to disclose that one'\
436
- ' exists.\n",
437
- ErrorObjectException)
438
- .local_error('500',
439
- "The server encountered an unexpected condition that prevented'\
440
- ' it from fulfilling the request.\n",
441
- ErrorObjectException))
544
+ .deserializer(APIHelper.method(:custom_type_deserializer))
545
+ .deserialize_into(SearchAccountLimitResponse.method(:from_hash))
546
+ .local_error('400',
547
+ "The server cannot or will not process the request due to'\
548
+ ' something that is perceived to be a client\r\n error (e.g.,'\
549
+ ' malformed request syntax, invalid \r\n request message'\
550
+ ' framing, or deceptive request routing).",
551
+ APIException)
552
+ .local_error('401',
553
+ 'The request has not been applied because it lacks valid '\
554
+ ' authentication credentials for the target resource.',
555
+ APIException)
556
+ .local_error('403',
557
+ 'The server understood the request but refuses to authorize it'\
558
+ '.',
559
+ APIException)
560
+ .local_error('404',
561
+ 'The origin server did not find a current representation for'\
562
+ ' the target resource or is not willing to disclose that one'\
563
+ ' exists.',
564
+ APIException)
565
+ .local_error('500',
566
+ 'The server encountered an unexpected condition the prevented'\
567
+ ' it from fulfilling the request.',
568
+ APIException))
442
569
  .execute
443
570
  end
444
571
 
445
- # This API will allows querying card details including the day/time and
446
- # product restrictions.
447
- # #### Supported operations
448
- # * Search by list of cards or bundle
449
- # * Include card bundle details (optional)
572
+ # This API allows to get the details of a specific card bundle. It returns
573
+ # the bundle basic details along with the cards in the bundle and
574
+ # restrictions applied on them.
575
+ # @param [String] apikey Required parameter: This is the API key of the
576
+ # specific environment which needs to be passed by the client.
450
577
  # @param [String] request_id Required parameter: Mandatory UUID (according
451
578
  # to RFC 4122 standards) for requests and responses. This will be played
452
579
  # back in the response from the request.
453
- # @param [RestrictionSearchCardRequest] body Optional parameter: Summary
454
- # Bundle Request body
455
- # @return [RestrictionSearchCardResponse] response from the API call
456
- def search_card_restriction(request_id,
457
- body: nil)
580
+ # @param [BudleDetailsRequest] body Optional parameter: Bundle Details
581
+ # Request body
582
+ # @return [BundleDetailsResponse] response from the API call.
583
+ def bundledetails(apikey,
584
+ request_id,
585
+ body: nil)
458
586
  new_api_call_builder
459
587
  .request(new_request_builder(HttpMethodEnum::POST,
460
- '/card-restrictions/v2/search',
461
- Server::DEFAULT)
588
+ '/fleetmanagement/v1/restriction/bundledetails',
589
+ Server::SHELL)
590
+ .header_param(new_parameter(apikey, key: 'apikey'))
462
591
  .header_param(new_parameter(request_id, key: 'RequestId'))
463
592
  .header_param(new_parameter('application/json', key: 'Content-Type'))
464
593
  .body_param(new_parameter(body))
465
594
  .header_param(new_parameter('application/json', key: 'accept'))
466
595
  .body_serializer(proc do |param| param.to_json unless param.nil? end)
467
- .auth(Single.new('BearerToken')))
596
+ .auth(Single.new('BasicAuth')))
468
597
  .response(new_response_handler
469
- .deserializer(APIHelper.method(:custom_type_deserializer))
470
- .deserialize_into(RestrictionSearchCardResponse.method(:from_hash))
471
- .local_error('400',
472
- "The server cannot or will not process the request due to'\
473
- ' something that is perceived to be a client error (e.g.,'\
474
- ' malformed request syntax, invalid request message framing, or'\
475
- ' deceptive request routing).\n",
476
- ErrorObjectException)
477
- .local_error('401',
478
- "The request has not been applied because it lacks valid '\
479
- ' authentication credentials for the target resource.\n",
480
- ErrorObjectException)
481
- .local_error('403',
482
- 'Forbidden',
483
- ErrorObjectException)
484
- .local_error('404',
485
- "The origin server did not find a current representation for'\
486
- ' the target resource or is not willing to disclose that one'\
487
- ' exists.\n",
488
- ErrorObjectException)
489
- .local_error('500',
490
- "The server encountered an unexpected condition that prevented'\
491
- ' it from fulfilling the request.\n",
492
- ErrorObjectException))
598
+ .deserializer(APIHelper.method(:custom_type_deserializer))
599
+ .deserialize_into(BundleDetailsResponse.method(:from_hash))
600
+ .local_error('400',
601
+ "The server cannot or will not process the request due to'\
602
+ ' something that is perceived to be a client\r\n error (e.g.,'\
603
+ ' malformed request syntax, invalid \r\n request message'\
604
+ ' framing, or deceptive request routing).",
605
+ APIException)
606
+ .local_error('401',
607
+ 'The request has not been applied because it lacks valid '\
608
+ ' authentication credentials for the target resource.',
609
+ APIException)
610
+ .local_error('403',
611
+ 'The server understood the request but refuses to authorize it'\
612
+ '.',
613
+ APIException)
614
+ .local_error('404',
615
+ 'The origin server did not find a current representation for'\
616
+ ' the target resource or is not willing to disclose that one'\
617
+ ' exists.',
618
+ APIException)
619
+ .local_error('500',
620
+ 'The server encountered an unexpected condition the prevented'\
621
+ ' it from fulfilling the request.',
622
+ APIException))
493
623
  .execute
494
624
  end
495
625
  end