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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a32008a1f6836380d63cf65c64b2605fba5595f32ebddd8d37890832aba819fe
4
- data.tar.gz: 5dbed5478ee18be88200e22310f862769246d67be84970305b0eb42d43cebe79
3
+ metadata.gz: 6ff2ef9f926fbb6afc25ac437c81645c10db4f5427963089c0fdf4e0ad1dc98c
4
+ data.tar.gz: 2a2e662890f9e225bfda1cb87d787cd4ca67dc892b365893a0891e7913d37495
5
5
  SHA512:
6
- metadata.gz: e53ecdad02ce9a0e77167c27f80d4225a6a697fb8d05986030af55681b391b2068d1e2224b073e15f2d7a4a70259206dce19f56ac0b41ceb5484d67f5970e985
7
- data.tar.gz: 55a21a6eb4f7d3e4bbb1318df5179b70176aca596b3e028f2c1d6123cdf1075a6adc8e66e8db7a3d097ac5d757c012e6afbc861f1a1d7fc6d4a37e6dbc207173
6
+ metadata.gz: b93026a7850c80e1320c7f5064efd150a8a61061c46f06297793ffe156e9a028a02a0d325993a3cf4eb54e915e5e8e26a7871eb30710d28b1ea15bacdc7afe2a
7
+ data.tar.gz: 7c5abfc733b458ba4f32c49860553859be7a95e4dfdff5b483ec5c189427507eb55dd53371494032e62a18305f144fc2864c682e55e3c7466bd119e73c9aea34
data/README.md CHANGED
@@ -16,27 +16,26 @@ Go to the Shell Developer Portal: [https://developer.shell.com](https://develope
16
16
  Install the gem from the command line:
17
17
 
18
18
  ```ruby
19
- gem install card-management-sdk -v 1.0.0
19
+ gem install card-management-sdk -v 1.1.0
20
20
  ```
21
21
 
22
22
  Or add the gem to your Gemfile and run `bundle`:
23
23
 
24
24
  ```ruby
25
- gem 'card-management-sdk', '1.0.0'
25
+ gem 'card-management-sdk', '1.1.0'
26
26
  ```
27
27
 
28
- For additional gem details, see the [RubyGems page for the card-management-sdk gem](https://rubygems.org/gems/card-management-sdk/versions/1.0.0).
28
+ For additional gem details, see the [RubyGems page for the card-management-sdk gem](https://rubygems.org/gems/card-management-sdk/versions/1.1.0).
29
29
 
30
30
  ## Initialize the API Client
31
31
 
32
- **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/client.md)
32
+ **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/client.md)
33
33
 
34
34
  The following parameters are configurable for the API Client:
35
35
 
36
36
  | Parameter | Type | Description |
37
37
  | --- | --- | --- |
38
- | `url` | `UrlEnum` | This variable specifies the type of environment. Environments:<br><br>* `api.shell.com` - Production<br>* `api-test.shell.com` - SIT<br>*Default*: `UrlEnum::ENUM_APITESTSHELLCOMTEST` |
39
- | `environment` | `Environment` | The API environment. <br> **Default: `Environment.PRODUCTION`** |
38
+ | `environment` | `Environment` | The API environment. <br> **Default: `Environment.SIT`** |
40
39
  | `connection` | `Faraday::Connection` | The Faraday connection object passed by the SDK user for making requests |
41
40
  | `adapter` | `Faraday::Adapter` | The Faraday adapter object passed by the SDK user for performing http requests |
42
41
  | `timeout` | `Float` | The value to use for connection timeout. <br> **Default: 60** |
@@ -46,8 +45,8 @@ The following parameters are configurable for the API Client:
46
45
  | `retry_statuses` | `Array` | A list of HTTP statuses to retry. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
47
46
  | `retry_methods` | `Array` | A list of HTTP methods to retry. <br> **Default: %i[get put]** |
48
47
  | `http_callback` | `HttpCallBack` | The Http CallBack allows defining callables for pre and post API calls. |
49
- | `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/$a/https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/basic-authentication.md) | The credential object for Basic Authentication |
50
- | `bearer_token_credentials` | [`BearerTokenCredentials`](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/$a/https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
48
+ | `basic_auth_credentials` | [`BasicAuthCredentials`](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/$a/https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/basic-authentication.md) | The credential object for Basic Authentication |
49
+ | `bearer_token_credentials` | [`BearerTokenCredentials`](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/$a/https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/oauth-2-client-credentials-grant.md) | The credential object for OAuth 2 Client Credentials Grant |
51
50
 
52
51
  The API client can be initialized as follows:
53
52
 
@@ -61,28 +60,38 @@ client = ShellCardManagementApIs::Client.new(
61
60
  o_auth_client_id: 'OAuthClientId',
62
61
  o_auth_client_secret: 'OAuthClientSecret'
63
62
  ),
64
- environment: Environment::PRODUCTION,
65
- url: UrlEnum::ENUM_APITESTSHELLCOMTEST
63
+ environment: Environment::SIT
66
64
  )
67
65
  ```
68
66
 
67
+ ## Environments
68
+
69
+ The SDK can be configured to use a different environment for making API calls. Available environments are:
70
+
71
+ ### Fields
72
+
73
+ | Name | Description |
74
+ | --- | --- |
75
+ | SIT | **Default** |
76
+ | Production | - |
77
+
69
78
  ## Authorization
70
79
 
71
80
  This API uses the following authentication schemes.
72
81
 
73
- * [`BasicAuth (Basic Authentication)`](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/$a/https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/basic-authentication.md)
74
- * [`BearerToken (OAuth 2 Client Credentials Grant)`](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/$a/https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/oauth-2-client-credentials-grant.md)
82
+ * [`BasicAuth (Basic Authentication)`](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/$a/https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/basic-authentication.md)
83
+ * [`BearerToken (OAuth 2 Client Credentials Grant)`](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/$a/https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/oauth-2-client-credentials-grant.md)
75
84
 
76
85
  ## List of APIs
77
86
 
78
- * [O Auth Authorization](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/controllers/o-auth-authorization.md)
79
- * [Customer](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/controllers/customer.md)
80
- * [Restriction](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/controllers/restriction.md)
81
- * [Card](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/controllers/card.md)
87
+ * [O Auth Authorization](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/controllers/o-auth-authorization.md)
88
+ * [Customer](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/controllers/customer.md)
89
+ * [Restriction](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/controllers/restriction.md)
90
+ * [Card](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/controllers/card.md)
82
91
 
83
92
  ## Classes Documentation
84
93
 
85
- * [Utility Classes](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/utility-classes.md)
86
- * [HttpResponse](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/http-response.md)
87
- * [HttpRequest](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.0.0/doc/http-request.md)
94
+ * [Utility Classes](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/utility-classes.md)
95
+ * [HttpResponse](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/http-response.md)
96
+ * [HttpRequest](https://www.github.com/sdks-io/card-management-ruby-sdk/tree/1.1.0/doc/http-request.md)
88
97
 
@@ -43,8 +43,7 @@ module ShellCardManagementApIs
43
43
  max_retries: 0, retry_interval: 1, backoff_factor: 2,
44
44
  retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
45
45
  retry_methods: %i[get put], http_callback: nil,
46
- environment: Environment::PRODUCTION,
47
- url: UrlEnum::ENUM_APITESTSHELLCOMTEST, basic_auth_credentials: nil,
46
+ environment: Environment::SIT, basic_auth_credentials: nil,
48
47
  bearer_token_credentials: nil, config: nil
49
48
  )
50
49
  @config = if config.nil?
@@ -54,7 +53,7 @@ module ShellCardManagementApIs
54
53
  backoff_factor: backoff_factor,
55
54
  retry_statuses: retry_statuses,
56
55
  retry_methods: retry_methods, http_callback: http_callback,
57
- environment: environment, url: url,
56
+ environment: environment,
58
57
  basic_auth_credentials: basic_auth_credentials,
59
58
  bearer_token_credentials: bearer_token_credentials
60
59
  )
