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
@@ -9,77 +9,74 @@ module ShellCardManagementApIs
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # True/False
13
- # A value indicates if the day/time restriction is to be reset for card
14
- # bundle.
15
- # Optional
16
- # Default value is False.
17
- # @return [TrueClass | FalseClass]
18
- attr_accessor :reset_day_time_restriction
19
-
20
- # True/False
21
- # A value indicates if the location restriction is to be reset for card
22
- # bundle.
23
- # Optional
24
- # Default value is False.
25
- # @return [TrueClass | FalseClass]
26
- attr_accessor :reset_location_restriction
27
-
28
- # True/False
29
- # A value indicates if the product restriction is to be reset for card
30
- # bundle.
31
- # Optional
32
- # Default value is False.
33
- # @return [TrueClass | FalseClass]
34
- attr_accessor :reset_product_restriction
35
-
36
- # True/False
37
- # A value indicates if the product restriction is to be reset for card
38
- # bundle.
39
- # Optional
40
- # Default value is False.
41
- # @return [UsageRestrictions]
12
+ # The value indicates what actions to be performed with respect to day time
13
+ # restriction.
14
+ # Mandatory
15
+ # Allowed values –
16
+ # • Add: Apply the given restriction on the bundle.
17
+ # • Default: No Day/Time restriction will be applied on the bundle in
18
+ # Gateway.
19
+ # @return [String]
20
+ attr_accessor :day_time_restriction_action
21
+
22
+ # The value indicates what actions to be performed with respect to location
23
+ # restriction.
24
+ # Mandatory
25
+ # Allowed values
26
+ # • Add: Apply the given restriction on the bundle.
27
+ # • Default: No location restriction will be applied on the bundle in
28
+ # Gateway.
29
+ # @return [String]
30
+ attr_accessor :location_restriction_action
31
+
32
+ # The value indicates what actions to be performed with respect to location
33
+ # restriction.
34
+ # Mandatory
35
+ # Allowed values –
36
+ # • Add: Apply the given restriction on the bundle.
37
+ # • Default: No location restriction will be applied on the bundle in
38
+ # Gateway.
39
+ # @return [Object]
42
40
  attr_accessor :usage_restrictions
43
41
 
44
- # Day/time restrictions such as weekdays and time range to be applied on the
45
- # bundle.
46
- # Mandatory if respective action is set as “Add”.
47
- # The details of DayTimeRestriction entity is given below.
42
+ # The value indicates what actions to be performed with respect to location
43
+ # restriction.
44
+ # Mandatory
45
+ # Allowed values
46
+ # • Add: Apply the given restriction on the bundle.
47
+ # • Default: No location restriction will be applied on the bundle in
48
+ # Gateway.
48
49
  # @return [DayTimeRestrictions]
49
50
  attr_accessor :day_time_restrictions
50
51
 
51
- # Day/time restrictions such as weekdays and time range to be applied on the
52
- # bundle.
53
- # Mandatory if respective action is set as “Add”.
54
- # The details of DayTimeRestriction entity is given below.
55
- # @return [ProductRestrictions]
56
- attr_accessor :product_restriction
57
-
58
- # Identifier of the location restriction profile to be updated for the
59
- # bundle in Gateway.
60
- # Optional
61
- # @return [String]
62
- attr_accessor :location_restriction_profile_id
63
-
64
- # Location restrictions to be applied on the bundle which either allows or
65
- # restricts using the cards, which are under the bundle, in the specified
66
- # locations.
67
- # Mandatory if respective action is set as “Add”.
68
- # Details of location restrictions are given below.
69
- # @return [LocationRestrictions]
52
+ # The value indicates what actions to be performed with respect to location
53
+ # restriction.
54
+ # Mandatory
55
+ # Allowed values
56
+ # • Add: Apply the given restriction on the bundle.
57
+ # • Default: No location restriction will be applied on the bundle in
58
+ # Gateway.
59
+ # @return [Object]
60
+ attr_accessor :product_restrictions
61
+
62
+ # The value indicates what actions to be performed with respect to location
63
+ # restriction.
64
+ # Mandatory
65
+ # Allowed values
66
+ # • Add: Apply the given restriction on the bundle.
67
+ # • Default: No location restriction will be applied on the bundle in
68
+ # Gateway.
69
+ # @return [LocationRestriction]
70
70
  attr_accessor :location_restrictions
71
71
 
72
72
  # A mapping from model property names to API property names.
