card-management-sdk 1.0.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (218) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -19
  3. data/lib/shell_card_management_ap_is/client.rb +2 -3
  4. data/lib/shell_card_management_ap_is/configuration.rb +15 -22
  5. data/lib/shell_card_management_ap_is/controllers/base_controller.rb +9 -9
  6. data/lib/shell_card_management_ap_is/controllers/card_controller.rb +434 -434
  7. data/lib/shell_card_management_ap_is/controllers/customer_controller.rb +261 -262
  8. data/lib/shell_card_management_ap_is/controllers/o_auth_authorization_controller.rb +11 -11
  9. data/lib/shell_card_management_ap_is/controllers/restriction_controller.rb +421 -291
  10. data/lib/shell_card_management_ap_is/exceptions/error_object_exception.rb +15 -15
  11. data/lib/shell_card_management_ap_is/exceptions/{error_user_access_error1_exception.rb → fleetmanagement_v1_customer_customer403_error_exception.rb} +17 -17
  12. data/lib/shell_card_management_ap_is/exceptions/{default_error_exception.rb → fleetmanagement_v1_customer_payers400_error_exception.rb} +20 -20
  13. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_customer_payers404_error_exception.rb +32 -0
  14. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser400_error_exception.rb +32 -0
  15. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser401_error_exception.rb +32 -0
  16. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser403_error_exception.rb +32 -0
  17. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser404_error_exception.rb +32 -0
  18. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v1_user_loggedinuser500_error_exception.rb +32 -0
  19. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard401_error_exception.rb +32 -0
  20. data/lib/shell_card_management_ap_is/exceptions/fleetmanagement_v2_restriction_searchcard500_error_exception.rb +32 -0
  21. data/lib/shell_card_management_ap_is/exceptions/o_auth_provider_exception.rb +15 -15
  22. data/lib/shell_card_management_ap_is/http/auth/bearer_token.rb +54 -10
  23. data/lib/shell_card_management_ap_is/models/account_access.rb +3 -8
  24. data/lib/shell_card_management_ap_is/models/account_request.rb +17 -26
  25. data/lib/shell_card_management_ap_is/models/account_response.rb +2 -6
  26. data/lib/shell_card_management_ap_is/models/account_response_accounts_items.rb +29 -53
  27. data/lib/shell_card_management_ap_is/models/account_restriction_request.rb +28 -10
  28. data/lib/shell_card_management_ap_is/models/account_restriction_response.rb +60 -11
  29. data/lib/shell_card_management_ap_is/models/account_velocity_limit.rb +11 -19
  30. data/lib/shell_card_management_ap_is/models/accounts.rb +1 -2
  31. data/lib/shell_card_management_ap_is/models/address.rb +4 -11
  32. data/lib/shell_card_management_ap_is/models/audit_request.rb +37 -33
  33. data/lib/shell_card_management_ap_is/models/audit_response.rb +2 -6
  34. data/lib/shell_card_management_ap_is/models/audit_response_audits_items.rb +50 -63
  35. data/lib/shell_card_management_ap_is/models/auto_renew_card_request.rb +2 -5
  36. data/lib/shell_card_management_ap_is/models/auto_renew_card_request_auto_renew_cards_items.rb +13 -5
  37. data/lib/shell_card_management_ap_is/models/auto_renew_card_response.rb +1 -3
  38. data/lib/shell_card_management_ap_is/models/auto_renew_card_response_data_items.rb +13 -3
  39. data/lib/shell_card_management_ap_is/models/bank_account.rb +5 -13
  40. data/lib/shell_card_management_ap_is/models/{search_account_limit_request_filters.rb → budle_details_request.rb} +29 -22
  41. data/lib/shell_card_management_ap_is/models/{create_bundle_response_data_items_cards_items.rb → bundle_card_restriction_status.rb} +4 -3
  42. data/lib/shell_card_management_ap_is/models/bundle_details_response.rb +181 -0
  43. data/lib/shell_card_management_ap_is/models/bundle_restriction.rb +86 -103
  44. data/lib/shell_card_management_ap_is/models/bundle_restriction_update.rb +185 -0
  45. data/lib/shell_card_management_ap_is/models/bundled_details_product_list.rb +116 -0
  46. data/lib/shell_card_management_ap_is/models/bundled_restrictions_list.rb +82 -0
  47. data/lib/shell_card_management_ap_is/models/cancel_card_request.rb +1 -3
  48. data/lib/shell_card_management_ap_is/models/cancel_card_response.rb +3 -6
  49. data/lib/shell_card_management_ap_is/models/card.rb +43 -51
  50. data/lib/shell_card_management_ap_is/models/card_block_schedule.rb +1 -2
  51. data/lib/shell_card_management_ap_is/models/{summary_of_bundle_response_data_items_card_bundles_items.rb → card_bundle.rb} +11 -18
  52. data/lib/shell_card_management_ap_is/models/card_contact.rb +222 -0
  53. data/lib/shell_card_management_ap_is/models/card_day_time_restrictions.rb +3 -9
  54. data/lib/shell_card_management_ap_is/models/card_delivery_address.rb +218 -0
  55. data/lib/shell_card_management_ap_is/models/card_delivery_contact.rb +7 -14
  56. data/lib/shell_card_management_ap_is/models/card_detail.rb +50 -61
  57. data/lib/shell_card_management_ap_is/models/card_details_request.rb +6 -14
  58. data/lib/shell_card_management_ap_is/models/card_details_response.rb +52 -89
  59. data/lib/shell_card_management_ap_is/models/card_details_response_card_block_schedules_items_all_of0.rb +1 -2
  60. data/lib/shell_card_management_ap_is/models/card_details_response_card_delivery_address.rb +6 -15
  61. data/lib/shell_card_management_ap_is/models/card_details_response_fuel_sets_items.rb +1 -2
  62. data/lib/shell_card_management_ap_is/models/card_details_response_non_fuel_sets_items.rb +1 -2
  63. data/lib/shell_card_management_ap_is/models/card_details_response_pin_delivery_address.rb +6 -15
  64. data/lib/shell_card_management_ap_is/models/card_group_request.rb +6 -12
  65. data/lib/shell_card_management_ap_is/models/card_group_response.rb +2 -6
  66. data/lib/shell_card_management_ap_is/models/card_group_response_card_groups_items.rb +10 -20
  67. data/lib/shell_card_management_ap_is/models/card_management_v1_cancel_request.rb +104 -0
  68. data/lib/shell_card_management_ap_is/models/card_management_v1_ordercard_request.rb +59 -0
  69. data/lib/shell_card_management_ap_is/models/card_management_v1_pinreminder_request.rb +130 -0
  70. data/lib/shell_card_management_ap_is/models/card_management_v1_updatestatus_request.rb +122 -0
  71. data/lib/shell_card_management_ap_is/models/card_move_request.rb +4 -9
  72. data/lib/shell_card_management_ap_is/models/card_move_request_cards_items.rb +1 -3
  73. data/lib/shell_card_management_ap_is/models/card_move_response.rb +2 -4
  74. data/lib/shell_card_management_ap_is/models/card_move_response_error_cards_items.rb +2 -5
  75. data/lib/shell_card_management_ap_is/models/card_move_response_successful_requests_items.rb +2 -5
  76. data/lib/shell_card_management_ap_is/models/{restriction_card_request.rb → card_restriction_req.rb} +42 -50
  77. data/lib/shell_card_management_ap_is/models/card_restriction_response.rb +96 -0
  78. data/lib/shell_card_management_ap_is/models/card_search_response.rb +2 -7
  79. data/lib/shell_card_management_ap_is/models/card_settings.rb +626 -0
  80. data/lib/shell_card_management_ap_is/models/card_summary_request.rb +3 -5
  81. data/lib/shell_card_management_ap_is/models/card_summary_response.rb +1 -3
  82. data/lib/shell_card_management_ap_is/models/card_type_request.rb +3 -7
  83. data/lib/shell_card_management_ap_is/models/card_type_response.rb +1 -3
  84. data/lib/shell_card_management_ap_is/models/card_type_response_customer_card_types_items.rb +15 -31
  85. data/lib/shell_card_management_ap_is/models/card_type_response_error.rb +1 -2
  86. data/lib/shell_card_management_ap_is/models/card_usage_restrictions.rb +5 -10
  87. data/lib/shell_card_management_ap_is/models/col_co_access.rb +2 -4
  88. data/lib/shell_card_management_ap_is/models/{location_restrictions_country_restrictions.rb → country_restriction.rb} +20 -21
  89. data/lib/shell_card_management_ap_is/models/create_bundle_request.rb +64 -62
  90. data/lib/shell_card_management_ap_is/models/create_bundle_response.rb +122 -47
  91. data/lib/shell_card_management_ap_is/models/create_card_group_request.rb +3 -9
  92. data/lib/shell_card_management_ap_is/models/create_card_group_request_cards_items.rb +1 -3
  93. data/lib/shell_card_management_ap_is/models/create_card_group_response.rb +2 -5
  94. data/lib/shell_card_management_ap_is/models/create_card_group_response_error_cards_items.rb +1 -3
  95. data/lib/shell_card_management_ap_is/models/create_card_group_response_successful_requests_items.rb +1 -3
  96. data/lib/shell_card_management_ap_is/models/create_card_response.rb +1 -2
  97. data/lib/shell_card_management_ap_is/models/customer_contract.rb +1 -2
  98. data/lib/shell_card_management_ap_is/models/customer_detail_request.rb +2 -5
  99. data/lib/shell_card_management_ap_is/models/customer_detail_response.rb +31 -45
  100. data/lib/shell_card_management_ap_is/models/day_time_restriction.rb +133 -0
  101. data/lib/shell_card_management_ap_is/models/day_time_restrictions.rb +52 -82
  102. data/lib/shell_card_management_ap_is/models/{summary_of_bundle_request.rb → default_error.rb} +10 -10
  103. data/lib/shell_card_management_ap_is/models/default_error_fault.rb +4 -5
  104. data/lib/shell_card_management_ap_is/models/delete_bundle_request.rb +14 -16
  105. data/lib/shell_card_management_ap_is/models/delete_bundle_response.rb +9 -10
  106. data/lib/shell_card_management_ap_is/models/delivery_address_update.rb +13 -11
  107. data/lib/shell_card_management_ap_is/models/delivery_address_update_references.rb +2 -5
  108. data/lib/shell_card_management_ap_is/models/delivery_address_update_references2.rb +98 -0
  109. data/lib/shell_card_management_ap_is/models/delivery_address_update_request.rb +3 -7
  110. data/lib/shell_card_management_ap_is/models/delivery_address_update_response.rb +5 -14
  111. data/lib/shell_card_management_ap_is/models/delivery_addresses.rb +7 -18
  112. data/lib/shell_card_management_ap_is/models/detail.rb +50 -0
  113. data/lib/shell_card_management_ap_is/models/eid_access.rb +1 -2
  114. data/lib/shell_card_management_ap_is/models/error_details.rb +1 -3
  115. data/lib/shell_card_management_ap_is/models/error_status.rb +1 -2
  116. data/lib/shell_card_management_ap_is/models/error_user_access_error.rb +1 -2
  117. data/lib/shell_card_management_ap_is/models/fault.rb +59 -0
  118. data/lib/shell_card_management_ap_is/models/filters.rb +702 -0
  119. data/lib/shell_card_management_ap_is/models/filters1.rb +579 -0
  120. data/lib/shell_card_management_ap_is/models/filters2.rb +200 -0
  121. data/lib/shell_card_management_ap_is/models/finance_currency.rb +1 -2
  122. data/lib/shell_card_management_ap_is/models/finance_currency2.rb +96 -0
  123. data/lib/shell_card_management_ap_is/models/{restriction_search_card_request.rb → fleetmanagement_v1_customer_payers400_error1.rb} +10 -10
  124. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_customer_payers404_error1.rb +50 -0
  125. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser400_error1.rb +50 -0
  126. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser401_error1.rb +50 -0
  127. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser404_error1.rb +50 -0
  128. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser500_error1.rb +50 -0
  129. data/lib/shell_card_management_ap_is/models/fleetmanagement_v1_user_loggedinuser_request.rb +104 -0
  130. data/lib/shell_card_management_ap_is/models/fleetmanagement_v2_restriction_searchcard401_error1.rb +50 -0
  131. data/lib/shell_card_management_ap_is/models/fleetmanagement_v2_restriction_searchcard500_error1.rb +50 -0
  132. data/lib/shell_card_management_ap_is/models/generate_pin_key_response.rb +1 -2
  133. data/lib/shell_card_management_ap_is/models/invoice_distribution_method.rb +2 -4
  134. data/lib/shell_card_management_ap_is/models/{location_restrictions.rb → location_restriction.rb} +20 -35
  135. data/lib/shell_card_management_ap_is/models/logged_in_user_request.rb +2 -4
  136. data/lib/shell_card_management_ap_is/models/logged_in_user_response.rb +12 -25
  137. data/lib/shell_card_management_ap_is/models/{location_restrictions_network_restrictions_items.rb → network_restriction.rb} +18 -20
  138. data/lib/shell_card_management_ap_is/models/o_auth_token.rb +2 -6
  139. data/lib/shell_card_management_ap_is/models/order_card_enquiry.rb +48 -45
  140. data/lib/shell_card_management_ap_is/models/order_card_enquiry_req.rb +5 -12
  141. data/lib/shell_card_management_ap_is/models/order_card_enquiry_request.rb +3 -4
  142. data/lib/shell_card_management_ap_is/models/order_card_enquiry_response.rb +1 -3
  143. data/lib/shell_card_management_ap_is/models/order_card_response.rb +1 -3
  144. data/lib/shell_card_management_ap_is/models/{location_restrictions_partner_site_restrictions_items.rb → partner_site_restriction.rb} +10 -12
  145. data/lib/shell_card_management_ap_is/models/payer_access.rb +3 -8
  146. data/lib/shell_card_management_ap_is/models/payer_details.rb +55 -96
  147. data/lib/shell_card_management_ap_is/models/payer_request.rb +9 -12
  148. data/lib/shell_card_management_ap_is/models/payer_response.rb +2 -6
  149. data/lib/shell_card_management_ap_is/models/payers.rb +2 -5
  150. data/lib/shell_card_management_ap_is/models/pin_advice_types.rb +5 -6
  151. data/lib/shell_card_management_ap_is/models/pin_contact.rb +234 -0
  152. data/lib/shell_card_management_ap_is/models/pin_deliver_to.rb +161 -0
  153. data/lib/shell_card_management_ap_is/models/pin_delivery_address.rb +222 -0
  154. data/lib/shell_card_management_ap_is/models/pin_delivery_contact.rb +7 -14
  155. data/lib/shell_card_management_ap_is/models/pin_delivery_details.rb +4 -11
  156. data/lib/shell_card_management_ap_is/models/pin_reminder_card_details.rb +19 -17
  157. data/lib/shell_card_management_ap_is/models/pin_reminder_reference.rb +2 -5
  158. data/lib/shell_card_management_ap_is/models/pin_reminder_request.rb +2 -6
  159. data/lib/shell_card_management_ap_is/models/pin_reminder_response.rb +1 -3
  160. data/lib/shell_card_management_ap_is/models/product_all_of0.rb +1 -2
  161. data/lib/shell_card_management_ap_is/models/product_group.rb +2 -6
  162. data/lib/shell_card_management_ap_is/models/{product_restrictions.rb → product_restriction_card.rb} +9 -12
  163. data/lib/shell_card_management_ap_is/models/purchase_categories.rb +1 -4
  164. data/lib/shell_card_management_ap_is/models/purchase_category1_all_of0.rb +10 -15
  165. data/lib/shell_card_management_ap_is/models/purchase_category_request.rb +2 -5
  166. data/lib/shell_card_management_ap_is/models/purchase_category_response.rb +1 -2
  167. data/lib/shell_card_management_ap_is/models/replace_card_settings.rb +25 -40
  168. data/lib/shell_card_management_ap_is/models/restriction.rb +82 -0
  169. data/lib/shell_card_management_ap_is/models/{restriction_search_card_response_data_items.rb → restriction_card_list.rb} +284 -328
  170. data/lib/shell_card_management_ap_is/models/{restriction_card_request_cards_items.rb → restriction_cards_list.rb} +69 -82
  171. data/lib/shell_card_management_ap_is/models/restriction_product.rb +62 -0
  172. data/lib/shell_card_management_ap_is/models/{restriction_card_response_data_items.rb → restrictioncards_res.rb} +100 -114
  173. data/lib/shell_card_management_ap_is/models/role.rb +3 -6
  174. data/lib/shell_card_management_ap_is/models/schedule_card_block_cards_items.rb +42 -39
  175. data/lib/shell_card_management_ap_is/models/schedule_card_block_request.rb +1 -2
  176. data/lib/shell_card_management_ap_is/models/schedule_card_block_response.rb +1 -3
  177. data/lib/shell_card_management_ap_is/models/schedule_card_block_response_data_items.rb +1 -3
  178. data/lib/shell_card_management_ap_is/models/search_account_limit_request.rb +79 -10
  179. data/lib/shell_card_management_ap_is/models/search_account_limit_response.rb +74 -20
  180. data/lib/shell_card_management_ap_is/models/search_card.rb +13 -3
  181. data/lib/shell_card_management_ap_is/models/search_card_request.rb +4 -6
  182. data/lib/shell_card_management_ap_is/models/{restriction_search_card_request_filters_cards_items.rb → search_card_restriction.rb} +19 -16
  183. data/lib/shell_card_management_ap_is/models/{restriction_search_card_request_filters.rb → search_card_restriction_req.rb} +72 -71
  184. data/lib/shell_card_management_ap_is/models/search_card_restriction_res.rb +89 -0
  185. data/lib/shell_card_management_ap_is/models/search_product_restriction.rb +3 -4
  186. data/lib/shell_card_management_ap_is/models/search_request.rb +25 -47
  187. data/lib/shell_card_management_ap_is/models/{location_restrictions_shell_site_restrictions_items.rb → shell_site_restriction.rb} +10 -17
  188. data/lib/shell_card_management_ap_is/models/submitted_card.rb +24 -9
  189. data/lib/shell_card_management_ap_is/models/summary_request.rb +21 -39
  190. data/lib/shell_card_management_ap_is/models/summary_response.rb +5 -11
  191. data/lib/shell_card_management_ap_is/models/{summary_of_bundle_response_data_items.rb → summaryofbundle_response.rb} +36 -33
  192. data/lib/shell_card_management_ap_is/models/{summaryof_bundle.rb → summaryofbundler_request.rb} +43 -36
  193. data/lib/shell_card_management_ap_is/models/update_bundle_request.rb +65 -70
  194. data/lib/shell_card_management_ap_is/models/update_bundle_response.rb +75 -21
  195. data/lib/shell_card_management_ap_is/models/update_card.rb +31 -20
  196. data/lib/shell_card_management_ap_is/models/update_card_group_request.rb +9 -17
  197. data/lib/shell_card_management_ap_is/models/update_card_group_response.rb +3 -6
  198. data/lib/shell_card_management_ap_is/models/update_card_group_response_move_card_references_items.rb +1 -3
  199. data/lib/shell_card_management_ap_is/models/update_card_renewal_address.rb +5 -11
  200. data/lib/shell_card_management_ap_is/models/update_card_renewal_address2.rb +155 -0
  201. data/lib/shell_card_management_ap_is/models/update_card_status_request.rb +1 -3
  202. data/lib/shell_card_management_ap_is/models/update_card_status_response.rb +2 -5
  203. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request.rb +2 -5
  204. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_request_m_pay_requests_items.rb +3 -5
  205. data/lib/shell_card_management_ap_is/models/update_m_pay_reg_status_response.rb +1 -2
  206. data/lib/shell_card_management_ap_is/models/usage_restriction.rb +1127 -0
  207. data/lib/shell_card_management_ap_is/models/{usage_restrictions.rb → usage_restrictions_card.rb} +74 -131
  208. data/lib/shell_card_management_ap_is/utilities/file_wrapper.rb +9 -9
  209. data/lib/shell_card_management_ap_is.rb +139 -95
  210. metadata +74 -38
  211. data/lib/shell_card_management_ap_is/models/create_bundle_request_restrictions.rb +0 -147
  212. data/lib/shell_card_management_ap_is/models/create_bundle_response_data_items.rb +0 -125
  213. data/lib/shell_card_management_ap_is/models/restriction_card_response.rb +0 -91
  214. data/lib/shell_card_management_ap_is/models/restriction_search_card_response.rb +0 -79
  215. data/lib/shell_card_management_ap_is/models/search_account_limit_response_data.rb +0 -106
  216. data/lib/shell_card_management_ap_is/models/search_card_response_restrictions.rb +0 -99
  217. data/lib/shell_card_management_ap_is/models/summary_of_bundle_response.rb +0 -79
  218. data/lib/shell_card_management_ap_is/models/url_enum.rb +0 -23