@@ -7,15 +7,16 @@ module ShellCardManagementApIs
7
7
  # An enum for SDK environments.
8
8
  class Environment
9
9
  ENVIRONMENT = [
10
- PRODUCTION = 'production'.freeze
10
+ SIT = 'SIT'.freeze,
11
+ PRODUCTION = 'Production'.freeze
11
12
  ].freeze
12
13
  end
13
14
 
14
15
  # An enum for API servers.
15
16
  class Server
16
17
  SERVER = [
17
- DEFAULT = 'default'.freeze,
18
- ACCESS_TOKEN_SERVER = 'access token server'.freeze
18
+ OAUTH_SERVER = 'OAuth Server'.freeze,
19
+ SHELL = 'Shell'.freeze
19
20
  ].freeze
20
21
  end
21
22
 
@@ -23,8 +24,7 @@ module ShellCardManagementApIs
23
24
  # are configured in this class.
24
25
  class Configuration < CoreLibrary::HttpClientConfiguration
25
26
  # The attribute readers for properties.
26
- attr_reader :environment, :url, :basic_auth_credentials,
27
- :bearer_token_credentials
27
+ attr_reader :environment, :basic_auth_credentials, :bearer_token_credentials
28
28
 
29
29
  class << self
30
30
  attr_reader :environments
