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
@@ -4,18 +4,11 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellCardManagementApIs
7
- # RestrictionCardRequestCardsItems Model.
8
- class RestrictionCardRequestCardsItems < BaseModel
7
+ # RestrictionCardsList Model.
8
+ class RestrictionCardsList < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # Account Number of the customer.
13
- # Optional if AccountId is passed, else Mandatory.
14
- # This input is a search criterion, if given.
15
- # Example: GB000000123
16
- # @return [String]
17
- attr_accessor :account_number
18
-
19
12
  # Account ID of the customer.
20
13
  # Optional if AccountNumber is passed, else Mandatory.
21
14
  # This input is a search criterion, if given.
@@ -23,6 +16,10 @@ module ShellCardManagementApIs
23
16
  # @return [Integer]
24
17
  attr_accessor :account_id
25
18
 
19
+ # Unique Card Id
20
+ # @return [Integer]
21
+ attr_accessor :card_id
22
+
26
23
  # Card PAN.
27
24
  # Optional if CardId is given, else mandatory.
28
25
  # Example: 7002051006629890645
@@ -33,18 +30,14 @@ module ShellCardManagementApIs
33
30
  # @return [String]
34
31
  attr_accessor :pan
35
32
 
36
- # Unique Card Id
37
- # Optional if PAN is given, else mandatory.
38
- # Example: 275549
39
- # @return [Integer]
40
- attr_accessor :card_id
41
-
42
33
  # True/False.
43
34
  # If true, the usage restrictions applied on the card in Gateway will be
44
35
  # reset to Customer Card Type level max limits, if there are no customer
45
36
  # level overrides available then OU card type max limits. Else, the card
46
37
  # restrictions will be updated with the usage restrictions provided in the
47
- # API.
38
+ # API.
39
+ # This property is not dependent on IsVelocityCeiling or
40
+ # SetDefaultOnVelocityUpdate flags.
48
41
  # @return [TrueClass | FalseClass]
49
42
  attr_accessor :reset_usage_restrictions
50
43
 
@@ -69,94 +62,86 @@ module ShellCardManagementApIs
69
62
  # @return [TrueClass | FalseClass]
70
63
  attr_accessor :reset_location_restrictions
71
64
 
72
- # Day/time restrictions such as weekdays and time range to be applied on the
73
- # bundle.
74
- # Mandatory if respective action is set as “Add”.
75
- # The details of DayTimeRestriction entity is given below.
76
- # @return [DayTimeRestrictions]
77
- attr_accessor :day_time_restrictions
65
+ # True/False.
66
+ # If true, the location restrictions applied on the card will be deleted.
67
+ # Else, the card restrictions will be updated with the location restrictions
68
+ # provided in the API.
69
+ # @return [UsageRestrictionsCard]
70
+ attr_accessor :usage_restrictions
78
71
 
79
- # Location restrictions to be applied on the bundle which either allows or
80
- # restricts using the cards, which are under the bundle, in the specified
81
- # locations.
82
- # Mandatory if respective action is set as “Add”.
83
- # Details of location restrictions are given below.
84
- # @return [LocationRestrictions]
85
- attr_accessor :location_restrictions
72
+ # Details of the day/time restrictions such as weekdays and time range in
73
+ # which transactions should be allowed on the card.
74
+ # @return [DayTimeRestriction]
75
+ attr_accessor :day_time_restrictions
86
76
 
87
- # Location restrictions to be applied on the bundle which either allows or
88
- # restricts using the cards, which are under the bundle, in the specified
89
- # locations.
90
- # Mandatory if respective action is set as “Add”.
91
- # Details of location restrictions are given below.
92
- # @return [ProductRestrictions]
77
+ # Details of the day/time restrictions such as weekdays and time range in
78
+ # which transactions should be allowed on the card.
79
+ # @return [ProductRestrictionCard]
93
80
  attr_accessor :product_restrictions
94
81
 