73
73
  def self.names
74
74
  @_hash = {} if @_hash.nil?
75
- @_hash['reset_day_time_restriction'] = 'ResetDayTimeRestriction'
76
- @_hash['reset_location_restriction'] = 'ResetLocationRestriction'
77
- @_hash['reset_product_restriction'] = 'ResetProductRestriction'
75
+ @_hash['day_time_restriction_action'] = 'DayTimeRestrictionAction'
76
+ @_hash['location_restriction_action'] = 'LocationRestrictionAction'
78
77
  @_hash['usage_restrictions'] = 'UsageRestrictions'
79
78
  @_hash['day_time_restrictions'] = 'DayTimeRestrictions'
80
- @_hash['product_restriction'] = 'ProductRestriction'
81
- @_hash['location_restriction_profile_id'] =
82
- 'LocationRestrictionProfileId'
79
+ @_hash['product_restrictions'] = 'ProductRestrictions'
83
80
  @_hash['location_restrictions'] = 'LocationRestrictions'
84
81
  @_hash
85
82
  end
@@ -87,49 +84,38 @@ module ShellCardManagementApIs
87
84
  # An array for optional fields
88
85
  def self.optionals
89
86
  %w[
90
- reset_day_time_restriction
91
- reset_location_restriction
92
- reset_product_restriction
87
+ day_time_restriction_action
88
+ location_restriction_action
93
89
  usage_restrictions
94
90
  day_time_restrictions
95
- product_restriction
96
- location_restriction_profile_id
91
+ product_restrictions
97
92
  location_restrictions
98
93
  ]
99
94
  end
100
95
 
101
96
  # An array for nullable fields
102
97
  def self.nullables
103
- []
98
+ %w[
99
+ day_time_restriction_action
100
+ location_restriction_action
101
+ ]
104
102
  end
105
103
 
106
- def initialize(reset_day_time_restriction = false,
107
- reset_location_restriction = false,
108
- reset_product_restriction = false,
109
- usage_restrictions = SKIP,
110
- day_time_restrictions = SKIP,
111
- product_restriction = SKIP,
112
- location_restriction_profile_id = SKIP,
113
- location_restrictions = SKIP)
114
- unless reset_day_time_restriction == SKIP
115
- @reset_day_time_restriction =
116
- reset_day_time_restriction
117
- end
118
- unless reset_location_restriction == SKIP
119
- @reset_location_restriction =
120
- reset_location_restriction
104
+ def initialize(day_time_restriction_action = SKIP,
105
+ location_restriction_action = SKIP,
106
+ usage_restrictions = SKIP, day_time_restrictions = SKIP,
107
+ product_restrictions = SKIP, location_restrictions = SKIP)
108
+ unless day_time_restriction_action == SKIP
109
+ @day_time_restriction_action =
110
+ day_time_restriction_action
121
111
  end
122
- unless reset_product_restriction == SKIP
123
- @reset_product_restriction =
124
- reset_product_restriction
112
+ unless location_restriction_action == SKIP
113
+ @location_restriction_action =
114
+ location_restriction_action
125
115
  end
126
116
  @usage_restrictions = usage_restrictions unless usage_restrictions == SKIP
127
117
  @day_time_restrictions = day_time_restrictions unless day_time_restrictions == SKIP
128
- @product_restriction = product_restriction unless product_restriction == SKIP
129
- unless location_restriction_profile_id == SKIP
130
- @location_restriction_profile_id =
131
- location_restriction_profile_id
132
- end
118
+ @product_restrictions = product_restrictions unless product_restrictions == SKIP
133
119
  @location_restrictions = location_restrictions unless location_restrictions == SKIP
134
120
  end
135
121
 
@@ -138,28 +124,25 @@ module ShellCardManagementApIs
138
124
  return nil unless hash
139
125
 
140
126
  # Extract variables from the hash.
141
- reset_day_time_restriction = hash['ResetDayTimeRestriction'] ||= false
142
- reset_location_restriction = hash['ResetLocationRestriction'] ||= false
143
- reset_product_restriction = hash['ResetProductRestriction'] ||= false
144
- usage_restrictions = UsageRestrictions.from_hash(hash['UsageRestrictions']) if
145
- hash['UsageRestrictions']
127
+ day_time_restriction_action =
128
+ hash.key?('DayTimeRestrictionAction') ? hash['DayTimeRestrictionAction'] : SKIP
129
+ location_restriction_action =
130
+ hash.key?('LocationRestrictionAction') ? hash['LocationRestrictionAction'] : SKIP
131
+ usage_restrictions =
132
+ hash.key?('UsageRestrictions') ? hash['UsageRestrictions'] : SKIP
146
133
  day_time_restrictions = DayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if
