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
@@ -0,0 +1,181 @@
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
+ # BundleDetailsResponse Model.
8
+ class BundleDetailsResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Payer Id of the bundles and cards.
13
+ # Example: 123456
14
+ # @return [Integer]
15
+ attr_accessor :payer_id
16
+
17
+ # Payer Number of the bundles and cards.
18
+ # Example: GB000000123
19
+ # @return [String]
20
+ attr_accessor :payer_number
21
+
22
+ # Account ID of the bundle.
23
+ # Example: 123456
24
+ # @return [Integer]
25
+ attr_accessor :account_id
26
+
27
+ # Account Number of the bundle.
28
+ # Example: GB000000123
29
+ # @return [String]
30
+ attr_accessor :account_number
31
+
32
+ # unique identifier for the Card Bundle
33
+ # @return [String]
34
+ attr_accessor :bundle_id
35
+
36
+ # External system allocated Card Bundle identifier for Card Bundle.
37
+ # @return [String]
38
+ attr_accessor :external_bundle_id
39
+
40
+ # Card Bundle Description.
41
+ # @return [String]
42
+ attr_accessor :description
43
+
44
+ # List of Card Pans added to the card bundle.
45
+ # @return [Array[String]]
46
+ attr_accessor :pans
47
+
48
+ # ISO currency code of the country.
49
+ # Example: GBP
50
+ # @return [String]
51
+ attr_accessor :restriction_currency_code
52
+
53
+ # Currency symbol of the country.
54
+ # Example: £, $
55
+ # @return [String]
56
+ attr_accessor :restriction_currency_symbol
57
+
58
+ # Currency symbol of the country.
59
+ # Example: £, $
60
+ # @return [BundledRestrictionsList]
61
+ attr_accessor :restrictions
62
+
63
+ # Currency symbol of the country.
64
+ # Example: £, $
65
+ # @return [ErrorStatus]
66
+ attr_accessor :error
67
+
68
+ # API Request Id
69
+ # @return [String]
70
+ attr_accessor :request_id
71
+
72
+ # A mapping from model property names to API property names.
73
+ def self.names
74
+ @_hash = {} if @_hash.nil?
75
+ @_hash['payer_id'] = 'PayerId'
76
+ @_hash['payer_number'] = 'PayerNumber'
77
+ @_hash['account_id'] = 'AccountId'
78
+ @_hash['account_number'] = 'AccountNumber'
79
+ @_hash['bundle_id'] = 'BundleId'
80
+ @_hash['external_bundle_id'] = 'ExternalBundleId'
81
+ @_hash['description'] = 'Description'
82
+ @_hash['pans'] = 'Pans'
83
+ @_hash['restriction_currency_code'] = 'RestrictionCurrencyCode'
84
+ @_hash['restriction_currency_symbol'] = 'RestrictionCurrencySymbol'
85
+ @_hash['restrictions'] = 'Restrictions'
86
+ @_hash['error'] = 'Error'
87
+ @_hash['request_id'] = 'RequestId'
88
+ @_hash
89
+ end
90
+
91
+ # An array for optional fields
92
+ def self.optionals
93
+ %w[
94
+ payer_id
95
+ payer_number
96
+ account_id
97
+ account_number
98
+ bundle_id
99
+ external_bundle_id
100
+ description
101
+ pans
102
+ restriction_currency_code
103
+ restriction_currency_symbol
104
+ restrictions
105
+ error
106
+ request_id
107
+ ]
108
+ end
109
+
110
+ # An array for nullable fields
111
+ def self.nullables
112
+ []
113
+ end
114
+
115
+ def initialize(payer_id = SKIP, payer_number = SKIP, account_id = SKIP,
116
+ account_number = SKIP, bundle_id = SKIP,
117
+ external_bundle_id = SKIP, description = SKIP, pans = SKIP,
118
+ restriction_currency_code = SKIP,
119
+ restriction_currency_symbol = SKIP, restrictions = SKIP,
120
+ error = SKIP, request_id = SKIP)
121
+ @payer_id = payer_id unless payer_id == SKIP
122
+ @payer_number = payer_number unless payer_number == SKIP
123
+ @account_id = account_id unless account_id == SKIP
124
+ @account_number = account_number unless account_number == SKIP
125
+ @bundle_id = bundle_id unless bundle_id == SKIP
126
+ @external_bundle_id = external_bundle_id unless external_bundle_id == SKIP
127
+ @description = description unless description == SKIP
128
+ @pans = pans unless pans == SKIP
129
+ unless restriction_currency_code == SKIP
130
+ @restriction_currency_code =
131
+ restriction_currency_code
132
+ end
133
+ unless restriction_currency_symbol == SKIP
134
+ @restriction_currency_symbol =
135
+ restriction_currency_symbol
136
+ end
137
+ @restrictions = restrictions unless restrictions == SKIP
138
+ @error = error unless error == SKIP
139
+ @request_id = request_id unless request_id == SKIP
140
+ end
141
+
142
+ # Creates an instance of the object from a hash.
143
+ def self.from_hash(hash)
144
+ return nil unless hash
145
+
146
+ # Extract variables from the hash.
147
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
148
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
149
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
150
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
151
+ bundle_id = hash.key?('BundleId') ? hash['BundleId'] : SKIP
152
+ external_bundle_id =
153
+ hash.key?('ExternalBundleId') ? hash['ExternalBundleId'] : SKIP
154
+ description = hash.key?('Description') ? hash['Description'] : SKIP
155
+ pans = hash.key?('Pans') ? hash['Pans'] : SKIP
156
+ restriction_currency_code =
157
+ hash.key?('RestrictionCurrencyCode') ? hash['RestrictionCurrencyCode'] : SKIP
158
+ restriction_currency_symbol =
159
+ hash.key?('RestrictionCurrencySymbol') ? hash['RestrictionCurrencySymbol'] : SKIP
160
+ restrictions = BundledRestrictionsList.from_hash(hash['Restrictions']) if
161
+ hash['Restrictions']
162
+ error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
163
+ request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
164
+
165
+ # Create object from extracted values.
166
+ BundleDetailsResponse.new(payer_id,
167
+ payer_number,
168
+ account_id,
169
+ account_number,
170
+ bundle_id,
171
+ external_bundle_id,
172
+ description,
173
+ pans,
174
+ restriction_currency_code,
175
+ restriction_currency_symbol,
176
+ restrictions,
177
+ error,
178
+ request_id)
179
+ end
180
+ end
181
+ end
@@ -9,77 +9,59 @@ 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 [UsageRestrictionsCard]
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.
48
- # @return [DayTimeRestrictions]
42
+ # Details of the day/time restrictions such as weekdays and time range in
43
+ # which transactions should be allowed on the card.
44
+ # @return [DayTimeRestriction]
49
45
  attr_accessor :day_time_restrictions
