ifeelgoods 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/Gemfile.lock +81 -0
  4. data/README.md +167 -0
  5. data/Rakefile +10 -0
  6. data/docs/Account.md +34 -0
  7. data/docs/AccountsApi.md +84 -0
  8. data/docs/ActivateRedemptionRequest.md +18 -0
  9. data/docs/ActivateRedemptionRequestData.md +18 -0
  10. data/docs/Address.md +32 -0
  11. data/docs/BrandSummary.md +24 -0
  12. data/docs/BudgetLineItem.md +30 -0
  13. data/docs/CardConsultRedemption200Response.md +18 -0
  14. data/docs/CardConsultRedemption200ResponseData.md +20 -0
  15. data/docs/CardConsultRedemption422Response.md +20 -0
  16. data/docs/ClientDetails.md +40 -0
  17. data/docs/ClientSummary.md +40 -0
  18. data/docs/ClientSummaryBudgetAlerts.md +20 -0
  19. data/docs/ClientsApi.md +341 -0
  20. data/docs/CreateAndRedeemRequest.md +18 -0
  21. data/docs/CreateAndRedeemRequestData.md +24 -0
  22. data/docs/CreateRedemption201Response.md +18 -0
  23. data/docs/CreateRedemption422Response.md +20 -0
  24. data/docs/CreateRedemptionRequest.md +18 -0
  25. data/docs/CreateRedemptionRequestData.md +26 -0
  26. data/docs/CreateRedemptionRequestDataCustomization.md +18 -0
  27. data/docs/CreateRedemptionRequestDataCustomizationPdf.md +20 -0
  28. data/docs/CreateRedemptionRequestDataReward.md +18 -0
  29. data/docs/CreateRedemptionRequestDataValue.md +18 -0
  30. data/docs/Dimension.md +44 -0
  31. data/docs/DimensionDenomination.md +49 -0
  32. data/docs/DiscountSummary.md +28 -0
  33. data/docs/ErrorResponse.md +20 -0
  34. data/docs/GetClientBudgetHistory200Response.md +20 -0
  35. data/docs/GetClientById200Response.md +18 -0
  36. data/docs/GetCurrentAccount200Response.md +18 -0
  37. data/docs/GetPromotionByID200Response.md +18 -0
  38. data/docs/GetPromotionByID401Response.md +20 -0
  39. data/docs/GetPromotionByID404Response.md +20 -0
  40. data/docs/GetRedemptionStats200Response.md +20 -0
  41. data/docs/GetRewardBySKU200Response.md +18 -0
  42. data/docs/ListClientDiscounts200Response.md +20 -0
  43. data/docs/ListClientPromotions200Response.md +20 -0
  44. data/docs/ListClientPromotions200ResponsePaging.md +22 -0
  45. data/docs/ListClientPromotions401Response.md +20 -0
  46. data/docs/ListClientVendorPlaces200Response.md +20 -0
  47. data/docs/ListClients200Response.md +20 -0
  48. data/docs/ListRedemptions200Response.md +20 -0
  49. data/docs/ListRewards200Response.md +20 -0
  50. data/docs/ProductSummary.md +26 -0
  51. data/docs/ProductType.md +20 -0
  52. data/docs/PromotionDetails.md +46 -0
  53. data/docs/PromotionDetailsClient.md +20 -0
  54. data/docs/PromotionDetailsRewardsInner.md +28 -0
  55. data/docs/PromotionsApi.md +173 -0
  56. data/docs/Redemption.md +58 -0
  57. data/docs/RedemptionPromotion.md +24 -0
  58. data/docs/RedemptionReward.md +24 -0
  59. data/docs/RedemptionRewardFormat.md +20 -0
  60. data/docs/RedemptionValue.md +20 -0
  61. data/docs/RedemptionsApi.md +857 -0
  62. data/docs/RewardDetails.md +76 -0
  63. data/docs/RewardDetailsBrand.md +24 -0
  64. data/docs/RewardDetailsDimensions.md +44 -0
  65. data/docs/RewardDetailsProduct.md +26 -0
  66. data/docs/RewardDetailsProductType.md +20 -0
  67. data/docs/RewardDetailsTargeting.md +22 -0
  68. data/docs/RewardFormat.md +20 -0
  69. data/docs/RewardsApi.md +175 -0
  70. data/docs/Stats.md +20 -0
  71. data/docs/StatsApi.md +101 -0
  72. data/docs/StatsTimeframe.md +20 -0
  73. data/docs/StatsValuesInner.md +24 -0
  74. data/docs/StatsValuesInnerGroupByInner.md +26 -0
  75. data/docs/StatsValuesInnerStates.md +34 -0
  76. data/docs/User.md +26 -0
  77. data/docs/VendorPlace.md +26 -0
  78. data/docs/VendorPlaceBrand.md +20 -0
  79. data/docs/VendorPlaceGeoloc.md +20 -0
  80. data/docs/VendorPlacesApi.md +97 -0
  81. data/git_push.sh +57 -0
  82. data/ifeelgoods.gemspec +39 -0
  83. data/lib/ifeelgoods/api/accounts_api.rb +79 -0
  84. data/lib/ifeelgoods/api/clients_api.rb +318 -0
  85. data/lib/ifeelgoods/api/promotions_api.rb +166 -0
  86. data/lib/ifeelgoods/api/redemptions_api.rb +762 -0
  87. data/lib/ifeelgoods/api/rewards_api.rb +166 -0
  88. data/lib/ifeelgoods/api/stats_api.rb +111 -0
  89. data/lib/ifeelgoods/api/vendor_places_api.rb +109 -0
  90. data/lib/ifeelgoods/api_client.rb +397 -0
  91. data/lib/ifeelgoods/api_error.rb +58 -0
  92. data/lib/ifeelgoods/api_model_base.rb +88 -0
  93. data/lib/ifeelgoods/configuration.rb +332 -0
  94. data/lib/ifeelgoods/models/account.rb +260 -0
  95. data/lib/ifeelgoods/models/activate_redemption_request.rb +164 -0
  96. data/lib/ifeelgoods/models/activate_redemption_request_data.rb +147 -0
  97. data/lib/ifeelgoods/models/address.rb +219 -0
  98. data/lib/ifeelgoods/models/brand_summary.rb +212 -0
  99. data/lib/ifeelgoods/models/budget_line_item.rb +249 -0
  100. data/lib/ifeelgoods/models/card_consult_redemption200_response.rb +147 -0
  101. data/lib/ifeelgoods/models/card_consult_redemption200_response_data.rb +158 -0
  102. data/lib/ifeelgoods/models/card_consult_redemption422_response.rb +157 -0
  103. data/lib/ifeelgoods/models/client_details.rb +287 -0
  104. data/lib/ifeelgoods/models/client_summary.rb +287 -0
  105. data/lib/ifeelgoods/models/client_summary_budget_alerts.rb +159 -0
  106. data/lib/ifeelgoods/models/create_and_redeem_request.rb +164 -0
  107. data/lib/ifeelgoods/models/create_and_redeem_request_data.rb +174 -0
  108. data/lib/ifeelgoods/models/create_redemption201_response.rb +147 -0
  109. data/lib/ifeelgoods/models/create_redemption422_response.rb +157 -0
  110. data/lib/ifeelgoods/models/create_redemption_request.rb +164 -0
  111. data/lib/ifeelgoods/models/create_redemption_request_data.rb +235 -0
  112. data/lib/ifeelgoods/models/create_redemption_request_data_customization.rb +147 -0
  113. data/lib/ifeelgoods/models/create_redemption_request_data_customization_pdf.rb +157 -0
  114. data/lib/ifeelgoods/models/create_redemption_request_data_reward.rb +147 -0
  115. data/lib/ifeelgoods/models/create_redemption_request_data_value.rb +148 -0
  116. data/lib/ifeelgoods/models/dimension.rb +293 -0
  117. data/lib/ifeelgoods/models/dimension_denomination.rb +105 -0
  118. data/lib/ifeelgoods/models/discount_summary.rb +195 -0
  119. data/lib/ifeelgoods/models/error_response.rb +157 -0
  120. data/lib/ifeelgoods/models/get_client_budget_history200_response.rb +158 -0
  121. data/lib/ifeelgoods/models/get_client_by_id200_response.rb +147 -0
  122. data/lib/ifeelgoods/models/get_current_account200_response.rb +147 -0
  123. data/lib/ifeelgoods/models/get_promotion_by_id200_response.rb +147 -0
  124. data/lib/ifeelgoods/models/get_promotion_by_id401_response.rb +157 -0
  125. data/lib/ifeelgoods/models/get_promotion_by_id404_response.rb +157 -0
  126. data/lib/ifeelgoods/models/get_redemption_stats200_response.rb +158 -0
  127. data/lib/ifeelgoods/models/get_reward_by_sku200_response.rb +147 -0
  128. data/lib/ifeelgoods/models/list_client_discounts200_response.rb +158 -0
  129. data/lib/ifeelgoods/models/list_client_promotions200_response.rb +158 -0
  130. data/lib/ifeelgoods/models/list_client_promotions200_response_paging.rb +165 -0
  131. data/lib/ifeelgoods/models/list_client_promotions401_response.rb +157 -0
  132. data/lib/ifeelgoods/models/list_client_vendor_places200_response.rb +158 -0
  133. data/lib/ifeelgoods/models/list_clients200_response.rb +158 -0
  134. data/lib/ifeelgoods/models/list_redemptions200_response.rb +158 -0
  135. data/lib/ifeelgoods/models/list_rewards200_response.rb +158 -0
  136. data/lib/ifeelgoods/models/product_summary.rb +222 -0
  137. data/lib/ifeelgoods/models/product_type.rb +204 -0
  138. data/lib/ifeelgoods/models/promotion_details.rb +354 -0
  139. data/lib/ifeelgoods/models/promotion_details_client.rb +157 -0
  140. data/lib/ifeelgoods/models/promotion_details_rewards_inner.rb +245 -0
  141. data/lib/ifeelgoods/models/redemption.rb +383 -0
  142. data/lib/ifeelgoods/models/redemption_promotion.rb +211 -0
  143. data/lib/ifeelgoods/models/redemption_reward.rb +224 -0
  144. data/lib/ifeelgoods/models/redemption_reward_format.rb +193 -0
  145. data/lib/ifeelgoods/models/redemption_value.rb +157 -0
  146. data/lib/ifeelgoods/models/reward_details.rb +486 -0
  147. data/lib/ifeelgoods/models/reward_details_brand.rb +213 -0
  148. data/lib/ifeelgoods/models/reward_details_dimensions.rb +293 -0
  149. data/lib/ifeelgoods/models/reward_details_product.rb +222 -0
  150. data/lib/ifeelgoods/models/reward_details_product_type.rb +204 -0
  151. data/lib/ifeelgoods/models/reward_details_targeting.rb +170 -0
  152. data/lib/ifeelgoods/models/reward_format.rb +192 -0
  153. data/lib/ifeelgoods/models/stats.rb +158 -0
  154. data/lib/ifeelgoods/models/stats_timeframe.rb +156 -0
  155. data/lib/ifeelgoods/models/stats_values_inner.rb +178 -0
  156. data/lib/ifeelgoods/models/stats_values_inner_group_by_inner.rb +186 -0
  157. data/lib/ifeelgoods/models/stats_values_inner_states.rb +219 -0
  158. data/lib/ifeelgoods/models/user.rb +188 -0
  159. data/lib/ifeelgoods/models/vendor_place.rb +186 -0
  160. data/lib/ifeelgoods/models/vendor_place_brand.rb +158 -0
  161. data/lib/ifeelgoods/models/vendor_place_geoloc.rb +156 -0
  162. data/lib/ifeelgoods/version.rb +15 -0
  163. data/lib/ifeelgoods.rb +115 -0
  164. data/spec/api/accounts_api_spec.rb +46 -0
  165. data/spec/api/clients_api_spec.rb +88 -0
  166. data/spec/api/promotions_api_spec.rb +61 -0
  167. data/spec/api/redemptions_api_spec.rb +175 -0
  168. data/spec/api/rewards_api_spec.rb +62 -0
  169. data/spec/api/stats_api_spec.rb +53 -0
  170. data/spec/api/vendor_places_api_spec.rb +51 -0
  171. data/spec/models/account_spec.rb +88 -0
  172. data/spec/models/activate_redemption_request_data_spec.rb +36 -0
  173. data/spec/models/activate_redemption_request_spec.rb +36 -0
  174. data/spec/models/address_spec.rb +78 -0
  175. data/spec/models/brand_summary_spec.rb +58 -0
  176. data/spec/models/budget_line_item_spec.rb +80 -0
  177. data/spec/models/card_consult_redemption200_response_data_spec.rb +42 -0
  178. data/spec/models/card_consult_redemption200_response_spec.rb +36 -0
  179. data/spec/models/card_consult_redemption422_response_spec.rb +42 -0
  180. data/spec/models/client_details_spec.rb +106 -0
  181. data/spec/models/client_summary_budget_alerts_spec.rb +42 -0
  182. data/spec/models/client_summary_spec.rb +106 -0
  183. data/spec/models/create_and_redeem_request_data_spec.rb +54 -0
  184. data/spec/models/create_and_redeem_request_spec.rb +36 -0
  185. data/spec/models/create_redemption201_response_spec.rb +36 -0
  186. data/spec/models/create_redemption422_response_spec.rb +42 -0
  187. data/spec/models/create_redemption_request_data_customization_pdf_spec.rb +42 -0
  188. data/spec/models/create_redemption_request_data_customization_spec.rb +36 -0
  189. data/spec/models/create_redemption_request_data_reward_spec.rb +36 -0
  190. data/spec/models/create_redemption_request_data_spec.rb +60 -0
  191. data/spec/models/create_redemption_request_data_value_spec.rb +36 -0
  192. data/spec/models/create_redemption_request_spec.rb +36 -0
  193. data/spec/models/dimension_denomination_spec.rb +32 -0
  194. data/spec/models/dimension_spec.rb +114 -0
  195. data/spec/models/discount_summary_spec.rb +66 -0
  196. data/spec/models/error_response_spec.rb +42 -0
  197. data/spec/models/get_client_budget_history200_response_spec.rb +42 -0
  198. data/spec/models/get_client_by_id200_response_spec.rb +36 -0
  199. data/spec/models/get_current_account200_response_spec.rb +36 -0
  200. data/spec/models/get_promotion_by_id200_response_spec.rb +36 -0
  201. data/spec/models/get_promotion_by_id401_response_spec.rb +42 -0
  202. data/spec/models/get_promotion_by_id404_response_spec.rb +42 -0
  203. data/spec/models/get_redemption_stats200_response_spec.rb +42 -0
  204. data/spec/models/get_reward_by_sku200_response_spec.rb +36 -0
  205. data/spec/models/list_client_discounts200_response_spec.rb +42 -0
  206. data/spec/models/list_client_promotions200_response_paging_spec.rb +48 -0
  207. data/spec/models/list_client_promotions200_response_spec.rb +42 -0
  208. data/spec/models/list_client_promotions401_response_spec.rb +42 -0
  209. data/spec/models/list_client_vendor_places200_response_spec.rb +42 -0
  210. data/spec/models/list_clients200_response_spec.rb +42 -0
  211. data/spec/models/list_redemptions200_response_spec.rb +42 -0
  212. data/spec/models/list_rewards200_response_spec.rb +42 -0
  213. data/spec/models/product_summary_spec.rb +64 -0
  214. data/spec/models/product_type_spec.rb +50 -0
  215. data/spec/models/promotion_details_client_spec.rb +42 -0
  216. data/spec/models/promotion_details_rewards_inner_spec.rb +78 -0
  217. data/spec/models/promotion_details_spec.rb +136 -0
  218. data/spec/models/redemption_promotion_spec.rb +58 -0
  219. data/spec/models/redemption_reward_format_spec.rb +50 -0
  220. data/spec/models/redemption_reward_spec.rb +62 -0
  221. data/spec/models/redemption_spec.rb +168 -0
  222. data/spec/models/redemption_value_spec.rb +42 -0
  223. data/spec/models/reward_details_brand_spec.rb +58 -0
  224. data/spec/models/reward_details_dimensions_spec.rb +114 -0
  225. data/spec/models/reward_details_product_spec.rb +64 -0
  226. data/spec/models/reward_details_product_type_spec.rb +50 -0
  227. data/spec/models/reward_details_spec.rb +218 -0
  228. data/spec/models/reward_details_targeting_spec.rb +48 -0
  229. data/spec/models/reward_format_spec.rb +50 -0
  230. data/spec/models/stats_spec.rb +42 -0
  231. data/spec/models/stats_timeframe_spec.rb +42 -0
  232. data/spec/models/stats_values_inner_group_by_inner_spec.rb +60 -0
  233. data/spec/models/stats_values_inner_spec.rb +54 -0
  234. data/spec/models/stats_values_inner_states_spec.rb +84 -0
  235. data/spec/models/user_spec.rb +60 -0
  236. data/spec/models/vendor_place_brand_spec.rb +42 -0
  237. data/spec/models/vendor_place_geoloc_spec.rb +42 -0
  238. data/spec/models/vendor_place_spec.rb +60 -0
  239. data/spec/spec_helper.rb +111 -0
  240. metadata +397 -0
