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
@@ -275,40 +275,24 @@ module ShellCardManagementApIs
275
275
  ]
276
276
  end
277
277
 
278
- def initialize(can_have_pin = SKIP,
279
- card_type_id = SKIP,
280
- card_type_name = SKIP,
281
- col_co_currency_code = SKIP,
282
- customer_card_type_id = SKIP,
283
- day_time_restrictions = SKIP,
278
+ def initialize(can_have_pin = SKIP, card_type_id = SKIP,
279
+ card_type_name = SKIP, col_co_currency_code = SKIP,
280
+ customer_card_type_id = SKIP, day_time_restrictions = SKIP,
284
281
  default_purchase_category_id = SKIP,
285
- emboss_account_name = SKIP,
286
- expiry_period = SKIP,
287
- is_crt = SKIP,
288
- is_fleet = SKIP,
289
- is_international = SKIP,
290
- is_national = SKIP,
291
- is_partner_sites_included = SKIP,
292
- is_shell_sites_only = SKIP,
293
- is_virtual = SKIP,
294
- is_visible_to_customers = SKIP,
295
- is_active = SKIP,
282
+ emboss_account_name = SKIP, expiry_period = SKIP,
283
+ is_crt = SKIP, is_fleet = SKIP, is_international = SKIP,
284
+ is_national = SKIP, is_partner_sites_included = SKIP,
285
+ is_shell_sites_only = SKIP, is_virtual = SKIP,
286
+ is_visible_to_customers = SKIP, is_active = SKIP,
296
287
  is_card_available_for_download = SKIP,
297
- is_card_visible_to_customers = SKIP,
298
- pan_length = SKIP,
299
- purchase_categories = SKIP,
300
- token_type_id = SKIP,
301
- token_type_name = SKIP,
302
- usage_restrictions = SKIP,
303
- emv_contactless = SKIP,
304
- rfid = SKIP,
305
- pin_change_supported = SKIP,
306
- require_pin = SKIP,
307
- offline_pin = SKIP,
308
- is_default = SKIP,
288
+ is_card_visible_to_customers = SKIP, pan_length = SKIP,
289
+ purchase_categories = SKIP, token_type_id = SKIP,
290
+ token_type_name = SKIP, usage_restrictions = SKIP,
291
+ emv_contactless = SKIP, rfid = SKIP,
292
+ pin_change_supported = SKIP, require_pin = SKIP,
293
+ offline_pin = SKIP, is_default = SKIP,
309
294
  applications_to_show_npii_tokens = SKIP,
310
- medium_type_id = SKIP,
311
- medium_type = SKIP,
295
+ medium_type_id = SKIP, medium_type = SKIP,
312
296
  col_co_currency_symbol = SKIP)
313
297
  @can_have_pin = can_have_pin unless can_have_pin == SKIP
314
298
  @card_type_id = card_type_id unless card_type_id == SKIP
@@ -38,8 +38,7 @@ module ShellCardManagementApIs
38
38
  []
39
39
  end
40
40
 
41
- def initialize(code = SKIP,
42
- description = SKIP)
41
+ def initialize(code = SKIP, description = SKIP)
43
42
  @code = code unless code == SKIP
44
43
  @description = description unless description == SKIP
45
44
  end
@@ -168,16 +168,11 @@ module ShellCardManagementApIs
168
168
  ]
169
169
  end
170
170
 