@@ -57,6 +57,12 @@ module ShellCardManagementApIs
57
57
  # @return [String]
58
58
  attr_accessor :pan
59
59
 
60
+ # Card PAN ID.
61
+ # Optional if CardId is given, else mandatory.
62
+ # Note: PANID is ignored if CardId is given.
63
+ # @return [String]
64
+ attr_accessor :panid
65
+
60
66
  # Expiry date of the card.
61
67
  # Optional if CardId is passed, else Mandatory.
62
68
  # Format: yyyyMMdd
@@ -67,32 +73,32 @@ module ShellCardManagementApIs
67
73
  # Action
68
74
  # Mandatory
69
75
  # Possible values are:
70
- # • AddOrUpdate – adds a new request or updates any existing requests, with
71
- # overlapping dates, for the card
72
- # • AddAndOverwriteAll - all the existing requests of the given card will be
73
- # removed and a new request with the specified FromDate and ToDate will be
74
- # added.
75
- # • Delete – deletes any existing request with the same start date and end
76
- # date for the card
77
- # • DeleteAll – deletes all saved future dated requests (all block and
76
+ # • AddOrUpdate – adds a new request or updates any existing requests,
77
+ # with overlapping dates, for the card
78
+ # • AddAndOverwriteAll - all the existing requests of the given card will
79
+ # be removed and a new request with the specified FromDate and ToDate will
80
+ # be added.
81
+ # • Delete – deletes any existing request with the same start date and
82
+ # end date for the card
83
+ # • DeleteAll – deletes all saved future dated requests (all block and
78
84
  # unblock requests) of the card.