147
134
  hash['DayTimeRestrictions']
148
- product_restriction = ProductRestrictions.from_hash(hash['ProductRestriction']) if
149
- hash['ProductRestriction']
150
- location_restriction_profile_id =
151
- hash.key?('LocationRestrictionProfileId') ? hash['LocationRestrictionProfileId'] : SKIP
152
- location_restrictions = LocationRestrictions.from_hash(hash['LocationRestrictions']) if
135
+ product_restrictions =
136
+ hash.key?('ProductRestrictions') ? hash['ProductRestrictions'] : SKIP
137
+ location_restrictions = LocationRestriction.from_hash(hash['LocationRestrictions']) if
153
138
  hash['LocationRestrictions']
154
139
 
155
140
  # Create object from extracted values.
156
- BundleRestriction.new(reset_day_time_restriction,
157
- reset_location_restriction,
158
- reset_product_restriction,
141
+ BundleRestriction.new(day_time_restriction_action,
142
+ location_restriction_action,
159
143
  usage_restrictions,
160
144
  day_time_restrictions,
161
- product_restriction,
162
- location_restriction_profile_id,
145
+ product_restrictions,
163
146
  location_restrictions)
164
147
  end
165
148
  end
@@ -0,0 +1,185 @@
1
+ # shell_card_management_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellCardManagementApIs
7
+ # BundleRestrictionUpdate Model.
8
+ class BundleRestrictionUpdate < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # True/False
13
+ # A value indicates if the day/time restriction is to be reset for card
14
+ # bundle.
15
+ # Optional
16
+ # Default value is False.
17
+ # @return [TrueClass | FalseClass]
18
+ attr_accessor :reset_day_time_restriction
19
+
20
+ # True/False
21
+ # A value indicates if the location restriction is to be reset for card
22
+ # bundle.
23
+ # Optional
24
+ # Default value is False.
25
+ # @return [TrueClass | FalseClass]
26
+ attr_accessor :reset_location_restriction
27
+
28
+ # True/False
29
+ # A value indicates if the product restriction is to be reset for card
30
+ # bundle.
31
+ # Optional
32
+ # Default value is False.
33
+ # @return [TrueClass | FalseClass]
34
+ attr_accessor :reset_product_restriction
35
+
36
+ # True/False
37
+ # A value indicates if the product restriction is to be reset for card
38
+ # bundle.
39
+ # Optional
40
+ # Default value is False.
41
+ # @return [Object]
42
+ attr_accessor :usage_restrictions
43
+
44
+ # Identifier of the day/time restriction profile to be updated for the
45
+ # bundle in Gateway.
46
+ # Optional
47
+ # @return [String]
48
+ attr_accessor :day_time_restriction_profile_id
49
+
50
+ # Identifier of the day/time restriction profile to be updated for the
51
+ # bundle in Gateway.
52
+ # Optional
53
+ # @return [CardDayTimeRestrictions]
54
+ attr_accessor :day_time_restrictions
55
+
56
+ # Identifier of the day/time restriction profile to be updated for the
57
+ # bundle in Gateway.
58
+ # Optional
59
+ # @return [Object]
60
+ attr_accessor :product_restrictions
61
+
62
+ # Identifier of the location restriction profile to be updated for the
63
+ # bundle in Gateway.
64
+ # Optional
65
+ # @return [String]
66
+ attr_accessor :location_restriction_profile_id
67
+
68
+ # Identifier of the location restriction profile to be updated for the
69
+ # bundle in Gateway.
70
+ # Optional
71
+ # @return [LocationRestriction]
72
+ attr_accessor :location_restrictions
73
+
74
+ # A mapping from model property names to API property names.
75
+ def self.names
76
+ @_hash = {} if @_hash.nil?
77
+ @_hash['reset_day_time_restriction'] = 'ResetDayTimeRestriction'
78
+ @_hash['reset_location_restriction'] = 'ResetLocationRestriction'
79
+ @_hash['reset_product_restriction'] = 'ResetProductRestriction'
80
+ @_hash['usage_restrictions'] = 'UsageRestrictions'
81
+ @_hash['day_time_restriction_profile_id'] =
82
+ 'DayTimeRestrictionProfileId'
83
+ @_hash['day_time_restrictions'] = 'DayTimeRestrictions'
84
+ @_hash['product_restrictions'] = 'ProductRestrictions'
85
+ @_hash['location_restriction_profile_id'] =
86
+ 'LocationRestrictionProfileId'
87
+ @_hash['location_restrictions'] = 'LocationRestrictions'
88
+ @_hash
89
+ end
90
+
91
+ # An array for optional fields
92
+ def self.optionals
93
+ %w[
94
+ reset_day_time_restriction
95
+ reset_location_restriction
96
+ reset_product_restriction
97
+ usage_restrictions
98
+ day_time_restriction_profile_id
99
+ day_time_restrictions
100
+ product_restrictions
101
+ location_restriction_profile_id
102
+ location_restrictions
103
+ ]
104
+ end
105
+
106
+ # An array for nullable fields
107
+ def self.nullables
108
+ %w[
109
+ reset_day_time_restriction
110
+ reset_location_restriction
111
+ reset_product_restriction
112
+ day_time_restriction_profile_id
113
+ ]
114
+ end
115
+
116
+ def initialize(reset_day_time_restriction = SKIP,
117
+ reset_location_restriction = SKIP,
118
+ reset_product_restriction = SKIP, usage_restrictions = SKIP,
119
+ day_time_restriction_profile_id = SKIP,
120
+ day_time_restrictions = SKIP, product_restrictions = SKIP,
121
+ location_restriction_profile_id = SKIP,
122
+ location_restrictions = SKIP)
123
+ unless reset_day_time_restriction == SKIP
124
+ @reset_day_time_restriction =
125
+ reset_day_time_restriction
126
+ end
127
+ unless reset_location_restriction == SKIP
128
+ @reset_location_restriction =
129
+ reset_location_restriction
130
+ end
131
+ unless reset_product_restriction == SKIP
132
+ @reset_product_restriction =
133
+ reset_product_restriction
134
+ end
135
+ @usage_restrictions = usage_restrictions unless usage_restrictions == SKIP
136
+ unless day_time_restriction_profile_id == SKIP
137
+ @day_time_restriction_profile_id =
138
+ day_time_restriction_profile_id
139
+ end
140
+ @day_time_restrictions = day_time_restrictions unless day_time_restrictions == SKIP
141
+ @product_restrictions = product_restrictions unless product_restrictions == SKIP
142
+ unless location_restriction_profile_id == SKIP
143
+ @location_restriction_profile_id =
144
+ location_restriction_profile_id
145
+ end
146
+ @location_restrictions = location_restrictions unless location_restrictions == SKIP
147
+ end
148
+
149
+ # Creates an instance of the object from a hash.
150
+ def self.from_hash(hash)
151
+ return nil unless hash
152
+
153
+ # Extract variables from the hash.
154
+ reset_day_time_restriction =
155
+ hash.key?('ResetDayTimeRestriction') ? hash['ResetDayTimeRestriction'] : SKIP
156
+ reset_location_restriction =
157
+ hash.key?('ResetLocationRestriction') ? hash['ResetLocationRestriction'] : SKIP
158
+ reset_product_restriction =
159
+ hash.key?('ResetProductRestriction') ? hash['ResetProductRestriction'] : SKIP
160
+ usage_restrictions =
161
+ hash.key?('UsageRestrictions') ? hash['UsageRestrictions'] : SKIP
162
+ day_time_restriction_profile_id =
163
+ hash.key?('DayTimeRestrictionProfileId') ? hash['DayTimeRestrictionProfileId'] : SKIP
164
+ day_time_restrictions = CardDayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if
165
+ hash['DayTimeRestrictions']
166
+ product_restrictions =
167
+ hash.key?('ProductRestrictions') ? hash['ProductRestrictions'] : SKIP
168
+ location_restriction_profile_id =
169
+ hash.key?('LocationRestrictionProfileId') ? hash['LocationRestrictionProfileId'] : SKIP
170
+ location_restrictions = LocationRestriction.from_hash(hash['LocationRestrictions']) if
171
+ hash['LocationRestrictions']
172
+
173
+ # Create object from extracted values.
174
+ BundleRestrictionUpdate.new(reset_day_time_restriction,
175
+ reset_location_restriction,
176
+ reset_product_restriction,
177
+ usage_restrictions,
178
+ day_time_restriction_profile_id,
179
+ day_time_restrictions,
180
+ product_restrictions,
181
+ location_restriction_profile_id,
182
+ location_restrictions)
183
+ end
184
+ end
185
+ end
@@ -0,0 +1,116 @@
1
+ # shell_card_management_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellCardManagementApIs
7
+ # BundledDetailsProductList Model.
8
+ class BundledDetailsProductList < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Purchase category Id
13
+ # Example: 123, 124, etc.,
14
+ # @return [Integer]
15
+ attr_accessor :purchase_category_id
16
+
17
+ # Purchase category name.
18
+ # Example:
19
+ # 0 - All Fuels (without VP) and Lubricants
20
+ # 1 - FuelSave only
21
+ # 2 - FuelSave and Lubricants
22
+ # 3 - No Restrictions
23
+ # @return [String]
24
+ attr_accessor :purchase_category_code
25
+
26
+ # An array of 3-digit global product codes.
27
+ # Example: [ "033", "021", "023" ]
28
+ # @return [Array[String]]
29
+ attr_accessor :products
30
+
31
+ # An array of product group ids.
32
+ # Example: [ "670246404", "40557126" ]
33
+ # @return [Array[String]]
34
+ attr_accessor :product_groups
35
+
36
+ # Fuel set id that is allowed to be purchased with the card
37
+ # @return [String]
38
+ attr_accessor :fuel_set_id
39
+
40
+ # Fuel set name that is allowed to be purchased with the card
41
+ # @return [String]
42
+ attr_accessor :fuel_set_name
43
+
44
+ # Non-Fuel set name that is allowed to be purchased with the card
45
+ # @return [String]
46
+ attr_accessor :non_fuel_sets
47
+
48
+ # A mapping from model property names to API property names.
49
+ def self.names
50
+ @_hash = {} if @_hash.nil?
51
+ @_hash['purchase_category_id'] = 'PurchaseCategoryId'
52
+ @_hash['purchase_category_code'] = 'PurchaseCategoryCode'
53
+ @_hash['products'] = 'Products'
54
+ @_hash['product_groups'] = 'ProductGroups'
55
+ @_hash['fuel_set_id'] = 'FuelSetId'
56
+ @_hash['fuel_set_name'] = 'FuelSetName'
57
+ @_hash['non_fuel_sets'] = 'NonFuelSets'
58
+ @_hash
59
+ end
60
+
61
+ # An array for optional fields
62
+ def self.optionals
63
+ %w[
64
+ purchase_category_id
65
+ purchase_category_code
66
+ products
67
+ product_groups
68
+ fuel_set_id
69
+ fuel_set_name
70
+ non_fuel_sets
71
+ ]
72
+ end
73
+
74
+ # An array for nullable fields
75
+ def self.nullables
76
+ []
77
+ end
78
+
79
+ def initialize(purchase_category_id = SKIP, purchase_category_code = SKIP,
80
+ products = SKIP, product_groups = SKIP, fuel_set_id = SKIP,
81
+ fuel_set_name = SKIP, non_fuel_sets = SKIP)
82
+ @purchase_category_id = purchase_category_id unless purchase_category_id == SKIP
83
+ @purchase_category_code = purchase_category_code unless purchase_category_code == SKIP
84
+ @products = products unless products == SKIP
85
+ @product_groups = product_groups unless product_groups == SKIP
86
+ @fuel_set_id = fuel_set_id unless fuel_set_id == SKIP
87
+ @fuel_set_name = fuel_set_name unless fuel_set_name == SKIP
88
+ @non_fuel_sets = non_fuel_sets unless non_fuel_sets == SKIP
89
+ end
90
+
91
+ # Creates an instance of the object from a hash.
92
+ def self.from_hash(hash)
93
+ return nil unless hash
94
+
95
+ # Extract variables from the hash.
96
+ purchase_category_id =
97
+ hash.key?('PurchaseCategoryId') ? hash['PurchaseCategoryId'] : SKIP
98
+ purchase_category_code =
99
+ hash.key?('PurchaseCategoryCode') ? hash['PurchaseCategoryCode'] : SKIP
100
+ products = hash.key?('Products') ? hash['Products'] : SKIP
101
+ product_groups = hash.key?('ProductGroups') ? hash['ProductGroups'] : SKIP
102
+ fuel_set_id = hash.key?('FuelSetId') ? hash['FuelSetId'] : SKIP
103
+ fuel_set_name = hash.key?('FuelSetName') ? hash['FuelSetName'] : SKIP
104
+ non_fuel_sets = hash.key?('NonFuelSets') ? hash['NonFuelSets'] : SKIP
105
+
106
+ # Create object from extracted values.
107
+ BundledDetailsProductList.new(purchase_category_id,
108
+ purchase_category_code,
109
+ products,
110
+ product_groups,
111
+ fuel_set_id,
112
+ fuel_set_name,
113
+ non_fuel_sets)
114
+ end
115
+ end
116
+ end
@@ -0,0 +1,82 @@
1
+ # shell_card_management_ap_is
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module ShellCardManagementApIs
7
+ # BundledRestrictionsList Model.
8
+ class BundledRestrictionsList < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Object]
14
+ attr_accessor :usage_restrictions
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [DayTimeRestrictions]
18
+ attr_accessor :day_time_restrictions
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [BundledDetailsProductList]
22
+ attr_accessor :product_restrictions
23
+
24
+ # TODO: Write general description for this method
25
+ # @return [LocationRestriction]
26
+ attr_accessor :location_restrictions
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['usage_restrictions'] = 'UsageRestrictions'
32
+ @_hash['day_time_restrictions'] = 'DayTimeRestrictions'
33
+ @_hash['product_restrictions'] = 'ProductRestrictions'
34
+ @_hash['location_restrictions'] = 'LocationRestrictions'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ %w[
41
+ usage_restrictions
42
+ day_time_restrictions
43
+ product_restrictions
44
+ location_restrictions
45
+ ]
46
+ end
47
+
48
+ # An array for nullable fields
49
+ def self.nullables
50
+ []
51
+ end
52
+
53
+ def initialize(usage_restrictions = SKIP, day_time_restrictions = SKIP,
54
+ product_restrictions = SKIP, location_restrictions = SKIP)
55
+ @usage_restrictions = usage_restrictions unless usage_restrictions == SKIP
56
+ @day_time_restrictions = day_time_restrictions unless day_time_restrictions == SKIP
57
+ @product_restrictions = product_restrictions unless product_restrictions == SKIP
58
+ @location_restrictions = location_restrictions unless location_restrictions == SKIP
59
+ end
60
+
61
+ # Creates an instance of the object from a hash.
62
+ def self.from_hash(hash)
63
+ return nil unless hash
64
+
65
+ # Extract variables from the hash.
66
+ usage_restrictions =
67
+ hash.key?('UsageRestrictions') ? hash['UsageRestrictions'] : SKIP
68
+ day_time_restrictions = DayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if
69
+ hash['DayTimeRestrictions']
70
+ product_restrictions = BundledDetailsProductList.from_hash(hash['ProductRestrictions']) if
71
+ hash['ProductRestrictions']
72
+ location_restrictions = LocationRestriction.from_hash(hash['LocationRestrictions']) if
73
+ hash['LocationRestrictions']
74
+
75
+ # Create object from extracted values.
76
+ BundledRestrictionsList.new(usage_restrictions,
77
+ day_time_restrictions,
78
+ product_restrictions,
79
+ location_restrictions)
80
+ end
81
+ end
82
+ end
@@ -72,9 +72,7 @@ module ShellCardManagementApIs
72
72
  ]
73
73
  end
74
74
 
75
- def initialize(cards = nil,
76
- reason_id = SKIP,
77
- reason_text = SKIP)
75
+ def initialize(cards = nil, reason_id = SKIP, reason_text = SKIP)
78
76
  @cards = cards
79
77
  @reason_id = reason_id unless reason_id == SKIP
80
78
  @reason_text = reason_text unless reason_text == SKIP
@@ -67,12 +67,9 @@ module ShellCardManagementApIs
67
67
  []
68
68
  end
69
69
 
70
- def initialize(request_id = SKIP,
71
- main_reference = SKIP,
72
- order_replacement_reference = SKIP,
73
- status = SKIP,
74
- data = SKIP,
75
- errors = SKIP)
70
+ def initialize(request_id = SKIP, main_reference = SKIP,
71
+ order_replacement_reference = SKIP, status = SKIP,
72
+ data = SKIP, errors = SKIP)
76
73
  @request_id = request_id unless request_id == SKIP
77
74
  @main_reference = main_reference unless main_reference == SKIP
78
75
  unless order_replacement_reference == SKIP