171
- def initialize(level = SKIP,
172
- daily_spend_limit = SKIP,
173
- weekly_spend_limit = SKIP,
174
- monthly_spend_limit = SKIP,
175
- annual_spend_limit = SKIP,
176
- life_time_spend_limit = SKIP,
177
- daily_volume_limit = SKIP,
178
- weekly_volume_limit = SKIP,
179
- monthly_volume_limit = SKIP,
180
- annual_volume_limit = 0,
171
+ def initialize(level = SKIP, daily_spend_limit = SKIP,
172
+ weekly_spend_limit = SKIP, monthly_spend_limit = SKIP,
173
+ annual_spend_limit = SKIP, life_time_spend_limit = SKIP,
174
+ daily_volume_limit = SKIP, weekly_volume_limit = SKIP,
175
+ monthly_volume_limit = SKIP, annual_volume_limit = 0,
181
176
  life_time_volume_limit = SKIP,
182
177
  transaction_spend_limit = SKIP,
183
178
  transaction_volume_limit = SKIP,
@@ -56,10 +56,8 @@ module ShellCardManagementApIs
56
56
  ]
57
57
  end
58
58
 
59
- def initialize(col_co_id = SKIP,
60
- col_co_code = SKIP,
61
- col_co_country_name = SKIP,
62
- issuing_country_number = SKIP)
59
+ def initialize(col_co_id = SKIP, col_co_code = SKIP,
60
+ col_co_country_name = SKIP, issuing_country_number = SKIP)
63
61
  @col_co_id = col_co_id unless col_co_id == SKIP
64
62
  @col_co_code = col_co_code unless col_co_code == SKIP
65
63
  @col_co_country_name = col_co_country_name unless col_co_country_name == SKIP
@@ -4,13 +4,17 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellCardManagementApIs
7
- # An entity that encapsulate the country restrictions. Optional.
8
- class LocationRestrictionsCountryRestrictions < BaseModel
7
+ # CountryRestriction Model.
8
+ class CountryRestriction < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # Boolean Flag indicates whether the profile is inclusive or exclusive.
13
- # Mandatory
12
+ # A list of ISO 3166-1 Numeric-3 country codes.
13
+ # Example: 826 for United Kingdom.
14
+ # @return [Array[String]]
15
+ attr_accessor :countries
16
+
17
+ # Flag indicates whether the profile is inclusive or exclusive.
14
18
  # Example: False - (inclusive), i.e. the “Countries” property lists the
15
19
  # countries where the transactions will be allowed.
16
20
  # True - (exclusive), i.e. the “Countries” property lists the countries
@@ -18,24 +22,20 @@ module ShellCardManagementApIs
18
22
  # @return [TrueClass | FalseClass]
19
23
  attr_accessor :exclusive
20
24
 
21
- # ISO 3166-1 Numeric-3 code of the country where the network restriction is
22
- # applied.
23
- # Example: 826 for United Kingdom.
24
- # Mandatory
25
- # @return [Array[String]]
26
- attr_accessor :countries
27
-
28
25
  # A mapping from model property names to API property names.
29
26
  def self.names
30
27
  @_hash = {} if @_hash.nil?
31
- @_hash['exclusive'] = 'Exclusive'
32
28
  @_hash['countries'] = 'Countries'
29
+ @_hash['exclusive'] = 'Exclusive'
33
30
  @_hash
34
31
  end
35
32
 
36
33
  # An array for optional fields
37
34
  def self.optionals
38
- []
35
+ %w[
36
+ countries
37
+ exclusive
38
+ ]
39
39
  end
40
40
 
41
41
  # An array for nullable fields
@@ -43,10 +43,9 @@ module ShellCardManagementApIs
43
43
  []
44
44
  end
45
45
 
46
- def initialize(exclusive = nil,
47
- countries = nil)
48
- @exclusive = exclusive
49
- @countries = countries
46
+ def initialize(countries = SKIP, exclusive = SKIP)
47
+ @countries = countries unless countries == SKIP
48
+ @exclusive = exclusive unless exclusive == SKIP
50
49
  end
51
50
 
52
51
  # Creates an instance of the object from a hash.
@@ -54,12 +53,12 @@ module ShellCardManagementApIs
54
53
  return nil unless hash
55
54
 
56
55
  # Extract variables from the hash.
57
- exclusive = hash.key?('Exclusive') ? hash['Exclusive'] : nil
58
- countries = hash.key?('Countries') ? hash['Countries'] : nil
56
+ countries = hash.key?('Countries') ? hash['Countries'] : SKIP
57
+ exclusive = hash.key?('Exclusive') ? hash['Exclusive'] : SKIP
59
58
 
60
59
  # Create object from extracted values.
61
- LocationRestrictionsCountryRestrictions.new(exclusive,
62
- countries)
60
+ CountryRestriction.new(countries,
61
+ exclusive)
63
62
  end
64
63
  end
65
64
  end
@@ -9,26 +9,47 @@ module ShellCardManagementApIs
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # Collecting Company Id of the selected payer.
12
+ # Collecting Company Id of the selected payer.
13
13
  # Optional if ColCoCode is passed else Mandatory.
14
14
  # Example:
15
- # 1-Philippines
16
- # 5-UK
15
+ # 1 for Philippines
16
+ # 5 for UK
17
17
  # @return [Integer]
18
18
  attr_accessor :col_co_id
19
19
 
20
+ # Collecting Company Code (Shell Code) of the selected payer.
21
+ # Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia,
22
+ # Ukraine etc. It is optional for other countries if ColCoID is provided.
23
+ # Example:
24
+ # 86 for Philippines
25
+ # 5 for UK
26
+ # @return [Integer]
27
+ attr_accessor :col_co_code
28
+
20
29
  # Payer Id of the selected payer.
21
- # Optional if PayerNumber is passed else Mandatory
30
+ # Either PayerId or PayerNumber or both must be passed.
22
31
  # Example: 123456
23
32
  # @return [Integer]
24
33
  attr_accessor :payer_id
25
34
 
35
+ # Payer Number of the selected payer.
36
+ # Either PayerId or PayerNumber or both must be passed.
37
+ # Example: GB000000123
38
+ # @return [String]
39
+ attr_accessor :payer_number
40
+
26
41
  # Account ID of the customer.
27
42
  # Either AccountId or AccountNumber or both must be passed.
28
43
  # Example: 123456
29
44
  # @return [Integer]
30
45
  attr_accessor :account_id
31
46
 
47
+ # Account Number of the customer.
48
+ # Either AccountId or AccountNumber or both must be passed.
49
+ # Example: GB000000123
50
+ # @return [String]
51
+ attr_accessor :account_number
52
+
32
53
  # Identifier of the bundle in external system.
33
54
  # Optional.
34
55
  # @return [String]
@@ -47,43 +68,26 @@ module ShellCardManagementApIs
47
68
  # @return [Array[String]]
48
69
  attr_accessor :cards
49
70
 
50
- # Collecting Company Code (Shell Code) of the selected payer.
51
- # Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia,
52
- # Ukraine etc. It is optional for other countries if ColCoID is provided.
53
- # Example:
54
- # 86-Philippines
55
- # 5-UK
56
- # @return [Integer]
57
- attr_accessor :col_co_code
58
-
59
- # Payer Number (Ex: GB000000123) of the selected payer.
60
- # Optional if PayerId is passed else Mandatory
61
- # @return [String]
62
- attr_accessor :payer_number
63
-
64
- # Account Number of the customer.
65
- # Either AccountId or AccountNumber or both must be passed.
66
- # Example: GB000000123
67
- # @return [String]
68
- attr_accessor :account_number
69
-
70
- # Restrictions to be applied on the bundle.
71
- # Mandatory
72
- # @return [CreateBundleRequestRestrictions]
71
+ # List of Card PANs to be added in the bundle.
72
+ # Mandatory.
73
+ # Example: 7002051006629890645
74
+ # When PAN matches with multiple cards, the restriction will be applied on
75
+ # the latest issued card.
76
+ # @return [BundleRestriction]
73
77
  attr_accessor :restrictions
74
78
 
75
79
  # A mapping from model property names to API property names.
76
80
  def self.names
77
81
  @_hash = {} if @_hash.nil?
78
82
  @_hash['col_co_id'] = 'ColCoId'
83
+ @_hash['col_co_code'] = 'ColCoCode'
79
84
  @_hash['payer_id'] = 'PayerId'
85
+ @_hash['payer_number'] = 'PayerNumber'
80
86
  @_hash['account_id'] = 'AccountId'
87
+ @_hash['account_number'] = 'AccountNumber'
81
88
  @_hash['external_bundle_id'] = 'ExternalBundleId'
82
89
  @_hash['description'] = 'Description'
83
90
  @_hash['cards'] = 'Cards'
84
- @_hash['col_co_code'] = 'ColCoCode'
85
- @_hash['payer_number'] = 'PayerNumber'
86
- @_hash['account_number'] = 'AccountNumber'
87
91
  @_hash['restrictions'] = 'Restrictions'
88
92
  @_hash
89
93
  end
@@ -92,12 +96,14 @@ module ShellCardManagementApIs
92
96
  def self.optionals
93
97
  %w[
94
98
  col_co_id
95
- payer_id
96
- account_id
97
- external_bundle_id
98
99
  col_co_code
100
+ payer_id
99
101
  payer_number
102
+ account_id
100
103
  account_number
104
+ external_bundle_id
105
+ description
106
+ cards
101
107
  restrictions
102
108
  ]
103
109
  end
@@ -105,31 +111,29 @@ module ShellCardManagementApIs
105
111
  # An array for nullable fields
106
112
  def self.nullables
107
113
  %w[
108
- external_bundle_id
114
+ col_co_id
109
115
  col_co_code
116
+ payer_id
117
+ account_id
110
118
  account_number
119
+ external_bundle_id
120
+ restrictions
111
121
  ]
112
122
  end
113
123
 
114
- def initialize(description = nil,
115
- cards = nil,
116
- col_co_id = SKIP,
117
- payer_id = SKIP,
118
- account_id = SKIP,
119
- external_bundle_id = SKIP,
120
- col_co_code = SKIP,
121
- payer_number = SKIP,
122
- account_number = SKIP,
123
- restrictions = SKIP)
124
+ def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
125
+ payer_number = SKIP, account_id = SKIP,
126
+ account_number = SKIP, external_bundle_id = SKIP,
127
+ description = SKIP, cards = SKIP, restrictions = SKIP)
124
128
  @col_co_id = col_co_id unless col_co_id == SKIP