79
85
  # @return [String]
80
86
  attr_accessor :action
81
87
 
82
88
  # Effective start date of Block / Unblock
83
89
  # Allowed Formats: –
84
- # • yyyyMMdd
85
- # • yyyyMMdd HH:mm
90
+ # • yyyyMMdd
91
+ # • yyyyMMdd HH:mm
86
92
  # Eg: 20230512 14:30, 20230512
87
93
  # Optional
88
94
  # Default value:
89
- # • If the card status is “Active” then Current date & Time
90
- # • If the card status is “TemporaryBlock (Customer)” then null.
95
+ # • If the card status is “Active” then Current date & Time
96
+ # • If the card status is “TemporaryBlock (Customer)” then null.
91
97
  # Note:
92
- # • Time is considered only when “IsTimeSupported” is true else it will be
93
- # treated as a date.
94
- # • Time will be passed in UTC time-zone.
95
- # • If the Card Status is “Temporary Block (Customer)” and FromDate is
98
+ # • Time is considered only when “IsTimeSupported” is true else it will
99
+ # be treated as a date.
100
+ # • Time will be passed in UTC time-zone.
101
+ # • If the Card Status is “Temporary Block (Customer)” and FromDate is
96
102
  # provided – The fromdate & time is considered as starting period of unblock