50
46
 
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
47
+ # Details of the day/time restrictions such as weekdays and time range in
48
+ # which transactions should be allowed on the card.
49
+ # @return [ProductRestrictionCard]
50
+ attr_accessor :product_restrictions
63
51
 
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
+ # Details of the day/time restrictions such as weekdays and time range in
53
+ # which transactions should be allowed on the card.
54
+ # @return [LocationRestriction]
70
55
  attr_accessor :location_restrictions
71
56
 
72
57
  # A mapping from model property names to API property names.
73
58
  def self.names
74
59
  @_hash = {} if @_hash.nil?
75
- @_hash['reset_day_time_restriction'] = 'ResetDayTimeRestriction'
76
- @_hash['reset_location_restriction'] = 'ResetLocationRestriction'
77
- @_hash['reset_product_restriction'] = 'ResetProductRestriction'
60
+ @_hash['day_time_restriction_action'] = 'DayTimeRestrictionAction'
61
+ @_hash['location_restriction_action'] = 'LocationRestrictionAction'
78
62
  @_hash['usage_restrictions'] = 'UsageRestrictions'
79
63
  @_hash['day_time_restrictions'] = 'DayTimeRestrictions'
80
- @_hash['product_restriction'] = 'ProductRestriction'
81
- @_hash['location_restriction_profile_id'] =
82
- 'LocationRestrictionProfileId'
64
+ @_hash['product_restrictions'] = 'ProductRestrictions'
83
65
  @_hash['location_restrictions'] = 'LocationRestrictions'