125
- @payer_id = payer_id unless payer_id == SKIP
126
- @account_id = account_id unless account_id == SKIP
127
- @external_bundle_id = external_bundle_id unless external_bundle_id == SKIP
128
- @description = description
129
- @cards = cards
130
129
  @col_co_code = col_co_code unless col_co_code == SKIP
130
+ @payer_id = payer_id unless payer_id == SKIP
131
131
  @payer_number = payer_number unless payer_number == SKIP
132
+ @account_id = account_id unless account_id == SKIP
132
133
  @account_number = account_number unless account_number == SKIP
134
+ @external_bundle_id = external_bundle_id unless external_bundle_id == SKIP
135
+ @description = description unless description == SKIP
136
+ @cards = cards unless cards == SKIP
133
137
  @restrictions = restrictions unless restrictions == SKIP
134
138
  end
135
139
 
@@ -138,29 +142,28 @@ module ShellCardManagementApIs
138
142
  return nil unless hash
139
143
 
140
144
  # Extract variables from the hash.
141
- description = hash.key?('Description') ? hash['Description'] : nil
142
- cards = hash.key?('Cards') ? hash['Cards'] : nil
143
145
  col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
146
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
144
147
  payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
148
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
145
149
  account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
150
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
146
151
  external_bundle_id =