97
103
  # request.
98
104
  # @return [String]
@@ -100,20 +106,21 @@ module ShellCardManagementApIs
100
106
 
101
107
  # Effective end date of Block / Unblock
102
108
  # Allowed Formats: –
103
- # • yyyyMMdd
104
- # • yyyyMMdd HH:mm
109
+ # • yyyyMMdd
110
+ # • yyyyMMdd HH:mm
105
111
  # Eg: 20230512 14:30, 20230512
106
112
  # Optional – When the Card status is Active else mandatory.
107
113
  # When not provided, the card will remain blocked until manually unblocked.
108
114
  # Note:
109
- # • Time is considered only when the “IsTimeSupported” flag is set as true,
110
- # else it will be considered as only date.
111
- # • Date & Time passed in the request will be considered in UTC time-zone.
112
- # • If the card is currently in ‘Temporary Block (Customer)’ status, then
115
+ # • Time is considered only when the “IsTimeSupported” flag is set as
116
+ # true, else it will be considered as only date.
117
+ # • Date & Time passed in the request will be considered in UTC
118
+ # time-zone.
119
+ # • If the card is currently in ‘Temporary Block (Customer)’ status, then
113
120
  # this date is treated as the unblock date and is mandatory.
114
- # • If the Card Status is “Temporary Block (Customer)” and FromDate & ToDate
115
- # is provided - The request will be considered as a scheduled specific
116
- # period unblock request.
121
+ # • If the Card Status is “Temporary Block (Customer)” and FromDate &
122
+ # ToDate is provided - The request will be considered as a scheduled
123
+ # specific period unblock request.
117
124
  # @return [String]