84
66
  @_hash
85
67
  end
@@ -87,49 +69,40 @@ module ShellCardManagementApIs
87
69
  # An array for optional fields
88
70
  def self.optionals
89
71
  %w[
90
- reset_day_time_restriction
91
- reset_location_restriction
92
- reset_product_restriction
72
+ day_time_restriction_action
73
+ location_restriction_action
93
74
  usage_restrictions
94
75
  day_time_restrictions
95
- product_restriction
96
- location_restriction_profile_id
76
+ product_restrictions
97
77
  location_restrictions
98
78
  ]
99
79
  end
100
80
 
101
81
  # An array for nullable fields
102
82
  def self.nullables
103
- []
83
+ %w[
84
+ day_time_restriction_action
85
+ location_restriction_action
86
+ usage_restrictions
87
+ product_restrictions
88
+ ]
104
89
  end
105
90
 
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
91
+ def initialize(day_time_restriction_action = SKIP,
92
+ location_restriction_action = SKIP,
93
+ usage_restrictions = SKIP, day_time_restrictions = SKIP,
94
+ product_restrictions = SKIP, location_restrictions = SKIP)
95
+ unless day_time_restriction_action == SKIP
96
+ @day_time_restriction_action =
97
+ day_time_restriction_action
121
98
  end
122
- unless reset_product_restriction == SKIP
123
- @reset_product_restriction =
124
- reset_product_restriction
99
+ unless location_restriction_action == SKIP
100
+ @location_restriction_action =
101
+ location_restriction_action
125
102
  end
126
103
  @usage_restrictions = usage_restrictions unless usage_restrictions == SKIP
127
104
  @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
105
+ @product_restrictions = product_restrictions unless product_restrictions == SKIP
133
106
  @location_restrictions = location_restrictions unless location_restrictions == SKIP
134
107
  end
135
108
 
@@ -138,28 +111,25 @@ module ShellCardManagementApIs
138
111
  return nil unless hash
139
112
 
140
113
  # 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
114
+ day_time_restriction_action =
115
+ hash.key?('DayTimeRestrictionAction') ? hash['DayTimeRestrictionAction'] : SKIP
116
+ location_restriction_action =
117
+ hash.key?('LocationRestrictionAction') ? hash['LocationRestrictionAction'] : SKIP
118
+ usage_restrictions = UsageRestrictionsCard.from_hash(hash['UsageRestrictions']) if
145
119
  hash['UsageRestrictions']
146
- day_time_restrictions = DayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if
120
+ day_time_restrictions = DayTimeRestriction.from_hash(hash['DayTimeRestrictions']) if
147
121
  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
122
+ product_restrictions = ProductRestrictionCard.from_hash(hash['ProductRestrictions']) if
123
+ hash['ProductRestrictions']
124
+ location_restrictions = LocationRestriction.from_hash(hash['LocationRestrictions']) if
153
125
  hash['LocationRestrictions']
154
126
 
155
127
  # Create object from extracted values.