147
152
  hash.key?('ExternalBundleId') ? hash['ExternalBundleId'] : SKIP
148
- col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
149
- payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
150
- account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
151
- restrictions = CreateBundleRequestRestrictions.from_hash(hash['Restrictions']) if
152
- hash['Restrictions']
153
+ description = hash.key?('Description') ? hash['Description'] : SKIP
154
+ cards = hash.key?('Cards') ? hash['Cards'] : SKIP
155
+ restrictions = BundleRestriction.from_hash(hash['Restrictions']) if hash['Restrictions']
153
156
 
154
157
  # Create object from extracted values.
155
- CreateBundleRequest.new(description,
156
- cards,
157
- col_co_id,
158
- payer_id,
159
- account_id,
160
- external_bundle_id,
158
+ CreateBundleRequest.new(col_co_id,
161
159
  col_co_code,
160
+ payer_id,
162
161
  payer_number,
162
+ account_id,
163
163
  account_number,
164
+ external_bundle_id,
165
+ description,
166
+ cards,
164
167
  restrictions)
165
168
  end
166
169
  end
@@ -9,29 +9,66 @@ module ShellCardManagementApIs
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # Request Id
12
+ # Request Id of the API call
13
13
  # @return [String]
14
14
  attr_accessor :request_id
15
15
 
16
- # Response status
16
+ # Request Id of the API call
17
+ # @return [ErrorStatus]
18
+ attr_accessor :bundle_creation_status
19
+
20
+ # Identifier of the newly created bundle
21
+ # @return [String]
22
+ attr_accessor :bundle_id
23
+
24
+ # Identifier of the newly created bundle
25
+ # @return [ErrorStatus]
26
+ attr_accessor :day_time_restriction_status
27
+
28
+ # Identifier of the day/time restriction profile created
17
29
  # @return [String]
18
- attr_accessor :status
30
+ attr_accessor :day_time_restriction_profile_id
31
+
32
+ # Identifier of the day/time restriction profile created
33
+ # @return [ErrorStatus]
34
+ attr_accessor :location_restriction_status
19
35
 
20
- # Response status
21
- # @return [Array[CreateBundleResponseDataItems]]
22
- attr_accessor :data
36
+ # Identifier of the location restriction profile created
37
+ # @return [String]
38
+ attr_accessor :location_restriction_profile_id
23
39
 
24
- # Response status
25
- # @return [Array[ErrorDetails]]
26
- attr_accessor :errors
40
+ # Identifier of the location restriction profile created
41
+ # @return [ErrorStatus]
42
+ attr_accessor :usage_restriction_status
43
+
44
+ # Identifier of the location restriction profile created
45
+ # @return [ErrorStatus]
46
+ attr_accessor :product_restriction_status
47
+
48
+ # Identifier of the location restriction profile created
49
+ # @return [BundleCardRestrictionStatus]
50
+ attr_accessor :cards
51
+
52
+ # Identifier of the location restriction profile created
53
+ # @return [ErrorStatus]
54
+ attr_accessor :error
27
55
 
28
56
  # A mapping from model property names to API property names.
29
57
  def self.names
30
58
  @_hash = {} if @_hash.nil?
31
59
  @_hash['request_id'] = 'RequestId'
32
- @_hash['status'] = 'Status'
33
- @_hash['data'] = 'Data'
34
- @_hash['errors'] = 'Errors'
60
+ @_hash['bundle_creation_status'] = 'BundleCreationStatus'
61
+ @_hash['bundle_id'] = 'BundleId'
62
+ @_hash['day_time_restriction_status'] = 'DayTimeRestrictionStatus'
63
+ @_hash['day_time_restriction_profile_id'] =
64
+ 'DayTimeRestrictionProfileId'
65
+ @_hash['location_restriction_status'] = 'LocationRestrictionStatus'
66
+ @_hash['location_restriction_profile_id'] =
67
+ 'LocationRestrictionProfileId'
68
+ @_hash['usage_restriction_status'] = 'UsageRestrictionStatus'
69
+ @_hash['product_restriction_status'] = 'ProductRestrictionStatus'
70
+ @_hash['cards'] = 'Cards'
71
+ @_hash['error'] = 'Error'
35
72
  @_hash
36
73
  end
37
74
 
@@ -39,25 +76,60 @@ module ShellCardManagementApIs
39
76
  def self.optionals
40
77
  %w[
41
78
  request_id
42
- status
43
- data
44
- errors
79
+ bundle_creation_status
80
+ bundle_id
81
+ day_time_restriction_status
82
+ day_time_restriction_profile_id
83
+ location_restriction_status
84
+ location_restriction_profile_id
85
+ usage_restriction_status
86
+ product_restriction_status
87
+ cards
88
+ error
45
89
  ]
46
90
  end
47
91
 
48
92
  # An array for nullable fields
49
93
  def self.nullables
50
- []
94
+ %w[
95
+ request_id
96
+ ]
51
97
  end
52
98
 
53
- def initialize(request_id = SKIP,
54
- status = SKIP,
55
- data = SKIP,
56
- errors = SKIP)
99
+ def initialize(request_id = SKIP, bundle_creation_status = SKIP,
100
+ bundle_id = SKIP, day_time_restriction_status = SKIP,
101
+ day_time_restriction_profile_id = SKIP,
102
+ location_restriction_status = SKIP,
103
+ location_restriction_profile_id = SKIP,
104
+ usage_restriction_status = SKIP,
105
+ product_restriction_status = SKIP, cards = SKIP,
106
+ error = SKIP)
57
107
  @request_id = request_id unless request_id == SKIP
58
- @status = status unless status == SKIP
59
- @data = data unless data == SKIP
60
- @errors = errors unless errors == SKIP
108
+ @bundle_creation_status = bundle_creation_status unless bundle_creation_status == SKIP
109
+ @bundle_id = bundle_id unless bundle_id == SKIP
110
+ unless day_time_restriction_status == SKIP
111
+ @day_time_restriction_status =
112
+ day_time_restriction_status
113
+ end
114
+ unless day_time_restriction_profile_id == SKIP
115
+ @day_time_restriction_profile_id =
116
+ day_time_restriction_profile_id
117
+ end
118
+ unless location_restriction_status == SKIP
119
+ @location_restriction_status =
120
+ location_restriction_status
121
+ end
122
+ unless location_restriction_profile_id == SKIP
123
+ @location_restriction_profile_id =
124
+ location_restriction_profile_id
125
+ end
126
+ @usage_restriction_status = usage_restriction_status unless usage_restriction_status == SKIP
127
+ unless product_restriction_status == SKIP
128
+ @product_restriction_status =
129
+ product_restriction_status
130
+ end
131
+ @cards = cards unless cards == SKIP
132
+ @error = error unless error == SKIP
61
133
  end
62
134
 
63
135
  # Creates an instance of the object from a hash.
@@ -66,33 +138,36 @@ module ShellCardManagementApIs
66
138
 
67
139
  # Extract variables from the hash.
68
140
  request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
69
- status = hash.key?('Status') ? hash['Status'] : SKIP
70
- # Parameter is an array, so we need to iterate through it
71
- data = nil
72
- unless hash['Data'].nil?
73
- data = []
74
- hash['Data'].each do |structure|
75
- data << (CreateBundleResponseDataItems.from_hash(structure) if structure)
76
- end
77
- end
78
-
79
- data = SKIP unless hash.key?('Data')
80
- # Parameter is an array, so we need to iterate through it
81
- errors = nil
82
- unless hash['Errors'].nil?
83
- errors = []
84
- hash['Errors'].each do |structure|
85
- errors << (ErrorDetails.from_hash(structure) if structure)
86
- end
87
- end
88
-
89
- errors = SKIP unless hash.key?('Errors')
141
+ bundle_creation_status = ErrorStatus.from_hash(hash['BundleCreationStatus']) if
142
+ hash['BundleCreationStatus']
143
+ bundle_id = hash.key?('BundleId') ? hash['BundleId'] : SKIP
144
+ day_time_restriction_status = ErrorStatus.from_hash(hash['DayTimeRestrictionStatus']) if
145
+ hash['DayTimeRestrictionStatus']
146
+ day_time_restriction_profile_id =
147
+ hash.key?('DayTimeRestrictionProfileId') ? hash['DayTimeRestrictionProfileId'] : SKIP
148
+ location_restriction_status = ErrorStatus.from_hash(hash['LocationRestrictionStatus']) if
149
+ hash['LocationRestrictionStatus']
150
+ location_restriction_profile_id =
151
+ hash.key?('LocationRestrictionProfileId') ? hash['LocationRestrictionProfileId'] : SKIP
152
+ usage_restriction_status = ErrorStatus.from_hash(hash['UsageRestrictionStatus']) if
153
+ hash['UsageRestrictionStatus']
154
+ product_restriction_status = ErrorStatus.from_hash(hash['ProductRestrictionStatus']) if
155
+ hash['ProductRestrictionStatus']
156
+ cards = BundleCardRestrictionStatus.from_hash(hash['Cards']) if hash['Cards']
157
+ error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
90
158
 
91
159
  # Create object from extracted values.
92
160
  CreateBundleResponse.new(request_id,
93
- status,
94
- data,
95
- errors)
161
+ bundle_creation_status,
162
+ bundle_id,
163
+ day_time_restriction_status,
164
+ day_time_restriction_profile_id,
165
+ location_restriction_status,
166
+ location_restriction_profile_id,
167
+ usage_restriction_status,
168
+ product_restriction_status,
169
+ cards,
170
+ error)
96
171
  end