95
- # Location restrictions to be applied on the bundle which either allows or
96
- # restricts using the cards, which are under the bundle, in the specified
97
- # locations.
98
- # Mandatory if respective action is set as “Add”.
99
- # Details of location restrictions are given below.
100
- # @return [UsageRestrictions]
101
- attr_accessor :usage_restrictions
82
+ # Details of the day/time restrictions such as weekdays and time range in
83
+ # which transactions should be allowed on the card.
84
+ # @return [LocationRestriction]
85
+ attr_accessor :location_restrictions
102
86
 
103
87
  # A mapping from model property names to API property names.
104
88
  def self.names
105
89
  @_hash = {} if @_hash.nil?
106
- @_hash['account_number'] = 'AccountNumber'
107
90
  @_hash['account_id'] = 'AccountId'
108
- @_hash['pan'] = 'PAN'
109
91
  @_hash['card_id'] = 'CardId'
92
+ @_hash['pan'] = 'PAN'
110
93
  @_hash['reset_usage_restrictions'] = 'ResetUsageRestrictions'
111
94
  @_hash['reset_day_time_restrictions'] = 'ResetDayTimeRestrictions'
112
95
  @_hash['reset_product_restrictions'] = 'ResetProductRestrictions'
113
96
  @_hash['reset_location_restrictions'] = 'ResetLocationRestrictions'
97
+ @_hash['usage_restrictions'] = 'UsageRestrictions'
114
98
  @_hash['day_time_restrictions'] = 'DayTimeRestrictions'
115
- @_hash['location_restrictions'] = 'LocationRestrictions'
116
99
  @_hash['product_restrictions'] = 'ProductRestrictions'
117
- @_hash['usage_restrictions'] = 'UsageRestrictions'
100
+ @_hash['location_restrictions'] = 'LocationRestrictions'
118
101
  @_hash
119
102
  end
120
103
 
121
104
  # An array for optional fields
122
105
  def self.optionals
123
106
  %w[
124
- account_number
125
107
  account_id
126
- pan
127
108
  card_id
109
+ pan
128
110
  reset_usage_restrictions
129
111
  reset_day_time_restrictions
130
112
  reset_product_restrictions
131
113
  reset_location_restrictions
114
+ usage_restrictions
132
115
  day_time_restrictions
133
- location_restrictions
134
116
  product_restrictions
135
- usage_restrictions
117
+ location_restrictions
136
118
  ]
137
119
  end
138
120
 
139
121
  # An array for nullable fields
140
122
  def self.nullables
141
- []
123
+ %w[
124
+ account_id
125
+ card_id
126
+ pan
127
+ reset_day_time_restrictions
128
+ reset_product_restrictions
129
+ reset_location_restrictions
130
+ usage_restrictions
131
+ product_restrictions
132
+ ]
142
133
  end
143
134
 
144
- def initialize(account_number = SKIP,
145
- account_id = SKIP,
146
- pan = SKIP,
147
- card_id = SKIP,
135
+ def initialize(account_id = SKIP, card_id = SKIP, pan = SKIP,
148
136
  reset_usage_restrictions = SKIP,
149
137
  reset_day_time_restrictions = SKIP,
150
138
  reset_product_restrictions = SKIP,
151
139
  reset_location_restrictions = SKIP,
152
- day_time_restrictions = SKIP,
153
- location_restrictions = SKIP,
154
- product_restrictions = SKIP,
155
- usage_restrictions = SKIP)
156
- @account_number = account_number unless account_number == SKIP
140
+ usage_restrictions = SKIP, day_time_restrictions = SKIP,
141
+ product_restrictions = SKIP, location_restrictions = SKIP)
157
142
  @account_id = account_id unless account_id == SKIP
158
- @pan = pan unless pan == SKIP
159
143
  @card_id = card_id unless card_id == SKIP
144
+ @pan = pan unless pan == SKIP
160
145
  @reset_usage_restrictions = reset_usage_restrictions unless reset_usage_restrictions == SKIP
161
146
  unless reset_day_time_restrictions == SKIP
162
147
  @reset_day_time_restrictions =
@@ -170,10 +155,10 @@ module ShellCardManagementApIs
170
155
  @reset_location_restrictions =