118
125
  attr_accessor :to_date
119
126
 
@@ -143,6 +150,7 @@ module ShellCardManagementApIs
143
150
  @_hash['payer_number'] = 'PayerNumber'
144
151
  @_hash['card_id'] = 'CardId'
145
152
  @_hash['pan'] = 'PAN'
153
+ @_hash['panid'] = 'PANID'
146
154
  @_hash['card_expiry_date'] = 'CardExpiryDate'
147
155
  @_hash['action'] = 'Action'
148
156
  @_hash['from_date'] = 'FromDate'
@@ -163,6 +171,7 @@ module ShellCardManagementApIs
163
171
  payer_number
164
172
  card_id
165
173
  pan
174
+ panid
166
175
  card_expiry_date
167
176
  from_date
168
177
  to_date
@@ -178,20 +187,11 @@ module ShellCardManagementApIs
178
187
  ]
179
188
  end
180
189
 
181
- def initialize(action = nil,
182
- col_co_code = SKIP,
183
- col_co_id = SKIP,
184
- account_id = SKIP,
185
- account_number = SKIP,
186
- payer_id = SKIP,
187
- payer_number = SKIP,
188
- card_id = SKIP,
189
- pan = SKIP,
190
- card_expiry_date = SKIP,
191
- from_date = SKIP,
192
- to_date = SKIP,
193
- caller = SKIP,
194
- notify_caller = SKIP)
190
+ def initialize(action = nil, col_co_code = SKIP, col_co_id = SKIP,
191
+ account_id = SKIP, account_number = SKIP, payer_id = SKIP,
192
+ payer_number = SKIP, card_id = SKIP, pan = SKIP,
193
+ panid = SKIP, card_expiry_date = SKIP, from_date = SKIP,
194
+ to_date = SKIP, caller = SKIP, notify_caller = SKIP)
195
195
  @col_co_code = col_co_code unless col_co_code == SKIP
196
196
  @col_co_id = col_co_id unless col_co_id == SKIP
197
197
  @account_id = account_id unless account_id == SKIP
@@ -200,6 +200,7 @@ module ShellCardManagementApIs
200
200
  @payer_number = payer_number unless payer_number == SKIP
201
201
  @card_id = card_id unless card_id == SKIP
202
202
  @pan = pan unless pan == SKIP
203
+ @panid = panid unless panid == SKIP
203
204
  @card_expiry_date = card_expiry_date unless card_expiry_date == SKIP
204
205
  @action = action
205
206
  @from_date = from_date unless from_date == SKIP
@@ -222,6 +223,7 @@ module ShellCardManagementApIs
222
223
  payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
223
224
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
224
225
  pan = hash.key?('PAN') ? hash['PAN'] : SKIP
226
+ panid = hash.key?('PANID') ? hash['PANID'] : SKIP
225
227
  card_expiry_date =
226
228
  hash.key?('CardExpiryDate') ? hash['CardExpiryDate'] : SKIP
227
229
  from_date = hash.key?('FromDate') ? hash['FromDate'] : SKIP
@@ -239,6 +241,7 @@ module ShellCardManagementApIs
239
241
  payer_number,
240
242
  card_id,
241
243
  pan,
244
+ panid,
242
245
  card_expiry_date,
243
246
  from_date,
244
247
  to_date,
