ifeelgoods
Ifeelgoods - the Ruby gem for the Fulfillment API
Public API exposed to ifeelgoods customers.
This SDK is automatically generated by the OpenAPI Generator project:
- API version: v2
- Package version: 0.0.2.beta
- Generator version: 7.24.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build ifeelgoods.gemspec
Then either install the gem locally:
gem install ./ifeelgoods-0.0.2.beta.gem
(for development, run gem install --dev ./ifeelgoods-0.0.2.beta.gem to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'ifeelgoods', '~> 0.0.2.beta'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'ifeelgoods', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'ifeelgoods'
# Setup authorization
Ifeelgoods.configure do |config|
# Configure API key authorization: api_key
config.api_key['Api-Key'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Api-Key'] = 'Bearer'
# Configure Bearer authorization: bearer_auth
config.access_token = 'YOUR_BEARER_TOKEN'
# Configure a proc to get access tokens in lieu of the static access_token configuration
config.access_token_getter = -> { 'YOUR TOKEN GETTER PROC' }
# Configure API key authorization: api_secret
config.api_key['Api-Secret'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['Api-Secret'] = 'Bearer'
end
api_instance = Ifeelgoods::AccountsApi.new
begin
#Get current account
result = api_instance.get_current_account
p result
rescue Ifeelgoods::ApiError => e
puts "Exception when calling AccountsApi->get_current_account: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api-sandbox.ifeelgoods.com
| Class | Method | HTTP request | Description |
|---|---|---|---|
| Ifeelgoods::AccountsApi | get_current_account | GET /fulfillment/v2/accounts/me | Get current account |
| Ifeelgoods::ClientsApi | get_client_budget_history | GET /fulfillment/v2/clients/client_id/budget/history | Get a Client budget history |
| Ifeelgoods::ClientsApi | get_client_by_id | GET /fulfillment/v2/clients/client_id | Get a Client |
| Ifeelgoods::ClientsApi | list_client_discounts | GET /fulfillment/v2/clients/client_id/discounts | List all discounts |
| Ifeelgoods::ClientsApi | list_clients | GET /fulfillment/v2/clients | List all Clients |
| Ifeelgoods::PromotionsApi | get_promotion_by_id | GET /fulfillment/v2/promotions/promotion_id | Get a promotion |
| Ifeelgoods::PromotionsApi | list_client_promotions | GET /fulfillment/v2/clients/client_id/promotions | List all Promotions |
| Ifeelgoods::RedemptionsApi | activate_redemption | POST /fulfillment/v2/redemptions/redemption_id/actions/activate | Activate |
| Ifeelgoods::RedemptionsApi | book_redemption | POST /fulfillment/v2/promotions/promotion_id/rewards/reward_sku/redemptions/book | Book |
| Ifeelgoods::RedemptionsApi | cancel_redemption | POST /fulfillment/v2/redemptions/redemption_id/actions/cancel | Cancel |
| Ifeelgoods::RedemptionsApi | card_consult_redemption | GET /fulfillment/v2/redemptions/redemption_id/card_consult | Consult Card |
| Ifeelgoods::RedemptionsApi | create_and_redeem | POST /fulfillment/v2/promotions/promotion_id/rewards/reward_sku/redemptions/redeem | Create and Redeem |
| Ifeelgoods::RedemptionsApi | create_redemption | POST /fulfillment/v2/promotions/promotion_id/redemptions | Create a redemption |
| Ifeelgoods::RedemptionsApi | get_redemption_by_id | GET /fulfillment/v2/redemptions/redemption_id | Get a redemption |
| Ifeelgoods::RedemptionsApi | list_redemptions | GET /fulfillment/v2/promotions/promotion_id/redemptions | List all Redemptions |
| Ifeelgoods::RedemptionsApi | redeem_redemption | POST /fulfillment/v2/redemptions/redemption_id/actions/redeem | Redeem |
| Ifeelgoods::RedemptionsApi | refund_redemption | POST /fulfillment/v2/redemptions/redemption_id/actions/refund | Refund |
| Ifeelgoods::RewardsApi | get_reward_by_sku | GET /fulfillment/v2/rewards/sku | Get a Reward |
| Ifeelgoods::RewardsApi | list_rewards | GET /fulfillment/v2/rewards | List all Rewards |
| Ifeelgoods::StatsApi | get_redemption_stats | GET /fulfillment/v2/clients/client_id/stats | Get Redemption Stats |
| Ifeelgoods::VendorPlacesApi | list_client_vendor_places | GET /fulfillment/v2/clients/client_id/vendor_places | List all vendor places |
Documentation for Models
- Ifeelgoods::Account
- Ifeelgoods::ActivateRedemptionRequest
- Ifeelgoods::ActivateRedemptionRequestData
- Ifeelgoods::Address
- Ifeelgoods::BrandSummary
- Ifeelgoods::BudgetLineItem
- Ifeelgoods::CardConsultRedemption200Response
- Ifeelgoods::CardConsultRedemption200ResponseData
- Ifeelgoods::CardConsultRedemption422Response
- Ifeelgoods::ClientDetails
- Ifeelgoods::ClientSummary
- Ifeelgoods::ClientSummaryBudgetAlerts
- Ifeelgoods::CreateAndRedeemRequest
- Ifeelgoods::CreateAndRedeemRequestData
- Ifeelgoods::CreateRedemption201Response
- Ifeelgoods::CreateRedemption422Response
- Ifeelgoods::CreateRedemptionRequest
- Ifeelgoods::CreateRedemptionRequestData
- Ifeelgoods::CreateRedemptionRequestDataCustomization
- Ifeelgoods::CreateRedemptionRequestDataCustomizationPdf
- Ifeelgoods::CreateRedemptionRequestDataReward
- Ifeelgoods::CreateRedemptionRequestDataValue
- Ifeelgoods::Dimension
- Ifeelgoods::DimensionDenomination
- Ifeelgoods::DiscountSummary
- Ifeelgoods::ErrorResponse
- Ifeelgoods::GetClientBudgetHistory200Response
- Ifeelgoods::GetClientById200Response
- Ifeelgoods::GetCurrentAccount200Response
- Ifeelgoods::GetPromotionByID200Response
- Ifeelgoods::GetPromotionByID401Response
- Ifeelgoods::GetPromotionByID404Response
- Ifeelgoods::GetRedemptionStats200Response
- Ifeelgoods::GetRewardBySKU200Response
- Ifeelgoods::ListClientDiscounts200Response
- Ifeelgoods::ListClientPromotions200Response
- Ifeelgoods::ListClientPromotions200ResponsePaging
- Ifeelgoods::ListClientPromotions401Response
- Ifeelgoods::ListClientVendorPlaces200Response
- Ifeelgoods::ListClients200Response
- Ifeelgoods::ListRedemptions200Response
- Ifeelgoods::ListRewards200Response
- Ifeelgoods::ProductSummary
- Ifeelgoods::ProductType
- Ifeelgoods::PromotionDetails
- Ifeelgoods::PromotionDetailsClient
- Ifeelgoods::PromotionDetailsRewardsInner
- Ifeelgoods::Redemption
- Ifeelgoods::RedemptionPromotion
- Ifeelgoods::RedemptionReward
- Ifeelgoods::RedemptionRewardFormat
- Ifeelgoods::RedemptionValue
- Ifeelgoods::RewardDetails
- Ifeelgoods::RewardDetailsBrand
- Ifeelgoods::RewardDetailsDimensions
- Ifeelgoods::RewardDetailsProduct
- Ifeelgoods::RewardDetailsProductType
- Ifeelgoods::RewardDetailsTargeting
- Ifeelgoods::RewardFormat
- Ifeelgoods::Stats
- Ifeelgoods::StatsTimeframe
- Ifeelgoods::StatsValuesInner
- Ifeelgoods::StatsValuesInnerGroupByInner
- Ifeelgoods::StatsValuesInnerStates
- Ifeelgoods::User
- Ifeelgoods::VendorPlace
- Ifeelgoods::VendorPlaceBrand
- Ifeelgoods::VendorPlaceGeoloc
Documentation for Authorization
Authentication schemes defined for the API:
bearer_auth
- Type: Bearer authentication
api_key
- Type: API key
- API key parameter name: Api-Key
- Location: HTTP header
api_secret
- Type: API key
- API key parameter name: Api-Secret
- Location: HTTP header