171
156
  reset_location_restrictions
172
157
  end
158
+ @usage_restrictions = usage_restrictions unless usage_restrictions == SKIP
173
159
  @day_time_restrictions = day_time_restrictions unless day_time_restrictions == SKIP
174
- @location_restrictions = location_restrictions unless location_restrictions == SKIP
175
160
  @product_restrictions = product_restrictions unless product_restrictions == SKIP
176
- @usage_restrictions = usage_restrictions unless usage_restrictions == SKIP
161
+ @location_restrictions = location_restrictions unless location_restrictions == SKIP
177
162
  end
178
163
 
179
164
  # Creates an instance of the object from a hash.
@@ -181,10 +166,9 @@ module ShellCardManagementApIs
181
166
  return nil unless hash
182
167
 
183
168
  # Extract variables from the hash.
184
- account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
185
169
  account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
186
- pan = hash.key?('PAN') ? hash['PAN'] : SKIP
187
170
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
171
+ pan = hash.key?('PAN') ? hash['PAN'] : SKIP
188
172
  reset_usage_restrictions =
189
173
  hash.key?('ResetUsageRestrictions') ? hash['ResetUsageRestrictions'] : SKIP
190
174
  reset_day_time_restrictions =
@@ -193,28 +177,27 @@ module ShellCardManagementApIs
193
177
  hash.key?('ResetProductRestrictions') ? hash['ResetProductRestrictions'] : SKIP
194
178
  reset_location_restrictions =
195
179
  hash.key?('ResetLocationRestrictions') ? hash['ResetLocationRestrictions'] : SKIP
196
- day_time_restrictions = DayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if
180
+ usage_restrictions = UsageRestrictionsCard.from_hash(hash['UsageRestrictions']) if
181
+ hash['UsageRestrictions']
182
+ day_time_restrictions = DayTimeRestriction.from_hash(hash['DayTimeRestrictions']) if
197
183
  hash['DayTimeRestrictions']
198
- location_restrictions = LocationRestrictions.from_hash(hash['LocationRestrictions']) if
199
- hash['LocationRestrictions']
200
- product_restrictions = ProductRestrictions.from_hash(hash['ProductRestrictions']) if
184
+ product_restrictions = ProductRestrictionCard.from_hash(hash['ProductRestrictions']) if
201
185
  hash['ProductRestrictions']
202
- usage_restrictions = UsageRestrictions.from_hash(hash['UsageRestrictions']) if
203
- hash['UsageRestrictions']
186
+ location_restrictions = LocationRestriction.from_hash(hash['LocationRestrictions']) if
187
+ hash['LocationRestrictions']
204
188
 
205
189
  # Create object from extracted values.
206
- RestrictionCardRequestCardsItems.new(account_number,
207
- account_id,
208
- pan,
209
- card_id,
210
- reset_usage_restrictions,
211
- reset_day_time_restrictions,
212
- reset_product_restrictions,
213
- reset_location_restrictions,
214
- day_time_restrictions,
215
- location_restrictions,
216
- product_restrictions,
217
- usage_restrictions)
190
+ RestrictionCardsList.new(account_id,
191
+ card_id,
192
+ pan,
193
+ reset_usage_restrictions,
194
+ reset_day_time_restrictions,
195
+ reset_product_restrictions,
196
+ reset_location_restrictions,
197
+ usage_restrictions,
198
+ day_time_restrictions,
199
+ product_restrictions,
200
+ location_restrictions)
218
201
  end
219
202
  end
220
203
  end