@@ -35,8 +35,7 @@ module ShellCardManagementApIs
35
35
  max_retries: 0, retry_interval: 1, backoff_factor: 2,
36
36
  retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
37
37
  retry_methods: %i[get put], http_callback: nil,
38
- environment: Environment::PRODUCTION,
39
- url: UrlEnum::ENUM_APITESTSHELLCOMTEST, basic_auth_credentials: nil,
38
+ environment: Environment::SIT, basic_auth_credentials: nil,
40
39
  bearer_token_credentials: nil
41
40
  )
42
41
 
@@ -48,9 +47,6 @@ module ShellCardManagementApIs
48
47
  # Current API environment
49
48
  @environment = String(environment)
50
49
 
51
- # This variable specifies the type of environment. Environments: * `api.shell.com` - Production * `api-test.shell.com` - SIT
52
- @url = url
53
-
54
50
  # The object holding Basic Authentication credentials
55
51
  @basic_auth_credentials = basic_auth_credentials
56
52
 
@@ -64,7 +60,7 @@ module ShellCardManagementApIs
64
60
  def clone_with(connection: nil, adapter: nil, timeout: nil,
65
61
  max_retries: nil, retry_interval: nil, backoff_factor: nil,
66
62
  retry_statuses: nil, retry_methods: nil, http_callback: nil,
67
- environment: nil, url: nil, basic_auth_credentials: nil,
63
+ environment: nil, basic_auth_credentials: nil,
68
64
  bearer_token_credentials: nil)
69
65
  connection ||= self.connection
70
66
  adapter ||= self.adapter
@@ -76,7 +72,6 @@ module ShellCardManagementApIs
76
72
  retry_methods ||= self.retry_methods
77
73
  http_callback ||= self.http_callback
78
74
  environment ||= self.environment
79
- url ||= self.url
80
75
  basic_auth_credentials ||= self.basic_auth_credentials
81
76
  bearer_token_credentials ||= self.bearer_token_credentials
82
77
 
@@ -87,7 +82,6 @@ module ShellCardManagementApIs
87
82
  retry_statuses: retry_statuses,
88
83
  retry_methods: retry_methods,
89
84
  http_callback: http_callback, environment: environment,
90
- url: url,
91
85
  basic_auth_credentials: basic_auth_credentials,
92
86
  bearer_token_credentials: bearer_token_credentials)
93
87
  end
@@ -95,9 +89,13 @@ module ShellCardManagementApIs
95
89
 
96
90
  # All the environments the SDK can run in.
97
91
  ENVIRONMENTS = {
92
+ Environment::SIT => {
93
+ Server::OAUTH_SERVER => 'https://api-test.shell.com',
94
+ Server::SHELL => 'https://api-test.shell.com/test'
95
+ },
98
96
  Environment::PRODUCTION => {
99
- Server::DEFAULT => 'https://{url}',
100
- Server::ACCESS_TOKEN_SERVER => 'https://api-test.shell.com/v1/oauth'
97
+ Server::OAUTH_SERVER => 'https://api.shell.com',
98
+ Server::SHELL => 'https://api.shell.com'
101
99
  }
102
100
  }.freeze
103
101
 
@@ -105,13 +103,8 @@ module ShellCardManagementApIs
105
103
  # @param [Configuration::Server] server The server enum for which the base URI is
106
104
  # required.
107
105
  # @return [String] The base URI.
108
- def get_base_uri(server = Server::DEFAULT)
109
- parameters = {
110
- 'url' => { 'value' => url, 'encode' => false }
111
- }
112
- APIHelper.append_url_with_template_parameters(
113
- ENVIRONMENTS[environment][server], parameters
114
- )
106
+ def get_base_uri(server = Server::SHELL)
107
+ ENVIRONMENTS[environment][server].clone
115
108
  end
116
109
  end
117
110
  end