@@ -42,8 +42,7 @@ module ShellCardManagementApIs
42
42
  []
43
43
  end
44
44
 
45
- def initialize(is_time_supported = SKIP,
46
- schedule_card_block_cards = SKIP)
45
+ def initialize(is_time_supported = SKIP, schedule_card_block_cards = SKIP)
47
46
  @is_time_supported = is_time_supported unless is_time_supported == SKIP
48
47
  unless schedule_card_block_cards == SKIP
49
48
  @schedule_card_block_cards =
@@ -52,9 +52,7 @@ module ShellCardManagementApIs
52
52
  []
53
53
  end
54
54
 
55
- def initialize(main_reference = SKIP,
56
- request_id = SKIP,
57
- status = SKIP,
55
+ def initialize(main_reference = SKIP, request_id = SKIP, status = SKIP,
58
56
  data = SKIP)
59
57
  @main_reference = main_reference unless main_reference == SKIP
60
58
  @request_id = request_id unless request_id == SKIP
@@ -59,9 +59,7 @@ module ShellCardManagementApIs
59
59
  []
60
60
  end
61
61
 
62
- def initialize(card_id = SKIP,
63
- from_date = SKIP,
64
- to_date = SKIP,
62
+ def initialize(card_id = SKIP, from_date = SKIP, to_date = SKIP,
65
63
  reference_id = SKIP)
66
64
  @card_id = card_id unless card_id == SKIP
67
65
  @from_date = from_date unless from_date == SKIP
@@ -9,31 +9,90 @@ module ShellCardManagementApIs
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # TODO: Write general description for this method
13
- # @return [SearchAccountLimitRequestFilters]
14
- attr_accessor :filters
12
+ # Collecting Company Id of the selected payer.
13
+ # Optional if ColCoCode is passed else Mandatory.
14
+ # Example:
15
+ # @return [Integer]
16
+ attr_accessor :col_co_id
17
+
18
+ # Collecting Company Code (Shell Code) of the selected payer.
19
+ # Mandatory for serviced OUs such as Romania, Latvia, Lithuania, Estonia,
20
+ # Ukraine etc. It is optional for other countries if ColCoID is provided.
21
+ # Example:
22
+ # 86 for Philippines
23
+ # 5 for UK
24
+ # @return [Integer]
25
+ attr_accessor :col_co_code
26
+
27
+ # Payer Id of the selected payer.
28
+ # Optional if PayerNumber is passed else Mandatory
29
+ # Example: 123456
30
+ # @return [Integer]
31
+ attr_accessor :payer_id
32
+
33
+ # Payer Number of the selected payer.
34
+ # Optional if PayerId is passed else Mandatory
35
+ # Example: GB000000123
36
+ # @return [String]
37
+ attr_accessor :payer_number
38
+
39
+ # Account ID of the customer.
40
+ # Optional if AccountNumber is passed else Mandatory
41
+ # Example: 123456
42
+ # @return [Integer]
43
+ attr_accessor :account_id
44
+
45
+ # Account Number of the customer.
46
+ # Optional if AccountId is passed else Mandatory
47
+ # Example: GB000000123
48
+ # @return [String]
49
+ attr_accessor :account_number
15
50
 
16
51
  # A mapping from model property names to API property names.
17
52
  def self.names
18
53
  @_hash = {} if @_hash.nil?
19
- @_hash['filters'] = 'Filters'
54
+ @_hash['col_co_id'] = 'ColCoId'
55
+ @_hash['col_co_code'] = 'ColCoCode'
56
+ @_hash['payer_id'] = 'PayerId'
57
+ @_hash['payer_number'] = 'PayerNumber'
58
+ @_hash['account_id'] = 'AccountId'
59
+ @_hash['account_number'] = 'AccountNumber'
20
60
  @_hash
21
61
  end
22
62
 
23
63
  # An array for optional fields
24
64
  def self.optionals
25
65
  %w[
26
- filters
66
+ col_co_id
67
+ col_co_code
68
+ payer_id
69
+ payer_number
70
+ account_id
71
+ account_number
27
72
  ]
28
73
  end
29
74
 
30
75
  # An array for nullable fields
31
76
  def self.nullables
32
- []
77
+ %w[
78
+ col_co_id
79
+ col_co_code
80
+ payer_id
81
+ payer_number
82
+ account_id
83
+ account_number
84
+ ]
33
85
  end
34
86
 
35
- def initialize(filters = SKIP)
36
- @filters = filters unless filters == SKIP
87
+ def initialize(col_co_id = SKIP, col_co_code = SKIP, payer_id = SKIP,
88
+ payer_number = SKIP, account_id = SKIP,
89
+ account_number = SKIP)
90
+ @col_co_id = col_co_id unless col_co_id == SKIP
91
+ @col_co_code = col_co_code unless col_co_code == SKIP
92
+ @payer_id = payer_id unless payer_id == SKIP
93
+ @payer_number = payer_number unless payer_number == SKIP
94
+ @account_id = account_id unless account_id == SKIP
95
+ @account_number = account_number unless account_number == SKIP
37
96
  end
38
97
 
39
98
  # Creates an instance of the object from a hash.
@@ -41,10 +100,20 @@ module ShellCardManagementApIs
41
100
  return nil unless hash
42
101
 
43
102
  # Extract variables from the hash.
44
- filters = SearchAccountLimitRequestFilters.from_hash(hash['Filters']) if hash['Filters']
103
+ col_co_id = hash.key?('ColCoId') ? hash['ColCoId'] : SKIP
104
+ col_co_code = hash.key?('ColCoCode') ? hash['ColCoCode'] : SKIP
105
+ payer_id = hash.key?('PayerId') ? hash['PayerId'] : SKIP
106
+ payer_number = hash.key?('PayerNumber') ? hash['PayerNumber'] : SKIP
107
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
108
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
45
109
 
46
110
  # Create object from extracted values.
47
- SearchAccountLimitRequest.new(filters)
111
+ SearchAccountLimitRequest.new(col_co_id,
112
+ col_co_code,
113
+ payer_id,
114
+ payer_number,
115
+ account_id,
116
+ account_number)
48
117
  end
49
118
  end
50
119
  end
@@ -9,24 +9,49 @@ module ShellCardManagementApIs
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # TODO: Write general description for this method
12
+ # Request Id of the API call
13
13
  # @return [String]
14
14
  attr_accessor :request_id
15
15
 
16
- # TODO: Write general description for this method
16
+ # Account ID of the customer.
17
+ # @return [Integer]
18
+ attr_accessor :account_id
19
+
20
+ # Account Number
21
+ # Example: GB99215176
22
+ # @return [String]
23
+ attr_accessor :account_number
24
+
25
+ # 3 digit Shell global fuel product code, if already set up.
26
+ # Example: 021
27
+ # @return [String]
28
+ attr_accessor :reference_product
29
+
30
+ # The restriction condition code.
31
+ # Example: DECLINE_ALERT
17
32
  # @return [String]
18
- attr_accessor :status
33
+ attr_accessor :restriction_condition
19
34
 
20
- # TODO: Write general description for this method
21
- # @return [SearchAccountLimitResponseData]
22
- attr_accessor :data
35
+ # The restriction condition code.
36
+ # Example: DECLINE_ALERT
37
+ # @return [Array[AccountVelocityLimit]]
38
+ attr_accessor :velocity_limits
39
+
40
+ # The restriction condition code.
41
+ # Example: DECLINE_ALERT
42
+ # @return [ErrorStatus]
43
+ attr_accessor :error
23
44
 
24
45
  # A mapping from model property names to API property names.
25
46
  def self.names
26
47
  @_hash = {} if @_hash.nil?
27
48
  @_hash['request_id'] = 'RequestId'
28
- @_hash['status'] = 'Status'
29
- @_hash['data'] = 'Data'
49
+ @_hash['account_id'] = 'AccountId'
50
+ @_hash['account_number'] = 'AccountNumber'
51
+ @_hash['reference_product'] = 'ReferenceProduct'
52
+ @_hash['restriction_condition'] = 'RestrictionCondition'
53
+ @_hash['velocity_limits'] = 'VelocityLimits'
54
+ @_hash['error'] = 'Error'
30
55
  @_hash
31
56
  end
32
57
 
@@ -34,22 +59,32 @@ module ShellCardManagementApIs
34
59
  def self.optionals
35
60
  %w[
36
61
  request_id
37
- status
38
- data
62
+ account_id
63
+ account_number
64
+ reference_product
65
+ restriction_condition
66
+ velocity_limits
67
+ error
39
68
  ]
40
69
  end
41
70
 
42
71
  # An array for nullable fields
43
72
  def self.nullables
44
- []
73
+ %w[
74
+ request_id
75
+ ]
45
76
  end
46
77
 
47
- def initialize(request_id = SKIP,
48
- status = SKIP,
49
- data = SKIP)
78
+ def initialize(request_id = SKIP, account_id = SKIP, account_number = SKIP,
79
+ reference_product = SKIP, restriction_condition = SKIP,
80
+ velocity_limits = SKIP, error = SKIP)
50
81
  @request_id = request_id unless request_id == SKIP
51
- @status = status unless status == SKIP
52
- @data = data unless data == SKIP
82
+ @account_id = account_id unless account_id == SKIP
83
+ @account_number = account_number unless account_number == SKIP
84
+ @reference_product = reference_product unless reference_product == SKIP
85
+ @restriction_condition = restriction_condition unless restriction_condition == SKIP
86
+ @velocity_limits = velocity_limits unless velocity_limits == SKIP
87
+ @error = error unless error == SKIP
53
88
  end
54
89
 
55
90
  # Creates an instance of the object from a hash.
@@ -58,13 +93,32 @@ module ShellCardManagementApIs
58
93
 
59
94
  # Extract variables from the hash.
60
95
  request_id = hash.key?('RequestId') ? hash['RequestId'] : SKIP
61
- status = hash.key?('Status') ? hash['Status'] : SKIP
62
- data = SearchAccountLimitResponseData.from_hash(hash['Data']) if hash['Data']
96
+ account_id = hash.key?('AccountId') ? hash['AccountId'] : SKIP
97
+ account_number = hash.key?('AccountNumber') ? hash['AccountNumber'] : SKIP
98
+ reference_product =
99
+ hash.key?('ReferenceProduct') ? hash['ReferenceProduct'] : SKIP
100
+ restriction_condition =
101
+ hash.key?('RestrictionCondition') ? hash['RestrictionCondition'] : SKIP
102
+ # Parameter is an array, so we need to iterate through it
103
+ velocity_limits = nil
104
+ unless hash['VelocityLimits'].nil?
105
+ velocity_limits = []
106
+ hash['VelocityLimits'].each do |structure|
107
+ velocity_limits << (AccountVelocityLimit.from_hash(structure) if structure)
108
+ end
109
+ end
110
+
111
+ velocity_limits = SKIP unless hash.key?('VelocityLimits')
112
+ error = ErrorStatus.from_hash(hash['Error']) if hash['Error']
63
113
 
64
114
  # Create object from extracted values.
65
115
  SearchAccountLimitResponse.new(request_id,
66
- status,
67
- data)
116
+ account_id,
117
+ account_number,
118
+ reference_product,
119
+ restriction_condition,
120
+ velocity_limits,
121
+ error)
68
122
  end
69
123
  end
70
124
  end
@@ -20,11 +20,18 @@ module ShellCardManagementApIs
20
20
  # @return [String]
21
21
  attr_accessor :pan
22
22
 
23
+ # Card PANID
24
+ # optional id cardid given, else mandatory
25
+ # Note: PANID is ignored if CardId is given.
26
+ # @return [Float]
27
+ attr_accessor :panid
28
+
23
29
  # A mapping from model property names to API property names.
24
30
  def self.names
25
31
  @_hash = {} if @_hash.nil?
26
32
  @_hash['card_id'] = 'CardId'
27
33
  @_hash['pan'] = 'PAN'
34
+ @_hash['panid'] = 'PANID'
28
35
  @_hash
29
36
  end
30
37
 
@@ -33,6 +40,7 @@ module ShellCardManagementApIs
33
40
  %w[
34
41
  card_id
35
42
  pan
43
+ panid
36
44
  ]
37
45
  end
38
46
 
@@ -44,10 +52,10 @@ module ShellCardManagementApIs
44
52
  ]