156
- BundleRestriction.new(reset_day_time_restriction,
157
- reset_location_restriction,
158
- reset_product_restriction,
128
+ BundleRestriction.new(day_time_restriction_action,
129
+ location_restriction_action,
159
130
  usage_restrictions,
160
131
  day_time_restrictions,
161
- product_restriction,
162
- location_restriction_profile_id,
132
+ product_restrictions,
163
133
  location_restrictions)
164
134
  end
165
135
  end
@@ -0,0 +1,187 @@
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 [UsageRestrictionsCard]
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 [ProductRestrictionCard]
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
+ usage_restrictions
113
+ day_time_restriction_profile_id
114
+ product_restrictions
115
+ ]
116
+ end
117
+
118
+ def initialize(reset_day_time_restriction = SKIP,
119
+ reset_location_restriction = SKIP,
120
+ reset_product_restriction = SKIP, usage_restrictions = SKIP,
121
+ day_time_restriction_profile_id = SKIP,
122
+ day_time_restrictions = SKIP, product_restrictions = SKIP,
123
+ location_restriction_profile_id = SKIP,
124
+ location_restrictions = SKIP)
125
+ unless reset_day_time_restriction == SKIP
126
+ @reset_day_time_restriction =
127
+ reset_day_time_restriction
128
+ end
129
+ unless reset_location_restriction == SKIP
130
+ @reset_location_restriction =
131
+ reset_location_restriction
132
+ end
133
+ unless reset_product_restriction == SKIP
134
+ @reset_product_restriction =
135
+ reset_product_restriction
136
+ end
137
+ @usage_restrictions = usage_restrictions unless usage_restrictions == SKIP
138
+ unless day_time_restriction_profile_id == SKIP
139
+ @day_time_restriction_profile_id =
140
+ day_time_restriction_profile_id
141
+ end
142
+ @day_time_restrictions = day_time_restrictions unless day_time_restrictions == SKIP
143
+ @product_restrictions = product_restrictions unless product_restrictions == SKIP
144
+ unless location_restriction_profile_id == SKIP
145
+ @location_restriction_profile_id =
146
+ location_restriction_profile_id
147
+ end
148
+ @location_restrictions = location_restrictions unless location_restrictions == SKIP
149
+ end
150
+
151
+ # Creates an instance of the object from a hash.
152
+ def self.from_hash(hash)
153
+ return nil unless hash
154
+
155
+ # Extract variables from the hash.
156
+ reset_day_time_restriction =
157
+ hash.key?('ResetDayTimeRestriction') ? hash['ResetDayTimeRestriction'] : SKIP
158
+ reset_location_restriction =
159
+ hash.key?('ResetLocationRestriction') ? hash['ResetLocationRestriction'] : SKIP
160
+ reset_product_restriction =
161
+ hash.key?('ResetProductRestriction') ? hash['ResetProductRestriction'] : SKIP
162
+ usage_restrictions = UsageRestrictionsCard.from_hash(hash['UsageRestrictions']) if
163
+ hash['UsageRestrictions']
164
+ day_time_restriction_profile_id =
165
+ hash.key?('DayTimeRestrictionProfileId') ? hash['DayTimeRestrictionProfileId'] : SKIP
166
+ day_time_restrictions = CardDayTimeRestrictions.from_hash(hash['DayTimeRestrictions']) if
167
+ hash['DayTimeRestrictions']
168
+ product_restrictions = ProductRestrictionCard.from_hash(hash['ProductRestrictions']) if
169
+ hash['ProductRestrictions']
170
+ location_restriction_profile_id =
171
+ hash.key?('LocationRestrictionProfileId') ? hash['LocationRestrictionProfileId'] : SKIP
172
+ location_restrictions = LocationRestriction.from_hash(hash['LocationRestrictions']) if
173
+ hash['LocationRestrictions']
174
+
175
+ # Create object from extracted values.
176
+ BundleRestrictionUpdate.new(reset_day_time_restriction,
177
+ reset_location_restriction,
178
+ reset_product_restriction,
179
+ usage_restrictions,
180
+ day_time_restriction_profile_id,
181
+ day_time_restrictions,
182
+ product_restrictions,
183
+ location_restriction_profile_id,
184
+ location_restrictions)
185
+ end
186
+ end
187
+ end