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.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +81 -0
- data/README.md +167 -0
- data/Rakefile +10 -0
- data/docs/Account.md +34 -0
- data/docs/AccountsApi.md +84 -0
- data/docs/ActivateRedemptionRequest.md +18 -0
- data/docs/ActivateRedemptionRequestData.md +18 -0
- data/docs/Address.md +32 -0
- data/docs/BrandSummary.md +24 -0
- data/docs/BudgetLineItem.md +30 -0
- data/docs/CardConsultRedemption200Response.md +18 -0
- data/docs/CardConsultRedemption200ResponseData.md +20 -0
- data/docs/CardConsultRedemption422Response.md +20 -0
- data/docs/ClientDetails.md +40 -0
- data/docs/ClientSummary.md +40 -0
- data/docs/ClientSummaryBudgetAlerts.md +20 -0
- data/docs/ClientsApi.md +341 -0
- data/docs/CreateAndRedeemRequest.md +18 -0
- data/docs/CreateAndRedeemRequestData.md +24 -0
- data/docs/CreateRedemption201Response.md +18 -0
- data/docs/CreateRedemption422Response.md +20 -0
- data/docs/CreateRedemptionRequest.md +18 -0
- data/docs/CreateRedemptionRequestData.md +26 -0
- data/docs/CreateRedemptionRequestDataCustomization.md +18 -0
- data/docs/CreateRedemptionRequestDataCustomizationPdf.md +20 -0
- data/docs/CreateRedemptionRequestDataReward.md +18 -0
- data/docs/CreateRedemptionRequestDataValue.md +18 -0
- data/docs/Dimension.md +44 -0
- data/docs/DimensionDenomination.md +49 -0
- data/docs/DiscountSummary.md +28 -0
- data/docs/ErrorResponse.md +20 -0
- data/docs/GetClientBudgetHistory200Response.md +20 -0
- data/docs/GetClientById200Response.md +18 -0
- data/docs/GetCurrentAccount200Response.md +18 -0
- data/docs/GetPromotionByID200Response.md +18 -0
- data/docs/GetPromotionByID401Response.md +20 -0
- data/docs/GetPromotionByID404Response.md +20 -0
- data/docs/GetRedemptionStats200Response.md +20 -0
- data/docs/GetRewardBySKU200Response.md +18 -0
- data/docs/ListClientDiscounts200Response.md +20 -0
- data/docs/ListClientPromotions200Response.md +20 -0
- data/docs/ListClientPromotions200ResponsePaging.md +22 -0
- data/docs/ListClientPromotions401Response.md +20 -0
- data/docs/ListClientVendorPlaces200Response.md +20 -0
- data/docs/ListClients200Response.md +20 -0
- data/docs/ListRedemptions200Response.md +20 -0
- data/docs/ListRewards200Response.md +20 -0
- data/docs/ProductSummary.md +26 -0
- data/docs/ProductType.md +20 -0
- data/docs/PromotionDetails.md +46 -0
- data/docs/PromotionDetailsClient.md +20 -0
- data/docs/PromotionDetailsRewardsInner.md +28 -0
- data/docs/PromotionsApi.md +173 -0
- data/docs/Redemption.md +58 -0
- data/docs/RedemptionPromotion.md +24 -0
- data/docs/RedemptionReward.md +24 -0
- data/docs/RedemptionRewardFormat.md +20 -0
- data/docs/RedemptionValue.md +20 -0
- data/docs/RedemptionsApi.md +857 -0
- data/docs/RewardDetails.md +76 -0
- data/docs/RewardDetailsBrand.md +24 -0
- data/docs/RewardDetailsDimensions.md +44 -0
- data/docs/RewardDetailsProduct.md +26 -0
- data/docs/RewardDetailsProductType.md +20 -0
- data/docs/RewardDetailsTargeting.md +22 -0
- data/docs/RewardFormat.md +20 -0
- data/docs/RewardsApi.md +175 -0
- data/docs/Stats.md +20 -0
- data/docs/StatsApi.md +101 -0
- data/docs/StatsTimeframe.md +20 -0
- data/docs/StatsValuesInner.md +24 -0
- data/docs/StatsValuesInnerGroupByInner.md +26 -0
- data/docs/StatsValuesInnerStates.md +34 -0
- data/docs/User.md +26 -0
- data/docs/VendorPlace.md +26 -0
- data/docs/VendorPlaceBrand.md +20 -0
- data/docs/VendorPlaceGeoloc.md +20 -0
- data/docs/VendorPlacesApi.md +97 -0
- data/git_push.sh +57 -0
- data/ifeelgoods.gemspec +39 -0
- data/lib/ifeelgoods/api/accounts_api.rb +79 -0
- data/lib/ifeelgoods/api/clients_api.rb +318 -0
- data/lib/ifeelgoods/api/promotions_api.rb +166 -0
- data/lib/ifeelgoods/api/redemptions_api.rb +762 -0
- data/lib/ifeelgoods/api/rewards_api.rb +166 -0
- data/lib/ifeelgoods/api/stats_api.rb +111 -0
- data/lib/ifeelgoods/api/vendor_places_api.rb +109 -0
- data/lib/ifeelgoods/api_client.rb +397 -0
- data/lib/ifeelgoods/api_error.rb +58 -0
- data/lib/ifeelgoods/api_model_base.rb +88 -0
- data/lib/ifeelgoods/configuration.rb +332 -0
- data/lib/ifeelgoods/models/account.rb +260 -0
- data/lib/ifeelgoods/models/activate_redemption_request.rb +164 -0
- data/lib/ifeelgoods/models/activate_redemption_request_data.rb +147 -0
- data/lib/ifeelgoods/models/address.rb +219 -0
- data/lib/ifeelgoods/models/brand_summary.rb +212 -0
- data/lib/ifeelgoods/models/budget_line_item.rb +249 -0
- data/lib/ifeelgoods/models/card_consult_redemption200_response.rb +147 -0
- data/lib/ifeelgoods/models/card_consult_redemption200_response_data.rb +158 -0
- data/lib/ifeelgoods/models/card_consult_redemption422_response.rb +157 -0
- data/lib/ifeelgoods/models/client_details.rb +287 -0
- data/lib/ifeelgoods/models/client_summary.rb +287 -0
- data/lib/ifeelgoods/models/client_summary_budget_alerts.rb +159 -0
- data/lib/ifeelgoods/models/create_and_redeem_request.rb +164 -0
- data/lib/ifeelgoods/models/create_and_redeem_request_data.rb +174 -0
- data/lib/ifeelgoods/models/create_redemption201_response.rb +147 -0
- data/lib/ifeelgoods/models/create_redemption422_response.rb +157 -0
- data/lib/ifeelgoods/models/create_redemption_request.rb +164 -0
- data/lib/ifeelgoods/models/create_redemption_request_data.rb +235 -0
- data/lib/ifeelgoods/models/create_redemption_request_data_customization.rb +147 -0
- data/lib/ifeelgoods/models/create_redemption_request_data_customization_pdf.rb +157 -0
- data/lib/ifeelgoods/models/create_redemption_request_data_reward.rb +147 -0
- data/lib/ifeelgoods/models/create_redemption_request_data_value.rb +148 -0
- data/lib/ifeelgoods/models/dimension.rb +293 -0
- data/lib/ifeelgoods/models/dimension_denomination.rb +105 -0
- data/lib/ifeelgoods/models/discount_summary.rb +195 -0
- data/lib/ifeelgoods/models/error_response.rb +157 -0
- data/lib/ifeelgoods/models/get_client_budget_history200_response.rb +158 -0
- data/lib/ifeelgoods/models/get_client_by_id200_response.rb +147 -0
- data/lib/ifeelgoods/models/get_current_account200_response.rb +147 -0
- data/lib/ifeelgoods/models/get_promotion_by_id200_response.rb +147 -0
- data/lib/ifeelgoods/models/get_promotion_by_id401_response.rb +157 -0
- data/lib/ifeelgoods/models/get_promotion_by_id404_response.rb +157 -0
- data/lib/ifeelgoods/models/get_redemption_stats200_response.rb +158 -0
- data/lib/ifeelgoods/models/get_reward_by_sku200_response.rb +147 -0
- data/lib/ifeelgoods/models/list_client_discounts200_response.rb +158 -0
- data/lib/ifeelgoods/models/list_client_promotions200_response.rb +158 -0
- data/lib/ifeelgoods/models/list_client_promotions200_response_paging.rb +165 -0
- data/lib/ifeelgoods/models/list_client_promotions401_response.rb +157 -0
- data/lib/ifeelgoods/models/list_client_vendor_places200_response.rb +158 -0
- data/lib/ifeelgoods/models/list_clients200_response.rb +158 -0
- data/lib/ifeelgoods/models/list_redemptions200_response.rb +158 -0
- data/lib/ifeelgoods/models/list_rewards200_response.rb +158 -0
- data/lib/ifeelgoods/models/product_summary.rb +222 -0
- data/lib/ifeelgoods/models/product_type.rb +204 -0
- data/lib/ifeelgoods/models/promotion_details.rb +354 -0
- data/lib/ifeelgoods/models/promotion_details_client.rb +157 -0
- data/lib/ifeelgoods/models/promotion_details_rewards_inner.rb +245 -0
- data/lib/ifeelgoods/models/redemption.rb +383 -0
- data/lib/ifeelgoods/models/redemption_promotion.rb +211 -0
- data/lib/ifeelgoods/models/redemption_reward.rb +224 -0
- data/lib/ifeelgoods/models/redemption_reward_format.rb +193 -0
- data/lib/ifeelgoods/models/redemption_value.rb +157 -0
- data/lib/ifeelgoods/models/reward_details.rb +486 -0
- data/lib/ifeelgoods/models/reward_details_brand.rb +213 -0
- data/lib/ifeelgoods/models/reward_details_dimensions.rb +293 -0
- data/lib/ifeelgoods/models/reward_details_product.rb +222 -0
- data/lib/ifeelgoods/models/reward_details_product_type.rb +204 -0
- data/lib/ifeelgoods/models/reward_details_targeting.rb +170 -0
- data/lib/ifeelgoods/models/reward_format.rb +192 -0
- data/lib/ifeelgoods/models/stats.rb +158 -0
- data/lib/ifeelgoods/models/stats_timeframe.rb +156 -0
- data/lib/ifeelgoods/models/stats_values_inner.rb +178 -0
- data/lib/ifeelgoods/models/stats_values_inner_group_by_inner.rb +186 -0
- data/lib/ifeelgoods/models/stats_values_inner_states.rb +219 -0
- data/lib/ifeelgoods/models/user.rb +188 -0
- data/lib/ifeelgoods/models/vendor_place.rb +186 -0
- data/lib/ifeelgoods/models/vendor_place_brand.rb +158 -0
- data/lib/ifeelgoods/models/vendor_place_geoloc.rb +156 -0
- data/lib/ifeelgoods/version.rb +15 -0
- data/lib/ifeelgoods.rb +115 -0
- data/spec/api/accounts_api_spec.rb +46 -0
- data/spec/api/clients_api_spec.rb +88 -0
- data/spec/api/promotions_api_spec.rb +61 -0
- data/spec/api/redemptions_api_spec.rb +175 -0
- data/spec/api/rewards_api_spec.rb +62 -0
- data/spec/api/stats_api_spec.rb +53 -0
- data/spec/api/vendor_places_api_spec.rb +51 -0
- data/spec/models/account_spec.rb +88 -0
- data/spec/models/activate_redemption_request_data_spec.rb +36 -0
- data/spec/models/activate_redemption_request_spec.rb +36 -0
- data/spec/models/address_spec.rb +78 -0
- data/spec/models/brand_summary_spec.rb +58 -0
- data/spec/models/budget_line_item_spec.rb +80 -0
- data/spec/models/card_consult_redemption200_response_data_spec.rb +42 -0
- data/spec/models/card_consult_redemption200_response_spec.rb +36 -0
- data/spec/models/card_consult_redemption422_response_spec.rb +42 -0
- data/spec/models/client_details_spec.rb +106 -0
- data/spec/models/client_summary_budget_alerts_spec.rb +42 -0
- data/spec/models/client_summary_spec.rb +106 -0
- data/spec/models/create_and_redeem_request_data_spec.rb +54 -0
- data/spec/models/create_and_redeem_request_spec.rb +36 -0
- data/spec/models/create_redemption201_response_spec.rb +36 -0
- data/spec/models/create_redemption422_response_spec.rb +42 -0
- data/spec/models/create_redemption_request_data_customization_pdf_spec.rb +42 -0
- data/spec/models/create_redemption_request_data_customization_spec.rb +36 -0
- data/spec/models/create_redemption_request_data_reward_spec.rb +36 -0
- data/spec/models/create_redemption_request_data_spec.rb +60 -0
- data/spec/models/create_redemption_request_data_value_spec.rb +36 -0
- data/spec/models/create_redemption_request_spec.rb +36 -0
- data/spec/models/dimension_denomination_spec.rb +32 -0
- data/spec/models/dimension_spec.rb +114 -0
- data/spec/models/discount_summary_spec.rb +66 -0
- data/spec/models/error_response_spec.rb +42 -0
- data/spec/models/get_client_budget_history200_response_spec.rb +42 -0
- data/spec/models/get_client_by_id200_response_spec.rb +36 -0
- data/spec/models/get_current_account200_response_spec.rb +36 -0
- data/spec/models/get_promotion_by_id200_response_spec.rb +36 -0
- data/spec/models/get_promotion_by_id401_response_spec.rb +42 -0
- data/spec/models/get_promotion_by_id404_response_spec.rb +42 -0
- data/spec/models/get_redemption_stats200_response_spec.rb +42 -0
- data/spec/models/get_reward_by_sku200_response_spec.rb +36 -0
- data/spec/models/list_client_discounts200_response_spec.rb +42 -0
- data/spec/models/list_client_promotions200_response_paging_spec.rb +48 -0
- data/spec/models/list_client_promotions200_response_spec.rb +42 -0
- data/spec/models/list_client_promotions401_response_spec.rb +42 -0
- data/spec/models/list_client_vendor_places200_response_spec.rb +42 -0
- data/spec/models/list_clients200_response_spec.rb +42 -0
- data/spec/models/list_redemptions200_response_spec.rb +42 -0
- data/spec/models/list_rewards200_response_spec.rb +42 -0
- data/spec/models/product_summary_spec.rb +64 -0
- data/spec/models/product_type_spec.rb +50 -0
- data/spec/models/promotion_details_client_spec.rb +42 -0
- data/spec/models/promotion_details_rewards_inner_spec.rb +78 -0
- data/spec/models/promotion_details_spec.rb +136 -0
- data/spec/models/redemption_promotion_spec.rb +58 -0
- data/spec/models/redemption_reward_format_spec.rb +50 -0
- data/spec/models/redemption_reward_spec.rb +62 -0
- data/spec/models/redemption_spec.rb +168 -0
- data/spec/models/redemption_value_spec.rb +42 -0
- data/spec/models/reward_details_brand_spec.rb +58 -0
- data/spec/models/reward_details_dimensions_spec.rb +114 -0
- data/spec/models/reward_details_product_spec.rb +64 -0
- data/spec/models/reward_details_product_type_spec.rb +50 -0
- data/spec/models/reward_details_spec.rb +218 -0
- data/spec/models/reward_details_targeting_spec.rb +48 -0
- data/spec/models/reward_format_spec.rb +50 -0
- data/spec/models/stats_spec.rb +42 -0
- data/spec/models/stats_timeframe_spec.rb +42 -0
- data/spec/models/stats_values_inner_group_by_inner_spec.rb +60 -0
- data/spec/models/stats_values_inner_spec.rb +54 -0
- data/spec/models/stats_values_inner_states_spec.rb +84 -0
- data/spec/models/user_spec.rb +60 -0
- data/spec/models/vendor_place_brand_spec.rb +42 -0
- data/spec/models/vendor_place_geoloc_spec.rb +42 -0
- data/spec/models/vendor_place_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- metadata +397 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: bf7c17becb1a3e9ce87618976d81669828e2bb2cbe0eefd09ebfacf091da4e52
|
|
4
|
+
data.tar.gz: 10a653a3ad91245f88084ef75db810d01d1170b2b4ef6d1b4d5f06de57264d6c
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: df76494d42d616a4c614794bd7bd3031709dce119ccdc1bb6ed6bda63d091d33a8b816501fa80e8921adbf692438033a0ff02c4efe8bfd4eea74e24c827d3946
|
|
7
|
+
data.tar.gz: ea3ec73481d398d5fe7c4ba7da01fd8930432b0e8edad8a7f2f653c25eaf505ac6e7dc89cd4a542f0225c86d8e651160e82ab32e313e8818bdcbdd39e698c564
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
ifeelgoods (0.0.1)
|
|
5
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
ast (2.4.3)
|
|
11
|
+
byebug (13.0.0)
|
|
12
|
+
reline (>= 0.6.0)
|
|
13
|
+
coderay (1.1.3)
|
|
14
|
+
date (3.5.1)
|
|
15
|
+
diff-lcs (1.6.2)
|
|
16
|
+
ethon (0.18.0)
|
|
17
|
+
ffi (>= 1.15.0)
|
|
18
|
+
logger
|
|
19
|
+
ffi (1.17.4-x86_64-linux-gnu)
|
|
20
|
+
io-console (0.8.2)
|
|
21
|
+
jaro_winkler (1.5.6)
|
|
22
|
+
logger (1.7.0)
|
|
23
|
+
method_source (1.1.0)
|
|
24
|
+
parallel (1.28.0)
|
|
25
|
+
parser (3.3.12.0)
|
|
26
|
+
ast (~> 2.4.1)
|
|
27
|
+
racc
|
|
28
|
+
pry (0.16.0)
|
|
29
|
+
coderay (~> 1.1)
|
|
30
|
+
method_source (~> 1.0)
|
|
31
|
+
reline (>= 0.6.0)
|
|
32
|
+
pry-byebug (3.12.0)
|
|
33
|
+
byebug (~> 13.0)
|
|
34
|
+
pry (>= 0.13, < 0.17)
|
|
35
|
+
psych (5.4.0)
|
|
36
|
+
date
|
|
37
|
+
stringio
|
|
38
|
+
racc (1.8.1)
|
|
39
|
+
rainbow (3.1.1)
|
|
40
|
+
rake (13.0.6)
|
|
41
|
+
reline (0.6.3)
|
|
42
|
+
io-console (~> 0.5)
|
|
43
|
+
rspec (3.13.2)
|
|
44
|
+
rspec-core (~> 3.13.0)
|
|
45
|
+
rspec-expectations (~> 3.13.0)
|
|
46
|
+
rspec-mocks (~> 3.13.0)
|
|
47
|
+
rspec-core (3.13.6)
|
|
48
|
+
rspec-support (~> 3.13.0)
|
|
49
|
+
rspec-expectations (3.13.5)
|
|
50
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
51
|
+
rspec-support (~> 3.13.0)
|
|
52
|
+
rspec-mocks (3.13.8)
|
|
53
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
54
|
+
rspec-support (~> 3.13.0)
|
|
55
|
+
rspec-support (3.13.7)
|
|
56
|
+
rubocop (0.66.0)
|
|
57
|
+
jaro_winkler (~> 1.5.1)
|
|
58
|
+
parallel (~> 1.10)
|
|
59
|
+
parser (>= 2.5, != 2.5.1.1)
|
|
60
|
+
psych (>= 3.1.0)
|
|
61
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
62
|
+
ruby-progressbar (~> 1.7)
|
|
63
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
|
64
|
+
ruby-progressbar (1.13.0)
|
|
65
|
+
stringio (3.2.0)
|
|
66
|
+
typhoeus (1.6.0)
|
|
67
|
+
ethon (>= 0.18.0)
|
|
68
|
+
unicode-display_width (1.5.0)
|
|
69
|
+
|
|
70
|
+
PLATFORMS
|
|
71
|
+
x86_64-linux
|
|
72
|
+
|
|
73
|
+
DEPENDENCIES
|
|
74
|
+
ifeelgoods!
|
|
75
|
+
pry-byebug
|
|
76
|
+
rake (~> 13.0.1)
|
|
77
|
+
rspec (~> 3.6, >= 3.6.0)
|
|
78
|
+
rubocop (~> 0.66.0)
|
|
79
|
+
|
|
80
|
+
BUNDLED WITH
|
|
81
|
+
2.4.19
|
data/README.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# ifeelgoods
|
|
2
|
+
|
|
3
|
+
Official Ruby SDK for IFeelGoods Fulfillment API
|
|
4
|
+
|
|
5
|
+
**Package name:** `ifeelgoods`
|
|
6
|
+
**Module namespace:** `Ifeelgoods::`
|
|
7
|
+
|
|
8
|
+
## Authentication
|
|
9
|
+
|
|
10
|
+
The Fulfillment API supports two authentication methods:
|
|
11
|
+
|
|
12
|
+
### Option 1: API Key + API Secret (Simple, Direct)
|
|
13
|
+
Use this for simple scripts or when you prefer direct authentication:
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'ifeelgoods'
|
|
17
|
+
|
|
18
|
+
# Configure the SDK globally
|
|
19
|
+
Ifeelgoods.configure do |config|
|
|
20
|
+
config.scheme = 'https' # http for testing only [not recommended for production]
|
|
21
|
+
config.host = 'api.ifeelgoods.com'
|
|
22
|
+
# Sandbox: config.host = 'api-sandbox.ifeelgoods.com'
|
|
23
|
+
config.api_key['Api-Key'] = 'YOUR_API_KEY'
|
|
24
|
+
config.api_key['Api-Secret'] = 'YOUR_API_SECRET'
|
|
25
|
+
config.debugging = ENV['IFEELGOODS_DEBUG'] == 'true' # Optional: Enable debugging
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# All API instances use the configured settings
|
|
29
|
+
accounts_api = Ifeelgoods::AccountsApi.new
|
|
30
|
+
result = accounts_api.get_current_account
|
|
31
|
+
|
|
32
|
+
puts result.inspect
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Option 2: Bearer Token (Recommended for Production)
|
|
36
|
+
|
|
37
|
+
Use OAuth2 to exchange API Key + Secret for a bearer token, then cache it to avoid repeated token requests.
|
|
38
|
+
|
|
39
|
+
**Environment Setup:**
|
|
40
|
+
```bash
|
|
41
|
+
# Set your API credentials
|
|
42
|
+
export IFEELGOODS_API_KEY='your-api-key'
|
|
43
|
+
export IFEELGOODS_API_SECRET='your-api-secret'
|
|
44
|
+
|
|
45
|
+
# Set OAuth endpoint (defaults to production)
|
|
46
|
+
export IFEELGOODS_OAUTH_URL='https://oauth.ifeelgoods.com'
|
|
47
|
+
# Or for sandbox:
|
|
48
|
+
# export IFEELGOODS_OAUTH_URL='https://oauth-sandbox.ifeelgoods.com'
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
require 'ifeelgoods'
|
|
53
|
+
require 'net/http'
|
|
54
|
+
require 'json'
|
|
55
|
+
|
|
56
|
+
class OAuthTokenManager
|
|
57
|
+
# Default to production OAuth endpoint. Override with IFEELGOODS_OAUTH_URL environment variable.
|
|
58
|
+
# Production: https://oauth.ifeelgoods.com
|
|
59
|
+
# Sandbox: https://oauth-sandbox.ifeelgoods.com
|
|
60
|
+
DEFAULT_OAUTH_URL = 'https://oauth.ifeelgoods.com'
|
|
61
|
+
|
|
62
|
+
def initialize(api_key = nil, api_secret = nil, oauth_url = nil)
|
|
63
|
+
@api_key = api_key || ENV['IFEELGOODS_API_KEY']
|
|
64
|
+
@api_secret = api_secret || ENV['IFEELGOODS_API_SECRET']
|
|
65
|
+
@oauth_url = oauth_url || ENV['IFEELGOODS_OAUTH_URL'] || DEFAULT_OAUTH_URL
|
|
66
|
+
|
|
67
|
+
raise 'IFEELGOODS_API_KEY environment variable not set' if @api_key.nil?
|
|
68
|
+
raise 'IFEELGOODS_API_SECRET environment variable not set' if @api_secret.nil?
|
|
69
|
+
@token = nil
|
|
70
|
+
@token_expires_at = nil
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def access_token
|
|
74
|
+
# Return cached token if still valid
|
|
75
|
+
return @token if @token && Time.now < @token_expires_at
|
|
76
|
+
|
|
77
|
+
# Fetch new token
|
|
78
|
+
fetch_new_token
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
private
|
|
82
|
+
|
|
83
|
+
def fetch_new_token
|
|
84
|
+
uri = URI("#{@oauth_url}/oauth/token")
|
|
85
|
+
|
|
86
|
+
request = Net::HTTP::Post.new(uri)
|
|
87
|
+
request.basic_auth(@api_key, @api_secret)
|
|
88
|
+
request['Content-Type'] = 'application/x-www-form-urlencoded'
|
|
89
|
+
request.body = 'grant_type=client_credentials'
|
|
90
|
+
|
|
91
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
|
92
|
+
http.use_ssl = uri.scheme == 'https'
|
|
93
|
+
response = http.request(request)
|
|
94
|
+
|
|
95
|
+
if response.code.to_i == 200
|
|
96
|
+
data = JSON.parse(response.body)
|
|
97
|
+
@token = data['access_token']
|
|
98
|
+
@token_expires_at = Time.now + data['expires_in'] - 60 # Refresh 60s before expiry
|
|
99
|
+
@token
|
|
100
|
+
else
|
|
101
|
+
raise "Failed to get access token: #{response.body}"
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Usage
|
|
107
|
+
token_manager = OAuthTokenManager.new # Reads from environment variables
|
|
108
|
+
|
|
109
|
+
api_client = Ifeelgoods::ApiClient.new
|
|
110
|
+
api_client.config.host = 'https://api.ifeelgoods.com'
|
|
111
|
+
api_client.config.access_token_getter = -> { token_manager.access_token }
|
|
112
|
+
|
|
113
|
+
accounts_api = Ifeelgoods::AccountsApi.new(api_client) # Uses custom API client with token auth
|
|
114
|
+
result = accounts_api.get_current_account
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Benefits of Option 2:**
|
|
118
|
+
- ✅ Token is cached and reused (fewer network requests)
|
|
119
|
+
- ✅ Automatic refresh before expiry
|
|
120
|
+
- ✅ Recommended for production environments
|
|
121
|
+
- ✅ More secure (API credentials stay server-side)
|
|
122
|
+
|
|
123
|
+
## Installation & Usage
|
|
124
|
+
|
|
125
|
+
### Install from RubyGems
|
|
126
|
+
|
|
127
|
+
```shell
|
|
128
|
+
gem install ifeelgoods
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Then require it in your code:
|
|
132
|
+
|
|
133
|
+
```shell
|
|
134
|
+
ruby -e "require 'ifeelgoods'; puts 'SDK loaded successfully'"
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Development: Build & Install Locally
|
|
138
|
+
|
|
139
|
+
To build and test the SDK from source:
|
|
140
|
+
|
|
141
|
+
```shell
|
|
142
|
+
cd ruby/generated/fulfillment-sdk
|
|
143
|
+
gem build ifeelgoods.gemspec
|
|
144
|
+
gem install ./ifeelgoods-VERSION.gem
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## Documentation
|
|
149
|
+
|
|
150
|
+
Full API documentation is available at:
|
|
151
|
+
|
|
152
|
+
- **RubyGems:** [ifeelgoods](https://rubygems.org/gems/ifeelgoods)
|
|
153
|
+
- **GitHub Repository:** [ifeelgoods-api-sdks](https://github.com/ifeelgoods/ifeelgoods-api-sdks)
|
|
154
|
+
|
|
155
|
+
### Explore the SDK Locally
|
|
156
|
+
|
|
157
|
+
Use IRB to explore available classes and methods:
|
|
158
|
+
|
|
159
|
+
```ruby
|
|
160
|
+
require 'ifeelgoods'
|
|
161
|
+
|
|
162
|
+
# List all available API classes
|
|
163
|
+
Ifeelgoods.constants.grep(/Api$/).sort
|
|
164
|
+
|
|
165
|
+
# Explore a specific API
|
|
166
|
+
Ifeelgoods::AccountsApi.instance_methods(false)
|
|
167
|
+
```
|
data/Rakefile
ADDED
data/docs/Account.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Ifeelgoods::Account
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | | [optional] |
|
|
8
|
+
| **login** | **String** | | [optional] |
|
|
9
|
+
| **name** | **String** | | [optional] |
|
|
10
|
+
| **email** | **String** | | [optional] |
|
|
11
|
+
| **phone_number** | **String** | | [optional] |
|
|
12
|
+
| **roles** | **Array<String>** | | [optional] |
|
|
13
|
+
| **locale** | **String** | | [optional] |
|
|
14
|
+
| **timezone** | **String** | | [optional] |
|
|
15
|
+
| **access_type** | **String** | | [optional] |
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```ruby
|
|
20
|
+
require 'ifeelgoods'
|
|
21
|
+
|
|
22
|
+
instance = Ifeelgoods::Account.new(
|
|
23
|
+
id: 42,
|
|
24
|
+
login: john.doe@example.com,
|
|
25
|
+
name: John Doe,
|
|
26
|
+
email: john.doe@example.com,
|
|
27
|
+
phone_number: +33612345678,
|
|
28
|
+
roles: ["fulfillment_api"],
|
|
29
|
+
locale: fr,
|
|
30
|
+
timezone: Europe/Paris,
|
|
31
|
+
access_type: service
|
|
32
|
+
)
|
|
33
|
+
```
|
|
34
|
+
|
data/docs/AccountsApi.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Ifeelgoods::AccountsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api-sandbox.ifeelgoods.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**get_current_account**](AccountsApi.md#get_current_account) | **GET** /fulfillment/v2/accounts/me | Get current account |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## get_current_account
|
|
11
|
+
|
|
12
|
+
> <GetCurrentAccount200Response> get_current_account
|
|
13
|
+
|
|
14
|
+
Get current account
|
|
15
|
+
|
|
16
|
+
Use this function to get the details of your current account
|
|
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::AccountsApi.new
|
|
40
|
+
|
|
41
|
+
begin
|
|
42
|
+
# Get current account
|
|
43
|
+
result = api_instance.get_current_account
|
|
44
|
+
p result
|
|
45
|
+
rescue Ifeelgoods::ApiError => e
|
|
46
|
+
puts "Error when calling AccountsApi->get_current_account: #{e}"
|
|
47
|
+
end
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Using the get_current_account_with_http_info variant
|
|
51
|
+
|
|
52
|
+
This returns an Array which contains the response data, status code and headers.
|
|
53
|
+
|
|
54
|
+
> <Array(<GetCurrentAccount200Response>, Integer, Hash)> get_current_account_with_http_info
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
begin
|
|
58
|
+
# Get current account
|
|
59
|
+
data, status_code, headers = api_instance.get_current_account_with_http_info
|
|
60
|
+
p status_code # => 2xx
|
|
61
|
+
p headers # => { ... }
|
|
62
|
+
p data # => <GetCurrentAccount200Response>
|
|
63
|
+
rescue Ifeelgoods::ApiError => e
|
|
64
|
+
puts "Error when calling AccountsApi->get_current_account_with_http_info: #{e}"
|
|
65
|
+
end
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Parameters
|
|
69
|
+
|
|
70
|
+
This endpoint does not need any parameter.
|
|
71
|
+
|
|
72
|
+
### Return type
|
|
73
|
+
|
|
74
|
+
[**GetCurrentAccount200Response**](GetCurrentAccount200Response.md)
|
|
75
|
+
|
|
76
|
+
### Authorization
|
|
77
|
+
|
|
78
|
+
[api_key](../README.md#api_key), [bearer_auth](../README.md#bearer_auth), [api_secret](../README.md#api_secret)
|
|
79
|
+
|
|
80
|
+
### HTTP request headers
|
|
81
|
+
|
|
82
|
+
- **Content-Type**: Not defined
|
|
83
|
+
- **Accept**: application/json
|
|
84
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Ifeelgoods::ActivateRedemptionRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**ActivateRedemptionRequestData**](ActivateRedemptionRequestData.md) | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'ifeelgoods'
|
|
13
|
+
|
|
14
|
+
instance = Ifeelgoods::ActivateRedemptionRequest.new(
|
|
15
|
+
data: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Ifeelgoods::ActivateRedemptionRequestData
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **user** | [**User**](User.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'ifeelgoods'
|
|
13
|
+
|
|
14
|
+
instance = Ifeelgoods::ActivateRedemptionRequestData.new(
|
|
15
|
+
user: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/Address.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Ifeelgoods::Address
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **line_1** | **String** | | [optional] |
|
|
8
|
+
| **line_2** | **String** | | [optional] |
|
|
9
|
+
| **line_3** | **String** | | [optional] |
|
|
10
|
+
| **line_4** | **String** | | [optional] |
|
|
11
|
+
| **zipcode** | **String** | | [optional] |
|
|
12
|
+
| **city** | **String** | | [optional] |
|
|
13
|
+
| **state** | **String** | | [optional] |
|
|
14
|
+
| **country** | **String** | ISO-3166 country code (eg. US, FR, GB) | [optional] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'ifeelgoods'
|
|
20
|
+
|
|
21
|
+
instance = Ifeelgoods::Address.new(
|
|
22
|
+
line_1: Ifeelgoods, Inc,
|
|
23
|
+
line_2: 550 Hamilton Avenue,
|
|
24
|
+
line_3: Suite 226,
|
|
25
|
+
line_4: null,
|
|
26
|
+
zipcode: 94301,
|
|
27
|
+
city: Palo Alto,
|
|
28
|
+
state: California,
|
|
29
|
+
country: US
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Ifeelgoods::BrandSummary
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | Unique identifier that represents the brand (eg. `APP`). | [optional] |
|
|
8
|
+
| **name** | **String** | Brand name (eg. `iTunes`). | [optional] |
|
|
9
|
+
| **status** | **String** | | [optional] |
|
|
10
|
+
| **url** | **String** | Brand URL (eg. `https://www.ifeelgoods.com`). | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'ifeelgoods'
|
|
16
|
+
|
|
17
|
+
instance = Ifeelgoods::BrandSummary.new(
|
|
18
|
+
id: APP,
|
|
19
|
+
name: iTunes,
|
|
20
|
+
status: null,
|
|
21
|
+
url: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Ifeelgoods::BudgetLineItem
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | | [optional] |
|
|
8
|
+
| **amount** | **String** | | [optional] |
|
|
9
|
+
| **type** | **String** | | [optional] |
|
|
10
|
+
| **status** | **String** | | [optional] |
|
|
11
|
+
| **external_id** | **String** | | [optional] |
|
|
12
|
+
| **description** | **String** | | [optional] |
|
|
13
|
+
| **creation_datetime** | **Time** | | [optional] |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'ifeelgoods'
|
|
19
|
+
|
|
20
|
+
instance = Ifeelgoods::BudgetLineItem.new(
|
|
21
|
+
id: null,
|
|
22
|
+
amount: null,
|
|
23
|
+
type: null,
|
|
24
|
+
status: null,
|
|
25
|
+
external_id: null,
|
|
26
|
+
description: null,
|
|
27
|
+
creation_datetime: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Ifeelgoods::CardConsultRedemption200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**CardConsultRedemption200ResponseData**](CardConsultRedemption200ResponseData.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'ifeelgoods'
|
|
13
|
+
|
|
14
|
+
instance = Ifeelgoods::CardConsultRedemption200Response.new(
|
|
15
|
+
data: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Ifeelgoods::CardConsultRedemption200ResponseData
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **card_balance** | **Float** | | [optional] |
|
|
8
|
+
| **card_currency** | **String** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ifeelgoods'
|
|
14
|
+
|
|
15
|
+
instance = Ifeelgoods::CardConsultRedemption200ResponseData.new(
|
|
16
|
+
card_balance: null,
|
|
17
|
+
card_currency: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Ifeelgoods::CardConsultRedemption422Response
|
|
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::CardConsultRedemption422Response.new(
|
|
16
|
+
error_name: unprocessable_entity,
|
|
17
|
+
error_message: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Ifeelgoods::ClientDetails
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | | [optional] |
|
|
8
|
+
| **name** | **String** | | [optional] |
|
|
9
|
+
| **ui_id** | **String** | | [optional] |
|
|
10
|
+
| **status** | **String** | | [optional] |
|
|
11
|
+
| **billing_location** | **String** | | [optional] |
|
|
12
|
+
| **contact_email** | **String** | | [optional] |
|
|
13
|
+
| **contact_phone** | **String** | | [optional] |
|
|
14
|
+
| **locale** | **String** | | [optional] |
|
|
15
|
+
| **logo_url** | **String** | | [optional] |
|
|
16
|
+
| **balance** | **String** | Advertiser remaining budget | [optional] |
|
|
17
|
+
| **balance_currency** | **String** | Advertiser remaining budget currency | [optional] |
|
|
18
|
+
| **budget_alerts** | [**ClientSummaryBudgetAlerts**](ClientSummaryBudgetAlerts.md) | | [optional] |
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'ifeelgoods'
|
|
24
|
+
|
|
25
|
+
instance = Ifeelgoods::ClientDetails.new(
|
|
26
|
+
id: 237,
|
|
27
|
+
name: Ifeelgoods, Inc.,
|
|
28
|
+
ui_id: ifeelgoods-inc,
|
|
29
|
+
status: enabled,
|
|
30
|
+
billing_location: US,
|
|
31
|
+
contact_email: joe@ifeelgoods.com,
|
|
32
|
+
contact_phone: +33612345678,
|
|
33
|
+
locale: en,
|
|
34
|
+
logo_url: //cdn.ifeelgoods.com/media/a308a55a5b865ca43d4eda67dffa188a.png,
|
|
35
|
+
balance: 1000.00,
|
|
36
|
+
balance_currency: EUR,
|
|
37
|
+
budget_alerts: null
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Ifeelgoods::ClientSummary
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **Integer** | | [optional] |
|
|
8
|
+
| **name** | **String** | | [optional] |
|
|
9
|
+
| **ui_id** | **String** | | [optional] |
|
|
10
|
+
| **status** | **String** | | [optional] |
|
|
11
|
+
| **billing_location** | **String** | | [optional] |
|
|
12
|
+
| **contact_email** | **String** | | [optional] |
|
|
13
|
+
| **contact_phone** | **String** | | [optional] |
|
|
14
|
+
| **locale** | **String** | | [optional] |
|
|
15
|
+
| **logo_url** | **String** | | [optional] |
|
|
16
|
+
| **balance** | **String** | Advertiser remaining budget | [optional] |
|
|
17
|
+
| **balance_currency** | **String** | Advertiser remaining budget currency | [optional] |
|
|
18
|
+
| **budget_alerts** | [**ClientSummaryBudgetAlerts**](ClientSummaryBudgetAlerts.md) | | [optional] |
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'ifeelgoods'
|
|
24
|
+
|
|
25
|
+
instance = Ifeelgoods::ClientSummary.new(
|
|
26
|
+
id: 237,
|
|
27
|
+
name: Ifeelgoods, Inc.,
|
|
28
|
+
ui_id: ifeelgoods-inc,
|
|
29
|
+
status: enabled,
|
|
30
|
+
billing_location: US,
|
|
31
|
+
contact_email: joe@ifeelgoods.com,
|
|
32
|
+
contact_phone: +33612345678,
|
|
33
|
+
locale: en,
|
|
34
|
+
logo_url: //cdn.ifeelgoods.com/media/a308a55a5b865ca43d4eda67dffa188a.png,
|
|
35
|
+
balance: 1000.00,
|
|
36
|
+
balance_currency: EUR,
|
|
37
|
+
budget_alerts: null
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Ifeelgoods::ClientSummaryBudgetAlerts
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **alert_1** | **Integer** | | [optional] |
|
|
8
|
+
| **alert_2** | **Integer** | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ifeelgoods'
|
|
14
|
+
|
|
15
|
+
instance = Ifeelgoods::ClientSummaryBudgetAlerts.new(
|
|
16
|
+
alert_1: null,
|
|
17
|
+
alert_2: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|