@@ -0,0 +1,62 @@
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
+ # RestrictionProduct Model.
8
+ class RestrictionProduct < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The productCode returned by the Gateway API.
13
+ # Example: 021
14
+ # @return [String]
15
+ attr_accessor :global_product_code
16
+
17
+ # The description returned by the Gateway API.
18
+ # Example: High Performance Diesel
19
+ # @return [String]
20
+ attr_accessor :description
21
+
22
+ # A mapping from model property names to API property names.
23
+ def self.names
24
+ @_hash = {} if @_hash.nil?
25
+ @_hash['global_product_code'] = 'GlobalProductCode'
26
+ @_hash['description'] = 'Description'
27
+ @_hash
28
+ end
29
+
30
+ # An array for optional fields
31
+ def self.optionals
32
+ %w[
33
+ global_product_code
34
+ description
35
+ ]
36
+ end
37
+
38
+ # An array for nullable fields
39
+ def self.nullables
40
+ []
41
+ end
42
+
43
+ def initialize(global_product_code = SKIP, description = SKIP)
44
+ @global_product_code = global_product_code unless global_product_code == SKIP
45
+ @description = description unless description == SKIP
46
+ end
47
+
48
+ # Creates an instance of the object from a hash.
49
+ def self.from_hash(hash)
50
+ return nil unless hash
51
+
52
+ # Extract variables from the hash.
53
+ global_product_code =
54
+ hash.key?('GlobalProductCode') ? hash['GlobalProductCode'] : SKIP
55
+ description = hash.key?('Description') ? hash['Description'] : SKIP
56
+
57
+ # Create object from extracted values.
58
+ RestrictionProduct.new(global_product_code,
59
+ description)
60
+ end
61
+ end
62
+ end
@@ -4,68 +4,72 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellCardManagementApIs
7
- # RestrictionCardResponseDataItems Model.
8
- class RestrictionCardResponseDataItems < BaseModel
7
+ # RestrictioncardsRes Model.
8
+ class RestrictioncardsRes < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
12
  # Account Id of the customer.
13
+ # Example: 123456
13
14
  # @return [Integer]
14
15
  attr_accessor :account_id
15
16
 
16
17
  # Account Number of the customer.
18
+ # Example: GB000000123
17
19
  # @return [String]
18
20
  attr_accessor :account_number
19
21
 
20
22
  # Unique Card Id
21
- # @return [Integer]
23
+ # Example: 275549
24
+ # @return [String]
22
25
  attr_accessor :card_id
23
26
 
24
- # This field will have a value only when “DayTimeRestrictionStatus” is
25
- # “Failed”.
27
+ # Card PAN.
28
+ # Example: 7002051006629890645
26
29
  # @return [String]
27
- attr_accessor :day_time_restriction_description
30
+ attr_accessor :pan
28
31
 
29
- # Status of the card day/time restriction submitted to API. Based on the
30
- # response from API value will be set as either “Success” or “Failed”.
32
+ # Status of the card usage restriction submitted. Based on the response the
33
+ # value will be set as either “Success” or “Failed”.
31
34
  # @return [String]
32
- attr_accessor :day_time_restriction_status
35
+ attr_accessor :usage_restriction_status
33
36
 
34
- # This field will have a value only when “LocationRestrictionStatus” is
35
- # “Failed”.
37
+ # Response for the usage restriction in case of an error. This field will
38
+ # have a value only when UsageRestrictionStatus” is “Failed”.
36
39
  # @return [String]
37
- attr_accessor :location_restriction_description
40
+ attr_accessor :usage_restriction_description
38
41
 
39
- # Card Location restriction submitted to gateway based on gateway response
40
- # value set as “Success” or “Failed”.
42
+ # Status of the card day/time restriction submitted. Based on the response
43
+ # from Gateway value will be set as either “Success” or “Failed”.
41
44
  # @return [String]
42
- attr_accessor :location_restriction_status
45
+ attr_accessor :day_time_restriction_status
43
46
 
44
- # Card PAN
47
+ # Response for the day/time restriction in case of an error. This field will
48
+ # have a value only when “DayTimeRestrictionStatus” is “Failed”.
45
49
  # @return [String]
46
- attr_accessor :pan
50
+ attr_accessor :day_time_restriction_description
47
51
 
48
- # This field will have a value only when “ProductRestrictionStatus” is
49
- # “Failed”.
52
+ # Status of the card product restriction submitted. Based on the response
53
+ # the value will be set either as Success” or “Failed”.
50
54
  # @return [String]
