card-management-sdk 1.0.0 → 1.1.0

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