45
53
  end
46
54
 
47
- def initialize(card_id = SKIP,
48
- pan = SKIP)
55
+ def initialize(card_id = SKIP, pan = SKIP, panid = SKIP)
49
56
  @card_id = card_id unless card_id == SKIP
50
57
  @pan = pan unless pan == SKIP
58
+ @panid = panid unless panid == SKIP
51
59
  end
52
60
 
53
61
  # Creates an instance of the object from a hash.
@@ -57,10 +65,12 @@ module ShellCardManagementApIs
57
65
  # Extract variables from the hash.
58
66
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
59
67
  pan = hash.key?('PAN') ? hash['PAN'] : SKIP
68
+ panid = hash.key?('PANID') ? hash['PANID'] : SKIP
60
69
 
61
70
  # Create object from extracted values.
62
71
  SearchCard.new(card_id,
63
- pan)
72
+ pan,
73
+ panid)
64
74
  end
65
75
  end
66
76
  end
@@ -9,8 +9,8 @@ module ShellCardManagementApIs
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
- # Encapsulate the Search details request.
13
- # @return [SearchRequest]
12
+ # TODO: Write general description for this method
13
+ # @return [Filters]
14
14
  attr_accessor :filters
15
15
 
16
16
  # Page Size – Number of records to show on a page