@@ -0,0 +1,26 @@
1
+ # Ifeelgoods::VendorPlace
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+ | **_geoloc** | [**VendorPlaceGeoloc**](VendorPlaceGeoloc.md) | | [optional] |
10
+ | **brand** | [**VendorPlaceBrand**](VendorPlaceBrand.md) | | [optional] |
11
+ | **address** | [**Address**](Address.md) | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ifeelgoods'
17
+
18
+ instance = Ifeelgoods::VendorPlace.new(
19
+ id: 1,
20
+ name: Main Street Store,
21
+ _geoloc: null,
22
+ brand: null,
23
+ address: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,20 @@
1
+ # Ifeelgoods::VendorPlaceBrand
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **sku** | **String** | | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ifeelgoods'
14
+
15
+ instance = Ifeelgoods::VendorPlaceBrand.new(
16
+ sku: BRAND-SKU,
17
+ name: Main Store
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Ifeelgoods::VendorPlaceGeoloc
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **lat** | **Float** | | [optional] |
8
+ | **lng** | **Float** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ifeelgoods'
14
+
15
+ instance = Ifeelgoods::VendorPlaceGeoloc.new(
16
+ lat: 37.7749,
17
+ lng: -122.4194
18
+ )
19
+ ```
20
+
@@ -0,0 +1,97 @@
1
+ # Ifeelgoods::VendorPlacesApi
2
+
3
+ All URIs are relative to *https://api-sandbox.ifeelgoods.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**list_client_vendor_places**](VendorPlacesApi.md#list_client_vendor_places) | **GET** /fulfillment/v2/clients/{client_id}/vendor_places | List all vendor places |
8
+
9
+
10
+ ## list_client_vendor_places
11
+
12
+ > <ListClientVendorPlaces200Response> list_client_vendor_places(client_id, opts)
13
+
14
+ List all vendor places
15
+
16
+ Use this function to list vendor places for a specific client. This endpoint is available only to clients subscribed to Vendor Places API access.
17
+
18
+ ### Examples
19
+
20
+ ```ruby
21
+ require 'time'
22
+ require 'ifeelgoods'
23
+ # setup authorization
24
+ Ifeelgoods.configure do |config|
25
+ # Configure API key authorization: api_key
26
+ config.api_key['Api-Key'] = 'YOUR API KEY'
27
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
28
+ # config.api_key_prefix['Api-Key'] = 'Bearer'
29
+
30
+ # Configure Bearer authorization: bearer_auth
31
+ config.access_token = 'YOUR_BEARER_TOKEN'
32
+
33
+ # Configure API key authorization: api_secret
34
+ config.api_key['Api-Secret'] = 'YOUR API KEY'
35
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
36
+ # config.api_key_prefix['Api-Secret'] = 'Bearer'
37
+ end
38
+
39
+ api_instance = Ifeelgoods::VendorPlacesApi.new
40
+ client_id = 'client_id_example' # String | The client identifier
41
+ opts = {
42
+ skus: ['inner_example'], # Array<String> | Filter by a list of brand SKUs
43
+ zip_code: 'zip_code_example', # String |
44
+ page: 56, # Integer |
45
+ per_page: 56 # Integer |
46
+ }
47
+
48
+ begin
49
+ # List all vendor places
50
+ result = api_instance.list_client_vendor_places(client_id, opts)
51
+ p result
52
+ rescue Ifeelgoods::ApiError => e
53
+ puts "Error when calling VendorPlacesApi->list_client_vendor_places: #{e}"
54
+ end
55
+ ```
56
+
57
+ #### Using the list_client_vendor_places_with_http_info variant
58
+
59
+ This returns an Array which contains the response data, status code and headers.
60
+
61
+ > <Array(<ListClientVendorPlaces200Response>, Integer, Hash)> list_client_vendor_places_with_http_info(client_id, opts)
62
+
63
+ ```ruby
64
+ begin
65
+ # List all vendor places
66
+ data, status_code, headers = api_instance.list_client_vendor_places_with_http_info(client_id, opts)
67
+ p status_code # => 2xx
68
+ p headers # => { ... }
69
+ p data # => <ListClientVendorPlaces200Response>
70
+ rescue Ifeelgoods::ApiError => e
71
+ puts "Error when calling VendorPlacesApi->list_client_vendor_places_with_http_info: #{e}"
72
+ end
73
+ ```
74
+
75
+ ### Parameters
76
+
77
+ | Name | Type | Description | Notes |
78
+ | ---- | ---- | ----------- | ----- |
79
+ | **client_id** | **String** | The client identifier | |
80
+ | **skus** | [**Array&lt;String&gt;**](String.md) | Filter by a list of brand SKUs | [optional] |
81
+ | **zip_code** | **String** | | [optional] |
82
+ | **page** | **Integer** | | [optional][default to 1] |
83
+ | **per_page** | **Integer** | | [optional][default to 20] |
84
+
85
+ ### Return type
86
+
87
+ [**ListClientVendorPlaces200Response**](ListClientVendorPlaces200Response.md)
88
+
89
+ ### Authorization
90
+
91
+ [api_key](../README.md#api_key), [bearer_auth](../README.md#bearer_auth), [api_secret](../README.md#api_secret)
92
+
93
+ ### HTTP request headers
94
+
95
+ - **Content-Type**: Not defined
96
+ - **Accept**: application/json
97
+
data/git_push.sh ADDED
@@ -0,0 +1,57 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="GIT_USER_ID"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="GIT_REPO_ID"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=$(git remote)
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'
@@ -0,0 +1,39 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ =begin
4
+ #Fulfillment API
5
+
6
+ #Public API exposed to ifeelgoods customers.
7
+
8
+ The version of the OpenAPI document: v2
9
+
10
+ Generated by: https://openapi-generator.tech
11
+ Generator version: 7.24.0
12
+
13
+ =end
14
+
15
+ $:.push File.expand_path("../lib", __FILE__)
16
+ require "ifeelgoods/version"
17
+
18
+ Gem::Specification.new do |s|
19
+ s.name = "ifeelgoods"
20
+ s.version = Ifeelgoods::VERSION
21
+ s.platform = Gem::Platform::RUBY
22
+ s.authors = ["IFeelGoods Team"]
23
+ s.email = ["tech@ifeelgoods.com"]
24
+ s.homepage = "https://github.com/ifeelgoods/ifeelgoods-api-sdks"
25
+ s.summary = "Official Ruby SDK for IFeelGoods gift card and fulfillment APIs"
26
+ s.description = "Official Ruby SDK for IFeelGoods gift card and fulfillment APIs"
27
+ s.license = "MIT"
28
+ s.required_ruby_version = ">= 2.7"
29
+ s.metadata = {}
30
+
31
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
32
+
33
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
34
+
35
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
36
+ s.test_files = `find spec/*`.split("\n")
37
+ s.executables = []
38
+ s.require_paths = ["lib"]
39
+ end
@@ -0,0 +1,79 @@
1
+ =begin
2
+ #Fulfillment API
3
+
4
+ #Public API exposed to ifeelgoods customers.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Ifeelgoods
16
+ class AccountsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get current account
23
+ # Use this function to get the details of your current account
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [GetCurrentAccount200Response]
26
+ def get_current_account(opts = {})
27
+ data, _status_code, _headers = get_current_account_with_http_info(opts)
28
+ data
29
+ end
30
+
31
+ # Get current account
32
+ # Use this function to get the details of your current account
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(GetCurrentAccount200Response, Integer, Hash)>] GetCurrentAccount200Response data, response status code and response headers
35
+ def get_current_account_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: AccountsApi.get_current_account ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/fulfillment/v2/accounts/me'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
49
+
50
+ # form parameters
51
+ form_params = opts[:form_params] || {}
52
+
53
+ # http body (model)
54
+ post_body = opts[:debug_body]
55
+
56
+ # return_type
57
+ return_type = opts[:debug_return_type] || 'GetCurrentAccount200Response'
58
+
59
+ # auth_names
60
+ auth_names = opts[:debug_auth_names] || ['api_key', 'bearer_auth', 'api_secret']
61
+
62
+ new_options = opts.merge(
63
+ :operation => :"AccountsApi.get_current_account",
64
+ :header_params => header_params,
65
+ :query_params => query_params,
66
+ :form_params => form_params,
67
+ :body => post_body,
68
+ :auth_names => auth_names,
69
+ :return_type => return_type
70
+ )
71
+
72
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: AccountsApi#get_current_account\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+ end
79
+ end
@@ -0,0 +1,318 @@
1
+ =begin
2
+ #Fulfillment API
3
+
4
+ #Public API exposed to ifeelgoods customers.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.24.0
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module Ifeelgoods
16
+ class ClientsApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get a Client budget history
23
+ # Use this function to retrieve detailed budget history about a client
24
+ # @param client_id [String] The client identifier
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [Integer] :page (default to 1)
27
+ # @option opts [Integer] :per_page (default to 20)
28
+ # @option opts [String] :sort
29
+ # @option opts [String] :type
30
+ # @return [GetClientBudgetHistory200Response]
31
+ def get_client_budget_history(client_id, opts = {})
32
+ data, _status_code, _headers = get_client_budget_history_with_http_info(client_id, opts)
33
+ data
34
+ end
35
+
36
+ # Get a Client budget history
37
+ # Use this function to retrieve detailed budget history about a client
38
+ # @param client_id [String] The client identifier
39
+ # @param [Hash] opts the optional parameters
40
+ # @option opts [Integer] :page (default to 1)
41
+ # @option opts [Integer] :per_page (default to 20)
42
+ # @option opts [String] :sort
43
+ # @option opts [String] :type
44
+ # @return [Array<(GetClientBudgetHistory200Response, Integer, Hash)>] GetClientBudgetHistory200Response data, response status code and response headers
45
+ def get_client_budget_history_with_http_info(client_id, opts = {})
46
+ if @api_client.config.debugging
47
+ @api_client.config.logger.debug 'Calling API: ClientsApi.get_client_budget_history ...'
48
+ end
49
+ # verify the required parameter 'client_id' is set
50
+ if @api_client.config.client_side_validation && client_id.nil?
51
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling ClientsApi.get_client_budget_history"
52
+ end
53
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
54
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ClientsApi.get_client_budget_history, must be greater than or equal to 1.'
55
+ end
56
+
57
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 10000
58
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling ClientsApi.get_client_budget_history, must be smaller than or equal to 10000.'
59
+ end
60
+
61
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
62
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling ClientsApi.get_client_budget_history, must be greater than or equal to 1.'
63
+ end
64
+
65
+ allowable_values = ["creation_datetime", "-creation_datetime"]
66
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
67
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
68
+ end
69
+ allowable_values = ["credit", "allocate", "deallocate", "debit"]
70
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
71
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
72
+ end
73
+ # resource path
74
+ local_var_path = '/fulfillment/v2/clients/{client_id}/budget/history'.sub('{client_id}', CGI.escape(client_id.to_s))
75
+
76
+ # query parameters
77
+ query_params = opts[:query_params] || {}
78
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
79
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
80
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
81
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
82
+
83
+ # header parameters
84
+ header_params = opts[:header_params] || {}
85
+ # HTTP header 'Accept' (if needed)
86
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
87
+
88
+ # form parameters
89
+ form_params = opts[:form_params] || {}
90
+
91
+ # http body (model)
92
+ post_body = opts[:debug_body]
93
+
94
+ # return_type
95
+ return_type = opts[:debug_return_type] || 'GetClientBudgetHistory200Response'
96
+
97
+ # auth_names
98
+ auth_names = opts[:debug_auth_names] || ['api_key', 'bearer_auth', 'api_secret']
99
+
100
+ new_options = opts.merge(
101
+ :operation => :"ClientsApi.get_client_budget_history",
102
+ :header_params => header_params,
103
+ :query_params => query_params,
104
+ :form_params => form_params,
105
+ :body => post_body,
106
+ :auth_names => auth_names,
107
+ :return_type => return_type
108
+ )
109
+
110
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
111
+ if @api_client.config.debugging
112
+ @api_client.config.logger.debug "API called: ClientsApi#get_client_budget_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
113
+ end
114
+ return data, status_code, headers
115
+ end
116
+
117
+ # Get a Client
118
+ # Use this function to retrieve detailed information about a client
119
+ # @param client_id [String] The client identifier
120
+ # @param [Hash] opts the optional parameters
121
+ # @return [GetClientById200Response]
122
+ def get_client_by_id(client_id, opts = {})
123
+ data, _status_code, _headers = get_client_by_id_with_http_info(client_id, opts)
124
+ data
125
+ end
126
+
127
+ # Get a Client
128
+ # Use this function to retrieve detailed information about a client
129
+ # @param client_id [String] The client identifier
130
+ # @param [Hash] opts the optional parameters
131
+ # @return [Array<(GetClientById200Response, Integer, Hash)>] GetClientById200Response data, response status code and response headers
132
+ def get_client_by_id_with_http_info(client_id, opts = {})
133
+ if @api_client.config.debugging
134
+ @api_client.config.logger.debug 'Calling API: ClientsApi.get_client_by_id ...'
135
+ end
136
+ # verify the required parameter 'client_id' is set
137
+ if @api_client.config.client_side_validation && client_id.nil?
138
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling ClientsApi.get_client_by_id"
139
+ end
140
+ # resource path
141
+ local_var_path = '/fulfillment/v2/clients/{client_id}'.sub('{client_id}', CGI.escape(client_id.to_s))
142
+
143
+ # query parameters
144
+ query_params = opts[:query_params] || {}
145
+
146
+ # header parameters
147
+ header_params = opts[:header_params] || {}
148
+ # HTTP header 'Accept' (if needed)
149
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
150
+
151
+ # form parameters
152
+ form_params = opts[:form_params] || {}
153
+
154
+ # http body (model)
155
+ post_body = opts[:debug_body]
156
+
157
+ # return_type
158
+ return_type = opts[:debug_return_type] || 'GetClientById200Response'
159
+
160
+ # auth_names
161
+ auth_names = opts[:debug_auth_names] || ['api_key', 'bearer_auth', 'api_secret']
162
+
163
+ new_options = opts.merge(
164
+ :operation => :"ClientsApi.get_client_by_id",
165
+ :header_params => header_params,
166
+ :query_params => query_params,
167
+ :form_params => form_params,
168
+ :body => post_body,
169
+ :auth_names => auth_names,
170
+ :return_type => return_type
171
+ )
172
+
173
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug "API called: ClientsApi#get_client_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
176
+ end
177
+ return data, status_code, headers
178
+ end
179
+
180
+ # List all discounts
181
+ # Use this function to list all the discounts of a specific client
182
+ # @param client_id [String] The client identifier
183
+ # @param [Hash] opts the optional parameters
184
+ # @return [ListClientDiscounts200Response]
185
+ def list_client_discounts(client_id, opts = {})
186
+ data, _status_code, _headers = list_client_discounts_with_http_info(client_id, opts)
187
+ data
188
+ end
189
+
190
+ # List all discounts
191
+ # Use this function to list all the discounts of a specific client
192
+ # @param client_id [String] The client identifier
193
+ # @param [Hash] opts the optional parameters
194
+ # @return [Array<(ListClientDiscounts200Response, Integer, Hash)>] ListClientDiscounts200Response data, response status code and response headers
195
+ def list_client_discounts_with_http_info(client_id, opts = {})
196
+ if @api_client.config.debugging
197
+ @api_client.config.logger.debug 'Calling API: ClientsApi.list_client_discounts ...'
198
+ end
199
+ # verify the required parameter 'client_id' is set
200
+ if @api_client.config.client_side_validation && client_id.nil?
201
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling ClientsApi.list_client_discounts"
202
+ end
203
+ # resource path
204
+ local_var_path = '/fulfillment/v2/clients/{client_id}/discounts'.sub('{client_id}', CGI.escape(client_id.to_s))
205
+
206
+ # query parameters
207
+ query_params = opts[:query_params] || {}
208
+
209
+ # header parameters
210
+ header_params = opts[:header_params] || {}
211
+ # HTTP header 'Accept' (if needed)
212
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
213
+
214
+ # form parameters
215
+ form_params = opts[:form_params] || {}
216
+
217
+ # http body (model)
218
+ post_body = opts[:debug_body]
219
+
220
+ # return_type
221
+ return_type = opts[:debug_return_type] || 'ListClientDiscounts200Response'
222
+
223
+ # auth_names
224
+ auth_names = opts[:debug_auth_names] || ['api_key', 'bearer_auth', 'api_secret']
225
+
226
+ new_options = opts.merge(
227
+ :operation => :"ClientsApi.list_client_discounts",
228
+ :header_params => header_params,
229
+ :query_params => query_params,
230
+ :form_params => form_params,
231
+ :body => post_body,
232
+ :auth_names => auth_names,
233
+ :return_type => return_type
234
+ )
235
+
236
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
237
+ if @api_client.config.debugging
238
+ @api_client.config.logger.debug "API called: ClientsApi#list_client_discounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
239
+ end
240
+ return data, status_code, headers
241
+ end
242
+
243
+ # List all Clients
244
+ # Use this function to list all the clients your account can manage
245
+ # @param [Hash] opts the optional parameters
246
+ # @option opts [Integer] :page (default to 1)
247
+ # @option opts [Integer] :per_page (default to 20)
248
+ # @return [ListClients200Response]
249
+ def list_clients(opts = {})
250
+ data, _status_code, _headers = list_clients_with_http_info(opts)
251
+ data
252
+ end
253
+
254
+ # List all Clients
255
+ # Use this function to list all the clients your account can manage
256
+ # @param [Hash] opts the optional parameters
257
+ # @option opts [Integer] :page (default to 1)
258
+ # @option opts [Integer] :per_page (default to 20)
259
+ # @return [Array<(ListClients200Response, Integer, Hash)>] ListClients200Response data, response status code and response headers
260
+ def list_clients_with_http_info(opts = {})
261
+ if @api_client.config.debugging
262
+ @api_client.config.logger.debug 'Calling API: ClientsApi.list_clients ...'
263
+ end
264
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
265
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ClientsApi.list_clients, must be greater than or equal to 1.'
266
+ end
267
+
268
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 10000
269
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling ClientsApi.list_clients, must be smaller than or equal to 10000.'
270
+ end
271
+
272
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
273
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling ClientsApi.list_clients, must be greater than or equal to 1.'
274
+ end
275
+
276
+ # resource path
277
+ local_var_path = '/fulfillment/v2/clients'
278
+
279
+ # query parameters
280
+ query_params = opts[:query_params] || {}
281
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
282
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
283
+
284
+ # header parameters
285
+ header_params = opts[:header_params] || {}
286
+ # HTTP header 'Accept' (if needed)
287
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
288
+
289
+ # form parameters
290
+ form_params = opts[:form_params] || {}
291
+
292
+ # http body (model)
293
+ post_body = opts[:debug_body]
294
+
295
+ # return_type
296
+ return_type = opts[:debug_return_type] || 'ListClients200Response'
297
+
298
+ # auth_names
299
+ auth_names = opts[:debug_auth_names] || ['api_key', 'bearer_auth', 'api_secret']
300
+
301
+ new_options = opts.merge(
302
+ :operation => :"ClientsApi.list_clients",
303
+ :header_params => header_params,
304
+ :query_params => query_params,
305
+ :form_params => form_params,
306
+ :body => post_body,
307
+ :auth_names => auth_names,
308
+ :return_type => return_type
309
+ )
310
+
311
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
312
+ if @api_client.config.debugging
313
+ @api_client.config.logger.debug "API called: ClientsApi#list_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
314
+ end
315
+ return data, status_code, headers
316
+ end
317
+ end
318
+ end