51
- attr_accessor :product_restriction_description
55
+ attr_accessor :product_restriction_status
52
56
 
53
- # Status of the card product restriction submitted
57
+ # Response for the product restriction in case of an error. This field will
58
+ # have a value only when “ProductRestrictionStatus” is “Failed”.
54
59
  # @return [String]
55
- attr_accessor :product_restriction_status
60
+ attr_accessor :product_restriction_description
56
61
 
57
- # This field will have a value only when “UsageRestrictionStatus” is
58
- # “Failed”.
62
+ # Card Location restriction submitted, based on response value set as
63
+ # “Success” or “Failed”.
59
64
  # @return [String]
60
- attr_accessor :usage_restriction_description
65
+ attr_accessor :location_restriction_status
61
66
 
62
- # Status of the card usage restriction submitted
67
+ # Response for the location restriction in case of an error. This field will
68
+ # have a value only when “LocationRestrictionStatus” is “Failed”.
63
69
  # @return [String]
64
- attr_accessor :usage_restriction_status
70
+ attr_accessor :location_restriction_status_description
65
71
 
66
72
  # Error code for validation failure.
67
- # Example error codes:
68
- # 0007, 9007, 7000, 7001.
69
73
  # @return [String]
70
74
  attr_accessor :validation_error_code
71
75
 
@@ -79,18 +83,18 @@ module ShellCardManagementApIs
79
83
  @_hash['account_id'] = 'AccountId'
80
84
  @_hash['account_number'] = 'AccountNumber'
81
85
  @_hash['card_id'] = 'CardId'
86
+ @_hash['pan'] = 'PAN'
87
+ @_hash['usage_restriction_status'] = 'UsageRestrictionStatus'
88
+ @_hash['usage_restriction_description'] = 'UsageRestrictionDescription'
89
+ @_hash['day_time_restriction_status'] = 'DayTimeRestrictionStatus'
82
90
  @_hash['day_time_restriction_description'] =
83
91
  'DayTimeRestrictionDescription'
84
- @_hash['day_time_restriction_status'] = 'DayTimeRestrictionStatus'
85
- @_hash['location_restriction_description'] =
86
- 'LocationRestrictionDescription'
87
- @_hash['location_restriction_status'] = 'LocationRestrictionStatus'
88
- @_hash['pan'] = 'PAN'
92
+ @_hash['product_restriction_status'] = 'ProductRestrictionStatus'
89
93
  @_hash['product_restriction_description'] =
90
94
  'ProductRestrictionDescription'
91
- @_hash['product_restriction_status'] = 'ProductRestrictionStatus'
92
- @_hash['usage_restriction_description'] = 'UsageRestrictionDescription'
93
- @_hash['usage_restriction_status'] = 'UsageRestrictionStatus'
95
+ @_hash['location_restriction_status'] = 'LocationRestrictionStatus'
96
+ @_hash['location_restriction_status_description'] =
97
+ 'LocationRestrictionStatusDescription'
94
98
  @_hash['validation_error_code'] = 'ValidationErrorCode'
95
99
  @_hash['validation_error_description'] = 'ValidationErrorDescription'
96
100
  @_hash
@@ -102,15 +106,15 @@ module ShellCardManagementApIs
102
106
  account_id
103
107
  account_number
104
108
  card_id
105
- day_time_restriction_description
106
- day_time_restriction_status
107
- location_restriction_description
108
- location_restriction_status
109
109
  pan
110
- product_restriction_description
111
- product_restriction_status
112
- usage_restriction_description
113
110
  usage_restriction_status
111
+ usage_restriction_description
112
+ day_time_restriction_status
113
+ day_time_restriction_description
114
+ product_restriction_status
115
+ product_restriction_description
116
+ location_restriction_status
117
+ location_restriction_status_description
114
118
  validation_error_code
115
119
  validation_error_description
116
120
  ]
@@ -118,71 +122,53 @@ module ShellCardManagementApIs
118
122
 
119
123
  # An array for nullable fields
120
124
  def self.nullables