@@ -46,9 +46,7 @@ module ShellCardManagementApIs
46
46
  []
47
47
  end
48
48
 
49
- def initialize(filters = SKIP,
50
- page_size = SKIP,
51
- page = SKIP)
49
+ def initialize(filters = SKIP, page_size = SKIP, page = SKIP)
52
50
  @filters = filters unless filters == SKIP
53
51
  @page_size = page_size unless page_size == SKIP
54
52
  @page = page unless page == SKIP
@@ -59,7 +57,7 @@ module ShellCardManagementApIs
59
57
  return nil unless hash
60
58
 
61
59
  # Extract variables from the hash.
62
- filters = SearchRequest.from_hash(hash['Filters']) if hash['Filters']
60
+ filters = Filters.from_hash(hash['Filters']) if hash['Filters']
63
61
  page_size = hash.key?('PageSize') ? hash['PageSize'] : SKIP
64
62
  page = hash.key?('Page') ? hash['Page'] : SKIP
65
63
 
@@ -4,47 +4,50 @@
4
4
  # ( https://apimatic.io ).
5
5
 
6
6
  module ShellCardManagementApIs
7
- # RestrictionSearchCardRequestFiltersCardsItems Model.
8
- class RestrictionSearchCardRequestFiltersCardsItems < BaseModel
7
+ # SearchCardRestriction Model.
8
+ class SearchCardRestriction < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
+ # Unique Card Id
13
+ # Optional if PAN is given, else mandatory.
14
+ # @return [Integer]
15
+ attr_accessor :card_id
16
+
12
17
  # Card PAN.
13
18
  # Optional if CardId is given, else mandatory.
14
19
  # Note: PAN is ignored if CardId is given.
20
+ # Example: 7002051006629890645
15
21
  # @return [String]
16
22
  attr_accessor :pan
17
23
 
18
- # Unique Card Id in GFN.
19
- # Optional if PAN is given, else mandatory.
20
- # @return [Integer]
21
- attr_accessor :card_id
22
-
23
24
  # A mapping from model property names to API property names.
24
25
  def self.names
25
26
  @_hash = {} if @_hash.nil?
26
- @_hash['pan'] = 'PAN'
27
27
  @_hash['card_id'] = 'CardId'
28
+ @_hash['pan'] = 'PAN'
28
29
  @_hash
29
30
  end
30
31
 
31
32
  # An array for optional fields
32
33
  def self.optionals
33
34
  %w[
34
- pan
35
35
  card_id
36
+ pan
36
37
  ]
37
38
  end
38
39
 
39
40
  # An array for nullable fields
40
41
  def self.nullables
41
- []
42
+ %w[
43
+ card_id
44
+ pan
45
+ ]
42
46
  end
43
47
 
44
- def initialize(pan = SKIP,
45
- card_id = SKIP)
46
- @pan = pan unless pan == SKIP
48
+ def initialize(card_id = SKIP, pan = SKIP)
47
49
  @card_id = card_id unless card_id == SKIP
50
+ @pan = pan unless pan == SKIP
48
51
  end
49
52
 
50
53
  # Creates an instance of the object from a hash.
@@ -52,12 +55,12 @@ module ShellCardManagementApIs
52
55
  return nil unless hash
53
56
 
54
57
  # Extract variables from the hash.
55
- pan = hash.key?('PAN') ? hash['PAN'] : SKIP
56
58
  card_id = hash.key?('CardId') ? hash['CardId'] : SKIP
59
+ pan = hash.key?('PAN') ? hash['PAN'] : SKIP
57
60
 
58
61
  # Create object from extracted values.
59
- RestrictionSearchCardRequestFiltersCardsItems.new(pan,
60
- card_id)
62
+ SearchCardRestriction.new(card_id,
63
+ pan)
61
64
  end
62
65
  end
63
66
  end