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.2.0.beta.1
  • 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.2.0.beta.1.gem

(for development, run gem install --dev ./ifeelgoods-0.2.0.beta.1.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.2.0.beta.1'

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.
  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

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