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,341 @@
1
+ # Ifeelgoods::ClientsApi
2
+
3
+ All URIs are relative to *https://api-sandbox.ifeelgoods.com*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**get_client_budget_history**](ClientsApi.md#get_client_budget_history) | **GET** /fulfillment/v2/clients/{client_id}/budget/history | Get a Client budget history |
8
+ | [**get_client_by_id**](ClientsApi.md#get_client_by_id) | **GET** /fulfillment/v2/clients/{client_id} | Get a Client |
9
+ | [**list_client_discounts**](ClientsApi.md#list_client_discounts) | **GET** /fulfillment/v2/clients/{client_id}/discounts | List all discounts |
10
+ | [**list_clients**](ClientsApi.md#list_clients) | **GET** /fulfillment/v2/clients | List all Clients |
11
+
12
+
13
+ ## get_client_budget_history
14
+
15
+ > <GetClientBudgetHistory200Response> get_client_budget_history(client_id, opts)
16
+
17
+ Get a Client budget history
18
+
19
+ Use this function to retrieve detailed budget history about a client
20
+
21
+ ### Examples
22
+
23
+ ```ruby
24
+ require 'time'
25
+ require 'ifeelgoods'
26
+ # setup authorization
27
+ Ifeelgoods.configure do |config|
28
+ # Configure API key authorization: api_key
29
+ config.api_key['Api-Key'] = 'YOUR API KEY'
30
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
31
+ # config.api_key_prefix['Api-Key'] = 'Bearer'
32
+
33
+ # Configure Bearer authorization: bearer_auth
34
+ config.access_token = 'YOUR_BEARER_TOKEN'
35
+
36
+ # Configure API key authorization: api_secret
37
+ config.api_key['Api-Secret'] = 'YOUR API KEY'
38
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
39
+ # config.api_key_prefix['Api-Secret'] = 'Bearer'
40
+ end
41
+
42
+ api_instance = Ifeelgoods::ClientsApi.new
43
+ client_id = 'client_id_example' # String | The client identifier
44
+ opts = {
45
+ page: 56, # Integer |
46
+ per_page: 56, # Integer |
47
+ sort: 'creation_datetime', # String |
48
+ type: 'credit' # String |
49
+ }
50
+
51
+ begin
52
+ # Get a Client budget history
53
+ result = api_instance.get_client_budget_history(client_id, opts)
54
+ p result
55
+ rescue Ifeelgoods::ApiError => e
56
+ puts "Error when calling ClientsApi->get_client_budget_history: #{e}"
57
+ end
58
+ ```
59
+
60
+ #### Using the get_client_budget_history_with_http_info variant
61
+
62
+ This returns an Array which contains the response data, status code and headers.
63
+
64
+ > <Array(<GetClientBudgetHistory200Response>, Integer, Hash)> get_client_budget_history_with_http_info(client_id, opts)
65
+
66
+ ```ruby
67
+ begin
68
+ # Get a Client budget history
69
+ data, status_code, headers = api_instance.get_client_budget_history_with_http_info(client_id, opts)
70
+ p status_code # => 2xx
71
+ p headers # => { ... }
72
+ p data # => <GetClientBudgetHistory200Response>
73
+ rescue Ifeelgoods::ApiError => e
74
+ puts "Error when calling ClientsApi->get_client_budget_history_with_http_info: #{e}"
75
+ end
76
+ ```
77
+
78
+ ### Parameters
79
+
80
+ | Name | Type | Description | Notes |
81
+ | ---- | ---- | ----------- | ----- |
82
+ | **client_id** | **String** | The client identifier | |
83
+ | **page** | **Integer** | | [optional][default to 1] |
84
+ | **per_page** | **Integer** | | [optional][default to 20] |
85
+ | **sort** | **String** | | [optional] |
86
+ | **type** | **String** | | [optional] |
87
+
88
+ ### Return type
89
+
90
+ [**GetClientBudgetHistory200Response**](GetClientBudgetHistory200Response.md)
91
+
92
+ ### Authorization
93
+
94
+ [api_key](../README.md#api_key), [bearer_auth](../README.md#bearer_auth), [api_secret](../README.md#api_secret)
95
+
96
+ ### HTTP request headers
97
+
98
+ - **Content-Type**: Not defined
99
+ - **Accept**: application/json
100
+
101
+
102
+ ## get_client_by_id
103
+
104
+ > <GetClientById200Response> get_client_by_id(client_id)
105
+
106
+ Get a Client
107
+
108
+ Use this function to retrieve detailed information about a client
109
+
110
+ ### Examples
111
+
112
+ ```ruby
113
+ require 'time'
114
+ require 'ifeelgoods'
115
+ # setup authorization
116
+ Ifeelgoods.configure do |config|
117
+ # Configure API key authorization: api_key
118
+ config.api_key['Api-Key'] = 'YOUR API KEY'
119
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
120
+ # config.api_key_prefix['Api-Key'] = 'Bearer'
121
+
122
+ # Configure Bearer authorization: bearer_auth
123
+ config.access_token = 'YOUR_BEARER_TOKEN'
124
+
125
+ # Configure API key authorization: api_secret
126
+ config.api_key['Api-Secret'] = 'YOUR API KEY'
127
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
128
+ # config.api_key_prefix['Api-Secret'] = 'Bearer'
129
+ end
130
+
131
+ api_instance = Ifeelgoods::ClientsApi.new
132
+ client_id = 'client_id_example' # String | The client identifier
133
+
134
+ begin
135
+ # Get a Client
136
+ result = api_instance.get_client_by_id(client_id)
137
+ p result
138
+ rescue Ifeelgoods::ApiError => e
139
+ puts "Error when calling ClientsApi->get_client_by_id: #{e}"
140
+ end
141
+ ```
142
+
143
+ #### Using the get_client_by_id_with_http_info variant
144
+
145
+ This returns an Array which contains the response data, status code and headers.
146
+
147
+ > <Array(<GetClientById200Response>, Integer, Hash)> get_client_by_id_with_http_info(client_id)
148
+
149
+ ```ruby
150
+ begin
151
+ # Get a Client
152
+ data, status_code, headers = api_instance.get_client_by_id_with_http_info(client_id)
153
+ p status_code # => 2xx
154
+ p headers # => { ... }
155
+ p data # => <GetClientById200Response>
156
+ rescue Ifeelgoods::ApiError => e
157
+ puts "Error when calling ClientsApi->get_client_by_id_with_http_info: #{e}"
158
+ end
159
+ ```
160
+
161
+ ### Parameters
162
+
163
+ | Name | Type | Description | Notes |
164
+ | ---- | ---- | ----------- | ----- |
165
+ | **client_id** | **String** | The client identifier | |
166
+
167
+ ### Return type
168
+
169
+ [**GetClientById200Response**](GetClientById200Response.md)
170
+
171
+ ### Authorization
172
+
173
+ [api_key](../README.md#api_key), [bearer_auth](../README.md#bearer_auth), [api_secret](../README.md#api_secret)
174
+
175
+ ### HTTP request headers
176
+
177
+ - **Content-Type**: Not defined
178
+ - **Accept**: application/json
179
+
180
+
181
+ ## list_client_discounts
182
+
183
+ > <ListClientDiscounts200Response> list_client_discounts(client_id)
184
+
185
+ List all discounts
186
+
187
+ Use this function to list all the discounts of a specific client
188
+
189
+ ### Examples
190
+
191
+ ```ruby
192
+ require 'time'
193
+ require 'ifeelgoods'
194
+ # setup authorization
195
+ Ifeelgoods.configure do |config|
196
+ # Configure API key authorization: api_key
197
+ config.api_key['Api-Key'] = 'YOUR API KEY'
198
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
199
+ # config.api_key_prefix['Api-Key'] = 'Bearer'
200
+
201
+ # Configure Bearer authorization: bearer_auth
202
+ config.access_token = 'YOUR_BEARER_TOKEN'
203
+
204
+ # Configure API key authorization: api_secret
205
+ config.api_key['Api-Secret'] = 'YOUR API KEY'
206
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
207
+ # config.api_key_prefix['Api-Secret'] = 'Bearer'
208
+ end
209
+
210
+ api_instance = Ifeelgoods::ClientsApi.new
211
+ client_id = 'client_id_example' # String | The client identifier
212
+
213
+ begin
214
+ # List all discounts
215
+ result = api_instance.list_client_discounts(client_id)
216
+ p result
217
+ rescue Ifeelgoods::ApiError => e
218
+ puts "Error when calling ClientsApi->list_client_discounts: #{e}"
219
+ end
220
+ ```
221
+
222
+ #### Using the list_client_discounts_with_http_info variant
223
+
224
+ This returns an Array which contains the response data, status code and headers.
225
+
226
+ > <Array(<ListClientDiscounts200Response>, Integer, Hash)> list_client_discounts_with_http_info(client_id)
227
+
228
+ ```ruby
229
+ begin
230
+ # List all discounts
231
+ data, status_code, headers = api_instance.list_client_discounts_with_http_info(client_id)
232
+ p status_code # => 2xx
233
+ p headers # => { ... }
234
+ p data # => <ListClientDiscounts200Response>
235
+ rescue Ifeelgoods::ApiError => e
236
+ puts "Error when calling ClientsApi->list_client_discounts_with_http_info: #{e}"
237
+ end
238
+ ```
239
+
240
+ ### Parameters
241
+
242
+ | Name | Type | Description | Notes |
243
+ | ---- | ---- | ----------- | ----- |
244
+ | **client_id** | **String** | The client identifier | |
245
+
246
+ ### Return type
247
+
248
+ [**ListClientDiscounts200Response**](ListClientDiscounts200Response.md)
249
+
250
+ ### Authorization
251
+
252
+ [api_key](../README.md#api_key), [bearer_auth](../README.md#bearer_auth), [api_secret](../README.md#api_secret)
253
+
254
+ ### HTTP request headers
255
+
256
+ - **Content-Type**: Not defined
257
+ - **Accept**: application/json
258
+
259
+
260
+ ## list_clients
261
+
262
+ > <ListClients200Response> list_clients(opts)
263
+
264
+ List all Clients
265
+
266
+ Use this function to list all the clients your account can manage
267
+
268
+ ### Examples
269
+
270
+ ```ruby
271
+ require 'time'
272
+ require 'ifeelgoods'
273
+ # setup authorization
274
+ Ifeelgoods.configure do |config|
275
+ # Configure API key authorization: api_key
276
+ config.api_key['Api-Key'] = 'YOUR API KEY'
277
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
278
+ # config.api_key_prefix['Api-Key'] = 'Bearer'
279
+
280
+ # Configure Bearer authorization: bearer_auth
281
+ config.access_token = 'YOUR_BEARER_TOKEN'
282
+
283
+ # Configure API key authorization: api_secret
284
+ config.api_key['Api-Secret'] = 'YOUR API KEY'
285
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
286
+ # config.api_key_prefix['Api-Secret'] = 'Bearer'
287
+ end
288
+
289
+ api_instance = Ifeelgoods::ClientsApi.new
290
+ opts = {
291
+ page: 56, # Integer |
292
+ per_page: 56 # Integer |
293
+ }
294
+
295
+ begin
296
+ # List all Clients
297
+ result = api_instance.list_clients(opts)
298
+ p result
299
+ rescue Ifeelgoods::ApiError => e
300
+ puts "Error when calling ClientsApi->list_clients: #{e}"
301
+ end
302
+ ```
303
+
304
+ #### Using the list_clients_with_http_info variant
305
+
306
+ This returns an Array which contains the response data, status code and headers.
307
+
308
+ > <Array(<ListClients200Response>, Integer, Hash)> list_clients_with_http_info(opts)
309
+
310
+ ```ruby
311
+ begin
312
+ # List all Clients
313
+ data, status_code, headers = api_instance.list_clients_with_http_info(opts)
314
+ p status_code # => 2xx
315
+ p headers # => { ... }
316
+ p data # => <ListClients200Response>
317
+ rescue Ifeelgoods::ApiError => e
318
+ puts "Error when calling ClientsApi->list_clients_with_http_info: #{e}"
319
+ end
320
+ ```
321
+
322
+ ### Parameters
323
+
324
+ | Name | Type | Description | Notes |
325
+ | ---- | ---- | ----------- | ----- |
326
+ | **page** | **Integer** | | [optional][default to 1] |
327
+ | **per_page** | **Integer** | | [optional][default to 20] |
328
+
329
+ ### Return type
330
+
331
+ [**ListClients200Response**](ListClients200Response.md)
332
+
333
+ ### Authorization
334
+
335
+ [api_key](../README.md#api_key), [bearer_auth](../README.md#bearer_auth), [api_secret](../README.md#api_secret)
336
+
337
+ ### HTTP request headers
338
+
339
+ - **Content-Type**: Not defined
340
+ - **Accept**: application/json
341
+
@@ -0,0 +1,18 @@
1
+ # Ifeelgoods::CreateAndRedeemRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**CreateAndRedeemRequestData**](CreateAndRedeemRequestData.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ifeelgoods'
13
+
14
+ instance = Ifeelgoods::CreateAndRedeemRequest.new(
15
+ data: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,24 @@
1
+ # Ifeelgoods::CreateAndRedeemRequestData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **order_id** | **String** | | [optional] |
8
+ | **user** | [**User**](User.md) | | [optional] |
9
+ | **value** | [**CreateRedemptionRequestDataValue**](CreateRedemptionRequestDataValue.md) | | [optional] |
10
+ | **customization** | [**CreateRedemptionRequestDataCustomization**](CreateRedemptionRequestDataCustomization.md) | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'ifeelgoods'
16
+
17
+ instance = Ifeelgoods::CreateAndRedeemRequestData.new(
18
+ order_id: null,
19
+ user: null,
20
+ value: null,
21
+ customization: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,18 @@
1
+ # Ifeelgoods::CreateRedemption201Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Redemption**](Redemption.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ifeelgoods'
13
+
14
+ instance = Ifeelgoods::CreateRedemption201Response.new(
15
+ data: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # Ifeelgoods::CreateRedemption422Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error_name** | **String** | | [optional] |
8
+ | **error_message** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ifeelgoods'
14
+
15
+ instance = Ifeelgoods::CreateRedemption422Response.new(
16
+ error_name: invalid_request,
17
+ error_message: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # Ifeelgoods::CreateRedemptionRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**CreateRedemptionRequestData**](CreateRedemptionRequestData.md) | | |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ifeelgoods'
13
+
14
+ instance = Ifeelgoods::CreateRedemptionRequest.new(
15
+ data: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,26 @@
1
+ # Ifeelgoods::CreateRedemptionRequestData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **order_id** | **String** | Must be unique for each redemption | |
8
+ | **user** | [**User**](User.md) | | |
9
+ | **reward** | [**CreateRedemptionRequestDataReward**](CreateRedemptionRequestDataReward.md) | | |
10
+ | **value** | [**CreateRedemptionRequestDataValue**](CreateRedemptionRequestDataValue.md) | | [optional] |
11
+ | **customization** | [**CreateRedemptionRequestDataCustomization**](CreateRedemptionRequestDataCustomization.md) | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ifeelgoods'
17
+
18
+ instance = Ifeelgoods::CreateRedemptionRequestData.new(
19
+ order_id: null,
20
+ user: null,
21
+ reward: null,
22
+ value: null,
23
+ customization: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,18 @@
1
+ # Ifeelgoods::CreateRedemptionRequestDataCustomization
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **pdf** | [**CreateRedemptionRequestDataCustomizationPdf**](CreateRedemptionRequestDataCustomizationPdf.md) | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ifeelgoods'
13
+
14
+ instance = Ifeelgoods::CreateRedemptionRequestDataCustomization.new(
15
+ pdf: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,20 @@
1
+ # Ifeelgoods::CreateRedemptionRequestDataCustomizationPdf
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **message** | **String** | | [optional] |
8
+ | **sender_name** | **String** | The reward sender name to be printed on the PDF (if applicable) | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ifeelgoods'
14
+
15
+ instance = Ifeelgoods::CreateRedemptionRequestDataCustomizationPdf.new(
16
+ message: I hope you enjoy this reward!,
17
+ sender_name: Martina
18
+ )
19
+ ```
20
+
@@ -0,0 +1,18 @@
1
+ # Ifeelgoods::CreateRedemptionRequestDataReward
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **sku** | **String** | | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ifeelgoods'
13
+
14
+ instance = Ifeelgoods::CreateRedemptionRequestDataReward.new(
15
+ sku: APP-ITC-10USD-US
16
+ )
17
+ ```
18
+
@@ -0,0 +1,18 @@
1
+ # Ifeelgoods::CreateRedemptionRequestDataValue
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **amount** | **String** | optional - only needed for \&quot;free value\&quot; rewards | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'ifeelgoods'
13
+
14
+ instance = Ifeelgoods::CreateRedemptionRequestDataValue.new(
15
+ amount: 10
16
+ )
17
+ ```
18
+
data/docs/Dimension.md ADDED
@@ -0,0 +1,44 @@
1
+ # Ifeelgoods::Dimension
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **available_denominations_range** | **String** | Indicates the range of values that can be used with open value reward (when free_value is true) (eg. 5..250). | [optional] |
8
+ | **custom_offer** | **String** | When a custom offer has been configured for this product (eg. buy one get one, $20 off the second article, etc.). | [optional] |
9
+ | **validity_period** | **String** | Duration during which the reward code remains valid after delivery. Expressed as a number followed by a unit: d for days, m for months, y for years (eg. 30d for 30 days, 12m for 12 months, 1y for 1 year). Returns null if no validity period applies. | [optional] |
10
+ | **available_denominations** | **String** | List of specific monetary amounts available for this reward. | [optional] |
11
+ | **breakable** | **String** | Indicates whether the reward code can be broken into smaller values. | [optional] |
12
+ | **cumulable** | **String** | Indicates whether multiple reward codes can be combined. | [optional] |
13
+ | **denomination** | [**DimensionDenomination**](DimensionDenomination.md) | | [optional] |
14
+ | **denomination_currency** | **String** | Currency of the denomination amount (eg. EUR, USD, etc.). | [optional] |
15
+ | **duration** | **String** | Duration of a subscription or service (eg. 2 months). | [optional] |
16
+ | **duration_unit** | **String** | Unit of the duration dimension. Possible values: minute, hour, day, week, month, year, varying_duration. | [optional] |
17
+ | **people** | **String** | Number of people concerned by the reward. | [optional] |
18
+ | **quantity** | **String** | Virtual currency amount associated with the reward (eg. 300 points, 200 miles, etc.). | [optional] |
19
+ | **quantity_unit** | **String** | Unit of the quantity dimension. Possible values: points, miles, facebook_credits, minutes, movie, meal, e_magazine, e_ticket, song, lesson, box, subscription. | [optional] |
20
+ | **redemption_channel** | **Array&lt;String&gt;** | | [optional] |
21
+
22
+ ## Example
23
+
24
+ ```ruby
25
+ require 'ifeelgoods'
26
+
27
+ instance = Ifeelgoods::Dimension.new(
28
+ available_denominations_range: 5..250,
29
+ custom_offer: Buy one get one,
30
+ validity_period: 30d,
31
+ available_denominations: null,
32
+ breakable: null,
33
+ cumulable: null,
34
+ denomination: null,
35
+ denomination_currency: EUR,
36
+ duration: 2,
37
+ duration_unit: month,
38
+ people: 2,
39
+ quantity: 300,
40
+ quantity_unit: points,
41
+ redemption_channel: null
42
+ )
43
+ ```
44
+
@@ -0,0 +1,49 @@
1
+ # Ifeelgoods::DimensionDenomination
2
+
3
+ ## Class instance methods
4
+
5
+ ### `openapi_one_of`
6
+
7
+ Returns the list of classes defined in oneOf.
8
+
9
+ #### Example
10
+
11
+ ```ruby
12
+ require 'ifeelgoods'
13
+
14
+ Ifeelgoods::DimensionDenomination.openapi_one_of
15
+ # =>
16
+ # [
17
+ # :'Float',
18
+ # :'String'
19
+ # ]
20
+ ```
21
+
22
+ ### build
23
+
24
+ Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
+
26
+ #### Example
27
+
28
+ ```ruby
29
+ require 'ifeelgoods'
30
+
31
+ Ifeelgoods::DimensionDenomination.build(data)
32
+ # => #<Float:0x00007fdd4aab02a0>
33
+
34
+ Ifeelgoods::DimensionDenomination.build(data_that_doesnt_match)
35
+ # => nil
36
+ ```
37
+
38
+ #### Parameters
39
+
40
+ | Name | Type | Description |
41
+ | ---- | ---- | ----------- |
42
+ | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
+
44
+ #### Return type
45
+
46
+ - `Float`
47
+ - `String`
48
+ - `nil` (if no type matches)
49
+
@@ -0,0 +1,28 @@
1
+ # Ifeelgoods::DiscountSummary
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **Integer** | | [optional] |
8
+ | **sku** | **String** | | [optional] |
9
+ | **label** | **String** | | [optional] |
10
+ | **discount** | **Float** | | [optional] |
11
+ | **brand_sku** | **String** | | [optional] |
12
+ | **brand_name** | **String** | | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'ifeelgoods'
18
+
19
+ instance = Ifeelgoods::DiscountSummary.new(
20
+ id: null,
21
+ sku: null,
22
+ label: null,
23
+ discount: null,
24
+ brand_sku: null,
25
+ brand_name: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,20 @@
1
+ # Ifeelgoods::ErrorResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error_name** | **String** | | [optional] |
8
+ | **error_message** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ifeelgoods'
14
+
15
+ instance = Ifeelgoods::ErrorResponse.new(
16
+ error_name: null,
17
+ error_message: null
18
+ )
19
+ ```
20
+