97
172
  end
98
173
  end
@@ -101,15 +101,9 @@ module ShellCardManagementApIs
101
101
  ]
102
102
  end
103
103
 
104
- def initialize(col_co_code = SKIP,
105
- col_co_id = SKIP,
106
- payer_number = SKIP,
107
- payer_id = SKIP,
108
- account_id = SKIP,
109
- account_number = SKIP,
110
- print_on_card = SKIP,
111
- card_group_name = SKIP,
112
- cards = SKIP)
104
+ def initialize(col_co_code = SKIP, col_co_id = SKIP, payer_number = SKIP,
105
+ payer_id = SKIP, account_id = SKIP, account_number = SKIP,
106
+ print_on_card = SKIP, card_group_name = SKIP, cards = SKIP)
113
107
  @col_co_code = col_co_code unless col_co_code == SKIP
114
108
  @col_co_id = col_co_id unless col_co_id == SKIP
115
109
  @payer_number = payer_number unless payer_number == SKIP
@@ -54,9 +54,7 @@ module ShellCardManagementApIs
54
54
  []
55
55
  end
56
56
 
57
- def initialize(account_id = SKIP,
58
- account_number = SKIP,
59
- card_id = SKIP,
57
+ def initialize(account_id = SKIP, account_number = SKIP, card_id = SKIP,
60
58
  pan = SKIP)
61
59
  @account_id = account_id unless account_id == SKIP
62
60
  @account_number = account_number unless account_number == SKIP
@@ -73,11 +73,8 @@ module ShellCardManagementApIs
73
73
  []
74
74
  end
75
75
 
76
- def initialize(main_reference = SKIP,
77
- new_card_group_reference = SKIP,
78
- successful_requests = SKIP,
79
- error_cards = SKIP,
80
- error = SKIP,
76
+ def initialize(main_reference = SKIP, new_card_group_reference = SKIP,
77
+ successful_requests = SKIP, error_cards = SKIP, error = SKIP,
81
78
  request_id = SKIP)
82
79
  @main_reference = main_reference unless main_reference == SKIP
83
80
  @new_card_group_reference = new_card_group_reference unless new_card_group_reference == SKIP
@@ -50,9 +50,7 @@ module ShellCardManagementApIs
50
50
  []
51
51
  end
52
52
 
53
- def initialize(card_id = SKIP,
54
- pan = SKIP,
55
- error_code = SKIP,
53
+ def initialize(card_id = SKIP, pan = SKIP, error_code = SKIP,
56
54
  error_description = SKIP)
57
55
  @card_id = card_id unless card_id == SKIP
58
56
  @pan = pan unless pan == SKIP