121
- %w[
122
- account_id
123
- account_number
124
- card_id
125
- day_time_restriction_description
126
- day_time_restriction_status
127
- location_restriction_description
128
- location_restriction_status
129
- pan
130
- product_restriction_description
131
- product_restriction_status
132
- usage_restriction_description
133
- usage_restriction_status
134
- validation_error_code
135
- validation_error_description
136
- ]
125
+ []
137
126
  end
138
127
 
139
- def initialize(account_id = SKIP,
140
- account_number = SKIP,
141
- card_id = SKIP,
142
- day_time_restriction_description = SKIP,
128
+ def initialize(account_id = SKIP, account_number = SKIP, card_id = SKIP,
129
+ pan = SKIP, usage_restriction_status = SKIP,
130
+ usage_restriction_description = SKIP,
143
131
  day_time_restriction_status = SKIP,
144
- location_restriction_description = SKIP,
145
- location_restriction_status = SKIP,
146
- pan = SKIP,
147
- product_restriction_description = SKIP,
132
+ day_time_restriction_description = SKIP,
148
133
  product_restriction_status = SKIP,
149
- usage_restriction_description = SKIP,
150
- usage_restriction_status = SKIP,
134
+ product_restriction_description = SKIP,
135
+ location_restriction_status = SKIP,
136
+ location_restriction_status_description = SKIP,
151
137
  validation_error_code = SKIP,
152
138
  validation_error_description = SKIP)
153
139
  @account_id = account_id unless account_id == SKIP
154
140
  @account_number = account_number unless account_number == SKIP
155
141
  @card_id = card_id unless card_id == SKIP
156
- unless day_time_restriction_description == SKIP
157
- @day_time_restriction_description =
158
- day_time_restriction_description
142
+ @pan = pan unless pan == SKIP
143
+ @usage_restriction_status = usage_restriction_status unless usage_restriction_status == SKIP
144
+ unless usage_restriction_description == SKIP
145
+ @usage_restriction_description =
146
+ usage_restriction_description
159
147
  end
160
148
  unless day_time_restriction_status == SKIP
161
149
  @day_time_restriction_status =
162
150
  day_time_restriction_status
163
151
  end
164
- unless location_restriction_description == SKIP
165
- @location_restriction_description =
166
- location_restriction_description
152
+ unless day_time_restriction_description == SKIP
153
+ @day_time_restriction_description =
154
+ day_time_restriction_description
167
155
  end
168
- unless location_restriction_status == SKIP
169
- @location_restriction_status =
170
- location_restriction_status
156
+ unless product_restriction_status == SKIP
157
+ @product_restriction_status =
158
+ product_restriction_status
171
159
  end
172
- @pan = pan unless pan == SKIP
173
160
  unless product_restriction_description == SKIP
174
161
  @product_restriction_description =
175
162
  product_restriction_description
176
163
  end
177
- unless product_restriction_status == SKIP
178
- @product_restriction_status =
179
- product_restriction_status
164
+ unless location_restriction_status == SKIP
165
+ @location_restriction_status =
166
+ location_restriction_status
180
167
  end
181
- unless usage_restriction_description == SKIP
182
- @usage_restriction_description =
183
- usage_restriction_description
168
+ unless location_restriction_status_description == SKIP
169
+ @location_restriction_status_description =
170
+ location_restriction_status_description
184
171
  end
185
- @usage_restriction_status = usage_restriction_status unless usage_restriction_status == SKIP
186
172
  @validation_error_code = validation_error_code unless validation_error_code == SKIP
187
173
  unless validation_error_description == SKIP
188
174
  @validation_error_description =
@@ -198,43 +184,43 @@ module ShellCardManagementApIs
198
184
  account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
199
185
  account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
200
186
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
201
- day_time_restriction_description =
202
- hash.key?('DayTimeRestrictionDescription') ? hash['DayTimeRestrictionDescription'] : SKIP
187
+ pan = hash.key?('PAN') ? hash['PAN'] : SKIP
188
+ usage_restriction_status =
189
+ hash.key?('UsageRestrictionStatus') ? hash['UsageRestrictionStatus'] : SKIP
190
+ usage_restriction_description =
191
+ hash.key?('UsageRestrictionDescription') ? hash['UsageRestrictionDescription'] : SKIP
203
192
  day_time_restriction_status =
204
193
  hash.key?('DayTimeRestrictionStatus') ? hash['DayTimeRestrictionStatus'] : SKIP
205
- location_restriction_description =
206
- hash.key?('LocationRestrictionDescription') ? hash['LocationRestrictionDescription'] : SKIP
207
- location_restriction_status =
208
- hash.key?('LocationRestrictionStatus') ? hash['LocationRestrictionStatus'] : SKIP
209
- pan = hash.key?('PAN') ? hash['PAN'] : SKIP
210
- product_restriction_description =
211
- hash.key?('ProductRestrictionDescription') ? hash['ProductRestrictionDescription'] : SKIP
194
+ day_time_restriction_description =
195
+ hash.key?('DayTimeRestrictionDescription') ? hash['DayTimeRestrictionDescription'] : SKIP
212
196
  product_restriction_status =
213
197
  hash.key?('ProductRestrictionStatus') ? hash['ProductRestrictionStatus'] : SKIP
214
- usage_restriction_description =
215
- hash.key?('UsageRestrictionDescription') ? hash['UsageRestrictionDescription'] : SKIP
216
- usage_restriction_status =
217
- hash.key?('UsageRestrictionStatus') ? hash['UsageRestrictionStatus'] : SKIP
198
+ product_restriction_description =
199
+ hash.key?('ProductRestrictionDescription') ? hash['ProductRestrictionDescription'] : SKIP
200
+ location_restriction_status =
201
+ hash.key?('LocationRestrictionStatus') ? hash['LocationRestrictionStatus'] : SKIP
202
+ location_restriction_status_description =
203
+ hash.key?('LocationRestrictionStatusDescription') ? hash['LocationRestrictionStatusDescription'] : SKIP
218
204
  validation_error_code =
219
205
  hash.key?('ValidationErrorCode') ? hash['ValidationErrorCode'] : SKIP
220
206
  validation_error_description =
221
207
  hash.key?('ValidationErrorDescription') ? hash['ValidationErrorDescription'] : SKIP
222
208
 
223
209
  # Create object from extracted values.
224
- RestrictionCardResponseDataItems.new(account_id,
225
- account_number,
226
- card_id,
227
- day_time_restriction_description,
228
- day_time_restriction_status,
229
- location_restriction_description,
230
- location_restriction_status,
231
- pan,
232
- product_restriction_description,
233
- product_restriction_status,
234
- usage_restriction_description,
235
- usage_restriction_status,
236
- validation_error_code,
237
- validation_error_description)
210
+ RestrictioncardsRes.new(account_id,
211
+ account_number,
212
+ card_id,
213
+ pan,
214
+ usage_restriction_status,
215
+ usage_restriction_description,
216
+ day_time_restriction_status,
217
+ day_time_restriction_description,
218
+ product_restriction_status,
219
+ product_restriction_description,
220
+ location_restriction_status,
221
+ location_restriction_status_description,
222
+ validation_error_code,
223
+ validation_error_description)
238
224
  end
239
225
  end
240
226
  end
@@ -64,12 +64,9 @@ module ShellCardManagementApIs
64
64
  []
65
65
  end
66
66
 
67
- def initialize(role_name = SKIP,
68
- is_customer_admin = true,
69
- is_customer_user = false,
70
- is_shell_admin = false,
71
- is_service_account = false,
72
- is_user_admin = true)
67
+ def initialize(role_name = SKIP, is_customer_admin = true,
68
+ is_customer_user = false, is_shell_admin = false,
69
+ is_service_account = false, is_user_admin = true)
73
70
  @role_name = role_name unless role_name == SKIP
74
71
  @is_customer_admin = is_customer_admin unless is_customer_admin == SKIP
75
72
  @is_customer_user = is_customer_user unless is_customer_user == SKIP