diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 00000000..2956ff25
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,49 @@
+# Generated by: https://openapi-generator.tech
+#
+
+*.gem
+*.rbc
+/.config
+/coverage/
+/InstalledFiles
+/pkg/
+/spec/reports/
+/spec/examples.txt
+/test/tmp/
+/test/version_tmp/
+/tmp/
+
+## Specific to RubyMotion:
+.dat*
+.repl_history
+build/
+
+## Documentation cache and generated files:
+/.yardoc/
+/_yardoc/
+/doc/
+/rdoc/
+
+## Environment normalization:
+/.bundle/
+/vendor/bundle
+/lib/bundler/man/
+
+# for a library or gem, you might want to ignore these files since the code is
+# intended to run in multiple environments; otherwise, check them in:
+# Gemfile.lock
+# .ruby-version
+# .ruby-gemset
+
+# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
+.rvmrc
+
+
+/.openapi-generator/
+/spec/
+/.gitlab-ci.yml
+/.openapi-generator-ignore
+/.travis.yml
+/git_push.sh
+/test-requirements.txt
+/.idea/
diff --git a/.env.example b/.env.example
new file mode 100644
index 00000000..d92eff1f
--- /dev/null
+++ b/.env.example
@@ -0,0 +1,3 @@
+VOUCHERIFY_HOST=https://api.voucherify.io
+X_APP_ID=
+X_APP_TOKEN=
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
new file mode 100644
index 00000000..e5972592
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -0,0 +1,29 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: '[BUG] '
+labels: bug
+assignees: ''
+
+---
+
+**Note** Please remember that this repository is primarily for reporting bugs related to the Ruby SDK.
+If you encounter bugs within the product or its documentation,
+please consider reporting them to [our support team](https://www.voucherify.io/contact-support)
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**Steps To Reproduce**
+List of steps to reproduce the bug:
+1.
+2.
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Additional context**
+Add any other context about the problem here.
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
new file mode 100644
index 00000000..dcc3216f
--- /dev/null
+++ b/.github/workflows/publish.yml
@@ -0,0 +1,29 @@
+name: Publish SDK
+
+on:
+ push:
+ tags:
+ - v*
+
+jobs:
+ publish:
+ environment: prod
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ ruby-version: 2.7
+
+ - name: Install dependencies
+ run: bundle install
+
+ - name: Build GEM
+ run: gem build *.gemspec
+
+ - name: Push GEM
+ run: gem push *.gem --debug
+ env:
+ GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 00000000..66e99ce0
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,23 @@
+name: Test Workflow
+
+on:
+ pull_request:
+
+jobs:
+ build-and-test:
+ runs-on: ubuntu-latest
+ environment: dev
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Build Docker image
+ run: docker build -t ruby .
+
+ - name: Run tests using Docker
+ run: |
+ docker run \
+ -e VOUCHERIFY_HOST=${{ vars.VOUCHERIFY_HOST }} \
+ -e X_APP_ID=${{ secrets.X_APP_ID }} \
+ -e X_APP_TOKEN=${{ secrets.X_APP_TOKEN }} \
+ ruby
diff --git a/.gitignore b/.gitignore
index cd7b08eb..a318c65d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
+# Generated by: https://openapi-generator.tech
+#
+
*.gem
*.rbc
/.config
@@ -28,16 +31,20 @@ build/
# for a library or gem, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
+# Gemfile.lock
# .ruby-version
# .ruby-gemset
-Gemfile.lock
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
.rvmrc
-# Jetbrains temp
-.idea
-*.iml
-.ruby-version
-.vscode/
+/.openapi-generator/
+/spec/
+/.gitlab-ci.yml
+/.openapi-generator-ignore
+/.travis.yml
+/git_push.sh
+/test-requirements.txt
+/.env
+/.idea/
diff --git a/.rspec b/.rspec
index 16f9cdb0..83e16f80 100644
--- a/.rspec
+++ b/.rspec
@@ -1,2 +1,2 @@
--color
---format documentation
+--require spec_helper
diff --git a/.rubocop.yml b/.rubocop.yml
new file mode 100644
index 00000000..d32b2b1c
--- /dev/null
+++ b/.rubocop.yml
@@ -0,0 +1,148 @@
+# This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license)
+# Automatically generated by OpenAPI Generator (https://openapi-generator.tech)
+AllCops:
+ TargetRubyVersion: 2.4
+ # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
+ # to ignore them, so only the ones explicitly set in this file are enabled.
+ DisabledByDefault: true
+ Exclude:
+ - '**/templates/**/*'
+ - '**/vendor/**/*'
+ - 'actionpack/lib/action_dispatch/journey/parser.rb'
+
+# Prefer &&/|| over and/or.
+Style/AndOr:
+ Enabled: true
+
+# Align `when` with `case`.
+Layout/CaseIndentation:
+ Enabled: true
+
+# Align comments with method definitions.
+Layout/CommentIndentation:
+ Enabled: true
+
+Layout/ElseAlignment:
+ Enabled: true
+
+Layout/EmptyLineAfterMagicComment:
+ Enabled: true
+
+# In a regular class definition, no empty lines around the body.
+Layout/EmptyLinesAroundClassBody:
+ Enabled: true
+
+# In a regular method definition, no empty lines around the body.
+Layout/EmptyLinesAroundMethodBody:
+ Enabled: true
+
+# In a regular module definition, no empty lines around the body.
+Layout/EmptyLinesAroundModuleBody:
+ Enabled: true
+
+Layout/FirstArgumentIndentation:
+ Enabled: true
+
+# Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
+Style/HashSyntax:
+ Enabled: false
+
+# Method definitions after `private` or `protected` isolated calls need one
+# extra level of indentation.
+Layout/IndentationConsistency:
+ Enabled: true
+ EnforcedStyle: indented_internal_methods
+
+# Two spaces, no tabs (for indentation).
+Layout/IndentationWidth:
+ Enabled: true
+
+Layout/LeadingCommentSpace:
+ Enabled: true
+
+Layout/SpaceAfterColon:
+ Enabled: true
+
+Layout/SpaceAfterComma:
+ Enabled: true
+
+Layout/SpaceAroundEqualsInParameterDefault:
+ Enabled: true
+
+Layout/SpaceAroundKeyword:
+ Enabled: true
+
+Layout/SpaceAroundOperators:
+ Enabled: true
+
+Layout/SpaceBeforeComma:
+ Enabled: true
+
+Layout/SpaceBeforeFirstArg:
+ Enabled: true
+
+Style/DefWithParentheses:
+ Enabled: true
+
+# Defining a method with parameters needs parentheses.
+Style/MethodDefParentheses:
+ Enabled: true
+
+Style/FrozenStringLiteralComment:
+ Enabled: false
+ EnforcedStyle: always
+
+# Use `foo {}` not `foo{}`.
+Layout/SpaceBeforeBlockBraces:
+ Enabled: true
+
+# Use `foo { bar }` not `foo {bar}`.
+Layout/SpaceInsideBlockBraces:
+ Enabled: true
+
+# Use `{ a: 1 }` not `{a:1}`.
+Layout/SpaceInsideHashLiteralBraces:
+ Enabled: true
+
+Layout/SpaceInsideParens:
+ Enabled: true
+
+# Check quotes usage according to lint rule below.
+#Style/StringLiterals:
+# Enabled: true
+# EnforcedStyle: single_quotes
+
+# Detect hard tabs, no hard tabs.
+Layout/IndentationStyle:
+ Enabled: true
+
+# Blank lines should not have any spaces.
+Layout/TrailingEmptyLines:
+ Enabled: true
+
+# No trailing whitespace.
+Layout/TrailingWhitespace:
+ Enabled: false
+
+# Use quotes for string literals when they are enough.
+Style/RedundantPercentQ:
+ Enabled: true
+
+# Align `end` with the matching keyword or starting expression except for
+# assignments, where it should be aligned with the LHS.
+Layout/EndAlignment:
+ Enabled: true
+ EnforcedStyleAlignWith: variable
+ AutoCorrect: true
+
+# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
+Lint/RequireParentheses:
+ Enabled: true
+
+Style/RedundantReturn:
+ Enabled: true
+ AllowMultipleReturnValues: true
+
+Style/Semicolon:
+ Enabled: true
+ AllowAsExpressionSeparator: true
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 2a7e7b46..00000000
--- a/.travis.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-language: ruby
-rvm:
- - 2.7.0
-before_install:
- - gem update bundler
-install:
- - bundle install
-script:
- - rake spec
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 00000000..f18085e3
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,33 @@
+- **2022-01-18** - `4.1.0` - Async Actions support.
+- **2021-06-14** - `4.0.0` - Bumped required ruby version, bumped dependencies, added `Consents` API support, remove deprecated `URI.escape`.
+- **2020-03-09** - `3.0.0` - Bumped required ruby version, bumped dependencies, added `list` method in Customers module.
+- **2019-06-19** - `2.4.0` - Added support for custom API endpoint, that allows to connect to projects created in specific Voucherify region.
+- **2019-05-09** - `2.3.0` - Added `create_publication` method in Distributions module.
+- **2019-04-23** - `2.2.0` - Loyalties API, Rewards API, Orders API.
+- **2019-02-19** - `2.1.1` - Treat `referral` as optional in custom events. Added new method for custom event tracking.
+- **2019-02-19** - `2.1.0` - Handle `referral` in custom events tracking.
+- **2018-12-27** - `2.0.0` - Business validation rules.
+- **2018-09-05** - `1.6.1` - Request timeout settings
+- **2017-11-16** - `1.6.0` - Expose promotion API, Redemptions and Validations namespace update
+- **2017-11-16** - `1.5.0` - Expose events API
+- **2017-05-07** - `1.4.0` - Segments, Validation rules, API Versioning
+- **2017-03-22** - `1.3.0` - improved error handling
+- **2017-01-04** - `1.2.0` - added [import vouchers](#import-vouchers) method.
+- **2016-12-29** - `1.1.0` - introduced [campaigns api](#campaigns-api) and [products api](#products-api).
+- **2016-12-15** - `1.0.0` - introduced namespaces, unified method names, updated README. Migration from versions 0.x required [migration from version 0.x](#migration-from-0x)
+- **2016-12-02** - `0.8.2` - support gift vouchers in utils, fix price and discount calculations for amount discounts
+- **2016-10-03** - `0.8.1` - publish update
+- **2016-08-02** - `0.8.0` - validate voucher
+- **2016-07-18** - `0.7.0` - voucher udpate
+- **2016-07-05** - `0.6.0` - new utils module
+- **2016-06-16** - `0.5.0` - unified naming convention
+- **2016-06-12** - `0.4.0` - new customer sdk methods
+- **2016-05-24** - `0.3.0` - new publish structure
+- **2016-04-27** - `0.2.0` - rollback redemption
+- **2016-04-13** - `0.1.3` - bugfix in redeem()
+- **2016-04-13** - `0.1.2` - removed dependency to `pry`
+- **2016-04-12** - `0.1.1` - minor gemspec changes
+- **2016-04-12** - `0.1.0` - First version:
+ - Authentication
+ - Voucher information: *retrieve voucher*, *list vouchers*, *retrieve redemptions*, *list redemptions*
+ - Voucher operations: *redeem voucher*, *publish voucher*, *create voucher*, *enable/disable voucher*
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..bf5d779b
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,14 @@
+FROM ruby:3.3
+
+WORKDIR /app
+
+COPY . .
+
+RUN gem build VoucherifySdk.gemspec
+RUN gem install voucherify-5.0.0.gem
+RUN gem install dotenv
+RUN gem install rspec
+
+WORKDIR /app/__tests__
+
+CMD ["rspec", "./spec"]
diff --git a/ENDPOINTS-COVERAGE.md b/ENDPOINTS-COVERAGE.md
new file mode 100644
index 00000000..ce8cbd9d
--- /dev/null
+++ b/ENDPOINTS-COVERAGE.md
@@ -0,0 +1,868 @@
+# Endpoints Coverage
+# Table of Contents
+
+- [Publications](#publications)
+ - [/v1/publications/create](#v1publicationscreate)
+ - [/v1/publications](#v1publications)
+- [Qualifications](#qualifications)
+ - [/v1/qualifications](#v1qualifications)
+- [Validations](#validations)
+ - [/v1/validations](#v1validations)
+ - [/v1/vouchers/{code}/validate](#v1voucherscodevalidate-deprecated)
+ - [/v1/promotions/validation](#v1promotionsvalidation-deprecated)
+ - [/v1/promotions/tiers/{tierId}/validation](#v1promotionstierstieridvalidation-deprecated)
+- [Redemptions](#redemptions)
+ - [/v1/redemptions](#v1redemptions)
+ - [/v1/redemptions/{redemptionId}](#v1redemptionsredemptionid)
+ - [/v1/vouchers/{code}/redemption](#v1voucherscoderedemption)
+ - [/v1/redemptions/{redemptionId}/rollback](#v1redemptionsredemptionidrollback)
+ - [/v1/promotions/tiers/{promotionTierId}/redemption](#v1promotionstierspromotiontieridredemption-deprecated)
+ - [/v1/redemptions/{parentRedemptionId}/rollbacks](#v1redemptionsparentredemptionidrollbacks)
+- [Vouchers](#vouchers)
+ - [/v1/vouchers](#v1vouchers)
+ - [/v1/vouchers/{code}](#v1voucherscode)
+ - [/v1/vouchers/{code}/enable](#v1voucherscodeenable)
+ - [/v1/vouchers/{code}/disable](#v1voucherscodedisable)
+ - [/v1/vouchers/{code}/balance](#v1voucherscodebalance)
+ - [/v1/vouchers/{code}/transactions](#v1voucherscodetransactions)
+ - [/v1/vouchers/{code}/transactions/export](#v1voucherscodetransactionsexport)
+ - [/v1/vouchers/import](#v1vouchersimport)
+ - [/v1/vouchers/importCSV](#v1vouchersimportcsv)
+ - [/v1/vouchers/bulk/async](#v1vouchersbulkasync)
+ - [/v1/vouchers/metadata/async](#v1vouchersmetadataasync)
+ - [/v1/vouchers/{code}/sessions/{sessionKey}](#v1voucherscodesessionssessionkey)
+ - [/v1/vouchers/qualification](#v1vouchersqualification-deprecated)
+- [Campaigns](#campaigns)
+ - [/v1/campaigns](#v1campaigns)
+ - [/v1/campaigns/{campaignId}](#v1campaignscampaignid)
+ - [/v1/campaigns/{campaignId}/vouchers](#v1campaignscampaignidvouchers)
+ - [/v1/campaigns/{campaignId}/vouchers/{code}](#v1campaignscampaignidvoucherscode)
+ - [/v1/campaigns/{campaignId}/import](#v1campaignscampaignidimport)
+ - [/v1/campaigns/{campaignId}/importCSV](#v1campaignscampaignidimportcsv)
+ - [/v1/campaigns/qualification](#v1campaignsqualification-deprecated)
+ - [/v1/campaigns/{campaignId}/enable](#v1campaignscampaignidenable)
+ - [/v1/campaigns/{campaignId}/disable](#v1campaignscampaigniddisable)
+- [Promotions](#promotions)
+ - [/v1/promotions/tiers](#v1promotionstiers)
+ - [/v1/promotions/{campaignId}/tiers](#v1promotionscampaignidtiers)
+ - [/v1/promotions/tiers/{promotionTierId}](#v1promotionstierspromotiontierid)
+ - [/v1/promotions/tiers/{promotionTierId}/enable](#v1promotionstierspromotiontieridenable)
+ - [/v1/promotions/tiers/{promotionTierId}/disable](#v1promotionstierspromotiontieriddisable)
+ - [/v1/promotions/stacks](#v1promotionsstacks)
+ - [/v1/promotions/{campaignId}/stacks](#v1promotionscampaignidstacks)
+ - [/v1/promotions/{campaignId}/stacks/{stackId}](#v1promotionscampaignidstacksstackid)
+- [Rewards](#rewards)
+ - [/v1/rewards](#v1rewards)
+ - [/v1/rewards/{rewardId}](#v1rewardsrewardid)
+ - [/v1/rewards/{rewardId}/assignments](#v1rewardsrewardidassignments)
+ - [/v1/rewards/{rewardId}/assignments/{assignmentId}](#v1rewardsrewardidassignmentsassignmentid)
+- [Loyalties](#loyalties)
+ - [/v1/loyalties](#v1loyalties)
+ - [/v1/loyalties/{campaignId}](#v1loyaltiescampaignid)
+ - [/v1/loyalties/{campaignId}/members](#v1loyaltiescampaignidmembers)
+ - [/v1/loyalties/{campaignId}/members/{memberId}](#v1loyaltiescampaignidmembersmemberid)
+ - [/v1/loyalties/members/{memberId}](#v1loyaltiesmembersmemberid)
+ - [/v1/loyalties/{campaignId}/members/{memberId}/activities](#v1loyaltiescampaignidmembersmemberidactivities)
+ - [/v1/loyalties/members/{memberId}/activities](#v1loyaltiesmembersmemberidactivities)
+ - [/v1/loyalties/{campaignId}/members/{memberId}/balance](#v1loyaltiescampaignidmembersmemberidbalance)
+ - [/v1/loyalties/members/{memberId}/balance](#v1loyaltiesmembersmemberidbalance)
+ - [/v1/loyalties/{campaignId}/members/{memberId}/transfers](#v1loyaltiescampaignidmembersmemberidtransfers)
+ - [/v1/loyalties/{campaignId}/members/{memberId}/transactions](#v1loyaltiescampaignidmembersmemberidtransactions)
+ - [/v1/loyalties/members/{memberId}/transactions](#v1loyaltiesmembersmemberidtransactions)
+ - [/v1/loyalties/members/{memberId}/transactions/export](#v1loyaltiesmembersmemberidtransactionsexport)
+ - [/v1/loyalties/{campaignId}/members/{memberId}/transactions/export](#v1loyaltiescampaignidmembersmemberidtransactionsexport)
+ - [/v1/loyalties/{campaignId}/members/{memberId}/points-expiration](#v1loyaltiescampaignidmembersmemberidpoints-expiration)
+ - [/v1/loyalties/{campaignId}/points-expiration/export](#v1loyaltiescampaignidpoints-expirationexport)
+ - [/v1/loyalties/{campaignId}/earning-rules](#v1loyaltiescampaignidearning-rules)
+ - [/v1/loyalties/{campaignId}/earning-rules/{earningRuleId}](#v1loyaltiescampaignidearning-rulesearningruleid)
+ - [/v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable](#v1loyaltiescampaignidearning-rulesearningruleidenable)
+ - [/v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable](#v1loyaltiescampaignidearning-rulesearningruleiddisable)
+ - [/v1/loyalties/members/{memberId}/rewards](#v1loyaltiesmembersmemberidrewards)
+ - [/v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward](#v1loyaltiescampaignidreward-assignmentsassignmentidreward)
+ - [/v1/loyalties/{campaignId}/reward-assignments](#v1loyaltiescampaignidreward-assignments)
+ - [/v1/loyalties/{campaignId}/rewards](#v1loyaltiescampaignidrewards)
+ - [/v1/loyalties/{campaignId}/reward-assignments/{assignmentId}](#v1loyaltiescampaignidreward-assignmentsassignmentid)
+ - [/v1/loyalties/{campaignId}/rewards/{assignmentId}](#v1loyaltiescampaignidrewardsassignmentid)
+ - [/v1/loyalties/{campaignId}/members/{memberId}/redemption](#v1loyaltiescampaignidmembersmemberidredemption)
+ - [/v1/loyalties/members/{memberId}/redemption](#v1loyaltiesmembersmemberidredemption)
+ - [/v1/loyalties/{campaignId}/tiers](#v1loyaltiescampaignidtiers)
+ - [/v1/loyalties/{campaignId}/tiers/{loyaltyTierId}](#v1loyaltiescampaignidtiersloyaltytierid)
+ - [/v1/loyalties/members/{memberId}/tiers](#v1loyaltiesmembersmemberidtiers)
+ - [/v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules](#v1loyaltiescampaignidtiersloyaltytieridearning-rules)
+ - [/v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards](#v1loyaltiescampaignidtiersloyaltytieridrewards)
+- [Customers](#customers)
+ - [/v1/customers](#v1customers)
+ - [/v1/customers/{customerId}](#v1customerscustomerid)
+ - [/v1/customers/{customerId}/permanent-deletion](#v1customerscustomeridpermanent-deletion)
+ - [/v1/customers/importCSV](#v1customersimportcsv)
+ - [/v1/customers/bulk/async](#v1customersbulkasync)
+ - [/v1/customers/metadata/async](#v1customersmetadataasync)
+ - [/v1/customers/{customerId}/consents](#v1customerscustomeridconsents)
+ - [/v1/customers/{customerId}/activities](#v1customerscustomeridactivities)
+ - [/v1/customers/{customerId}/segments](#v1customerscustomeridsegments)
+- [Orders](#orders)
+ - [/v1/orders](#v1orders)
+ - [/v1/orders/{orderId}](#v1ordersorderid)
+ - [/v1/orders/import](#v1ordersimport)
+ - [/v1/orders/export](#v1ordersexport)
+- [Products](#products)
+ - [/v1/products](#v1products)
+ - [/v1/products/{productId}](#v1productsproductid)
+ - [/v1/products/bulk/async](#v1productsbulkasync)
+ - [/v1/products/metadata/async](#v1productsmetadataasync)
+ - [/v1/skus/{skuId}](#v1skusskuid)
+ - [/v1/products/{productId}/skus](#v1productsproductidskus)
+ - [/v1/products/{productId}/skus/{skuId}](#v1productsproductidskusskuid)
+ - [/v1/products/importCSV](#v1productsimportcsv)
+ - [/v1/skus/importCSV](#v1skusimportcsv)
+- [Product Collections](#product collections)
+ - [/v1/product-collections](#v1product-collections)
+ - [/v1/product-collections/{productCollectionId}](#v1product-collectionsproductcollectionid)
+ - [/v1/product-collections/{productCollectionId}/products](#v1product-collectionsproductcollectionidproducts)
+- [Validation Rules](#validation rules)
+ - [/v1/validation-rules](#v1validation-rules)
+ - [/v1/validation-rules/{validationRuleId}](#v1validation-rulesvalidationruleid)
+ - [/v1/validation-rules-assignments](#v1validation-rules-assignments)
+ - [/v1/validation-rules/{validationRuleId}/assignments](#v1validation-rulesvalidationruleidassignments)
+ - [/v1/validation-rules/{validationRuleId}/assignments/{assignmentId}](#v1validation-rulesvalidationruleidassignmentsassignmentid)
+- [Segments](#segments)
+ - [/v1/segments/{segmentId}](#v1segmentssegmentid)
+ - [/v1/segments](#v1segments)
+- [Events](#events)
+ - [/v1/events](#v1events)
+- [Consents](#consents)
+ - [/v1/consents](#v1consents)
+- [Async Actions](#async actions)
+ - [/v1/async-actions](#v1async-actions)
+ - [/v1/async-actions/{asyncActionId}](#v1async-actionsasyncactionid)
+- [Exports](#exports)
+ - [/v1/exports](#v1exports)
+ - [/v1/exports/{exportId}](#v1exportsexportid)
+ - [/v1/exports/{export_Id}](#v1exportsexport_id)
+- [Categories](#categories)
+ - [/v1/categories](#v1categories)
+ - [/v1/categories/{categoryId}](#v1categoriescategoryid)
+- [Metadata Schemas](#metadata schemas)
+ - [/v1/metadata-schemas](#v1metadata-schemas)
+ - [/v1/metadata-schemas/{resource}](#v1metadata-schemasresource)
+- [Locations](#locations)
+ - [/v1/locations](#v1locations)
+ - [/v1/locations/{locationId}](#v1locationslocationid)
+- [Client-side](#client-side)
+ - [/client/v1/qualifications](#clientv1qualifications)
+ - [/client/v1/promotions/tiers](#clientv1promotionstiers)
+ - [/client/v1/redemptions](#clientv1redemptions)
+ - [/client/v1/validations](#clientv1validations)
+ - [/client/v1/customers/{customerId}/consents](#clientv1customerscustomeridconsents)
+ - [/client/v1/events](#clientv1events)
+ - [/client/v1/consents](#clientv1consents)
+ - [/client/v1/validate](#clientv1validate-deprecated)
+ - [/client/v1/redeem](#clientv1redeem-deprecated)
+# Endpoints
+
+## Publications
+### /v1/publications/create
+#### Create Publication (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### /v1/publications
+#### List Publications (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/publications_list_response_body.rb) ✅
+#### Create Publication (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/publications_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/publications_create_response_body.rb) ✅
+## Qualifications
+### /v1/qualifications
+#### Check Eligibility (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/qualifications_check_eligibility_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/qualifications_check_eligibility_response_body.rb) ✅
+## Validations
+### /v1/validations
+#### Validate Stackable Discounts (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/validations_validate_response_body.rb) ✅
+- **ResponseSupported:** ❌
+### ~~❗/v1/vouchers/{code}/validate [Deprecated]❗~~
+#### ~~❗Validate Voucher [Deprecated] (post)❗~~
+### ~~❗/v1/promotions/validation [Deprecated]❗~~
+#### ~~❗Validate Promotions [Deprecated] (post)❗~~
+### ~~❗/v1/promotions/tiers/{tierId}/validation [Deprecated]❗~~
+#### ~~❗Validate Promotion Tier [Deprecated] (post)❗~~
+## Redemptions
+### /v1/redemptions
+#### List Redemptions (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/redemptions_list_response_body.rb) ✅
+#### Redeem Stackable Discounts (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/redemptions_redeem_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/redemptions_redeem_response_body.rb) ✅
+### /v1/redemptions/{redemptionId}
+#### Get Redemption (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/redemptions_get_response_body.rb) ✅
+### /v1/vouchers/{code}/redemption
+#### Get Voucher's Redemptions (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/vouchers_redemption_get_response_body.rb) ✅
+#### ~~❗Redeem Voucher [Deprecated] (post)❗~~
+### /v1/redemptions/{redemptionId}/rollback
+#### Rollback Redemption (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/redemptions_rollback_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/redemptions_rollback_create_response_body.rb) ✅
+### ~~❗/v1/promotions/tiers/{promotionTierId}/redemption [Deprecated]❗~~
+#### ~~❗Redeem Promotion [Deprecated] (post)❗~~
+### /v1/redemptions/{parentRedemptionId}/rollbacks
+#### Rollback Stackable Redemptions (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/redemptions_rollbacks_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/redemptions_rollbacks_create_response_body.rb) ✅
+## Vouchers
+### /v1/vouchers
+#### List Vouchers (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+#### Generate Random Code (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/vouchers/{code}
+#### Get Voucher (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/vouchers_get_response_body.rb) ✅
+#### Update Voucher (put)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+#### Delete Voucher (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+#### Create Voucher (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/vouchers/{code}/enable
+#### Enable Voucher (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/vouchers_enable_response_body.rb) ✅
+### /v1/vouchers/{code}/disable
+#### Disable Voucher (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/vouchers_disable_response_body.rb) ✅
+### /v1/vouchers/{code}/balance
+#### Add or Remove Voucher Balance (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/vouchers_balance_update_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/vouchers_balance_update_response_body.rb) ✅
+### /v1/vouchers/{code}/transactions
+#### List Voucher Transactions (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/vouchers_transactions_list_response_body.rb) ✅
+### /v1/vouchers/{code}/transactions/export
+#### Export Voucher Transactions (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/vouchers_transactions_export_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/vouchers_transactions_export_create_response_body.rb) ✅
+### /v1/vouchers/import
+#### Import Vouchers (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/vouchers/importCSV
+#### Import Vouchers using CSV (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/vouchers_import_csv_create_response_body.rb) ✅
+### /v1/vouchers/bulk/async
+#### Update Vouchers in bulk (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/vouchers/metadata/async
+#### Update Vouchers' metadata in bulk (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/vouchers/{code}/sessions/{sessionKey}
+#### Release Validation Session (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+### ~~❗/v1/vouchers/qualification [Deprecated]❗~~
+#### ~~❗Examine Qualification [Deprecated] (post)❗~~
+## Campaigns
+### /v1/campaigns
+#### Create Campaign (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/campaigns_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/campaigns_create_response_body.rb) ✅
+#### List Campaigns (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/campaigns_list_response_body.rb) ✅
+### /v1/campaigns/{campaignId}
+#### Get Campaign (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/campaigns_get_response_body.rb) ✅
+#### Update Campaign (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/campaigns_update_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/campaigns_update_response_body.rb) ✅
+#### Delete Campaign (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/campaigns_delete_response_body.rb) ✅
+### /v1/campaigns/{campaignId}/vouchers
+#### Add Vouchers to Campaign (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/campaigns_vouchers_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/campaigns_vouchers_create_response_body.rb) ✅
+### /v1/campaigns/{campaignId}/vouchers/{code}
+#### Add Voucher with Specific Code to Campaign (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/campaigns_vouchers_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/campaigns_vouchers_create_response_body.rb) ✅
+### /v1/campaigns/{campaignId}/import
+#### Import Vouchers to Campaign (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/campaigns_import_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/campaigns_import_create_response_body.rb) ✅
+### /v1/campaigns/{campaignId}/importCSV
+#### Import Vouchers to Campaign by CSV (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/campaigns_import_csv_create_response_body.rb) ✅
+### ~~❗/v1/campaigns/qualification [Deprecated]❗~~
+#### ~~❗Examine Qualification [Deprecated] (post)❗~~
+### /v1/campaigns/{campaignId}/enable
+#### Enable Campaign (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/campaigns_enable_response_body.rb) ✅
+### /v1/campaigns/{campaignId}/disable
+#### Disable Campaign (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/campaigns_disable_response_body.rb) ✅
+## Promotions
+### /v1/promotions/tiers
+#### List Promotion Tiers (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### /v1/promotions/{campaignId}/tiers
+#### List Promotion Tiers from Campaign (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/promotions_tiers_list_response_body.rb) ✅
+#### Add Promotion Tier to Campaign (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/promotions/tiers/{promotionTierId}
+#### Get Promotion Tier (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/promotions_tiers_get_response_body.rb) ✅
+#### Update Promotion Tier (put)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+#### Delete Promotion Tier (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+### /v1/promotions/tiers/{promotionTierId}/enable
+#### Enable Promotion Tier (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/promotions_tiers_enable_response_body.rb) ✅
+### /v1/promotions/tiers/{promotionTierId}/disable
+#### Disable Promotion Tier (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/promotions_tiers_disable_response_body.rb) ✅
+### /v1/promotions/stacks
+#### List Promotion Stacks (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/promotions_stacks_list_response_body.rb) ✅
+### /v1/promotions/{campaignId}/stacks
+#### List Promotion Stacks in Campaign (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/promotions_stacks_list_response_body.rb) ✅
+#### Create Promotion Stack (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/promotions_stacks_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/promotions_stacks_create_response_body.rb) ✅
+### /v1/promotions/{campaignId}/stacks/{stackId}
+#### Get Promotion Stack (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/promotions_stacks_get_response_body.rb) ✅
+#### Update Promotion Stack (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/promotions_stacks_update_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/promotions_stacks_update_response_body.rb) ✅
+#### Delete Promotion Stack (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+## Rewards
+### /v1/rewards
+#### List Rewards (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+#### Create Reward (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/rewards/{rewardId}
+#### Get Reward (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+#### Update Reward (put)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+#### Delete Reward (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+### /v1/rewards/{rewardId}/assignments
+#### List Reward Assignments (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/rewards_assignments_list_response_body.rb) ✅
+#### Create Reward Assignment (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/rewards_assignments_create_response_body.rb) ✅
+- **ResponseSupported:** ❌
+### /v1/rewards/{rewardId}/assignments/{assignmentId}
+#### Update Reward Assignment (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/rewards_assignments_update_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/rewards_assignments_update_response_body.rb) ✅
+#### Delete Reward Assignment (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+#### Get Reward Assignment (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/rewards_assignments_get_response_body.rb) ✅
+## Loyalties
+### /v1/loyalties
+#### List Loyalty Campaigns (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+#### Create Loyalty Campaign (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/loyalties/{campaignId}
+#### Get Loyalty Campaign (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+#### Update Loyalty Campaign (put)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+#### Delete Loyalty Campaign (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_delete_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/members
+#### List Members (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+#### Add Member (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/loyalties/{campaignId}/members/{memberId}
+#### Get Member (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### /v1/loyalties/members/{memberId}
+#### Get Member (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### /v1/loyalties/{campaignId}/members/{memberId}/activities
+#### Get Member Activities (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### /v1/loyalties/members/{memberId}/activities
+#### Get Member Activities (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### /v1/loyalties/{campaignId}/members/{memberId}/balance
+#### Add or Remove Loyalty Card Balance (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_balance_update_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_balance_update_response_body.rb) ✅
+### /v1/loyalties/members/{memberId}/balance
+#### Add or Remove Loyalty Card Balance (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_balance_update_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_balance_update_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/members/{memberId}/transfers
+#### Transfer Loyalty Points (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_transfers_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_transfers_create_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/members/{memberId}/transactions
+#### List Loyalty Card Transactions (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_transactions_list_response_body.rb) ✅
+### /v1/loyalties/members/{memberId}/transactions
+#### List Loyalty Card Transactions (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_transactions_list_response_body.rb) ✅
+### /v1/loyalties/members/{memberId}/transactions/export
+#### Export Loyalty Card Transactions (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_transactions_export_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_transactions_export_create_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/members/{memberId}/transactions/export
+#### Export Loyalty Card Transactions (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_transactions_export_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_transactions_export_create_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/members/{memberId}/points-expiration
+#### Get Points Expiration (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_points_expiration_list_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/points-expiration/export
+#### Create Points Expiration Export (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/loyalties/{campaignId}/earning-rules
+#### List Earning Rules (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+#### Create Earning Rule (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** *Not applicable*
+### /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}
+#### Get Earning Rule (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_earning_rules_get_response_body.rb) ✅
+#### Update Earning Rule (put)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+#### Delete Earning Rule (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+### /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable
+#### Enable Earning Rule (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_earning_rules_enable_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable
+#### Disable Earning Rule (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_earning_rules_disable_response_body.rb) ✅
+### /v1/loyalties/members/{memberId}/rewards
+#### List Member Rewards (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_rewards_list_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward
+#### Get Reward Details (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_reward_assignments_reward_get_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/reward-assignments
+#### List Reward Assignments (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### /v1/loyalties/{campaignId}/rewards
+#### List Reward Assignments (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+#### Create Reward Assignment (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}
+#### Get Reward Assignment (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_reward_assignments_get_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/rewards/{assignmentId}
+#### Get Reward Assignment (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_rewards_get_response_body.rb) ✅
+#### Update Reward Assignment (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/4_obj_reward_assignment_object.rb) ✅
+- **ResponseSupported:** ❌
+#### Delete Reward Assignment (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+### /v1/loyalties/{campaignId}/members/{memberId}/redemption
+#### Redeem Reward (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_redemption_redeem_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_redemption_redeem_response_body.rb) ✅
+### /v1/loyalties/members/{memberId}/redemption
+#### Redeem Reward (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_redemption_redeem_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_redemption_redeem_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/tiers
+#### List Loyalty Tiers (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_tiers_list_response_body.rb) ✅
+#### Create loyalty tiers (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/loyalties_tiers_create_in_bulk_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_tiers_create_in_bulk_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}
+#### Get Loyalty Tier (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_tiers_get_response_body.rb) ✅
+### /v1/loyalties/members/{memberId}/tiers
+#### List Member's Loyalty Tiers (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_members_tiers_list_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules
+#### List Loyalty Tier Earning Rules (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_tiers_earning_rules_list_response_body.rb) ✅
+### /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards
+#### List Loyalty Tier Rewards (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/loyalties_tiers_rewards_list_response_body.rb) ✅
+## Customers
+### /v1/customers
+#### List Customers (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/customers_list_response_body.rb) ✅
+#### Create Customer (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/customers_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/customers_create_response_body.rb) ✅
+### /v1/customers/{customerId}
+#### Get Customer (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/customers_get_response_body.rb) ✅
+#### Delete Customer (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+#### Update Customer (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/customers_update_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/customers_update_response_body.rb) ✅
+### /v1/customers/{customerId}/permanent-deletion
+#### Delete Customer Permanently (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/customers_permanent_deletion_create_response_body.rb) ✅
+### /v1/customers/importCSV
+#### Import and Update Customers using CSV (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/customers_import_csv_create_response_body.rb) ✅
+### /v1/customers/bulk/async
+#### Update Customers in bulk (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/customers_update_in_bulk_response_body.rb) ✅
+### /v1/customers/metadata/async
+#### Update Customers' Metadata in bulk (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/customers_metadata_update_in_bulk_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/customers_metadata_update_in_bulk_response_body.rb) ✅
+### /v1/customers/{customerId}/consents
+#### Update Customer's consents (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/.rb) ✅
+- **ResponseSupported:** *Not applicable*
+### /v1/customers/{customerId}/activities
+#### List Customer Activities (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/customers_activities_list_response_body.rb) ✅
+### /v1/customers/{customerId}/segments
+#### List Customer's Segments (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/customers_segments_list_response_body.rb) ✅
+## Orders
+### /v1/orders
+#### List Orders (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/orders_list_response_body.rb) ✅
+#### Create Order (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/orders_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/orders_create_response_body.rb) ✅
+### /v1/orders/{orderId}
+#### Get Order (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/orders_get_response_body.rb) ✅
+#### Update Order (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/orders_update_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/orders_update_response_body.rb) ✅
+### /v1/orders/import
+#### Import Orders (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/orders_import_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/orders_import_create_response_body.rb) ✅
+### /v1/orders/export
+#### Create Orders Export (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/orders_export_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/orders_export_create_response_body.rb) ✅
+## Products
+### /v1/products
+#### List Products (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/products_list_response_body.rb) ✅
+#### Create Product (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/products_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/products_create_response_body.rb) ✅
+### /v1/products/{productId}
+#### Get Product (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/products_get_response_body.rb) ✅
+#### Update Product (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/products_update_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/products_update_response_body.rb) ✅
+#### Delete Product (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+### /v1/products/bulk/async
+#### Update Products in bulk (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/products_update_in_bulk_response_body.rb) ✅
+### /v1/products/metadata/async
+#### Update Products' Metadata in bulk (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/products_metadata_update_in_bulk_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/products_metadata_update_in_bulk_response_body.rb) ✅
+### /v1/skus/{skuId}
+#### Get SKU (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/skus_get_response_body.rb) ✅
+### /v1/products/{productId}/skus
+#### List SKUs in Product (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/products_skus_list_response_body.rb) ✅
+#### Create SKU (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/products_skus_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/products_skus_create_response_body.rb) ✅
+### /v1/products/{productId}/skus/{skuId}
+#### Update SKU (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/products_skus_update_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/products_skus_update_response_body.rb) ✅
+#### Delete SKU (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+### /v1/products/importCSV
+#### Import Products using CSV (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/products_import_csv_create_response_body.rb) ✅
+### /v1/skus/importCSV
+#### Import SKUs using CSV (post)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/skus_import_csv_create_response_body.rb) ✅
+## Product Collections
+### /v1/product-collections
+#### List Product Collections (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/product_collections_list_response_body.rb) ✅
+#### Create Product Collection (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/product_collections_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/product_collections_create_response_body.rb) ✅
+### /v1/product-collections/{productCollectionId}
+#### Get Product Collection (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/product_collections_get_response_body.rb) ✅
+#### Delete Product Collection (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+### /v1/product-collections/{productCollectionId}/products
+#### List Products in Collection (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/product_collections_products_list_response_body.rb) ✅
+## Validation Rules
+### /v1/validation-rules
+#### List Validation Rules (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/validation_rules_list_response_body.rb) ✅
+#### Create Validation Rules (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/validation_rules_create_response_body.rb) ✅
+- **ResponseSupported:** ❌
+### /v1/validation-rules/{validationRuleId}
+#### Get Validation Rule (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/validation_rules_get_response_body.rb) ✅
+#### Update Validation Rule (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/validation_rules_update_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/validation_rules_update_response_body.rb) ✅
+#### Delete Validation Rule (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+### /v1/validation-rules-assignments
+#### List Validation Rules' Assignment(s) (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/validation_rules_assignments_list_response_body.rb) ✅
+### /v1/validation-rules/{validationRuleId}/assignments
+#### List Validation Rule Assignments (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/validation_rules_assignments_list_response_body.rb) ✅
+#### Create Validation Rules Assignments (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+### /v1/validation-rules/{validationRuleId}/assignments/{assignmentId}
+#### Delete Validation Rule Assignment (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+## Segments
+### /v1/segments/{segmentId}
+#### Get Segment (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+#### Delete Segment (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+### /v1/segments
+#### Create Segment (post)
+- **RequestSupported:** ❌
+- **ResponseSupported:** ❌
+## Events
+### /v1/events
+#### Track Custom Event (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/events_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/events_create_response_body.rb) ✅
+## Consents
+### /v1/consents
+#### List Consents (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+## Async Actions
+### /v1/async-actions
+#### List Async Actions (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### /v1/async-actions/{asyncActionId}
+#### Get Async Action (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+## Exports
+### /v1/exports
+#### Create Export (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/exports_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/exports_create_response_body.rb) ✅
+#### List Exports (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/exports_list_response_body.rb) ✅
+### /v1/exports/{exportId}
+#### Get Export (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/exports_get_response_body.rb) ✅
+#### Delete Export (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+### /v1/exports/{export_Id}
+#### Download Export (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+## Categories
+### /v1/categories
+#### List Categories (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/categories_list_response_body.rb) ✅
+#### Create Category (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/categories_create_response_body.rb) ✅
+- **ResponseSupported:** ❌
+### /v1/categories/{categoryId}
+#### Get Category (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/categories_get_response_body.rb) ✅
+#### Delete Category (delete)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** *Not applicable*
+#### Update Category (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/categories_update_response_body.rb) ✅
+- **ResponseSupported:** ❌
+## Metadata Schemas
+### /v1/metadata-schemas
+#### List Metadata Schemas (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### /v1/metadata-schemas/{resource}
+#### Get Metadata Schema (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+## Locations
+### /v1/locations
+#### List Locations (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### /v1/locations/{locationId}
+#### Get Location (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+## Client-side
+### /client/v1/qualifications
+#### Check Eligibility (client-side) (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/client_qualifications_check_eligibility_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/client_qualifications_check_eligibility_response_body.rb) ✅
+### /client/v1/promotions/tiers
+#### List Promotion Tiers (client-side) (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### /client/v1/redemptions
+#### Redeem Stackable Discounts (client-side) (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/client_redemptions_redeem_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/client_redemptions_redeem_response_body.rb) ✅
+### /client/v1/validations
+#### Validate Stackable Discounts (client-side) (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/client_validations_validate_response_body.rb) ✅
+- **ResponseSupported:** ❌
+### /client/v1/customers/{customerId}/consents
+#### Update Customer's consents (client-side) (put)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/.rb) ✅
+- **ResponseSupported:** *Not applicable*
+### /client/v1/events
+#### Track Custom Event (client-side) (post)
+- **RequestSupported:** [link](./lib/VoucherifySDK/models/client_events_create_response_body.rb) ✅
+- **ResponseSupported:** [link](./lib/VoucherifySDK/models/client_events_create_response_body.rb) ✅
+### /client/v1/consents
+#### List Consents (client-side) (get)
+- **RequestSupported:** *Not applicable*
+- **ResponseSupported:** ❌
+### ~~❗/client/v1/validate [Deprecated]❗~~
+#### ~~❗Validate Voucher (client-side) [Deprecated] (get)❗~~
+### ~~❗/client/v1/redeem [Deprecated]❗~~
+#### ~~❗Redeem Voucher (client-side) [Deprecated] (post)❗~~
diff --git a/EXAMPLES.md b/EXAMPLES.md
new file mode 100644
index 00000000..e5943882
--- /dev/null
+++ b/EXAMPLES.md
@@ -0,0 +1,112 @@
+# How to Manage Code Efficiently
+
+There are two possible ways to define a model.
+You can use the standard class-based initialization, where you create a new object for each nesting level.
+
+```ruby
+campaign = campaigns_api_instance.create_campaign({
+ campaigns_create_request_body: VoucherifySdk::CampaignsCreateDiscountCouponsCampaign.new({
+ campaign_type: "DISCOUNT_COUPONS",
+ name: generate_random_string(),
+ type: "AUTO_UPDATE",
+ voucher: VoucherifySdk::DiscountCouponsCampaignVoucher.new({
+ discount: VoucherifySdk::DiscountAmount.new({
+ type: "AMOUNT",
+ amount_off: 1000
+ })
+ }),
+ validation_rules: [validation_rule_id]
+ })
+})
+```
+
+Another, simpler approach is to create only **necessary** objects. In this scenario, the model is created using JSON-like syntax..
+
+```ruby
+campaign = campaigns_api_instance.create_campaign({
+ campaigns_create_request_body: VoucherifySdk::CampaignsCreateDiscountCouponsCampaign.new({
+ campaign_type: "DISCOUNT_COUPONS",
+ name: generate_random_string(),
+ type: "AUTO_UPDATE",
+ voucher: {
+ discount: {
+ type: "AMOUNT",
+ amount_off: 1000
+ }
+ },
+ validation_rules: [validation_rule_id]
+ })
+})
+```
+
+Some objects are **necessary** because they represent a union of a few similar types, and you need to determine which type you're using.
+
+E.g. model [**CampaignsCreateRequestBody**](./lib/VoucherifySdk/models/campaigns_create_request_body.rb) consists of types like:
+- CampaignsCreateDiscountCouponsCampaign
+- CampaignsCreateGiftCampaign
+- CampaignsCreateGiveawayCampaign
+- CampaignsCreateLoyaltyCampaign
+- CampaignsCreatePromotionCampaign
+- CampaignsCreateReferralCampaign
+
+So, in our example, we're declaring an object for it, instead of passing it explicitly. For example:
+```ruby
+campaigns_create_request_body: VoucherifySdk::CampaignsCreateDiscountCouponsCampaign.new(...)
+```
+
+##### 💡 More useful examples could be found in our [tests](./__tests__)
+
+## 🔄 Alternative ways for installing a gem
+
+To build the Ruby code into a gem:
+
+```shell
+gem build VoucherifySdk.gemspec
+```
+
+Then either install the gem locally:
+
+```shell
+gem install ./VoucherifySdk-1.0.0.gem
+```
+
+(for development, run `gem install --dev ./VoucherifySdk-1.0.0.gem` to install the development dependencies)
+
+Add this to the Gemfile:
+
+```shell
+gem 'VoucherifySdk', '~> 1.0.0'
+```
+
+Then install dependencies with bundler
+
+```shell
+bundle install
+```
+
+Finally, exec script with bundler:
+
+```shell
+bundle exec ruby example.rb
+```
+
+### 📦 Install from Git
+
+You could use the GitHub repository (https://github.com/voucherifyio/voucherify-js-sdk) for installing SDK gem by adding it to the `Gemfile`
+
+```shell
+gem 'VoucherifySdk', :git => 'https://github.com/voucherifyio/voucherify-js-sdk.git', branch: 'main'
+```
+
+Then install dependencies with bundler
+
+```shell
+bundle install
+```
+
+Finally, exec script with bundler:
+
+```shell
+bundle exec ruby example.rb
+```
+
diff --git a/Gemfile b/Gemfile
index dc879f7c..c2e3127c 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,4 +1,9 @@
source 'https://rubygems.org'
-# Specify your gem's dependencies in voucherify.gemspec
gemspec
+
+group :development, :test do
+ gem 'rake', '~> 13.0.1'
+ gem 'pry-byebug'
+ gem 'rubocop', '~> 0.66.0'
+end
diff --git a/LICENSE b/LICENSE
index dc51aed2..83bb84bb 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
-The MIT License (MIT)
+MIT License
-Copyright (c) 2016 rspective P.Rychlik sp.j.
+Copyright (c) 2024 voucherify.io
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 8ae72db7..b9d09439 100644
--- a/README.md
+++ b/README.md
@@ -1,925 +1,949 @@
-# This repository is no longer actively maintained, we have a new SDK for Ruby at [voucherifyio/sdk-ruby-openapi-based](https://github.com/voucherifyio/sdk-ruby-openapi-based).
-
-
-
-
-
-Official Voucherify SDK for Ruby
-
-
-
-
-
-
-
-
-
-
-Migration from 0.x
-|
-Setup
-|
-Error handling
-|
-Development
-|
-Contributing
-|
-Changelog
-
-
-
-API:
-Vouchers
-|
-Campaigns
-|
-Distributions
-|
-Validations
-|
-Redemptions
-|
-Customers
-|
-Products
-|
-Validation Rules
-|
-Segments
-|
-Promotions
-|
-Events
-|
-Orders
-|
-Loyalties
-|
-Rewards
-|
-Utils
-
-
----
-
-## Setup
-
-### Voucherify gem starting from 3.x requires ruby version >= 2.2
-
-Add this line to your application's Gemfile:
+![Voucherify Ruby SDK](./voucherify-ruby-sdk.png)
-```ruby
-gem 'voucherify'
-```
-
-And then execute:
-
- $ bundle
+## Official [Voucherify](https://voucherify.io?utm_source=github&utm_medium=sdk&utm_campaign=acq) SDK for Ruby
-Or install it yourself as:
+[![Gem Version](https://img.shields.io/gem/v/voucherify.svg)](https://rubygems.org/gems/voucherify)
+[![Gem Downloads](https://img.shields.io/gem/dt/voucherify.svg)](https://rubygems.org/gems/voucherify)
+[![License](https://img.shields.io/github/license/voucherifyio/sdk-ruby-openapi-based.svg)](https://opensource.org/licenses/MIT)
+[![GitHub issues](https://img.shields.io/github/issues/voucherifyio/sdk-ruby-openapi-based.svg)](https://github.com/voucherifyio/sdk-ruby-openapi-based/issues)
- $ gem install voucherify
+Voucherify empowers marketers and developers with flexible building blocks to come up with, implement, and track targeted promotional campaigns.
-[Log-in](https://app.voucherify.io/?utm_source=github&utm_medium=sdk&utm_campaign=acq#/login) to Voucherify web interface and obtain your Application Keys from [Configuration](https://app.voucherify.io/?utm_source=github&utm_medium=sdk&utm_campaign=acq#/app/configuration):
+Learn more about Voucherify by visiting [our site](https://www.voucherify.io).
-```ruby
-require 'voucherify'
-
-voucherify = Voucherify::Client.new({
- :applicationId => 'YOUR-APPLICATION-ID',
- :clientSecretKey => 'YOUR-CLIENT-SECRET-KEY'
-})
-```
-
-You can also specify which API version you want to use:
-```ruby
-voucherify = Voucherify::Client.new({
- :applicationId => 'YOUR-APPLICATION-ID',
- :clientSecretKey => 'YOUR-CLIENT-SECRET-KEY',
- :apiVersion => 'v2017-04-05'
-})
-```
-
-and timeout settings:
-```ruby
-voucherify = Voucherify::Client.new({
- :applicationId => 'YOUR-APPLICATION-ID',
- :clientSecretKey => 'YOUR-CLIENT-SECRET-KEY',
- :apiVersion => 'v2017-04-05',
- :timeout => 10 // in seconds
-})
-```
+This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) based on our [Documentation](https://docs.voucherify.io/docs/introduction) with v2018-08-01 version.
-### API Endpoint
+The legacy version of Ruby SDK could be found [here](https://github.com/voucherifyio/voucherify-ruby-sdk)
-Optionally, you can add `apiUrl` to the client options if you want to use Voucherify running in a specific region.
+## 📝 Documentation
-```ruby
-voucherify = Voucherify::Client.new({
- :applicationId => 'YOUR-APPLICATION-ID',
- :clientSecretKey => 'YOUR-CLIENT-SECRET-KEY',
- :apiUrl => 'https://.api.voucherify.io'
-})
-```
+You will find detailed description and example responses at our [official documentation](https://docs.voucherify.io/reference). Most method headers point to more detailed descriptions of arguments you can use.
-## API
-
-This SDK is fully consistent with restful API Voucherify provides.
-Detailed descriptions and example responses you will find at [official docs](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq).
-Method headers point to more detailed params description you can use.
-
-### Vouchers API
-Methods are provided within `voucherify.vouchers.*` namespace.
-- [Create Voucher](#create-voucher)
-- [Get Voucher](#get-voucher)
-- [Update Voucher](#update-voucher)
-- [Delete Voucher](#delete-voucher)
-- [List Vouchers](#list-vouchers)
-- [Enable Voucher](#enable-voucher)
-- [Disable Voucher](#disable-voucher)
-- [Import Vouchers](#import-vouchers)
-- [Add Gift Voucher Balance](#add-gift-voucher-balance)
-
-#### [Create Voucher]
-```ruby
-voucherify.vouchers.create(code, options)
-```
-Check [voucher object](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-voucher-object).
-#### [Get Voucher]
-```ruby
-voucherify.vouchers.get(code)
-```
-#### [Update Voucher]
-```ruby
-voucherify.vouchers.update(voucher)
-```
-#### [Delete Voucher]
-```ruby
-voucherify.vouchers.delete(code, [params])
-```
-#### [List Vouchers]
-```ruby
-voucherify.vouchers.list
-```
-#### [Enable Voucher]
-```ruby
-voucherify.vouchers.enable(code)
-```
-#### [Disable Voucher]
-```ruby
-voucherify.vouchers.disable(code)
-```
-#### [Import Vouchers]
-```ruby
-voucherify.vouchers.import(vouchers)
-```
-#### [Add Gift Voucher Balance]
-```ruby
-voucherify.vouchers().add_balance(code, balance);
-```
+📚 Want to learn more? Visit our [official site](https://www.voucherify.io) or our [Success Portal](https://success.voucherify.io).
----
+👽 Having troubles? Check our [Help center](https://support.voucherify.io/).
-### Campaigns API
-Methods are provided within `voucherify.campaigns.*` namespace.
-- [Create Campaign](#create-campaign)
-- [Get Campaign](#get-campaign)
-- [Add Voucher to Campaign](#add-voucher-to-campaign)
-- [Import Vouchers to Campaign](#import-vouchers-to-campaign)
+🧪 Looking for promotion ideas? Check our [Cookbook](https://cookbook.voucherify.io/) to get an inspiration.
-#### [Create Campaign]
-```ruby
-voucherify.campaigns.create(campaign)
-```
-#### [Get Campaign]
-```ruby
-voucherify.campaigns.get(campaign_name)
-```
-#### [Add Voucher to Campaign]
-```ruby
-voucherify.campaigns.add_voucher(campaign_name, [params])
-```
-#### [Import Vouchers to Campaign]
-```ruby
-voucherify.campaigns.import_vouchers(campaign_name, vouchers)
-```
+🐛 Encounter a bug? Please file a report in the [Issues](https://github.com/voucherifyio/sdk-ruby-openapi-based/issues).
----
+## ⚙️ Installation
-### Distributions API
-Methods are provided within `voucherify.distributions.*` namespace.
+### Gem Repository
-- [Publish Vouchers](#publish-vouchers)
-- [Create Export](#create-export)
-- [Get Export](#get-export)
-- [Delete Export](#delete-export)
-- [List Publications](#list-publications)
-- [Create Publication](#create-publication)
+The SDK is hosted in [RubeGems](https://rubygems.org/gems/voucherify) and could be easy obtained by adding this line to Your application's Gemfile:
-#### [Publish Vouchers]
-```ruby
-voucherify.distributions.publish(campaign_name)
-```
-#### [Create Export]
-```ruby
-voucherify.distributions.create_export(export)
-```
-#### [Get Export]
-```ruby
-voucherify.distributions.get_export(export_id)
-```
-#### [Delete Export]
-```ruby
-voucherify.distributions.delete_export(export_id)
-```
-#### [List Publications]
```ruby
-voucherify.distributions.list_publications(params)
-```
-#### [Create Publication]
-```ruby
-voucherify.distributions.create_publication(publication)
+gem 'voucherify'
```
----
-
-### Validations API
-Methods are provided within `voucherify.validations.*` namespace.
-
-- [Validate Voucher](#validate-voucher)
-- [Validate Promotion Campaign](#validate-promotion-campaign)
-
-#### [Validate Voucher]
-```ruby
-voucherify.validations.validate_voucher(code, [context])
-
-# or
-voucherify.validations.validate(code, [context])
-```
+And then execute:
-#### [Validate Promotion Campaign]
-```ruby
-voucherify.validations.validate(promo_validation_context)
+```shell
+bundle install
```
----
-
-### Redemptions API
-Methods are provided within `voucherify.redemptions.*` namespace.
-
-- [Redeem Voucher](#redeem-voucher)
-- [List Redemptions](#list-redemptions)
-- [Get Voucher's Redemptions](#get-vouchers-redemptions)
-- [Get Redemption](#get-redemption)
-- [Rollback Redemption](#rollback-redemption)
-
-#### [Redeem Voucher]
-```ruby
-# Redeem voucher code
-voucherify.redemptions.redeem(code, [params])
-
-# Redeem promotion campaign
-voucherify.redemptions.redeem(promotions_tier, [params])
+Or install it yourself as:
-# Removed!
-voucherify.redemptions.redeem(code, tracking_id) # use: voucherify.redemptions.redeem(code, {:customer => {:source_id => 'source_id'}})
-```
-#### [List Redemptions]
-```ruby
-voucherify.redemptions.list
-voucherify.redemptions.list(params)
-```
-#### [Get Voucher's Redemptions]
-```ruby
-voucherify.redemptions.get_for_voucher(code)
-```
-#### [Get Redemption]
-```ruby
-voucherify.redemptions.get(redemption_id);
+```shell
+gem install voucherify
```
-#### [Rollback Redemption]
-```ruby
-voucherify.redemptions.rollback(redemption_id, [params])
-# Removed!
-voucherify.redemptions.rollback(code, tracking_id, reason) # use: voucherify.redemptions.rollback(code, {:customer => {:source_id => 'source_id'}, :reason => 'reason'})
-```
-Check [redemption rollback object](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-redemption-rollback-object).
+### 🚀 Running code
----
+When You have Voucherify gem installed You could use pre-created [example.rb](./example.rb) with example code for testing purpose.
-### Promotions API
-Methods are provided within `voucherify.promotions.*` namespace.
+```ruby example.rb
+# Load the gem
+require 'VoucherifySdk'
-- [Create Promotion Campaign](#create-promotion-campaign)
-- [Validate Promotion Campaign](#validate-promotion-campaign)
-- [List Promotion's Tiers](#list-promotions-tiers)
-- [Create Promotion's Tier](#create-promotions-tier)
-- [Redeem Promotion's Tier](#redeem-promotions-tier)
-- [Update Promotion's Tier](#update-promotions-tier)
-- [Delete Promotion's Tier](#delete-promotions-tier)
+# Setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = 'YOUR API KEY'
-Check [promotion campaign object](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-promotion-campaign).
-#### [Create Promotion Campaign]
-```ruby
-voucherify.promotions.create(promotion_campaign)
-```
-#### [Validate Promotion Campaign]
-```ruby
-voucherify.promotions.validate(validation_context)
-```
-#### [List Promotion's Tiers]
-```ruby
-voucherify.promotions.tiers.list(promotion_campaign_id)
-```
-Check [promotion's tier object](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-promotion-object)
-#### [Create Promotion's Tier]
-```ruby
-voucherify.promotions.tiers.create(promotion_id, promotions_tier)
-```
-#### [Redeem Promotion's Tier]
-```ruby
-voucherify.promotions.tiers.redeem(promotions_tier_id, redemption_context)
-```
-#### [Update Promotion's Tier]
-```ruby
-voucherify.promotions.tiers.update(promotions_tier)
-```
-#### [Delete Promotion's Tier]
-```ruby
-voucherify.promotions.tiers.delete(promotions_tier_id)
-```
-
----
-
-### Customers API
-Methods are provided within `voucherify.customers.*` namespace.
-
-- [List Customers](#list-customers)
-- [Create Customer](#create-customer)
-- [Get Customer](#get-customer)
-- [Update Customer](#update-customer)
-- [Delete Customer](#delete-customer)
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = 'YOUR API KEY'
-#### [List Customers]
-```ruby
-voucherify.customers.list(options)
-```
-Check [options](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-customers).
+ # (Optional) Configure Voucherify cluster, default is https://api.voucherify.io
+ # config.host = 'https://us1.api.voucherify.io'
+end
-#### [Create Customer]
-```ruby
-voucherify.customers.create(customer)
-```
-Check [customer object](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-customer-object).
-#### [Get Customer]
-```ruby
-voucherify.customers.get(customer_id)
-```
-#### [Update Customer]
-```ruby
-voucherify.customers.update(customer)
-```
-#### [Delete Customer]
-```ruby
-voucherify.customers.delete(customer_id)
-```
+# Creating API Instance
+api_instance = VoucherifySdk::CampaignsApi.new
-### Products API
-Methods are provided within `voucherify.products.*` namespace.
-
-- [Create Product](#create-product)
-- [Get Product](#get-product)
-- [Update Product](#update-product)
-- [Delete Product](#delete-product)
-- [List Products](#list-products)
-- [Create SKU](#create-sku)
-- [Get SKU](#get-sku)
-- [Update SKU](#update-sku)
-- [Delete SKU](#delete-sku)
-- [List all product SKUs](#list-all-product-skus)
-
-#### [Create Product]
-```ruby
-voucherify.products.create(product)
-```
-Check [product object](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-product-object).
-#### [Get Product]
-```ruby
-voucherify.products.get(product_id)
-```
-#### [Update Product]
-```ruby
-voucherify.products.update(product)
-```
-#### [Delete Product]
-```ruby
-voucherify.products.delete(product_id)
-```
-#### [List Products]
-```ruby
-voucherify.products.list([params])
-```
-#### [Create SKU]
-```ruby
-voucherify.products.create_sku(product_id, sku)
-```
-Check [SKU object](https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-sku-object).
-#### [Get SKU]
-```ruby
-voucherify.products.get_sku(product_id, sku_id)
-```
-#### [Update SKU]
-```ruby
-voucherify.products.update_sku(product_id, sku)
-```
-#### [Delete SKU]
-```ruby
-voucherify.products.delete_sku(product_id, sku_id)
-```
-#### [List all product SKUs]
-```ruby
-voucherify.products.list_skus(product_id)
+# Calling list_campaigns
+begin
+ result = api_instance.list_campaigns()
+ puts result
+rescue VoucherifySdk::ApiError => e
+ puts "Exception when calling VouchersApi->list_campaigns: #{e}"
+end
```
----
-
-### Validation Rules API
-Methods are provided within `voucherify.validation_rules.*` namespace.
-
-- [Create Validation Rules](#create-validation-rules)
-- [Get Validation Rules](#get-validation-rules)
-- [List Validation Rules](#list-validation-rules)
-- [Update Validation Rules](#update-validation-rules)
-- [Delete Validation Rules](#delete-validation-rules)
-
-- [Create Validation Rule Assignment](#create-validation-rule-assignment)
-- [List Validation Rule Assignments](#list-validation-rule-assignments)
-- [Delete Validation Rule Assignment](#delete-validation-rule-assignment)
-
-#### [Create Validation Rules]
-```ruby
-voucherify.validation_rules.create(rules);
-```
-#### [Get Validation Rules]
-```ruby
-voucherify.validation_rules.get(id);
-```
-#### [List Validation Rules]
-```ruby
-voucherify.validation_rules.list(query);
-```
-#### [Update Validation Rules]
-```ruby
-voucherify.validation_rules.update(rules);
-```
-#### [Delete Validation Rules]
-```ruby
-voucherify.validation_rules.delete(id);
-```
+Code could be run from the directory where the file is placed (root for this repository), by using:
-#### [Create Validation Rule Assignment]
-```ruby
-voucherify.validation_rules.assignments.create(rule_id, assignment);
+```shell
+ruby example.rb
```
-#### [List Validation Rule Assignments]
-```ruby
-voucherify.validation_rules.assignments.list(rule_id, query);
-```
-#### [Delete Validation Rule Assignment]
-```ruby
-voucherify.validation_rules.assignments.delete(rule_id, assignment_id);
-```
----
-
-### Segments API
-Methods are provided within `voucherify.segments.*` namespace.
-- [Create Segment](#create-segment)
-- [Get Segment](#get-segment)
-- [Delete Validation Rules](#delete-segment)
+Or, if You're using bundler:
-#### [Create Segment]
-```ruby
-voucherify.segments.create(segment);
-```
-#### [Get Segment]
-```ruby
-voucherify.segments.get(id);
-```
-#### [Delete Segment]
-```ruby
-voucherify.segments.delete(id);
+```shell
+bundle exec ruby example.rb
```
----
+🛡️ This code does simple campaign list, so it won't affect Your Voucherify data.
-### Orders API
+🔒 Remember to fill Your Voucherify keys for the valid authorization.
-#### [Create Order]
-```ruby
-voucherify.orders.create(order);
-```
-#### [Get Order]
-```ruby
-voucherify.orders.get(id);
-```
-#### [Update Order]
-```ruby
-voucherify.orders.update(id, order);
-```
-#### [List orders]
-```ruby
-voucherify.orders.list(params);
-```
+💅 More examples and good practices You could find in the [EXAMPLES.md](./EXAMPLES.md) document.
----
+## 🐳 Running local tests with docker
-### Rewards API
-
-#### [Create Rewards]
-```ruby
-voucherify.rewards.create(reward);
-```
-#### [Get Reward]
-```ruby
-voucherify.rewards.get(id);
-```
-#### [Update Reward]
-```ruby
-voucherify.rewards.update(id, reward);
-```
-#### [List Rewards]
-```ruby
-voucherify.rewards.list(params);
-```
-#### [Delete Reward]
-```ruby
-voucherify.rewards.delete(id);
-```
-
-#### [List Reward Assignments]
-```ruby
-voucherify.rewards.assignments.list(reward_id, query);
-```
-#### [Create Reward Assignment]
-```ruby
-voucherify.rewards.assignments.create(reward_id, assignment);
-```
-#### [Update Reward Assignment]
-```ruby
-voucherify.rewards.assignments.update(reward_id, assignment_id, assignment);
-```
-#### [Delete Reward Assignment]
-```ruby
-voucherify.rewards.assignments.delete(reward_id, assignment_id);
-```
----
+1. Copy `.env.example` to `.env` and fill in the values.
+2. Run `docker build -t ruby .` to build the image.
+3. Run `docker run --rm ruby` to run the tests and delete container immediately after.
-### Loyalties API
+## 🛠️ Contributing
-#### [List Loyalties]
-```ruby
-voucherify.loyalties.list(query);
-```
-#### [Create Loyalty]
-```ruby
-voucherify.loyalties.create(loyalty);
-```
-#### [Get Loyalty]
-```ruby
-voucherify.loyalties.get(id);
-```
-#### [Update Loyalty]
-```ruby
-voucherify.loyalties.update(id, loyalty);
-```
-#### [Delete Loyalty]
-```ruby
-voucherify.loyalties.delete(id);
-```
+Read more about how to Contribute to Voucherify Ruby SDK by visiting main repo [GENERATING-SDKS.md](https://github.com/voucherifyio/voucherify-openapi/blob/master/GENERATING-SDKS.md)
-#### [List Loyalty Reward Assignments]
-```ruby
-voucherify.loyalties.assignments.list(loyalty_id, query);
-```
-#### [Create Loyalty Reward Assignment]
-```ruby
-voucherify.loyalties.assignments.create(loyalty_id, assignment);
-```
-#### [Update Loyalty Reward Assignment]
-```ruby
-voucherify.loyalties.assignments.update(loyalty_id, assignment_id, assignment);
-```
-#### [Delete Loyalty Reward Assignment]
-```ruby
-voucherify.loyalties.assignments.delete(loyalty_id, assignment_id);
-```
+Remember that this SDK is auto generated (except of the tests) so changes made here will be overwritten by generator.
-#### [List Loyalty Earning Rules]
-```ruby
-voucherify.loyalties.earning_rules.list(loyalty_id, query);
-```
-#### [Create Loyalty Earning Rule]
-```ruby
-voucherify.loyalties.earning_rules.create(loyalty_id, earning_rule);
-```
-#### [Update Loyalty Earning Rule]
-```ruby
-voucherify.loyalties.earning_rules.update(loyalty_id, earning_rule_id, earning_rule);
-```
-#### [Delete Loyalty Earning Rule]
-```ruby
-voucherify.loyalties.earning_rules.delete(loyalty_id, earning_rule_id);
-```
+## Changelog
-#### [List Loyalty Members]
-```ruby
-voucherify.loyalties.members.list(loyalty_id, query);
-```
-#### [Add Loyalty Member]
-```ruby
-voucherify.loyalties.members.add(loyalty_id, member);
-```
-#### [Get Loyalty Member]
-```ruby
-voucherify.loyalties.members.get(loyalty_id, member_id);
-```
-#### [Add Loyalty Card Balance]
-```ruby
-voucherify.loyalties.members.add_balance(loyalty_id, member_id, add_balance);
-```
-#### [Redeem Loyalty Reward]
-```ruby
-voucherify.loyalties.members.redeem_reward(loyalty_id, member_id, redeem_reward);
-```
----
+- **2022-03-11** - `5.0.0` - The new version of the SKD includes coverage for all the most commonly used Voucherify endpoints and supports typed models.
-### Events API
-Methods are provided within `voucherify.events.*` namespace.
+*Previous versions of the API are no longer supported, and we highly recommend upgrading to version 5.0.0, which is now designated as Long-Term Support (LTS).*
-- [Events](#events)
+*Changelog for previous versions could be found in the [CHANGELOG.md file](./CHANGELOG.md)*
-#### [Create event]
-```ruby
-voucherify.events.track(event, metadata, customer, referral);
-```
+## 🔐 Documentation for Authorization
```ruby
-voucherify.events.track_event(data);
-```
-
-### Async Actions API
-Methods are provided within `voucherify.async_actions.*` namespace.
-- [Get Async Action](#get-async-action)
-- [List Async Actions](#list-async-actions)
+# Setup authorization
+VoucherifySdk.configure do |config|
+ # Application Keys
+ config.api_key['X-App-Id'] = 'YOUR API ID'
+ config.api_key['X-App-Token'] = 'YOUR API TOKEN'
-#### [Get Async Action]
-```java
-voucherify.async_actions.get(id);
-```
-
-#### [List Async Actions]
-```java
-voucherify.async_actions.list(query);
-```
+ # Client-side Keys
+ config.api_key['X-Client-Application-Id'] = 'YOUR CLIENT API ID'
+ config.api_key['X-Client-Token'] = 'YOUR CLIENT API TOKEN'
----
-
-### Migration from 0.x
-
-Version 1.x of the SDK is not backwards compatible with versions 0.x.
-Changes made in version 1.x mostly relate to grouping methods within namespaces.
-So all you need to do is to follow the list bellow and just replace methods
-with their namespaced equivalent.
-
-- `Voucherify.new(params)` - `Voucherify::Client.new(params)`
-- `voucherify.create(voucher)` - [voucherify.vouchers.create](#create-voucher)
-- `voucherify.get(voucher_code)` - [voucherify.vouchers.get](#get-voucher)
-- `voucherify.update(voucher)` - [voucherify.vouchers.update](#update-voucher)
-- `voucherify.list(params)` - [voucherify.vouchers.list](#list-vouchers)
-- `voucherify.enable(voucher_code)` - [voucherify.vouchers.enable](#enable-voucher)
-- `voucherify.disable(voucher_code)` - [voucherify.vouchers.disable](#disable-voucher)
-- `voucherify.publish(campaign_name)` - [voucherify.distributions.publish](#publish-vouchers)
-- `voucherify.validate(voucher_code, params)` - [voucherify.validations.validate](#validate-voucher)
-- `voucherify.redeem(voucher_code, tracking_id)` - [voucherify.redemptions.redeem](#redeem-voucher)
-- `voucherify.redemption(voucher_code)` - [voucherify.redemptions.get_for_voucher](#get-vouchers-redemptions)
-- `voucherify.redemptions(params)` - [voucherify.redemptions.list](#list-redemptions)
-- `voucherify.rollback(redemption_id, tracking_id, reason)` - [voucherify.redemptions.rollback](#rollback-redemptions)
-- `voucherify.create_customer(customer)` - [voucherify.customers.create](#create-customer)
-- `voucherify.get_customer(customer_id)` - [voucherify.customers.get](#get-customer)
-- `voucherify.update_customer(customer)` - [voucherify.customers.update](#update-customer)
-- `voucherify.delete_customer(customer_id)` - [voucherify.customers.delete](#delete-customer)
-- `Utils.round_money(value)` - `Voucherify::Utils.round_money(value)`
-- `Utils.validate_percent_discount(discount)` - `Voucherify::Utils.validate_percent_discount(discount)`
-- `Utils.validate_amount_discount(discount)` - `Voucherify::Utils.validate_amount_discount(discount)`
-- `Utils.validate_unit_discount(discount)` - `Voucherify::Utils.validate_unit_discount(discount)`
-- `Utils.calculate_price(base_price, voucher, [unit_price])` - `Voucherify::Utils.calculate_price(base_price, voucher, [unit_price])`
-- `Utils.calculate_discount(base_price, voucher, [unit_price])` - `Voucherify::Utils.calculate_discount(base_price, voucher, [unit_price])`
-
----
-
-### Utils
-
-#### Available methods
-
-- `Voucherify::Utils.round_money(value)`
-- `Voucherify::Utils.validate_percent_discount(discount)`
-- `Voucherify::Utils.validate_amount_discount(discount)`
-- `Voucherify::Utils.validate_unit_discount(discount)`
-- `Voucherify::Utils.calculate_price(base_price, voucher, [unit_price])`
-- `Voucherify::Utils.calculate_discount(base_price, voucher, [unit_price])`
-
----
-
-## Error handling
-
-When the Voucherify API responds with an error (HTTP status code is 4xx or 5xx) then the client raises a `VoucherifyError`.
-It contains following properties:
-- `code` - HTTP status code
-- `message` - a human-readable message providing short description about the error.
-- `details` - a human-readable message providing more details about the error, usually includes a hint on how to fix the error
-- `key` - a short string describing the kind of error that occurred.
-
-Example:
-
-```ruby
-begin
- voucherify.distributions.publish('test')
-rescue Voucherify::VoucherifyError => e
- puts e.code
- puts e.message
- puts e.details
- puts e.key
+ # Cluster (Optional)
+ # default is https://api.voucherify.io
+ config.host = 'https://us1.api.voucherify.io'
end
```
-The ouput may be:
-
-```
-400
-Couldn't find any voucher suitable for publication.
-Use auto-update campaigns if you want Voucherify to generate vouchers automatically.
-no_voucher_suitable_for_publication
-```
-
-## Development
-
-After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
-
-To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
-
-## Contributing
-
-Bug reports and pull requests are welcome on GitHub at https://github.com/rspective/voucherify-ruby-sdk.
-
-## Changelog
-- **2022-01-18** - `4.1.0` - Async Actions support.
-- **2021-06-14** - `4.0.0` - Bumped required ruby version, bumped dependencies, added `Consents` API support, remove deprecated `URI.escape`.
-- **2020-03-09** - `3.0.0` - Bumped required ruby version, bumped dependencies, added `list` method in Customers module.
-- **2019-06-19** - `2.4.0` - Added support for custom API endpoint, that allows to connect to projects created in specific Voucherify region.
-- **2019-05-09** - `2.3.0` - Added `create_publication` method in Distributions module.
-- **2019-04-23** - `2.2.0` - Loyalties API, Rewards API, Orders API.
-- **2019-02-19** - `2.1.1` - Treat `referral` as optional in custom events. Added new method for custom event tracking.
-- **2019-02-19** - `2.1.0` - Handle `referral` in custom events tracking.
-- **2018-12-27** - `2.0.0` - Business validation rules.
-- **2018-09-05** - `1.6.1` - Request timeout settings
-- **2017-11-16** - `1.6.0` - Expose promotion API, Redemptions and Validations namespace update
-- **2017-11-16** - `1.5.0` - Expose events API
-- **2017-05-07** - `1.4.0` - Segments, Validation rules, API Versioning
-- **2017-03-22** - `1.3.0` - improved error handling
-- **2017-01-04** - `1.2.0` - added [import vouchers](#import-vouchers) method.
-- **2016-12-29** - `1.1.0` - introduced [campaigns api](#campaigns-api) and [products api](#products-api).
-- **2016-12-15** - `1.0.0` - introduced namespaces, unified method names, updated README. Migration from versions 0.x required [migration from version 0.x](#migration-from-0x)
-- **2016-12-02** - `0.8.2` - support gift vouchers in utils, fix price and discount calculations for amount discounts
-- **2016-10-03** - `0.8.1` - publish update
-- **2016-08-02** - `0.8.0` - validate voucher
-- **2016-07-18** - `0.7.0` - voucher udpate
-- **2016-07-05** - `0.6.0` - new utils module
-- **2016-06-16** - `0.5.0` - unified naming convention
-- **2016-06-12** - `0.4.0` - new customer sdk methods
-- **2016-05-24** - `0.3.0` - new publish structure
-- **2016-04-27** - `0.2.0` - rollback redemption
-- **2016-04-13** - `0.1.3` - bugfix in redeem()
-- **2016-04-13** - `0.1.2` - removed dependency to `pry`
-- **2016-04-12** - `0.1.1` - minor gemspec changes
-- **2016-04-12** - `0.1.0` - First version:
- - Authentication
- - Voucher information: *retrieve voucher*, *list vouchers*, *retrieve redemptions*, *list redemptions*
- - Voucher operations: *redeem voucher*, *publish voucher*, *create voucher*, *enable/disable voucher*
+## 🌐 Documentation for API Endpoints
+
+All URIs are relative to *https://api.voucherify.io*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*VoucherifySdk::CampaignsApi* | [**add_voucher_with_specific_code_to_campaign**](docs/CampaignsApi.md#add_voucher_with_specific_code_to_campaign) | **POST** /v1/campaigns/{campaignId}/vouchers/{code} | Add Voucher with Specific Code to Campaign
+*VoucherifySdk::CampaignsApi* | [**add_vouchers_to_campaign**](docs/CampaignsApi.md#add_vouchers_to_campaign) | **POST** /v1/campaigns/{campaignId}/vouchers | Add Vouchers to Campaign
+*VoucherifySdk::CampaignsApi* | [**create_campaign**](docs/CampaignsApi.md#create_campaign) | **POST** /v1/campaigns | Create Campaign
+*VoucherifySdk::CampaignsApi* | [**delete_campaign**](docs/CampaignsApi.md#delete_campaign) | **DELETE** /v1/campaigns/{campaignId} | Delete Campaign
+*VoucherifySdk::CampaignsApi* | [**disable_campaign**](docs/CampaignsApi.md#disable_campaign) | **POST** /v1/campaigns/{campaignId}/disable | Disable Campaign
+*VoucherifySdk::CampaignsApi* | [**enable_campaign**](docs/CampaignsApi.md#enable_campaign) | **POST** /v1/campaigns/{campaignId}/enable | Enable Campaign
+*VoucherifySdk::CampaignsApi* | [**get_campaign**](docs/CampaignsApi.md#get_campaign) | **GET** /v1/campaigns/{campaignId} | Get Campaign
+*VoucherifySdk::CampaignsApi* | [**import_vouchers_to_campaign**](docs/CampaignsApi.md#import_vouchers_to_campaign) | **POST** /v1/campaigns/{campaignId}/import | Import Vouchers to Campaign
+*VoucherifySdk::CampaignsApi* | [**import_vouchers_to_campaign_using_csv**](docs/CampaignsApi.md#import_vouchers_to_campaign_using_csv) | **POST** /v1/campaigns/{campaignId}/importCSV | Import Vouchers to Campaign by CSV
+*VoucherifySdk::CampaignsApi* | [**list_campaigns**](docs/CampaignsApi.md#list_campaigns) | **GET** /v1/campaigns | List Campaigns
+*VoucherifySdk::CampaignsApi* | [**update_campaign**](docs/CampaignsApi.md#update_campaign) | **PUT** /v1/campaigns/{campaignId} | Update Campaign
+*VoucherifySdk::CategoriesApi* | [**create_category**](docs/CategoriesApi.md#create_category) | **POST** /v1/categories | Create Category
+*VoucherifySdk::CategoriesApi* | [**delete_category**](docs/CategoriesApi.md#delete_category) | **DELETE** /v1/categories/{categoryId} | Delete Category
+*VoucherifySdk::CategoriesApi* | [**get_category**](docs/CategoriesApi.md#get_category) | **GET** /v1/categories/{categoryId} | Get Category
+*VoucherifySdk::CategoriesApi* | [**list_categories**](docs/CategoriesApi.md#list_categories) | **GET** /v1/categories | List Categories
+*VoucherifySdk::CategoriesApi* | [**update_category**](docs/CategoriesApi.md#update_category) | **PUT** /v1/categories/{categoryId} | Update Category
+*VoucherifySdk::ClientSideApi* | [**check_eligibility_client_side**](docs/ClientSideApi.md#check_eligibility_client_side) | **POST** /client/v1/qualifications | Check Eligibility (client-side)
+*VoucherifySdk::ClientSideApi* | [**redeem_stacked_discounts_client_side**](docs/ClientSideApi.md#redeem_stacked_discounts_client_side) | **POST** /client/v1/redemptions | Redeem Stackable Discounts (client-side)
+*VoucherifySdk::ClientSideApi* | [**track_custom_event_client_side**](docs/ClientSideApi.md#track_custom_event_client_side) | **POST** /client/v1/events | Track Custom Event (client-side)
+*VoucherifySdk::ClientSideApi* | [**update_customers_consents_client_side**](docs/ClientSideApi.md#update_customers_consents_client_side) | **PUT** /client/v1/customers/{customerId}/consents | Update Customer's consents (client-side)
+*VoucherifySdk::ClientSideApi* | [**validate_stacked_discounts_client_side**](docs/ClientSideApi.md#validate_stacked_discounts_client_side) | **POST** /client/v1/validations | Validate Stackable Discounts (client-side)
+*VoucherifySdk::CustomersApi* | [**create_customer**](docs/CustomersApi.md#create_customer) | **POST** /v1/customers | Create Customer
+*VoucherifySdk::CustomersApi* | [**customer_permanently_deletion**](docs/CustomersApi.md#customer_permanently_deletion) | **POST** /v1/customers/{customerId}/permanent-deletion | Delete Customer Permanently
+*VoucherifySdk::CustomersApi* | [**delete_customer**](docs/CustomersApi.md#delete_customer) | **DELETE** /v1/customers/{customerId} | Delete Customer
+*VoucherifySdk::CustomersApi* | [**get_customer**](docs/CustomersApi.md#get_customer) | **GET** /v1/customers/{customerId} | Get Customer
+*VoucherifySdk::CustomersApi* | [**import_customers_using_csv**](docs/CustomersApi.md#import_customers_using_csv) | **POST** /v1/customers/importCSV | Import and Update Customers using CSV
+*VoucherifySdk::CustomersApi* | [**list_customer_activities**](docs/CustomersApi.md#list_customer_activities) | **GET** /v1/customers/{customerId}/activities | List Customer Activities
+*VoucherifySdk::CustomersApi* | [**list_customer_segments**](docs/CustomersApi.md#list_customer_segments) | **GET** /v1/customers/{customerId}/segments | List Customer's Segments
+*VoucherifySdk::CustomersApi* | [**list_customers**](docs/CustomersApi.md#list_customers) | **GET** /v1/customers | List Customers
+*VoucherifySdk::CustomersApi* | [**update_customer**](docs/CustomersApi.md#update_customer) | **PUT** /v1/customers/{customerId} | Update Customer
+*VoucherifySdk::CustomersApi* | [**update_customers_consents**](docs/CustomersApi.md#update_customers_consents) | **PUT** /v1/customers/{customerId}/consents | Update Customer's consents
+*VoucherifySdk::CustomersApi* | [**update_customers_in_bulk**](docs/CustomersApi.md#update_customers_in_bulk) | **POST** /v1/customers/bulk/async | Update Customers in bulk
+*VoucherifySdk::CustomersApi* | [**update_customers_metadata_in_bulk**](docs/CustomersApi.md#update_customers_metadata_in_bulk) | **POST** /v1/customers/metadata/async | Update Customers' Metadata in bulk
+*VoucherifySdk::EventsApi* | [**track_custom_event**](docs/EventsApi.md#track_custom_event) | **POST** /v1/events | Track Custom Event
+*VoucherifySdk::ExportsApi* | [**create_export**](docs/ExportsApi.md#create_export) | **POST** /v1/exports | Create Export
+*VoucherifySdk::ExportsApi* | [**delete_export**](docs/ExportsApi.md#delete_export) | **DELETE** /v1/exports/{exportId} | Delete Export
+*VoucherifySdk::ExportsApi* | [**download_export**](docs/ExportsApi.md#download_export) | **GET** /v1/exports/{export_Id} | Download Export
+*VoucherifySdk::ExportsApi* | [**get_export**](docs/ExportsApi.md#get_export) | **GET** /v1/exports/{exportId} | Get Export
+*VoucherifySdk::ExportsApi* | [**list_exports**](docs/ExportsApi.md#list_exports) | **GET** /v1/exports | List Exports
+*VoucherifySdk::LoyaltiesApi* | [**create_in_bulk_loyalty_tiers**](docs/LoyaltiesApi.md#create_in_bulk_loyalty_tiers) | **POST** /v1/loyalties/{campaignId}/tiers | Create loyalty tiers
+*VoucherifySdk::LoyaltiesApi* | [**delete_earning_rule**](docs/LoyaltiesApi.md#delete_earning_rule) | **DELETE** /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | Delete Earning Rule
+*VoucherifySdk::LoyaltiesApi* | [**delete_loyalty_program**](docs/LoyaltiesApi.md#delete_loyalty_program) | **DELETE** /v1/loyalties/{campaignId} | Delete Loyalty Campaign
+*VoucherifySdk::LoyaltiesApi* | [**delete_reward_assignment1**](docs/LoyaltiesApi.md#delete_reward_assignment1) | **DELETE** /v1/loyalties/{campaignId}/rewards/{assignmentId} | Delete Reward Assignment
+*VoucherifySdk::LoyaltiesApi* | [**disable_earning_rule**](docs/LoyaltiesApi.md#disable_earning_rule) | **POST** /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable | Disable Earning Rule
+*VoucherifySdk::LoyaltiesApi* | [**enable_earning_rule**](docs/LoyaltiesApi.md#enable_earning_rule) | **POST** /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable | Enable Earning Rule
+*VoucherifySdk::LoyaltiesApi* | [**export_loyalty_card_transactions**](docs/LoyaltiesApi.md#export_loyalty_card_transactions) | **POST** /v1/loyalties/members/{memberId}/transactions/export | Export Loyalty Card Transactions
+*VoucherifySdk::LoyaltiesApi* | [**export_loyalty_card_transactions1**](docs/LoyaltiesApi.md#export_loyalty_card_transactions1) | **POST** /v1/loyalties/{campaignId}/members/{memberId}/transactions/export | Export Loyalty Card Transactions
+*VoucherifySdk::LoyaltiesApi* | [**get_earning_rule**](docs/LoyaltiesApi.md#get_earning_rule) | **GET** /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | Get Earning Rule
+*VoucherifySdk::LoyaltiesApi* | [**get_loyalty_tier**](docs/LoyaltiesApi.md#get_loyalty_tier) | **GET** /v1/loyalties/{campaignId}/tiers/{loyaltyTierId} | Get Loyalty Tier
+*VoucherifySdk::LoyaltiesApi* | [**get_reward_assignment1**](docs/LoyaltiesApi.md#get_reward_assignment1) | **GET** /v1/loyalties/{campaignId}/reward-assignments/{assignmentId} | Get Reward Assignment
+*VoucherifySdk::LoyaltiesApi* | [**get_reward_assignment2**](docs/LoyaltiesApi.md#get_reward_assignment2) | **GET** /v1/loyalties/{campaignId}/rewards/{assignmentId} | Get Reward Assignment
+*VoucherifySdk::LoyaltiesApi* | [**get_reward_details**](docs/LoyaltiesApi.md#get_reward_details) | **GET** /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward | Get Reward Details
+*VoucherifySdk::LoyaltiesApi* | [**list_loyalty_card_transactions**](docs/LoyaltiesApi.md#list_loyalty_card_transactions) | **GET** /v1/loyalties/members/{memberId}/transactions | List Loyalty Card Transactions
+*VoucherifySdk::LoyaltiesApi* | [**list_loyalty_card_transactions1**](docs/LoyaltiesApi.md#list_loyalty_card_transactions1) | **GET** /v1/loyalties/{campaignId}/members/{memberId}/transactions | List Loyalty Card Transactions
+*VoucherifySdk::LoyaltiesApi* | [**list_loyalty_tier_earning_rules**](docs/LoyaltiesApi.md#list_loyalty_tier_earning_rules) | **GET** /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules | List Loyalty Tier Earning Rules
+*VoucherifySdk::LoyaltiesApi* | [**list_loyalty_tier_rewards**](docs/LoyaltiesApi.md#list_loyalty_tier_rewards) | **GET** /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards | List Loyalty Tier Rewards
+*VoucherifySdk::LoyaltiesApi* | [**list_loyalty_tiers**](docs/LoyaltiesApi.md#list_loyalty_tiers) | **GET** /v1/loyalties/{campaignId}/tiers | List Loyalty Tiers
+*VoucherifySdk::LoyaltiesApi* | [**list_member_loyalty_tier**](docs/LoyaltiesApi.md#list_member_loyalty_tier) | **GET** /v1/loyalties/members/{memberId}/tiers | List Member's Loyalty Tiers
+*VoucherifySdk::LoyaltiesApi* | [**list_member_rewards**](docs/LoyaltiesApi.md#list_member_rewards) | **GET** /v1/loyalties/members/{memberId}/rewards | List Member Rewards
+*VoucherifySdk::LoyaltiesApi* | [**list_points_expiration**](docs/LoyaltiesApi.md#list_points_expiration) | **GET** /v1/loyalties/{campaignId}/members/{memberId}/points-expiration | Get Points Expiration
+*VoucherifySdk::LoyaltiesApi* | [**redeem_reward**](docs/LoyaltiesApi.md#redeem_reward) | **POST** /v1/loyalties/members/{memberId}/redemption | Redeem Reward
+*VoucherifySdk::LoyaltiesApi* | [**redeem_reward1**](docs/LoyaltiesApi.md#redeem_reward1) | **POST** /v1/loyalties/{campaignId}/members/{memberId}/redemption | Redeem Reward
+*VoucherifySdk::LoyaltiesApi* | [**transfer_points**](docs/LoyaltiesApi.md#transfer_points) | **POST** /v1/loyalties/{campaignId}/members/{memberId}/transfers | Transfer Loyalty Points
+*VoucherifySdk::LoyaltiesApi* | [**update_loyalty_card_balance**](docs/LoyaltiesApi.md#update_loyalty_card_balance) | **POST** /v1/loyalties/members/{memberId}/balance | Add or Remove Loyalty Card Balance
+*VoucherifySdk::LoyaltiesApi* | [**update_loyalty_card_balance1**](docs/LoyaltiesApi.md#update_loyalty_card_balance1) | **POST** /v1/loyalties/{campaignId}/members/{memberId}/balance | Add or Remove Loyalty Card Balance
+*VoucherifySdk::OrdersApi* | [**create_order**](docs/OrdersApi.md#create_order) | **POST** /v1/orders | Create Order
+*VoucherifySdk::OrdersApi* | [**create_order_export**](docs/OrdersApi.md#create_order_export) | **POST** /v1/orders/export | Create Orders Export
+*VoucherifySdk::OrdersApi* | [**get_order**](docs/OrdersApi.md#get_order) | **GET** /v1/orders/{orderId} | Get Order
+*VoucherifySdk::OrdersApi* | [**import_orders**](docs/OrdersApi.md#import_orders) | **POST** /v1/orders/import | Import Orders
+*VoucherifySdk::OrdersApi* | [**list_orders**](docs/OrdersApi.md#list_orders) | **GET** /v1/orders | List Orders
+*VoucherifySdk::OrdersApi* | [**update_order**](docs/OrdersApi.md#update_order) | **PUT** /v1/orders/{orderId} | Update Order
+*VoucherifySdk::ProductCollectionsApi* | [**create_product_collection**](docs/ProductCollectionsApi.md#create_product_collection) | **POST** /v1/product-collections | Create Product Collection
+*VoucherifySdk::ProductCollectionsApi* | [**delete_product_collection**](docs/ProductCollectionsApi.md#delete_product_collection) | **DELETE** /v1/product-collections/{productCollectionId} | Delete Product Collection
+*VoucherifySdk::ProductCollectionsApi* | [**get_product_collection**](docs/ProductCollectionsApi.md#get_product_collection) | **GET** /v1/product-collections/{productCollectionId} | Get Product Collection
+*VoucherifySdk::ProductCollectionsApi* | [**list_product_collections**](docs/ProductCollectionsApi.md#list_product_collections) | **GET** /v1/product-collections | List Product Collections
+*VoucherifySdk::ProductCollectionsApi* | [**list_products_in_collection**](docs/ProductCollectionsApi.md#list_products_in_collection) | **GET** /v1/product-collections/{productCollectionId}/products | List Products in Collection
+*VoucherifySdk::ProductsApi* | [**create_product**](docs/ProductsApi.md#create_product) | **POST** /v1/products | Create Product
+*VoucherifySdk::ProductsApi* | [**create_sku**](docs/ProductsApi.md#create_sku) | **POST** /v1/products/{productId}/skus | Create SKU
+*VoucherifySdk::ProductsApi* | [**delete_product**](docs/ProductsApi.md#delete_product) | **DELETE** /v1/products/{productId} | Delete Product
+*VoucherifySdk::ProductsApi* | [**delete_sku**](docs/ProductsApi.md#delete_sku) | **DELETE** /v1/products/{productId}/skus/{skuId} | Delete SKU
+*VoucherifySdk::ProductsApi* | [**get_product**](docs/ProductsApi.md#get_product) | **GET** /v1/products/{productId} | Get Product
+*VoucherifySdk::ProductsApi* | [**get_sku**](docs/ProductsApi.md#get_sku) | **GET** /v1/skus/{skuId} | Get SKU
+*VoucherifySdk::ProductsApi* | [**import_products_using_csv**](docs/ProductsApi.md#import_products_using_csv) | **POST** /v1/products/importCSV | Import Products using CSV
+*VoucherifySdk::ProductsApi* | [**import_skus_using_csv**](docs/ProductsApi.md#import_skus_using_csv) | **POST** /v1/skus/importCSV | Import SKUs using CSV
+*VoucherifySdk::ProductsApi* | [**list_products**](docs/ProductsApi.md#list_products) | **GET** /v1/products | List Products
+*VoucherifySdk::ProductsApi* | [**list_skus_in_product**](docs/ProductsApi.md#list_skus_in_product) | **GET** /v1/products/{productId}/skus | List SKUs in Product
+*VoucherifySdk::ProductsApi* | [**update_product**](docs/ProductsApi.md#update_product) | **PUT** /v1/products/{productId} | Update Product
+*VoucherifySdk::ProductsApi* | [**update_products_in_bulk**](docs/ProductsApi.md#update_products_in_bulk) | **POST** /v1/products/bulk/async | Update Products in bulk
+*VoucherifySdk::ProductsApi* | [**update_products_metadata_in_bulk**](docs/ProductsApi.md#update_products_metadata_in_bulk) | **POST** /v1/products/metadata/async | Update Products' Metadata in bulk
+*VoucherifySdk::ProductsApi* | [**update_sku**](docs/ProductsApi.md#update_sku) | **PUT** /v1/products/{productId}/skus/{skuId} | Update SKU
+*VoucherifySdk::PromotionsApi* | [**create_promotion_stack**](docs/PromotionsApi.md#create_promotion_stack) | **POST** /v1/promotions/{campaignId}/stacks | Create Promotion Stack
+*VoucherifySdk::PromotionsApi* | [**delete_promotion_stack**](docs/PromotionsApi.md#delete_promotion_stack) | **DELETE** /v1/promotions/{campaignId}/stacks/{stackId} | Delete Promotion Stack
+*VoucherifySdk::PromotionsApi* | [**delete_promotion_tier**](docs/PromotionsApi.md#delete_promotion_tier) | **DELETE** /v1/promotions/tiers/{promotionTierId} | Delete Promotion Tier
+*VoucherifySdk::PromotionsApi* | [**disable_promotion_tier**](docs/PromotionsApi.md#disable_promotion_tier) | **POST** /v1/promotions/tiers/{promotionTierId}/disable | Disable Promotion Tier
+*VoucherifySdk::PromotionsApi* | [**enable_promotion_tier**](docs/PromotionsApi.md#enable_promotion_tier) | **POST** /v1/promotions/tiers/{promotionTierId}/enable | Enable Promotion Tier
+*VoucherifySdk::PromotionsApi* | [**get_promotion_stack**](docs/PromotionsApi.md#get_promotion_stack) | **GET** /v1/promotions/{campaignId}/stacks/{stackId} | Get Promotion Stack
+*VoucherifySdk::PromotionsApi* | [**get_promotion_tier**](docs/PromotionsApi.md#get_promotion_tier) | **GET** /v1/promotions/tiers/{promotionTierId} | Get Promotion Tier
+*VoucherifySdk::PromotionsApi* | [**list_all_promotion_stacks**](docs/PromotionsApi.md#list_all_promotion_stacks) | **GET** /v1/promotions/stacks | List Promotion Stacks
+*VoucherifySdk::PromotionsApi* | [**list_promotion_stacks_in_campaign**](docs/PromotionsApi.md#list_promotion_stacks_in_campaign) | **GET** /v1/promotions/{campaignId}/stacks | List Promotion Stacks in Campaign
+*VoucherifySdk::PromotionsApi* | [**list_promotion_tiers_from_campaign**](docs/PromotionsApi.md#list_promotion_tiers_from_campaign) | **GET** /v1/promotions/{campaignId}/tiers | List Promotion Tiers from Campaign
+*VoucherifySdk::PromotionsApi* | [**update_promotion_stack**](docs/PromotionsApi.md#update_promotion_stack) | **PUT** /v1/promotions/{campaignId}/stacks/{stackId} | Update Promotion Stack
+*VoucherifySdk::PublicationsApi* | [**create_publication**](docs/PublicationsApi.md#create_publication) | **POST** /v1/publications | Create Publication
+*VoucherifySdk::PublicationsApi* | [**create_publication1**](docs/PublicationsApi.md#create_publication1) | **GET** /v1/publications/create | Create Publication
+*VoucherifySdk::PublicationsApi* | [**list_publications**](docs/PublicationsApi.md#list_publications) | **GET** /v1/publications | List Publications
+*VoucherifySdk::QualificationsApi* | [**check_eligibility**](docs/QualificationsApi.md#check_eligibility) | **POST** /v1/qualifications | Check Eligibility
+*VoucherifySdk::RedemptionsApi* | [**get_redemption**](docs/RedemptionsApi.md#get_redemption) | **GET** /v1/redemptions/{redemptionId} | Get Redemption
+*VoucherifySdk::RedemptionsApi* | [**get_voucher_redemptions**](docs/RedemptionsApi.md#get_voucher_redemptions) | **GET** /v1/vouchers/{code}/redemption | Get Voucher's Redemptions
+*VoucherifySdk::RedemptionsApi* | [**list_redemptions**](docs/RedemptionsApi.md#list_redemptions) | **GET** /v1/redemptions | List Redemptions
+*VoucherifySdk::RedemptionsApi* | [**redeem_stacked_discounts**](docs/RedemptionsApi.md#redeem_stacked_discounts) | **POST** /v1/redemptions | Redeem Stackable Discounts
+*VoucherifySdk::RedemptionsApi* | [**rollback_redemption**](docs/RedemptionsApi.md#rollback_redemption) | **POST** /v1/redemptions/{redemptionId}/rollback | Rollback Redemption
+*VoucherifySdk::RedemptionsApi* | [**rollback_stacked_redemptions**](docs/RedemptionsApi.md#rollback_stacked_redemptions) | **POST** /v1/redemptions/{parentRedemptionId}/rollbacks | Rollback Stackable Redemptions
+*VoucherifySdk::RewardsApi* | [**create_reward_assignment**](docs/RewardsApi.md#create_reward_assignment) | **POST** /v1/rewards/{rewardId}/assignments | Create Reward Assignment
+*VoucherifySdk::RewardsApi* | [**delete_reward**](docs/RewardsApi.md#delete_reward) | **DELETE** /v1/rewards/{rewardId} | Delete Reward
+*VoucherifySdk::RewardsApi* | [**delete_reward_assignment**](docs/RewardsApi.md#delete_reward_assignment) | **DELETE** /v1/rewards/{rewardId}/assignments/{assignmentId} | Delete Reward Assignment
+*VoucherifySdk::RewardsApi* | [**get_reward_assignment**](docs/RewardsApi.md#get_reward_assignment) | **GET** /v1/rewards/{rewardId}/assignments/{assignmentId} | Get Reward Assignment
+*VoucherifySdk::RewardsApi* | [**list_reward_assignments**](docs/RewardsApi.md#list_reward_assignments) | **GET** /v1/rewards/{rewardId}/assignments | List Reward Assignments
+*VoucherifySdk::RewardsApi* | [**update_reward_assignment**](docs/RewardsApi.md#update_reward_assignment) | **PUT** /v1/rewards/{rewardId}/assignments/{assignmentId} | Update Reward Assignment
+*VoucherifySdk::SegmentsApi* | [**delete_segment**](docs/SegmentsApi.md#delete_segment) | **DELETE** /v1/segments/{segmentId} | Delete Segment
+*VoucherifySdk::ValidationRulesApi* | [**create_validation_rules**](docs/ValidationRulesApi.md#create_validation_rules) | **POST** /v1/validation-rules | Create Validation Rules
+*VoucherifySdk::ValidationRulesApi* | [**delete_validation_rule_assignment**](docs/ValidationRulesApi.md#delete_validation_rule_assignment) | **DELETE** /v1/validation-rules/{validationRuleId}/assignments/{assignmentId} | Delete Validation Rule Assignment
+*VoucherifySdk::ValidationRulesApi* | [**delete_validation_rules**](docs/ValidationRulesApi.md#delete_validation_rules) | **DELETE** /v1/validation-rules/{validationRuleId} | Delete Validation Rule
+*VoucherifySdk::ValidationRulesApi* | [**get_validation_rule**](docs/ValidationRulesApi.md#get_validation_rule) | **GET** /v1/validation-rules/{validationRuleId} | Get Validation Rule
+*VoucherifySdk::ValidationRulesApi* | [**list_validation_rule_assignments**](docs/ValidationRulesApi.md#list_validation_rule_assignments) | **GET** /v1/validation-rules/{validationRuleId}/assignments | List Validation Rule Assignments
+*VoucherifySdk::ValidationRulesApi* | [**list_validation_rules**](docs/ValidationRulesApi.md#list_validation_rules) | **GET** /v1/validation-rules | List Validation Rules
+*VoucherifySdk::ValidationRulesApi* | [**list_validation_rules_assignments**](docs/ValidationRulesApi.md#list_validation_rules_assignments) | **GET** /v1/validation-rules-assignments | List Validation Rules' Assignment(s)
+*VoucherifySdk::ValidationRulesApi* | [**update_validation_rule**](docs/ValidationRulesApi.md#update_validation_rule) | **PUT** /v1/validation-rules/{validationRuleId} | Update Validation Rule
+*VoucherifySdk::ValidationsApi* | [**validate_stacked_discounts**](docs/ValidationsApi.md#validate_stacked_discounts) | **POST** /v1/validations | Validate Stackable Discounts
+*VoucherifySdk::VouchersApi* | [**delete_voucher**](docs/VouchersApi.md#delete_voucher) | **DELETE** /v1/vouchers/{code} | Delete Voucher
+*VoucherifySdk::VouchersApi* | [**disable_voucher**](docs/VouchersApi.md#disable_voucher) | **POST** /v1/vouchers/{code}/disable | Disable Voucher
+*VoucherifySdk::VouchersApi* | [**enable_voucher**](docs/VouchersApi.md#enable_voucher) | **POST** /v1/vouchers/{code}/enable | Enable Voucher
+*VoucherifySdk::VouchersApi* | [**export_voucher_transactions**](docs/VouchersApi.md#export_voucher_transactions) | **POST** /v1/vouchers/{code}/transactions/export | Export Voucher Transactions
+*VoucherifySdk::VouchersApi* | [**get_voucher**](docs/VouchersApi.md#get_voucher) | **GET** /v1/vouchers/{code} | Get Voucher
+*VoucherifySdk::VouchersApi* | [**import_vouchers_using_csv**](docs/VouchersApi.md#import_vouchers_using_csv) | **POST** /v1/vouchers/importCSV | Import Vouchers using CSV
+*VoucherifySdk::VouchersApi* | [**list_voucher_transactions**](docs/VouchersApi.md#list_voucher_transactions) | **GET** /v1/vouchers/{code}/transactions | List Voucher Transactions
+*VoucherifySdk::VouchersApi* | [**release_validation_session**](docs/VouchersApi.md#release_validation_session) | **DELETE** /v1/vouchers/{code}/sessions/{sessionKey} | Release Validation Session
+*VoucherifySdk::VouchersApi* | [**update_voucher_balance**](docs/VouchersApi.md#update_voucher_balance) | **POST** /v1/vouchers/{code}/balance | Add or Remove Voucher Balance
+
+
+## 📚 Documentation for Models
+
+ - [VoucherifySdk::Any](docs/Any.md)
+ - [VoucherifySdk::ApplicableTo](docs/ApplicableTo.md)
+ - [VoucherifySdk::ApplicableToEffect](docs/ApplicableToEffect.md)
+ - [VoucherifySdk::ApplicableToResultList](docs/ApplicableToResultList.md)
+ - [VoucherifySdk::ArrayInner](docs/ArrayInner.md)
+ - [VoucherifySdk::AsyncActions](docs/AsyncActions.md)
+ - [VoucherifySdk::BusValRuleAssignment](docs/BusValRuleAssignment.md)
+ - [VoucherifySdk::Campaign](docs/Campaign.md)
+ - [VoucherifySdk::CampaignBase](docs/CampaignBase.md)
+ - [VoucherifySdk::CampaignBaseValidityTimeframe](docs/CampaignBaseValidityTimeframe.md)
+ - [VoucherifySdk::CampaignLoyaltyCard](docs/CampaignLoyaltyCard.md)
+ - [VoucherifySdk::CampaignLoyaltyCardExpirationRules](docs/CampaignLoyaltyCardExpirationRules.md)
+ - [VoucherifySdk::CampaignLoyaltyVoucher](docs/CampaignLoyaltyVoucher.md)
+ - [VoucherifySdk::CampaignLoyaltyVoucherRedemption](docs/CampaignLoyaltyVoucherRedemption.md)
+ - [VoucherifySdk::CampaignVoucher](docs/CampaignVoucher.md)
+ - [VoucherifySdk::CampaignVoucherRedemption](docs/CampaignVoucherRedemption.md)
+ - [VoucherifySdk::CampaignsCreateBase](docs/CampaignsCreateBase.md)
+ - [VoucherifySdk::CampaignsCreateDiscountCouponsCampaign](docs/CampaignsCreateDiscountCouponsCampaign.md)
+ - [VoucherifySdk::CampaignsCreateGiftCampaign](docs/CampaignsCreateGiftCampaign.md)
+ - [VoucherifySdk::CampaignsCreateGiveawayCampaign](docs/CampaignsCreateGiveawayCampaign.md)
+ - [VoucherifySdk::CampaignsCreateLoyaltyCampaign](docs/CampaignsCreateLoyaltyCampaign.md)
+ - [VoucherifySdk::CampaignsCreatePromotionCampaign](docs/CampaignsCreatePromotionCampaign.md)
+ - [VoucherifySdk::CampaignsCreateReferralCampaign](docs/CampaignsCreateReferralCampaign.md)
+ - [VoucherifySdk::CampaignsCreateRequestBody](docs/CampaignsCreateRequestBody.md)
+ - [VoucherifySdk::CampaignsCreateResponseBody](docs/CampaignsCreateResponseBody.md)
+ - [VoucherifySdk::CampaignsDeleteResponseBody](docs/CampaignsDeleteResponseBody.md)
+ - [VoucherifySdk::CampaignsDisableResponseBody](docs/CampaignsDisableResponseBody.md)
+ - [VoucherifySdk::CampaignsEnableResponseBody](docs/CampaignsEnableResponseBody.md)
+ - [VoucherifySdk::CampaignsGetResponseBody](docs/CampaignsGetResponseBody.md)
+ - [VoucherifySdk::CampaignsImportCreateResponseBody](docs/CampaignsImportCreateResponseBody.md)
+ - [VoucherifySdk::CampaignsImportCsvCreateResponseBody](docs/CampaignsImportCsvCreateResponseBody.md)
+ - [VoucherifySdk::CampaignsImportVoucherItem](docs/CampaignsImportVoucherItem.md)
+ - [VoucherifySdk::CampaignsImportVoucherItemRedemption](docs/CampaignsImportVoucherItemRedemption.md)
+ - [VoucherifySdk::CampaignsImportVoucherLoyaltyCard](docs/CampaignsImportVoucherLoyaltyCard.md)
+ - [VoucherifySdk::CampaignsListResponseBody](docs/CampaignsListResponseBody.md)
+ - [VoucherifySdk::CampaignsUpdateBase](docs/CampaignsUpdateBase.md)
+ - [VoucherifySdk::CampaignsUpdateCouponCampaignBase](docs/CampaignsUpdateCouponCampaignBase.md)
+ - [VoucherifySdk::CampaignsUpdateDiscountCouponsCampaign](docs/CampaignsUpdateDiscountCouponsCampaign.md)
+ - [VoucherifySdk::CampaignsUpdateGiftCampaign](docs/CampaignsUpdateGiftCampaign.md)
+ - [VoucherifySdk::CampaignsUpdateGiveawayCampaign](docs/CampaignsUpdateGiveawayCampaign.md)
+ - [VoucherifySdk::CampaignsUpdateLoyaltyCampaign](docs/CampaignsUpdateLoyaltyCampaign.md)
+ - [VoucherifySdk::CampaignsUpdatePromotionCampaign](docs/CampaignsUpdatePromotionCampaign.md)
+ - [VoucherifySdk::CampaignsUpdateReferralCampaign](docs/CampaignsUpdateReferralCampaign.md)
+ - [VoucherifySdk::CampaignsUpdateRequestBody](docs/CampaignsUpdateRequestBody.md)
+ - [VoucherifySdk::CampaignsUpdateResponseBody](docs/CampaignsUpdateResponseBody.md)
+ - [VoucherifySdk::CampaignsVouchersCreateBaseRequestBody](docs/CampaignsVouchersCreateBaseRequestBody.md)
+ - [VoucherifySdk::CampaignsVouchersCreateInBulkRequestBody](docs/CampaignsVouchersCreateInBulkRequestBody.md)
+ - [VoucherifySdk::CampaignsVouchersCreateInBulkResponseBody](docs/CampaignsVouchersCreateInBulkResponseBody.md)
+ - [VoucherifySdk::CampaignsVouchersCreateRequestBody](docs/CampaignsVouchersCreateRequestBody.md)
+ - [VoucherifySdk::CampaignsVouchersCreateResponseBody](docs/CampaignsVouchersCreateResponseBody.md)
+ - [VoucherifySdk::CategoriesCreateRequestBody](docs/CategoriesCreateRequestBody.md)
+ - [VoucherifySdk::CategoriesCreateResponseBody](docs/CategoriesCreateResponseBody.md)
+ - [VoucherifySdk::CategoriesGetResponseBody](docs/CategoriesGetResponseBody.md)
+ - [VoucherifySdk::CategoriesListResponseBody](docs/CategoriesListResponseBody.md)
+ - [VoucherifySdk::CategoriesUpdateRequestBody](docs/CategoriesUpdateRequestBody.md)
+ - [VoucherifySdk::CategoriesUpdateResponseBody](docs/CategoriesUpdateResponseBody.md)
+ - [VoucherifySdk::Category](docs/Category.md)
+ - [VoucherifySdk::ClientEventsCreateRequestBody](docs/ClientEventsCreateRequestBody.md)
+ - [VoucherifySdk::ClientEventsCreateRequestBodyLoyalty](docs/ClientEventsCreateRequestBodyLoyalty.md)
+ - [VoucherifySdk::ClientEventsCreateRequestBodyReferral](docs/ClientEventsCreateRequestBodyReferral.md)
+ - [VoucherifySdk::ClientEventsCreateResponseBody](docs/ClientEventsCreateResponseBody.md)
+ - [VoucherifySdk::ClientQualificationsCheckEligibilityRequestBody](docs/ClientQualificationsCheckEligibilityRequestBody.md)
+ - [VoucherifySdk::ClientQualificationsCheckEligibilityResponseBody](docs/ClientQualificationsCheckEligibilityResponseBody.md)
+ - [VoucherifySdk::ClientRedemptionsRedeemRequestBody](docs/ClientRedemptionsRedeemRequestBody.md)
+ - [VoucherifySdk::ClientRedemptionsRedeemRequestBodyAllOfOptions](docs/ClientRedemptionsRedeemRequestBodyAllOfOptions.md)
+ - [VoucherifySdk::ClientRedemptionsRedeemResponseBody](docs/ClientRedemptionsRedeemResponseBody.md)
+ - [VoucherifySdk::ClientValidationsValidateRequestBody](docs/ClientValidationsValidateRequestBody.md)
+ - [VoucherifySdk::ClientValidationsValidateRequestBodyAllOfOptions](docs/ClientValidationsValidateRequestBodyAllOfOptions.md)
+ - [VoucherifySdk::ClientValidationsValidateResponseBody](docs/ClientValidationsValidateResponseBody.md)
+ - [VoucherifySdk::CodeConfig](docs/CodeConfig.md)
+ - [VoucherifySdk::CodeConfigRequiredLengthCharsetPattern](docs/CodeConfigRequiredLengthCharsetPattern.md)
+ - [VoucherifySdk::CreatePublicationBase](docs/CreatePublicationBase.md)
+ - [VoucherifySdk::CreatePublicationCampaign](docs/CreatePublicationCampaign.md)
+ - [VoucherifySdk::CreatePublicationWithCampaign](docs/CreatePublicationWithCampaign.md)
+ - [VoucherifySdk::CreatePublicationWithSpecificVoucher](docs/CreatePublicationWithSpecificVoucher.md)
+ - [VoucherifySdk::CustomEvent](docs/CustomEvent.md)
+ - [VoucherifySdk::CustomEventReferral](docs/CustomEventReferral.md)
+ - [VoucherifySdk::Customer](docs/Customer.md)
+ - [VoucherifySdk::CustomerActivity](docs/CustomerActivity.md)
+ - [VoucherifySdk::CustomerActivityData](docs/CustomerActivityData.md)
+ - [VoucherifySdk::CustomerBase](docs/CustomerBase.md)
+ - [VoucherifySdk::CustomerBaseAddress](docs/CustomerBaseAddress.md)
+ - [VoucherifySdk::CustomerId](docs/CustomerId.md)
+ - [VoucherifySdk::CustomerLoyalty](docs/CustomerLoyalty.md)
+ - [VoucherifySdk::CustomerLoyaltyCampaignsValue](docs/CustomerLoyaltyCampaignsValue.md)
+ - [VoucherifySdk::CustomerReferrals](docs/CustomerReferrals.md)
+ - [VoucherifySdk::CustomerReferralsCampaignsItem](docs/CustomerReferralsCampaignsItem.md)
+ - [VoucherifySdk::CustomerResponseDataAssets](docs/CustomerResponseDataAssets.md)
+ - [VoucherifySdk::CustomerSegmentsList](docs/CustomerSegmentsList.md)
+ - [VoucherifySdk::CustomerSummary](docs/CustomerSummary.md)
+ - [VoucherifySdk::CustomerSummaryOrders](docs/CustomerSummaryOrders.md)
+ - [VoucherifySdk::CustomerSummaryRedemptions](docs/CustomerSummaryRedemptions.md)
+ - [VoucherifySdk::CustomerSummaryRedemptionsGift](docs/CustomerSummaryRedemptionsGift.md)
+ - [VoucherifySdk::CustomerSummaryRedemptionsLoyaltyCard](docs/CustomerSummaryRedemptionsLoyaltyCard.md)
+ - [VoucherifySdk::CustomerWithSummaryLoyaltyReferrals](docs/CustomerWithSummaryLoyaltyReferrals.md)
+ - [VoucherifySdk::CustomersActivitiesListResponseBody](docs/CustomersActivitiesListResponseBody.md)
+ - [VoucherifySdk::CustomersCreateRequestBody](docs/CustomersCreateRequestBody.md)
+ - [VoucherifySdk::CustomersCreateResponseBody](docs/CustomersCreateResponseBody.md)
+ - [VoucherifySdk::CustomersGetResponseBody](docs/CustomersGetResponseBody.md)
+ - [VoucherifySdk::CustomersImportCsvCreateResponseBody](docs/CustomersImportCsvCreateResponseBody.md)
+ - [VoucherifySdk::CustomersListResponseBody](docs/CustomersListResponseBody.md)
+ - [VoucherifySdk::CustomersMetadataUpdateInBulkRequestBody](docs/CustomersMetadataUpdateInBulkRequestBody.md)
+ - [VoucherifySdk::CustomersMetadataUpdateInBulkResponseBody](docs/CustomersMetadataUpdateInBulkResponseBody.md)
+ - [VoucherifySdk::CustomersPermanentDeletionCreateResponseBody](docs/CustomersPermanentDeletionCreateResponseBody.md)
+ - [VoucherifySdk::CustomersPermanentDeletionCreateResponseBodyDataJson](docs/CustomersPermanentDeletionCreateResponseBodyDataJson.md)
+ - [VoucherifySdk::CustomersSegmentsListResponseBody](docs/CustomersSegmentsListResponseBody.md)
+ - [VoucherifySdk::CustomersUpdateInBulkRequestBody](docs/CustomersUpdateInBulkRequestBody.md)
+ - [VoucherifySdk::CustomersUpdateInBulkResponseBody](docs/CustomersUpdateInBulkResponseBody.md)
+ - [VoucherifySdk::CustomersUpdateRequestBody](docs/CustomersUpdateRequestBody.md)
+ - [VoucherifySdk::CustomersUpdateResponseBody](docs/CustomersUpdateResponseBody.md)
+ - [VoucherifySdk::Discount](docs/Discount.md)
+ - [VoucherifySdk::DiscountAmount](docs/DiscountAmount.md)
+ - [VoucherifySdk::DiscountAmountVouchersEffectTypes](docs/DiscountAmountVouchersEffectTypes.md)
+ - [VoucherifySdk::DiscountCouponsCampaignVoucher](docs/DiscountCouponsCampaignVoucher.md)
+ - [VoucherifySdk::DiscountFixed](docs/DiscountFixed.md)
+ - [VoucherifySdk::DiscountFixedVouchersEffectTypes](docs/DiscountFixedVouchersEffectTypes.md)
+ - [VoucherifySdk::DiscountPercent](docs/DiscountPercent.md)
+ - [VoucherifySdk::DiscountPercentVouchersEffectTypes](docs/DiscountPercentVouchersEffectTypes.md)
+ - [VoucherifySdk::DiscountUnit](docs/DiscountUnit.md)
+ - [VoucherifySdk::DiscountUnitMultiple](docs/DiscountUnitMultiple.md)
+ - [VoucherifySdk::DiscountUnitMultipleOneUnit](docs/DiscountUnitMultipleOneUnit.md)
+ - [VoucherifySdk::DiscountUnitVouchersEffectTypes](docs/DiscountUnitVouchersEffectTypes.md)
+ - [VoucherifySdk::EarningRule](docs/EarningRule.md)
+ - [VoucherifySdk::EarningRuleBase](docs/EarningRuleBase.md)
+ - [VoucherifySdk::EarningRuleBaseCustomEvent](docs/EarningRuleBaseCustomEvent.md)
+ - [VoucherifySdk::EarningRuleBaseLoyalty](docs/EarningRuleBaseLoyalty.md)
+ - [VoucherifySdk::EarningRuleBaseSegment](docs/EarningRuleBaseSegment.md)
+ - [VoucherifySdk::EarningRuleBaseSource](docs/EarningRuleBaseSource.md)
+ - [VoucherifySdk::EarningRuleBaseValidityTimeframe](docs/EarningRuleBaseValidityTimeframe.md)
+ - [VoucherifySdk::EarningRuleEvent](docs/EarningRuleEvent.md)
+ - [VoucherifySdk::EarningRuleFixed](docs/EarningRuleFixed.md)
+ - [VoucherifySdk::EarningRuleProportional](docs/EarningRuleProportional.md)
+ - [VoucherifySdk::EarningRuleProportionalCustomEvent](docs/EarningRuleProportionalCustomEvent.md)
+ - [VoucherifySdk::EarningRuleProportionalCustomEventCustomEvent](docs/EarningRuleProportionalCustomEventCustomEvent.md)
+ - [VoucherifySdk::EarningRuleProportionalCustomEventCustomEventMetadata](docs/EarningRuleProportionalCustomEventCustomEventMetadata.md)
+ - [VoucherifySdk::EarningRuleProportionalCustomerMetadata](docs/EarningRuleProportionalCustomerMetadata.md)
+ - [VoucherifySdk::EarningRuleProportionalCustomerMetadataCustomer](docs/EarningRuleProportionalCustomerMetadataCustomer.md)
+ - [VoucherifySdk::EarningRuleProportionalCustomerMetadataCustomerMetadata](docs/EarningRuleProportionalCustomerMetadataCustomerMetadata.md)
+ - [VoucherifySdk::EarningRuleProportionalOrder](docs/EarningRuleProportionalOrder.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderAmount](docs/EarningRuleProportionalOrderAmount.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderAmountOrder](docs/EarningRuleProportionalOrderAmountOrder.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderAmountOrderAmount](docs/EarningRuleProportionalOrderAmountOrderAmount.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderItems](docs/EarningRuleProportionalOrderItems.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderItemsAmount](docs/EarningRuleProportionalOrderItemsAmount.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderItemsAmountOrderItems](docs/EarningRuleProportionalOrderItemsAmountOrderItems.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderItemsAmountOrderItemsAmount](docs/EarningRuleProportionalOrderItemsAmountOrderItemsAmount.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderItemsQuantity](docs/EarningRuleProportionalOrderItemsQuantity.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderItemsQuantityOrderItems](docs/EarningRuleProportionalOrderItemsQuantityOrderItems.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderItemsSubtotalAmount](docs/EarningRuleProportionalOrderItemsSubtotalAmount.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderItemsSubtotalAmountOrderItems](docs/EarningRuleProportionalOrderItemsSubtotalAmountOrderItems.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderMetadata](docs/EarningRuleProportionalOrderMetadata.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderMetadataOrder](docs/EarningRuleProportionalOrderMetadataOrder.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderMetadataOrderMetadata](docs/EarningRuleProportionalOrderMetadataOrderMetadata.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderTotalAmount](docs/EarningRuleProportionalOrderTotalAmount.md)
+ - [VoucherifySdk::EarningRuleProportionalOrderTotalAmountOrder](docs/EarningRuleProportionalOrderTotalAmountOrder.md)
+ - [VoucherifySdk::Error](docs/Error.md)
+ - [VoucherifySdk::EventCustomerActiveCampaignFailed](docs/EventCustomerActiveCampaignFailed.md)
+ - [VoucherifySdk::EventCustomerActiveCampaignRecovered](docs/EventCustomerActiveCampaignRecovered.md)
+ - [VoucherifySdk::EventCustomerActiveCampaignSent](docs/EventCustomerActiveCampaignSent.md)
+ - [VoucherifySdk::EventCustomerBatchFailed](docs/EventCustomerBatchFailed.md)
+ - [VoucherifySdk::EventCustomerBatchRecovered](docs/EventCustomerBatchRecovered.md)
+ - [VoucherifySdk::EventCustomerBatchSent](docs/EventCustomerBatchSent.md)
+ - [VoucherifySdk::EventCustomerBrazeFailed](docs/EventCustomerBrazeFailed.md)
+ - [VoucherifySdk::EventCustomerBrazeRecovered](docs/EventCustomerBrazeRecovered.md)
+ - [VoucherifySdk::EventCustomerBrazeSent](docs/EventCustomerBrazeSent.md)
+ - [VoucherifySdk::EventCustomerConfirmed](docs/EventCustomerConfirmed.md)
+ - [VoucherifySdk::EventCustomerConfirmedUnconfirmedCustomer](docs/EventCustomerConfirmedUnconfirmedCustomer.md)
+ - [VoucherifySdk::EventCustomerConsents](docs/EventCustomerConsents.md)
+ - [VoucherifySdk::EventCustomerConsentsGiven](docs/EventCustomerConsentsGiven.md)
+ - [VoucherifySdk::EventCustomerConsentsRevoked](docs/EventCustomerConsentsRevoked.md)
+ - [VoucherifySdk::EventCustomerCreated](docs/EventCustomerCreated.md)
+ - [VoucherifySdk::EventCustomerCustomEvent](docs/EventCustomerCustomEvent.md)
+ - [VoucherifySdk::EventCustomerDeleted](docs/EventCustomerDeleted.md)
+ - [VoucherifySdk::EventCustomerEmailFailed](docs/EventCustomerEmailFailed.md)
+ - [VoucherifySdk::EventCustomerEmailRecovered](docs/EventCustomerEmailRecovered.md)
+ - [VoucherifySdk::EventCustomerEmailSent](docs/EventCustomerEmailSent.md)
+ - [VoucherifySdk::EventCustomerFailed](docs/EventCustomerFailed.md)
+ - [VoucherifySdk::EventCustomerGiftVoucherBalanceAdded](docs/EventCustomerGiftVoucherBalanceAdded.md)
+ - [VoucherifySdk::EventCustomerIntercomFailed](docs/EventCustomerIntercomFailed.md)
+ - [VoucherifySdk::EventCustomerIntercomRecovered](docs/EventCustomerIntercomRecovered.md)
+ - [VoucherifySdk::EventCustomerIntercomSent](docs/EventCustomerIntercomSent.md)
+ - [VoucherifySdk::EventCustomerKlaviyoFailed](docs/EventCustomerKlaviyoFailed.md)
+ - [VoucherifySdk::EventCustomerKlaviyoRecovered](docs/EventCustomerKlaviyoRecovered.md)
+ - [VoucherifySdk::EventCustomerKlaviyoSent](docs/EventCustomerKlaviyoSent.md)
+ - [VoucherifySdk::EventCustomerLoyaltyCardPointsAdded](docs/EventCustomerLoyaltyCardPointsAdded.md)
+ - [VoucherifySdk::EventCustomerLoyaltyCardPointsTransferred](docs/EventCustomerLoyaltyCardPointsTransferred.md)
+ - [VoucherifySdk::EventCustomerLoyaltyTierBase](docs/EventCustomerLoyaltyTierBase.md)
+ - [VoucherifySdk::EventCustomerLoyaltyTierDowngraded](docs/EventCustomerLoyaltyTierDowngraded.md)
+ - [VoucherifySdk::EventCustomerLoyaltyTierExpirationChanged](docs/EventCustomerLoyaltyTierExpirationChanged.md)
+ - [VoucherifySdk::EventCustomerLoyaltyTierJoined](docs/EventCustomerLoyaltyTierJoined.md)
+ - [VoucherifySdk::EventCustomerLoyaltyTierLeft](docs/EventCustomerLoyaltyTierLeft.md)
+ - [VoucherifySdk::EventCustomerLoyaltyTierProlonged](docs/EventCustomerLoyaltyTierProlonged.md)
+ - [VoucherifySdk::EventCustomerLoyaltyTierUpgraded](docs/EventCustomerLoyaltyTierUpgraded.md)
+ - [VoucherifySdk::EventCustomerLoyaltyUpdated](docs/EventCustomerLoyaltyUpdated.md)
+ - [VoucherifySdk::EventCustomerMailchimpFailed](docs/EventCustomerMailchimpFailed.md)
+ - [VoucherifySdk::EventCustomerMailchimpRecovered](docs/EventCustomerMailchimpRecovered.md)
+ - [VoucherifySdk::EventCustomerMailchimpSent](docs/EventCustomerMailchimpSent.md)
+ - [VoucherifySdk::EventCustomerOrder](docs/EventCustomerOrder.md)
+ - [VoucherifySdk::EventCustomerOrderCanceled](docs/EventCustomerOrderCanceled.md)
+ - [VoucherifySdk::EventCustomerOrderCreated](docs/EventCustomerOrderCreated.md)
+ - [VoucherifySdk::EventCustomerOrderFulfilled](docs/EventCustomerOrderFulfilled.md)
+ - [VoucherifySdk::EventCustomerOrderPaid](docs/EventCustomerOrderPaid.md)
+ - [VoucherifySdk::EventCustomerOrderProcessing](docs/EventCustomerOrderProcessing.md)
+ - [VoucherifySdk::EventCustomerOrderUpdated](docs/EventCustomerOrderUpdated.md)
+ - [VoucherifySdk::EventCustomerPublicationFailed](docs/EventCustomerPublicationFailed.md)
+ - [VoucherifySdk::EventCustomerPublicationSucceeded](docs/EventCustomerPublicationSucceeded.md)
+ - [VoucherifySdk::EventCustomerRecovered](docs/EventCustomerRecovered.md)
+ - [VoucherifySdk::EventCustomerRedemption](docs/EventCustomerRedemption.md)
+ - [VoucherifySdk::EventCustomerRedemptionFailed](docs/EventCustomerRedemptionFailed.md)
+ - [VoucherifySdk::EventCustomerRedemptionRollbackFailed](docs/EventCustomerRedemptionRollbackFailed.md)
+ - [VoucherifySdk::EventCustomerRedemptionRollbackSucceeded](docs/EventCustomerRedemptionRollbackSucceeded.md)
+ - [VoucherifySdk::EventCustomerRedemptionSucceeded](docs/EventCustomerRedemptionSucceeded.md)
+ - [VoucherifySdk::EventCustomerReferred](docs/EventCustomerReferred.md)
+ - [VoucherifySdk::EventCustomerRewardRedemptions](docs/EventCustomerRewardRedemptions.md)
+ - [VoucherifySdk::EventCustomerRewardRedemptionsCompleted](docs/EventCustomerRewardRedemptionsCompleted.md)
+ - [VoucherifySdk::EventCustomerRewardRedemptionsCreated](docs/EventCustomerRewardRedemptionsCreated.md)
+ - [VoucherifySdk::EventCustomerRewardRedemptionsPending](docs/EventCustomerRewardRedemptionsPending.md)
+ - [VoucherifySdk::EventCustomerRewardRedemptionsRolledBack](docs/EventCustomerRewardRedemptionsRolledBack.md)
+ - [VoucherifySdk::EventCustomerRewarded](docs/EventCustomerRewarded.md)
+ - [VoucherifySdk::EventCustomerRewardedLoyaltyPoints](docs/EventCustomerRewardedLoyaltyPoints.md)
+ - [VoucherifySdk::EventCustomerSegmentEntered](docs/EventCustomerSegmentEntered.md)
+ - [VoucherifySdk::EventCustomerSegmentLeft](docs/EventCustomerSegmentLeft.md)
+ - [VoucherifySdk::EventCustomerSent](docs/EventCustomerSent.md)
+ - [VoucherifySdk::EventCustomerShopifyFailed](docs/EventCustomerShopifyFailed.md)
+ - [VoucherifySdk::EventCustomerShopifyRecovered](docs/EventCustomerShopifyRecovered.md)
+ - [VoucherifySdk::EventCustomerShopifySent](docs/EventCustomerShopifySent.md)
+ - [VoucherifySdk::EventCustomerSmsFailed](docs/EventCustomerSmsFailed.md)
+ - [VoucherifySdk::EventCustomerSmsRecovered](docs/EventCustomerSmsRecovered.md)
+ - [VoucherifySdk::EventCustomerSmsSent](docs/EventCustomerSmsSent.md)
+ - [VoucherifySdk::EventCustomerUpdated](docs/EventCustomerUpdated.md)
+ - [VoucherifySdk::EventCustomerValidationFailed](docs/EventCustomerValidationFailed.md)
+ - [VoucherifySdk::EventCustomerValidationSucceeded](docs/EventCustomerValidationSucceeded.md)
+ - [VoucherifySdk::EventCustomerVoucherDeleted](docs/EventCustomerVoucherDeleted.md)
+ - [VoucherifySdk::EventCustomerVouchersLoyaltyPointsExpired](docs/EventCustomerVouchersLoyaltyPointsExpired.md)
+ - [VoucherifySdk::EventsCreateRequestBody](docs/EventsCreateRequestBody.md)
+ - [VoucherifySdk::EventsCreateResponseBody](docs/EventsCreateResponseBody.md)
+ - [VoucherifySdk::Export](docs/Export.md)
+ - [VoucherifySdk::ExportBase](docs/ExportBase.md)
+ - [VoucherifySdk::ExportBaseResult](docs/ExportBaseResult.md)
+ - [VoucherifySdk::ExportCustomer](docs/ExportCustomer.md)
+ - [VoucherifySdk::ExportCustomerBase](docs/ExportCustomerBase.md)
+ - [VoucherifySdk::ExportCustomerBaseParameters](docs/ExportCustomerBaseParameters.md)
+ - [VoucherifySdk::ExportCustomerFields](docs/ExportCustomerFields.md)
+ - [VoucherifySdk::ExportCustomerOrder](docs/ExportCustomerOrder.md)
+ - [VoucherifySdk::ExportCustomerScheduled](docs/ExportCustomerScheduled.md)
+ - [VoucherifySdk::ExportOrder](docs/ExportOrder.md)
+ - [VoucherifySdk::ExportOrderBase](docs/ExportOrderBase.md)
+ - [VoucherifySdk::ExportOrderFields](docs/ExportOrderFields.md)
+ - [VoucherifySdk::ExportOrderOrder](docs/ExportOrderOrder.md)
+ - [VoucherifySdk::ExportOrderScheduled](docs/ExportOrderScheduled.md)
+ - [VoucherifySdk::ExportPointsExpiration](docs/ExportPointsExpiration.md)
+ - [VoucherifySdk::ExportPointsExpirationBase](docs/ExportPointsExpirationBase.md)
+ - [VoucherifySdk::ExportPointsExpirationBaseParameters](docs/ExportPointsExpirationBaseParameters.md)
+ - [VoucherifySdk::ExportPointsExpirationFields](docs/ExportPointsExpirationFields.md)
+ - [VoucherifySdk::ExportPointsExpirationFilters](docs/ExportPointsExpirationFilters.md)
+ - [VoucherifySdk::ExportPointsExpirationOrder](docs/ExportPointsExpirationOrder.md)
+ - [VoucherifySdk::ExportPointsExpirationScheduled](docs/ExportPointsExpirationScheduled.md)
+ - [VoucherifySdk::ExportPublication](docs/ExportPublication.md)
+ - [VoucherifySdk::ExportPublicationBase](docs/ExportPublicationBase.md)
+ - [VoucherifySdk::ExportPublicationBaseParameters](docs/ExportPublicationBaseParameters.md)
+ - [VoucherifySdk::ExportPublicationFields](docs/ExportPublicationFields.md)
+ - [VoucherifySdk::ExportPublicationOrder](docs/ExportPublicationOrder.md)
+ - [VoucherifySdk::ExportPublicationScheduled](docs/ExportPublicationScheduled.md)
+ - [VoucherifySdk::ExportRedemption](docs/ExportRedemption.md)
+ - [VoucherifySdk::ExportRedemptionBase](docs/ExportRedemptionBase.md)
+ - [VoucherifySdk::ExportRedemptionBaseParameters](docs/ExportRedemptionBaseParameters.md)
+ - [VoucherifySdk::ExportRedemptionFields](docs/ExportRedemptionFields.md)
+ - [VoucherifySdk::ExportRedemptionOrder](docs/ExportRedemptionOrder.md)
+ - [VoucherifySdk::ExportRedemptionScheduled](docs/ExportRedemptionScheduled.md)
+ - [VoucherifySdk::ExportScheduledBase](docs/ExportScheduledBase.md)
+ - [VoucherifySdk::ExportVoucher](docs/ExportVoucher.md)
+ - [VoucherifySdk::ExportVoucherBase](docs/ExportVoucherBase.md)
+ - [VoucherifySdk::ExportVoucherBaseParameters](docs/ExportVoucherBaseParameters.md)
+ - [VoucherifySdk::ExportVoucherFields](docs/ExportVoucherFields.md)
+ - [VoucherifySdk::ExportVoucherOrder](docs/ExportVoucherOrder.md)
+ - [VoucherifySdk::ExportVoucherScheduled](docs/ExportVoucherScheduled.md)
+ - [VoucherifySdk::ExportVoucherTransactions](docs/ExportVoucherTransactions.md)
+ - [VoucherifySdk::ExportVoucherTransactionsBase](docs/ExportVoucherTransactionsBase.md)
+ - [VoucherifySdk::ExportVoucherTransactionsFields](docs/ExportVoucherTransactionsFields.md)
+ - [VoucherifySdk::ExportVoucherTransactionsFilters](docs/ExportVoucherTransactionsFilters.md)
+ - [VoucherifySdk::ExportVoucherTransactionsOrder](docs/ExportVoucherTransactionsOrder.md)
+ - [VoucherifySdk::ExportVoucherTransactionsScheduled](docs/ExportVoucherTransactionsScheduled.md)
+ - [VoucherifySdk::ExportsCreateRequestBody](docs/ExportsCreateRequestBody.md)
+ - [VoucherifySdk::ExportsCreateResponseBody](docs/ExportsCreateResponseBody.md)
+ - [VoucherifySdk::ExportsGetResponseBody](docs/ExportsGetResponseBody.md)
+ - [VoucherifySdk::ExportsListResponseBody](docs/ExportsListResponseBody.md)
+ - [VoucherifySdk::FieldConditions](docs/FieldConditions.md)
+ - [VoucherifySdk::FilterConditionsString](docs/FilterConditionsString.md)
+ - [VoucherifySdk::FiltersCondition](docs/FiltersCondition.md)
+ - [VoucherifySdk::Gift](docs/Gift.md)
+ - [VoucherifySdk::GiftCampaignVoucher](docs/GiftCampaignVoucher.md)
+ - [VoucherifySdk::GiveawayCampaignVoucher](docs/GiveawayCampaignVoucher.md)
+ - [VoucherifySdk::InapplicableTo](docs/InapplicableTo.md)
+ - [VoucherifySdk::InapplicableToResultList](docs/InapplicableToResultList.md)
+ - [VoucherifySdk::Junction](docs/Junction.md)
+ - [VoucherifySdk::ListPublicationsItemBase](docs/ListPublicationsItemBase.md)
+ - [VoucherifySdk::ListPublicationsItemInvalid](docs/ListPublicationsItemInvalid.md)
+ - [VoucherifySdk::ListPublicationsItemValidMultipleVouchers](docs/ListPublicationsItemValidMultipleVouchers.md)
+ - [VoucherifySdk::ListPublicationsItemValidSingleVoucher](docs/ListPublicationsItemValidSingleVoucher.md)
+ - [VoucherifySdk::ListPublicationsItemVoucher](docs/ListPublicationsItemVoucher.md)
+ - [VoucherifySdk::LoyaltiesDeleteResponseBody](docs/LoyaltiesDeleteResponseBody.md)
+ - [VoucherifySdk::LoyaltiesEarningRulesDisableResponseBody](docs/LoyaltiesEarningRulesDisableResponseBody.md)
+ - [VoucherifySdk::LoyaltiesEarningRulesEnableResponseBody](docs/LoyaltiesEarningRulesEnableResponseBody.md)
+ - [VoucherifySdk::LoyaltiesEarningRulesGetResponseBody](docs/LoyaltiesEarningRulesGetResponseBody.md)
+ - [VoucherifySdk::LoyaltiesLoyaltyTierReward](docs/LoyaltiesLoyaltyTierReward.md)
+ - [VoucherifySdk::LoyaltiesMembersBalanceUpdateRequestBody](docs/LoyaltiesMembersBalanceUpdateRequestBody.md)
+ - [VoucherifySdk::LoyaltiesMembersBalanceUpdateResponseBody](docs/LoyaltiesMembersBalanceUpdateResponseBody.md)
+ - [VoucherifySdk::LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject](docs/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md)
+ - [VoucherifySdk::LoyaltiesMembersPointsExpirationListResponseBody](docs/LoyaltiesMembersPointsExpirationListResponseBody.md)
+ - [VoucherifySdk::LoyaltiesMembersPointsExpirationListResponseBodyDataItem](docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md)
+ - [VoucherifySdk::LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket](docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md)
+ - [VoucherifySdk::LoyaltiesMembersRedemptionRedeemRequestBody](docs/LoyaltiesMembersRedemptionRedeemRequestBody.md)
+ - [VoucherifySdk::LoyaltiesMembersRedemptionRedeemRequestBodyReward](docs/LoyaltiesMembersRedemptionRedeemRequestBodyReward.md)
+ - [VoucherifySdk::LoyaltiesMembersRedemptionRedeemResponseBody](docs/LoyaltiesMembersRedemptionRedeemResponseBody.md)
+ - [VoucherifySdk::LoyaltiesMembersRewardsListResponseBody](docs/LoyaltiesMembersRewardsListResponseBody.md)
+ - [VoucherifySdk::LoyaltiesMembersRewardsListResponseBodyDataItem](docs/LoyaltiesMembersRewardsListResponseBodyDataItem.md)
+ - [VoucherifySdk::LoyaltiesMembersTiersListResponseBody](docs/LoyaltiesMembersTiersListResponseBody.md)
+ - [VoucherifySdk::LoyaltiesMembersTransactionsExportCreateRequestBody](docs/LoyaltiesMembersTransactionsExportCreateRequestBody.md)
+ - [VoucherifySdk::LoyaltiesMembersTransactionsExportCreateRequestBodyParameters](docs/LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md)
+ - [VoucherifySdk::LoyaltiesMembersTransactionsExportCreateResponseBody](docs/LoyaltiesMembersTransactionsExportCreateResponseBody.md)
+ - [VoucherifySdk::LoyaltiesMembersTransactionsListResponseBody](docs/LoyaltiesMembersTransactionsListResponseBody.md)
+ - [VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBody](docs/LoyaltiesMembersTransfersCreateResponseBody.md)
+ - [VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyAssets](docs/LoyaltiesMembersTransfersCreateResponseBodyAssets.md)
+ - [VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode](docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md)
+ - [VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyAssetsQr](docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md)
+ - [VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard](docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md)
+ - [VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyPublish](docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md)
+ - [VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyRedemption](docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md)
+ - [VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe](docs/LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.md)
+ - [VoucherifySdk::LoyaltiesRewardAssignmentsGetResponseBody](docs/LoyaltiesRewardAssignmentsGetResponseBody.md)
+ - [VoucherifySdk::LoyaltiesRewardAssignmentsRewardGetResponseBody](docs/LoyaltiesRewardAssignmentsRewardGetResponseBody.md)
+ - [VoucherifySdk::LoyaltiesRewardsGetResponseBody](docs/LoyaltiesRewardsGetResponseBody.md)
+ - [VoucherifySdk::LoyaltiesTiersCreateInBulkRequestBodyItem](docs/LoyaltiesTiersCreateInBulkRequestBodyItem.md)
+ - [VoucherifySdk::LoyaltiesTiersEarningRulesListResponseBody](docs/LoyaltiesTiersEarningRulesListResponseBody.md)
+ - [VoucherifySdk::LoyaltiesTiersGetResponseBody](docs/LoyaltiesTiersGetResponseBody.md)
+ - [VoucherifySdk::LoyaltiesTiersListResponseBody](docs/LoyaltiesTiersListResponseBody.md)
+ - [VoucherifySdk::LoyaltiesTiersRewardsListResponseBody](docs/LoyaltiesTiersRewardsListResponseBody.md)
+ - [VoucherifySdk::LoyaltiesTransferPoints](docs/LoyaltiesTransferPoints.md)
+ - [VoucherifySdk::LoyaltyCardTransaction](docs/LoyaltyCardTransaction.md)
+ - [VoucherifySdk::LoyaltyCardTransactionsType](docs/LoyaltyCardTransactionsType.md)
+ - [VoucherifySdk::LoyaltyTier](docs/LoyaltyTier.md)
+ - [VoucherifySdk::LoyaltyTierAllOfConfig](docs/LoyaltyTierAllOfConfig.md)
+ - [VoucherifySdk::LoyaltyTierAllOfConfigPoints](docs/LoyaltyTierAllOfConfigPoints.md)
+ - [VoucherifySdk::LoyaltyTierBase](docs/LoyaltyTierBase.md)
+ - [VoucherifySdk::LoyaltyTierBasePoints](docs/LoyaltyTierBasePoints.md)
+ - [VoucherifySdk::LoyaltyTierExpiration](docs/LoyaltyTierExpiration.md)
+ - [VoucherifySdk::LoyaltyTiersExpirationAll](docs/LoyaltyTiersExpirationAll.md)
+ - [VoucherifySdk::LoyaltyTiersExpirationAllExpirationDate](docs/LoyaltyTiersExpirationAllExpirationDate.md)
+ - [VoucherifySdk::LoyaltyTiersExpirationAllExpirationDateRounding](docs/LoyaltyTiersExpirationAllExpirationDateRounding.md)
+ - [VoucherifySdk::LoyaltyTiersExpirationAllStartDate](docs/LoyaltyTiersExpirationAllStartDate.md)
+ - [VoucherifySdk::LuckyDraw](docs/LuckyDraw.md)
+ - [VoucherifySdk::MappingFixed](docs/MappingFixed.md)
+ - [VoucherifySdk::MappingMultiply](docs/MappingMultiply.md)
+ - [VoucherifySdk::MappingPoints](docs/MappingPoints.md)
+ - [VoucherifySdk::Order](docs/Order.md)
+ - [VoucherifySdk::OrderBase](docs/OrderBase.md)
+ - [VoucherifySdk::OrderCalculated](docs/OrderCalculated.md)
+ - [VoucherifySdk::OrderCalculatedBase](docs/OrderCalculatedBase.md)
+ - [VoucherifySdk::OrderCalculatedCustomer](docs/OrderCalculatedCustomer.md)
+ - [VoucherifySdk::OrderCalculatedNoCustomerData](docs/OrderCalculatedNoCustomerData.md)
+ - [VoucherifySdk::OrderCalculatedReferrer](docs/OrderCalculatedReferrer.md)
+ - [VoucherifySdk::OrderItem](docs/OrderItem.md)
+ - [VoucherifySdk::OrderItemCalculated](docs/OrderItemCalculated.md)
+ - [VoucherifySdk::OrderItemProduct](docs/OrderItemProduct.md)
+ - [VoucherifySdk::OrderItemSku](docs/OrderItemSku.md)
+ - [VoucherifySdk::OrderRedemptions](docs/OrderRedemptions.md)
+ - [VoucherifySdk::OrdersCreateRequestBody](docs/OrdersCreateRequestBody.md)
+ - [VoucherifySdk::OrdersCreateResponseBody](docs/OrdersCreateResponseBody.md)
+ - [VoucherifySdk::OrdersExportCreateRequestBody](docs/OrdersExportCreateRequestBody.md)
+ - [VoucherifySdk::OrdersExportCreateRequestBodyParameters](docs/OrdersExportCreateRequestBodyParameters.md)
+ - [VoucherifySdk::OrdersExportCreateResponseBody](docs/OrdersExportCreateResponseBody.md)
+ - [VoucherifySdk::OrdersGetResponseBody](docs/OrdersGetResponseBody.md)
+ - [VoucherifySdk::OrdersImportCreateRequestBodyItem](docs/OrdersImportCreateRequestBodyItem.md)
+ - [VoucherifySdk::OrdersImportCreateResponseBody](docs/OrdersImportCreateResponseBody.md)
+ - [VoucherifySdk::OrdersListResponseBody](docs/OrdersListResponseBody.md)
+ - [VoucherifySdk::OrdersUpdateRequestBody](docs/OrdersUpdateRequestBody.md)
+ - [VoucherifySdk::OrdersUpdateResponseBody](docs/OrdersUpdateResponseBody.md)
+ - [VoucherifySdk::ParameterCampaignType](docs/ParameterCampaignType.md)
+ - [VoucherifySdk::ParameterCreatedBeforeAfter](docs/ParameterCreatedBeforeAfter.md)
+ - [VoucherifySdk::ParameterExpandListCampaigns](docs/ParameterExpandListCampaigns.md)
+ - [VoucherifySdk::ParameterFiltersListRedemptions](docs/ParameterFiltersListRedemptions.md)
+ - [VoucherifySdk::ParameterFiltersListRedemptionsCampaignName](docs/ParameterFiltersListRedemptionsCampaignName.md)
+ - [VoucherifySdk::ParameterFiltersListRedemptionsCustomerId](docs/ParameterFiltersListRedemptionsCustomerId.md)
+ - [VoucherifySdk::ParameterFiltersListRedemptionsFailureCode](docs/ParameterFiltersListRedemptionsFailureCode.md)
+ - [VoucherifySdk::ParameterFiltersListRedemptionsObject](docs/ParameterFiltersListRedemptionsObject.md)
+ - [VoucherifySdk::ParameterFiltersListRedemptionsParentRedemptionId](docs/ParameterFiltersListRedemptionsParentRedemptionId.md)
+ - [VoucherifySdk::ParameterFiltersListRedemptionsRelatedObjectId](docs/ParameterFiltersListRedemptionsRelatedObjectId.md)
+ - [VoucherifySdk::ParameterFiltersListRedemptionsRelatedObjectParentId](docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md)
+ - [VoucherifySdk::ParameterFiltersListRedemptionsResult](docs/ParameterFiltersListRedemptionsResult.md)
+ - [VoucherifySdk::ParameterFiltersListRedemptionsUserLogin](docs/ParameterFiltersListRedemptionsUserLogin.md)
+ - [VoucherifySdk::ParameterFiltersListRedemptionsVoucherCode](docs/ParameterFiltersListRedemptionsVoucherCode.md)
+ - [VoucherifySdk::ParameterOrder](docs/ParameterOrder.md)
+ - [VoucherifySdk::ParameterOrderListAllPromotionStacks](docs/ParameterOrderListAllPromotionStacks.md)
+ - [VoucherifySdk::ParameterOrderListCampaigns](docs/ParameterOrderListCampaigns.md)
+ - [VoucherifySdk::ParameterOrderListCustomers](docs/ParameterOrderListCustomers.md)
+ - [VoucherifySdk::ParameterOrderListExports](docs/ParameterOrderListExports.md)
+ - [VoucherifySdk::ParameterOrderListLoyaltyTiers](docs/ParameterOrderListLoyaltyTiers.md)
+ - [VoucherifySdk::ParameterOrderListOrders](docs/ParameterOrderListOrders.md)
+ - [VoucherifySdk::ParameterOrderListPublications](docs/ParameterOrderListPublications.md)
+ - [VoucherifySdk::ParameterOrderListRedemptions](docs/ParameterOrderListRedemptions.md)
+ - [VoucherifySdk::ParameterOrderListValidationRuleAssignments](docs/ParameterOrderListValidationRuleAssignments.md)
+ - [VoucherifySdk::ParameterOrderListValidationRules](docs/ParameterOrderListValidationRules.md)
+ - [VoucherifySdk::ParameterResultListPublications](docs/ParameterResultListPublications.md)
+ - [VoucherifySdk::ParameterUpdatedBeforeAfter](docs/ParameterUpdatedBeforeAfter.md)
+ - [VoucherifySdk::ParameterVoucherTypeListPublications](docs/ParameterVoucherTypeListPublications.md)
+ - [VoucherifySdk::PointsExpirationTypes](docs/PointsExpirationTypes.md)
+ - [VoucherifySdk::Product](docs/Product.md)
+ - [VoucherifySdk::ProductCollectionsCreateDynamicRequestBody](docs/ProductCollectionsCreateDynamicRequestBody.md)
+ - [VoucherifySdk::ProductCollectionsCreateDynamicRequestBodyFilter](docs/ProductCollectionsCreateDynamicRequestBodyFilter.md)
+ - [VoucherifySdk::ProductCollectionsCreateDynamicRequestBodyProductsItem](docs/ProductCollectionsCreateDynamicRequestBodyProductsItem.md)
+ - [VoucherifySdk::ProductCollectionsCreateRequestBody](docs/ProductCollectionsCreateRequestBody.md)
+ - [VoucherifySdk::ProductCollectionsCreateResponseBody](docs/ProductCollectionsCreateResponseBody.md)
+ - [VoucherifySdk::ProductCollectionsCreateStaticRequestBody](docs/ProductCollectionsCreateStaticRequestBody.md)
+ - [VoucherifySdk::ProductCollectionsGetResponseBody](docs/ProductCollectionsGetResponseBody.md)
+ - [VoucherifySdk::ProductCollectionsItem](docs/ProductCollectionsItem.md)
+ - [VoucherifySdk::ProductCollectionsItemProductsItem](docs/ProductCollectionsItemProductsItem.md)
+ - [VoucherifySdk::ProductCollectionsList](docs/ProductCollectionsList.md)
+ - [VoucherifySdk::ProductCollectionsListResponseBody](docs/ProductCollectionsListResponseBody.md)
+ - [VoucherifySdk::ProductCollectionsProductsList](docs/ProductCollectionsProductsList.md)
+ - [VoucherifySdk::ProductCollectionsProductsListProductsItem](docs/ProductCollectionsProductsListProductsItem.md)
+ - [VoucherifySdk::ProductCollectionsProductsListResponseBody](docs/ProductCollectionsProductsListResponseBody.md)
+ - [VoucherifySdk::ProductWithoutSkus](docs/ProductWithoutSkus.md)
+ - [VoucherifySdk::ProductsCreateRequestBody](docs/ProductsCreateRequestBody.md)
+ - [VoucherifySdk::ProductsCreateResponseBody](docs/ProductsCreateResponseBody.md)
+ - [VoucherifySdk::ProductsGetResponseBody](docs/ProductsGetResponseBody.md)
+ - [VoucherifySdk::ProductsImportCsvCreateResponseBody](docs/ProductsImportCsvCreateResponseBody.md)
+ - [VoucherifySdk::ProductsListResponseBody](docs/ProductsListResponseBody.md)
+ - [VoucherifySdk::ProductsMetadataUpdateInBulkRequestBody](docs/ProductsMetadataUpdateInBulkRequestBody.md)
+ - [VoucherifySdk::ProductsMetadataUpdateInBulkResponseBody](docs/ProductsMetadataUpdateInBulkResponseBody.md)
+ - [VoucherifySdk::ProductsSkusCreateRequestBody](docs/ProductsSkusCreateRequestBody.md)
+ - [VoucherifySdk::ProductsSkusCreateResponseBody](docs/ProductsSkusCreateResponseBody.md)
+ - [VoucherifySdk::ProductsSkusListResponseBody](docs/ProductsSkusListResponseBody.md)
+ - [VoucherifySdk::ProductsSkusUpdateRequestBody](docs/ProductsSkusUpdateRequestBody.md)
+ - [VoucherifySdk::ProductsSkusUpdateResponseBody](docs/ProductsSkusUpdateResponseBody.md)
+ - [VoucherifySdk::ProductsUpdateInBulkRequestBody](docs/ProductsUpdateInBulkRequestBody.md)
+ - [VoucherifySdk::ProductsUpdateInBulkResponseBody](docs/ProductsUpdateInBulkResponseBody.md)
+ - [VoucherifySdk::ProductsUpdateRequestBody](docs/ProductsUpdateRequestBody.md)
+ - [VoucherifySdk::ProductsUpdateResponseBody](docs/ProductsUpdateResponseBody.md)
+ - [VoucherifySdk::PromotionStack](docs/PromotionStack.md)
+ - [VoucherifySdk::PromotionStackBase](docs/PromotionStackBase.md)
+ - [VoucherifySdk::PromotionStackBaseTiers](docs/PromotionStackBaseTiers.md)
+ - [VoucherifySdk::PromotionTier](docs/PromotionTier.md)
+ - [VoucherifySdk::PromotionTierAction](docs/PromotionTierAction.md)
+ - [VoucherifySdk::PromotionTierCampaign](docs/PromotionTierCampaign.md)
+ - [VoucherifySdk::PromotionTierCampaignValidityTimeframe](docs/PromotionTierCampaignValidityTimeframe.md)
+ - [VoucherifySdk::PromotionTierCreateParams](docs/PromotionTierCreateParams.md)
+ - [VoucherifySdk::PromotionTierSummary](docs/PromotionTierSummary.md)
+ - [VoucherifySdk::PromotionTierSummaryOrders](docs/PromotionTierSummaryOrders.md)
+ - [VoucherifySdk::PromotionTierSummaryRedemptions](docs/PromotionTierSummaryRedemptions.md)
+ - [VoucherifySdk::PromotionTierValidityTimeframe](docs/PromotionTierValidityTimeframe.md)
+ - [VoucherifySdk::PromotionTiersList](docs/PromotionTiersList.md)
+ - [VoucherifySdk::PromotionsStacksCreateRequestBody](docs/PromotionsStacksCreateRequestBody.md)
+ - [VoucherifySdk::PromotionsStacksCreateResponseBody](docs/PromotionsStacksCreateResponseBody.md)
+ - [VoucherifySdk::PromotionsStacksGetResponseBody](docs/PromotionsStacksGetResponseBody.md)
+ - [VoucherifySdk::PromotionsStacksListResponseBody](docs/PromotionsStacksListResponseBody.md)
+ - [VoucherifySdk::PromotionsStacksUpdateRequestBody](docs/PromotionsStacksUpdateRequestBody.md)
+ - [VoucherifySdk::PromotionsStacksUpdateRequestBodyTiers](docs/PromotionsStacksUpdateRequestBodyTiers.md)
+ - [VoucherifySdk::PromotionsStacksUpdateResponseBody](docs/PromotionsStacksUpdateResponseBody.md)
+ - [VoucherifySdk::PromotionsTiersDisableResponseBody](docs/PromotionsTiersDisableResponseBody.md)
+ - [VoucherifySdk::PromotionsTiersEnableResponseBody](docs/PromotionsTiersEnableResponseBody.md)
+ - [VoucherifySdk::PromotionsTiersGetResponseBody](docs/PromotionsTiersGetResponseBody.md)
+ - [VoucherifySdk::PromotionsTiersListResponseBody](docs/PromotionsTiersListResponseBody.md)
+ - [VoucherifySdk::PropertiesForLoyaltyCampaignOptions](docs/PropertiesForLoyaltyCampaignOptions.md)
+ - [VoucherifySdk::PublicationsCreateBaseResponseBody](docs/PublicationsCreateBaseResponseBody.md)
+ - [VoucherifySdk::PublicationsCreateRequestBody](docs/PublicationsCreateRequestBody.md)
+ - [VoucherifySdk::PublicationsCreateResponseBody](docs/PublicationsCreateResponseBody.md)
+ - [VoucherifySdk::PublicationsCreateVoucherResponseBody](docs/PublicationsCreateVoucherResponseBody.md)
+ - [VoucherifySdk::PublicationsCreateVouchersResponseBody](docs/PublicationsCreateVouchersResponseBody.md)
+ - [VoucherifySdk::PublicationsListResponseBody](docs/PublicationsListResponseBody.md)
+ - [VoucherifySdk::PublicationsListResponseBodyPublicationsItem](docs/PublicationsListResponseBodyPublicationsItem.md)
+ - [VoucherifySdk::QualificationsCheckEligibilityRequestBody](docs/QualificationsCheckEligibilityRequestBody.md)
+ - [VoucherifySdk::QualificationsCheckEligibilityResponseBody](docs/QualificationsCheckEligibilityResponseBody.md)
+ - [VoucherifySdk::QualificationsFieldConditions](docs/QualificationsFieldConditions.md)
+ - [VoucherifySdk::QualificationsFiltersCondition](docs/QualificationsFiltersCondition.md)
+ - [VoucherifySdk::QualificationsOption](docs/QualificationsOption.md)
+ - [VoucherifySdk::QualificationsOptionFilters](docs/QualificationsOptionFilters.md)
+ - [VoucherifySdk::QualificationsOptionFiltersResourceType](docs/QualificationsOptionFiltersResourceType.md)
+ - [VoucherifySdk::QualificationsOptionFiltersResourceTypeConditions](docs/QualificationsOptionFiltersResourceTypeConditions.md)
+ - [VoucherifySdk::QualificationsRedeemable](docs/QualificationsRedeemable.md)
+ - [VoucherifySdk::QualificationsRedeemableBase](docs/QualificationsRedeemableBase.md)
+ - [VoucherifySdk::QualificationsRedeemables](docs/QualificationsRedeemables.md)
+ - [VoucherifySdk::RedeemGiftCard](docs/RedeemGiftCard.md)
+ - [VoucherifySdk::RedeemGiftCardAllOfGift](docs/RedeemGiftCardAllOfGift.md)
+ - [VoucherifySdk::RedeemLoyaltyCard](docs/RedeemLoyaltyCard.md)
+ - [VoucherifySdk::RedeemLoyaltyCardAllOfReward](docs/RedeemLoyaltyCardAllOfReward.md)
+ - [VoucherifySdk::RedeemPromotionStack](docs/RedeemPromotionStack.md)
+ - [VoucherifySdk::RedeemPromotionTier](docs/RedeemPromotionTier.md)
+ - [VoucherifySdk::RedeemVoucher](docs/RedeemVoucher.md)
+ - [VoucherifySdk::RedeemableGift](docs/RedeemableGift.md)
+ - [VoucherifySdk::RedeemableLoyaltyCard](docs/RedeemableLoyaltyCard.md)
+ - [VoucherifySdk::RedeemableResult](docs/RedeemableResult.md)
+ - [VoucherifySdk::RedeemableResultGiftCard](docs/RedeemableResultGiftCard.md)
+ - [VoucherifySdk::RedeemableResultGiftCardGift](docs/RedeemableResultGiftCardGift.md)
+ - [VoucherifySdk::RedeemableResultLoyaltyCard](docs/RedeemableResultLoyaltyCard.md)
+ - [VoucherifySdk::RedeemableResultLoyaltyCardLoyaltyCard](docs/RedeemableResultLoyaltyCardLoyaltyCard.md)
+ - [VoucherifySdk::RedeemableResultPromotionStack](docs/RedeemableResultPromotionStack.md)
+ - [VoucherifySdk::RedeemableResultPromotionTier](docs/RedeemableResultPromotionTier.md)
+ - [VoucherifySdk::RedeemableResultPromotionTierDiscount](docs/RedeemableResultPromotionTierDiscount.md)
+ - [VoucherifySdk::RedeemableResultVoucherCode](docs/RedeemableResultVoucherCode.md)
+ - [VoucherifySdk::Redemption](docs/Redemption.md)
+ - [VoucherifySdk::RedemptionChannel](docs/RedemptionChannel.md)
+ - [VoucherifySdk::RedemptionGift](docs/RedemptionGift.md)
+ - [VoucherifySdk::RedemptionInternal](docs/RedemptionInternal.md)
+ - [VoucherifySdk::RedemptionInternalRelatedRedemptions](docs/RedemptionInternalRelatedRedemptions.md)
+ - [VoucherifySdk::RedemptionInternalRelatedRedemptionsItem](docs/RedemptionInternalRelatedRedemptionsItem.md)
+ - [VoucherifySdk::RedemptionInternalRelatedRedemptionsRollbacksItem](docs/RedemptionInternalRelatedRedemptionsRollbacksItem.md)
+ - [VoucherifySdk::RedemptionLoyaltyCard](docs/RedemptionLoyaltyCard.md)
+ - [VoucherifySdk::RedemptionRelatedRedemptions](docs/RedemptionRelatedRedemptions.md)
+ - [VoucherifySdk::RedemptionRelatedRedemptionsItem](docs/RedemptionRelatedRedemptionsItem.md)
+ - [VoucherifySdk::RedemptionRelatedRedemptionsRollbacksItem](docs/RedemptionRelatedRedemptionsRollbacksItem.md)
+ - [VoucherifySdk::RedemptionRewardResult](docs/RedemptionRewardResult.md)
+ - [VoucherifySdk::RedemptionRewardResultParameters](docs/RedemptionRewardResultParameters.md)
+ - [VoucherifySdk::RedemptionRewardResultParametersCampaign](docs/RedemptionRewardResultParametersCampaign.md)
+ - [VoucherifySdk::RedemptionRewardResultParametersCoin](docs/RedemptionRewardResultParametersCoin.md)
+ - [VoucherifySdk::RedemptionRewardResultParametersProduct](docs/RedemptionRewardResultParametersProduct.md)
+ - [VoucherifySdk::RedemptionRewardResultProduct](docs/RedemptionRewardResultProduct.md)
+ - [VoucherifySdk::RedemptionRewardResultSku](docs/RedemptionRewardResultSku.md)
+ - [VoucherifySdk::RedemptionRewardResultVoucher](docs/RedemptionRewardResultVoucher.md)
+ - [VoucherifySdk::RedemptionRollback](docs/RedemptionRollback.md)
+ - [VoucherifySdk::RedemptionRollbackRelatedRedemptions](docs/RedemptionRollbackRelatedRedemptions.md)
+ - [VoucherifySdk::RedemptionRollbackRelatedRedemptionsItem](docs/RedemptionRollbackRelatedRedemptionsItem.md)
+ - [VoucherifySdk::RedemptionRollbackRelatedRedemptionsRollbacksItem](docs/RedemptionRollbackRelatedRedemptionsRollbacksItem.md)
+ - [VoucherifySdk::RedemptionsGetResponseBody](docs/RedemptionsGetResponseBody.md)
+ - [VoucherifySdk::RedemptionsListResponseBody](docs/RedemptionsListResponseBody.md)
+ - [VoucherifySdk::RedemptionsListResponseBodyRedemptionsItem](docs/RedemptionsListResponseBodyRedemptionsItem.md)
+ - [VoucherifySdk::RedemptionsRedeemRequestBody](docs/RedemptionsRedeemRequestBody.md)
+ - [VoucherifySdk::RedemptionsRedeemResponseBody](docs/RedemptionsRedeemResponseBody.md)
+ - [VoucherifySdk::RedemptionsRollbackCreateRequestBody](docs/RedemptionsRollbackCreateRequestBody.md)
+ - [VoucherifySdk::RedemptionsRollbackCreateResponseBody](docs/RedemptionsRollbackCreateResponseBody.md)
+ - [VoucherifySdk::RedemptionsRollbacksCreateRequestBody](docs/RedemptionsRollbacksCreateRequestBody.md)
+ - [VoucherifySdk::RedemptionsRollbacksCreateResponseBody](docs/RedemptionsRollbacksCreateResponseBody.md)
+ - [VoucherifySdk::ReferralCampaignVoucher](docs/ReferralCampaignVoucher.md)
+ - [VoucherifySdk::ReferralProgram](docs/ReferralProgram.md)
+ - [VoucherifySdk::ReferralProgramCustomEvent](docs/ReferralProgramCustomEvent.md)
+ - [VoucherifySdk::ReferralProgramRefereeReward](docs/ReferralProgramRefereeReward.md)
+ - [VoucherifySdk::ReferralProgramRefereeRewardRelatedObjectParent](docs/ReferralProgramRefereeRewardRelatedObjectParent.md)
+ - [VoucherifySdk::Referrer](docs/Referrer.md)
+ - [VoucherifySdk::ReferrerId](docs/ReferrerId.md)
+ - [VoucherifySdk::ReferrerWithSummaryLoyaltyReferrals](docs/ReferrerWithSummaryLoyaltyReferrals.md)
+ - [VoucherifySdk::ResourceTypes](docs/ResourceTypes.md)
+ - [VoucherifySdk::Reward](docs/Reward.md)
+ - [VoucherifySdk::RewardAssignment](docs/RewardAssignment.md)
+ - [VoucherifySdk::RewardAssignmentBase](docs/RewardAssignmentBase.md)
+ - [VoucherifySdk::RewardAssignmentParameters](docs/RewardAssignmentParameters.md)
+ - [VoucherifySdk::RewardAssignmentParametersParameters](docs/RewardAssignmentParametersParameters.md)
+ - [VoucherifySdk::RewardAssignmentParametersParametersLoyalty](docs/RewardAssignmentParametersParametersLoyalty.md)
+ - [VoucherifySdk::RewardAssignmentsCreateCoinRewardRequestBody](docs/RewardAssignmentsCreateCoinRewardRequestBody.md)
+ - [VoucherifySdk::RewardAssignmentsCreateDigitalOrMaterialRewardRequestBody](docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBody.md)
+ - [VoucherifySdk::RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParameters](docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParameters.md)
+ - [VoucherifySdk::RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParametersLoyalty](docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParametersLoyalty.md)
+ - [VoucherifySdk::RewardAttributes](docs/RewardAttributes.md)
+ - [VoucherifySdk::RewardType](docs/RewardType.md)
+ - [VoucherifySdk::RewardTypeCampaign](docs/RewardTypeCampaign.md)
+ - [VoucherifySdk::RewardTypeCampaignCampaign](docs/RewardTypeCampaignCampaign.md)
+ - [VoucherifySdk::RewardTypeCoin](docs/RewardTypeCoin.md)
+ - [VoucherifySdk::RewardTypeCoinCoin](docs/RewardTypeCoinCoin.md)
+ - [VoucherifySdk::RewardTypeMaterial](docs/RewardTypeMaterial.md)
+ - [VoucherifySdk::RewardTypeMaterialProduct](docs/RewardTypeMaterialProduct.md)
+ - [VoucherifySdk::RewardsAssignmentsCreateRequestBody](docs/RewardsAssignmentsCreateRequestBody.md)
+ - [VoucherifySdk::RewardsAssignmentsCreateResponseBody](docs/RewardsAssignmentsCreateResponseBody.md)
+ - [VoucherifySdk::RewardsAssignmentsGetResponseBody](docs/RewardsAssignmentsGetResponseBody.md)
+ - [VoucherifySdk::RewardsAssignmentsListResponseBody](docs/RewardsAssignmentsListResponseBody.md)
+ - [VoucherifySdk::RewardsAssignmentsUpdateRequestBody](docs/RewardsAssignmentsUpdateRequestBody.md)
+ - [VoucherifySdk::RewardsAssignmentsUpdateRequestBodyParameters](docs/RewardsAssignmentsUpdateRequestBodyParameters.md)
+ - [VoucherifySdk::RewardsAssignmentsUpdateRequestBodyParametersLoyalty](docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md)
+ - [VoucherifySdk::RewardsAssignmentsUpdateResponseBody](docs/RewardsAssignmentsUpdateResponseBody.md)
+ - [VoucherifySdk::SchemaThatContainsUniquePropertiesForPromotionCampaignPromotion](docs/SchemaThatContainsUniquePropertiesForPromotionCampaignPromotion.md)
+ - [VoucherifySdk::Session](docs/Session.md)
+ - [VoucherifySdk::SimpleCampaign](docs/SimpleCampaign.md)
+ - [VoucherifySdk::SimpleConsent](docs/SimpleConsent.md)
+ - [VoucherifySdk::SimpleCustomer](docs/SimpleCustomer.md)
+ - [VoucherifySdk::SimpleCustomerRequiredObjectType](docs/SimpleCustomerRequiredObjectType.md)
+ - [VoucherifySdk::SimpleOrder](docs/SimpleOrder.md)
+ - [VoucherifySdk::SimpleOrderItem](docs/SimpleOrderItem.md)
+ - [VoucherifySdk::SimpleProduct](docs/SimpleProduct.md)
+ - [VoucherifySdk::SimpleProductDiscountUnit](docs/SimpleProductDiscountUnit.md)
+ - [VoucherifySdk::SimplePromotionTier](docs/SimplePromotionTier.md)
+ - [VoucherifySdk::SimplePromotionTierCampaign](docs/SimplePromotionTierCampaign.md)
+ - [VoucherifySdk::SimpleRedemption](docs/SimpleRedemption.md)
+ - [VoucherifySdk::SimpleRedemptionRewardResult](docs/SimpleRedemptionRewardResult.md)
+ - [VoucherifySdk::SimpleReferralTier](docs/SimpleReferralTier.md)
+ - [VoucherifySdk::SimpleSegment](docs/SimpleSegment.md)
+ - [VoucherifySdk::SimpleSku](docs/SimpleSku.md)
+ - [VoucherifySdk::SimpleSkuDiscountUnit](docs/SimpleSkuDiscountUnit.md)
+ - [VoucherifySdk::SimpleVoucher](docs/SimpleVoucher.md)
+ - [VoucherifySdk::Sku](docs/Sku.md)
+ - [VoucherifySdk::SkuWithProduct](docs/SkuWithProduct.md)
+ - [VoucherifySdk::SkusGetResponseBody](docs/SkusGetResponseBody.md)
+ - [VoucherifySdk::SkusImportCsvCreateResponseBody](docs/SkusImportCsvCreateResponseBody.md)
+ - [VoucherifySdk::SkusList](docs/SkusList.md)
+ - [VoucherifySdk::SkusListForProduct](docs/SkusListForProduct.md)
+ - [VoucherifySdk::StackableValidateRedeemBase](docs/StackableValidateRedeemBase.md)
+ - [VoucherifySdk::StackableValidateRedeemBaseRedeemablesItem](docs/StackableValidateRedeemBaseRedeemablesItem.md)
+ - [VoucherifySdk::StackingRules](docs/StackingRules.md)
+ - [VoucherifySdk::ValidationEntity](docs/ValidationEntity.md)
+ - [VoucherifySdk::ValidationRule](docs/ValidationRule.md)
+ - [VoucherifySdk::ValidationRuleAssignment](docs/ValidationRuleAssignment.md)
+ - [VoucherifySdk::ValidationRuleAssignmentsList](docs/ValidationRuleAssignmentsList.md)
+ - [VoucherifySdk::ValidationRuleBase](docs/ValidationRuleBase.md)
+ - [VoucherifySdk::ValidationRuleBaseApplicableTo](docs/ValidationRuleBaseApplicableTo.md)
+ - [VoucherifySdk::ValidationRuleBaseError](docs/ValidationRuleBaseError.md)
+ - [VoucherifySdk::ValidationRulesAssignmentsList](docs/ValidationRulesAssignmentsList.md)
+ - [VoucherifySdk::ValidationRulesAssignmentsListResponseBody](docs/ValidationRulesAssignmentsListResponseBody.md)
+ - [VoucherifySdk::ValidationRulesCreateRequestBody](docs/ValidationRulesCreateRequestBody.md)
+ - [VoucherifySdk::ValidationRulesCreateResponseBody](docs/ValidationRulesCreateResponseBody.md)
+ - [VoucherifySdk::ValidationRulesGetResponseBody](docs/ValidationRulesGetResponseBody.md)
+ - [VoucherifySdk::ValidationRulesListResponseBody](docs/ValidationRulesListResponseBody.md)
+ - [VoucherifySdk::ValidationRulesUpdateRequestBody](docs/ValidationRulesUpdateRequestBody.md)
+ - [VoucherifySdk::ValidationRulesUpdateResponseBody](docs/ValidationRulesUpdateResponseBody.md)
+ - [VoucherifySdk::ValidationsRedeemableApplicable](docs/ValidationsRedeemableApplicable.md)
+ - [VoucherifySdk::ValidationsRedeemableApplicableResult](docs/ValidationsRedeemableApplicableResult.md)
+ - [VoucherifySdk::ValidationsRedeemableInapplicable](docs/ValidationsRedeemableInapplicable.md)
+ - [VoucherifySdk::ValidationsRedeemableInapplicableResult](docs/ValidationsRedeemableInapplicableResult.md)
+ - [VoucherifySdk::ValidationsRedeemableSkipped](docs/ValidationsRedeemableSkipped.md)
+ - [VoucherifySdk::ValidationsValidateAllResponseBodyRedeemablesItem](docs/ValidationsValidateAllResponseBodyRedeemablesItem.md)
+ - [VoucherifySdk::ValidationsValidateRequestBody](docs/ValidationsValidateRequestBody.md)
+ - [VoucherifySdk::ValidationsValidateResponseBody](docs/ValidationsValidateResponseBody.md)
+ - [VoucherifySdk::Voucher](docs/Voucher.md)
+ - [VoucherifySdk::VoucherAssets](docs/VoucherAssets.md)
+ - [VoucherifySdk::VoucherGift](docs/VoucherGift.md)
+ - [VoucherifySdk::VoucherLoyaltyCard](docs/VoucherLoyaltyCard.md)
+ - [VoucherifySdk::VoucherPublish](docs/VoucherPublish.md)
+ - [VoucherifySdk::VoucherRedemption](docs/VoucherRedemption.md)
+ - [VoucherifySdk::VoucherTransaction](docs/VoucherTransaction.md)
+ - [VoucherifySdk::VoucherTransactionDetails](docs/VoucherTransactionDetails.md)
+ - [VoucherifySdk::VoucherTransactionDetailsBalance](docs/VoucherTransactionDetailsBalance.md)
+ - [VoucherifySdk::VoucherTransactionDetailsBalanceRelatedObject](docs/VoucherTransactionDetailsBalanceRelatedObject.md)
+ - [VoucherifySdk::VoucherTransactionDetailsCustomEvent](docs/VoucherTransactionDetailsCustomEvent.md)
+ - [VoucherifySdk::VoucherTransactionDetailsEarningRule](docs/VoucherTransactionDetailsEarningRule.md)
+ - [VoucherifySdk::VoucherTransactionDetailsEarningRuleSource](docs/VoucherTransactionDetailsEarningRuleSource.md)
+ - [VoucherifySdk::VoucherTransactionDetailsEvent](docs/VoucherTransactionDetailsEvent.md)
+ - [VoucherifySdk::VoucherTransactionDetailsEventSchema](docs/VoucherTransactionDetailsEventSchema.md)
+ - [VoucherifySdk::VoucherTransactionDetailsLoyaltyTier](docs/VoucherTransactionDetailsLoyaltyTier.md)
+ - [VoucherifySdk::VoucherTransactionDetailsOrder](docs/VoucherTransactionDetailsOrder.md)
+ - [VoucherifySdk::VoucherTransactionDetailsRedemption](docs/VoucherTransactionDetailsRedemption.md)
+ - [VoucherifySdk::VoucherTransactionDetailsReward](docs/VoucherTransactionDetailsReward.md)
+ - [VoucherifySdk::VoucherTransactionDetailsRollback](docs/VoucherTransactionDetailsRollback.md)
+ - [VoucherifySdk::VoucherTransactionDetailsSegment](docs/VoucherTransactionDetailsSegment.md)
+ - [VoucherifySdk::VoucherTransactionsExport](docs/VoucherTransactionsExport.md)
+ - [VoucherifySdk::VoucherTransactionsExportFilterConditions](docs/VoucherTransactionsExportFilterConditions.md)
+ - [VoucherifySdk::VoucherTransactionsExportFilterConditionsVoucherId](docs/VoucherTransactionsExportFilterConditionsVoucherId.md)
+ - [VoucherifySdk::VoucherTransactionsExportFilterConditionsVoucherIdConditions](docs/VoucherTransactionsExportFilterConditionsVoucherIdConditions.md)
+ - [VoucherifySdk::VoucherTransactionsExportParameters](docs/VoucherTransactionsExportParameters.md)
+ - [VoucherifySdk::VoucherTransactionsExportResult](docs/VoucherTransactionsExportResult.md)
+ - [VoucherifySdk::VoucherTransactionsFilters](docs/VoucherTransactionsFilters.md)
+ - [VoucherifySdk::VoucherValidityTimeframe](docs/VoucherValidityTimeframe.md)
+ - [VoucherifySdk::VouchersBalanceUpdateRequestBody](docs/VouchersBalanceUpdateRequestBody.md)
+ - [VoucherifySdk::VouchersBalanceUpdateResponseBody](docs/VouchersBalanceUpdateResponseBody.md)
+ - [VoucherifySdk::VouchersBalanceUpdateResponseBodyRelatedObject](docs/VouchersBalanceUpdateResponseBodyRelatedObject.md)
+ - [VoucherifySdk::VouchersDisableResponseBody](docs/VouchersDisableResponseBody.md)
+ - [VoucherifySdk::VouchersEnableResponseBody](docs/VouchersEnableResponseBody.md)
+ - [VoucherifySdk::VouchersGetResponseBody](docs/VouchersGetResponseBody.md)
+ - [VoucherifySdk::VouchersImportCsvCreateResponseBody](docs/VouchersImportCsvCreateResponseBody.md)
+ - [VoucherifySdk::VouchersRedemptionGetResponseBody](docs/VouchersRedemptionGetResponseBody.md)
+ - [VoucherifySdk::VouchersRedemptionGetResponseBodyRedemptionEntriesItem](docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.md)
+ - [VoucherifySdk::VouchersTransactionsExportCreateRequestBody](docs/VouchersTransactionsExportCreateRequestBody.md)
+ - [VoucherifySdk::VouchersTransactionsExportCreateResponseBody](docs/VouchersTransactionsExportCreateResponseBody.md)
+ - [VoucherifySdk::VouchersTransactionsListResponseBody](docs/VouchersTransactionsListResponseBody.md)
## License
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
-
-[Get Async Action]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-async-actions-1
-[List Async Actions]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-async-actions
-
-[Create Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-voucher
-[Get Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#vouchers-get
-[Update Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-voucher
-[Delete Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-voucher
-[List Vouchers]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-vouchers
-[Enable Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#enable-voucher
-[Disable Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#disable-voucher
-[Import Vouchers]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#import-vouchers-1
-[Add Gift Voucher Balance]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#add-gift-voucher-balance
-
-[Create Campaign]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-campaign
-[Get Campaign]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-campaign
-[Add Voucher to Campaign]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#add-voucher-to-campaign
-[Import Vouchers to Campaign]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#import-vouchers
-
-[Publish Vouchers]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-publication
-[Create Export]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-export
-[Get Export]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-export
-[Delete Export]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-export
-[List Publications]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-publications
-[Create Publication]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-publication
-
-[Validate Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#validate-voucher
-
-[Redeem Voucher]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#redeem-voucher
-[List Redemptions]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-redemptions
-[Get Voucher's Redemptions]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#vouchers-redemptions
-[Get Redemption]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-redemption
-[Rollback Redemption]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#rollback-redemption
-
-[Create Promotion Campaign]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-promotion-campaign
-[Validate Promotion Campaign]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#validate-promotions-1
-[List Promotion's Tiers]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-promotions
-[Create Promotion's Tier]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#add-promotion-tier-to-campaign
-[Redeem Promotion's Tier]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#redeem-promotion
-[Update Promotion's Tier]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-promotion
-[Delete Promotion's Tier]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-promotion
-
-[Create Customer]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-customer
-[Get Customer]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#read-customer
-[Update Customer]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-customer
-[Delete Customer]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-customer
-
-[Create Product]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-product
-[Get Product]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-product
-[Update Product]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-product
-[Delete Product]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-product
-[List Products]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-products
-[Create SKU]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-sku
-[Get SKU]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-sku
-[Update SKU]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-sku
-[Delete SKU]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-sku
-[List all product SKUs]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-skus
-
-[Create Validation Rules]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-validation-rules
-[Get Validation Rules]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-validation-rules
-[List Validation Rules]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-validation-rules
-[Update Validation Rules]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-validation-rules
-[Delete Validation Rules]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-validation-rules
-[Create Validation Rule Assignment]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-validation-rules-assignment
-[Delete Validation Rule Assignment]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-validation-rules-assignment
-[List Validation Rule Assignments]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-validation-rule-assignments
-
-[Create Segment]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-segment
-[Get Segment]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-segment
-[Delete Segment]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-segment
-
-[Events]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#the-custom-event-object
-[Create event]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-custom-event
-
-[Create Order]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-order
-[Get Order]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-order
-[Update Order]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-order
-[List orders]: https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-orders
-
-[Create Rewards]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-reward
-[Get Reward]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-reward
-[Update Reward]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-reward
-[List Rewards]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-rewards
-[Delete Reward]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-reward
-[List Reward Assignments]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-reward-assignments
-[Create Reward Assignment]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-reward-assgnment
-[Update Reward Assignment]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-reward-assignment
-[Delete Reward Assignment]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-reward-assignment
-
-[List Loyalties]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-loyalty-programs
-[Create Loyalty]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-loyalty-program
-[Get Loyalty]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-loyalty-program
-[Update Loyalty]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-loyalty-program
-[Delete Loyalty]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-loyalty-program
-
-[List Loyalty Reward Assignments]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-reward-assignments-1
-[Create Loyalty Reward Assignment]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-reward-assignment-1
-[Update Loyalty Reward Assignment]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-reward-assignment-1
-[Delete Loyalty Reward Assignment]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-reward-assignment-1
-
-[List Loyalty Earning Rules]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-earning-rules
-[Create Loyalty Earning Rule]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-earning-rule
-[Update Loyalty Earning Rule]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#update-earning-rule
-[Delete Loyalty Earning Rule]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#delete-earning-rule
-
-[List Loyalty Members]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#list-members
-[Add Loyalty Member]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#create-member
-[Get Loyalty Member]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#get-member
-[Add Loyalty Card Balance]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#add-loyalty-card-balance
-[Redeem Loyalty Reward]:https://docs.voucherify.io/reference?utm_source=github&utm_medium=sdk&utm_campaign=acq#redeem-loyalty-card
diff --git a/Rakefile b/Rakefile
index 6fdcf652..c72ca30d 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,5 +1,10 @@
-require 'bundler/gem_tasks'
-require 'rspec/core/rake_task'
+require "bundler/gem_tasks"
-RSpec::Core::RakeTask.new(:spec)
-task :default => :spec
\ No newline at end of file
+begin
+ require 'rspec/core/rake_task'
+
+ RSpec::Core::RakeTask.new(:spec)
+ task default: :spec
+rescue LoadError
+ # no rspec available
+end
diff --git a/VoucherifySdk.gemspec b/VoucherifySdk.gemspec
new file mode 100644
index 00000000..4ef39318
--- /dev/null
+++ b/VoucherifySdk.gemspec
@@ -0,0 +1,37 @@
+# -*- encoding: utf-8 -*-
+
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+$:.push File.expand_path("../lib", __FILE__)
+require "VoucherifySdk/version"
+
+Gem::Specification.new do |s|
+ s.name = "voucherify"
+ s.version = VoucherifySdk::VERSION
+ s.platform = Gem::Platform::RUBY
+ s.authors = ['pawelrychlik']
+ s.email = ['pawel.rychlik@rspective.pl']
+
+ s.summary = %q{Ruby SDK for Voucherify. More info on http://www.voucherify.io}
+ s.homepage = 'https://github.com/voucherifyio/sdk-ruby-openapi-based'
+ s.license = 'MIT'
+ s.required_ruby_version = ">= 2.7"
+
+ s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
+
+ s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
+
+ s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? }
+ s.test_files = `find __tests__/spec/*`.split("\n")
+ s.require_paths = ["lib"]
+end
diff --git a/__tests__/README.md b/__tests__/README.md
new file mode 100644
index 00000000..1f1f81e7
--- /dev/null
+++ b/__tests__/README.md
@@ -0,0 +1,35 @@
+## Introductions
+
+This is the test suite for the Voucherify Ruby SDK, which is based on the OpenAPI specification.
+Instead of relying on an automatically generated SDK tests, this test suite has been manually crafted.
+The primary reason for this approach is to ensure that the most critical aspects of the SDK function flawlessly.
+
+## Running tests
+
+We strongly recommend running the tests using the Dockerfile provided in the root directory.
+If you prefer to run tests locally, here are the steps you need to follow.
+
+### Requirements
+
+- all elements described in [main README.md](../README.md) like Ruby and Gem manager
+- Voucherify SDK built locally
+- rspec installed `(gem install rspec)`
+
+### Running locally
+
+1. Go into `root` directory
+2. Follow the steps described in [main README.md](../README.md) for building SDK locally
+3. Run `gem install rspec` command
+4. Go into `__tests__` directory
+5. Run `rspec ./spec` command
+
+**Note that running tests will affect your Voucherify project data. Run tests only on development projects.**
+
+## Contributing
+
+All new tests should be added to the `spec` directory.
+This directory is intended exclusively for test suites and should contain minimal logic.
+Place all advanced logic in the `lib` directory. It's important to maintain an appropriate division of modules and functions.
+Keep any essential global logic in the `voucherify_data.rb` singleton.
+
+**Please note that in the current state of the test suite, some tests are interdependent. All tests run in alphanumeric order within the `spec` directory.**
diff --git a/__tests__/lib/campaigns.rb b/__tests__/lib/campaigns.rb
new file mode 100644
index 00000000..0fbba38c
--- /dev/null
+++ b/__tests__/lib/campaigns.rb
@@ -0,0 +1,128 @@
+require_relative 'utils.rb'
+require 'VoucherifySdk'
+require 'json'
+
+def create_validation_rule_applicable_to(validation_rules_api_instance, product_id)
+ begin
+ created_validation_rule = validation_rules_api_instance.create_validation_rules({
+ validation_rules_create_request_body: VoucherifySdk::ValidationRulesCreateRequestBody.new({
+ name: generate_random_string(),
+ applicable_to: VoucherifySdk::ValidationRuleBaseApplicableTo.new({
+ included: [VoucherifySdk::ApplicableTo.new({
+ object: "product",
+ id: product_id
+ })]
+ }),
+ type:"basic",
+ })
+ })
+
+ return created_validation_rule
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+def create_validation_rule_more_than(validation_rules_api_instance, product_id)
+ begin
+ created_validation_rule = validation_rules_api_instance.create_validation_rules({
+ validation_rules_create_request_body: VoucherifySdk::ValidationRulesCreateRequestBody.new({
+ name: generate_random_string(),
+ rules: {
+ "1": {
+ name: "order.amount",
+ conditions: {
+ "$more_than": [500000]
+ },
+ rules: {}
+ }
+ },
+ type:"basic",
+ })
+ })
+
+ return created_validation_rule
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+def create_discount_campaign(campaigns_api_instance, validation_rule_id)
+ begin
+ campaign = campaigns_api_instance.create_campaign({
+ campaigns_create_request_body: VoucherifySdk::CampaignsCreateDiscountCouponsCampaign.new({
+ campaign_type: "DISCOUNT_COUPONS",
+ name: generate_random_string(),
+ type: "AUTO_UPDATE",
+ voucher: VoucherifySdk::DiscountCouponsCampaignVoucher.new({
+ discount: VoucherifySdk::DiscountAmount.new({
+ type: "AMOUNT",
+ amount_off: 1000
+ })
+ }),
+ validation_rules: [validation_rule_id]
+ })
+ })
+
+ return campaign
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+def create_promotion_campaign(campaigns_api_instance)
+ begin
+
+ campaign = campaigns_api_instance.create_campaign({
+ campaigns_create_request_body: {
+ campaign_type: "PROMOTION",
+ name: generate_random_string(),
+ promotion: {
+ tiers: [
+ {
+ name: generate_random_string(),
+ banner: generate_random_string(),
+ action: {
+ discount: {
+ type: "AMOUNT",
+ amount_off: 1000
+ }
+ }
+ }
+ ]}
+ }
+ })
+
+ return campaign
+ end
+end
+
+def create_loyalty_campaign(campaigns_api_instance)
+ begin
+ campaign = campaigns_api_instance.create_campaign({
+ campaigns_create_request_body: {
+ campaign_type: "LOYALTY_PROGRAM",
+ name: generate_random_string(),
+ voucher: {
+ type: "LOYALTY_CARD",
+ loyalty_card: {
+ points: 1000,
+ }
+ }
+ }
+ })
+ end
+end
+
+def delete_campaign(campaigns_api_instance, campaign_id)
+ begin
+ result = campaigns_api_instance.delete_campaign(campaign_id)
+
+ return result
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+
+
diff --git a/__tests__/lib/config.rb b/__tests__/lib/config.rb
new file mode 100644
index 00000000..51a9b016
--- /dev/null
+++ b/__tests__/lib/config.rb
@@ -0,0 +1,70 @@
+require 'time'
+require 'VoucherifySdk'
+require 'json/ext'
+require 'dotenv'
+
+current_directory = File.dirname(__FILE__)
+parent_directory = File.expand_path('../..', current_directory)
+dotenv_path = File.join(parent_directory, '.env')
+
+Dotenv.load(dotenv_path)
+
+module Config
+ VoucherifySdk.configure do |config|
+ config.api_key['X-App-Id'] = ENV['X_APP_ID']
+ config.api_key['X-App-Token'] = ENV['X_APP_TOKEN']
+ config.host = ENV['VOUCHERIFY_HOST'] || 'https://api.voucherify.io'
+ end
+
+ def self.products_api_instance
+ return VoucherifySdk::ProductsApi.new()
+ end
+
+ def self.campaigns_api_instance
+ return VoucherifySdk::CampaignsApi.new()
+ end
+
+ def self.validation_rules_api_instance
+ return VoucherifySdk::ValidationRulesApi.new()
+ end
+
+ def self.customers_api_instance
+ return VoucherifySdk::CustomersApi.new()
+ end
+
+ def self.exports_api_instance
+ return VoucherifySdk::ExportsApi.new()
+ end
+
+ def self.redemptions_api_instance
+ return VoucherifySdk::RedemptionsApi.new()
+ end
+
+ def self.publications_api_instance
+ return VoucherifySdk::PublicationsApi.new()
+ end
+
+ def self.qualifications_api_instance
+ return VoucherifySdk::QualificationsApi.new()
+ end
+
+ def self.validations_api_instance
+ return VoucherifySdk::ValidationsApi.new()
+ end
+
+ def self.vouchers_api_instance
+ return VoucherifySdk::VouchersApi.new()
+ end
+
+ def self.events_api_instance
+ return VoucherifySdk::EventsApi.new()
+ end
+
+ def generate_random_string(length=10)
+ chars = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a
+ random_string = Array.new(length) { chars.sample }.join
+ return random_string
+ end
+
+end
+
diff --git a/__tests__/lib/customers.rb b/__tests__/lib/customers.rb
new file mode 100644
index 00000000..2638baff
--- /dev/null
+++ b/__tests__/lib/customers.rb
@@ -0,0 +1,34 @@
+require_relative 'utils.rb'
+require 'VoucherifySdk'
+
+def create_customer(customers_api_instance)
+ begin
+ # Create Customer
+ created_customer = customers_api_instance.create_customer({
+ customers_create_request_body: VoucherifySdk::CustomersCreateRequestBody.new({
+ source_id: generate_random_string(),
+ name: "John Doe",
+ address: VoucherifySdk::CustomerBaseAddress.new({
+ country: "US",
+ city: "New York",
+ line_1: "5th Avenue",
+ line_2: "1/2",
+ postal_code: "11-111"
+ })
+ })
+ })
+ return created_customer
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+def delete_customer_permanently(customers_api_instance, customer_id)
+ begin
+ # Delete Customer
+ result = customers_api_instance.customer_permanently_deletion(customer_id)
+ return result
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
diff --git a/__tests__/lib/events.rb b/__tests__/lib/events.rb
new file mode 100644
index 00000000..f7baabd9
--- /dev/null
+++ b/__tests__/lib/events.rb
@@ -0,0 +1,24 @@
+require_relative 'utils.rb'
+require 'VoucherifySdk'
+
+def create_event(events_api_instance)
+ begin
+ events_create_request_body = VoucherifySdk::EventsCreateRequestBody.new({
+ event: 'test-event',
+ customer: VoucherifySdk::Customer.new({
+ source_id: 'test-customer'
+ }),
+ metadata: nil,
+ referral: nil,
+ loyalty: nil
+ })
+
+ created_event = events_api_instance.track_custom_event({
+ events_create_request_body: events_create_request_body
+ })
+
+ return created_event
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
\ No newline at end of file
diff --git a/__tests__/lib/products.rb b/__tests__/lib/products.rb
new file mode 100644
index 00000000..4e8e5efa
--- /dev/null
+++ b/__tests__/lib/products.rb
@@ -0,0 +1,116 @@
+require_relative 'utils.rb'
+require 'VoucherifySdk'
+
+def create_product(products_api_instance, price)
+ begin
+ result = products_api_instance.create_product({
+ products_create_request_body: VoucherifySdk::ProductsCreateRequestBody.new({
+ source_id: generate_random_string(),
+ name: generate_random_string(),
+ price: price,
+ attributes: ["color", "memory", "processor"]
+ })
+ })
+ return result
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+def delete_product(products_api_instance, product_id)
+ begin
+ result = products_api_instance.delete_product(product_id, {
+ force: true
+ })
+ return result
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+def update_product(products_api_instance, source_id)
+ begin
+ result = products_api_instance.update_product(source_id, {
+ products_update_request_body: VoucherifySdk::ProductsUpdateRequestBody.new({
+ price: 55000
+ })
+ })
+ return result
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+def update_product_in_bulk(products_api_instance)
+ begin
+ result = products_api_instance.update_products_in_bulk({
+ products_update_in_bulk_request_body: [
+ VoucherifySdk::ProductsUpdateInBulkRequestBody.new({source_id: generate_random_string(), price: 1000}),
+ VoucherifySdk::ProductsUpdateInBulkRequestBody.new({source_id: generate_random_string(), price: 2000}),
+ ]
+ })
+ return result
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+def update_metadata_in_bulk(products_api_instance, source_ids)
+ begin
+ result = products_api_instance.update_products_metadata_in_bulk({
+ products_metadata_update_in_bulk_request_body: VoucherifySdk::ProductsMetadataUpdateInBulkRequestBody.new({
+ source_ids: source_ids,
+ metadata: {
+ "key1" => "value1",
+ "key2" => "value2"
+ }
+ })
+ })
+ return result
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+def create_sku(products_api_instance, source_id, price)
+ begin
+ result = products_api_instance.create_sku(source_id, {
+ products_skus_create_request_body: VoucherifySdk::ProductsSkusCreateRequestBody.new({
+ source_id: generate_random_string(),
+ price: price,
+ attributes: {
+ "color": "red",
+ "memory": "16GB",
+ "processor": "Intel Core i7"
+ }
+ })
+ })
+ return result
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+def update_sku(products_api_instance, source_id, sku_id, price)
+ begin
+ result = products_api_instance.update_sku(source_id, sku_id, {
+ products_skus_update_request_body: VoucherifySdk::ProductsSkusUpdateRequestBody.new({
+ price: price
+ })
+ })
+ return result
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
+
+def delete_sku(products_api_instance, source_id, sku_id)
+ begin
+ result = products_api_instance.delete_sku(source_id, sku_id, {
+ force: true
+ })
+ return result
+ rescue VoucherifySdk::ApiError => e
+ return nil
+ end
+end
diff --git a/__tests__/lib/stackables.rb b/__tests__/lib/stackables.rb
new file mode 100644
index 00000000..2cabdebb
--- /dev/null
+++ b/__tests__/lib/stackables.rb
@@ -0,0 +1,59 @@
+def create_request_body_redeemable(voucher_id)
+ begin
+ validations_validate_request_body_redeemables = [
+ VoucherifySdk::RedeemVoucher.new({
+ object: "voucher", id: voucher_id
+ })
+ ]
+ return validations_validate_request_body_redeemables
+ end
+end
+
+
+def validate_stacked_discounts(validations_api_instance, voucher_id, product_id, customer, amount)
+ begin
+ result = validations_api_instance.validate_stacked_discounts({
+ validations_validate_request_body: VoucherifySdk::ValidationsValidateRequestBody.new({
+ redeemables: create_request_body_redeemable(voucher_id),
+ order: {
+ items: [{
+ related_object: "product",
+ quantity: 1,
+ discount_quantity: 1,
+ amount: amount,
+ price: amount,
+ product_id: product_id,
+ product: {
+ id: product_id
+ }
+ }],
+ amount: amount,
+ customer: {
+ id: customer.id
+ }
+ },
+ customer: {
+ source_id: customer.source_id
+ }
+ })
+ })
+ return result;
+ rescue VoucherifySdk::ApiError => e
+ puts(e)
+ return nil;
+ end
+end
+
+def redeem_stacked_discounts(redemptions_api_instance, voucher_id)
+ begin
+ result = redemptions_api_instance.redeem_stacked_discounts({
+ redemptions_redeem_request_body: VoucherifySdk::RedemptionsRedeemRequestBody.new({
+ redeemables: create_request_body_redeemable(voucher_id),
+ order: VoucherifySdk::Order.new(amount: 20000)
+ })
+ })
+ return result;
+ rescue VoucherifySdk::ApiError => e
+ return nil;
+ end
+end
diff --git a/__tests__/lib/utils.rb b/__tests__/lib/utils.rb
new file mode 100644
index 00000000..3c4bc49c
--- /dev/null
+++ b/__tests__/lib/utils.rb
@@ -0,0 +1,5 @@
+def generate_random_string(length=10)
+ chars = ('a'..'z').to_a + ('A'..'Z').to_a + ('0'..'9').to_a
+ random_string = Array.new(length) { chars.sample }.join
+ return random_string
+end
diff --git a/__tests__/lib/voucherify_data.rb b/__tests__/lib/voucherify_data.rb
new file mode 100644
index 00000000..90e640d8
--- /dev/null
+++ b/__tests__/lib/voucherify_data.rb
@@ -0,0 +1,95 @@
+require 'singleton'
+
+class VoucherifyData
+ include Singleton
+
+ attr_accessor :product, :customer
+
+ def initialize
+ @product = nil
+ @customer = nil
+ @discount_campaign = nil
+ @loyalty_campaign = nil
+ @voucher = nil
+ @voucher_with_more_than_validation_rule = nil
+ @loyalty_card = nil
+ @product_ids = []
+ @sku = nil
+ end
+
+ def set_discount_campaign(discount_campaign)
+ @discount_campaign = discount_campaign
+ end
+
+ def get_discount_campaign
+ return @discount_campaign
+ end
+
+ def set_product(product)
+ @product = product
+ end
+
+ def set_customer(customer)
+ @customer = customer
+ end
+
+ def add_product_id(product_id)
+ @product_ids.push(product_id)
+ end
+
+ def get_product_ids
+ @product_ids
+ end
+
+ def get_voucher_with_more_than_validation_rule
+ @voucher_with_more_than_validation_rule
+ end
+
+ def set_voucher_with_more_than_validation_rule(voucher)
+ @voucher_with_more_than_validation_rule = voucher
+ end
+
+ def set_sku(sku)
+ @sku = sku
+ end
+
+ def get_sku
+ @sku
+ end
+
+ def set_voucher(voucher)
+ @voucher = voucher
+ end
+
+ def get_product
+ @product
+ end
+
+ def get_customer
+ @customer
+ end
+
+ def get_discount_campaign
+ @discount_campaign
+ end
+
+ def get_voucher
+ @voucher
+ end
+
+ def get_loyalty_campaign
+ @loyalty_campaign
+ end
+
+ def set_loyalty_campaign(loyalty_campaign)
+ @loyalty_campaign = loyalty_campaign
+ end
+
+ def get_loyalty_card
+ @loyalty_card
+ end
+
+ def set_loyalty_card(loyalty_card)
+ @loyalty_card = loyalty_card
+ end
+end
diff --git a/__tests__/spec/1_products_spec.rb b/__tests__/spec/1_products_spec.rb
new file mode 100644
index 00000000..7290ba60
--- /dev/null
+++ b/__tests__/spec/1_products_spec.rb
@@ -0,0 +1,101 @@
+require_relative '../lib/products.rb'
+require_relative '../lib/config.rb'
+require_relative '../lib/voucherify_data.rb'
+
+RSpec.describe 'Products API', :order => :defined do
+ before(:each) do
+ @products_api_instance = Config.products_api_instance()
+ @voucherify_data = VoucherifyData.instance()
+
+ end
+
+ it 'creates a product with price 20000 and price 60000', :order => :first do
+ created_product = create_product(@products_api_instance, 20000)
+ expect(created_product).not_to be_nil
+
+ @voucherify_data.set_product(created_product)
+ @voucherify_data.add_product_id(created_product.source_id)
+
+ created_product_2 = create_product(@products_api_instance, 60000)
+ expect(created_product_2).not_to be_nil
+
+ @voucherify_data.add_product_id(created_product_2.source_id)
+ end
+
+ it 'get product previously created', :order => :second do
+ product = @products_api_instance.get_product(@voucherify_data.get_product().source_id)
+
+ expect(product).not_to be_nil
+ expect(product.price).to eq(20000)
+ end
+
+ it 'update price of created product to 55000 using source_id for founding product', :order => :third do
+ updated_product = update_product(@products_api_instance, @voucherify_data.get_product().source_id)
+
+ expect(updated_product).not_to be_nil
+ expect(updated_product.price).to eq(55000)
+ end
+
+ it 'list products', :order => :fourth do
+ products = @products_api_instance.list_products()
+
+ expect(products).not_to be_nil
+ expect(products.products.size).to be > 0
+ end
+
+ it 'update products in bulk', :order => :fifth do
+ async_action = update_product_in_bulk(@products_api_instance)
+
+ expect(async_action).not_to be_nil
+ end
+
+ it 'update metadata in bulk', :order => :sixth do
+ async_action = update_metadata_in_bulk(@products_api_instance, @voucherify_data.get_product_ids())
+
+ expect(async_action).not_to be_nil
+ end
+
+ it 'add sku to product with price 5000', :order => :seventh do
+ sku = create_sku(@products_api_instance, @voucherify_data.get_product().source_id, 5000)
+
+ expect(sku).not_to be_nil
+ expect(sku.source_id).not_to be_nil
+ expect(sku.price).to eq(5000)
+
+ @voucherify_data.set_sku(sku)
+ end
+
+ it 'update sku should have price equals 2000', :order => :eighth do
+ sku = update_sku(@products_api_instance, @voucherify_data.get_product().source_id, @voucherify_data.get_sku().source_id, 2000)
+
+ expect(sku).not_to be_nil
+ expect(sku.source_id).not_to be_nil
+ expect(sku.price).to eq(2000)
+ end
+
+ it 'get sku', :order => :ninth do
+ sku = @products_api_instance.get_sku(@voucherify_data.get_sku().source_id)
+
+ expect(sku).not_to be_nil
+ end
+
+ it 'list skus in product', :order => :tenth do
+ skus = @products_api_instance.list_skus_in_product(@voucherify_data.get_product().source_id)
+
+ expect(skus).not_to be_nil
+ expect(skus.skus.size).to be > 0
+ end
+
+ #REMOVE ELEMENTS
+ it 'remove product', :order => :eleventh do
+ deleted_product = delete_product(@products_api_instance, @voucherify_data.get_product().source_id)
+
+ expect(deleted_product).to be_nil
+ end
+
+ it 'remove sku', :order => :twelweth do
+ deleted_sku = delete_sku(@products_api_instance, @voucherify_data.get_product().source_id, @voucherify_data.get_sku().source_id)
+
+ expect(deleted_sku).to be_nil
+ end
+end
diff --git a/__tests__/spec/2_campaigns_spec.rb b/__tests__/spec/2_campaigns_spec.rb
new file mode 100644
index 00000000..4cc5dd10
--- /dev/null
+++ b/__tests__/spec/2_campaigns_spec.rb
@@ -0,0 +1,95 @@
+require_relative '../lib/campaigns.rb'
+require_relative '../lib/config.rb'
+require_relative '../lib/voucherify_data.rb'
+
+RSpec.describe 'Campaigns API', :order => :defined do
+ before(:each) do
+ @campaigns_api_instance = Config.campaigns_api_instance()
+ @validation_rules_api_instance = Config.validation_rules_api_instance()
+ @voucherify_data = VoucherifyData.instance()
+ end
+
+ $created_validation_rule = nil
+ $created_discount_campaign = nil
+ $created_promotion_campaign = nil
+ $created_loyalty_campaign = nil
+ $created_validation_rule_applicable_to = nil
+ $created_campaign_with_validation_rule = nil
+
+ it 'create a validation rule with applicable_to', :order => :first do
+ validation_rule = create_validation_rule_applicable_to(@validation_rules_api_instance, @voucherify_data.get_product.id)
+
+ expect(validation_rule).not_to be_nil
+
+ $created_validation_rule_applicable_to = validation_rule
+ end
+
+ it 'create a discount campaign with applicable_to validation rule', :order => :second do
+ created_discount_campaign = create_discount_campaign(@campaigns_api_instance, $created_validation_rule_applicable_to.id)
+
+ expect(created_discount_campaign).not_to be_nil
+
+ $created_discount_campaign = created_discount_campaign
+ @voucherify_data.set_discount_campaign(created_discount_campaign)
+ end
+
+ it 'create a promotion campaign', :order => :thrid do
+ created_promotion_campaign = create_promotion_campaign(@campaigns_api_instance)
+
+ expect(created_promotion_campaign).not_to be_nil
+
+ $created_promotion_campaign = created_promotion_campaign
+ end
+
+ it 'create a loyalty campaign', :order => :fourth do
+ created_loyalty_campaign = create_loyalty_campaign(@campaigns_api_instance)
+
+ expect(created_loyalty_campaign).not_to be_nil
+
+ $created_loyalty_campaign = created_loyalty_campaign
+ @voucherify_data.set_loyalty_campaign(created_loyalty_campaign)
+ end
+
+ it 'delete the promotion campaign', :order => :fifth do
+ deleted_promotion_campaign = delete_campaign(@campaigns_api_instance, $created_promotion_campaign.id)
+
+ expect(deleted_promotion_campaign).not_to be_nil
+ end
+
+ it 'create a voucher', :order => :sixth do
+ created_voucher = @campaigns_api_instance.add_vouchers_to_campaign($created_discount_campaign.id, {
+ vouchers_count: 1,
+ })
+ @voucherify_data.set_voucher(created_voucher)
+ expect(created_voucher).not_to be_nil
+ end
+
+ it 'create a bundle of vouchers', :order => :seventh do
+ async_action = @campaigns_api_instance.add_vouchers_to_campaign($created_discount_campaign.id, {
+ vouchers_count: 5,
+ })
+ expect(async_action).not_to be_nil
+ end
+
+ it 'create a loyalty card', :order => :eighth do
+ created_loyalty_card = @campaigns_api_instance.add_vouchers_to_campaign($created_loyalty_campaign.id, {
+ vouchers_count: 1,
+ })
+ @voucherify_data.set_loyalty_card(created_loyalty_card)
+ expect(created_loyalty_card).not_to be_nil
+ end
+
+ it 'create a campaign with validation rule and add voucher', :order => :ninth do
+ validation_rule = create_validation_rule_more_than(@validation_rules_api_instance, @voucherify_data.get_product.id)
+ expect(validation_rule).not_to be_nil
+
+ campaign = create_discount_campaign(@campaigns_api_instance, validation_rule.id)
+ expect(campaign).not_to be_nil
+
+ voucher = @campaigns_api_instance.add_vouchers_to_campaign(campaign.id, {
+ vouchers_count: 1,
+ })
+
+ @voucherify_data.set_voucher_with_more_than_validation_rule(voucher)
+ end
+end
diff --git a/__tests__/spec/3_customers_spec.rb b/__tests__/spec/3_customers_spec.rb
new file mode 100644
index 00000000..73d972ed
--- /dev/null
+++ b/__tests__/spec/3_customers_spec.rb
@@ -0,0 +1,24 @@
+require_relative '../lib/customers.rb'
+require_relative '../lib/config.rb'
+require_relative '../lib/voucherify_data.rb'
+
+RSpec.describe 'Customers API', :order => :defined do
+ before(:each) do
+ @customers_api_instance = Config.customers_api_instance()
+ @voucherify_data = VoucherifyData.instance()
+ end
+
+ it 'create a customer', :order => :first do
+ created_customer = create_customer(@customers_api_instance)
+ expect(created_customer).not_to be_nil
+ @voucherify_data.set_customer(created_customer)
+ end
+
+ it 'create a customer and delete it', :order => :second do
+ created_customer = create_customer(@customers_api_instance)
+ expect(created_customer).not_to be_nil
+
+ result = delete_customer_permanently(@customers_api_instance, created_customer.id)
+ expect(created_customer).not_to be_nil
+ end
+end
diff --git a/__tests__/spec/4_publications_spec.rb b/__tests__/spec/4_publications_spec.rb
new file mode 100644
index 00000000..89ea6ca1
--- /dev/null
+++ b/__tests__/spec/4_publications_spec.rb
@@ -0,0 +1,23 @@
+require_relative '../lib/config.rb'
+
+RSpec.describe 'Publications API', :order => :defined do
+ before(:each) do
+ @publications_api_instance = Config.publications_api_instance()
+ @voucherify_data = VoucherifyData.instance()
+ end
+
+ it 'create a publication', :order => :first do
+ publication = @publications_api_instance.create_publication({
+ join_once: true,
+ publications_create_request_body: VoucherifySdk::CreatePublicationWithCampaign.new({
+ customer: VoucherifySdk::Customer.new({
+ id: @voucherify_data.get_customer().id
+ }),
+ campaign: VoucherifySdk::CreatePublicationCampaign.new({
+ name: @voucherify_data.get_discount_campaign().name
+ })
+ })
+ })
+ expect(publication).not_to be_nil
+ end
+end
diff --git a/__tests__/spec/5_qualifications_spec.rb b/__tests__/spec/5_qualifications_spec.rb
new file mode 100644
index 00000000..64846cc6
--- /dev/null
+++ b/__tests__/spec/5_qualifications_spec.rb
@@ -0,0 +1,27 @@
+require_relative '../lib/config.rb'
+require_relative '../lib/voucherify_data.rb'
+
+RSpec.describe 'Qualifications API', :order => :defined do
+ before(:each) do
+ @qualifications_api_instance = Config.qualifications_api_instance()
+ @voucherify_data = VoucherifyData.instance()
+ end
+
+ it 'check eligibility', :order => :first do
+ result = @qualifications_api_instance.check_eligibility({
+ qualifications_check_eligibility_request_body: VoucherifySdk::QualificationsCheckEligibilityRequestBody.new({
+ customer: VoucherifySdk::Customer.new({
+ id: @voucherify_data.get_customer().id
+ }),
+ order: VoucherifySdk::Order.new({
+ amount: 20000,
+ }),
+ options: VoucherifySdk::QualificationsOption.new({
+ limit: 100
+ })
+ })
+ })
+
+ expect(result).not_to be_nil
+ end
+end
\ No newline at end of file
diff --git a/__tests__/spec/6_validations_spec.rb b/__tests__/spec/6_validations_spec.rb
new file mode 100644
index 00000000..c51d9f07
--- /dev/null
+++ b/__tests__/spec/6_validations_spec.rb
@@ -0,0 +1,126 @@
+require_relative '../lib/config.rb'
+require_relative '../lib/voucherify_data.rb'
+require_relative '../lib/stackables.rb'
+
+RSpec.describe 'Validations API', :order => :defined do
+ before(:each) do
+ @validations_api_instance = Config.validations_api_instance()
+ @voucherify_data = VoucherifyData.instance()
+ end
+
+ $validation_result_successful = nil
+ $order_amount_successful = 20000
+
+ $validation_result_failed = nil
+ $order_amount_failed = 1000
+
+ it 'validate stacked discounts (successful)', :order => :first do
+ $validation_result_successful = validate_stacked_discounts(
+ @validations_api_instance,
+ @voucherify_data.get_voucher().code,
+ @voucherify_data.get_product.id,
+ @voucherify_data.get_customer(),
+ $order_amount_successful
+ )
+
+ expect($validation_result_successful).not_to be_nil
+ expect($validation_result_successful.valid).to be(true)
+ end
+
+ it 'validates presence of the redeemables array (successful)', :order => :second do
+ expect($validation_result_successful.redeemables).not_to be_nil
+ expect($validation_result_successful.redeemables).to be_an(Array)
+ end
+
+ it 'checks if redeemables items have necessary keys (successful)', :order => :third do
+ redeemable = $validation_result_successful.redeemables.first
+
+ expect(redeemable.status).to eq("APPLICABLE")
+ expect(redeemable.id).not_to be_nil
+ expect(redeemable.object).to eq("voucher")
+ expect(redeemable.order).to be_a(VoucherifySdk::OrderCalculated)
+ expect(redeemable.applicable_to).to be_a(VoucherifySdk::ApplicableToResultList)
+ expect(redeemable.inapplicable_to).to be_a(VoucherifySdk::InapplicableToResultList)
+ expect(redeemable.result).to be_a(VoucherifySdk::RedeemableResultPromotionTier)
+ end
+
+ it 'validates the order object structure (successful)', :order => :fourth do
+ order = $validation_result_successful.order
+
+ expect(order).not_to be_nil
+ expect(order.amount).to eq($order_amount_successful)
+ expect(order.total_amount).to eq($order_amount_successful - @voucherify_data.get_discount_campaign().voucher.discount.amount_off)
+ end
+
+ it 'validates details of the discount in the first redeemable (successful)', :order => :fifth do
+ discount = $validation_result_successful.redeemables.first.result.discount
+
+ expect(discount.type).to eq("AMOUNT")
+ expect(discount.amount_off).to eq(@voucherify_data.get_discount_campaign().voucher.discount.amount_off)
+ end
+
+ it 'checks is redeemables applicable_to points on product (successful)', :order => :sixth do
+ redeemable = $validation_result_successful.redeemables.first
+ applicable_to = redeemable.applicable_to
+
+ expect(applicable_to.data).not_to be_nil
+ expect(applicable_to.data).to be_a(Array)
+
+ applicable_to_first = applicable_to.data.first
+ expect(applicable_to_first).not_to be_nil
+ expect(applicable_to_first.object).to eq("product")
+ expect(applicable_to_first.id).to eq(@voucherify_data.get_product().id)
+ end
+
+ it 'checks validation customer response is valid (successful)', :order => :seventh do
+ expect($validation_result_successful.tracking_id).to_not be_nil
+ expect($validation_result_successful.order.customer).to_not be_nil
+ expect($validation_result_successful.order.customer).to be_a(VoucherifySdk::CustomerId)
+ expect($validation_result_successful.order.customer.id).to eq(@voucherify_data.get_customer().id)
+ expect($validation_result_successful.order.customer.object).to eq("customer")
+ end
+
+ #########
+ #########
+ #########
+
+ it 'validate stacked discounts (failed)', :order => :eighth do
+ $validation_result_failed = validate_stacked_discounts(
+ @validations_api_instance,
+ @voucherify_data.get_voucher_with_more_than_validation_rule().code,
+ @voucherify_data.get_product.id,
+ @voucherify_data.get_customer(),
+ $order_amount_failed
+ )
+
+ expect($validation_result_failed).not_to be_nil
+ expect($validation_result_failed.valid).to be(false)
+ end
+
+ it 'validates presence of the redeemables and inapplicable_redeemables (failed)', :order => :ninth do
+ expect($validation_result_failed.redeemables).not_to be_nil
+ expect($validation_result_failed.redeemables).to be_an(Array)
+
+ expect($validation_result_failed.inapplicable_redeemables).not_to be_nil
+ expect($validation_result_failed.inapplicable_redeemables).to be_an(Array)
+ end
+
+ it 'checks if redeemables items have necessary keys (failed)', :order => :tenth do
+ inapplicable_redeemables = $validation_result_failed.inapplicable_redeemables.first
+
+ expect(inapplicable_redeemables.status).to eq("INAPPLICABLE")
+ expect(inapplicable_redeemables.id).to eq(@voucherify_data.get_voucher_with_more_than_validation_rule().code)
+ expect(inapplicable_redeemables.object).to eq("voucher")
+
+ expect(inapplicable_redeemables.result).not_to be_nil
+ expect(inapplicable_redeemables.result).to be_a(VoucherifySdk::ValidationsRedeemableInapplicableResult)
+
+ expect(inapplicable_redeemables.result.error).not_to be_nil
+ expect(inapplicable_redeemables.result.error).to be_an(VoucherifySdk::Error)
+ end
+
+ it 'checks validation customer response is valid (failed)', :order => :eleventh do
+ expect($validation_result_failed.tracking_id).to_not be_nil
+ end
+
+end
diff --git a/__tests__/spec/7_vouchers_spec.rb b/__tests__/spec/7_vouchers_spec.rb
new file mode 100644
index 00000000..ee72c04d
--- /dev/null
+++ b/__tests__/spec/7_vouchers_spec.rb
@@ -0,0 +1,40 @@
+require_relative '../lib/config.rb'
+require_relative '../lib/voucherify_data.rb'
+require 'VoucherifySdk'
+
+RSpec.describe 'Campaigns API', :order => :defined do
+ before(:each) do
+ @vouchers_api_instance = Config.vouchers_api_instance()
+ @voucherify_data = VoucherifyData.instance()
+ end
+
+ it 'get voucher previously created', :order => :first do
+ voucher = @vouchers_api_instance.get_voucher(@voucherify_data.get_voucher().code)
+
+ expect(voucher).not_to be_nil
+ end
+
+ it 'disable voucher previously created', :order => :second do
+ voucher = @vouchers_api_instance.disable_voucher(@voucherify_data.get_voucher().code)
+
+ expect(voucher).not_to be_nil
+ end
+
+ it 'enable voucher previously created', :order => :thrird do
+ voucher = @vouchers_api_instance.enable_voucher(@voucherify_data.get_voucher().code)
+
+ expect(voucher).not_to be_nil
+ end
+
+ it 'update loyalty card balance', :order => :fourth do
+ vouchers_balance_update_request_body = VoucherifySdk::VouchersBalanceUpdateRequestBody.new({
+ source_id: generate_random_string(),
+ amount: 10000,
+ reason: "Regular customer"
+ })
+
+ response = @vouchers_api_instance.update_voucher_balance(@voucherify_data.get_loyalty_card().code, vouchers_balance_update_request_body)
+
+ expect(response).not_to be_nil
+ end
+end
\ No newline at end of file
diff --git a/__tests__/spec/8_events_spec.rb b/__tests__/spec/8_events_spec.rb
new file mode 100644
index 00000000..dfdb735d
--- /dev/null
+++ b/__tests__/spec/8_events_spec.rb
@@ -0,0 +1,16 @@
+require_relative '../lib/config.rb'
+require_relative '../lib/voucherify_data.rb'
+require_relative '../lib/events.rb'
+
+RSpec.describe 'Campaigns API', :order => :defined do
+ before(:each) do
+ @events_api_instance = Config.events_api_instance()
+ @voucherify_data = VoucherifyData.instance()
+ end
+
+ it 'track custom event', :order => :first do
+ created_event = create_event(@events_api_instance)
+
+ expect(created_event).not_to be_nil
+ end
+end
\ No newline at end of file
diff --git a/__tests__/spec/9_redemptions_spec.rb b/__tests__/spec/9_redemptions_spec.rb
new file mode 100644
index 00000000..5fd8fed6
--- /dev/null
+++ b/__tests__/spec/9_redemptions_spec.rb
@@ -0,0 +1,14 @@
+require_relative '../lib/config.rb'
+require_relative '../lib/voucherify_data.rb'
+require_relative '../lib/stackables.rb'
+
+RSpec.describe 'Redemptions API', :order => :defined do
+ before(:each) do
+ @redemptions_api_instance = Config.redemptions_api_instance()
+ @voucherify_data = VoucherifyData.instance()
+ end
+ it 'redeem stacked discounts', :order => :second do
+ result = redeem_stacked_discounts(@redemptions_api_instance, @voucherify_data.get_voucher().code)
+ expect(result).not_to be_nil
+ end
+end
\ No newline at end of file
diff --git a/bin/console b/bin/console
deleted file mode 100755
index 74f2557f..00000000
--- a/bin/console
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env ruby
-
-require "bundler/setup"
-require "voucherify"
-
-# You can add fixtures and/or initialization code here to make experimenting
-# with your gem easier. You can also use a different console, if you like.
-
-# (If you use this, don't forget to add pry to your Gemfile!)
-# require "pry"
-# Pry.start
-
-require "irb"
-IRB.start
diff --git a/bin/setup b/bin/setup
deleted file mode 100755
index dce67d86..00000000
--- a/bin/setup
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/usr/bin/env bash
-set -euo pipefail
-IFS=$'\n\t'
-set -vx
-
-bundle install
-
-# Do any other automated setup that you need to do here
diff --git a/docs/Any.md b/docs/Any.md
new file mode 100644
index 00000000..65630718
--- /dev/null
+++ b/docs/Any.md
@@ -0,0 +1,53 @@
+# VoucherifySdk::Any
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::Any.openapi_one_of
+# =>
+# [
+# :'Array',
+# :'Float',
+# :'Object',
+# :'String'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::Any.build(data)
+# => #:0x00007fdd4aab02a0>
+
+VoucherifySdk::Any.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `Array`
+- `Float`
+- `Object`
+- `String`
+- `nil` (if no type matches)
+
diff --git a/docs/ApplicableTo.md b/docs/ApplicableTo.md
new file mode 100644
index 00000000..a78c0118
--- /dev/null
+++ b/docs/ApplicableTo.md
@@ -0,0 +1,21 @@
+# VoucherifySdk::ApplicableTo
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | This object stores information about the product collection. | |
+| **id** | **String** | Unique product collection ID assigned by Voucherify. | |
+| **source_id** | **String** | The source ID from your inventory system. | [optional] |
+| **product_id** | **String** | Parent product's unique ID assigned by Voucherify. | [optional] |
+| **product_source_id** | **String** | Parent product's source ID from your inventory system. | [optional] |
+| **strict** | **Boolean** | | |
+| **price** | **Float** | New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price. | [optional] |
+| **price_formula** | **Float** | Formula used to calculate the discounted price of an item. | [optional] |
+| **effect** | [**ApplicableToEffect**](ApplicableToEffect.md) | | |
+| **quantity_limit** | **Integer** | The maximum number of units allowed to be discounted per order line item. | [optional] |
+| **aggregated_quantity_limit** | **Integer** | The maximum number of units allowed to be discounted combined across all matched order line items. | [optional] |
+| **amount_limit** | **Integer** | Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. | [optional] |
+| **aggregated_amount_limit** | **Integer** | Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects: - `APPLY_TO_ITEMS` (each item subtotal is discounted equally) - `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value) | [optional] |
+| **order_item_indices** | **Array<Integer>** | | [optional] |
+
diff --git a/docs/ApplicableToEffect.md b/docs/ApplicableToEffect.md
new file mode 100644
index 00000000..a67c27e1
--- /dev/null
+++ b/docs/ApplicableToEffect.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ApplicableToEffect
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ApplicableToResultList.md b/docs/ApplicableToResultList.md
new file mode 100644
index 00000000..b56cefbf
--- /dev/null
+++ b/docs/ApplicableToResultList.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ApplicableToResultList
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **data** | [**Array<ApplicableTo>**](ApplicableTo.md) | Contains array of items to which the discount can apply. | |
+| **total** | **Integer** | Total number of objects defining included products, SKUs, or product collections. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'list'] |
+| **data_ref** | **String** | The type of object represented by JSON. | [default to 'data'] |
+
diff --git a/docs/ArrayInner.md b/docs/ArrayInner.md
new file mode 100644
index 00000000..8d883f4c
--- /dev/null
+++ b/docs/ArrayInner.md
@@ -0,0 +1,51 @@
+# VoucherifySdk::ArrayInner
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ArrayInner.openapi_one_of
+# =>
+# [
+# :'Float',
+# :'Object',
+# :'String'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ArrayInner.build(data)
+# => #
+
+VoucherifySdk::ArrayInner.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `Float`
+- `Object`
+- `String`
+- `nil` (if no type matches)
+
diff --git a/docs/AsyncActions.md b/docs/AsyncActions.md
new file mode 100644
index 00000000..305d4c44
--- /dev/null
+++ b/docs/AsyncActions.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::AsyncActions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/BusValRuleAssignment.md b/docs/BusValRuleAssignment.md
new file mode 100644
index 00000000..f8a6a93b
--- /dev/null
+++ b/docs/BusValRuleAssignment.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::BusValRuleAssignment
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | The unique identifier for a assignment | |
+| **rule_id** | **String** | The unique identifier for a rule | |
+| **related_object_id** | **String** | The unique identifier for a related object | |
+| **related_object_type** | **String** | The type of related object | |
+| **created_at** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the object was last updated in ISO 8601 format. | [optional] |
+| **object** | **String** | The type of object represented by JSON. | [default to 'validation_rules_assignment'] |
+| **validation_status** | **String** | The validation status of the assignment | [optional] |
+| **validation_omitted_rules** | **Array<String>** | The list of omitted rules | [optional] |
+
diff --git a/docs/Campaign.md b/docs/Campaign.md
new file mode 100644
index 00000000..5e792342
--- /dev/null
+++ b/docs/Campaign.md
@@ -0,0 +1,37 @@
+# VoucherifySdk::Campaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique campaign ID, assigned by Voucherify. | |
+| **name** | **String** | Campaign name. | |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | |
+| **voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign. | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the campaign was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was updated in ISO 8601 format. | [optional] |
+| **category** | **String** | Unique category name. | [optional] |
+| **creation_status** | **String** | Indicates the status of the campaign creation. | |
+| **vouchers_generation_status** | **String** | Indicates the status of the campaign's vouchers. | |
+| **protected** | **Boolean** | Indicates whether the resource can be deleted. | |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. | |
+| **categories** | [**Array<Category>**](Category.md) | Contains details about the category. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the campaign. | [default to 'campaign'] |
+| **referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional] |
+| **loyalty_tiers_expiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] |
+| **promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+
diff --git a/docs/CampaignBase.md b/docs/CampaignBase.md
new file mode 100644
index 00000000..fe81e5e9
--- /dev/null
+++ b/docs/CampaignBase.md
@@ -0,0 +1,35 @@
+# VoucherifySdk::CampaignBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique campaign ID, assigned by Voucherify. | |
+| **name** | **String** | Campaign name. | |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | |
+| **voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign. | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the campaign was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was updated in ISO 8601 format. | [optional] |
+| **category** | **String** | Unique category name. | [optional] |
+| **creation_status** | **String** | Indicates the status of the campaign creation. | |
+| **vouchers_generation_status** | **String** | Indicates the status of the campaign's vouchers. | |
+| **protected** | **Boolean** | Indicates whether the resource can be deleted. | |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. | |
+| **categories** | [**Array<Category>**](Category.md) | Contains details about the category. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the campaign. | [default to 'campaign'] |
+| **referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional] |
+| **loyalty_tiers_expiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] |
+
diff --git a/docs/CampaignBaseValidityTimeframe.md b/docs/CampaignBaseValidityTimeframe.md
new file mode 100644
index 00000000..b4751f6e
--- /dev/null
+++ b/docs/CampaignBaseValidityTimeframe.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::CampaignBaseValidityTimeframe
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | [optional] |
+| **duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | [optional] |
+
diff --git a/docs/CampaignLoyaltyCard.md b/docs/CampaignLoyaltyCard.md
new file mode 100644
index 00000000..a3df9e42
--- /dev/null
+++ b/docs/CampaignLoyaltyCard.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::CampaignLoyaltyCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card. | |
+| **expiration_rules** | [**CampaignLoyaltyCardExpirationRules**](CampaignLoyaltyCardExpirationRules.md) | | [optional] |
+
diff --git a/docs/CampaignLoyaltyCardExpirationRules.md b/docs/CampaignLoyaltyCardExpirationRules.md
new file mode 100644
index 00000000..817abb8e
--- /dev/null
+++ b/docs/CampaignLoyaltyCardExpirationRules.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::CampaignLoyaltyCardExpirationRules
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **period_type** | **String** | Type of period | |
+| **period_value** | **Integer** | Value of the period | |
+| **rounding_type** | **String** | Type of rounding | |
+| **rounding_value** | **Integer** | Value of rounding | |
+
diff --git a/docs/CampaignLoyaltyVoucher.md b/docs/CampaignLoyaltyVoucher.md
new file mode 100644
index 00000000..424d6298
--- /dev/null
+++ b/docs/CampaignLoyaltyVoucher.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::CampaignLoyaltyVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Type of voucher. | [default to 'LOYALTY_CARD'] |
+| **loyalty_card** | [**CampaignLoyaltyCard**](CampaignLoyaltyCard.md) | | |
+| **redemption** | [**CampaignLoyaltyVoucherRedemption**](CampaignLoyaltyVoucherRedemption.md) | | [optional] |
+| **code_config** | [**CodeConfig**](CodeConfig.md) | | [optional] |
+
diff --git a/docs/CampaignLoyaltyVoucherRedemption.md b/docs/CampaignLoyaltyVoucherRedemption.md
new file mode 100644
index 00000000..b5731b96
--- /dev/null
+++ b/docs/CampaignLoyaltyVoucherRedemption.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CampaignLoyaltyVoucherRedemption
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional] |
+
diff --git a/docs/CampaignVoucher.md b/docs/CampaignVoucher.md
new file mode 100644
index 00000000..10bd2542
--- /dev/null
+++ b/docs/CampaignVoucher.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::CampaignVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Type of voucher. | [default to 'DISCOUNT_VOUCHER'] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **gift** | [**Gift**](Gift.md) | | [optional] |
+| **loyalty_card** | [**CampaignLoyaltyCard**](CampaignLoyaltyCard.md) | | [optional] |
+| **redemption** | [**CampaignVoucherRedemption**](CampaignVoucherRedemption.md) | | |
+| **code_config** | [**CodeConfigRequiredLengthCharsetPattern**](CodeConfigRequiredLengthCharsetPattern.md) | | |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+
diff --git a/docs/CampaignVoucherRedemption.md b/docs/CampaignVoucherRedemption.md
new file mode 100644
index 00000000..01ee10d8
--- /dev/null
+++ b/docs/CampaignVoucherRedemption.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CampaignVoucherRedemption
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | |
+
diff --git a/docs/CampaignsApi.md b/docs/CampaignsApi.md
new file mode 100644
index 00000000..5a5c01b9
--- /dev/null
+++ b/docs/CampaignsApi.md
@@ -0,0 +1,694 @@
+# VoucherifySdk::CampaignsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**add_voucher_with_specific_code_to_campaign**](CampaignsApi.md#add_voucher_with_specific_code_to_campaign) | **POST** /v1/campaigns/{campaignId}/vouchers/{code} | Add Voucher with Specific Code to Campaign |
+| [**add_vouchers_to_campaign**](CampaignsApi.md#add_vouchers_to_campaign) | **POST** /v1/campaigns/{campaignId}/vouchers | Add Vouchers to Campaign |
+| [**create_campaign**](CampaignsApi.md#create_campaign) | **POST** /v1/campaigns | Create Campaign |
+| [**delete_campaign**](CampaignsApi.md#delete_campaign) | **DELETE** /v1/campaigns/{campaignId} | Delete Campaign |
+| [**disable_campaign**](CampaignsApi.md#disable_campaign) | **POST** /v1/campaigns/{campaignId}/disable | Disable Campaign |
+| [**enable_campaign**](CampaignsApi.md#enable_campaign) | **POST** /v1/campaigns/{campaignId}/enable | Enable Campaign |
+| [**get_campaign**](CampaignsApi.md#get_campaign) | **GET** /v1/campaigns/{campaignId} | Get Campaign |
+| [**import_vouchers_to_campaign**](CampaignsApi.md#import_vouchers_to_campaign) | **POST** /v1/campaigns/{campaignId}/import | Import Vouchers to Campaign |
+| [**import_vouchers_to_campaign_using_csv**](CampaignsApi.md#import_vouchers_to_campaign_using_csv) | **POST** /v1/campaigns/{campaignId}/importCSV | Import Vouchers to Campaign by CSV |
+| [**list_campaigns**](CampaignsApi.md#list_campaigns) | **GET** /v1/campaigns | List Campaigns |
+| [**update_campaign**](CampaignsApi.md#update_campaign) | **PUT** /v1/campaigns/{campaignId} | Update Campaign |
+
+
+## add_voucher_with_specific_code_to_campaign
+
+> add_voucher_with_specific_code_to_campaign(campaign_id, code, opts)
+
+Add Voucher with Specific Code to Campaign
+
+This method gives a possibility to add a new voucher to an existing campaign. The voucher definition will be inherited from the definition kept in the campaign profile. However, you are able to overwrite a few properties inherited from the campaign.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CampaignsApi.new
+campaign_id = 'ABC' # String | The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+code = 'code_example' # String | A custom **code** that identifies the voucher.
+opts = {
+ campaigns_vouchers_create_request_body: VoucherifySdk::CampaignsVouchersCreateRequestBody.new # CampaignsVouchersCreateRequestBody | Specify the voucher parameters that you would like to overwrite.
+}
+
+begin
+ # Add Voucher with Specific Code to Campaign
+ result = api_instance.add_voucher_with_specific_code_to_campaign(campaign_id, code, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CampaignsApi->add_voucher_with_specific_code_to_campaign: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | |
+| **code** | **String** | A custom **code** that identifies the voucher. | |
+| **campaigns_vouchers_create_request_body** | [**CampaignsVouchersCreateRequestBody**](CampaignsVouchersCreateRequestBody.md) | Specify the voucher parameters that you would like to overwrite. | [optional] |
+
+### Return type
+
+[**CampaignsVouchersCreateResponseBody**](CampaignsVouchersCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## add_vouchers_to_campaign
+
+> add_vouchers_to_campaign(campaign_id, opts)
+
+Add Vouchers to Campaign
+
+This method gives the possibility to push new vouchers to an existing campaign. New vouchers will inherit properties from the campaign profile. However, it is possible to overwrite some of them in the request body. If you provide an optional code_config parameter with a voucher code configuration, then it will be used to generate new voucher codes. Otherwise, the voucher code configuration from the campaign will be used. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CampaignsApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the campaign to which voucher(s) will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+opts = {
+ vouchers_count: 56, # Integer | Number of vouchers that should be added.
+ campaigns_vouchers_create_in_bulk_request_body: VoucherifySdk::CampaignsVouchersCreateInBulkRequestBody.new # CampaignsVouchersCreateInBulkRequestBody | Specify the voucher parameters that you would like to overwrite.
+}
+
+begin
+ # Add Vouchers to Campaign
+ result = api_instance.add_vouchers_to_campaign(campaign_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CampaignsApi->add_vouchers_to_campaign: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the campaign to which voucher(s) will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | |
+| **vouchers_count** | **Integer** | Number of vouchers that should be added. | [optional] |
+| **campaigns_vouchers_create_in_bulk_request_body** | [**CampaignsVouchersCreateInBulkRequestBody**](CampaignsVouchersCreateInBulkRequestBody.md) | Specify the voucher parameters that you would like to overwrite. | [optional] |
+
+### Return type
+
+[**CampaignsVouchersCreateResponseBody**](CampaignsVouchersCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## create_campaign
+
+> create_campaign(opts)
+
+Create Campaign
+
+Method to create a batch of vouchers aggregated in one campaign. You can choose a variety of voucher types and define a unique pattern for generating codes. 📘 Global uniqueness All campaign codes are unique across the whole project. Voucherify will not allow you to generate 2 campaigns with the same coupon code. 🚧 Code generation status This is an asynchronous action; you cant read or modify a newly created campaign until the code generation is completed. See the creation_status field in the campaign object description.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CampaignsApi.new
+opts = {
+ campaigns_create_request_body: VoucherifySdk::CampaignsCreateDiscountCouponsCampaign.new # CampaignsCreateRequestBody | Specify the details of the campaign that you would like to create.
+}
+
+begin
+ # Create Campaign
+ result = api_instance.create_campaign(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CampaignsApi->create_campaign: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaigns_create_request_body** | [**CampaignsCreateRequestBody**](CampaignsCreateRequestBody.md) | Specify the details of the campaign that you would like to create. | [optional] |
+
+### Return type
+
+[**CampaignsCreateResponseBody**](CampaignsCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## delete_campaign
+
+> delete_campaign(campaign_id, opts)
+
+Delete Campaign
+
+Permanently deletes a campaign and all related vouchers. This action cannot be undone. Also, this method immediately removes any redemptions on the voucher. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CampaignsApi.new
+campaign_id = 'campaign_id_example' # String | You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+opts = {
+ force: true # Boolean | If this flag is set to true, the campaign and related vouchers will be removed permanently. Going forward, the user will be able to create the next campaign with exactly the same name.
+}
+
+begin
+ # Delete Campaign
+ result = api_instance.delete_campaign(campaign_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CampaignsApi->delete_campaign: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | |
+| **force** | **Boolean** | If this flag is set to true, the campaign and related vouchers will be removed permanently. Going forward, the user will be able to create the next campaign with exactly the same name. | [optional] |
+
+### Return type
+
+[**CampaignsDeleteResponseBody**](CampaignsDeleteResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## disable_campaign
+
+> disable_campaign(campaign_id)
+
+Disable Campaign
+
+There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **inactive**. The vouchers in this campaign can no longer be redeemed.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CampaignsApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the campaign being disabled. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+
+begin
+ # Disable Campaign
+ result = api_instance.disable_campaign(campaign_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CampaignsApi->disable_campaign: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the campaign being disabled. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | |
+
+### Return type
+
+[**CampaignsDisableResponseBody**](CampaignsDisableResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## enable_campaign
+
+> enable_campaign(campaign_id)
+
+Enable Campaign
+
+There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **active**. The vouchers in this campaign can be redeemed - only if the redemption occurs after the start date of the campaign and voucher and the voucher and campaign are not expired.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CampaignsApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value.
+
+begin
+ # Enable Campaign
+ result = api_instance.enable_campaign(campaign_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CampaignsApi->enable_campaign: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. | |
+
+### Return type
+
+[**CampaignsEnableResponseBody**](CampaignsEnableResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## get_campaign
+
+> get_campaign(campaign_id)
+
+Get Campaign
+
+Retrieves the campaign with the given campaign ID or campaign name.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CampaignsApi.new
+campaign_id = 'campaign_id_example' # String | You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+
+begin
+ # Get Campaign
+ result = api_instance.get_campaign(campaign_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CampaignsApi->get_campaign: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | |
+
+### Return type
+
+[**CampaignsGetResponseBody**](CampaignsGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## import_vouchers_to_campaign
+
+> import_vouchers_to_campaign(campaign_id, opts)
+
+Import Vouchers to Campaign
+
+Imports vouchers to an **existing** campaign. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CampaignsApi.new
+campaign_id = 'campaign_id_example' # String | The ID of an existing campaign to which youre importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+opts = {
+ campaigns_import_voucher_item: [VoucherifySdk::CampaignsImportVoucherItem.new({code: 'code_example'})] # Array | Discount type, expiration date and the remaining attributes will be taken from the Campaign settings.
+}
+
+begin
+ # Import Vouchers to Campaign
+ result = api_instance.import_vouchers_to_campaign(campaign_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CampaignsApi->import_vouchers_to_campaign: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The ID of an existing campaign to which youre importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | |
+| **campaigns_import_voucher_item** | [**Array<CampaignsImportVoucherItem>**](CampaignsImportVoucherItem.md) | Discount type, expiration date and the remaining attributes will be taken from the Campaign settings. | [optional] |
+
+### Return type
+
+[**CampaignsImportCreateResponseBody**](CampaignsImportCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## import_vouchers_to_campaign_using_csv
+
+> import_vouchers_to_campaign_using_csv(campaign_id, file)
+
+Import Vouchers to Campaign by CSV
+
+Imports vouchers to an **existing** campaign. The CSV file has to include headers in the first line. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CampaignsApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value.
+file = File.new('/path/to/some/file') # File | File path.
+
+begin
+ # Import Vouchers to Campaign by CSV
+ result = api_instance.import_vouchers_to_campaign_using_csv(campaign_id, file)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CampaignsApi->import_vouchers_to_campaign_using_csv: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value. | |
+| **file** | **File** | File path. | |
+
+### Return type
+
+[**CampaignsImportCsvCreateResponseBody**](CampaignsImportCsvCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
+
+
+## list_campaigns
+
+> list_campaigns(opts)
+
+List Campaigns
+
+Retrieve a list of campaigns in a project. The campaigns are returned sorted by creation date, with the most recent campaigns appearing first. When you get a list of campaigns, you can optionally specify query parameters to customize the amount of campaigns returned per call using limit, which page of campaigns to return using page, sort the campaigns using the order query parameter and filter the results by the campaign_type. This method will return an error when trying to return a limit of more than 100 campaigns.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CampaignsApi.new
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ campaign_type: VoucherifySdk::ParameterCampaignType::PROMOTION, # ParameterCampaignType | This attribute allows filtering by campaign type.
+ expand: VoucherifySdk::ParameterExpandListCampaigns::CATEGORY, # ParameterExpandListCampaigns | Include an expanded categories object in the response.
+ order: VoucherifySdk::ParameterOrderListCampaigns::CREATED_AT # ParameterOrderListCampaigns | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+}
+
+begin
+ # List Campaigns
+ result = api_instance.list_campaigns(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CampaignsApi->list_campaigns: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **campaign_type** | [**ParameterCampaignType**](.md) | This attribute allows filtering by campaign type. | [optional] |
+| **expand** | [**ParameterExpandListCampaigns**](.md) | Include an expanded categories object in the response. | [optional][default to 'category'] |
+| **order** | [**ParameterOrderListCampaigns**](.md) | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+
+### Return type
+
+[**CampaignsListResponseBody**](CampaignsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## update_campaign
+
+> update_campaign(campaign_id, opts)
+
+Update Campaign
+
+Updates the specified campaign by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body wont be modified. Even if provided, they will be silently skipped. ## Vouchers will be affected This method will update vouchers aggregated in the campaign. It will affect all vouchers that are not published or redeemed yet.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CampaignsApi.new
+campaign_id = 'campaign_id_example' # String | You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+opts = {
+ campaigns_update_request_body: VoucherifySdk::CampaignsUpdateDiscountCouponsCampaign.new # CampaignsUpdateRequestBody | Specify the campaign parameters to be updated.
+}
+
+begin
+ # Update Campaign
+ result = api_instance.update_campaign(campaign_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CampaignsApi->update_campaign: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value. | |
+| **campaigns_update_request_body** | [**CampaignsUpdateRequestBody**](CampaignsUpdateRequestBody.md) | Specify the campaign parameters to be updated. | [optional] |
+
+### Return type
+
+[**CampaignsUpdateResponseBody**](CampaignsUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/CampaignsCreateBase.md b/docs/CampaignsCreateBase.md
new file mode 100644
index 00000000..2283022f
--- /dev/null
+++ b/docs/CampaignsCreateBase.md
@@ -0,0 +1,23 @@
+# VoucherifySdk::CampaignsCreateBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Campaign name. | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign (size of campaign). | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **validation_rules** | **Array<String>** | Array containing the ID of the validation rule associated with the promotion tier. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+
diff --git a/docs/CampaignsCreateDiscountCouponsCampaign.md b/docs/CampaignsCreateDiscountCouponsCampaign.md
new file mode 100644
index 00000000..29793d2a
--- /dev/null
+++ b/docs/CampaignsCreateDiscountCouponsCampaign.md
@@ -0,0 +1,25 @@
+# VoucherifySdk::CampaignsCreateDiscountCouponsCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Campaign name. | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign (size of campaign). | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **validation_rules** | **Array<String>** | Array containing the ID of the validation rule associated with the promotion tier. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | [optional][default to 'DISCOUNT_COUPONS'] |
+| **voucher** | [**DiscountCouponsCampaignVoucher**](DiscountCouponsCampaignVoucher.md) | | [optional] |
+
diff --git a/docs/CampaignsCreateGiftCampaign.md b/docs/CampaignsCreateGiftCampaign.md
new file mode 100644
index 00000000..4a42fdbf
--- /dev/null
+++ b/docs/CampaignsCreateGiftCampaign.md
@@ -0,0 +1,25 @@
+# VoucherifySdk::CampaignsCreateGiftCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Campaign name. | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign (size of campaign). | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **validation_rules** | **Array<String>** | Array containing the ID of the validation rule associated with the promotion tier. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | [optional][default to 'GIFT_VOUCHERS'] |
+| **voucher** | [**GiftCampaignVoucher**](GiftCampaignVoucher.md) | | [optional] |
+
diff --git a/docs/CampaignsCreateGiveawayCampaign.md b/docs/CampaignsCreateGiveawayCampaign.md
new file mode 100644
index 00000000..dcf1044b
--- /dev/null
+++ b/docs/CampaignsCreateGiveawayCampaign.md
@@ -0,0 +1,26 @@
+# VoucherifySdk::CampaignsCreateGiveawayCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Campaign name. | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign (size of campaign). | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **validation_rules** | **Array<String>** | Array containing the ID of the validation rule associated with the promotion tier. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | [optional][default to 'LUCKY_DRAW'] |
+| **voucher** | [**GiveawayCampaignVoucher**](GiveawayCampaignVoucher.md) | | [optional] |
+| **lucky_draw** | [**LuckyDraw**](LuckyDraw.md) | | [optional] |
+
diff --git a/docs/CampaignsCreateLoyaltyCampaign.md b/docs/CampaignsCreateLoyaltyCampaign.md
new file mode 100644
index 00000000..6dc58817
--- /dev/null
+++ b/docs/CampaignsCreateLoyaltyCampaign.md
@@ -0,0 +1,25 @@
+# VoucherifySdk::CampaignsCreateLoyaltyCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Campaign name. | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign (size of campaign). | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **validation_rules** | **Array<String>** | Array containing the ID of the validation rule associated with the promotion tier. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | [optional][default to 'LOYALTY_PROGRAM'] |
+| **voucher** | [**CampaignLoyaltyVoucher**](CampaignLoyaltyVoucher.md) | | [optional] |
+
diff --git a/docs/CampaignsCreatePromotionCampaign.md b/docs/CampaignsCreatePromotionCampaign.md
new file mode 100644
index 00000000..8ecd83e2
--- /dev/null
+++ b/docs/CampaignsCreatePromotionCampaign.md
@@ -0,0 +1,25 @@
+# VoucherifySdk::CampaignsCreatePromotionCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Campaign name. | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign (size of campaign). | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **validation_rules** | **Array<String>** | Array containing the ID of the validation rule associated with the promotion tier. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | [optional][default to 'PROMOTION'] |
+| **promotion** | [**SchemaThatContainsUniquePropertiesForPromotionCampaignPromotion**](SchemaThatContainsUniquePropertiesForPromotionCampaignPromotion.md) | | [optional] |
+
diff --git a/docs/CampaignsCreateReferralCampaign.md b/docs/CampaignsCreateReferralCampaign.md
new file mode 100644
index 00000000..edfafc48
--- /dev/null
+++ b/docs/CampaignsCreateReferralCampaign.md
@@ -0,0 +1,26 @@
+# VoucherifySdk::CampaignsCreateReferralCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Campaign name. | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign (size of campaign). | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **validation_rules** | **Array<String>** | Array containing the ID of the validation rule associated with the promotion tier. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | [optional][default to 'REFERRAL_PROGRAM'] |
+| **referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional] |
+| **voucher** | [**ReferralCampaignVoucher**](ReferralCampaignVoucher.md) | | [optional] |
+
diff --git a/docs/CampaignsCreateRequestBody.md b/docs/CampaignsCreateRequestBody.md
new file mode 100644
index 00000000..cde29c35
--- /dev/null
+++ b/docs/CampaignsCreateRequestBody.md
@@ -0,0 +1,57 @@
+# VoucherifySdk::CampaignsCreateRequestBody
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::CampaignsCreateRequestBody.openapi_one_of
+# =>
+# [
+# :'CampaignsCreateDiscountCouponsCampaign',
+# :'CampaignsCreateGiftCampaign',
+# :'CampaignsCreateGiveawayCampaign',
+# :'CampaignsCreateLoyaltyCampaign',
+# :'CampaignsCreatePromotionCampaign',
+# :'CampaignsCreateReferralCampaign'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::CampaignsCreateRequestBody.build(data)
+# => #
+
+VoucherifySdk::CampaignsCreateRequestBody.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `CampaignsCreateDiscountCouponsCampaign`
+- `CampaignsCreateGiftCampaign`
+- `CampaignsCreateGiveawayCampaign`
+- `CampaignsCreateLoyaltyCampaign`
+- `CampaignsCreatePromotionCampaign`
+- `CampaignsCreateReferralCampaign`
+- `nil` (if no type matches)
+
diff --git a/docs/CampaignsCreateResponseBody.md b/docs/CampaignsCreateResponseBody.md
new file mode 100644
index 00000000..63a39cf6
--- /dev/null
+++ b/docs/CampaignsCreateResponseBody.md
@@ -0,0 +1,37 @@
+# VoucherifySdk::CampaignsCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique campaign ID, assigned by Voucherify. | |
+| **name** | **String** | Campaign name. | |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | |
+| **voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign. | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the campaign was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was updated in ISO 8601 format. | [optional] |
+| **category** | **String** | Unique category name. | [optional] |
+| **creation_status** | **String** | Indicates the status of the campaign creation. | |
+| **vouchers_generation_status** | **String** | Indicates the status of the campaign's vouchers. | |
+| **protected** | **Boolean** | Indicates whether the resource can be deleted. | |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. | |
+| **categories** | [**Array<Category>**](Category.md) | Contains details about the category. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the campaign. | [default to 'campaign'] |
+| **referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional] |
+| **loyalty_tiers_expiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] |
+| **promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+
diff --git a/docs/CampaignsDeleteResponseBody.md b/docs/CampaignsDeleteResponseBody.md
new file mode 100644
index 00000000..8b0226f1
--- /dev/null
+++ b/docs/CampaignsDeleteResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CampaignsDeleteResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | [optional] |
+
diff --git a/docs/CampaignsDisableResponseBody.md b/docs/CampaignsDisableResponseBody.md
new file mode 100644
index 00000000..838e4d01
--- /dev/null
+++ b/docs/CampaignsDisableResponseBody.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::CampaignsDisableResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/CampaignsEnableResponseBody.md b/docs/CampaignsEnableResponseBody.md
new file mode 100644
index 00000000..fad4cc3d
--- /dev/null
+++ b/docs/CampaignsEnableResponseBody.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::CampaignsEnableResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/CampaignsGetResponseBody.md b/docs/CampaignsGetResponseBody.md
new file mode 100644
index 00000000..c47fa852
--- /dev/null
+++ b/docs/CampaignsGetResponseBody.md
@@ -0,0 +1,37 @@
+# VoucherifySdk::CampaignsGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique campaign ID, assigned by Voucherify. | |
+| **name** | **String** | Campaign name. | |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | |
+| **voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign. | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the campaign was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was updated in ISO 8601 format. | [optional] |
+| **category** | **String** | Unique category name. | [optional] |
+| **creation_status** | **String** | Indicates the status of the campaign creation. | |
+| **vouchers_generation_status** | **String** | Indicates the status of the campaign's vouchers. | |
+| **protected** | **Boolean** | Indicates whether the resource can be deleted. | |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. | |
+| **categories** | [**Array<Category>**](Category.md) | Contains details about the category. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the campaign. | [default to 'campaign'] |
+| **referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional] |
+| **loyalty_tiers_expiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] |
+| **promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+
diff --git a/docs/CampaignsImportCreateResponseBody.md b/docs/CampaignsImportCreateResponseBody.md
new file mode 100644
index 00000000..ee03dad6
--- /dev/null
+++ b/docs/CampaignsImportCreateResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CampaignsImportCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/CampaignsImportCsvCreateResponseBody.md b/docs/CampaignsImportCsvCreateResponseBody.md
new file mode 100644
index 00000000..0e56a97b
--- /dev/null
+++ b/docs/CampaignsImportCsvCreateResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CampaignsImportCsvCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/CampaignsImportVoucherItem.md b/docs/CampaignsImportVoucherItem.md
new file mode 100644
index 00000000..fcc467d0
--- /dev/null
+++ b/docs/CampaignsImportVoucherItem.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::CampaignsImportVoucherItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | Unique custom voucher code. | |
+| **type** | **String** | Type of voucher. | [optional] |
+| **redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | [optional] |
+| **active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **additional_info** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **gift** | [**Gift**](Gift.md) | | [optional] |
+| **loyalty_card** | [**CampaignsImportVoucherLoyaltyCard**](CampaignsImportVoucherLoyaltyCard.md) | | [optional] |
+
diff --git a/docs/CampaignsImportVoucherItemRedemption.md b/docs/CampaignsImportVoucherItemRedemption.md
new file mode 100644
index 00000000..dc62cee7
--- /dev/null
+++ b/docs/CampaignsImportVoucherItemRedemption.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CampaignsImportVoucherItemRedemption
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional] |
+
diff --git a/docs/CampaignsImportVoucherLoyaltyCard.md b/docs/CampaignsImportVoucherLoyaltyCard.md
new file mode 100644
index 00000000..0da00fcb
--- /dev/null
+++ b/docs/CampaignsImportVoucherLoyaltyCard.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CampaignsImportVoucherLoyaltyCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card. | |
+
diff --git a/docs/CampaignsListResponseBody.md b/docs/CampaignsListResponseBody.md
new file mode 100644
index 00000000..bfd0d12c
--- /dev/null
+++ b/docs/CampaignsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::CampaignsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about campaigns in a dictionary. | [optional][default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of campaign objects. | [optional][default to 'campaigns'] |
+| **campaigns** | [**Array<CampaignBase>**](CampaignBase.md) | Contains array of campaign objects. | [optional] |
+| **total** | **Integer** | Total number of campaigns. | [optional] |
+
diff --git a/docs/CampaignsUpdateBase.md b/docs/CampaignsUpdateBase.md
new file mode 100644
index 00000000..d976fec0
--- /dev/null
+++ b/docs/CampaignsUpdateBase.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::CampaignsUpdateBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **unset_metadata_fields** | **Array<String>** | Determine which metadata should be removed from campaign. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+
diff --git a/docs/CampaignsUpdateCouponCampaignBase.md b/docs/CampaignsUpdateCouponCampaignBase.md
new file mode 100644
index 00000000..74b31cc6
--- /dev/null
+++ b/docs/CampaignsUpdateCouponCampaignBase.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::CampaignsUpdateCouponCampaignBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **unset_metadata_fields** | **Array<String>** | Determine which metadata should be removed from campaign. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+
diff --git a/docs/CampaignsUpdateDiscountCouponsCampaign.md b/docs/CampaignsUpdateDiscountCouponsCampaign.md
new file mode 100644
index 00000000..a0ebf728
--- /dev/null
+++ b/docs/CampaignsUpdateDiscountCouponsCampaign.md
@@ -0,0 +1,21 @@
+# VoucherifySdk::CampaignsUpdateDiscountCouponsCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **unset_metadata_fields** | **Array<String>** | Determine which metadata should be removed from campaign. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+
diff --git a/docs/CampaignsUpdateGiftCampaign.md b/docs/CampaignsUpdateGiftCampaign.md
new file mode 100644
index 00000000..4f246621
--- /dev/null
+++ b/docs/CampaignsUpdateGiftCampaign.md
@@ -0,0 +1,21 @@
+# VoucherifySdk::CampaignsUpdateGiftCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **unset_metadata_fields** | **Array<String>** | Determine which metadata should be removed from campaign. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **gift** | [**Gift**](Gift.md) | | [optional] |
+
diff --git a/docs/CampaignsUpdateGiveawayCampaign.md b/docs/CampaignsUpdateGiveawayCampaign.md
new file mode 100644
index 00000000..eed0c26d
--- /dev/null
+++ b/docs/CampaignsUpdateGiveawayCampaign.md
@@ -0,0 +1,23 @@
+# VoucherifySdk::CampaignsUpdateGiveawayCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **unset_metadata_fields** | **Array<String>** | Determine which metadata should be removed from campaign. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **winners_count** | **String** | It represents the total number of winners in a lucky draw. | [optional] |
+| **unique_winners_per_draw** | **String** | It indicates whether each winner in a draw is unique or not. | [optional] |
+| **unique_winners** | **String** | Specifies whether each participant can win only once across multiple draws. | [optional] |
+
diff --git a/docs/CampaignsUpdateLoyaltyCampaign.md b/docs/CampaignsUpdateLoyaltyCampaign.md
new file mode 100644
index 00000000..d007340c
--- /dev/null
+++ b/docs/CampaignsUpdateLoyaltyCampaign.md
@@ -0,0 +1,22 @@
+# VoucherifySdk::CampaignsUpdateLoyaltyCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **unset_metadata_fields** | **Array<String>** | Determine which metadata should be removed from campaign. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **loyalty_tiers_expiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] |
+| **options** | [**PropertiesForLoyaltyCampaignOptions**](PropertiesForLoyaltyCampaignOptions.md) | | [optional] |
+
diff --git a/docs/CampaignsUpdatePromotionCampaign.md b/docs/CampaignsUpdatePromotionCampaign.md
new file mode 100644
index 00000000..7b44ad33
--- /dev/null
+++ b/docs/CampaignsUpdatePromotionCampaign.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::CampaignsUpdatePromotionCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **unset_metadata_fields** | **Array<String>** | Determine which metadata should be removed from campaign. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+
diff --git a/docs/CampaignsUpdateReferralCampaign.md b/docs/CampaignsUpdateReferralCampaign.md
new file mode 100644
index 00000000..ee359069
--- /dev/null
+++ b/docs/CampaignsUpdateReferralCampaign.md
@@ -0,0 +1,22 @@
+# VoucherifySdk::CampaignsUpdateReferralCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **unset_metadata_fields** | **Array<String>** | Determine which metadata should be removed from campaign. | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`. | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional] |
+
diff --git a/docs/CampaignsUpdateRequestBody.md b/docs/CampaignsUpdateRequestBody.md
new file mode 100644
index 00000000..c0b4dd33
--- /dev/null
+++ b/docs/CampaignsUpdateRequestBody.md
@@ -0,0 +1,57 @@
+# VoucherifySdk::CampaignsUpdateRequestBody
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::CampaignsUpdateRequestBody.openapi_one_of
+# =>
+# [
+# :'CampaignsUpdateDiscountCouponsCampaign',
+# :'CampaignsUpdateGiftCampaign',
+# :'CampaignsUpdateGiveawayCampaign',
+# :'CampaignsUpdateLoyaltyCampaign',
+# :'CampaignsUpdatePromotionCampaign',
+# :'CampaignsUpdateReferralCampaign'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::CampaignsUpdateRequestBody.build(data)
+# => #
+
+VoucherifySdk::CampaignsUpdateRequestBody.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `CampaignsUpdateDiscountCouponsCampaign`
+- `CampaignsUpdateGiftCampaign`
+- `CampaignsUpdateGiveawayCampaign`
+- `CampaignsUpdateLoyaltyCampaign`
+- `CampaignsUpdatePromotionCampaign`
+- `CampaignsUpdateReferralCampaign`
+- `nil` (if no type matches)
+
diff --git a/docs/CampaignsUpdateResponseBody.md b/docs/CampaignsUpdateResponseBody.md
new file mode 100644
index 00000000..ec7b10a8
--- /dev/null
+++ b/docs/CampaignsUpdateResponseBody.md
@@ -0,0 +1,37 @@
+# VoucherifySdk::CampaignsUpdateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique campaign ID, assigned by Voucherify. | |
+| **name** | **String** | Campaign name. | |
+| **description** | **String** | An optional field to keep any extra textual information about the campaign such as a campaign description and details. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published | |
+| **voucher** | [**CampaignVoucher**](CampaignVoucher.md) | | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | |
+| **use_voucher_metadata_schema** | **Boolean** | Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema. | |
+| **validity_timeframe** | [**CampaignBaseValidityTimeframe**](CampaignBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **activity_duration_after_publishing** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days. | [optional] |
+| **vouchers_count** | **Integer** | Total number of unique vouchers in campaign. | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **active** | **Boolean** | A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the campaign was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was updated in ISO 8601 format. | [optional] |
+| **category** | **String** | Unique category name. | [optional] |
+| **creation_status** | **String** | Indicates the status of the campaign creation. | |
+| **vouchers_generation_status** | **String** | Indicates the status of the campaign's vouchers. | |
+| **protected** | **Boolean** | Indicates whether the resource can be deleted. | |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. | |
+| **categories** | [**Array<Category>**](Category.md) | Contains details about the category. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the campaign. | [default to 'campaign'] |
+| **referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional] |
+| **loyalty_tiers_expiration** | [**LoyaltyTiersExpirationAll**](LoyaltyTiersExpirationAll.md) | | [optional] |
+| **promotion** | [**PromotionTiersList**](PromotionTiersList.md) | | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+
diff --git a/docs/CampaignsVouchersCreateBaseRequestBody.md b/docs/CampaignsVouchersCreateBaseRequestBody.md
new file mode 100644
index 00000000..7b1a17dd
--- /dev/null
+++ b/docs/CampaignsVouchersCreateBaseRequestBody.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::CampaignsVouchersCreateBaseRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] |
+| **redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | [optional] |
+| **additional_info** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] |
+
diff --git a/docs/CampaignsVouchersCreateInBulkRequestBody.md b/docs/CampaignsVouchersCreateInBulkRequestBody.md
new file mode 100644
index 00000000..30004237
--- /dev/null
+++ b/docs/CampaignsVouchersCreateInBulkRequestBody.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::CampaignsVouchersCreateInBulkRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] |
+| **redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | [optional] |
+| **additional_info** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] |
+| **code** | **String** | Unique voucher code. | [optional] |
+| **code_config** | [**CodeConfig**](CodeConfig.md) | | [optional] |
+
diff --git a/docs/CampaignsVouchersCreateInBulkResponseBody.md b/docs/CampaignsVouchersCreateInBulkResponseBody.md
new file mode 100644
index 00000000..9a3edac1
--- /dev/null
+++ b/docs/CampaignsVouchersCreateInBulkResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CampaignsVouchersCreateInBulkResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/CampaignsVouchersCreateRequestBody.md b/docs/CampaignsVouchersCreateRequestBody.md
new file mode 100644
index 00000000..7bcbf42b
--- /dev/null
+++ b/docs/CampaignsVouchersCreateRequestBody.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::CampaignsVouchersCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **category** | **String** | The category assigned to the campaign. Either pass this parameter OR the `category_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the voucher. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] |
+| **redemption** | [**CampaignsImportVoucherItemRedemption**](CampaignsImportVoucherItemRedemption.md) | | [optional] |
+| **additional_info** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the voucher starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the voucher expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] |
+
diff --git a/docs/CampaignsVouchersCreateResponseBody.md b/docs/CampaignsVouchersCreateResponseBody.md
new file mode 100644
index 00000000..65675733
--- /dev/null
+++ b/docs/CampaignsVouchersCreateResponseBody.md
@@ -0,0 +1,37 @@
+# VoucherifySdk::CampaignsVouchersCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] |
+| **code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] |
+| **campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] |
+| **campaign_id** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] |
+| **category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] |
+| **category_id** | **String** | Unique category ID assigned by Voucherify. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | Contains details about the category. | [optional] |
+| **type** | **String** | Defines the type of the voucher. | [optional] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **gift** | [**VoucherGift**](VoucherGift.md) | | [optional] |
+| **loyalty_card** | [**VoucherLoyaltyCard**](VoucherLoyaltyCard.md) | | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**VoucherValidityTimeframe**](VoucherValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] |
+| **additional_info** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] |
+| **assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the voucher was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] |
+| **holder_id** | **String** | Unique customer ID of voucher owner. | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. Default is `voucher`. | [optional][default to 'voucher'] |
+| **distributions** | **Array<Object>** | | [optional] |
+| **deleted** | **Boolean** | Flag indicating whether this voucher is deleted. | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+| **publish** | [**VoucherPublish**](VoucherPublish.md) | | [optional] |
+| **redemption** | [**VoucherRedemption**](VoucherRedemption.md) | | [optional] |
+
diff --git a/docs/CategoriesApi.md b/docs/CategoriesApi.md
new file mode 100644
index 00000000..84bf5153
--- /dev/null
+++ b/docs/CategoriesApi.md
@@ -0,0 +1,304 @@
+# VoucherifySdk::CategoriesApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_category**](CategoriesApi.md#create_category) | **POST** /v1/categories | Create Category |
+| [**delete_category**](CategoriesApi.md#delete_category) | **DELETE** /v1/categories/{categoryId} | Delete Category |
+| [**get_category**](CategoriesApi.md#get_category) | **GET** /v1/categories/{categoryId} | Get Category |
+| [**list_categories**](CategoriesApi.md#list_categories) | **GET** /v1/categories | List Categories |
+| [**update_category**](CategoriesApi.md#update_category) | **PUT** /v1/categories/{categoryId} | Update Category |
+
+
+## create_category
+
+> create_category(opts)
+
+Create Category
+
+Create category with a specific name and hierarchy.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CategoriesApi.new
+opts = {
+ categories_create_request_body: VoucherifySdk::CategoriesCreateRequestBody.new({name: 'name_example', hierarchy: 37}) # CategoriesCreateRequestBody | Specify the details of the category that you would like to create.
+}
+
+begin
+ # Create Category
+ result = api_instance.create_category(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CategoriesApi->create_category: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **categories_create_request_body** | [**CategoriesCreateRequestBody**](CategoriesCreateRequestBody.md) | Specify the details of the category that you would like to create. | [optional] |
+
+### Return type
+
+[**CategoriesCreateResponseBody**](CategoriesCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## delete_category
+
+> delete_category(category_id)
+
+Delete Category
+
+Delete a category by the category ID.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CategoriesApi.new
+category_id = 'category_id_example' # String | Unique category ID assigned by Voucherify.
+
+begin
+ # Delete Category
+ api_instance.delete_category(category_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CategoriesApi->delete_category: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **category_id** | **String** | Unique category ID assigned by Voucherify. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## get_category
+
+> get_category(category_id)
+
+Get Category
+
+Retrieve a category by the category ID.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CategoriesApi.new
+category_id = 'category_id_example' # String | Unique category ID assigned by Voucherify.
+
+begin
+ # Get Category
+ result = api_instance.get_category(category_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CategoriesApi->get_category: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **category_id** | **String** | Unique category ID assigned by Voucherify. | |
+
+### Return type
+
+[**CategoriesGetResponseBody**](CategoriesGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_categories
+
+> list_categories
+
+List Categories
+
+List all categories.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CategoriesApi.new
+
+begin
+ # List Categories
+ result = api_instance.list_categories
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CategoriesApi->list_categories: #{e}"
+end
+```
+
+### Parameters
+
+This endpoint does not need any parameter.
+
+### Return type
+
+[**CategoriesListResponseBody**](CategoriesListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## update_category
+
+> update_category(category_id, opts)
+
+Update Category
+
+Update category using the category ID.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CategoriesApi.new
+category_id = 'category_id_example' # String | Unique category ID assigned by Voucherify.
+opts = {
+ categories_update_request_body: VoucherifySdk::CategoriesUpdateRequestBody.new({name: 'name_example', hierarchy: 37}) # CategoriesUpdateRequestBody | Specify the details of the category that you would like to update.
+}
+
+begin
+ # Update Category
+ result = api_instance.update_category(category_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CategoriesApi->update_category: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **category_id** | **String** | Unique category ID assigned by Voucherify. | |
+| **categories_update_request_body** | [**CategoriesUpdateRequestBody**](CategoriesUpdateRequestBody.md) | Specify the details of the category that you would like to update. | [optional] |
+
+### Return type
+
+[**CategoriesUpdateResponseBody**](CategoriesUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/CategoriesCreateRequestBody.md b/docs/CategoriesCreateRequestBody.md
new file mode 100644
index 00000000..319f0f99
--- /dev/null
+++ b/docs/CategoriesCreateRequestBody.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::CategoriesCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Category name. | |
+| **hierarchy** | **Integer** | Category hierarchy. | |
+
diff --git a/docs/CategoriesCreateResponseBody.md b/docs/CategoriesCreateResponseBody.md
new file mode 100644
index 00000000..31fedbac
--- /dev/null
+++ b/docs/CategoriesCreateResponseBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::CategoriesCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique category ID assigned by Voucherify. | |
+| **name** | **String** | Category name. | |
+| **hierarchy** | **Integer** | Category hierarchy. | |
+| **object** | **String** | | [default to 'category'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the category was created in ISO 8601 format. | |
+
diff --git a/docs/CategoriesGetResponseBody.md b/docs/CategoriesGetResponseBody.md
new file mode 100644
index 00000000..ce0f7bd0
--- /dev/null
+++ b/docs/CategoriesGetResponseBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::CategoriesGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique category ID assigned by Voucherify. | |
+| **name** | **String** | Category name. | |
+| **hierarchy** | **Integer** | Category hierarchy. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the category. | [default to 'category'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the category was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the category was updated in ISO 8601 format. | [optional] |
+| **stacking_rules_type** | **String** | The type of the stacking rule eligibility. | [optional] |
+
diff --git a/docs/CategoriesListResponseBody.md b/docs/CategoriesListResponseBody.md
new file mode 100644
index 00000000..6d67155c
--- /dev/null
+++ b/docs/CategoriesListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::CategoriesListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about categories in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of category objects. | [default to 'data'] |
+| **data** | [**Array<Category>**](Category.md) | | |
+| **total** | **Integer** | Total number of categories. | |
+
diff --git a/docs/CategoriesUpdateRequestBody.md b/docs/CategoriesUpdateRequestBody.md
new file mode 100644
index 00000000..efa3979a
--- /dev/null
+++ b/docs/CategoriesUpdateRequestBody.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::CategoriesUpdateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Category name. | |
+| **hierarchy** | **Integer** | Category hierarchy. | |
+
diff --git a/docs/CategoriesUpdateResponseBody.md b/docs/CategoriesUpdateResponseBody.md
new file mode 100644
index 00000000..584c84e9
--- /dev/null
+++ b/docs/CategoriesUpdateResponseBody.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::CategoriesUpdateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique category ID assigned by Voucherify. | |
+| **name** | **String** | Category name. | |
+| **hierarchy** | **Integer** | Category hierarchy. | |
+| **object** | **String** | | [default to 'category'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the category was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the category was updated in ISO 8601 format. | |
+
diff --git a/docs/Category.md b/docs/Category.md
new file mode 100644
index 00000000..2363e4b0
--- /dev/null
+++ b/docs/Category.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::Category
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique category ID assigned by Voucherify. | |
+| **name** | **String** | Category name. | |
+| **hierarchy** | **Integer** | Category hierarchy. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the category. | [default to 'category'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the category was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the category was updated in ISO 8601 format. | [optional] |
+| **stacking_rules_type** | **String** | The type of the stacking rule eligibility. | [optional] |
+
diff --git a/docs/ClientEventsCreateRequestBody.md b/docs/ClientEventsCreateRequestBody.md
new file mode 100644
index 00000000..6ab123e5
--- /dev/null
+++ b/docs/ClientEventsCreateRequestBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::ClientEventsCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **event** | **String** | Event name. This is the same name that you used to define a custom event in the **Dashboard** > **Project Settings** > **Event Schema**. | |
+| **customer** | [**Customer**](Customer.md) | | |
+| **referral** | [**ClientEventsCreateRequestBodyReferral**](ClientEventsCreateRequestBodyReferral.md) | | [optional] |
+| **loyalty** | [**ClientEventsCreateRequestBodyLoyalty**](ClientEventsCreateRequestBodyLoyalty.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the event. A set of key/value pairs that you can attach to an event object. It can be useful for storing additional information about the event in a structured format. Event metadata schema is defined in the **Dashboard** > **Project Settings** > **Event Schema** > **Edit particular event** > **Metadata property definition**. | [optional] |
+
diff --git a/docs/ClientEventsCreateRequestBodyLoyalty.md b/docs/ClientEventsCreateRequestBodyLoyalty.md
new file mode 100644
index 00000000..02eedd55
--- /dev/null
+++ b/docs/ClientEventsCreateRequestBodyLoyalty.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::ClientEventsCreateRequestBodyLoyalty
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | Code of the loyalty card to receive points based on the calculation method defined in the related earning rule. An earning rule is triggered for the loyalty card when the event passed in the `event` parameter of the request payload gets sent along with this loyalty card code. | |
+
diff --git a/docs/ClientEventsCreateRequestBodyReferral.md b/docs/ClientEventsCreateRequestBodyReferral.md
new file mode 100644
index 00000000..7ff8ffe6
--- /dev/null
+++ b/docs/ClientEventsCreateRequestBodyReferral.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ClientEventsCreateRequestBodyReferral
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | A code through which a new visitor has been referred to a service. | |
+| **referrer_id** | **String** | Unique ID of the referring person - it is optional and not required if the referral **code** is provided. | [optional] |
+
diff --git a/docs/ClientEventsCreateResponseBody.md b/docs/ClientEventsCreateResponseBody.md
new file mode 100644
index 00000000..3629c2f5
--- /dev/null
+++ b/docs/ClientEventsCreateResponseBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::ClientEventsCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The object represented is an `event`. | [default to 'event'] |
+| **type** | **String** | The event name. | |
+| **customer** | [**SimpleCustomerRequiredObjectType**](SimpleCustomerRequiredObjectType.md) | | |
+| **referral** | **Object** | A `null` referral object. | |
+| **loyalty** | **Object** | A `null` loyalty object. | |
+
diff --git a/docs/ClientQualificationsCheckEligibilityRequestBody.md b/docs/ClientQualificationsCheckEligibilityRequestBody.md
new file mode 100644
index 00000000..d6e6f1bc
--- /dev/null
+++ b/docs/ClientQualificationsCheckEligibilityRequestBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ClientQualificationsCheckEligibilityRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **order** | [**Order**](Order.md) | | [optional] |
+| **mode** | **String** | Defines which resources Voucherify will use. The `ADVANCED` mode is available after purchase only. | [optional] |
+| **tracking_id** | **String** | Is correspondent to Customer's source_id | [optional] |
+| **scenario** | **String** | Defines the scenario Voucherify should consider during the qualification process. - `ALL` - Scenario that returns all redeemables available for the customer in one API request. This scenario is used by default when no value is selected. - `CUSTOMER_WALLET` - returns vouchers applicable to the customer’s cart based on the vouchers assigned to the customer’s profile. - `AUDIENCE_ONLY` - returns all vouchers, promotion tiers, and campaigns available to the customer. Voucherify validates the rules based on the customer profile only. - `PRODUCTS` - returns all promotions available for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT` - returns all promotions available for products when a discount is defined as applicable to specific item(s). - `PROMOTION_STACKS` - returns the applicable promotion stacks. - `PRODUCTS_BY_CUSTOMER` - returns all promotions available for a customer for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT_BY_CUSTOMER` - returns all promotions available for a customer for products when a discount is defined as applicable to specific item(s). | [optional] |
+| **options** | [**QualificationsOption**](QualificationsOption.md) | | [optional] |
+| **metadata** | **Object** | A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the <!-- [Create Validation Rules](https://docs.voucherify.io/reference/create-validation-rules) -->[Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule). | [optional] |
+
diff --git a/docs/ClientQualificationsCheckEligibilityRequestBodyOptions.md b/docs/ClientQualificationsCheckEligibilityRequestBodyOptions.md
new file mode 100644
index 00000000..671a8296
--- /dev/null
+++ b/docs/ClientQualificationsCheckEligibilityRequestBodyOptions.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::ClientQualificationsCheckEligibilityRequestBodyOptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | The maximum number of redeemables to be returned in the API request. The actual number of returned redeemables will be determined by the API. The default value is set to 5 | [optional] |
+| **starting_after** | **Time** | Cursor used for paging. | [optional] |
+| **filters** | [**ClientQualificationsCheckEligibilityRequestBodyOptionsFilters**](ClientQualificationsCheckEligibilityRequestBodyOptionsFilters.md) | | [optional] |
+| **expand** | **Array<String>** | The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"redeemable\"] | - Returns the redeemables' metadata. | | [\"category\"] | - Returns an expanded `categories` object, showing details about the category. | | [\"validation_rules\"] | - Returns an expanded `validation_rules` object, showing details about the validation rules. | | [optional] |
+| **sorting_rule** | **String** | Is used to determine the order in which data is displayed in the result array. - `DEFAULT` - Sorting descending by `created_at` - `BEST_DEAL` - Sorting descending by `total_applied_discount_amount` - `LEAST_DEAL` - Sorting ascending by `total_applied_discount_amount` | [optional] |
+
diff --git a/docs/ClientQualificationsCheckEligibilityRequestBodyOptionsFilters.md b/docs/ClientQualificationsCheckEligibilityRequestBodyOptionsFilters.md
new file mode 100644
index 00000000..5e60b5a8
--- /dev/null
+++ b/docs/ClientQualificationsCheckEligibilityRequestBodyOptionsFilters.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ClientQualificationsCheckEligibilityRequestBodyOptionsFilters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+| **category_id** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] |
+| **campaign_id** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] |
+| **resource_id** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] |
+| **resource_type** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] |
+| **voucher_type** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] |
+| **code** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] |
+
diff --git a/docs/ClientQualificationsCheckEligibilityResponseBody.md b/docs/ClientQualificationsCheckEligibilityResponseBody.md
new file mode 100644
index 00000000..cc0f797a
--- /dev/null
+++ b/docs/ClientQualificationsCheckEligibilityResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ClientQualificationsCheckEligibilityResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redeemables** | [**QualificationsRedeemables**](QualificationsRedeemables.md) | | [optional] |
+| **tracking_id** | **String** | This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID. | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **stacking_rules** | [**StackingRules**](StackingRules.md) | | [optional] |
+
diff --git a/docs/ClientRedemptionsRedeemRequestBody.md b/docs/ClientRedemptionsRedeemRequestBody.md
new file mode 100644
index 00000000..5cdc25b3
--- /dev/null
+++ b/docs/ClientRedemptionsRedeemRequestBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ClientRedemptionsRedeemRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redeemables** | [**Array<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | An array of redeemables. You can combine `voucher`(s) and `promotion_tier`(s). Alternatively, send one unique`promotion_stack` in the array. | |
+| **order** | [**Order**](Order.md) | | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **session** | [**Session**](Session.md) | | [optional] |
+| **tracking_id** | **String** | Is correspondent to Customer's source_id | [optional] |
+| **metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | [optional] |
+| **options** | [**ClientRedemptionsRedeemRequestBodyAllOfOptions**](ClientRedemptionsRedeemRequestBodyAllOfOptions.md) | | [optional] |
+
diff --git a/docs/ClientRedemptionsRedeemRequestBodyAllOfOptions.md b/docs/ClientRedemptionsRedeemRequestBodyAllOfOptions.md
new file mode 100644
index 00000000..980f60d6
--- /dev/null
+++ b/docs/ClientRedemptionsRedeemRequestBodyAllOfOptions.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::ClientRedemptionsRedeemRequestBodyAllOfOptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **expand** | **Array<String>** | Expand array lets you configure params included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"order\"] | - Same response as fallback response (without an options object).<br>- Order data with calculated discounts are listed in each child redeemable object.<br>- Metadata not included for each discount type. | | [\"redeemable\"] | Expands redeemable objects by including `metadata` for each discount type. | | [\"order\", \"redeemable\"] | - Order data with calculated discounts are listed in each child redeemable object.<br>- Includes `metadata` for each discount type. | | [\"redeemable\", \"redemption\", \"category\"] | - Returns each discount type's `metadata` in each child redemption object.<br>- Returns redemption object `metadata`.<br>- Returns an expanded `categories` object, showing details about the category. | | [optional] |
+
diff --git a/docs/ClientRedemptionsRedeemResponseBody.md b/docs/ClientRedemptionsRedeemResponseBody.md
new file mode 100644
index 00000000..f0f0db34
--- /dev/null
+++ b/docs/ClientRedemptionsRedeemResponseBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::ClientRedemptionsRedeemResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redemptions** | [**Array<Redemption>**](Redemption.md) | | [optional] |
+| **parent_redemption** | [**Redemption**](Redemption.md) | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **inapplicable_redeemables** | [**Array<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional] |
+| **skipped_redeemables** | [**Array<ValidationsRedeemableSkipped>**](ValidationsRedeemableSkipped.md) | Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`. | [optional] |
+
diff --git a/docs/ClientSideApi.md b/docs/ClientSideApi.md
new file mode 100644
index 00000000..15820557
--- /dev/null
+++ b/docs/ClientSideApi.md
@@ -0,0 +1,319 @@
+# VoucherifySdk::ClientSideApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**check_eligibility_client_side**](ClientSideApi.md#check_eligibility_client_side) | **POST** /client/v1/qualifications | Check Eligibility (client-side) |
+| [**redeem_stacked_discounts_client_side**](ClientSideApi.md#redeem_stacked_discounts_client_side) | **POST** /client/v1/redemptions | Redeem Stackable Discounts (client-side) |
+| [**track_custom_event_client_side**](ClientSideApi.md#track_custom_event_client_side) | **POST** /client/v1/events | Track Custom Event (client-side) |
+| [**update_customers_consents_client_side**](ClientSideApi.md#update_customers_consents_client_side) | **PUT** /client/v1/customers/{customerId}/consents | Update Customer's consents (client-side) |
+| [**validate_stacked_discounts_client_side**](ClientSideApi.md#validate_stacked_discounts_client_side) | **POST** /client/v1/validations | Validate Stackable Discounts (client-side) |
+
+
+## check_eligibility_client_side
+
+> check_eligibility_client_side(opts)
+
+Check Eligibility (client-side)
+
+Generate a list of redeemables that are applicable in the context of the customer and order. The new qualifications method is an improved version of Campaign Qualifications, Voucher Qualifications, and Promotions Validation API requests. The new qualification method introduces the following improvements: - Qualification results are returned faster - No limit on the number of returned redeemables - Introduces new qualification scenarios, not available in the previous version 👍 Scenario Guide Read our dedicated guide to learn about some use cases this endpoint can cover here. # Paging The Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 50 redeemables. To get the next batch of redeemables, you need to use the starting_after cursor. To process of paging the redeemables works in the following manner: - You send the first API request for Qualifications without the starting_after parameter. - The response will contain a parameter named has_more. If the parameters value is set to true, then more redeemables are available. - Get the value of the created_at parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables. - Send another API request for Qualification with the starting_after parameter set to the value taken from the created_at parameter from the last returned redeemable. - Voucherify will return the next page of redeemables. - If the has_more parameter is set to true, apply steps 3-5 to get the next page of redeemables.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-Client-Application-Id
+ config.api_key['X-Client-Application-Id'] = '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['X-Client-Application-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-Client-Token
+ config.api_key['X-Client-Token'] = '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['X-Client-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ClientSideApi.new
+opts = {
+ client_qualifications_check_eligibility_request_body: VoucherifySdk::ClientQualificationsCheckEligibilityRequestBody.new # ClientQualificationsCheckEligibilityRequestBody | Define order and customer context.
+}
+
+begin
+ # Check Eligibility (client-side)
+ result = api_instance.check_eligibility_client_side(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ClientSideApi->check_eligibility_client_side: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **client_qualifications_check_eligibility_request_body** | [**ClientQualificationsCheckEligibilityRequestBody**](ClientQualificationsCheckEligibilityRequestBody.md) | Define order and customer context. | [optional] |
+
+### Return type
+
+[**ClientQualificationsCheckEligibilityResponseBody**](ClientQualificationsCheckEligibilityResponseBody.md)
+
+### Authorization
+
+[X-Client-Application-Id](../README.md#X-Client-Application-Id), [X-Client-Token](../README.md#X-Client-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## redeem_stacked_discounts_client_side
+
+> redeem_stacked_discounts_client_side(origin, opts)
+
+Redeem Stackable Discounts (client-side)
+
+This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications. # How API returns calculated discounts and order amounts in the response In the table below, you can see the logic the API follows to calculate discounts and amounts: 📘 Rollbacks You cant roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your rollback request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-Client-Application-Id
+ config.api_key['X-Client-Application-Id'] = '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['X-Client-Application-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-Client-Token
+ config.api_key['X-Client-Token'] = '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['X-Client-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ClientSideApi.new
+origin = 'origin_example' # String | Indicates the origin (scheme, hostname, and port).
+opts = {
+ client_redemptions_redeem_request_body: VoucherifySdk::ClientRedemptionsRedeemRequestBody.new({redeemables: [VoucherifySdk::RedeemGiftCard.new({object: 'voucher', id: 'id_example'})]}) # ClientRedemptionsRedeemRequestBody |
+}
+
+begin
+ # Redeem Stackable Discounts (client-side)
+ result = api_instance.redeem_stacked_discounts_client_side(origin, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ClientSideApi->redeem_stacked_discounts_client_side: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **origin** | **String** | Indicates the origin (scheme, hostname, and port). | |
+| **client_redemptions_redeem_request_body** | [**ClientRedemptionsRedeemRequestBody**](ClientRedemptionsRedeemRequestBody.md) | | [optional] |
+
+### Return type
+
+[**ClientRedemptionsRedeemResponseBody**](ClientRedemptionsRedeemResponseBody.md)
+
+### Authorization
+
+[X-Client-Application-Id](../README.md#X-Client-Application-Id), [X-Client-Token](../README.md#X-Client-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## track_custom_event_client_side
+
+> track_custom_event_client_side(origin, opts)
+
+Track Custom Event (client-side)
+
+To track a custom event, you create an event object. The event object must be linked to the customer who performs the action. If a customer doesnt exist in Voucherify, the customer will be created.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-Client-Application-Id
+ config.api_key['X-Client-Application-Id'] = '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['X-Client-Application-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-Client-Token
+ config.api_key['X-Client-Token'] = '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['X-Client-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ClientSideApi.new
+origin = 'origin_example' # String | Indicates the origin (scheme, hostname, and port).
+opts = {
+ client_events_create_request_body: VoucherifySdk::ClientEventsCreateRequestBody.new({event: 'event_example', customer: VoucherifySdk::Customer.new}) # ClientEventsCreateRequestBody | Specify the details of the custom event.
+}
+
+begin
+ # Track Custom Event (client-side)
+ result = api_instance.track_custom_event_client_side(origin, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ClientSideApi->track_custom_event_client_side: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **origin** | **String** | Indicates the origin (scheme, hostname, and port). | |
+| **client_events_create_request_body** | [**ClientEventsCreateRequestBody**](ClientEventsCreateRequestBody.md) | Specify the details of the custom event. | [optional] |
+
+### Return type
+
+[**ClientEventsCreateResponseBody**](ClientEventsCreateResponseBody.md)
+
+### Authorization
+
+[X-Client-Application-Id](../README.md#X-Client-Application-Id), [X-Client-Token](../README.md#X-Client-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## update_customers_consents_client_side
+
+> update_customers_consents_client_side(customer_id, opts)
+
+Update Customer's consents (client-side)
+
+Update marketing permissions for the specified customer.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-Client-Application-Id
+ config.api_key['X-Client-Application-Id'] = '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['X-Client-Application-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-Client-Token
+ config.api_key['X-Client-Token'] = '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['X-Client-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ClientSideApi.new
+customer_id = 'customer_id_example' # String | A Voucherify customer identifier or source_id
+opts = {
+ body: { ... } # Object | Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use unsubscribed as a consent identifier and true as its value. ## Examples Opt-out from all communication:
+}
+
+begin
+ # Update Customer's consents (client-side)
+ api_instance.update_customers_consents_client_side(customer_id, opts)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ClientSideApi->update_customers_consents_client_side: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer_id** | **String** | A Voucherify customer identifier or source_id | |
+| **body** | **Object** | Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use unsubscribed as a consent identifier and true as its value. ## Examples Opt-out from all communication: | [optional] |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-Client-Application-Id](../README.md#X-Client-Application-Id), [X-Client-Token](../README.md#X-Client-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+## validate_stacked_discounts_client_side
+
+> validate_stacked_discounts_client_side(origin, opts)
+
+Validate Stackable Discounts (client-side)
+
+Verify redeemables provided in the request. This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-Client-Application-Id
+ config.api_key['X-Client-Application-Id'] = '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['X-Client-Application-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-Client-Token
+ config.api_key['X-Client-Token'] = '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['X-Client-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ClientSideApi.new
+origin = 'origin_example' # String | Indicates the origin (scheme, hostname, and port).
+opts = {
+ client_validations_validate_request_body: VoucherifySdk::ClientValidationsValidateRequestBody.new({redeemables: [VoucherifySdk::RedeemGiftCard.new({object: 'voucher', id: 'id_example'})]}) # ClientValidationsValidateRequestBody |
+}
+
+begin
+ # Validate Stackable Discounts (client-side)
+ result = api_instance.validate_stacked_discounts_client_side(origin, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ClientSideApi->validate_stacked_discounts_client_side: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **origin** | **String** | Indicates the origin (scheme, hostname, and port). | |
+| **client_validations_validate_request_body** | [**ClientValidationsValidateRequestBody**](ClientValidationsValidateRequestBody.md) | | [optional] |
+
+### Return type
+
+[**ClientValidationsValidateResponseBody**](ClientValidationsValidateResponseBody.md)
+
+### Authorization
+
+[X-Client-Application-Id](../README.md#X-Client-Application-Id), [X-Client-Token](../README.md#X-Client-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/ClientValidationsValidateRequestBody.md b/docs/ClientValidationsValidateRequestBody.md
new file mode 100644
index 00000000..c4184377
--- /dev/null
+++ b/docs/ClientValidationsValidateRequestBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ClientValidationsValidateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redeemables** | [**Array<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | An array of redeemables. You can combine `voucher`(s) and `promotion_tier`(s). Alternatively, send one unique`promotion_stack` in the array. | |
+| **order** | [**Order**](Order.md) | | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **session** | [**Session**](Session.md) | | [optional] |
+| **tracking_id** | **String** | Is correspondent to Customer's source_id | [optional] |
+| **metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | [optional] |
+| **options** | [**ClientValidationsValidateRequestBodyAllOfOptions**](ClientValidationsValidateRequestBodyAllOfOptions.md) | | [optional] |
+
diff --git a/docs/ClientValidationsValidateRequestBodyAllOfOptions.md b/docs/ClientValidationsValidateRequestBodyAllOfOptions.md
new file mode 100644
index 00000000..e681221b
--- /dev/null
+++ b/docs/ClientValidationsValidateRequestBodyAllOfOptions.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::ClientValidationsValidateRequestBodyAllOfOptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **expand** | **Array<String>** | The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"order\"] | - Same response as fallback response (without an options object).<br>- Order data with calculated discounts are listed in each child redeemable object.<br>- Metadata not included for each discount type. | | [\"redeemable\"] | Expands redeemable objects by including `metadata` for each discount type. | | [\"order\", \"redeemable\"] | - Order data with calculated discounts are listed in each child redeemable object.<br>- Includes `metadata` for each discount type. | | [\"category\"] | - Returns an expanded `categories` object, showing details about the category. | | [optional] |
+
diff --git a/docs/ClientValidationsValidateResponseBody.md b/docs/ClientValidationsValidateResponseBody.md
new file mode 100644
index 00000000..b95477b5
--- /dev/null
+++ b/docs/ClientValidationsValidateResponseBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ClientValidationsValidateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **valid** | **Boolean** | The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. | |
+| **redeemables** | [**Array<ValidationsValidateAllResponseBodyRedeemablesItem>**](ValidationsValidateAllResponseBodyRedeemablesItem.md) | Lists validation results of each redeemable. If redeemables_application_mode=\"PARTIAL\" all redeemables here will be \"APPLICABLE\" | |
+| **skipped_redeemables** | [**Array<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each skipped redeemable. | [optional] |
+| **inapplicable_redeemables** | [**Array<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **tracking_id** | **String** | Hashed customer source ID. | [optional] |
+| **session** | [**Session**](Session.md) | | [optional] |
+
diff --git a/docs/CodeConfig.md b/docs/CodeConfig.md
new file mode 100644
index 00000000..7c57bdd3
--- /dev/null
+++ b/docs/CodeConfig.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::CodeConfig
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **length** | **Float** | Number of characters in a generated code (excluding prefix and postfix). | [optional] |
+| **charset** | **String** | Characters that can appear in the code. Examples: - Alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic Lowercase: `abcdefghijklmnopqrstuvwxyz` - Alphabetic Uppercase: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` - Numbers: `0123456789` - Custom: a custom character set | [optional] |
+| **prefix** | **String** | A text appended before the code. | [optional] |
+| **postfix** | **String** | A text appended after the code. | [optional] |
+| **pattern** | **String** | A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`. | [optional] |
+| **initial_count** | **Integer** | The initial count | [optional] |
+
diff --git a/docs/CodeConfigRequiredLengthCharsetPattern.md b/docs/CodeConfigRequiredLengthCharsetPattern.md
new file mode 100644
index 00000000..1c5375c6
--- /dev/null
+++ b/docs/CodeConfigRequiredLengthCharsetPattern.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::CodeConfigRequiredLengthCharsetPattern
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **length** | **Float** | Number of characters in a generated code (excluding prefix and postfix). | |
+| **charset** | **String** | Characters that can appear in the code. Examples: - Alphanumeric: `0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` - Alphabetic Lowercase: `abcdefghijklmnopqrstuvwxyz` - Alphabetic Uppercase: `ABCDEFGHIJKLMNOPQRSTUVWXYZ` - Numbers: `0123456789` - Custom: a custom character set | |
+| **prefix** | **String** | A text appended before the code. | [optional] |
+| **postfix** | **String** | A text appended after the code. | [optional] |
+| **pattern** | **String** | A pattern for codes where hashes (#) will be replaced with random characters. Overrides `length`. | |
+| **initial_count** | **Integer** | The initial count | [optional] |
+
diff --git a/docs/CreatePublicationBase.md b/docs/CreatePublicationBase.md
new file mode 100644
index 00000000..cce1f64d
--- /dev/null
+++ b/docs/CreatePublicationBase.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::CreatePublicationBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **source_id** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If `source_id` is provided only 1 voucher can be published per request. | [optional] |
+| **customer** | [**Customer**](Customer.md) | | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. | [optional] |
+
diff --git a/docs/CreatePublicationCampaign.md b/docs/CreatePublicationCampaign.md
new file mode 100644
index 00000000..3071e239
--- /dev/null
+++ b/docs/CreatePublicationCampaign.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::CreatePublicationCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Name of voucher's parent campaign or unique campaign ID that was assigned by Voucherify. | |
+| **count** | **Integer** | Number of vouchers to be published to customer. | [optional] |
+
diff --git a/docs/CreatePublicationWithCampaign.md b/docs/CreatePublicationWithCampaign.md
new file mode 100644
index 00000000..61b027bf
--- /dev/null
+++ b/docs/CreatePublicationWithCampaign.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::CreatePublicationWithCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **source_id** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If `source_id` is provided only 1 voucher can be published per request. | [optional] |
+| **customer** | [**Customer**](Customer.md) | | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. | [optional] |
+| **campaign** | [**CreatePublicationCampaign**](CreatePublicationCampaign.md) | | |
+
diff --git a/docs/CreatePublicationWithSpecificVoucher.md b/docs/CreatePublicationWithSpecificVoucher.md
new file mode 100644
index 00000000..5ced831b
--- /dev/null
+++ b/docs/CreatePublicationWithSpecificVoucher.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::CreatePublicationWithSpecificVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **source_id** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If `source_id` is provided only 1 voucher can be published per request. | [optional] |
+| **customer** | [**Customer**](Customer.md) | | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. | [optional] |
+| **voucher** | **String** | Code of voucher being published. | |
+
diff --git a/docs/CustomEvent.md b/docs/CustomEvent.md
new file mode 100644
index 00000000..9cd728d6
--- /dev/null
+++ b/docs/CustomEvent.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::CustomEvent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique custom event ID. | [optional] |
+| **object** | **String** | The object represented is an `event`. | [default to 'event'] |
+| **type** | **String** | The event name. | |
+| **customer** | [**SimpleCustomerRequiredObjectType**](SimpleCustomerRequiredObjectType.md) | | |
+| **referral** | [**CustomEventReferral**](CustomEventReferral.md) | | |
+| **loyalty** | **Object** | | |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the custom event. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the custom event was created in ISO 8601 format. | [optional] |
+
diff --git a/docs/CustomEventReferral.md b/docs/CustomEventReferral.md
new file mode 100644
index 00000000..a8a40f41
--- /dev/null
+++ b/docs/CustomEventReferral.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::CustomEventReferral
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **referrer_id** | **String** | Unique referrer ID. | [optional] |
+| **code** | **String** | Voucher code. | [optional] |
+| **id** | **String** | Unique voucher ID. | [optional] |
+
diff --git a/docs/Customer.md b/docs/Customer.md
new file mode 100644
index 00000000..7d2082c7
--- /dev/null
+++ b/docs/Customer.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::Customer
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] |
+| **birthday** | **Date** | *Deprecated* Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **birthdate** | **Date** | Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+| **id** | **String** | The ID of an existing customer. | [optional] |
+| **source_id** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] |
+
diff --git a/docs/CustomerActivity.md b/docs/CustomerActivity.md
new file mode 100644
index 00000000..7812b134
--- /dev/null
+++ b/docs/CustomerActivity.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::CustomerActivity
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique event ID, assigned by Voucherify. | [optional] |
+| **type** | **String** | Event type. | [optional] |
+| **data** | [**Array<CustomerActivityData>**](CustomerActivityData.md) | Contains details about the event. The objects that are returned in the data attribute differ based on the context of the event type. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the customer activity occurred in ISO 8601 format. | [optional] |
+
diff --git a/docs/CustomerActivityData.md b/docs/CustomerActivityData.md
new file mode 100644
index 00000000..6cb4c706
--- /dev/null
+++ b/docs/CustomerActivityData.md
@@ -0,0 +1,183 @@
+# VoucherifySdk::CustomerActivityData
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::CustomerActivityData.openapi_one_of
+# =>
+# [
+# :'EventCustomerActiveCampaignFailed',
+# :'EventCustomerActiveCampaignRecovered',
+# :'EventCustomerActiveCampaignSent',
+# :'EventCustomerBatchFailed',
+# :'EventCustomerBatchRecovered',
+# :'EventCustomerBatchSent',
+# :'EventCustomerBrazeFailed',
+# :'EventCustomerBrazeRecovered',
+# :'EventCustomerBrazeSent',
+# :'EventCustomerConfirmed',
+# :'EventCustomerConsentsGiven',
+# :'EventCustomerConsentsRevoked',
+# :'EventCustomerCreated',
+# :'EventCustomerCustomEvent',
+# :'EventCustomerDeleted',
+# :'EventCustomerEmailFailed',
+# :'EventCustomerEmailRecovered',
+# :'EventCustomerEmailSent',
+# :'EventCustomerGiftVoucherBalanceAdded',
+# :'EventCustomerIntercomFailed',
+# :'EventCustomerIntercomRecovered',
+# :'EventCustomerIntercomSent',
+# :'EventCustomerKlaviyoFailed',
+# :'EventCustomerKlaviyoRecovered',
+# :'EventCustomerKlaviyoSent',
+# :'EventCustomerLoyaltyCardPointsAdded',
+# :'EventCustomerLoyaltyCardPointsTransferred',
+# :'EventCustomerLoyaltyTierDowngraded',
+# :'EventCustomerLoyaltyTierExpirationChanged',
+# :'EventCustomerLoyaltyTierJoined',
+# :'EventCustomerLoyaltyTierLeft',
+# :'EventCustomerLoyaltyTierProlonged',
+# :'EventCustomerLoyaltyTierUpgraded',
+# :'EventCustomerLoyaltyUpdated',
+# :'EventCustomerMailchimpFailed',
+# :'EventCustomerMailchimpRecovered',
+# :'EventCustomerMailchimpSent',
+# :'EventCustomerOrderCanceled',
+# :'EventCustomerOrderCreated',
+# :'EventCustomerOrderFulfilled',
+# :'EventCustomerOrderPaid',
+# :'EventCustomerOrderProcessing',
+# :'EventCustomerOrderUpdated',
+# :'EventCustomerPublicationFailed',
+# :'EventCustomerPublicationSucceeded',
+# :'EventCustomerRedemptionFailed',
+# :'EventCustomerRedemptionRollbackFailed',
+# :'EventCustomerRedemptionRollbackSucceeded',
+# :'EventCustomerRedemptionSucceeded',
+# :'EventCustomerReferred',
+# :'EventCustomerRewardRedemptionsCompleted',
+# :'EventCustomerRewardRedemptionsCreated',
+# :'EventCustomerRewardRedemptionsPending',
+# :'EventCustomerRewardRedemptionsRolledBack',
+# :'EventCustomerRewarded',
+# :'EventCustomerRewardedLoyaltyPoints',
+# :'EventCustomerSegmentEntered',
+# :'EventCustomerSegmentLeft',
+# :'EventCustomerShopifyFailed',
+# :'EventCustomerShopifyRecovered',
+# :'EventCustomerShopifySent',
+# :'EventCustomerSmsFailed',
+# :'EventCustomerSmsRecovered',
+# :'EventCustomerSmsSent',
+# :'EventCustomerUpdated',
+# :'EventCustomerValidationFailed',
+# :'EventCustomerValidationSucceeded',
+# :'EventCustomerVoucherDeleted',
+# :'EventCustomerVouchersLoyaltyPointsExpired'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::CustomerActivityData.build(data)
+# => #
+
+VoucherifySdk::CustomerActivityData.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `EventCustomerActiveCampaignFailed`
+- `EventCustomerActiveCampaignRecovered`
+- `EventCustomerActiveCampaignSent`
+- `EventCustomerBatchFailed`
+- `EventCustomerBatchRecovered`
+- `EventCustomerBatchSent`
+- `EventCustomerBrazeFailed`
+- `EventCustomerBrazeRecovered`
+- `EventCustomerBrazeSent`
+- `EventCustomerConfirmed`
+- `EventCustomerConsentsGiven`
+- `EventCustomerConsentsRevoked`
+- `EventCustomerCreated`
+- `EventCustomerCustomEvent`
+- `EventCustomerDeleted`
+- `EventCustomerEmailFailed`
+- `EventCustomerEmailRecovered`
+- `EventCustomerEmailSent`
+- `EventCustomerGiftVoucherBalanceAdded`
+- `EventCustomerIntercomFailed`
+- `EventCustomerIntercomRecovered`
+- `EventCustomerIntercomSent`
+- `EventCustomerKlaviyoFailed`
+- `EventCustomerKlaviyoRecovered`
+- `EventCustomerKlaviyoSent`
+- `EventCustomerLoyaltyCardPointsAdded`
+- `EventCustomerLoyaltyCardPointsTransferred`
+- `EventCustomerLoyaltyTierDowngraded`
+- `EventCustomerLoyaltyTierExpirationChanged`
+- `EventCustomerLoyaltyTierJoined`
+- `EventCustomerLoyaltyTierLeft`
+- `EventCustomerLoyaltyTierProlonged`
+- `EventCustomerLoyaltyTierUpgraded`
+- `EventCustomerLoyaltyUpdated`
+- `EventCustomerMailchimpFailed`
+- `EventCustomerMailchimpRecovered`
+- `EventCustomerMailchimpSent`
+- `EventCustomerOrderCanceled`
+- `EventCustomerOrderCreated`
+- `EventCustomerOrderFulfilled`
+- `EventCustomerOrderPaid`
+- `EventCustomerOrderProcessing`
+- `EventCustomerOrderUpdated`
+- `EventCustomerPublicationFailed`
+- `EventCustomerPublicationSucceeded`
+- `EventCustomerRedemptionFailed`
+- `EventCustomerRedemptionRollbackFailed`
+- `EventCustomerRedemptionRollbackSucceeded`
+- `EventCustomerRedemptionSucceeded`
+- `EventCustomerReferred`
+- `EventCustomerRewardRedemptionsCompleted`
+- `EventCustomerRewardRedemptionsCreated`
+- `EventCustomerRewardRedemptionsPending`
+- `EventCustomerRewardRedemptionsRolledBack`
+- `EventCustomerRewarded`
+- `EventCustomerRewardedLoyaltyPoints`
+- `EventCustomerSegmentEntered`
+- `EventCustomerSegmentLeft`
+- `EventCustomerShopifyFailed`
+- `EventCustomerShopifyRecovered`
+- `EventCustomerShopifySent`
+- `EventCustomerSmsFailed`
+- `EventCustomerSmsRecovered`
+- `EventCustomerSmsSent`
+- `EventCustomerUpdated`
+- `EventCustomerValidationFailed`
+- `EventCustomerValidationSucceeded`
+- `EventCustomerVoucherDeleted`
+- `EventCustomerVouchersLoyaltyPointsExpired`
+- `nil` (if no type matches)
+
diff --git a/docs/CustomerBase.md b/docs/CustomerBase.md
new file mode 100644
index 00000000..111b8c55
--- /dev/null
+++ b/docs/CustomerBase.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::CustomerBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] |
+| **birthday** | **Date** | *Deprecated* Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **birthdate** | **Date** | Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+
diff --git a/docs/CustomerBaseAddress.md b/docs/CustomerBaseAddress.md
new file mode 100644
index 00000000..c46cb694
--- /dev/null
+++ b/docs/CustomerBaseAddress.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::CustomerBaseAddress
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **city** | **String** | City | [optional] |
+| **state** | **String** | State | [optional] |
+| **line_1** | **String** | First line of address. | [optional] |
+| **line_2** | **String** | Second line of address. | [optional] |
+| **country** | **String** | Country. | [optional] |
+| **postal_code** | **String** | Postal code. | [optional] |
+
diff --git a/docs/CustomerId.md b/docs/CustomerId.md
new file mode 100644
index 00000000..d2ba73aa
--- /dev/null
+++ b/docs/CustomerId.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::CustomerId
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier of an existing customer. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'customer'] |
+
diff --git a/docs/CustomerLoyalty.md b/docs/CustomerLoyalty.md
new file mode 100644
index 00000000..b58c7733
--- /dev/null
+++ b/docs/CustomerLoyalty.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::CustomerLoyalty
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | Customer's loyalty points. | |
+| **referred_customers** | **Integer** | Total number of customers referred by the customer. | |
+| **campaigns** | [**Hash<String, CustomerLoyaltyCampaignsValue>**](CustomerLoyaltyCampaignsValue.md) | Contains campaigns with details about point balances and how many customers were referred by the customer. | |
+
diff --git a/docs/CustomerLoyaltyCampaignsValue.md b/docs/CustomerLoyaltyCampaignsValue.md
new file mode 100644
index 00000000..0ccc7cf7
--- /dev/null
+++ b/docs/CustomerLoyaltyCampaignsValue.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::CustomerLoyaltyCampaignsValue
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | Remaining point balance in campaign. | [optional] |
+| **loyalty_tier** | **String** | Customer's loyalty tier within the campaign. | [optional] |
+| **referred_customers** | **Integer** | Number of customers referred by the customer in campaign. | [optional] |
+
diff --git a/docs/CustomerReferrals.md b/docs/CustomerReferrals.md
new file mode 100644
index 00000000..d2a2774a
--- /dev/null
+++ b/docs/CustomerReferrals.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::CustomerReferrals
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **total** | **Integer** | Total number of times this customer received a referral, i.e. was referred by another customer. | |
+| **campaigns** | [**Array<CustomerReferralsCampaignsItem>**](CustomerReferralsCampaignsItem.md) | Contains an array of campaigns that served as the source of a referral for the customer. | |
+
diff --git a/docs/CustomerReferralsCampaignsItem.md b/docs/CustomerReferralsCampaignsItem.md
new file mode 100644
index 00000000..fcaa6ce5
--- /dev/null
+++ b/docs/CustomerReferralsCampaignsItem.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::CustomerReferralsCampaignsItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique campaign ID, assigned by Voucherify. | |
+| **referrer_id** | **String** | Unique referrer ID, assigned by Voucherify. This is the customer ID of a customer that is referring this customer. | |
+| **related_object_id** | **String** | Related object id | |
+| **related_object_type** | **String** | Related object type, i.e. `redemption`. | |
+| **date** | **Time** | Timestamp representing the date and time when the customer was referred in ISO 8601 format. | |
+
diff --git a/docs/CustomerResponseDataAssets.md b/docs/CustomerResponseDataAssets.md
new file mode 100644
index 00000000..15f98b15
--- /dev/null
+++ b/docs/CustomerResponseDataAssets.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CustomerResponseDataAssets
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **cockpit_url** | **String** | Customer's cockpit URL address. | [optional] |
+
diff --git a/docs/CustomerSegmentsList.md b/docs/CustomerSegmentsList.md
new file mode 100644
index 00000000..86baeb0a
--- /dev/null
+++ b/docs/CustomerSegmentsList.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::CustomerSegmentsList
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about customer segments. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the JSON property that contains the array of segment IDs. | [default to 'data'] |
+| **data** | [**Array<SimpleSegment>**](SimpleSegment.md) | A dictionary that contains an array of segment IDs and names. | |
+| **total** | **Integer** | Total number of segments the customer belongs to. | |
+
diff --git a/docs/CustomerSummary.md b/docs/CustomerSummary.md
new file mode 100644
index 00000000..00d4cb09
--- /dev/null
+++ b/docs/CustomerSummary.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::CustomerSummary
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redemptions** | [**CustomerSummaryRedemptions**](CustomerSummaryRedemptions.md) | | |
+| **orders** | [**CustomerSummaryOrders**](CustomerSummaryOrders.md) | | |
+
diff --git a/docs/CustomerSummaryOrders.md b/docs/CustomerSummaryOrders.md
new file mode 100644
index 00000000..ea551070
--- /dev/null
+++ b/docs/CustomerSummaryOrders.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::CustomerSummaryOrders
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **total_amount** | **Integer** | The total amount spent by the customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | |
+| **total_count** | **Integer** | Total number of orders made by the customer. | |
+| **average_amount** | **Integer** | Average amount spent on orders. `total_amount` ÷ `total_count`. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | |
+| **last_order_amount** | **Integer** | Amount spent on last order. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | |
+| **last_order_date** | **Time** | Timestamp representing the date and time of the customer's last order in ISO 8601 format. | [optional] |
+
diff --git a/docs/CustomerSummaryRedemptions.md b/docs/CustomerSummaryRedemptions.md
new file mode 100644
index 00000000..88a085bb
--- /dev/null
+++ b/docs/CustomerSummaryRedemptions.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::CustomerSummaryRedemptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **total_redeemed** | **Integer** | Total number of redemptions made by the customer. | |
+| **total_failed** | **Integer** | Total number of redemptions that failed. | |
+| **total_succeeded** | **Integer** | Total number of redemptions that succeeded. | |
+| **total_rolled_back** | **Integer** | Total number of redemptions that were rolled back for the customer. | |
+| **total_rollback_failed** | **Integer** | Total number of redemption rollbacks that failed. | |
+| **total_rollback_succeeded** | **Integer** | Total number of redemption rollbacks that succeeded. | |
+| **gift** | [**CustomerSummaryRedemptionsGift**](CustomerSummaryRedemptionsGift.md) | | |
+| **loyalty_card** | [**CustomerSummaryRedemptionsLoyaltyCard**](CustomerSummaryRedemptionsLoyaltyCard.md) | | |
+
diff --git a/docs/CustomerSummaryRedemptionsGift.md b/docs/CustomerSummaryRedemptionsGift.md
new file mode 100644
index 00000000..4e64ca3f
--- /dev/null
+++ b/docs/CustomerSummaryRedemptionsGift.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::CustomerSummaryRedemptionsGift
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redeemed_amount** | **Integer** | Total amount of gift card credits redeemed by customer. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [default to 0] |
+| **amount_to_go** | **Integer** | Remaining gift card balance across all gift cards. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [default to 0] |
+
diff --git a/docs/CustomerSummaryRedemptionsLoyaltyCard.md b/docs/CustomerSummaryRedemptionsLoyaltyCard.md
new file mode 100644
index 00000000..0bec98eb
--- /dev/null
+++ b/docs/CustomerSummaryRedemptionsLoyaltyCard.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::CustomerSummaryRedemptionsLoyaltyCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redeemed_points** | **Integer** | Total number of loyalty points redeemed by the customer. | |
+| **points_to_go** | **Integer** | Sum of remaining available point balance across all loyalty cards. | |
+
diff --git a/docs/CustomerWithSummaryLoyaltyReferrals.md b/docs/CustomerWithSummaryLoyaltyReferrals.md
new file mode 100644
index 00000000..eb066145
--- /dev/null
+++ b/docs/CustomerWithSummaryLoyaltyReferrals.md
@@ -0,0 +1,25 @@
+# VoucherifySdk::CustomerWithSummaryLoyaltyReferrals
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] |
+| **birthday** | **Date** | *Deprecated* Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **birthdate** | **Date** | Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+| **id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] |
+| **source_id** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] |
+| **summary** | [**CustomerSummary**](CustomerSummary.md) | | |
+| **loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | |
+| **referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | |
+| **system_metadata** | **Object** | Object used to store system metadata information. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the customer was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the customer was updated in ISO 8601 format. | [optional] |
+| **assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. | [default to 'customer'] |
+
diff --git a/docs/CustomersActivitiesListResponseBody.md b/docs/CustomersActivitiesListResponseBody.md
new file mode 100644
index 00000000..3b180dd0
--- /dev/null
+++ b/docs/CustomersActivitiesListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::CustomersActivitiesListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about customer activities in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of customer activity objects. | [default to 'data'] |
+| **data** | [**Array<CustomerActivity>**](CustomerActivity.md) | Array of customer activity objects. | |
+| **total** | **Integer** | Total number of customer activities. | |
+
diff --git a/docs/CustomersApi.md b/docs/CustomersApi.md
new file mode 100644
index 00000000..35f4de04
--- /dev/null
+++ b/docs/CustomersApi.md
@@ -0,0 +1,771 @@
+# VoucherifySdk::CustomersApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_customer**](CustomersApi.md#create_customer) | **POST** /v1/customers | Create Customer |
+| [**customer_permanently_deletion**](CustomersApi.md#customer_permanently_deletion) | **POST** /v1/customers/{customerId}/permanent-deletion | Delete Customer Permanently |
+| [**delete_customer**](CustomersApi.md#delete_customer) | **DELETE** /v1/customers/{customerId} | Delete Customer |
+| [**get_customer**](CustomersApi.md#get_customer) | **GET** /v1/customers/{customerId} | Get Customer |
+| [**import_customers_using_csv**](CustomersApi.md#import_customers_using_csv) | **POST** /v1/customers/importCSV | Import and Update Customers using CSV |
+| [**list_customer_activities**](CustomersApi.md#list_customer_activities) | **GET** /v1/customers/{customerId}/activities | List Customer Activities |
+| [**list_customer_segments**](CustomersApi.md#list_customer_segments) | **GET** /v1/customers/{customerId}/segments | List Customer's Segments |
+| [**list_customers**](CustomersApi.md#list_customers) | **GET** /v1/customers | List Customers |
+| [**update_customer**](CustomersApi.md#update_customer) | **PUT** /v1/customers/{customerId} | Update Customer |
+| [**update_customers_consents**](CustomersApi.md#update_customers_consents) | **PUT** /v1/customers/{customerId}/consents | Update Customer's consents |
+| [**update_customers_in_bulk**](CustomersApi.md#update_customers_in_bulk) | **POST** /v1/customers/bulk/async | Update Customers in bulk |
+| [**update_customers_metadata_in_bulk**](CustomersApi.md#update_customers_metadata_in_bulk) | **POST** /v1/customers/metadata/async | Update Customers' Metadata in bulk |
+
+
+## create_customer
+
+> create_customer(opts)
+
+Create Customer
+
+Creates a customer object. 📘 Upsert Mode If you pass an id or a source_id that already exists in the customer database, Voucherify will return a related customer object with updated fields.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+opts = {
+ customers_create_request_body: VoucherifySdk::CustomersCreateRequestBody.new # CustomersCreateRequestBody | Create a customer with specified parameters.
+}
+
+begin
+ # Create Customer
+ result = api_instance.create_customer(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->create_customer: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customers_create_request_body** | [**CustomersCreateRequestBody**](CustomersCreateRequestBody.md) | Create a customer with specified parameters. | [optional] |
+
+### Return type
+
+[**CustomersCreateResponseBody**](CustomersCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## customer_permanently_deletion
+
+> customer_permanently_deletion(customer_id)
+
+Delete Customer Permanently
+
+The organization user can remove consumer data permanently from the Voucherify system by using this API method. It deletes all customer data and connected resources. It makes the customer profile forgotten by Voucherify.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+customer_id = 'customer_id_example' # String | A Voucherify customers id or source_id.
+
+begin
+ # Delete Customer Permanently
+ result = api_instance.customer_permanently_deletion(customer_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->customer_permanently_deletion: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer_id** | **String** | A Voucherify customers id or source_id. | |
+
+### Return type
+
+[**CustomersPermanentDeletionCreateResponseBody**](CustomersPermanentDeletionCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## delete_customer
+
+> delete_customer(customer_id)
+
+Delete Customer
+
+This method deletes a customer.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+customer_id = 'customer_id_example' # String | A Voucherify customers id or source_id.
+
+begin
+ # Delete Customer
+ api_instance.delete_customer(customer_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->delete_customer: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer_id** | **String** | A Voucherify customers id or source_id. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## get_customer
+
+> get_customer(customer_id)
+
+Get Customer
+
+Retrieve customer details.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+customer_id = 'customer_id_example' # String | A Voucherify customers id or source_id.
+
+begin
+ # Get Customer
+ result = api_instance.get_customer(customer_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->get_customer: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer_id** | **String** | A Voucherify customers id or source_id. | |
+
+### Return type
+
+[**CustomersGetResponseBody**](CustomersGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## import_customers_using_csv
+
+> import_customers_using_csv(file)
+
+Import and Update Customers using CSV
+
+This API method lets you import or update customer data. To get a proper and valid response, please send a CSV file with data separated by commas. # Request Example # CSV File Format The CSV file has to include headers in the first line. All properties which cannot be mapped to standard customer fields will be added to the metadata object. 📘 Standard customer fields mapping **No spaces allowed in field names** Id, Name, Email, Phone, Birthdate, Source_id, Address_line_1, Address_line_2, Address_Postal_Code, Address_City, Address_State, Address_Country, Description, Metadata_name_1, Metadata_name_2 # Update Customers using CSV If you would like to update customers data, you can do it using the CSV file with new data. However, remember to include a source_id in your CSV file to manage the update successfully. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+file = File.new('/path/to/some/file') # File | File path.
+
+begin
+ # Import and Update Customers using CSV
+ result = api_instance.import_customers_using_csv(file)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->import_customers_using_csv: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **file** | **File** | File path. | |
+
+### Return type
+
+[**CustomersImportCsvCreateResponseBody**](CustomersImportCsvCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
+
+
+## list_customer_activities
+
+> list_customer_activities(customer_id, opts)
+
+List Customer Activities
+
+Retrieve customer activities.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+customer_id = 'customer_id_example' # String | A Voucherify customers id or source ID of the customer who performed the activities.
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ order: VoucherifySdk::ParameterOrder::CREATED_AT, # ParameterOrder | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ starting_after: Time.parse('2013-10-20T19:20:30+01:00'), # Time | A cursor for use in pagination. starting_after is a date-time value that defines your place in the list based on created_at property from the activity object. For instance, if you make a list request and receive 100 objects, ending with an object created at 2020-05-24T13:43:09.024Z, your subsequent call can include starting_after 2020-05-24T13:43:09.024Z in order to fetch the next page of the list.
+ starting_after_id: 'starting_after_id_example', # String | By applying this filter value, you will get events starting after an event with the given ID.
+ campaign_type: VoucherifySdk::ParameterCampaignType::PROMOTION, # ParameterCampaignType | Through this parameter you can control a type of campaign by which Voucherify will filter related customers activity. API will return only records related to that given type. Allowed values: DISCOUNT_COUPONS, REFERRAL_PROGRAM, GIFT_VOUCHERS, PROMOTION, LOYALTY_PROGRAM
+ campaign_id: 'campaign_id_example', # String | By applying this parameter you request only events related to specific campaign identified by its ID.
+ product_id: 'product_id_example', # String | By applying this parameter you request only events related to specific product identified by its ID.
+ start_date: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ end_date: Time.parse('2013-10-20T19:20:30+01:00') # Time | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+}
+
+begin
+ # List Customer Activities
+ result = api_instance.list_customer_activities(customer_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->list_customer_activities: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer_id** | **String** | A Voucherify customers id or source ID of the customer who performed the activities. | |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **order** | [**ParameterOrder**](.md) | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+| **starting_after** | **Time** | A cursor for use in pagination. starting_after is a date-time value that defines your place in the list based on created_at property from the activity object. For instance, if you make a list request and receive 100 objects, ending with an object created at 2020-05-24T13:43:09.024Z, your subsequent call can include starting_after 2020-05-24T13:43:09.024Z in order to fetch the next page of the list. | [optional] |
+| **starting_after_id** | **String** | By applying this filter value, you will get events starting after an event with the given ID. | [optional] |
+| **campaign_type** | [**ParameterCampaignType**](.md) | Through this parameter you can control a type of campaign by which Voucherify will filter related customers activity. API will return only records related to that given type. Allowed values: DISCOUNT_COUPONS, REFERRAL_PROGRAM, GIFT_VOUCHERS, PROMOTION, LOYALTY_PROGRAM | [optional] |
+| **campaign_id** | **String** | By applying this parameter you request only events related to specific campaign identified by its ID. | [optional] |
+| **product_id** | **String** | By applying this parameter you request only events related to specific product identified by its ID. | [optional] |
+| **start_date** | **Time** | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] |
+| **end_date** | **Time** | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] |
+
+### Return type
+
+[**CustomersActivitiesListResponseBody**](CustomersActivitiesListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_customer_segments
+
+> list_customer_segments(customer_id)
+
+List Customer's Segments
+
+Returns the list of segments IDs to which the customer belongs to. If you pass a customerId which is not stored and recognized by Voucherify as an existing customer in the system, the response will generate a list of segments that the customer would potentialy qualify for if they were to become a customer tracked in the system.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+customer_id = 'customer_id_example' # String | Unique identifier of a customer represented by an internal customer ID or customer source ID.
+
+begin
+ # List Customer's Segments
+ result = api_instance.list_customer_segments(customer_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->list_customer_segments: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer_id** | **String** | Unique identifier of a customer represented by an internal customer ID or customer source ID. | |
+
+### Return type
+
+[**CustomersSegmentsListResponseBody**](CustomersSegmentsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_customers
+
+> list_customers(opts)
+
+List Customers
+
+Returns a list of customers.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ email: 'email_example', # String | Limit the customers to the ones that have this specific email address.
+ city: 'city_example', # String | Limit the customers to the ones that are located in the specified city.
+ name: 'name_example', # String | Filter customers by the name property.
+ segment_id: 'segment_id_example', # String | Filter customers by the segment id.
+ created_at_before: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Filter customers by date customer was created.
+ created_at_after: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Filter customers by date customer was created.
+ updated_at_before: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Filter customers by date customer was updated last time.
+ updated_at_after: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Filter customers by date customer was updated last time.
+ order: VoucherifySdk::ParameterOrderListCustomers::CREATED_AT, # ParameterOrderListCustomers | This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ starting_after: Time.parse('2013-10-20T19:20:30+01:00') # Time | A cursor for use in pagination. This is a date-time value that defines your place in the list based on created_at property from the customer object. For instance, if you make a list request and receive 100 objects, ending with an object created at 2020-05-24T13:43:09.024Z, your subsequent call can include starting_after 2020-05-24T13:43:09.024Z in order to fetch the next page of the list.
+}
+
+begin
+ # List Customers
+ result = api_instance.list_customers(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->list_customers: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **email** | **String** | Limit the customers to the ones that have this specific email address. | [optional] |
+| **city** | **String** | Limit the customers to the ones that are located in the specified city. | [optional] |
+| **name** | **String** | Filter customers by the name property. | [optional] |
+| **segment_id** | **String** | Filter customers by the segment id. | [optional] |
+| **created_at_before** | **Time** | Filter customers by date customer was created. | [optional] |
+| **created_at_after** | **Time** | Filter customers by date customer was created. | [optional] |
+| **updated_at_before** | **Time** | Filter customers by date customer was updated last time. | [optional] |
+| **updated_at_after** | **Time** | Filter customers by date customer was updated last time. | [optional] |
+| **order** | [**ParameterOrderListCustomers**](.md) | This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+| **starting_after** | **Time** | A cursor for use in pagination. This is a date-time value that defines your place in the list based on created_at property from the customer object. For instance, if you make a list request and receive 100 objects, ending with an object created at 2020-05-24T13:43:09.024Z, your subsequent call can include starting_after 2020-05-24T13:43:09.024Z in order to fetch the next page of the list. | [optional] |
+
+### Return type
+
+[**CustomersListResponseBody**](CustomersListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## update_customer
+
+> update_customer(customer_id, opts)
+
+Update Customer
+
+Updates the specified customer by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+customer_id = 'customer_id_example' # String | A Voucherify customers id or source_id.
+opts = {
+ customers_update_request_body: VoucherifySdk::CustomersUpdateRequestBody.new # CustomersUpdateRequestBody | Specify the parameters to be updated.
+}
+
+begin
+ # Update Customer
+ result = api_instance.update_customer(customer_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->update_customer: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer_id** | **String** | A Voucherify customers id or source_id. | |
+| **customers_update_request_body** | [**CustomersUpdateRequestBody**](CustomersUpdateRequestBody.md) | Specify the parameters to be updated. | [optional] |
+
+### Return type
+
+[**CustomersUpdateResponseBody**](CustomersUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## update_customers_consents
+
+> update_customers_consents(customer_id, opts)
+
+Update Customer's consents
+
+Update marketing permissions for the specified customer.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+customer_id = 'customer_id_example' # String | A Voucherify unique customer identifier or source ID.
+opts = {
+ body: { ... } # Object | Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use unsubscribed as a consent identifier and true as its value. ## Examples Opt-out from all communication:
+}
+
+begin
+ # Update Customer's consents
+ api_instance.update_customers_consents(customer_id, opts)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->update_customers_consents: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer_id** | **String** | A Voucherify unique customer identifier or source ID. | |
+| **body** | **Object** | Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use unsubscribed as a consent identifier and true as its value. ## Examples Opt-out from all communication: | [optional] |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: Not defined
+
+
+## update_customers_in_bulk
+
+> update_customers_in_bulk(opts)
+
+Update Customers in bulk
+
+Update several customers in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested customer object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+opts = {
+ customers_update_in_bulk_request_body: [VoucherifySdk::CustomersUpdateInBulkRequestBody.new({source_id: 'source_id_example'})] # Array | Specify the customer fields that you would like to update in each customer object.
+}
+
+begin
+ # Update Customers in bulk
+ result = api_instance.update_customers_in_bulk(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->update_customers_in_bulk: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customers_update_in_bulk_request_body** | [**Array<CustomersUpdateInBulkRequestBody>**](CustomersUpdateInBulkRequestBody.md) | Specify the customer fields that you would like to update in each customer object. | [optional] |
+
+### Return type
+
+[**CustomersUpdateInBulkResponseBody**](CustomersUpdateInBulkResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## update_customers_metadata_in_bulk
+
+> update_customers_metadata_in_bulk(opts)
+
+Update Customers' Metadata in bulk
+
+Update several customers metadata properties in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested customer object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::CustomersApi.new
+opts = {
+ customers_metadata_update_in_bulk_request_body: VoucherifySdk::CustomersMetadataUpdateInBulkRequestBody.new({source_ids: ['source_ids_example'], metadata: 3.56}) # CustomersMetadataUpdateInBulkRequestBody | List the source_ids of the customers you would like to update along with the metadata key value pairs.
+}
+
+begin
+ # Update Customers' Metadata in bulk
+ result = api_instance.update_customers_metadata_in_bulk(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling CustomersApi->update_customers_metadata_in_bulk: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customers_metadata_update_in_bulk_request_body** | [**CustomersMetadataUpdateInBulkRequestBody**](CustomersMetadataUpdateInBulkRequestBody.md) | List the source_ids of the customers you would like to update along with the metadata key value pairs. | [optional] |
+
+### Return type
+
+[**CustomersMetadataUpdateInBulkResponseBody**](CustomersMetadataUpdateInBulkResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/CustomersCreateRequestBody.md b/docs/CustomersCreateRequestBody.md
new file mode 100644
index 00000000..648f557a
--- /dev/null
+++ b/docs/CustomersCreateRequestBody.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::CustomersCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | The ID of an existing customer. | [optional] |
+| **source_id** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] |
+| **birthday** | **Date** | *Deprecated* Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **birthdate** | **Date** | Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+
diff --git a/docs/CustomersCreateResponseBody.md b/docs/CustomersCreateResponseBody.md
new file mode 100644
index 00000000..7a78518e
--- /dev/null
+++ b/docs/CustomersCreateResponseBody.md
@@ -0,0 +1,25 @@
+# VoucherifySdk::CustomersCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] |
+| **source_id** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] |
+| **summary** | [**CustomerSummary**](CustomerSummary.md) | | |
+| **loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | |
+| **referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | |
+| **system_metadata** | **Object** | Object used to store system metadata information. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the customer was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the customer was updated in ISO 8601 format. | [optional] |
+| **assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. | [default to 'customer'] |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] |
+| **birthday** | **Date** | *Deprecated* Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **birthdate** | **Date** | Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+
diff --git a/docs/CustomersGetResponseBody.md b/docs/CustomersGetResponseBody.md
new file mode 100644
index 00000000..47b196f2
--- /dev/null
+++ b/docs/CustomersGetResponseBody.md
@@ -0,0 +1,25 @@
+# VoucherifySdk::CustomersGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] |
+| **source_id** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] |
+| **summary** | [**CustomerSummary**](CustomerSummary.md) | | |
+| **loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | |
+| **referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | |
+| **system_metadata** | **Object** | Object used to store system metadata information. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the customer was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the customer was updated in ISO 8601 format. | [optional] |
+| **assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. | [default to 'customer'] |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] |
+| **birthday** | **Date** | *Deprecated* Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **birthdate** | **Date** | Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+
diff --git a/docs/CustomersImportCsvCreateResponseBody.md b/docs/CustomersImportCsvCreateResponseBody.md
new file mode 100644
index 00000000..971a0317
--- /dev/null
+++ b/docs/CustomersImportCsvCreateResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CustomersImportCsvCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/CustomersListResponseBody.md b/docs/CustomersListResponseBody.md
new file mode 100644
index 00000000..9312a8a3
--- /dev/null
+++ b/docs/CustomersListResponseBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::CustomersListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about customers in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of customer objects. | [default to 'customers'] |
+| **customers** | [**Array<CustomerWithSummaryLoyaltyReferrals>**](CustomerWithSummaryLoyaltyReferrals.md) | Contains array of customer objects. | |
+| **total** | **Integer** | Total number of customers. | |
+| **has_more** | **Boolean** | As query results are always limited (by the limit parameter), the `has_more` flag indicates whether there are more records for given filter parameters. This let's you know if you are able to run another request (with a different end date filter) to get more records returned in the results. | [optional] |
+
diff --git a/docs/CustomersMetadataUpdateInBulkRequestBody.md b/docs/CustomersMetadataUpdateInBulkRequestBody.md
new file mode 100644
index 00000000..aeb417a7
--- /dev/null
+++ b/docs/CustomersMetadataUpdateInBulkRequestBody.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::CustomersMetadataUpdateInBulkRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **source_ids** | **Array<String>** | An array of customer `source_id`'s. | |
+| **metadata** | **Object** | Metadata key value pairs to be updated. A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | |
+
diff --git a/docs/CustomersMetadataUpdateInBulkResponseBody.md b/docs/CustomersMetadataUpdateInBulkResponseBody.md
new file mode 100644
index 00000000..c48edd9a
--- /dev/null
+++ b/docs/CustomersMetadataUpdateInBulkResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CustomersMetadataUpdateInBulkResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/CustomersPermanentDeletionCreateResponseBody.md b/docs/CustomersPermanentDeletionCreateResponseBody.md
new file mode 100644
index 00000000..d437c576
--- /dev/null
+++ b/docs/CustomersPermanentDeletionCreateResponseBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::CustomersPermanentDeletionCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique permanent deletion object ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the customer was requested to be deleted in ISO 8601 format. | |
+| **related_object_id** | **String** | Unique customer ID that is being deleted. | |
+| **related_object** | **String** | Object being deleted. | [default to 'customer'] |
+| **status** | **String** | Deletion status. | [default to 'DONE'] |
+| **data_json** | [**CustomersPermanentDeletionCreateResponseBodyDataJson**](CustomersPermanentDeletionCreateResponseBodyDataJson.md) | | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'pernament_deletion'] |
+
diff --git a/docs/CustomersPermanentDeletionCreateResponseBodyDataJson.md b/docs/CustomersPermanentDeletionCreateResponseBodyDataJson.md
new file mode 100644
index 00000000..218782a0
--- /dev/null
+++ b/docs/CustomersPermanentDeletionCreateResponseBodyDataJson.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::CustomersPermanentDeletionCreateResponseBodyDataJson
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **events** | **Integer** | Number of events deleted. | |
+| **customer_events** | **Integer** | Number of customer events deleted. | |
+| **daily_events** | **Integer** | Number of daily events deleted. | |
+| **segments** | **Integer** | Number of segments deleted. | |
+| **orders** | **Integer** | Number of orders deleted. | |
+| **order_events** | **Integer** | Number of order events deleted. | |
+| **customer** | **Integer** | Number of customers deleted. | [default to 1] |
+
diff --git a/docs/CustomersSegmentsListResponseBody.md b/docs/CustomersSegmentsListResponseBody.md
new file mode 100644
index 00000000..b0bfa96e
--- /dev/null
+++ b/docs/CustomersSegmentsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::CustomersSegmentsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about customer segments. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the JSON property that contains the array of segment IDs. | [default to 'data'] |
+| **data** | [**Array<SimpleSegment>**](SimpleSegment.md) | A dictionary that contains an array of segment IDs and names. | |
+| **total** | **Integer** | Total number of segments the customer belongs to. | |
+
diff --git a/docs/CustomersUpdateInBulkRequestBody.md b/docs/CustomersUpdateInBulkRequestBody.md
new file mode 100644
index 00000000..ed2aa3ca
--- /dev/null
+++ b/docs/CustomersUpdateInBulkRequestBody.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::CustomersUpdateInBulkRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] |
+| **birthday** | **Date** | *Deprecated* Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **birthdate** | **Date** | Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+| **source_id** | **String** | Unique customer source ID. | |
+
diff --git a/docs/CustomersUpdateInBulkResponseBody.md b/docs/CustomersUpdateInBulkResponseBody.md
new file mode 100644
index 00000000..1e4ac2c2
--- /dev/null
+++ b/docs/CustomersUpdateInBulkResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::CustomersUpdateInBulkResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/CustomersUpdateRequestBody.md b/docs/CustomersUpdateRequestBody.md
new file mode 100644
index 00000000..e354dbd3
--- /dev/null
+++ b/docs/CustomersUpdateRequestBody.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::CustomersUpdateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] |
+| **birthday** | **Date** | *Deprecated* Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **birthdate** | **Date** | Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+
diff --git a/docs/CustomersUpdateResponseBody.md b/docs/CustomersUpdateResponseBody.md
new file mode 100644
index 00000000..10d44a53
--- /dev/null
+++ b/docs/CustomersUpdateResponseBody.md
@@ -0,0 +1,25 @@
+# VoucherifySdk::CustomersUpdateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] |
+| **source_id** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] |
+| **summary** | [**CustomerSummary**](CustomerSummary.md) | | |
+| **loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | |
+| **referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | |
+| **system_metadata** | **Object** | Object used to store system metadata information. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the customer was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the customer was updated in ISO 8601 format. | [optional] |
+| **assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. | [default to 'customer'] |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] |
+| **birthday** | **Date** | *Deprecated* Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **birthdate** | **Date** | Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+
diff --git a/docs/Discount.md b/docs/Discount.md
new file mode 100644
index 00000000..2bd44e31
--- /dev/null
+++ b/docs/Discount.md
@@ -0,0 +1,55 @@
+# VoucherifySdk::Discount
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::Discount.openapi_one_of
+# =>
+# [
+# :'DiscountAmount',
+# :'DiscountFixed',
+# :'DiscountPercent',
+# :'DiscountUnit',
+# :'DiscountUnitMultiple'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::Discount.build(data)
+# => #
+
+VoucherifySdk::Discount.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `DiscountAmount`
+- `DiscountFixed`
+- `DiscountPercent`
+- `DiscountUnit`
+- `DiscountUnitMultiple`
+- `nil` (if no type matches)
+
diff --git a/docs/DiscountAmount.md b/docs/DiscountAmount.md
new file mode 100644
index 00000000..450e6243
--- /dev/null
+++ b/docs/DiscountAmount.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::DiscountAmount
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Defines the type of the voucher. | [default to 'AMOUNT'] |
+| **amount_off** | **Float** | Amount taken off the subtotal of a price. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. | |
+| **amount_off_formula** | **String** | | [optional] |
+| **aggregated_amount_limit** | **Integer** | Maximum discount amount per order. | [optional] |
+| **effect** | [**DiscountAmountVouchersEffectTypes**](DiscountAmountVouchersEffectTypes.md) | | [optional] |
+| **is_dynamic** | **Boolean** | Flag indicating whether the discount was calculated using a formula. | [optional] |
+
diff --git a/docs/DiscountAmountVouchersEffectTypes.md b/docs/DiscountAmountVouchersEffectTypes.md
new file mode 100644
index 00000000..dcc61513
--- /dev/null
+++ b/docs/DiscountAmountVouchersEffectTypes.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::DiscountAmountVouchersEffectTypes
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/DiscountCouponsCampaignVoucher.md b/docs/DiscountCouponsCampaignVoucher.md
new file mode 100644
index 00000000..444d7dba
--- /dev/null
+++ b/docs/DiscountCouponsCampaignVoucher.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::DiscountCouponsCampaignVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Type of voucher. | [default to 'DISCOUNT_VOUCHER'] |
+| **discount** | [**Discount**](Discount.md) | | |
+| **code_config** | [**CodeConfig**](CodeConfig.md) | | [optional] |
+| **redemption** | [**CampaignLoyaltyVoucherRedemption**](CampaignLoyaltyVoucherRedemption.md) | | [optional] |
+
diff --git a/docs/DiscountFixed.md b/docs/DiscountFixed.md
new file mode 100644
index 00000000..9db5b6c6
--- /dev/null
+++ b/docs/DiscountFixed.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::DiscountFixed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Defines the type of the voucher. | [default to 'FIXED'] |
+| **fixed_amount** | **Float** | Sets a fixed value for an order total or the item price. The value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 discount is written as 1000. If the fixed amount is calculated by the formula, i.e. the `fixed_amount_formula` parameter is present in the fixed amount definition, this value becomes the **fallback value**. As a result, if the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed value. | |
+| **fixed_amount_formula** | **String** | | [optional] |
+| **effect** | [**DiscountFixedVouchersEffectTypes**](DiscountFixedVouchersEffectTypes.md) | | [optional] |
+| **is_dynamic** | **Boolean** | Flag indicating whether the discount was calculated using a formula. | [optional] |
+
diff --git a/docs/DiscountFixedVouchersEffectTypes.md b/docs/DiscountFixedVouchersEffectTypes.md
new file mode 100644
index 00000000..3f2d8cb4
--- /dev/null
+++ b/docs/DiscountFixedVouchersEffectTypes.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::DiscountFixedVouchersEffectTypes
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/DiscountPercent.md b/docs/DiscountPercent.md
new file mode 100644
index 00000000..33fb17a1
--- /dev/null
+++ b/docs/DiscountPercent.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::DiscountPercent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Defines the type of the voucher. | [default to 'PERCENT'] |
+| **percent_off** | **Float** | The percent discount that the customer will receive. | |
+| **percent_off_formula** | **String** | | [optional] |
+| **amount_limit** | **Float** | Upper limit allowed to be applied as a discount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. | [optional] |
+| **aggregated_amount_limit** | **Integer** | Maximum discount amount per order. | [optional] |
+| **effect** | [**DiscountPercentVouchersEffectTypes**](DiscountPercentVouchersEffectTypes.md) | | [optional] |
+| **is_dynamic** | **Boolean** | Flag indicating whether the discount was calculated using a formula. | [optional] |
+
diff --git a/docs/DiscountPercentVouchersEffectTypes.md b/docs/DiscountPercentVouchersEffectTypes.md
new file mode 100644
index 00000000..89bcf736
--- /dev/null
+++ b/docs/DiscountPercentVouchersEffectTypes.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::DiscountPercentVouchersEffectTypes
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/DiscountUnit.md b/docs/DiscountUnit.md
new file mode 100644
index 00000000..068c270b
--- /dev/null
+++ b/docs/DiscountUnit.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::DiscountUnit
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Discount type. | [default to 'UNIT'] |
+| **unit_off** | **Integer** | Number of units to be granted a full value discount. | [optional] |
+| **unit_off_formula** | **String** | | [optional] |
+| **effect** | [**DiscountUnitVouchersEffectTypes**](DiscountUnitVouchersEffectTypes.md) | | [optional] |
+| **unit_type** | **String** | The product deemed as free, chosen from product inventory (e.g. time, items). | |
+| **product** | [**SimpleProductDiscountUnit**](SimpleProductDiscountUnit.md) | | [optional] |
+| **sku** | [**SimpleSkuDiscountUnit**](SimpleSkuDiscountUnit.md) | | [optional] |
+| **is_dynamic** | **Boolean** | Flag indicating whether the discount was calculated using a formula. | [optional] |
+
diff --git a/docs/DiscountUnitMultiple.md b/docs/DiscountUnitMultiple.md
new file mode 100644
index 00000000..27b0dbe5
--- /dev/null
+++ b/docs/DiscountUnitMultiple.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::DiscountUnitMultiple
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Discount type. | [default to 'UNIT'] |
+| **effect** | **String** | Defines how the discount is applied to the customer's order. | [optional][default to 'ADD_MANY_ITEMS'] |
+| **units** | [**Array<DiscountUnitMultipleOneUnit>**](DiscountUnitMultipleOneUnit.md) | | |
+
diff --git a/docs/DiscountUnitMultipleOneUnit.md b/docs/DiscountUnitMultipleOneUnit.md
new file mode 100644
index 00000000..c73ead3e
--- /dev/null
+++ b/docs/DiscountUnitMultipleOneUnit.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::DiscountUnitMultipleOneUnit
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **unit_off** | **Float** | Number of units to be granted a full value discount. | [optional] |
+| **unit_off_formula** | **String** | | [optional] |
+| **effect** | **String** | Defines how the unit is added to the customer's order. | |
+| **unit_type** | **String** | The product deemed as free, chosen from product inventory (e.g. time, items). | |
+| **product** | [**SimpleProductDiscountUnit**](SimpleProductDiscountUnit.md) | | [optional] |
+| **sku** | [**SimpleSkuDiscountUnit**](SimpleSkuDiscountUnit.md) | | [optional] |
+
diff --git a/docs/DiscountUnitVouchersEffectTypes.md b/docs/DiscountUnitVouchersEffectTypes.md
new file mode 100644
index 00000000..05853d10
--- /dev/null
+++ b/docs/DiscountUnitVouchersEffectTypes.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::DiscountUnitVouchersEffectTypes
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/EarningRule.md b/docs/EarningRule.md
new file mode 100644
index 00000000..b1b47d33
--- /dev/null
+++ b/docs/EarningRule.md
@@ -0,0 +1,24 @@
+# VoucherifySdk::EarningRule
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the earning rule was created in ISO 8601 format. | |
+| **loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | |
+| **event** | [**EarningRuleEvent**](EarningRuleEvent.md) | | [optional] |
+| **custom_event** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | [optional] |
+| **segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | [optional] |
+| **source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | |
+| **object** | **String** | The type of object represented by JSON. Default is earning_rule. | [default to 'earning_rule'] |
+| **automation_id** | **String** | For internal use by Voucherify. | |
+| **start_date** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp in ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | [optional] |
+| **expiration_date** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp in ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | [optional] |
+| **validity_timeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format. | |
+| **validation_rule_id** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | |
+| **active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. - `true` indicates an active earning rule - `false` indicates an inactive earning rule | |
+
diff --git a/docs/EarningRuleBase.md b/docs/EarningRuleBase.md
new file mode 100644
index 00000000..65180f48
--- /dev/null
+++ b/docs/EarningRuleBase.md
@@ -0,0 +1,21 @@
+# VoucherifySdk::EarningRuleBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the earning rule was created in ISO 8601 format. | |
+| **loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | |
+| **event** | [**EarningRuleEvent**](EarningRuleEvent.md) | | [optional] |
+| **custom_event** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | [optional] |
+| **segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | [optional] |
+| **source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | |
+| **object** | **String** | The type of object represented by JSON. Default is earning_rule. | [default to 'earning_rule'] |
+| **automation_id** | **String** | For internal use by Voucherify. | |
+| **start_date** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp in ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | [optional] |
+| **expiration_date** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp in ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | [optional] |
+| **validity_timeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format. | |
+
diff --git a/docs/EarningRuleBaseCustomEvent.md b/docs/EarningRuleBaseCustomEvent.md
new file mode 100644
index 00000000..19617a9b
--- /dev/null
+++ b/docs/EarningRuleBaseCustomEvent.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EarningRuleBaseCustomEvent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **schema_id** | **String** | | |
+
diff --git a/docs/EarningRuleBaseLoyalty.md b/docs/EarningRuleBaseLoyalty.md
new file mode 100644
index 00000000..24149fc4
--- /dev/null
+++ b/docs/EarningRuleBaseLoyalty.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::EarningRuleBaseLoyalty
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::EarningRuleBaseLoyalty.openapi_one_of
+# =>
+# [
+# :'EarningRuleFixed',
+# :'EarningRuleProportional'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::EarningRuleBaseLoyalty.build(data)
+# => #
+
+VoucherifySdk::EarningRuleBaseLoyalty.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `EarningRuleFixed`
+- `EarningRuleProportional`
+- `nil` (if no type matches)
+
diff --git a/docs/EarningRuleBaseSegment.md b/docs/EarningRuleBaseSegment.md
new file mode 100644
index 00000000..6287d6f8
--- /dev/null
+++ b/docs/EarningRuleBaseSegment.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EarningRuleBaseSegment
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Contains a unique identifier of a customer segment. Assigned by the Voucherify API. | |
+
diff --git a/docs/EarningRuleBaseSource.md b/docs/EarningRuleBaseSource.md
new file mode 100644
index 00000000..36907030
--- /dev/null
+++ b/docs/EarningRuleBaseSource.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleBaseSource
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | [optional] |
+| **object_id** | **String** | A unique campaign identifier assigned by the Voucherify API. | |
+| **object_type** | **String** | Defines the object associated with the earning rule. Defaults to `campaign`. | [default to 'campaign'] |
+
diff --git a/docs/EarningRuleBaseValidityTimeframe.md b/docs/EarningRuleBaseValidityTimeframe.md
new file mode 100644
index 00000000..cc74e116
--- /dev/null
+++ b/docs/EarningRuleBaseValidityTimeframe.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EarningRuleBaseValidityTimeframe
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **duration** | **String** | Defines the amount of time an earning rule will be active in ISO 8601 format. For example, an earning rule with a duration of PT1H will be valid for a duration of one hour. | |
+| **interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, an earning rule with an interval of P2D will be valid every other day. | |
+
diff --git a/docs/EarningRuleEvent.md b/docs/EarningRuleEvent.md
new file mode 100644
index 00000000..eabe317c
--- /dev/null
+++ b/docs/EarningRuleEvent.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::EarningRuleEvent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/EarningRuleFixed.md b/docs/EarningRuleFixed.md
new file mode 100644
index 00000000..52cb7a39
--- /dev/null
+++ b/docs/EarningRuleFixed.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EarningRuleFixed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | The number of points to be added to the loyalty card. | [optional][default to 'FIXED'] |
+| **points** | **Integer** | Defines how the points will be added to the loyalty card. FIXED adds a fixed number of points. | [optional] |
+
diff --git a/docs/EarningRuleProportional.md b/docs/EarningRuleProportional.md
new file mode 100644
index 00000000..3a78cbb8
--- /dev/null
+++ b/docs/EarningRuleProportional.md
@@ -0,0 +1,53 @@
+# VoucherifySdk::EarningRuleProportional
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::EarningRuleProportional.openapi_one_of
+# =>
+# [
+# :'EarningRuleProportionalCustomEvent',
+# :'EarningRuleProportionalCustomerMetadata',
+# :'EarningRuleProportionalOrder',
+# :'EarningRuleProportionalOrderItems'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::EarningRuleProportional.build(data)
+# => #
+
+VoucherifySdk::EarningRuleProportional.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `EarningRuleProportionalCustomEvent`
+- `EarningRuleProportionalCustomerMetadata`
+- `EarningRuleProportionalOrder`
+- `EarningRuleProportionalOrderItems`
+- `nil` (if no type matches)
+
diff --git a/docs/EarningRuleProportionalCustomEvent.md b/docs/EarningRuleProportionalCustomEvent.md
new file mode 100644
index 00000000..b2570b4a
--- /dev/null
+++ b/docs/EarningRuleProportionalCustomEvent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleProportionalCustomEvent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio. | [default to 'PROPORTIONAL'] |
+| **calculation_type** | **String** | CUSTOM_EVENT_METADATA: Custom event metadata (X points for every Y in metadata attribute). | [default to 'CUSTOM_EVENT_METADATA'] |
+| **custom_event** | [**EarningRuleProportionalCustomEventCustomEvent**](EarningRuleProportionalCustomEventCustomEvent.md) | | |
+
diff --git a/docs/EarningRuleProportionalCustomEventCustomEvent.md b/docs/EarningRuleProportionalCustomEventCustomEvent.md
new file mode 100644
index 00000000..51ad1f1b
--- /dev/null
+++ b/docs/EarningRuleProportionalCustomEventCustomEvent.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EarningRuleProportionalCustomEventCustomEvent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **metadata** | [**EarningRuleProportionalCustomEventCustomEventMetadata**](EarningRuleProportionalCustomEventCustomEventMetadata.md) | | |
+
diff --git a/docs/EarningRuleProportionalCustomEventCustomEventMetadata.md b/docs/EarningRuleProportionalCustomEventCustomEventMetadata.md
new file mode 100644
index 00000000..b3fc786a
--- /dev/null
+++ b/docs/EarningRuleProportionalCustomEventCustomEventMetadata.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleProportionalCustomEventCustomEventMetadata
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **every** | **Integer** | For how many increments of the customer metadata property to grant points for. | |
+| **points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | |
+| **property** | **String** | Custom event metadata property. | |
+
diff --git a/docs/EarningRuleProportionalCustomerMetadata.md b/docs/EarningRuleProportionalCustomerMetadata.md
new file mode 100644
index 00000000..7d8a3355
--- /dev/null
+++ b/docs/EarningRuleProportionalCustomerMetadata.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleProportionalCustomerMetadata
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio. | [default to 'PROPORTIONAL'] |
+| **calculation_type** | **String** | CUSTOMER_METADATA: Customer Metadata (X points for every Y in metadata attribute, defined in the property key under the customer.metadata object) | [default to 'CUSTOMER_METADATA'] |
+| **customer** | [**EarningRuleProportionalCustomerMetadataCustomer**](EarningRuleProportionalCustomerMetadataCustomer.md) | | |
+
diff --git a/docs/EarningRuleProportionalCustomerMetadataCustomer.md b/docs/EarningRuleProportionalCustomerMetadataCustomer.md
new file mode 100644
index 00000000..074e5632
--- /dev/null
+++ b/docs/EarningRuleProportionalCustomerMetadataCustomer.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EarningRuleProportionalCustomerMetadataCustomer
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **metadata** | [**EarningRuleProportionalCustomerMetadataCustomerMetadata**](EarningRuleProportionalCustomerMetadataCustomerMetadata.md) | | |
+
diff --git a/docs/EarningRuleProportionalCustomerMetadataCustomerMetadata.md b/docs/EarningRuleProportionalCustomerMetadataCustomerMetadata.md
new file mode 100644
index 00000000..4dcdbe68
--- /dev/null
+++ b/docs/EarningRuleProportionalCustomerMetadataCustomerMetadata.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleProportionalCustomerMetadataCustomerMetadata
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **every** | **Integer** | For how many increments of the customer metadata property to grant points for. | |
+| **points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | |
+| **property** | **String** | Customer metadata property. | |
+
diff --git a/docs/EarningRuleProportionalOrder.md b/docs/EarningRuleProportionalOrder.md
new file mode 100644
index 00000000..b78118b8
--- /dev/null
+++ b/docs/EarningRuleProportionalOrder.md
@@ -0,0 +1,51 @@
+# VoucherifySdk::EarningRuleProportionalOrder
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::EarningRuleProportionalOrder.openapi_one_of
+# =>
+# [
+# :'EarningRuleProportionalOrderAmount',
+# :'EarningRuleProportionalOrderMetadata',
+# :'EarningRuleProportionalOrderTotalAmount'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::EarningRuleProportionalOrder.build(data)
+# => #
+
+VoucherifySdk::EarningRuleProportionalOrder.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `EarningRuleProportionalOrderAmount`
+- `EarningRuleProportionalOrderMetadata`
+- `EarningRuleProportionalOrderTotalAmount`
+- `nil` (if no type matches)
+
diff --git a/docs/EarningRuleProportionalOrderAmount.md b/docs/EarningRuleProportionalOrderAmount.md
new file mode 100644
index 00000000..fc9b0665
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderAmount.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleProportionalOrderAmount
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio. | [default to 'PROPORTIONAL'] |
+| **calculation_type** | **String** | `ORDER_AMOUNT`: Pre-discount order amount (X points for every Y spent excluding discounts) | [default to 'ORDER_AMOUNT'] |
+| **order** | [**EarningRuleProportionalOrderAmountOrder**](EarningRuleProportionalOrderAmountOrder.md) | | |
+
diff --git a/docs/EarningRuleProportionalOrderAmountOrder.md b/docs/EarningRuleProportionalOrderAmountOrder.md
new file mode 100644
index 00000000..c68fc7f6
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderAmountOrder.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EarningRuleProportionalOrderAmountOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **amount** | [**EarningRuleProportionalOrderAmountOrderAmount**](EarningRuleProportionalOrderAmountOrderAmount.md) | | |
+
diff --git a/docs/EarningRuleProportionalOrderAmountOrderAmount.md b/docs/EarningRuleProportionalOrderAmountOrderAmount.md
new file mode 100644
index 00000000..2443509b
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderAmountOrderAmount.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EarningRuleProportionalOrderAmountOrderAmount
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **every** | **Integer** | Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000. | |
+| **points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | |
+
diff --git a/docs/EarningRuleProportionalOrderItems.md b/docs/EarningRuleProportionalOrderItems.md
new file mode 100644
index 00000000..fb9a1eaa
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderItems.md
@@ -0,0 +1,51 @@
+# VoucherifySdk::EarningRuleProportionalOrderItems
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::EarningRuleProportionalOrderItems.openapi_one_of
+# =>
+# [
+# :'EarningRuleProportionalOrderItemsAmount',
+# :'EarningRuleProportionalOrderItemsQuantity',
+# :'EarningRuleProportionalOrderItemsSubtotalAmount'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::EarningRuleProportionalOrderItems.build(data)
+# => #
+
+VoucherifySdk::EarningRuleProportionalOrderItems.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `EarningRuleProportionalOrderItemsAmount`
+- `EarningRuleProportionalOrderItemsQuantity`
+- `EarningRuleProportionalOrderItemsSubtotalAmount`
+- `nil` (if no type matches)
+
diff --git a/docs/EarningRuleProportionalOrderItemsAmount.md b/docs/EarningRuleProportionalOrderItemsAmount.md
new file mode 100644
index 00000000..267651f3
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderItemsAmount.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleProportionalOrderItemsAmount
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio. | [default to 'PROPORTIONAL'] |
+| **calculation_type** | **String** | ORDER_ITEMS_AMOUNT; Pre-discount amount spent on items defined in the order_items.amount.object & .id (X points for every Y spent on items excluding discounts) | [default to 'ORDER_ITEMS_AMOUNT'] |
+| **order_items** | [**EarningRuleProportionalOrderItemsAmountOrderItems**](EarningRuleProportionalOrderItemsAmountOrderItems.md) | | |
+
diff --git a/docs/EarningRuleProportionalOrderItemsAmountOrderItems.md b/docs/EarningRuleProportionalOrderItemsAmountOrderItems.md
new file mode 100644
index 00000000..8847c249
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderItemsAmountOrderItems.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EarningRuleProportionalOrderItemsAmountOrderItems
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **amount** | [**EarningRuleProportionalOrderItemsAmountOrderItemsAmount**](EarningRuleProportionalOrderItemsAmountOrderItemsAmount.md) | | |
+
diff --git a/docs/EarningRuleProportionalOrderItemsAmountOrderItemsAmount.md b/docs/EarningRuleProportionalOrderItemsAmountOrderItemsAmount.md
new file mode 100644
index 00000000..96d13b1a
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderItemsAmountOrderItemsAmount.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EarningRuleProportionalOrderItemsAmountOrderItemsAmount
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **every** | **Integer** | Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 order amount is written as 1000. | |
+| **points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | |
+| **object** | **String** | Type of object taken under consideration. | |
+| **id** | **String** | Unique ID of the resource, i.e. pc_75U0dHlr7u75BJodrW1AE3t6, prod_0bae32322150fd0546, or sku_0b7d7dfb090be5c619. | |
+
diff --git a/docs/EarningRuleProportionalOrderItemsQuantity.md b/docs/EarningRuleProportionalOrderItemsQuantity.md
new file mode 100644
index 00000000..ccd7bca9
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderItemsQuantity.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleProportionalOrderItemsQuantity
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio. | [default to 'PROPORTIONAL'] |
+| **calculation_type** | **String** | `ORDER_ITEMS_QUANTITY`: Quantity of items defined in order_items.quantity.object & .id (X points for every Y items excluding free items) | [default to 'ORDER_ITEMS_QUANTITY'] |
+| **order_items** | [**EarningRuleProportionalOrderItemsQuantityOrderItems**](EarningRuleProportionalOrderItemsQuantityOrderItems.md) | | |
+
diff --git a/docs/EarningRuleProportionalOrderItemsQuantityOrderItems.md b/docs/EarningRuleProportionalOrderItemsQuantityOrderItems.md
new file mode 100644
index 00000000..9d60b703
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderItemsQuantityOrderItems.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EarningRuleProportionalOrderItemsQuantityOrderItems
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **quantity** | [**EarningRuleProportionalOrderItemsAmountOrderItemsAmount**](EarningRuleProportionalOrderItemsAmountOrderItemsAmount.md) | | |
+
diff --git a/docs/EarningRuleProportionalOrderItemsSubtotalAmount.md b/docs/EarningRuleProportionalOrderItemsSubtotalAmount.md
new file mode 100644
index 00000000..2aeee3cf
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderItemsSubtotalAmount.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleProportionalOrderItemsSubtotalAmount
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio. | [default to 'PROPORTIONAL'] |
+| **calculation_type** | **String** | ORDER_ITEMS_SUBTOTAL_AMOUNT; Amount spent on items defined in the order_items.subtotal_amount.object & .id (X points for every Y spent on items including discounts) | [default to 'ORDER_ITEMS_SUBTOTAL_AMOUNT'] |
+| **order_items** | [**EarningRuleProportionalOrderItemsSubtotalAmountOrderItems**](EarningRuleProportionalOrderItemsSubtotalAmountOrderItems.md) | | |
+
diff --git a/docs/EarningRuleProportionalOrderItemsSubtotalAmountOrderItems.md b/docs/EarningRuleProportionalOrderItemsSubtotalAmountOrderItems.md
new file mode 100644
index 00000000..4292dc10
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderItemsSubtotalAmountOrderItems.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EarningRuleProportionalOrderItemsSubtotalAmountOrderItems
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **subtotal_amount** | [**EarningRuleProportionalOrderItemsAmountOrderItemsAmount**](EarningRuleProportionalOrderItemsAmountOrderItemsAmount.md) | | |
+
diff --git a/docs/EarningRuleProportionalOrderMetadata.md b/docs/EarningRuleProportionalOrderMetadata.md
new file mode 100644
index 00000000..10959abd
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderMetadata.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleProportionalOrderMetadata
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio. | [default to 'PROPORTIONAL'] |
+| **calculation_type** | **String** | `ORDER_METADATA`: Order Metadata (X points for every Y in metadata attribute, defined in the property key under the order.metadata object) | [default to 'ORDER_METADATA'] |
+| **order** | [**EarningRuleProportionalOrderMetadataOrder**](EarningRuleProportionalOrderMetadataOrder.md) | | |
+
diff --git a/docs/EarningRuleProportionalOrderMetadataOrder.md b/docs/EarningRuleProportionalOrderMetadataOrder.md
new file mode 100644
index 00000000..e6c3019d
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderMetadataOrder.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EarningRuleProportionalOrderMetadataOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **metadata** | [**EarningRuleProportionalOrderMetadataOrderMetadata**](EarningRuleProportionalOrderMetadataOrderMetadata.md) | | |
+
diff --git a/docs/EarningRuleProportionalOrderMetadataOrderMetadata.md b/docs/EarningRuleProportionalOrderMetadataOrderMetadata.md
new file mode 100644
index 00000000..618e3762
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderMetadataOrderMetadata.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleProportionalOrderMetadataOrderMetadata
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **every** | **Integer** | For how many increments of the order metadata property to grant points for. | |
+| **points** | **Integer** | Number of points to be awarded, i.e. how many points to be added to the loyalty card. | |
+| **property** | **String** | Order metadata property. | |
+
diff --git a/docs/EarningRuleProportionalOrderTotalAmount.md b/docs/EarningRuleProportionalOrderTotalAmount.md
new file mode 100644
index 00000000..b9f1952c
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderTotalAmount.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EarningRuleProportionalOrderTotalAmount
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Defines how the points will be added to the loyalty card.PROPORTIONAL adds points based on a pre-defined ratio. | [default to 'PROPORTIONAL'] |
+| **calculation_type** | **String** | `ORDER_TOTAL_AMOUNT`: Total order amount (X points for every Y spent including discount) | [default to 'ORDER_TOTAL_AMOUNT'] |
+| **order** | [**EarningRuleProportionalOrderTotalAmountOrder**](EarningRuleProportionalOrderTotalAmountOrder.md) | | |
+
diff --git a/docs/EarningRuleProportionalOrderTotalAmountOrder.md b/docs/EarningRuleProportionalOrderTotalAmountOrder.md
new file mode 100644
index 00000000..47fa9591
--- /dev/null
+++ b/docs/EarningRuleProportionalOrderTotalAmountOrder.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EarningRuleProportionalOrderTotalAmountOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **total_amount** | [**EarningRuleProportionalOrderAmountOrderAmount**](EarningRuleProportionalOrderAmountOrderAmount.md) | | |
+
diff --git a/docs/Error.md b/docs/Error.md
new file mode 100644
index 00000000..5eb5ac24
--- /dev/null
+++ b/docs/Error.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::Error
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **Integer** | Error's HTTP status code. | |
+| **key** | **String** | Short string describing the kind of error which occurred. | |
+| **message** | **String** | A human-readable message providing a short description about the error. | |
+| **details** | **String** | A human-readable message providing more details about the error. | |
+| **request_id** | **String** | This ID is useful when troubleshooting and/or finding the root cause of an error response by our support team. | |
+| **resource_id** | **String** | Unique resource ID that can be used in another endpoint to get more details. | [optional] |
+| **resource_type** | **String** | The resource type. | [optional] |
+
diff --git a/docs/EventCustomerActiveCampaignFailed.md b/docs/EventCustomerActiveCampaignFailed.md
new file mode 100644
index 00000000..96579b38
--- /dev/null
+++ b/docs/EventCustomerActiveCampaignFailed.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerActiveCampaignFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **failed_at** | **Time** | Timestamp representing the date and time when the distribution failed in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerActiveCampaignRecovered.md b/docs/EventCustomerActiveCampaignRecovered.md
new file mode 100644
index 00000000..18bbfc80
--- /dev/null
+++ b/docs/EventCustomerActiveCampaignRecovered.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerActiveCampaignRecovered
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **recovered_at** | **Time** | Timestamp representing the date and time when the distribution was recovered in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerActiveCampaignSent.md b/docs/EventCustomerActiveCampaignSent.md
new file mode 100644
index 00000000..1eafe7dd
--- /dev/null
+++ b/docs/EventCustomerActiveCampaignSent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerActiveCampaignSent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **sent_at** | **Time** | Timestamp representing the date and time when the distribution was sent in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerBatchFailed.md b/docs/EventCustomerBatchFailed.md
new file mode 100644
index 00000000..ae2d0623
--- /dev/null
+++ b/docs/EventCustomerBatchFailed.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerBatchFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **failed_at** | **Time** | Timestamp representing the date and time when the distribution failed in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerBatchRecovered.md b/docs/EventCustomerBatchRecovered.md
new file mode 100644
index 00000000..97db31e7
--- /dev/null
+++ b/docs/EventCustomerBatchRecovered.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerBatchRecovered
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **recovered_at** | **Time** | Timestamp representing the date and time when the distribution was recovered in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerBatchSent.md b/docs/EventCustomerBatchSent.md
new file mode 100644
index 00000000..1dc588ed
--- /dev/null
+++ b/docs/EventCustomerBatchSent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerBatchSent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **sent_at** | **Time** | Timestamp representing the date and time when the distribution was sent in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerBrazeFailed.md b/docs/EventCustomerBrazeFailed.md
new file mode 100644
index 00000000..69d3c027
--- /dev/null
+++ b/docs/EventCustomerBrazeFailed.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerBrazeFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **failed_at** | **Time** | Timestamp representing the date and time when the distribution failed in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerBrazeRecovered.md b/docs/EventCustomerBrazeRecovered.md
new file mode 100644
index 00000000..266d16ca
--- /dev/null
+++ b/docs/EventCustomerBrazeRecovered.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerBrazeRecovered
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **recovered_at** | **Time** | Timestamp representing the date and time when the distribution was recovered in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerBrazeSent.md b/docs/EventCustomerBrazeSent.md
new file mode 100644
index 00000000..d8e80207
--- /dev/null
+++ b/docs/EventCustomerBrazeSent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerBrazeSent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **sent_at** | **Time** | Timestamp representing the date and time when the distribution was sent in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerConfirmed.md b/docs/EventCustomerConfirmed.md
new file mode 100644
index 00000000..51822790
--- /dev/null
+++ b/docs/EventCustomerConfirmed.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EventCustomerConfirmed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | [optional] |
+| **unconfirmed_customer** | [**EventCustomerConfirmedUnconfirmedCustomer**](EventCustomerConfirmedUnconfirmedCustomer.md) | | [optional] |
+
diff --git a/docs/EventCustomerConfirmedUnconfirmedCustomer.md b/docs/EventCustomerConfirmedUnconfirmedCustomer.md
new file mode 100644
index 00000000..110223cf
--- /dev/null
+++ b/docs/EventCustomerConfirmedUnconfirmedCustomer.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EventCustomerConfirmedUnconfirmedCustomer
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | | [optional] |
+
diff --git a/docs/EventCustomerConsents.md b/docs/EventCustomerConsents.md
new file mode 100644
index 00000000..df874dd7
--- /dev/null
+++ b/docs/EventCustomerConsents.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EventCustomerConsents
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **consents** | [**Array<SimpleConsent>**](SimpleConsent.md) | | [optional] |
+
diff --git a/docs/EventCustomerConsentsGiven.md b/docs/EventCustomerConsentsGiven.md
new file mode 100644
index 00000000..96a0d006
--- /dev/null
+++ b/docs/EventCustomerConsentsGiven.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EventCustomerConsentsGiven
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **consents** | [**Array<SimpleConsent>**](SimpleConsent.md) | | [optional] |
+
diff --git a/docs/EventCustomerConsentsRevoked.md b/docs/EventCustomerConsentsRevoked.md
new file mode 100644
index 00000000..7c1833d5
--- /dev/null
+++ b/docs/EventCustomerConsentsRevoked.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EventCustomerConsentsRevoked
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **consents** | [**Array<SimpleConsent>**](SimpleConsent.md) | | [optional] |
+
diff --git a/docs/EventCustomerCreated.md b/docs/EventCustomerCreated.md
new file mode 100644
index 00000000..d9fb3416
--- /dev/null
+++ b/docs/EventCustomerCreated.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EventCustomerCreated
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | [optional] |
+
diff --git a/docs/EventCustomerCustomEvent.md b/docs/EventCustomerCustomEvent.md
new file mode 100644
index 00000000..1769fd85
--- /dev/null
+++ b/docs/EventCustomerCustomEvent.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EventCustomerCustomEvent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | |
+
diff --git a/docs/EventCustomerDeleted.md b/docs/EventCustomerDeleted.md
new file mode 100644
index 00000000..b2829f87
--- /dev/null
+++ b/docs/EventCustomerDeleted.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EventCustomerDeleted
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | [optional] |
+
diff --git a/docs/EventCustomerEmailFailed.md b/docs/EventCustomerEmailFailed.md
new file mode 100644
index 00000000..f3ca13f3
--- /dev/null
+++ b/docs/EventCustomerEmailFailed.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerEmailFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **failed_at** | **Time** | Timestamp representing the date and time when the distribution failed in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerEmailRecovered.md b/docs/EventCustomerEmailRecovered.md
new file mode 100644
index 00000000..d3bace14
--- /dev/null
+++ b/docs/EventCustomerEmailRecovered.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerEmailRecovered
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **recovered_at** | **Time** | Timestamp representing the date and time when the distribution was recovered in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerEmailSent.md b/docs/EventCustomerEmailSent.md
new file mode 100644
index 00000000..3f82c9b0
--- /dev/null
+++ b/docs/EventCustomerEmailSent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerEmailSent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **sent_at** | **Time** | Timestamp representing the date and time when the distribution was sent in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerFailed.md b/docs/EventCustomerFailed.md
new file mode 100644
index 00000000..2d2f4abd
--- /dev/null
+++ b/docs/EventCustomerFailed.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **failed_at** | **Time** | Timestamp representing the date and time when the distribution failed in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerGiftVoucherBalanceAdded.md b/docs/EventCustomerGiftVoucherBalanceAdded.md
new file mode 100644
index 00000000..e3b1e006
--- /dev/null
+++ b/docs/EventCustomerGiftVoucherBalanceAdded.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::EventCustomerGiftVoucherBalanceAdded
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **balance** | **Integer** | | [optional] |
+| **transaction** | [**VoucherTransaction**](VoucherTransaction.md) | | [optional] |
+
diff --git a/docs/EventCustomerIntercomFailed.md b/docs/EventCustomerIntercomFailed.md
new file mode 100644
index 00000000..7aa08d30
--- /dev/null
+++ b/docs/EventCustomerIntercomFailed.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerIntercomFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **failed_at** | **Time** | Timestamp representing the date and time when the distribution failed in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerIntercomRecovered.md b/docs/EventCustomerIntercomRecovered.md
new file mode 100644
index 00000000..b0d67989
--- /dev/null
+++ b/docs/EventCustomerIntercomRecovered.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerIntercomRecovered
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **recovered_at** | **Time** | Timestamp representing the date and time when the distribution was recovered in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerIntercomSent.md b/docs/EventCustomerIntercomSent.md
new file mode 100644
index 00000000..97960b8d
--- /dev/null
+++ b/docs/EventCustomerIntercomSent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerIntercomSent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **sent_at** | **Time** | Timestamp representing the date and time when the distribution was sent in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerKlaviyoFailed.md b/docs/EventCustomerKlaviyoFailed.md
new file mode 100644
index 00000000..e98de7ad
--- /dev/null
+++ b/docs/EventCustomerKlaviyoFailed.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerKlaviyoFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **failed_at** | **Time** | Timestamp representing the date and time when the distribution failed in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerKlaviyoRecovered.md b/docs/EventCustomerKlaviyoRecovered.md
new file mode 100644
index 00000000..d6dbd02f
--- /dev/null
+++ b/docs/EventCustomerKlaviyoRecovered.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerKlaviyoRecovered
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **recovered_at** | **Time** | Timestamp representing the date and time when the distribution was recovered in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerKlaviyoSent.md b/docs/EventCustomerKlaviyoSent.md
new file mode 100644
index 00000000..6d9342c2
--- /dev/null
+++ b/docs/EventCustomerKlaviyoSent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerKlaviyoSent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **sent_at** | **Time** | Timestamp representing the date and time when the distribution was sent in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerLoyaltyCardPointsAdded.md b/docs/EventCustomerLoyaltyCardPointsAdded.md
new file mode 100644
index 00000000..7590039e
--- /dev/null
+++ b/docs/EventCustomerLoyaltyCardPointsAdded.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::EventCustomerLoyaltyCardPointsAdded
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **balance** | **Integer** | | [optional] |
+| **transaction** | [**VoucherTransaction**](VoucherTransaction.md) | | [optional] |
+
diff --git a/docs/EventCustomerLoyaltyCardPointsTransferred.md b/docs/EventCustomerLoyaltyCardPointsTransferred.md
new file mode 100644
index 00000000..299993ae
--- /dev/null
+++ b/docs/EventCustomerLoyaltyCardPointsTransferred.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::EventCustomerLoyaltyCardPointsTransferred
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **source_voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **destination_voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **balance** | **Integer** | | [optional] |
+| **transaction** | [**VoucherTransaction**](VoucherTransaction.md) | | [optional] |
+
diff --git a/docs/EventCustomerLoyaltyTierBase.md b/docs/EventCustomerLoyaltyTierBase.md
new file mode 100644
index 00000000..0976cdc7
--- /dev/null
+++ b/docs/EventCustomerLoyaltyTierBase.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EventCustomerLoyaltyTierBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+
diff --git a/docs/EventCustomerLoyaltyTierDowngraded.md b/docs/EventCustomerLoyaltyTierDowngraded.md
new file mode 100644
index 00000000..3fa6920c
--- /dev/null
+++ b/docs/EventCustomerLoyaltyTierDowngraded.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::EventCustomerLoyaltyTierDowngraded
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **loyalty_tier_from** | [**LoyaltyTier**](LoyaltyTier.md) | | |
+| **loyalty_tier_to** | [**LoyaltyTier**](LoyaltyTier.md) | | |
+| **created_at** | **Time** | | |
+
diff --git a/docs/EventCustomerLoyaltyTierExpirationChanged.md b/docs/EventCustomerLoyaltyTierExpirationChanged.md
new file mode 100644
index 00000000..ced9c97d
--- /dev/null
+++ b/docs/EventCustomerLoyaltyTierExpirationChanged.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::EventCustomerLoyaltyTierExpirationChanged
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **loyalty_tier** | [**LoyaltyTier**](LoyaltyTier.md) | | |
+| **created_at** | **Time** | | |
+| **expiration_date** | **Time** | | |
+
diff --git a/docs/EventCustomerLoyaltyTierJoined.md b/docs/EventCustomerLoyaltyTierJoined.md
new file mode 100644
index 00000000..f561331f
--- /dev/null
+++ b/docs/EventCustomerLoyaltyTierJoined.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EventCustomerLoyaltyTierJoined
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **loyalty_tier** | [**LoyaltyTier**](LoyaltyTier.md) | | |
+| **created_at** | **Time** | | |
+
diff --git a/docs/EventCustomerLoyaltyTierLeft.md b/docs/EventCustomerLoyaltyTierLeft.md
new file mode 100644
index 00000000..7fa7e84e
--- /dev/null
+++ b/docs/EventCustomerLoyaltyTierLeft.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EventCustomerLoyaltyTierLeft
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **loyalty_tier** | [**LoyaltyTier**](LoyaltyTier.md) | | |
+| **created_at** | **Time** | | |
+
diff --git a/docs/EventCustomerLoyaltyTierProlonged.md b/docs/EventCustomerLoyaltyTierProlonged.md
new file mode 100644
index 00000000..ac56ba91
--- /dev/null
+++ b/docs/EventCustomerLoyaltyTierProlonged.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EventCustomerLoyaltyTierProlonged
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **loyalty_tier** | [**LoyaltyTier**](LoyaltyTier.md) | | |
+| **created_at** | **Time** | | |
+
diff --git a/docs/EventCustomerLoyaltyTierUpgraded.md b/docs/EventCustomerLoyaltyTierUpgraded.md
new file mode 100644
index 00000000..33daa77a
--- /dev/null
+++ b/docs/EventCustomerLoyaltyTierUpgraded.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::EventCustomerLoyaltyTierUpgraded
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **loyalty_tier_from** | [**LoyaltyTier**](LoyaltyTier.md) | | [optional] |
+| **loyalty_tier_to** | [**LoyaltyTier**](LoyaltyTier.md) | | |
+| **created_at** | **Time** | | |
+
diff --git a/docs/EventCustomerLoyaltyUpdated.md b/docs/EventCustomerLoyaltyUpdated.md
new file mode 100644
index 00000000..ffdae02b
--- /dev/null
+++ b/docs/EventCustomerLoyaltyUpdated.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EventCustomerLoyaltyUpdated
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **loyalty** | **Object** | | [optional] |
+| **created_at** | **Time** | | |
+
diff --git a/docs/EventCustomerMailchimpFailed.md b/docs/EventCustomerMailchimpFailed.md
new file mode 100644
index 00000000..3e6d451a
--- /dev/null
+++ b/docs/EventCustomerMailchimpFailed.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerMailchimpFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **failed_at** | **Time** | Timestamp representing the date and time when the distribution failed in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerMailchimpRecovered.md b/docs/EventCustomerMailchimpRecovered.md
new file mode 100644
index 00000000..71824d93
--- /dev/null
+++ b/docs/EventCustomerMailchimpRecovered.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerMailchimpRecovered
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **recovered_at** | **Time** | Timestamp representing the date and time when the distribution was recovered in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerMailchimpSent.md b/docs/EventCustomerMailchimpSent.md
new file mode 100644
index 00000000..916135c9
--- /dev/null
+++ b/docs/EventCustomerMailchimpSent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerMailchimpSent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **sent_at** | **Time** | Timestamp representing the date and time when the distribution was sent in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerOrder.md b/docs/EventCustomerOrder.md
new file mode 100644
index 00000000..339b03ad
--- /dev/null
+++ b/docs/EventCustomerOrder.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EventCustomerOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **referrer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **redemption** | [**RedemptionInternal**](RedemptionInternal.md) | | [optional] |
+
diff --git a/docs/EventCustomerOrderCanceled.md b/docs/EventCustomerOrderCanceled.md
new file mode 100644
index 00000000..f3cc037c
--- /dev/null
+++ b/docs/EventCustomerOrderCanceled.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EventCustomerOrderCanceled
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **referrer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **redemption** | [**RedemptionInternal**](RedemptionInternal.md) | | [optional] |
+
diff --git a/docs/EventCustomerOrderCreated.md b/docs/EventCustomerOrderCreated.md
new file mode 100644
index 00000000..27896e17
--- /dev/null
+++ b/docs/EventCustomerOrderCreated.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EventCustomerOrderCreated
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **referrer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **redemption** | [**RedemptionInternal**](RedemptionInternal.md) | | [optional] |
+
diff --git a/docs/EventCustomerOrderFulfilled.md b/docs/EventCustomerOrderFulfilled.md
new file mode 100644
index 00000000..f35d7c6d
--- /dev/null
+++ b/docs/EventCustomerOrderFulfilled.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EventCustomerOrderFulfilled
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **referrer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **redemption** | [**RedemptionInternal**](RedemptionInternal.md) | | [optional] |
+
diff --git a/docs/EventCustomerOrderPaid.md b/docs/EventCustomerOrderPaid.md
new file mode 100644
index 00000000..bccba28c
--- /dev/null
+++ b/docs/EventCustomerOrderPaid.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EventCustomerOrderPaid
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **referrer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **redemption** | [**RedemptionInternal**](RedemptionInternal.md) | | [optional] |
+
diff --git a/docs/EventCustomerOrderProcessing.md b/docs/EventCustomerOrderProcessing.md
new file mode 100644
index 00000000..b5cdbc80
--- /dev/null
+++ b/docs/EventCustomerOrderProcessing.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EventCustomerOrderProcessing
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **referrer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **redemption** | [**RedemptionInternal**](RedemptionInternal.md) | | [optional] |
+
diff --git a/docs/EventCustomerOrderUpdated.md b/docs/EventCustomerOrderUpdated.md
new file mode 100644
index 00000000..0d97d514
--- /dev/null
+++ b/docs/EventCustomerOrderUpdated.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::EventCustomerOrderUpdated
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **referrer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **redemption** | [**RedemptionInternal**](RedemptionInternal.md) | | [optional] |
+
diff --git a/docs/EventCustomerPublicationFailed.md b/docs/EventCustomerPublicationFailed.md
new file mode 100644
index 00000000..097a534f
--- /dev/null
+++ b/docs/EventCustomerPublicationFailed.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerPublicationFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **publication** | **Object** | | [optional] |
+
diff --git a/docs/EventCustomerPublicationSucceeded.md b/docs/EventCustomerPublicationSucceeded.md
new file mode 100644
index 00000000..3be0c404
--- /dev/null
+++ b/docs/EventCustomerPublicationSucceeded.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerPublicationSucceeded
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **publication** | **Object** | | [optional] |
+
diff --git a/docs/EventCustomerRecovered.md b/docs/EventCustomerRecovered.md
new file mode 100644
index 00000000..f19486fd
--- /dev/null
+++ b/docs/EventCustomerRecovered.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerRecovered
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **recovered_at** | **Time** | Timestamp representing the date and time when the distribution was recovered in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerRedemption.md b/docs/EventCustomerRedemption.md
new file mode 100644
index 00000000..113289d3
--- /dev/null
+++ b/docs/EventCustomerRedemption.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::EventCustomerRedemption
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**SimpleOrder**](SimpleOrder.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **promotion_tier** | [**SimplePromotionTier**](SimplePromotionTier.md) | | [optional] |
+| **redemption** | [**SimpleRedemption**](SimpleRedemption.md) | | [optional] |
+
diff --git a/docs/EventCustomerRedemptionFailed.md b/docs/EventCustomerRedemptionFailed.md
new file mode 100644
index 00000000..02905ebd
--- /dev/null
+++ b/docs/EventCustomerRedemptionFailed.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::EventCustomerRedemptionFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**SimpleOrder**](SimpleOrder.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **promotion_tier** | [**SimplePromotionTier**](SimplePromotionTier.md) | | [optional] |
+| **redemption** | [**SimpleRedemption**](SimpleRedemption.md) | | [optional] |
+
diff --git a/docs/EventCustomerRedemptionRollbackFailed.md b/docs/EventCustomerRedemptionRollbackFailed.md
new file mode 100644
index 00000000..086b24ac
--- /dev/null
+++ b/docs/EventCustomerRedemptionRollbackFailed.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::EventCustomerRedemptionRollbackFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**SimpleOrder**](SimpleOrder.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **promotion_tier** | [**SimplePromotionTier**](SimplePromotionTier.md) | | [optional] |
+| **redemption** | [**SimpleRedemption**](SimpleRedemption.md) | | [optional] |
+| **redemption_rollback** | [**SimpleRedemption**](SimpleRedemption.md) | | [optional] |
+
diff --git a/docs/EventCustomerRedemptionRollbackSucceeded.md b/docs/EventCustomerRedemptionRollbackSucceeded.md
new file mode 100644
index 00000000..4b846f4a
--- /dev/null
+++ b/docs/EventCustomerRedemptionRollbackSucceeded.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::EventCustomerRedemptionRollbackSucceeded
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**SimpleOrder**](SimpleOrder.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **promotion_tier** | [**SimplePromotionTier**](SimplePromotionTier.md) | | [optional] |
+| **redemption** | [**SimpleRedemption**](SimpleRedemption.md) | | [optional] |
+| **redemption_rollback** | [**SimpleRedemption**](SimpleRedemption.md) | | [optional] |
+
diff --git a/docs/EventCustomerRedemptionSucceeded.md b/docs/EventCustomerRedemptionSucceeded.md
new file mode 100644
index 00000000..8604d304
--- /dev/null
+++ b/docs/EventCustomerRedemptionSucceeded.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::EventCustomerRedemptionSucceeded
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **order** | [**SimpleOrder**](SimpleOrder.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **promotion_tier** | [**SimplePromotionTier**](SimplePromotionTier.md) | | [optional] |
+| **redemption** | [**SimpleRedemption**](SimpleRedemption.md) | | [optional] |
+
diff --git a/docs/EventCustomerReferred.md b/docs/EventCustomerReferred.md
new file mode 100644
index 00000000..e142284e
--- /dev/null
+++ b/docs/EventCustomerReferred.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::EventCustomerReferred
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **referrer** | [**SimpleCustomer**](SimpleCustomer.md) | | |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | |
+| **custom_event** | [**CustomEvent**](CustomEvent.md) | | |
+| **redemption** | [**RedemptionInternal**](RedemptionInternal.md) | | [optional] |
+
diff --git a/docs/EventCustomerRewardRedemptions.md b/docs/EventCustomerRewardRedemptions.md
new file mode 100644
index 00000000..efb89dfb
--- /dev/null
+++ b/docs/EventCustomerRewardRedemptions.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::EventCustomerRewardRedemptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **reward_redemption** | **Object** | | [optional] |
+| **reward** | [**SimpleRedemptionRewardResult**](SimpleRedemptionRewardResult.md) | | [optional] |
+| **reward_assignment** | [**RewardAssignment**](RewardAssignment.md) | | [optional] |
+| **source** | **String** | | [optional] |
+| **balance** | **Integer** | | [optional] |
+
diff --git a/docs/EventCustomerRewardRedemptionsCompleted.md b/docs/EventCustomerRewardRedemptionsCompleted.md
new file mode 100644
index 00000000..f9062cea
--- /dev/null
+++ b/docs/EventCustomerRewardRedemptionsCompleted.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::EventCustomerRewardRedemptionsCompleted
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **reward_redemption** | **Object** | | [optional] |
+| **reward** | [**SimpleRedemptionRewardResult**](SimpleRedemptionRewardResult.md) | | [optional] |
+| **reward_assignment** | [**RewardAssignment**](RewardAssignment.md) | | [optional] |
+| **source** | **String** | | [optional] |
+| **balance** | **Integer** | | [optional] |
+
diff --git a/docs/EventCustomerRewardRedemptionsCreated.md b/docs/EventCustomerRewardRedemptionsCreated.md
new file mode 100644
index 00000000..08f6fb6e
--- /dev/null
+++ b/docs/EventCustomerRewardRedemptionsCreated.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::EventCustomerRewardRedemptionsCreated
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **reward_redemption** | **Object** | | [optional] |
+| **reward** | [**SimpleRedemptionRewardResult**](SimpleRedemptionRewardResult.md) | | [optional] |
+| **reward_assignment** | [**RewardAssignment**](RewardAssignment.md) | | [optional] |
+| **source** | **String** | | [optional] |
+| **balance** | **Integer** | | [optional] |
+
diff --git a/docs/EventCustomerRewardRedemptionsPending.md b/docs/EventCustomerRewardRedemptionsPending.md
new file mode 100644
index 00000000..e24df81e
--- /dev/null
+++ b/docs/EventCustomerRewardRedemptionsPending.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::EventCustomerRewardRedemptionsPending
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **reward_redemption** | **Object** | | [optional] |
+| **reward** | [**SimpleRedemptionRewardResult**](SimpleRedemptionRewardResult.md) | | [optional] |
+| **reward_assignment** | [**RewardAssignment**](RewardAssignment.md) | | [optional] |
+| **source** | **String** | | [optional] |
+| **balance** | **Integer** | | [optional] |
+
diff --git a/docs/EventCustomerRewardRedemptionsRolledBack.md b/docs/EventCustomerRewardRedemptionsRolledBack.md
new file mode 100644
index 00000000..60b393f8
--- /dev/null
+++ b/docs/EventCustomerRewardRedemptionsRolledBack.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::EventCustomerRewardRedemptionsRolledBack
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **reward_redemption** | **Object** | | [optional] |
+| **reward** | [**SimpleRedemptionRewardResult**](SimpleRedemptionRewardResult.md) | | [optional] |
+| **reward_assignment** | [**RewardAssignment**](RewardAssignment.md) | | [optional] |
+| **source** | **String** | | [optional] |
+| **balance** | **Integer** | | [optional] |
+
diff --git a/docs/EventCustomerRewarded.md b/docs/EventCustomerRewarded.md
new file mode 100644
index 00000000..693ccae0
--- /dev/null
+++ b/docs/EventCustomerRewarded.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::EventCustomerRewarded
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **redemption** | [**RedemptionInternal**](RedemptionInternal.md) | | [optional] |
+| **reward** | [**SimpleRedemptionRewardResult**](SimpleRedemptionRewardResult.md) | | [optional] |
+| **referral_tier** | [**SimpleReferralTier**](SimpleReferralTier.md) | | [optional] |
+| **balance** | **Integer** | | [optional] |
+| **custom_event** | [**CustomEvent**](CustomEvent.md) | | [optional] |
+| **customer_event** | **Object** | | [optional] |
+
diff --git a/docs/EventCustomerRewardedLoyaltyPoints.md b/docs/EventCustomerRewardedLoyaltyPoints.md
new file mode 100644
index 00000000..7dc4bb63
--- /dev/null
+++ b/docs/EventCustomerRewardedLoyaltyPoints.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::EventCustomerRewardedLoyaltyPoints
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **loyalty_tier** | [**LoyaltyTier**](LoyaltyTier.md) | | [optional] |
+| **earning_rule** | [**EarningRule**](EarningRule.md) | | [optional] |
+| **balance** | **Integer** | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **event** | **Object** | | [optional] |
+
diff --git a/docs/EventCustomerSegmentEntered.md b/docs/EventCustomerSegmentEntered.md
new file mode 100644
index 00000000..a91663ba
--- /dev/null
+++ b/docs/EventCustomerSegmentEntered.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EventCustomerSegmentEntered
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | |
+| **segment** | [**SimpleSegment**](SimpleSegment.md) | | |
+
diff --git a/docs/EventCustomerSegmentLeft.md b/docs/EventCustomerSegmentLeft.md
new file mode 100644
index 00000000..18fb1fd7
--- /dev/null
+++ b/docs/EventCustomerSegmentLeft.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EventCustomerSegmentLeft
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | |
+| **segment** | [**SimpleSegment**](SimpleSegment.md) | | |
+
diff --git a/docs/EventCustomerSent.md b/docs/EventCustomerSent.md
new file mode 100644
index 00000000..108b972b
--- /dev/null
+++ b/docs/EventCustomerSent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerSent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **sent_at** | **Time** | Timestamp representing the date and time when the distribution was sent in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerShopifyFailed.md b/docs/EventCustomerShopifyFailed.md
new file mode 100644
index 00000000..d2b9d541
--- /dev/null
+++ b/docs/EventCustomerShopifyFailed.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerShopifyFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **failed_at** | **Time** | Timestamp representing the date and time when the distribution failed in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerShopifyRecovered.md b/docs/EventCustomerShopifyRecovered.md
new file mode 100644
index 00000000..77da1fab
--- /dev/null
+++ b/docs/EventCustomerShopifyRecovered.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerShopifyRecovered
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **recovered_at** | **Time** | Timestamp representing the date and time when the distribution was recovered in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerShopifySent.md b/docs/EventCustomerShopifySent.md
new file mode 100644
index 00000000..323b29bb
--- /dev/null
+++ b/docs/EventCustomerShopifySent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerShopifySent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **sent_at** | **Time** | Timestamp representing the date and time when the distribution was sent in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerSmsFailed.md b/docs/EventCustomerSmsFailed.md
new file mode 100644
index 00000000..0687e81b
--- /dev/null
+++ b/docs/EventCustomerSmsFailed.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerSmsFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **failed_at** | **Time** | Timestamp representing the date and time when the distribution failed in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerSmsRecovered.md b/docs/EventCustomerSmsRecovered.md
new file mode 100644
index 00000000..6208d484
--- /dev/null
+++ b/docs/EventCustomerSmsRecovered.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerSmsRecovered
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **recovered_at** | **Time** | Timestamp representing the date and time when the distribution was recovered in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerSmsSent.md b/docs/EventCustomerSmsSent.md
new file mode 100644
index 00000000..6225f469
--- /dev/null
+++ b/docs/EventCustomerSmsSent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerSmsSent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **distribution** | **Object** | | [optional] |
+| **sent_at** | **Time** | Timestamp representing the date and time when the distribution was sent in ISO 8601 format. | |
+
diff --git a/docs/EventCustomerUpdated.md b/docs/EventCustomerUpdated.md
new file mode 100644
index 00000000..99ddec9e
--- /dev/null
+++ b/docs/EventCustomerUpdated.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::EventCustomerUpdated
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | [optional] |
+
diff --git a/docs/EventCustomerValidationFailed.md b/docs/EventCustomerValidationFailed.md
new file mode 100644
index 00000000..fb267b83
--- /dev/null
+++ b/docs/EventCustomerValidationFailed.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EventCustomerValidationFailed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **validation** | [**ValidationEntity**](ValidationEntity.md) | | [optional] |
+
diff --git a/docs/EventCustomerValidationSucceeded.md b/docs/EventCustomerValidationSucceeded.md
new file mode 100644
index 00000000..48f3ff5e
--- /dev/null
+++ b/docs/EventCustomerValidationSucceeded.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::EventCustomerValidationSucceeded
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **validation** | [**ValidationEntity**](ValidationEntity.md) | | [optional] |
+
diff --git a/docs/EventCustomerVoucherDeleted.md b/docs/EventCustomerVoucherDeleted.md
new file mode 100644
index 00000000..e8229dd7
--- /dev/null
+++ b/docs/EventCustomerVoucherDeleted.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::EventCustomerVoucherDeleted
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+
diff --git a/docs/EventCustomerVouchersLoyaltyPointsExpired.md b/docs/EventCustomerVouchersLoyaltyPointsExpired.md
new file mode 100644
index 00000000..95e9da71
--- /dev/null
+++ b/docs/EventCustomerVouchersLoyaltyPointsExpired.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::EventCustomerVouchersLoyaltyPointsExpired
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **campaign** | [**SimpleCampaign**](SimpleCampaign.md) | | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **points** | **Integer** | | [optional] |
+| **buckets** | [**Array<VoucherTransaction>**](VoucherTransaction.md) | | [optional] |
+| **transaction** | [**VoucherTransaction**](VoucherTransaction.md) | | [optional] |
+
diff --git a/docs/EventsApi.md b/docs/EventsApi.md
new file mode 100644
index 00000000..eb58b79a
--- /dev/null
+++ b/docs/EventsApi.md
@@ -0,0 +1,68 @@
+# VoucherifySdk::EventsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**track_custom_event**](EventsApi.md#track_custom_event) | **POST** /v1/events | Track Custom Event |
+
+
+## track_custom_event
+
+> track_custom_event(opts)
+
+Track Custom Event
+
+To track a custom event, you create an event object. The event object must be linked to the customer who performs the action. If a customer doesnt exist in Voucherify, the customer will be created.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::EventsApi.new
+opts = {
+ events_create_request_body: VoucherifySdk::EventsCreateRequestBody.new({event: 'event_example', customer: VoucherifySdk::Customer.new}) # EventsCreateRequestBody | Specify the details of the custom event.
+}
+
+begin
+ # Track Custom Event
+ result = api_instance.track_custom_event(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling EventsApi->track_custom_event: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **events_create_request_body** | [**EventsCreateRequestBody**](EventsCreateRequestBody.md) | Specify the details of the custom event. | [optional] |
+
+### Return type
+
+[**EventsCreateResponseBody**](EventsCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/EventsCreateRequestBody.md b/docs/EventsCreateRequestBody.md
new file mode 100644
index 00000000..47e67d07
--- /dev/null
+++ b/docs/EventsCreateRequestBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::EventsCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **event** | **String** | Event name. This is the same name that you used to define a custom event in the **Dashboard** > **Project Settings** > **Event Schema**. | |
+| **customer** | [**Customer**](Customer.md) | | |
+| **referral** | [**ClientEventsCreateRequestBodyReferral**](ClientEventsCreateRequestBodyReferral.md) | | [optional] |
+| **loyalty** | [**ClientEventsCreateRequestBodyLoyalty**](ClientEventsCreateRequestBodyLoyalty.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the event. A set of key/value pairs that you can attach to an event object. It can be useful for storing additional information about the event in a structured format. Event metadata schema is defined in the **Dashboard** > **Project Settings** > **Event Schema** > **Edit particular event** > **Metadata property definition**. | [optional] |
+
diff --git a/docs/EventsCreateResponseBody.md b/docs/EventsCreateResponseBody.md
new file mode 100644
index 00000000..da1b1f52
--- /dev/null
+++ b/docs/EventsCreateResponseBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::EventsCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The object represented is an `event`. | [default to 'event'] |
+| **type** | **String** | The event name. | |
+| **customer** | [**SimpleCustomerRequiredObjectType**](SimpleCustomerRequiredObjectType.md) | | |
+| **referral** | **Object** | A `null` referral object. | |
+| **loyalty** | **Object** | A `null` loyalty object. | |
+
diff --git a/docs/Export.md b/docs/Export.md
new file mode 100644
index 00000000..a98fa7a2
--- /dev/null
+++ b/docs/Export.md
@@ -0,0 +1,59 @@
+# VoucherifySdk::Export
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::Export.openapi_one_of
+# =>
+# [
+# :'ExportCustomer',
+# :'ExportOrder',
+# :'ExportPointsExpiration',
+# :'ExportPublication',
+# :'ExportRedemption',
+# :'ExportVoucher',
+# :'ExportVoucherTransactions'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::Export.build(data)
+# => #
+
+VoucherifySdk::Export.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `ExportCustomer`
+- `ExportOrder`
+- `ExportPointsExpiration`
+- `ExportPublication`
+- `ExportRedemption`
+- `ExportVoucher`
+- `ExportVoucherTransactions`
+- `nil` (if no type matches)
+
diff --git a/docs/ExportBase.md b/docs/ExportBase.md
new file mode 100644
index 00000000..da84789d
--- /dev/null
+++ b/docs/ExportBase.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ExportBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | [**ExportBaseResult**](ExportBaseResult.md) | | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+
diff --git a/docs/ExportBaseResult.md b/docs/ExportBaseResult.md
new file mode 100644
index 00000000..b4f49b0b
--- /dev/null
+++ b/docs/ExportBaseResult.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::ExportBaseResult
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **url** | **String** | URL of the CSV file location. It contains the token used for authorization in the Download export method. | |
+
diff --git a/docs/ExportCustomer.md b/docs/ExportCustomer.md
new file mode 100644
index 00000000..480ba408
--- /dev/null
+++ b/docs/ExportCustomer.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportCustomer
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | [**ExportBaseResult**](ExportBaseResult.md) | | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'customer'] |
+| **parameters** | [**ExportCustomerBaseParameters**](ExportCustomerBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportCustomerBase.md b/docs/ExportCustomerBase.md
new file mode 100644
index 00000000..97da2902
--- /dev/null
+++ b/docs/ExportCustomerBase.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ExportCustomerBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'customer'] |
+| **parameters** | [**ExportCustomerBaseParameters**](ExportCustomerBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportCustomerBaseParameters.md b/docs/ExportCustomerBaseParameters.md
new file mode 100644
index 00000000..47600401
--- /dev/null
+++ b/docs/ExportCustomerBaseParameters.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ExportCustomerBaseParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **order** | [**ExportCustomerOrder**](ExportCustomerOrder.md) | | [optional] |
+| **fields** | [**Array<ExportCustomerFields>**](ExportCustomerFields.md) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] |
+| **filters** | **Object** | Allowed additional properties must start with \"metadata.\" or \"address.\" or \"summary.\" or \"loyalty.\" or \"loyalty_tier.\" or \"loyalty_points.\" or \"system_metadata.\" | [optional] |
+
diff --git a/docs/ExportCustomerFields.md b/docs/ExportCustomerFields.md
new file mode 100644
index 00000000..f8c74a89
--- /dev/null
+++ b/docs/ExportCustomerFields.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportCustomerFields
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportCustomerFilters.md b/docs/ExportCustomerFilters.md
new file mode 100644
index 00000000..34fc2f0c
--- /dev/null
+++ b/docs/ExportCustomerFilters.md
@@ -0,0 +1,38 @@
+# VoucherifySdk::ExportCustomerFilters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+| **name** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **description** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **email** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **source_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **created_at** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **address_city** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **address_state** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **address_line_1** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **address_line_2** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **address_country** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **address_postal_code** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **redemptions_total_redeemed** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **redemptions_total_failed** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **redemptions_total_succeeded** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **redemptions_total_rolled_back** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **redemptions_total_rollback_failed** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **redemptions_total_rollback_succeeded** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **orders_total_amount** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **orders_total_count** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **orders_average_amount** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **orders_last_order_amount** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **orders_last_order_date** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **loyalty_points** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **loyalty_referred_customers** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **updated_at** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **phone** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **birthday** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **metadata** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **birthdate** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+
diff --git a/docs/ExportCustomerOrder.md b/docs/ExportCustomerOrder.md
new file mode 100644
index 00000000..1e22342b
--- /dev/null
+++ b/docs/ExportCustomerOrder.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportCustomerOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportCustomerScheduled.md b/docs/ExportCustomerScheduled.md
new file mode 100644
index 00000000..24e42285
--- /dev/null
+++ b/docs/ExportCustomerScheduled.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportCustomerScheduled
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | **Object** | Contains the URL of the CSV file. | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'customer'] |
+| **parameters** | [**ExportCustomerBaseParameters**](ExportCustomerBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportOrder.md b/docs/ExportOrder.md
new file mode 100644
index 00000000..07669b9e
--- /dev/null
+++ b/docs/ExportOrder.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | [**ExportBaseResult**](ExportBaseResult.md) | | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'order'] |
+| **parameters** | [**OrdersExportCreateRequestBodyParameters**](OrdersExportCreateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/ExportOrderBase.md b/docs/ExportOrderBase.md
new file mode 100644
index 00000000..ccaa6d0f
--- /dev/null
+++ b/docs/ExportOrderBase.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ExportOrderBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'order'] |
+| **parameters** | [**OrdersExportCreateRequestBodyParameters**](OrdersExportCreateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/ExportOrderFields.md b/docs/ExportOrderFields.md
new file mode 100644
index 00000000..a5744e6c
--- /dev/null
+++ b/docs/ExportOrderFields.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportOrderFields
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportOrderFilters.md b/docs/ExportOrderFilters.md
new file mode 100644
index 00000000..92802b60
--- /dev/null
+++ b/docs/ExportOrderFilters.md
@@ -0,0 +1,21 @@
+# VoucherifySdk::ExportOrderFilters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+| **id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **source_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **created_at** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **updated_at** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **status** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **amount** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **discount_amount** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **items_discount_amount** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **total_discount_amount** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **total_amount** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **customer_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **referrer_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **metadata** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+
diff --git a/docs/ExportOrderOrder.md b/docs/ExportOrderOrder.md
new file mode 100644
index 00000000..c5d1302c
--- /dev/null
+++ b/docs/ExportOrderOrder.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportOrderOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportOrderScheduled.md b/docs/ExportOrderScheduled.md
new file mode 100644
index 00000000..7a40f77c
--- /dev/null
+++ b/docs/ExportOrderScheduled.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportOrderScheduled
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | **Object** | Contains the URL of the CSV file. | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'order'] |
+| **parameters** | [**OrdersExportCreateRequestBodyParameters**](OrdersExportCreateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/ExportPointsExpiration.md b/docs/ExportPointsExpiration.md
new file mode 100644
index 00000000..f17e7a5b
--- /dev/null
+++ b/docs/ExportPointsExpiration.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportPointsExpiration
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | [**ExportBaseResult**](ExportBaseResult.md) | | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'points_expiration'] |
+| **parameters** | [**ExportPointsExpirationBaseParameters**](ExportPointsExpirationBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportPointsExpirationBase.md b/docs/ExportPointsExpirationBase.md
new file mode 100644
index 00000000..922e36d1
--- /dev/null
+++ b/docs/ExportPointsExpirationBase.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ExportPointsExpirationBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'points_expiration'] |
+| **parameters** | [**ExportPointsExpirationBaseParameters**](ExportPointsExpirationBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportPointsExpirationBaseParameters.md b/docs/ExportPointsExpirationBaseParameters.md
new file mode 100644
index 00000000..f2ab84da
--- /dev/null
+++ b/docs/ExportPointsExpirationBaseParameters.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ExportPointsExpirationBaseParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **order** | [**ExportPointsExpirationOrder**](ExportPointsExpirationOrder.md) | | [optional] |
+| **fields** | [**Array<ExportPointsExpirationFields>**](ExportPointsExpirationFields.md) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] |
+| **filters** | [**ExportPointsExpirationFilters**](ExportPointsExpirationFilters.md) | | [optional] |
+
diff --git a/docs/ExportPointsExpirationFields.md b/docs/ExportPointsExpirationFields.md
new file mode 100644
index 00000000..57a6223b
--- /dev/null
+++ b/docs/ExportPointsExpirationFields.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportPointsExpirationFields
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportPointsExpirationFilters.md b/docs/ExportPointsExpirationFilters.md
new file mode 100644
index 00000000..afd53926
--- /dev/null
+++ b/docs/ExportPointsExpirationFilters.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ExportPointsExpirationFilters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+| **campaign_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **voucher_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+
diff --git a/docs/ExportPointsExpirationOrder.md b/docs/ExportPointsExpirationOrder.md
new file mode 100644
index 00000000..ae57565a
--- /dev/null
+++ b/docs/ExportPointsExpirationOrder.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportPointsExpirationOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportPointsExpirationScheduled.md b/docs/ExportPointsExpirationScheduled.md
new file mode 100644
index 00000000..ac1b8049
--- /dev/null
+++ b/docs/ExportPointsExpirationScheduled.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportPointsExpirationScheduled
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | **Object** | Contains the URL of the CSV file. | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'points_expiration'] |
+| **parameters** | [**ExportPointsExpirationBaseParameters**](ExportPointsExpirationBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportPublication.md b/docs/ExportPublication.md
new file mode 100644
index 00000000..509eb98d
--- /dev/null
+++ b/docs/ExportPublication.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportPublication
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | [**ExportBaseResult**](ExportBaseResult.md) | | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'publication'] |
+| **parameters** | [**ExportPublicationBaseParameters**](ExportPublicationBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportPublicationBase.md b/docs/ExportPublicationBase.md
new file mode 100644
index 00000000..8182e2d2
--- /dev/null
+++ b/docs/ExportPublicationBase.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ExportPublicationBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'publication'] |
+| **parameters** | [**ExportPublicationBaseParameters**](ExportPublicationBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportPublicationBaseParameters.md b/docs/ExportPublicationBaseParameters.md
new file mode 100644
index 00000000..d65bb4a9
--- /dev/null
+++ b/docs/ExportPublicationBaseParameters.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ExportPublicationBaseParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **order** | [**ExportPublicationOrder**](ExportPublicationOrder.md) | | [optional] |
+| **fields** | [**Array<ExportPublicationFields>**](ExportPublicationFields.md) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] |
+| **filters** | **Object** | Allowed additional properties must start with \"metadata.\" | [optional] |
+
diff --git a/docs/ExportPublicationFields.md b/docs/ExportPublicationFields.md
new file mode 100644
index 00000000..e61ecfb6
--- /dev/null
+++ b/docs/ExportPublicationFields.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportPublicationFields
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportPublicationFilters.md b/docs/ExportPublicationFilters.md
new file mode 100644
index 00000000..e56c5756
--- /dev/null
+++ b/docs/ExportPublicationFilters.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportPublicationFilters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+| **voucher_code** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **customer_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **customer_source_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **date** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **channel** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **campaign** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **is_winner** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **metadata** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+
diff --git a/docs/ExportPublicationOrder.md b/docs/ExportPublicationOrder.md
new file mode 100644
index 00000000..c81444a6
--- /dev/null
+++ b/docs/ExportPublicationOrder.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportPublicationOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportPublicationScheduled.md b/docs/ExportPublicationScheduled.md
new file mode 100644
index 00000000..5bdd8866
--- /dev/null
+++ b/docs/ExportPublicationScheduled.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportPublicationScheduled
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | **Object** | Contains the URL of the CSV file. | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'publication'] |
+| **parameters** | [**ExportPublicationBaseParameters**](ExportPublicationBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportRedemption.md b/docs/ExportRedemption.md
new file mode 100644
index 00000000..43835076
--- /dev/null
+++ b/docs/ExportRedemption.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportRedemption
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | [**ExportBaseResult**](ExportBaseResult.md) | | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'redemption'] |
+| **parameters** | [**ExportRedemptionBaseParameters**](ExportRedemptionBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportRedemptionBase.md b/docs/ExportRedemptionBase.md
new file mode 100644
index 00000000..f0b4d3a6
--- /dev/null
+++ b/docs/ExportRedemptionBase.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ExportRedemptionBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'redemption'] |
+| **parameters** | [**ExportRedemptionBaseParameters**](ExportRedemptionBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportRedemptionBaseParameters.md b/docs/ExportRedemptionBaseParameters.md
new file mode 100644
index 00000000..98d13108
--- /dev/null
+++ b/docs/ExportRedemptionBaseParameters.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ExportRedemptionBaseParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **order** | [**ExportRedemptionOrder**](ExportRedemptionOrder.md) | | [optional] |
+| **fields** | [**Array<ExportRedemptionFields>**](ExportRedemptionFields.md) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] |
+| **filters** | **Object** | Allowed additional properties must start with \"metadata.\" | [optional] |
+
diff --git a/docs/ExportRedemptionFields.md b/docs/ExportRedemptionFields.md
new file mode 100644
index 00000000..7f4812ba
--- /dev/null
+++ b/docs/ExportRedemptionFields.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportRedemptionFields
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportRedemptionFilters.md b/docs/ExportRedemptionFilters.md
new file mode 100644
index 00000000..b3b72bb1
--- /dev/null
+++ b/docs/ExportRedemptionFilters.md
@@ -0,0 +1,25 @@
+# VoucherifySdk::ExportRedemptionFilters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+| **id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **object** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **date** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **voucher_code** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **campaign** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **promotion_tier_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **customer_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **customer_source_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **customer_name** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **tracking_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **order_amount** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **gift_amount** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **loyalty_points** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **result** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **failure_code** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **failure_message** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **metadata** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+
diff --git a/docs/ExportRedemptionOrder.md b/docs/ExportRedemptionOrder.md
new file mode 100644
index 00000000..d96b826b
--- /dev/null
+++ b/docs/ExportRedemptionOrder.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportRedemptionOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportRedemptionScheduled.md b/docs/ExportRedemptionScheduled.md
new file mode 100644
index 00000000..df47dbd8
--- /dev/null
+++ b/docs/ExportRedemptionScheduled.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportRedemptionScheduled
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | **Object** | Contains the URL of the CSV file. | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'redemption'] |
+| **parameters** | [**ExportRedemptionBaseParameters**](ExportRedemptionBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportScheduledBase.md b/docs/ExportScheduledBase.md
new file mode 100644
index 00000000..164458b8
--- /dev/null
+++ b/docs/ExportScheduledBase.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ExportScheduledBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | **Object** | Contains the URL of the CSV file. | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+
diff --git a/docs/ExportVoucher.md b/docs/ExportVoucher.md
new file mode 100644
index 00000000..da9dc705
--- /dev/null
+++ b/docs/ExportVoucher.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | [**ExportBaseResult**](ExportBaseResult.md) | | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'voucher'] |
+| **parameters** | [**ExportVoucherBaseParameters**](ExportVoucherBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportVoucherBase.md b/docs/ExportVoucherBase.md
new file mode 100644
index 00000000..c86a5f2f
--- /dev/null
+++ b/docs/ExportVoucherBase.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ExportVoucherBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'voucher'] |
+| **parameters** | [**ExportVoucherBaseParameters**](ExportVoucherBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportVoucherBaseParameters.md b/docs/ExportVoucherBaseParameters.md
new file mode 100644
index 00000000..d38fd813
--- /dev/null
+++ b/docs/ExportVoucherBaseParameters.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ExportVoucherBaseParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **order** | [**ExportVoucherOrder**](ExportVoucherOrder.md) | | [optional] |
+| **fields** | [**Array<ExportVoucherFields>**](ExportVoucherFields.md) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] |
+| **filters** | **Object** | Allowed additional properties must start with \"metadata.\" or \"redemption.\" | [optional] |
+
diff --git a/docs/ExportVoucherFields.md b/docs/ExportVoucherFields.md
new file mode 100644
index 00000000..871ac22c
--- /dev/null
+++ b/docs/ExportVoucherFields.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportVoucherFields
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportVoucherFilters.md b/docs/ExportVoucherFilters.md
new file mode 100644
index 00000000..72040827
--- /dev/null
+++ b/docs/ExportVoucherFilters.md
@@ -0,0 +1,38 @@
+# VoucherifySdk::ExportVoucherFilters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+| **code** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **voucher_type** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **value** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **discount_type** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **campaign** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **category** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **start_date** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **expiration_date** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **gift_balance** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **loyalty_balance** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **redemption_quantity** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **redemption_count** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **active** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **qr_code** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **bar_code** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **metadata** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **is_referral_code** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **created_at** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **updated_at** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **validity_timeframe_interval** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **validity_timeframe_duration** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **validity_day_of_week** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **discount_amount_limit** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **campaign_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **additional_info** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **customer_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **discount_unit_type** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **discount_unit_effect** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **customer_source_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+
diff --git a/docs/ExportVoucherOrder.md b/docs/ExportVoucherOrder.md
new file mode 100644
index 00000000..e7c8305d
--- /dev/null
+++ b/docs/ExportVoucherOrder.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportVoucherOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportVoucherScheduled.md b/docs/ExportVoucherScheduled.md
new file mode 100644
index 00000000..f6794723
--- /dev/null
+++ b/docs/ExportVoucherScheduled.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportVoucherScheduled
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | **Object** | Contains the URL of the CSV file. | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'voucher'] |
+| **parameters** | [**ExportVoucherBaseParameters**](ExportVoucherBaseParameters.md) | | [optional] |
+
diff --git a/docs/ExportVoucherTransactions.md b/docs/ExportVoucherTransactions.md
new file mode 100644
index 00000000..b868f47f
--- /dev/null
+++ b/docs/ExportVoucherTransactions.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportVoucherTransactions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | [**ExportBaseResult**](ExportBaseResult.md) | | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'voucher_transactions'] |
+| **parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/ExportVoucherTransactionsBase.md b/docs/ExportVoucherTransactionsBase.md
new file mode 100644
index 00000000..f0d0f4d1
--- /dev/null
+++ b/docs/ExportVoucherTransactionsBase.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ExportVoucherTransactionsBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'voucher_transactions'] |
+| **parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/ExportVoucherTransactionsFields.md b/docs/ExportVoucherTransactionsFields.md
new file mode 100644
index 00000000..2ad3ad05
--- /dev/null
+++ b/docs/ExportVoucherTransactionsFields.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportVoucherTransactionsFields
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportVoucherTransactionsFilters.md b/docs/ExportVoucherTransactionsFilters.md
new file mode 100644
index 00000000..39c07b5b
--- /dev/null
+++ b/docs/ExportVoucherTransactionsFilters.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ExportVoucherTransactionsFilters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+| **created_at** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **voucher_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **campaign_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+
diff --git a/docs/ExportVoucherTransactionsOrder.md b/docs/ExportVoucherTransactionsOrder.md
new file mode 100644
index 00000000..14efed7e
--- /dev/null
+++ b/docs/ExportVoucherTransactionsOrder.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ExportVoucherTransactionsOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ExportVoucherTransactionsScheduled.md b/docs/ExportVoucherTransactionsScheduled.md
new file mode 100644
index 00000000..3abd779d
--- /dev/null
+++ b/docs/ExportVoucherTransactionsScheduled.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportVoucherTransactionsScheduled
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | **Object** | Contains the URL of the CSV file. | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'voucher_transactions'] |
+| **parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/ExportsApi.md b/docs/ExportsApi.md
new file mode 100644
index 00000000..4a34df59
--- /dev/null
+++ b/docs/ExportsApi.md
@@ -0,0 +1,301 @@
+# VoucherifySdk::ExportsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_export**](ExportsApi.md#create_export) | **POST** /v1/exports | Create Export |
+| [**delete_export**](ExportsApi.md#delete_export) | **DELETE** /v1/exports/{exportId} | Delete Export |
+| [**download_export**](ExportsApi.md#download_export) | **GET** /v1/exports/{export_Id} | Download Export |
+| [**get_export**](ExportsApi.md#get_export) | **GET** /v1/exports/{exportId} | Get Export |
+| [**list_exports**](ExportsApi.md#list_exports) | **GET** /v1/exports | List Exports |
+
+
+## create_export
+
+> create_export(opts)
+
+Create Export
+
+Create export object. The export can be any of the following types: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions. # Defaults If you only specify the object type in the request body without specifying the fields, the API will return the following fields per export object: # Fetching particular data sets Using the parameters body parameter, you can narrow down which fields to export and how to filter the results. The fields are an array of strings containing the data that you would like to export. These fields define the headers in the CSV file. The array can be a combintation of any of the following available fields: # Orders # Vouchers # Publications # Redemptions # Customers # Points Expirations # Gift Card Transactions # Loyalty Card Transactions
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ExportsApi.new
+opts = {
+ exports_create_request_body: VoucherifySdk::ExportCustomerBase.new({exported_object: 'customer'}) # ExportsCreateRequestBody | Specify the details of the export that you would like to create.
+}
+
+begin
+ # Create Export
+ result = api_instance.create_export(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ExportsApi->create_export: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **exports_create_request_body** | [**ExportsCreateRequestBody**](ExportsCreateRequestBody.md) | Specify the details of the export that you would like to create. | [optional] |
+
+### Return type
+
+[**ExportsCreateResponseBody**](ExportsCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## delete_export
+
+> delete_export(export_id)
+
+Delete Export
+
+This method deletes a previously created export object.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ExportsApi.new
+export_id = 'export_id_example' # String | Unique export object ID of previously created export. This object can be a: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions.
+
+begin
+ # Delete Export
+ api_instance.delete_export(export_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ExportsApi->delete_export: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **export_id** | **String** | Unique export object ID of previously created export. This object can be a: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## download_export
+
+> String download_export(export_id, opts)
+
+Download Export
+
+Download the contents of the exported CSV file. 📘 Important notes **Base URL:** - https://download.voucherify.io (Europe) - https://us1.download.voucherify.io (US) - https://as1.download.voucherify.io (Asia) **Token:** Can be found within the result parameter of the Get Export method response.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+
+api_instance = VoucherifySdk::ExportsApi.new
+export_id = 'exp_ex6zq0x0EEa9S0N68QcqhxcQ' # String | Unique export object ID.
+opts = {
+ token: 'token_example' # String | Token that was issued to the export, to get this token, get the export first
+}
+
+begin
+ # Download Export
+ result = api_instance.download_export(export_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ExportsApi->download_export: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **export_id** | **String** | Unique export object ID. | |
+| **token** | **String** | Token that was issued to the export, to get this token, get the export first | [optional] |
+
+### Return type
+
+**String**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: text/plain
+
+
+## get_export
+
+> get_export(export_id)
+
+Get Export
+
+Retrieves the URL of the downloadable file, which was generated via the Create Export method.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ExportsApi.new
+export_id = 'export_id_example' # String | Unique export object ID of previously created export. This object can be a: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions.
+
+begin
+ # Get Export
+ result = api_instance.get_export(export_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ExportsApi->get_export: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **export_id** | **String** | Unique export object ID of previously created export. This object can be a: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions. | |
+
+### Return type
+
+[**ExportsGetResponseBody**](ExportsGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_exports
+
+> list_exports(opts)
+
+List Exports
+
+List all exports.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ExportsApi.new
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ order: VoucherifySdk::ParameterOrderListExports::CREATED_AT # ParameterOrderListExports | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+}
+
+begin
+ # List Exports
+ result = api_instance.list_exports(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ExportsApi->list_exports: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **order** | [**ParameterOrderListExports**](.md) | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+
+### Return type
+
+[**ExportsListResponseBody**](ExportsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
diff --git a/docs/ExportsCreateRequestBody.md b/docs/ExportsCreateRequestBody.md
new file mode 100644
index 00000000..732c1d76
--- /dev/null
+++ b/docs/ExportsCreateRequestBody.md
@@ -0,0 +1,59 @@
+# VoucherifySdk::ExportsCreateRequestBody
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ExportsCreateRequestBody.openapi_one_of
+# =>
+# [
+# :'ExportCustomerBase',
+# :'ExportOrderBase',
+# :'ExportPointsExpirationBase',
+# :'ExportPublicationBase',
+# :'ExportRedemptionBase',
+# :'ExportVoucherBase',
+# :'ExportVoucherTransactionsBase'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ExportsCreateRequestBody.build(data)
+# => #
+
+VoucherifySdk::ExportsCreateRequestBody.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `ExportCustomerBase`
+- `ExportOrderBase`
+- `ExportPointsExpirationBase`
+- `ExportPublicationBase`
+- `ExportRedemptionBase`
+- `ExportVoucherBase`
+- `ExportVoucherTransactionsBase`
+- `nil` (if no type matches)
+
diff --git a/docs/ExportsCreateResponseBody.md b/docs/ExportsCreateResponseBody.md
new file mode 100644
index 00000000..7392df22
--- /dev/null
+++ b/docs/ExportsCreateResponseBody.md
@@ -0,0 +1,59 @@
+# VoucherifySdk::ExportsCreateResponseBody
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ExportsCreateResponseBody.openapi_one_of
+# =>
+# [
+# :'ExportCustomerScheduled',
+# :'ExportOrderScheduled',
+# :'ExportPointsExpirationScheduled',
+# :'ExportPublicationScheduled',
+# :'ExportRedemptionScheduled',
+# :'ExportVoucherScheduled',
+# :'ExportVoucherTransactionsScheduled'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ExportsCreateResponseBody.build(data)
+# => #
+
+VoucherifySdk::ExportsCreateResponseBody.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `ExportCustomerScheduled`
+- `ExportOrderScheduled`
+- `ExportPointsExpirationScheduled`
+- `ExportPublicationScheduled`
+- `ExportRedemptionScheduled`
+- `ExportVoucherScheduled`
+- `ExportVoucherTransactionsScheduled`
+- `nil` (if no type matches)
+
diff --git a/docs/ExportsGetResponseBody.md b/docs/ExportsGetResponseBody.md
new file mode 100644
index 00000000..99f2fc70
--- /dev/null
+++ b/docs/ExportsGetResponseBody.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ExportsGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | [**ExportBaseResult**](ExportBaseResult.md) | | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'voucher_transactions'] |
+| **parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/ExportsListResponseBody.md b/docs/ExportsListResponseBody.md
new file mode 100644
index 00000000..fdd9830b
--- /dev/null
+++ b/docs/ExportsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ExportsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about exports. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of exports. | [default to 'exports'] |
+| **exports** | [**Array<Export>**](Export.md) | An array of export objects. | |
+| **total** | **Integer** | Total number of exports. | |
+
diff --git a/docs/FieldConditions.md b/docs/FieldConditions.md
new file mode 100644
index 00000000..b07f51d6
--- /dev/null
+++ b/docs/FieldConditions.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::FieldConditions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**FiltersCondition**](FiltersCondition.md) | | [optional] |
+
diff --git a/docs/FilterConditionsString.md b/docs/FilterConditionsString.md
new file mode 100644
index 00000000..f3a303e1
--- /dev/null
+++ b/docs/FilterConditionsString.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::FilterConditionsString
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **_in** | **Array<String>** | Array of resource values that should be included in the results. (multiple values) | [optional] |
+| **not_in** | **Array<String>** | Array of resource values that should be included in the results. (multiple values) | [optional] |
+| **is** | **String** | Value is exactly this value. (single value) | [optional] |
+| **is_not** | **String** | Results omit this value. (single value) | [optional] |
+| **has_value** | **String** | Value is NOT null. The value for this parameter is an empty string. | [optional] |
+| **is_unknown** | **String** | Value is null. The value for this parameter is an empty string. | [optional] |
+| **starts_with** | **String** | Value starts with the specified string. | [optional] |
+| **ends_with** | **String** | Value ends with the specified string. | [optional] |
+
diff --git a/docs/FiltersCondition.md b/docs/FiltersCondition.md
new file mode 100644
index 00000000..3f13f85a
--- /dev/null
+++ b/docs/FiltersCondition.md
@@ -0,0 +1,32 @@
+# VoucherifySdk::FiltersCondition
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **_in** | [**Any**](Any.md) | | [optional] |
+| **not_in** | [**Any**](Any.md) | | [optional] |
+| **is** | [**Any**](Any.md) | | [optional] |
+| **is_days_ago** | [**Any**](Any.md) | | [optional] |
+| **is_days_in_future** | [**Any**](Any.md) | | [optional] |
+| **is_not** | [**Any**](Any.md) | | [optional] |
+| **has_value** | [**Any**](Any.md) | | [optional] |
+| **is_unknown** | [**Any**](Any.md) | | [optional] |
+| **contains** | [**Any**](Any.md) | | [optional] |
+| **not_contain** | [**Any**](Any.md) | | [optional] |
+| **starts_with** | [**Any**](Any.md) | | [optional] |
+| **ends_with** | [**Any**](Any.md) | | [optional] |
+| **more_than** | [**Any**](Any.md) | | [optional] |
+| **less_than** | [**Any**](Any.md) | | [optional] |
+| **more_than_ago** | [**Any**](Any.md) | | [optional] |
+| **less_than_ago** | [**Any**](Any.md) | | [optional] |
+| **more_than_future** | [**Any**](Any.md) | | [optional] |
+| **less_than_future** | [**Any**](Any.md) | | [optional] |
+| **more_than_equal** | [**Any**](Any.md) | | [optional] |
+| **less_than_equal** | [**Any**](Any.md) | | [optional] |
+| **after** | [**Any**](Any.md) | | [optional] |
+| **before** | [**Any**](Any.md) | | [optional] |
+| **count** | [**Any**](Any.md) | | [optional] |
+| **count_less** | [**Any**](Any.md) | | [optional] |
+| **count_more** | [**Any**](Any.md) | | [optional] |
+
diff --git a/docs/Gift.md b/docs/Gift.md
new file mode 100644
index 00000000..b89a44d3
--- /dev/null
+++ b/docs/Gift.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::Gift
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **amount** | **Float** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | |
+| **balance** | **Float** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | |
+| **effect** | **String** | Defines how the credits are applied to the customer's order. | [optional] |
+
diff --git a/docs/GiftCampaignVoucher.md b/docs/GiftCampaignVoucher.md
new file mode 100644
index 00000000..16580c50
--- /dev/null
+++ b/docs/GiftCampaignVoucher.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::GiftCampaignVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Type of voucher. | [default to 'GIFT_VOUCHER'] |
+| **gift** | [**Gift**](Gift.md) | | |
+| **redemption** | [**CampaignLoyaltyVoucherRedemption**](CampaignLoyaltyVoucherRedemption.md) | | [optional] |
+| **code_config** | [**CodeConfig**](CodeConfig.md) | | [optional] |
+
diff --git a/docs/GiveawayCampaignVoucher.md b/docs/GiveawayCampaignVoucher.md
new file mode 100644
index 00000000..c1e92826
--- /dev/null
+++ b/docs/GiveawayCampaignVoucher.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::GiveawayCampaignVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Type of voucher. | [default to 'DISCOUNT_VOUCHER'] |
+| **discount** | [**Discount**](Discount.md) | | |
+| **code_config** | [**CodeConfig**](CodeConfig.md) | | [optional] |
+| **redemption** | [**CampaignLoyaltyVoucherRedemption**](CampaignLoyaltyVoucherRedemption.md) | | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] |
+
diff --git a/docs/InapplicableTo.md b/docs/InapplicableTo.md
new file mode 100644
index 00000000..78548a4d
--- /dev/null
+++ b/docs/InapplicableTo.md
@@ -0,0 +1,21 @@
+# VoucherifySdk::InapplicableTo
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | This object stores information about the product collection. | |
+| **id** | **String** | Unique product collection ID assigned by Voucherify. | |
+| **source_id** | **String** | The source ID from your inventory system. | [optional] |
+| **product_id** | **String** | Parent product's unique ID assigned by Voucherify. | [optional] |
+| **product_source_id** | **String** | Parent product's source ID from your inventory system. | [optional] |
+| **strict** | **Boolean** | | |
+| **price** | **Float** | New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price. | [optional] |
+| **price_formula** | **Float** | Formula used to calculate the discounted price of an item. | [optional] |
+| **effect** | [**ApplicableToEffect**](ApplicableToEffect.md) | | |
+| **quantity_limit** | **Integer** | The maximum number of units allowed to be discounted per order line item. | [optional] |
+| **aggregated_quantity_limit** | **Integer** | The maximum number of units allowed to be discounted combined across all matched order line items. | [optional] |
+| **amount_limit** | **Integer** | Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600. | [optional] |
+| **aggregated_amount_limit** | **Integer** | Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects: - `APPLY_TO_ITEMS` (each item subtotal is discounted equally) - `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value) | [optional] |
+| **order_item_indices** | **Array<Integer>** | | [optional] |
+
diff --git a/docs/InapplicableToResultList.md b/docs/InapplicableToResultList.md
new file mode 100644
index 00000000..96c69254
--- /dev/null
+++ b/docs/InapplicableToResultList.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::InapplicableToResultList
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **data** | [**Array<InapplicableTo>**](InapplicableTo.md) | Contains array of items to which the discount cannot apply. | |
+| **total** | **Integer** | Total number of objects defining included products, SKUs, or product collections. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'list'] |
+| **data_ref** | **String** | The type of object represented by JSON. | [default to 'data'] |
+
diff --git a/docs/Junction.md b/docs/Junction.md
new file mode 100644
index 00000000..9065115a
--- /dev/null
+++ b/docs/Junction.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::Junction
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ListPublicationsItemBase.md b/docs/ListPublicationsItemBase.md
new file mode 100644
index 00000000..6f00b716
--- /dev/null
+++ b/docs/ListPublicationsItemBase.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::ListPublicationsItemBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique publication ID, assigned by Voucherify. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the `publication`. | [default to 'publication'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the publication was created in ISO 8601 format. | |
+| **customer_id** | **String** | Unique customer ID of the customer receiving the publication. | |
+| **tracking_id** | **String** | Customer's `source_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. | |
+| **channel** | **String** | How the publication was originated. It can be your own custom channel or an example value provided here. | |
+| **source_id** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. | |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | |
+| **vouchers_id** | **Array<String>** | Contains the unique internal voucher ID that was assigned by Voucherify. | |
+
diff --git a/docs/ListPublicationsItemInvalid.md b/docs/ListPublicationsItemInvalid.md
new file mode 100644
index 00000000..9b17fd25
--- /dev/null
+++ b/docs/ListPublicationsItemInvalid.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::ListPublicationsItemInvalid
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique publication ID, assigned by Voucherify. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the `publication`. | [default to 'publication'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the publication was created in ISO 8601 format. | |
+| **customer_id** | **String** | Unique customer ID of the customer receiving the publication. | |
+| **tracking_id** | **String** | Customer's `source_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. | |
+| **channel** | **String** | How the publication was originated. It can be your own custom channel or an example value provided here. | |
+| **source_id** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. | |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | |
+| **vouchers_id** | **Array<String>** | Contains the unique internal voucher ID that was assigned by Voucherify. | |
+| **result** | **String** | Status of the publication attempt. | [default to 'FAILURE'] |
+| **failure_code** | **String** | Generic reason as to why the create publication operation failed. | [optional] |
+| **failure_message** | **String** | This parameter will provide more expanded reason as to why the create publication operation failed. | [optional] |
+
diff --git a/docs/ListPublicationsItemValidMultipleVouchers.md b/docs/ListPublicationsItemValidMultipleVouchers.md
new file mode 100644
index 00000000..7582ecc2
--- /dev/null
+++ b/docs/ListPublicationsItemValidMultipleVouchers.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::ListPublicationsItemValidMultipleVouchers
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique publication ID, assigned by Voucherify. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the `publication`. | [default to 'publication'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the publication was created in ISO 8601 format. | |
+| **customer_id** | **String** | Unique customer ID of the customer receiving the publication. | |
+| **tracking_id** | **String** | Customer's `source_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. | |
+| **channel** | **String** | How the publication was originated. It can be your own custom channel or an example value provided here. | |
+| **source_id** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. | |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | |
+| **vouchers_id** | **Array<String>** | Contains the unique internal voucher ID that was assigned by Voucherify. | |
+| **result** | **String** | Status of the publication attempt. | [default to 'SUCCESS'] |
+| **vouchers** | **Array<String>** | Contains the unique voucher codes that was assigned by Voucherify. | |
+
diff --git a/docs/ListPublicationsItemValidSingleVoucher.md b/docs/ListPublicationsItemValidSingleVoucher.md
new file mode 100644
index 00000000..2293f3ae
--- /dev/null
+++ b/docs/ListPublicationsItemValidSingleVoucher.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::ListPublicationsItemValidSingleVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique publication ID, assigned by Voucherify. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the `publication`. | [default to 'publication'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the publication was created in ISO 8601 format. | |
+| **customer_id** | **String** | Unique customer ID of the customer receiving the publication. | |
+| **tracking_id** | **String** | Customer's `source_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. | |
+| **channel** | **String** | How the publication was originated. It can be your own custom channel or an example value provided here. | |
+| **source_id** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. | |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | |
+| **vouchers_id** | **Array<String>** | Contains the unique internal voucher ID that was assigned by Voucherify. | |
+| **result** | **String** | Status of the publication attempt. | [default to 'SUCCESS'] |
+| **voucher** | [**ListPublicationsItemVoucher**](ListPublicationsItemVoucher.md) | | |
+
diff --git a/docs/ListPublicationsItemVoucher.md b/docs/ListPublicationsItemVoucher.md
new file mode 100644
index 00000000..6654a06c
--- /dev/null
+++ b/docs/ListPublicationsItemVoucher.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ListPublicationsItemVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | Voucher code. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'voucher'] |
+| **campaign** | **String** | Campaign name | |
+| **gift** | [**Gift**](Gift.md) | | [optional] |
+| **loyalty_card** | **Object** | Defines the loyalty card details. | [optional] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] |
+
diff --git a/docs/LoyaltiesApi.md b/docs/LoyaltiesApi.md
new file mode 100644
index 00000000..a09a0d81
--- /dev/null
+++ b/docs/LoyaltiesApi.md
@@ -0,0 +1,1643 @@
+# VoucherifySdk::LoyaltiesApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_in_bulk_loyalty_tiers**](LoyaltiesApi.md#create_in_bulk_loyalty_tiers) | **POST** /v1/loyalties/{campaignId}/tiers | Create loyalty tiers |
+| [**delete_earning_rule**](LoyaltiesApi.md#delete_earning_rule) | **DELETE** /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | Delete Earning Rule |
+| [**delete_loyalty_program**](LoyaltiesApi.md#delete_loyalty_program) | **DELETE** /v1/loyalties/{campaignId} | Delete Loyalty Campaign |
+| [**delete_reward_assignment1**](LoyaltiesApi.md#delete_reward_assignment1) | **DELETE** /v1/loyalties/{campaignId}/rewards/{assignmentId} | Delete Reward Assignment |
+| [**disable_earning_rule**](LoyaltiesApi.md#disable_earning_rule) | **POST** /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable | Disable Earning Rule |
+| [**enable_earning_rule**](LoyaltiesApi.md#enable_earning_rule) | **POST** /v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable | Enable Earning Rule |
+| [**export_loyalty_card_transactions**](LoyaltiesApi.md#export_loyalty_card_transactions) | **POST** /v1/loyalties/members/{memberId}/transactions/export | Export Loyalty Card Transactions |
+| [**export_loyalty_card_transactions1**](LoyaltiesApi.md#export_loyalty_card_transactions1) | **POST** /v1/loyalties/{campaignId}/members/{memberId}/transactions/export | Export Loyalty Card Transactions |
+| [**get_earning_rule**](LoyaltiesApi.md#get_earning_rule) | **GET** /v1/loyalties/{campaignId}/earning-rules/{earningRuleId} | Get Earning Rule |
+| [**get_loyalty_tier**](LoyaltiesApi.md#get_loyalty_tier) | **GET** /v1/loyalties/{campaignId}/tiers/{loyaltyTierId} | Get Loyalty Tier |
+| [**get_reward_assignment1**](LoyaltiesApi.md#get_reward_assignment1) | **GET** /v1/loyalties/{campaignId}/reward-assignments/{assignmentId} | Get Reward Assignment |
+| [**get_reward_assignment2**](LoyaltiesApi.md#get_reward_assignment2) | **GET** /v1/loyalties/{campaignId}/rewards/{assignmentId} | Get Reward Assignment |
+| [**get_reward_details**](LoyaltiesApi.md#get_reward_details) | **GET** /v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward | Get Reward Details |
+| [**list_loyalty_card_transactions**](LoyaltiesApi.md#list_loyalty_card_transactions) | **GET** /v1/loyalties/members/{memberId}/transactions | List Loyalty Card Transactions |
+| [**list_loyalty_card_transactions1**](LoyaltiesApi.md#list_loyalty_card_transactions1) | **GET** /v1/loyalties/{campaignId}/members/{memberId}/transactions | List Loyalty Card Transactions |
+| [**list_loyalty_tier_earning_rules**](LoyaltiesApi.md#list_loyalty_tier_earning_rules) | **GET** /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules | List Loyalty Tier Earning Rules |
+| [**list_loyalty_tier_rewards**](LoyaltiesApi.md#list_loyalty_tier_rewards) | **GET** /v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards | List Loyalty Tier Rewards |
+| [**list_loyalty_tiers**](LoyaltiesApi.md#list_loyalty_tiers) | **GET** /v1/loyalties/{campaignId}/tiers | List Loyalty Tiers |
+| [**list_member_loyalty_tier**](LoyaltiesApi.md#list_member_loyalty_tier) | **GET** /v1/loyalties/members/{memberId}/tiers | List Member's Loyalty Tiers |
+| [**list_member_rewards**](LoyaltiesApi.md#list_member_rewards) | **GET** /v1/loyalties/members/{memberId}/rewards | List Member Rewards |
+| [**list_points_expiration**](LoyaltiesApi.md#list_points_expiration) | **GET** /v1/loyalties/{campaignId}/members/{memberId}/points-expiration | Get Points Expiration |
+| [**redeem_reward**](LoyaltiesApi.md#redeem_reward) | **POST** /v1/loyalties/members/{memberId}/redemption | Redeem Reward |
+| [**redeem_reward1**](LoyaltiesApi.md#redeem_reward1) | **POST** /v1/loyalties/{campaignId}/members/{memberId}/redemption | Redeem Reward |
+| [**transfer_points**](LoyaltiesApi.md#transfer_points) | **POST** /v1/loyalties/{campaignId}/members/{memberId}/transfers | Transfer Loyalty Points |
+| [**update_loyalty_card_balance**](LoyaltiesApi.md#update_loyalty_card_balance) | **POST** /v1/loyalties/members/{memberId}/balance | Add or Remove Loyalty Card Balance |
+| [**update_loyalty_card_balance1**](LoyaltiesApi.md#update_loyalty_card_balance1) | **POST** /v1/loyalties/{campaignId}/members/{memberId}/balance | Add or Remove Loyalty Card Balance |
+
+
+## create_in_bulk_loyalty_tiers
+
+> > create_in_bulk_loyalty_tiers(campaign_id, opts)
+
+Create loyalty tiers
+
+Creates loyalty tiers for desired campaign.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | Unique loyalty campaign ID or name.
+opts = {
+ loyalties_tiers_create_in_bulk_request_body_item: [VoucherifySdk::LoyaltiesTiersCreateInBulkRequestBodyItem.new({name: 'name_example', points: VoucherifySdk::LoyaltyTierBasePoints.new})] # Array | Provide tier definitions you want to add to existing loyalty campaign.
+}
+
+begin
+ # Create loyalty tiers
+ result = api_instance.create_in_bulk_loyalty_tiers(campaign_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->create_in_bulk_loyalty_tiers: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique loyalty campaign ID or name. | |
+| **loyalties_tiers_create_in_bulk_request_body_item** | [**Array<LoyaltiesTiersCreateInBulkRequestBodyItem>**](LoyaltiesTiersCreateInBulkRequestBodyItem.md) | Provide tier definitions you want to add to existing loyalty campaign. | [optional] |
+
+### Return type
+
+[**Array<LoyaltyTier>**](LoyaltyTier.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## delete_earning_rule
+
+> delete_earning_rule(campaign_id, earning_rule_id)
+
+Delete Earning Rule
+
+This method deletes an earning rule for a specific loyalty campaign.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+earning_rule_id = 'earning_rule_id_example' # String | A unique earning rule ID.
+
+begin
+ # Delete Earning Rule
+ api_instance.delete_earning_rule(campaign_id, earning_rule_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->delete_earning_rule: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign. | |
+| **earning_rule_id** | **String** | A unique earning rule ID. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## delete_loyalty_program
+
+> delete_loyalty_program(campaign_id, opts)
+
+Delete Loyalty Campaign
+
+This method permanently deletes a loyalty campaign and all related loyalty cards. This action cannot be undone. Also, it immediately removes any redemptions on loyalty cards.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+opts = {
+ force: true # Boolean | If this flag is set to true, the campaign and related vouchers will be removed permanently. Going forward, the user will be able to create the next campaign with the same name.
+}
+
+begin
+ # Delete Loyalty Campaign
+ result = api_instance.delete_loyalty_program(campaign_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->delete_loyalty_program: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign. | |
+| **force** | **Boolean** | If this flag is set to true, the campaign and related vouchers will be removed permanently. Going forward, the user will be able to create the next campaign with the same name. | [optional] |
+
+### Return type
+
+[**LoyaltiesDeleteResponseBody**](LoyaltiesDeleteResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## delete_reward_assignment1
+
+> delete_reward_assignment1(campaign_id, assignment_id)
+
+Delete Reward Assignment
+
+This method deletes a reward assignment for a particular loyalty campaign.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+assignment_id = 'assignment_id_example' # String | A unique reward assignment ID.
+
+begin
+ # Delete Reward Assignment
+ api_instance.delete_reward_assignment1(campaign_id, assignment_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->delete_reward_assignment1: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign. | |
+| **assignment_id** | **String** | A unique reward assignment ID. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## disable_earning_rule
+
+> disable_earning_rule(campaign_id, earning_rule_id)
+
+Disable Earning Rule
+
+Disable an earning rule.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | Unique campaign ID or name.
+earning_rule_id = 'earning_rule_id_example' # String | Unique earning rule ID.
+
+begin
+ # Disable Earning Rule
+ result = api_instance.disable_earning_rule(campaign_id, earning_rule_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->disable_earning_rule: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique campaign ID or name. | |
+| **earning_rule_id** | **String** | Unique earning rule ID. | |
+
+### Return type
+
+[**LoyaltiesEarningRulesDisableResponseBody**](LoyaltiesEarningRulesDisableResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## enable_earning_rule
+
+> enable_earning_rule(campaign_id, earning_rule_id)
+
+Enable Earning Rule
+
+Enable an earning rule.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | Unique campaign ID or name.
+earning_rule_id = 'earning_rule_id_example' # String | Unique earning rule ID.
+
+begin
+ # Enable Earning Rule
+ result = api_instance.enable_earning_rule(campaign_id, earning_rule_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->enable_earning_rule: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique campaign ID or name. | |
+| **earning_rule_id** | **String** | Unique earning rule ID. | |
+
+### Return type
+
+[**LoyaltiesEarningRulesEnableResponseBody**](LoyaltiesEarningRulesEnableResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## export_loyalty_card_transactions
+
+> export_loyalty_card_transactions(member_id, opts)
+
+Export Loyalty Card Transactions
+
+Export transactions that are associated with point movements on a loyalty card.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+member_id = 'member_id_example' # String | A unique code identifying the loyalty card that you are looking to export transaction data for.
+opts = {
+ loyalties_members_transactions_export_create_request_body: VoucherifySdk::LoyaltiesMembersTransactionsExportCreateRequestBody.new # LoyaltiesMembersTransactionsExportCreateRequestBody | Specify the parameters and filters for the transaction export.
+}
+
+begin
+ # Export Loyalty Card Transactions
+ result = api_instance.export_loyalty_card_transactions(member_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->export_loyalty_card_transactions: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **member_id** | **String** | A unique code identifying the loyalty card that you are looking to export transaction data for. | |
+| **loyalties_members_transactions_export_create_request_body** | [**LoyaltiesMembersTransactionsExportCreateRequestBody**](LoyaltiesMembersTransactionsExportCreateRequestBody.md) | Specify the parameters and filters for the transaction export. | [optional] |
+
+### Return type
+
+[**LoyaltiesMembersTransactionsExportCreateResponseBody**](LoyaltiesMembersTransactionsExportCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## export_loyalty_card_transactions1
+
+> export_loyalty_card_transactions1(campaign_id, member_id, opts)
+
+Export Loyalty Card Transactions
+
+Export transactions that are associated with point movements on a loyalty card.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to export.
+member_id = 'member_id_example' # String | A unique code identifying the loyalty card that you are looking to export transaction data for.
+opts = {
+ loyalties_members_transactions_export_create_request_body: VoucherifySdk::LoyaltiesMembersTransactionsExportCreateRequestBody.new # LoyaltiesMembersTransactionsExportCreateRequestBody | Specify the parameters and filters for the transaction export.
+}
+
+begin
+ # Export Loyalty Card Transactions
+ result = api_instance.export_loyalty_card_transactions1(campaign_id, member_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->export_loyalty_card_transactions1: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to export. | |
+| **member_id** | **String** | A unique code identifying the loyalty card that you are looking to export transaction data for. | |
+| **loyalties_members_transactions_export_create_request_body** | [**LoyaltiesMembersTransactionsExportCreateRequestBody**](LoyaltiesMembersTransactionsExportCreateRequestBody.md) | Specify the parameters and filters for the transaction export. | [optional] |
+
+### Return type
+
+[**LoyaltiesMembersTransactionsExportCreateResponseBody**](LoyaltiesMembersTransactionsExportCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## get_earning_rule
+
+> get_earning_rule(campaign_id, earning_rule_id)
+
+Get Earning Rule
+
+Retrieves an earning rule assigned to a campaign.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+earning_rule_id = 'earning_rule_id_example' # String | A unique earning rule ID.
+
+begin
+ # Get Earning Rule
+ result = api_instance.get_earning_rule(campaign_id, earning_rule_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->get_earning_rule: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign. | |
+| **earning_rule_id** | **String** | A unique earning rule ID. | |
+
+### Return type
+
+[**LoyaltiesEarningRulesGetResponseBody**](LoyaltiesEarningRulesGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## get_loyalty_tier
+
+> get_loyalty_tier(campaign_id, loyalty_tier_id)
+
+Get Loyalty Tier
+
+Retrieve a loyalty tier from a loyalty campaign by the loyalty tier ID.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | Unique loyalty campaign ID or name.
+loyalty_tier_id = 'loyalty_tier_id_example' # String | Unique loyalty tier ID.
+
+begin
+ # Get Loyalty Tier
+ result = api_instance.get_loyalty_tier(campaign_id, loyalty_tier_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->get_loyalty_tier: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique loyalty campaign ID or name. | |
+| **loyalty_tier_id** | **String** | Unique loyalty tier ID. | |
+
+### Return type
+
+[**LoyaltiesTiersGetResponseBody**](LoyaltiesTiersGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## get_reward_assignment1
+
+> get_reward_assignment1(campaign_id, assignment_id)
+
+Get Reward Assignment
+
+Retrieve specific reward assignment.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+assignment_id = 'assignment_id_example' # String | Unique reward assignment ID.
+
+begin
+ # Get Reward Assignment
+ result = api_instance.get_reward_assignment1(campaign_id, assignment_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->get_reward_assignment1: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign. | |
+| **assignment_id** | **String** | Unique reward assignment ID. | |
+
+### Return type
+
+[**LoyaltiesRewardAssignmentsGetResponseBody**](LoyaltiesRewardAssignmentsGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## get_reward_assignment2
+
+> get_reward_assignment2(campaign_id, assignment_id)
+
+Get Reward Assignment
+
+Retrieve specific reward assignment. 📘 Alternative endpoint This endpoint is an alternative to this endpoint.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+assignment_id = 'assignment_id_example' # String | A unique reward assignment ID.
+
+begin
+ # Get Reward Assignment
+ result = api_instance.get_reward_assignment2(campaign_id, assignment_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->get_reward_assignment2: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign. | |
+| **assignment_id** | **String** | A unique reward assignment ID. | |
+
+### Return type
+
+[**LoyaltiesRewardsGetResponseBody**](LoyaltiesRewardsGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## get_reward_details
+
+> get_reward_details(campaign_id, assignment_id)
+
+Get Reward Details
+
+Get reward details in the context of a loyalty campaign and reward assignment ID.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+assignment_id = 'assignment_id_example' # String | Unique reward assignment ID.
+
+begin
+ # Get Reward Details
+ result = api_instance.get_reward_details(campaign_id, assignment_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->get_reward_details: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign. | |
+| **assignment_id** | **String** | Unique reward assignment ID. | |
+
+### Return type
+
+[**LoyaltiesRewardAssignmentsRewardGetResponseBody**](LoyaltiesRewardAssignmentsRewardGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_loyalty_card_transactions
+
+> list_loyalty_card_transactions(member_id, opts)
+
+List Loyalty Card Transactions
+
+Retrieve transaction data related to point movements for a specific loyalty card.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+member_id = 'member_id_example' # String | A unique code identifying the loyalty card that you are looking to retrieve transaction data for.
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56 # Integer | Which page of results to return.
+}
+
+begin
+ # List Loyalty Card Transactions
+ result = api_instance.list_loyalty_card_transactions(member_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->list_loyalty_card_transactions: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **member_id** | **String** | A unique code identifying the loyalty card that you are looking to retrieve transaction data for. | |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+
+### Return type
+
+[**LoyaltiesMembersTransactionsListResponseBody**](LoyaltiesMembersTransactionsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_loyalty_card_transactions1
+
+> list_loyalty_card_transactions1(campaign_id, member_id, opts)
+
+List Loyalty Card Transactions
+
+Retrieve transaction data related to point movements for a specific loyalty card.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to return.
+member_id = 'member_id_example' # String | A unique code identifying the loyalty card that you are looking to retrieve transaction data for.
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56 # Integer | Which page of results to return.
+}
+
+begin
+ # List Loyalty Card Transactions
+ result = api_instance.list_loyalty_card_transactions1(campaign_id, member_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->list_loyalty_card_transactions1: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to return. | |
+| **member_id** | **String** | A unique code identifying the loyalty card that you are looking to retrieve transaction data for. | |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+
+### Return type
+
+[**LoyaltiesMembersTransactionsListResponseBody**](LoyaltiesMembersTransactionsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_loyalty_tier_earning_rules
+
+> list_loyalty_tier_earning_rules(campaign_id, loyalty_tier_id, opts)
+
+List Loyalty Tier Earning Rules
+
+Retrieve available earning rules for a given tier and the calculation method for earning points.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | Unique campaign ID or name.
+loyalty_tier_id = 'loyalty_tier_id_example' # String | Unique loyalty tier ID.
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56 # Integer | Which page of results to return.
+}
+
+begin
+ # List Loyalty Tier Earning Rules
+ result = api_instance.list_loyalty_tier_earning_rules(campaign_id, loyalty_tier_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->list_loyalty_tier_earning_rules: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique campaign ID or name. | |
+| **loyalty_tier_id** | **String** | Unique loyalty tier ID. | |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+
+### Return type
+
+[**LoyaltiesTiersEarningRulesListResponseBody**](LoyaltiesTiersEarningRulesListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_loyalty_tier_rewards
+
+> list_loyalty_tier_rewards(campaign_id, loyalty_tier_id)
+
+List Loyalty Tier Rewards
+
+Get available rewards for a given tier.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | Unique campaign ID or name.
+loyalty_tier_id = 'loyalty_tier_id_example' # String | Unique loyalty tier ID.
+
+begin
+ # List Loyalty Tier Rewards
+ result = api_instance.list_loyalty_tier_rewards(campaign_id, loyalty_tier_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->list_loyalty_tier_rewards: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique campaign ID or name. | |
+| **loyalty_tier_id** | **String** | Unique loyalty tier ID. | |
+
+### Return type
+
+[**LoyaltiesTiersRewardsListResponseBody**](LoyaltiesTiersRewardsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_loyalty_tiers
+
+> list_loyalty_tiers(campaign_id, opts)
+
+List Loyalty Tiers
+
+Retrieve a list of loyalty tiers which were added to the loyalty program.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | Unique loyalty campaign ID or name.
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ order: VoucherifySdk::ParameterOrderListLoyaltyTiers::CREATED_AT # ParameterOrderListLoyaltyTiers | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+}
+
+begin
+ # List Loyalty Tiers
+ result = api_instance.list_loyalty_tiers(campaign_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->list_loyalty_tiers: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique loyalty campaign ID or name. | |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **order** | [**ParameterOrderListLoyaltyTiers**](.md) | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+
+### Return type
+
+[**LoyaltiesTiersListResponseBody**](LoyaltiesTiersListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_member_loyalty_tier
+
+> list_member_loyalty_tier(member_id)
+
+List Member's Loyalty Tiers
+
+Retrieve member tiers using the loyalty card ID.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+member_id = 'member_id_example' # String | Unique loyalty card assigned to a particular customer.
+
+begin
+ # List Member's Loyalty Tiers
+ result = api_instance.list_member_loyalty_tier(member_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->list_member_loyalty_tier: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **member_id** | **String** | Unique loyalty card assigned to a particular customer. | |
+
+### Return type
+
+[**LoyaltiesMembersTiersListResponseBody**](LoyaltiesMembersTiersListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_member_rewards
+
+> list_member_rewards(member_id, opts)
+
+List Member Rewards
+
+Retrieves the list of rewards that the given customer (identified by member_id, which is a loyalty card assigned to a particular customer) **can get in exchange for loyalty points**. You can use the affordable_only parameter to limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Please note that rewards that are disabled (i.e. set to Not Available in the Dashboard) for a given loyalty tier reward mapping will not be returned in this endpoint.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+member_id = 'member_id_example' # String | Unique loyalty card assigned to a particular customer.
+opts = {
+ affordable_only: true # Boolean | Limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Set this flag to true to return rewards which the customer can actually afford.
+}
+
+begin
+ # List Member Rewards
+ result = api_instance.list_member_rewards(member_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->list_member_rewards: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **member_id** | **String** | Unique loyalty card assigned to a particular customer. | |
+| **affordable_only** | **Boolean** | Limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Set this flag to true to return rewards which the customer can actually afford. | [optional] |
+
+### Return type
+
+[**LoyaltiesMembersRewardsListResponseBody**](LoyaltiesMembersRewardsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_points_expiration
+
+> list_points_expiration(campaign_id, member_id, opts)
+
+Get Points Expiration
+
+Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+member_id = 'member_id_example' # String | Loyalty card code.
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56 # Integer | Which page of results to return.
+}
+
+begin
+ # Get Points Expiration
+ result = api_instance.list_points_expiration(campaign_id, member_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->list_points_expiration: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign. | |
+| **member_id** | **String** | Loyalty card code. | |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+
+### Return type
+
+[**LoyaltiesMembersPointsExpirationListResponseBody**](LoyaltiesMembersPointsExpirationListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## redeem_reward
+
+> redeem_reward(member_id, opts)
+
+Redeem Reward
+
+ 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to allow you to redeem a reward without having to provide the campaignId as a path parameter.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+member_id = 'member_id_example' # String | Unique loyalty card assigned to a particular customer.
+opts = {
+ loyalties_members_redemption_redeem_request_body: VoucherifySdk::LoyaltiesMembersRedemptionRedeemRequestBody.new # LoyaltiesMembersRedemptionRedeemRequestBody | Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order.
+}
+
+begin
+ # Redeem Reward
+ result = api_instance.redeem_reward(member_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->redeem_reward: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **member_id** | **String** | Unique loyalty card assigned to a particular customer. | |
+| **loyalties_members_redemption_redeem_request_body** | [**LoyaltiesMembersRedemptionRedeemRequestBody**](LoyaltiesMembersRedemptionRedeemRequestBody.md) | Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order. | [optional] |
+
+### Return type
+
+[**LoyaltiesMembersRedemptionRedeemResponseBody**](LoyaltiesMembersRedemptionRedeemResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## redeem_reward1
+
+> redeem_reward1(campaign_id, member_id, opts)
+
+Redeem Reward
+
+Exchange points from a loyalty card for a specified reward. This API method returns an assigned award in the response. It means that if a requesting customer gets a coupon code with a discount for the next order, that discount code will be visible in response as part of the reward object definition.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | Unique campaign ID.
+member_id = 'member_id_example' # String | A code that identifies the loyalty card.
+opts = {
+ loyalties_members_redemption_redeem_request_body: VoucherifySdk::LoyaltiesMembersRedemptionRedeemRequestBody.new # LoyaltiesMembersRedemptionRedeemRequestBody | Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order.
+}
+
+begin
+ # Redeem Reward
+ result = api_instance.redeem_reward1(campaign_id, member_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->redeem_reward1: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique campaign ID. | |
+| **member_id** | **String** | A code that identifies the loyalty card. | |
+| **loyalties_members_redemption_redeem_request_body** | [**LoyaltiesMembersRedemptionRedeemRequestBody**](LoyaltiesMembersRedemptionRedeemRequestBody.md) | Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order. | [optional] |
+
+### Return type
+
+[**LoyaltiesMembersRedemptionRedeemResponseBody**](LoyaltiesMembersRedemptionRedeemResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## transfer_points
+
+> transfer_points(campaign_id, member_id, opts)
+
+Transfer Loyalty Points
+
+Transfer points between different loyalty cards. You need to provide the campaign ID and the loyalty card ID you want the points to be transferred to as path parameters in the URL. In the request body, you provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | A unique identifier of the loyalty campaign containing the voucher to which the loyalty points will be sent (destination).
+member_id = 'member_id_example' # String | A unique code identifying the loyalty card to which the user wants to transfer loyalty points (destination).
+opts = {
+ loyalties_transfer_points: [VoucherifySdk::LoyaltiesTransferPoints.new({code: 'code_example', points: 37, source_id: 'source_id_example'})] # Array | Provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.
+}
+
+begin
+ # Transfer Loyalty Points
+ result = api_instance.transfer_points(campaign_id, member_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->transfer_points: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | A unique identifier of the loyalty campaign containing the voucher to which the loyalty points will be sent (destination). | |
+| **member_id** | **String** | A unique code identifying the loyalty card to which the user wants to transfer loyalty points (destination). | |
+| **loyalties_transfer_points** | [**Array<LoyaltiesTransferPoints>**](LoyaltiesTransferPoints.md) | Provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card. | [optional] |
+
+### Return type
+
+[**LoyaltiesMembersTransfersCreateResponseBody**](LoyaltiesMembersTransfersCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## update_loyalty_card_balance
+
+> update_loyalty_card_balance(member_id, opts)
+
+Add or Remove Loyalty Card Balance
+
+This method gives adds or removes balance to an existing loyalty card. The removal of points will consume the points that expire the soonest. 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to allow you to add or remove loyalty card balance without having to provide the campaignId as a path parameter.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+member_id = 'member_id_example' # String | Unique loyalty card assigned to a particular customer.
+opts = {
+ loyalties_members_balance_update_request_body: VoucherifySdk::LoyaltiesMembersBalanceUpdateRequestBody.new({points: 37}) # LoyaltiesMembersBalanceUpdateRequestBody | Specify the point adjustment along with the expiration mechanism.
+}
+
+begin
+ # Add or Remove Loyalty Card Balance
+ result = api_instance.update_loyalty_card_balance(member_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->update_loyalty_card_balance: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **member_id** | **String** | Unique loyalty card assigned to a particular customer. | |
+| **loyalties_members_balance_update_request_body** | [**LoyaltiesMembersBalanceUpdateRequestBody**](LoyaltiesMembersBalanceUpdateRequestBody.md) | Specify the point adjustment along with the expiration mechanism. | [optional] |
+
+### Return type
+
+[**LoyaltiesMembersBalanceUpdateResponseBody**](LoyaltiesMembersBalanceUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## update_loyalty_card_balance1
+
+> update_loyalty_card_balance1(campaign_id, member_id, opts)
+
+Add or Remove Loyalty Card Balance
+
+This method adds or removes balance to an existing loyalty card. The removal of points will consume the points that expire the soonest.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::LoyaltiesApi.new
+campaign_id = 'campaign_id_example' # String | Unique campaign ID.
+member_id = 'member_id_example' # String | A code that identifies the loyalty card.
+opts = {
+ loyalties_members_balance_update_request_body: VoucherifySdk::LoyaltiesMembersBalanceUpdateRequestBody.new({points: 37}) # LoyaltiesMembersBalanceUpdateRequestBody | Specify the point adjustment along with the expiration mechanism.
+}
+
+begin
+ # Add or Remove Loyalty Card Balance
+ result = api_instance.update_loyalty_card_balance1(campaign_id, member_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling LoyaltiesApi->update_loyalty_card_balance1: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique campaign ID. | |
+| **member_id** | **String** | A code that identifies the loyalty card. | |
+| **loyalties_members_balance_update_request_body** | [**LoyaltiesMembersBalanceUpdateRequestBody**](LoyaltiesMembersBalanceUpdateRequestBody.md) | Specify the point adjustment along with the expiration mechanism. | [optional] |
+
+### Return type
+
+[**LoyaltiesMembersBalanceUpdateResponseBody**](LoyaltiesMembersBalanceUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/LoyaltiesDeleteResponseBody.md b/docs/LoyaltiesDeleteResponseBody.md
new file mode 100644
index 00000000..92e53353
--- /dev/null
+++ b/docs/LoyaltiesDeleteResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::LoyaltiesDeleteResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/LoyaltiesEarningRulesDisableResponseBody.md b/docs/LoyaltiesEarningRulesDisableResponseBody.md
new file mode 100644
index 00000000..f827b127
--- /dev/null
+++ b/docs/LoyaltiesEarningRulesDisableResponseBody.md
@@ -0,0 +1,23 @@
+# VoucherifySdk::LoyaltiesEarningRulesDisableResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the earning rule was created in ISO 8601 format. | |
+| **loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | |
+| **event** | [**EarningRuleEvent**](EarningRuleEvent.md) | | [optional] |
+| **custom_event** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | [optional] |
+| **segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | [optional] |
+| **source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | |
+| **object** | **String** | The type of object represented by JSON. Default is earning_rule. | [default to 'earning_rule'] |
+| **automation_id** | **String** | For internal use by Voucherify. | |
+| **start_date** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp in ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | [optional] |
+| **expiration_date** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp in ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | [optional] |
+| **validity_timeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | |
+| **active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. | [default to false] |
+
diff --git a/docs/LoyaltiesEarningRulesEnableResponseBody.md b/docs/LoyaltiesEarningRulesEnableResponseBody.md
new file mode 100644
index 00000000..a14ce143
--- /dev/null
+++ b/docs/LoyaltiesEarningRulesEnableResponseBody.md
@@ -0,0 +1,23 @@
+# VoucherifySdk::LoyaltiesEarningRulesEnableResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the earning rule was created in ISO 8601 format. | |
+| **loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | |
+| **event** | [**EarningRuleEvent**](EarningRuleEvent.md) | | [optional] |
+| **custom_event** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | [optional] |
+| **segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | [optional] |
+| **source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | |
+| **object** | **String** | The type of object represented by JSON. Default is earning_rule. | [default to 'earning_rule'] |
+| **automation_id** | **String** | For internal use by Voucherify. | |
+| **start_date** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp in ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | [optional] |
+| **expiration_date** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp in ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | [optional] |
+| **validity_timeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | |
+| **active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. | [default to true] |
+
diff --git a/docs/LoyaltiesEarningRulesGetResponseBody.md b/docs/LoyaltiesEarningRulesGetResponseBody.md
new file mode 100644
index 00000000..042cc4e7
--- /dev/null
+++ b/docs/LoyaltiesEarningRulesGetResponseBody.md
@@ -0,0 +1,24 @@
+# VoucherifySdk::LoyaltiesEarningRulesGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the earning rule object. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the earning rule was created in ISO 8601 format. | |
+| **loyalty** | [**EarningRuleBaseLoyalty**](EarningRuleBaseLoyalty.md) | | |
+| **event** | [**EarningRuleEvent**](EarningRuleEvent.md) | | [optional] |
+| **custom_event** | [**EarningRuleBaseCustomEvent**](EarningRuleBaseCustomEvent.md) | | [optional] |
+| **segment** | [**EarningRuleBaseSegment**](EarningRuleBaseSegment.md) | | [optional] |
+| **source** | [**EarningRuleBaseSource**](EarningRuleBaseSource.md) | | |
+| **object** | **String** | The type of object represented by JSON. Default is earning_rule. | [default to 'earning_rule'] |
+| **automation_id** | **String** | For internal use by Voucherify. | |
+| **start_date** | **String** | Start date defines when the earning rule starts to be active. Activation timestamp in ISO 8601 format. Earning rule is inactive before this date. If you don't define the start date for an earning rule, it'll inherit the campaign start date by default. | [optional] |
+| **expiration_date** | **String** | Expiration date defines when the earning rule expires. Expiration timestamp in ISO 8601 format. Earning rule is inactive after this date.If you don't define the expiration date for an earning rule, it'll inherit the campaign expiration date by default. | [optional] |
+| **validity_timeframe** | [**EarningRuleBaseValidityTimeframe**](EarningRuleBaseValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the earning rule is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the earning rule. A set of key/value pairs that you can attach to an earning rule object. It can be useful for storing additional information about the earning rule in a structured format. | |
+| **validation_rule_id** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the earning rule was last updated in ISO 8601 format. | |
+| **active** | **Boolean** | A flag to toggle the earning rule on or off. You can disable an earning rule even though it's within the active period defined by the start_date and expiration_date of the campaign or the earning rule's own start_date and expiration_date. - `true` indicates an active earning rule - `false` indicates an inactive earning rule | |
+
diff --git a/docs/LoyaltiesLoyaltyTierReward.md b/docs/LoyaltiesLoyaltyTierReward.md
new file mode 100644
index 00000000..3a07a199
--- /dev/null
+++ b/docs/LoyaltiesLoyaltyTierReward.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::LoyaltiesLoyaltyTierReward
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **reward** | [**Reward**](Reward.md) | | |
+| **assignment** | [**RewardAssignment**](RewardAssignment.md) | | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the loyalty tier reward. | [default to 'loyalty_tier_reward'] |
+
diff --git a/docs/LoyaltiesMembersBalanceUpdateRequestBody.md b/docs/LoyaltiesMembersBalanceUpdateRequestBody.md
new file mode 100644
index 00000000..56e7bed3
--- /dev/null
+++ b/docs/LoyaltiesMembersBalanceUpdateRequestBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::LoyaltiesMembersBalanceUpdateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | Incremental balance to be added to/subtracted from the loyalty card. - To add points: 100 - To subtract points, add a minus: -100 | |
+| **expiration_type** | [**PointsExpirationTypes**](PointsExpirationTypes.md) | | [optional] |
+| **expiration_date** | **Time** | Set expiration date for added points, i.e. `YYYY-MM-DD`. This parameter is required only when expiration_type is set to `CUSTOM_DATE`. | [optional] |
+| **reason** | **String** | Reason for the transfer. | [optional] |
+| **source_id** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. | [optional] |
+
diff --git a/docs/LoyaltiesMembersBalanceUpdateResponseBody.md b/docs/LoyaltiesMembersBalanceUpdateResponseBody.md
new file mode 100644
index 00000000..81833fa9
--- /dev/null
+++ b/docs/LoyaltiesMembersBalanceUpdateResponseBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::LoyaltiesMembersBalanceUpdateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | The incremental points removed or added to the current balance on the loyalty card. | |
+| **total** | **Integer** | The total of points accrued over the lifetime of the loyalty card. | |
+| **balance** | **Integer** | The balance after adding/removing points. | |
+| **type** | **String** | The type of voucher being modified. | |
+| **object** | **String** | The type of object represented by JSON. Default is balance. | [default to 'balance'] |
+| **related_object** | [**LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject**](LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md) | | |
+| **operation_type** | **String** | | [optional] |
+
diff --git a/docs/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md b/docs/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md
new file mode 100644
index 00000000..1889c089
--- /dev/null
+++ b/docs/LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::LoyaltiesMembersBalanceUpdateResponseBodyRelatedObject
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | The object being modified. | [default to 'voucher'] |
+| **id** | **String** | Identifies the loyalty card that is being modified, this is the ID that was assigned by the Voucherify API. | |
+
diff --git a/docs/LoyaltiesMembersPointsExpirationListResponseBody.md b/docs/LoyaltiesMembersPointsExpirationListResponseBody.md
new file mode 100644
index 00000000..c381b803
--- /dev/null
+++ b/docs/LoyaltiesMembersPointsExpirationListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltiesMembersPointsExpirationListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about loyalty points expiration buckets in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of loyalty points expiration bucket objects. | [default to 'data'] |
+| **data** | [**Array<LoyaltiesMembersPointsExpirationListResponseBodyDataItem>**](LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md) | Contains array of loyalty points expiration buckets. | |
+| **total** | **Integer** | Total number of point expiration buckets. | |
+
diff --git a/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md b/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md
new file mode 100644
index 00000000..9abaa3f8
--- /dev/null
+++ b/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItem.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::LoyaltiesMembersPointsExpirationListResponseBodyDataItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique loyalty points bucket ID. | |
+| **voucher_id** | **String** | Unique parent loyalty card ID. | |
+| **campaign_id** | **String** | Unique parent campaign ID. | |
+| **bucket** | [**LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket**](LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md) | | |
+| **created_at** | **Time** | Timestamp representing the date and time when the loyalty points bucket object was created in ISO 8601 format. | |
+| **status** | **String** | Loyalty points bucket point status. | |
+| **expires_at** | **Time** | Date when the number of points defined in the bucket object are due to expire. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the loyalty points bucket object was updated in ISO 8601 format. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the loyalty points bucket. | [default to 'loyalty_points_bucket'] |
+
diff --git a/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md b/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md
new file mode 100644
index 00000000..99c31f16
--- /dev/null
+++ b/docs/LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::LoyaltiesMembersPointsExpirationListResponseBodyDataItemBucket
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **total_points** | **Integer** | Total number of points in the loyalty points bucket. | |
+
diff --git a/docs/LoyaltiesMembersRedemptionRedeemRequestBody.md b/docs/LoyaltiesMembersRedemptionRedeemRequestBody.md
new file mode 100644
index 00000000..6e254693
--- /dev/null
+++ b/docs/LoyaltiesMembersRedemptionRedeemRequestBody.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::LoyaltiesMembersRedemptionRedeemRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **reward** | [**LoyaltiesMembersRedemptionRedeemRequestBodyReward**](LoyaltiesMembersRedemptionRedeemRequestBodyReward.md) | | [optional] |
+| **order** | [**Order**](Order.md) | | [optional] |
+| **metadata** | **Object** | A set of key/value pairs that you can send in the request body to check against vouchers requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the <!-- [Create Validation Rules](https://docs.voucherify.io/reference/create-validation-rules) -->[Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule). | [optional] |
+
diff --git a/docs/LoyaltiesMembersRedemptionRedeemRequestBodyReward.md b/docs/LoyaltiesMembersRedemptionRedeemRequestBodyReward.md
new file mode 100644
index 00000000..480db007
--- /dev/null
+++ b/docs/LoyaltiesMembersRedemptionRedeemRequestBodyReward.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::LoyaltiesMembersRedemptionRedeemRequestBodyReward
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward. | [optional] |
+| **points** | **Integer** | The number of loyalty points that the user wants to spend in order to fulfill the order. The number of points cannot be higher than the current balance on the loyalty card. | [optional] |
+
diff --git a/docs/LoyaltiesMembersRedemptionRedeemResponseBody.md b/docs/LoyaltiesMembersRedemptionRedeemResponseBody.md
new file mode 100644
index 00000000..f203e65b
--- /dev/null
+++ b/docs/LoyaltiesMembersRedemptionRedeemResponseBody.md
@@ -0,0 +1,30 @@
+# VoucherifySdk::LoyaltiesMembersRedemptionRedeemResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique redemption ID. | |
+| **object** | **String** | The type of object represented by the JSON | [default to 'redemption'] |
+| **date** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | |
+| **customer_id** | **String** | Unique customer ID of the redeeming customer. | |
+| **tracking_id** | **String** | Hashed customer source ID. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **redemption** | **String** | Unique redemption ID of the parent redemption. | |
+| **result** | **String** | Redemption result. | |
+| **status** | **String** | Redemption status. | |
+| **related_redemptions** | [**RedemptionRelatedRedemptions**](RedemptionRelatedRedemptions.md) | | [optional] |
+| **failure_code** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] |
+| **failure_message** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] |
+| **order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | |
+| **channel** | [**RedemptionChannel**](RedemptionChannel.md) | | |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | |
+| **related_object_type** | **String** | Defines the related object. | |
+| **related_object_id** | **String** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | |
+| **voucher** | [**Voucher**](Voucher.md) | | [optional] |
+| **promotion_tier** | [**PromotionTier**](PromotionTier.md) | | [optional] |
+| **reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | |
+| **gift** | [**RedemptionGift**](RedemptionGift.md) | | [optional] |
+| **loyalty_card** | [**RedemptionLoyaltyCard**](RedemptionLoyaltyCard.md) | | [optional] |
+
diff --git a/docs/LoyaltiesMembersRewardsListResponseBody.md b/docs/LoyaltiesMembersRewardsListResponseBody.md
new file mode 100644
index 00000000..8379eb28
--- /dev/null
+++ b/docs/LoyaltiesMembersRewardsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltiesMembersRewardsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of loyalty reward objects. | [default to 'data'] |
+| **data** | [**Array<LoyaltiesMembersRewardsListResponseBodyDataItem>**](LoyaltiesMembersRewardsListResponseBodyDataItem.md) | Contains array of loyalty reward objects. | |
+| **total** | **Integer** | Total number of loyalty reward objects. | |
+
diff --git a/docs/LoyaltiesMembersRewardsListResponseBodyDataItem.md b/docs/LoyaltiesMembersRewardsListResponseBodyDataItem.md
new file mode 100644
index 00000000..5b3394e4
--- /dev/null
+++ b/docs/LoyaltiesMembersRewardsListResponseBodyDataItem.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::LoyaltiesMembersRewardsListResponseBodyDataItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **reward** | [**Reward**](Reward.md) | | [optional] |
+| **assignment** | [**RewardAssignment**](RewardAssignment.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. | [optional][default to 'loyalty_reward'] |
+
diff --git a/docs/LoyaltiesMembersTiersListResponseBody.md b/docs/LoyaltiesMembersTiersListResponseBody.md
new file mode 100644
index 00000000..8f1b6c49
--- /dev/null
+++ b/docs/LoyaltiesMembersTiersListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltiesMembersTiersListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about loyalty tiers in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of loyalty tier objects. | [default to 'data'] |
+| **data** | [**Array<LoyaltyTier>**](LoyaltyTier.md) | | |
+| **total** | **Integer** | Total number of loyalty tier objects. | |
+
diff --git a/docs/LoyaltiesMembersTransactionsExportCreateRequestBody.md b/docs/LoyaltiesMembersTransactionsExportCreateRequestBody.md
new file mode 100644
index 00000000..b2f512ee
--- /dev/null
+++ b/docs/LoyaltiesMembersTransactionsExportCreateRequestBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::LoyaltiesMembersTransactionsExportCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md b/docs/LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md
new file mode 100644
index 00000000..783043d0
--- /dev/null
+++ b/docs/LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::LoyaltiesMembersTransactionsExportCreateRequestBodyParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **order** | [**ExportVoucherTransactionsOrder**](ExportVoucherTransactionsOrder.md) | | [optional] |
+| **fields** | [**Array<ExportVoucherTransactionsFields>**](ExportVoucherTransactionsFields.md) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] |
+| **filters** | [**ExportVoucherTransactionsFilters**](ExportVoucherTransactionsFilters.md) | | [optional] |
+
diff --git a/docs/LoyaltiesMembersTransactionsExportCreateResponseBody.md b/docs/LoyaltiesMembersTransactionsExportCreateResponseBody.md
new file mode 100644
index 00000000..1498ab4f
--- /dev/null
+++ b/docs/LoyaltiesMembersTransactionsExportCreateResponseBody.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::LoyaltiesMembersTransactionsExportCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | **Object** | Contains the URL of the CSV file. | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'voucher_transactions'] |
+| **parameters** | [**LoyaltiesMembersTransactionsExportCreateRequestBodyParameters**](LoyaltiesMembersTransactionsExportCreateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/LoyaltiesMembersTransactionsListResponseBody.md b/docs/LoyaltiesMembersTransactionsListResponseBody.md
new file mode 100644
index 00000000..00f39b6c
--- /dev/null
+++ b/docs/LoyaltiesMembersTransactionsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltiesMembersTransactionsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of transaction objects. | [default to 'data'] |
+| **data** | [**Array<LoyaltyCardTransaction>**](LoyaltyCardTransaction.md) | A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object. | |
+| **has_more** | **Boolean** | As query results are always limited (by the limit parameter), the has_more flag indicates whether there are more records for given filter parameters. This let's you know if you are able to run another request (with a different page or a different start date filter) to get more records returned in the results. | |
+
diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBody.md b/docs/LoyaltiesMembersTransfersCreateResponseBody.md
new file mode 100644
index 00000000..0b9b9923
--- /dev/null
+++ b/docs/LoyaltiesMembersTransfersCreateResponseBody.md
@@ -0,0 +1,30 @@
+# VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the voucher. | |
+| **code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | |
+| **campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] |
+| **campaign_id** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] |
+| **category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | |
+| **category_id** | **String** | Unique category ID assigned by Voucherify. | |
+| **categories** | [**Array<Category>**](Category.md) | | [optional] |
+| **type** | **String** | Defines the type of the voucher. | [default to 'LOYALTY_CARD'] |
+| **loyalty_card** | [**LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard**](LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md) | | |
+| **start_date** | **Time** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is inactive before this date. | |
+| **expiration_date** | **Time** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is inactive after this date. | |
+| **validity_timeframe** | [**LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe**](LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.md) | | |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | |
+| **publish** | [**LoyaltiesMembersTransfersCreateResponseBodyPublish**](LoyaltiesMembersTransfersCreateResponseBodyPublish.md) | | [optional] |
+| **redemption** | [**LoyaltiesMembersTransfersCreateResponseBodyRedemption**](LoyaltiesMembersTransfersCreateResponseBodyRedemption.md) | | [optional] |
+| **active** | **String** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the start_date and expiration_date. - `true` indicates an active voucher - `false` indicates an inactive voucher | |
+| **additional_info** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | |
+| **assets** | [**LoyaltiesMembersTransfersCreateResponseBodyAssets**](LoyaltiesMembersTransfersCreateResponseBodyAssets.md) | | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | |
+| **holder_id** | **String** | Unique customer ID of voucher owner. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] |
+| **created_at** | **Time** | | |
+
diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyAssets.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssets.md
new file mode 100644
index 00000000..a33442df
--- /dev/null
+++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssets.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyAssets
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **qr** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsQr**](LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md) | | [optional] |
+| **barcode** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode**](LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md) | | [optional] |
+
diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md
new file mode 100644
index 00000000..bf819ee7
--- /dev/null
+++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Encrypted voucher code ID. | [optional] |
+| **url** | **String** | URL to barcode *Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code. - `size`: integer value from `1` to `100` - `format`: string, either `png` (default) or `svg` | [optional] |
+
diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md
new file mode 100644
index 00000000..7e5c697d
--- /dev/null
+++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyAssetsQr
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Encrypted voucher code ID. | [optional] |
+| **url** | **String** | URL to QR code *Optional:* Attach query parameters to base URL to customize the image of the encrypted voucher code. - `size`: integer value from `1` to `100` - `format`: string, either `png` (default) or `svg` | [optional] |
+
diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md
new file mode 100644
index 00000000..087effaf
--- /dev/null
+++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyLoyaltyCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | Total points incurred over lifespan of loyalty card. | |
+| **balance** | **Integer** | Points available for reward redemption. | |
+| **next_expiration_date** | **String** | The next closest date when the next set of points are due to expire. | [optional] |
+| **next_expiration_points** | **Integer** | The amount of points that are set to expire next. | [optional] |
+
diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md
new file mode 100644
index 00000000..3f95b2fa
--- /dev/null
+++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyPublish.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyPublish
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute. | [default to 'list'] |
+| **count** | **Integer** | Publication events counter. | [optional] |
+| **entries** | **Array<String>** | | [optional] |
+| **url** | **String** | The endpoint where this list of publications can be accessed using a GET method. /v1/vouchers/{voucher_code}/publications | [optional] |
+
diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md
new file mode 100644
index 00000000..2ce5731a
--- /dev/null
+++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyRedemption.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyRedemption
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **quantity** | **Integer** | How many times a voucher can be redeemed. A null value means unlimited. | |
+| **redeemed_points** | **Integer** | Total loyalty points redeemed. | [optional] |
+| **redeemed_quantity** | **Integer** | How many times a voucher has already been redeemed. | [optional] |
+| **redemption_entries** | **Array<String>** | | [optional] |
+| **object** | **String** | The type of object represented is by default list. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional][default to 'list'] |
+| **url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. /v1/vouchers/{voucher_code}/redemptions | [optional] |
+
diff --git a/docs/LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.md b/docs/LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.md
new file mode 100644
index 00000000..76013cc4
--- /dev/null
+++ b/docs/LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::LoyaltiesMembersTransfersCreateResponseBodyValidityTimeframe
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **interval** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a duration of PT1H will be valid for a duration of one hour. | [optional] |
+| **duration** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an interval of P2D will be active every other day. | [optional] |
+
diff --git a/docs/LoyaltiesRewardAssignmentsGetResponseBody.md b/docs/LoyaltiesRewardAssignmentsGetResponseBody.md
new file mode 100644
index 00000000..18780e1e
--- /dev/null
+++ b/docs/LoyaltiesRewardAssignmentsGetResponseBody.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::LoyaltiesRewardAssignmentsGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward assignment ID, assigned by Voucherify. | |
+| **reward_id** | **String** | Associated reward ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the reward assignment was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the reward assignment was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the reward assignment. | [default to 'reward_assignment'] |
+| **related_object_id** | **String** | Related object ID to which the reward was assigned. | |
+| **related_object_type** | **String** | Related object type to which the reward was assigned. | [default to 'campaign'] |
+| **parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] |
+
diff --git a/docs/LoyaltiesRewardAssignmentsRewardGetResponseBody.md b/docs/LoyaltiesRewardAssignmentsRewardGetResponseBody.md
new file mode 100644
index 00000000..b1bafd5d
--- /dev/null
+++ b/docs/LoyaltiesRewardAssignmentsRewardGetResponseBody.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::LoyaltiesRewardAssignmentsRewardGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward ID, assigned by Voucherify. | |
+| **name** | **String** | Reward name. | |
+| **stock** | **Integer** | Configurable for **material rewards**. The number of units of the product that you want to share as reward. | |
+| **redeemed** | **Integer** | Defines the number of already invoked (successful) reward redemptions. | |
+| **attributes** | [**RewardAttributes**](RewardAttributes.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format. | |
+| **type** | **String** | Reward type. | |
+| **parameters** | [**RewardType**](RewardType.md) | | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the reward was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the reward was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the reward. | [default to 'reward'] |
+
diff --git a/docs/LoyaltiesRewardsGetResponseBody.md b/docs/LoyaltiesRewardsGetResponseBody.md
new file mode 100644
index 00000000..a58a0633
--- /dev/null
+++ b/docs/LoyaltiesRewardsGetResponseBody.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::LoyaltiesRewardsGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward assignment ID, assigned by Voucherify. | |
+| **reward_id** | **String** | Associated reward ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the reward assignment was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the reward assignment was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the reward assignment. | [default to 'reward_assignment'] |
+| **related_object_id** | **String** | Related object ID to which the reward was assigned. | |
+| **related_object_type** | **String** | Related object type to which the reward was assigned. | [default to 'campaign'] |
+| **parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] |
+
diff --git a/docs/LoyaltiesTiersCreateInBulkRequestBodyItem.md b/docs/LoyaltiesTiersCreateInBulkRequestBodyItem.md
new file mode 100644
index 00000000..0fb299d0
--- /dev/null
+++ b/docs/LoyaltiesTiersCreateInBulkRequestBodyItem.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::LoyaltiesTiersCreateInBulkRequestBodyItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Loyalty Tier name. | |
+| **earning_rules** | [**Hash<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | [optional] |
+| **rewards** | [**Hash<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | [optional] |
+| **points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format. | [optional] |
+
diff --git a/docs/LoyaltiesTiersEarningRulesListResponseBody.md b/docs/LoyaltiesTiersEarningRulesListResponseBody.md
new file mode 100644
index 00000000..b8056f83
--- /dev/null
+++ b/docs/LoyaltiesTiersEarningRulesListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltiesTiersEarningRulesListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about earning rules in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of earning rule objects. | [default to 'data'] |
+| **data** | [**Array<EarningRule>**](EarningRule.md) | Contains array of earning rule objects. | |
+| **total** | **Integer** | Total number of earning rule objects. | |
+
diff --git a/docs/LoyaltiesTiersGetResponseBody.md b/docs/LoyaltiesTiersGetResponseBody.md
new file mode 100644
index 00000000..94dc82c6
--- /dev/null
+++ b/docs/LoyaltiesTiersGetResponseBody.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::LoyaltiesTiersGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Loyalty Tier name. | |
+| **earning_rules** | [**Hash<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | [optional] |
+| **rewards** | [**Hash<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | [optional] |
+| **points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | |
+| **id** | **String** | Unique loyalty tier ID. | |
+| **campaign_id** | **String** | Unique parent campaign ID. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the loyalty tier was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the loyalty tier was updated in ISO 8601 format. | [optional] |
+| **config** | [**LoyaltyTierAllOfConfig**](LoyaltyTierAllOfConfig.md) | | |
+| **expiration** | [**LoyaltyTierExpiration**](LoyaltyTierExpiration.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the loyalty. | [default to 'loyalty_tier'] |
+
diff --git a/docs/LoyaltiesTiersListResponseBody.md b/docs/LoyaltiesTiersListResponseBody.md
new file mode 100644
index 00000000..7e9bc237
--- /dev/null
+++ b/docs/LoyaltiesTiersListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltiesTiersListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about loyalty tiers in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of loyalty tier objects. | [default to 'data'] |
+| **data** | [**Array<LoyaltyTier>**](LoyaltyTier.md) | This is an object representing a loyalty tier. Loyalty tiers are used to create a loyalty program with different levels of membership and varied earning rules and rewards based on customer’s tiers. | |
+| **total** | **Integer** | Total number of loyalty tier objects. | |
+
diff --git a/docs/LoyaltiesTiersRewardsListResponseBody.md b/docs/LoyaltiesTiersRewardsListResponseBody.md
new file mode 100644
index 00000000..73533312
--- /dev/null
+++ b/docs/LoyaltiesTiersRewardsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltiesTiersRewardsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about loyalty tier rewards in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of loyalty tier reward objects. | [default to 'data'] |
+| **data** | [**Array<LoyaltiesLoyaltyTierReward>**](LoyaltiesLoyaltyTierReward.md) | Contains array of loyalty tier reward objects. | |
+| **total** | **Integer** | Total number of loyalty tier reward objects. | |
+
diff --git a/docs/LoyaltiesTransferPoints.md b/docs/LoyaltiesTransferPoints.md
new file mode 100644
index 00000000..1562fe74
--- /dev/null
+++ b/docs/LoyaltiesTransferPoints.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltiesTransferPoints
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | Unique loyalty card code from which the user wants to transfer loyalty points (source). | |
+| **points** | **Integer** | The number of loyalty points that the user wants to transfer to another loyalty card. The number of points cannot be higher than the current balance on the loyalty card (source). | |
+| **reason** | **String** | Reason for the transfer. | [optional] |
+| **source_id** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. | |
+
diff --git a/docs/LoyaltyCardTransaction.md b/docs/LoyaltyCardTransaction.md
new file mode 100644
index 00000000..dc8dcab8
--- /dev/null
+++ b/docs/LoyaltyCardTransaction.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::LoyaltyCardTransaction
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique transaction ID. | |
+| **source_id** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. In case of a redemption, this value is null. | |
+| **voucher_id** | **String** | Unique voucher ID. | |
+| **campaign_id** | **String** | Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes. | |
+| **source** | **String** | The channel through which the transaction took place, whether through the API or the the Dashboard. In case of a redemption, this value is null. | |
+| **reason** | **String** | Reason why the transaction occurred. In case of a redemption, this value is null. | |
+| **type** | [**LoyaltyCardTransactionsType**](LoyaltyCardTransactionsType.md) | | |
+| **details** | [**VoucherTransactionDetails**](VoucherTransactionDetails.md) | | |
+| **related_transaction_id** | **String** | The related transaction ID on the receiving card. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the transaction was created in ISO 8601 format. | |
+
diff --git a/docs/LoyaltyCardTransactionsType.md b/docs/LoyaltyCardTransactionsType.md
new file mode 100644
index 00000000..54ea3d26
--- /dev/null
+++ b/docs/LoyaltyCardTransactionsType.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::LoyaltyCardTransactionsType
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/LoyaltyTier.md b/docs/LoyaltyTier.md
new file mode 100644
index 00000000..b10af6ec
--- /dev/null
+++ b/docs/LoyaltyTier.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::LoyaltyTier
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Loyalty Tier name. | |
+| **earning_rules** | [**Hash<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | [optional] |
+| **rewards** | [**Hash<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | [optional] |
+| **points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | |
+| **id** | **String** | Unique loyalty tier ID. | |
+| **campaign_id** | **String** | Unique parent campaign ID. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the loyalty tier. A set of key/value pairs that you can attach to a loyalty tier object. It can be useful for storing additional information about the loyalty tier in a structured format. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the loyalty tier was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the loyalty tier was updated in ISO 8601 format. | [optional] |
+| **config** | [**LoyaltyTierAllOfConfig**](LoyaltyTierAllOfConfig.md) | | |
+| **expiration** | [**LoyaltyTierExpiration**](LoyaltyTierExpiration.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the loyalty. | [default to 'loyalty_tier'] |
+
diff --git a/docs/LoyaltyTierAllOfConfig.md b/docs/LoyaltyTierAllOfConfig.md
new file mode 100644
index 00000000..9bdea992
--- /dev/null
+++ b/docs/LoyaltyTierAllOfConfig.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::LoyaltyTierAllOfConfig
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | [**LoyaltyTierAllOfConfigPoints**](LoyaltyTierAllOfConfigPoints.md) | | |
+
diff --git a/docs/LoyaltyTierAllOfConfigPoints.md b/docs/LoyaltyTierAllOfConfigPoints.md
new file mode 100644
index 00000000..1848a12b
--- /dev/null
+++ b/docs/LoyaltyTierAllOfConfigPoints.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::LoyaltyTierAllOfConfigPoints
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **from** | **Integer** | Bottom points threshold value. | [optional] |
+| **to** | **Integer** | Top points threshold value. | [optional] |
+
diff --git a/docs/LoyaltyTierBase.md b/docs/LoyaltyTierBase.md
new file mode 100644
index 00000000..3420eaee
--- /dev/null
+++ b/docs/LoyaltyTierBase.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltyTierBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Loyalty Tier name. | |
+| **earning_rules** | [**Hash<String, MappingPoints>**](MappingPoints.md) | Contains a list of earning rule IDs and their points mapping for the given earning rule. | [optional] |
+| **rewards** | [**Hash<String, MappingPoints>**](MappingPoints.md) | Contains a list of reward IDs and their points mapping for the given reward. | [optional] |
+| **points** | [**LoyaltyTierBasePoints**](LoyaltyTierBasePoints.md) | | |
+
diff --git a/docs/LoyaltyTierBasePoints.md b/docs/LoyaltyTierBasePoints.md
new file mode 100644
index 00000000..5d4e8c7a
--- /dev/null
+++ b/docs/LoyaltyTierBasePoints.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::LoyaltyTierBasePoints
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **from** | **Integer** | Bottom points threshold value. | [optional] |
+| **to** | **Integer** | Top points threshold value. | [optional] |
+
diff --git a/docs/LoyaltyTierExpiration.md b/docs/LoyaltyTierExpiration.md
new file mode 100644
index 00000000..7e63f5f6
--- /dev/null
+++ b/docs/LoyaltyTierExpiration.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::LoyaltyTierExpiration
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | |
+| **campaign_id** | **String** | Unique campaign ID, assigned by Voucherify. | |
+| **tier_id** | **String** | Unique tier ID, assigned by Voucherify. | |
+| **start_date** | **String** | Activation timestamp defines when the loyalty tier starts to be active in ISO 8601 format. Loyalty tier is inactive before this date. | [optional] |
+| **expiration_date** | **String** | Expiration timestamp defines when the loyalty tier expires in ISO 8601 format. Loyalty tier is inactive after this date. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the loyalty tier was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the loyalty tier was updated in ISO 8601 format. | [optional] |
+
diff --git a/docs/LoyaltyTiersExpirationAll.md b/docs/LoyaltyTiersExpirationAll.md
new file mode 100644
index 00000000..2a1c0d0d
--- /dev/null
+++ b/docs/LoyaltyTiersExpirationAll.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltyTiersExpirationAll
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **qualification_type** | **String** | Tier qualification. `BALANCE`: Points balance is based on the customer's current points balance. Customers qualify for the tier if their points balance is in the points range of the tier. `POINTS_IN_PERIOD`: A customer qualifies for the tier only if the sum of the accumulated points in a **defined time interval** reaches the tier threshold. | |
+| **qualification_period** | **String** | Customers can qualify for the tier if they collected enough points in a given time period. So, in addition to the customer having to reach a points range, they also need to have collected the points within a set time period. | **Period** | **Definition** | |:---|:---| | **Calendar Month** | Points collected in one calendar month<br>January, February, March, etc. | | **Calendar Quarter** | Points collected in the quarter<br>- January - March<br>- April - June<br>- July - September<br>- October - December | | **Calendar Half-year** | Points collected in the half-year<br>- January - June<br>- July - December | | **Calendar Year** | Points collected in one calendar year<br>January - December | | [optional] |
+| **start_date** | [**LoyaltyTiersExpirationAllStartDate**](LoyaltyTiersExpirationAllStartDate.md) | | |
+| **expiration_date** | [**LoyaltyTiersExpirationAllExpirationDate**](LoyaltyTiersExpirationAllExpirationDate.md) | | |
+
diff --git a/docs/LoyaltyTiersExpirationAllExpirationDate.md b/docs/LoyaltyTiersExpirationAllExpirationDate.md
new file mode 100644
index 00000000..8194f87a
--- /dev/null
+++ b/docs/LoyaltyTiersExpirationAllExpirationDate.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::LoyaltyTiersExpirationAllExpirationDate
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | What triggers the tier to expire for a customer. `END_OF_PERIOD`: Expire tier at the end of the period. `END_OF_NEXT_PERIOD`: Expire tier at the end of the next period. `BALANCE_DROP`: Tier expires when the points balance drops below the required range of the tier. `CUSTOM`: Tier expires after a certain time period passes following the instance the points balance drops below the required range of the tier. | |
+| **extend** | **String** | Extend the expiration by adding extra months or days in ISO 8601 format. The tier will remain active even though it reaches its expiration time period. For example, a tier with a duration of `P3M` will be valid for an additional duration of 3 months and a tier with a duration of `P1D` will be valid for an additional duration of 1 day. | |
+| **rounding** | [**LoyaltyTiersExpirationAllExpirationDateRounding**](LoyaltyTiersExpirationAllExpirationDateRounding.md) | | [optional] |
+
diff --git a/docs/LoyaltyTiersExpirationAllExpirationDateRounding.md b/docs/LoyaltyTiersExpirationAllExpirationDateRounding.md
new file mode 100644
index 00000000..533280a2
--- /dev/null
+++ b/docs/LoyaltyTiersExpirationAllExpirationDateRounding.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::LoyaltyTiersExpirationAllExpirationDateRounding
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | This mechanism describes a custom rounding for the expiration date. | [optional] |
+| **strategy** | **String** | This mechanism describes a rounding strategy for the expiration date. | [optional] |
+| **unit** | **String** | Defines the type of unit of time in which the rounding period is counted. | [optional][default to 'MONTH'] |
+| **value** | **Integer** | Value for the unit of time that the rounding applies to. Units for this parameter are defined by the `rounding.unit` parameter. - `0`: January - `1`: February - `2`: March - `3`: April - `4`: May - `5`: June - `6`: July - `7`: August - `8`: September - `9`: October - `10`: November - `11`: December | [optional] |
+
diff --git a/docs/LoyaltyTiersExpirationAllStartDate.md b/docs/LoyaltyTiersExpirationAllStartDate.md
new file mode 100644
index 00000000..54758b0b
--- /dev/null
+++ b/docs/LoyaltyTiersExpirationAllStartDate.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::LoyaltyTiersExpirationAllStartDate
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | What triggers the tier to be valid for a customer. `IMMEDIATE`: After reaching the minimum required points. `NEXT_PERIOD`: When the next qualification period starts. | |
+
diff --git a/docs/LuckyDraw.md b/docs/LuckyDraw.md
new file mode 100644
index 00000000..589f11bc
--- /dev/null
+++ b/docs/LuckyDraw.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::LuckyDraw
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **winners_count** | **String** | It represents the total number of winners in a lucky draw. | [optional] |
+| **unique_winners_per_draw** | **String** | It indicates whether each winner in a draw is unique or not. | [optional] |
+| **unique_winners** | **String** | Specifies whether each participant can win only once across multiple draws. | [optional] |
+
diff --git a/docs/MappingFixed.md b/docs/MappingFixed.md
new file mode 100644
index 00000000..8414ebf9
--- /dev/null
+++ b/docs/MappingFixed.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::MappingFixed
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Type of calculation. | [optional][default to 'CUSTOM'] |
+| **points** | **Integer** | Fixed number of points to be applied. | [optional] |
+
diff --git a/docs/MappingMultiply.md b/docs/MappingMultiply.md
new file mode 100644
index 00000000..0522c401
--- /dev/null
+++ b/docs/MappingMultiply.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::MappingMultiply
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Type of calculation. | [optional][default to 'MULTIPLY'] |
+| **multiplier** | **Float** | Multiplication factor used to multiply the points to obtain the mapped points. | [optional] |
+
diff --git a/docs/MappingPoints.md b/docs/MappingPoints.md
new file mode 100644
index 00000000..7643e432
--- /dev/null
+++ b/docs/MappingPoints.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::MappingPoints
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::MappingPoints.openapi_one_of
+# =>
+# [
+# :'MappingFixed',
+# :'MappingMultiply'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::MappingPoints.build(data)
+# => #
+
+VoucherifySdk::MappingPoints.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `MappingFixed`
+- `MappingMultiply`
+- `nil` (if no type matches)
+
diff --git a/docs/Order.md b/docs/Order.md
new file mode 100644
index 00000000..ca6015e3
--- /dev/null
+++ b/docs/Order.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::Order
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **status** | **String** | The order status. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **items** | [**Array<OrderItem>**](OrderItem.md) | Array of items applied to the order. | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | [optional] |
+| **referrer** | [**Referrer**](Referrer.md) | | [optional] |
+| **referrer_id** | **String** | Unique referrer ID. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+| **id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] |
+| **source_id** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] |
+
diff --git a/docs/OrderBase.md b/docs/OrderBase.md
new file mode 100644
index 00000000..2a4a3491
--- /dev/null
+++ b/docs/OrderBase.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::OrderBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **status** | **String** | The order status. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **items** | [**Array<OrderItem>**](OrderItem.md) | Array of items applied to the order. | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | [optional] |
+| **referrer** | [**Referrer**](Referrer.md) | | [optional] |
+| **referrer_id** | **String** | Unique referrer ID. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+
diff --git a/docs/OrderCalculated.md b/docs/OrderCalculated.md
new file mode 100644
index 00000000..52eb5c35
--- /dev/null
+++ b/docs/OrderCalculated.md
@@ -0,0 +1,29 @@
+# VoucherifySdk::OrderCalculated
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] |
+| **source_id** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the order was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] |
+| **status** | **String** | The order status. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **items_discount_amount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] |
+| **total_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] |
+| **total_amount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] |
+| **applied_discount_amount** | **Integer** | This field shows the order-level discount applied. | [optional] |
+| **items_applied_discount_amount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] |
+| **total_applied_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] |
+| **items** | [**Array<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | |
+| **referrer_id** | **String** | Unique referrer ID. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'order'] |
+| **redemptions** | [**Hash<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] |
+| **customer** | [**OrderCalculatedCustomer**](OrderCalculatedCustomer.md) | | [optional] |
+| **referrer** | [**OrderCalculatedReferrer**](OrderCalculatedReferrer.md) | | [optional] |
+
diff --git a/docs/OrderCalculatedBase.md b/docs/OrderCalculatedBase.md
new file mode 100644
index 00000000..f854c271
--- /dev/null
+++ b/docs/OrderCalculatedBase.md
@@ -0,0 +1,27 @@
+# VoucherifySdk::OrderCalculatedBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] |
+| **source_id** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the order was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] |
+| **status** | **String** | The order status. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **items_discount_amount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] |
+| **total_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] |
+| **total_amount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] |
+| **applied_discount_amount** | **Integer** | This field shows the order-level discount applied. | [optional] |
+| **items_applied_discount_amount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] |
+| **total_applied_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] |
+| **items** | [**Array<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | |
+| **referrer_id** | **String** | Unique referrer ID. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'order'] |
+| **redemptions** | [**Hash<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] |
+
diff --git a/docs/OrderCalculatedCustomer.md b/docs/OrderCalculatedCustomer.md
new file mode 100644
index 00000000..246db826
--- /dev/null
+++ b/docs/OrderCalculatedCustomer.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::OrderCalculatedCustomer
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::OrderCalculatedCustomer.openapi_one_of
+# =>
+# [
+# :'CustomerId',
+# :'CustomerWithSummaryLoyaltyReferrals'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::OrderCalculatedCustomer.build(data)
+# => #
+
+VoucherifySdk::OrderCalculatedCustomer.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `CustomerId`
+- `CustomerWithSummaryLoyaltyReferrals`
+- `nil` (if no type matches)
+
diff --git a/docs/OrderCalculatedNoCustomerData.md b/docs/OrderCalculatedNoCustomerData.md
new file mode 100644
index 00000000..d5f1af7c
--- /dev/null
+++ b/docs/OrderCalculatedNoCustomerData.md
@@ -0,0 +1,29 @@
+# VoucherifySdk::OrderCalculatedNoCustomerData
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] |
+| **source_id** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the order was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] |
+| **status** | **String** | The order status. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **items_discount_amount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] |
+| **total_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] |
+| **total_amount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] |
+| **applied_discount_amount** | **Integer** | This field shows the order-level discount applied. | [optional] |
+| **items_applied_discount_amount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] |
+| **total_applied_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] |
+| **items** | [**Array<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | |
+| **referrer_id** | **String** | Unique referrer ID. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'order'] |
+| **redemptions** | [**Hash<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] |
+| **customer** | [**CustomerId**](CustomerId.md) | | [optional] |
+| **referrer** | [**ReferrerId**](ReferrerId.md) | | [optional] |
+
diff --git a/docs/OrderCalculatedReferrer.md b/docs/OrderCalculatedReferrer.md
new file mode 100644
index 00000000..e1b1095c
--- /dev/null
+++ b/docs/OrderCalculatedReferrer.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::OrderCalculatedReferrer
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::OrderCalculatedReferrer.openapi_one_of
+# =>
+# [
+# :'ReferrerId',
+# :'ReferrerWithSummaryLoyaltyReferrals'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::OrderCalculatedReferrer.build(data)
+# => #
+
+VoucherifySdk::OrderCalculatedReferrer.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `ReferrerId`
+- `ReferrerWithSummaryLoyaltyReferrals`
+- `nil` (if no type matches)
+
diff --git a/docs/OrderItem.md b/docs/OrderItem.md
new file mode 100644
index 00000000..afecf1c1
--- /dev/null
+++ b/docs/OrderItem.md
@@ -0,0 +1,21 @@
+# VoucherifySdk::OrderItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **sku_id** | **String** | A unique SKU ID assigned by Voucherify. | [optional] |
+| **product_id** | **String** | A unique product ID assigned by Voucherify. | [optional] |
+| **related_object** | **String** | Used along with the source_id property, can be set to either sku or product. | [optional] |
+| **source_id** | **String** | The merchant’s product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service. | [optional] |
+| **quantity** | **Integer** | The quantity of the particular item in the cart. | [optional] |
+| **discount_quantity** | **Integer** | Number of dicounted items. | [optional] |
+| **initial_quantity** | **Integer** | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity. | [optional] |
+| **amount** | **Integer** | The total amount of the order item (price * quantity). | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-item-level discounts applied to the order. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **price** | **Integer** | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] |
+| **product** | [**OrderItemProduct**](OrderItemProduct.md) | | [optional] |
+| **sku** | [**OrderItemSku**](OrderItemSku.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. | [optional] |
+
diff --git a/docs/OrderItemCalculated.md b/docs/OrderItemCalculated.md
new file mode 100644
index 00000000..2a5e5852
--- /dev/null
+++ b/docs/OrderItemCalculated.md
@@ -0,0 +1,25 @@
+# VoucherifySdk::OrderItemCalculated
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **sku_id** | **String** | A unique SKU ID assigned by Voucherify. | [optional] |
+| **product_id** | **String** | A unique product ID assigned by Voucherify. | [optional] |
+| **related_object** | **String** | Used along with the source_id property, can be set to either sku or product. | [optional] |
+| **source_id** | **String** | The merchant’s product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service. | [optional] |
+| **quantity** | **Integer** | The quantity of the particular item in the cart. | [optional] |
+| **discount_quantity** | **Integer** | Number of dicounted items. | [optional] |
+| **initial_quantity** | **Integer** | A positive integer in the smallest unit quantity representing the total amount of the order; this is the sum of the order items' quantity. | [optional] |
+| **amount** | **Integer** | The total amount of the order item (price * quantity). | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-item-level discounts applied to the order. | [optional] |
+| **applied_discount_amount** | **Integer** | This field shows the order-level discount applied. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **total_applied_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] |
+| **price** | **Integer** | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] |
+| **subtotal_amount** | **Integer** | Final order item amount after the applied item-level discount. If there are no item-level discounts applied, this item is equal to the `amount`. `subtotal_amount`=`amount`-`applied_discount_amount` | [optional] |
+| **product** | [**OrderItemProduct**](OrderItemProduct.md) | | [optional] |
+| **sku** | [**OrderItemSku**](OrderItemSku.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. | [default to 'order_item'] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an SKU. It can be useful for storing additional information about the SKU in a structured format. | [optional] |
+
diff --git a/docs/OrderItemProduct.md b/docs/OrderItemProduct.md
new file mode 100644
index 00000000..0fb40bf6
--- /dev/null
+++ b/docs/OrderItemProduct.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::OrderItemProduct
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier that represents the product and is assigned by Voucherify. | [optional] |
+| **source_id** | **String** | The merchant’s product ID (if it is different than Voucherify's product ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. | [optional] |
+| **override** | **Boolean** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. | [optional] |
+| **name** | **String** | Product name. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a product. It can be useful for storing additional information about the product in a structured format. | [optional] |
+| **price** | **Float** | Product price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). | [optional] |
+
diff --git a/docs/OrderItemSku.md b/docs/OrderItemSku.md
new file mode 100644
index 00000000..e0052426
--- /dev/null
+++ b/docs/OrderItemSku.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::OrderItemSku
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | [optional] |
+| **source_id** | **String** | The merchant’s SKU ID (if it is different than Voucherify's SKU ID). It is really useful in case of integration between multiple systems. It can be an ID from an eCommerce site, a database or a 3rd party service. | [optional] |
+| **override** | **Boolean** | The override set to `true` is used to store the product information in the system. If the product does not exist, it will be created with a source_id; if it does exist, the provided values for the name, price, and metadata will replace those already stored in the system. | [optional] |
+| **sku** | **String** | The SKU name. | [optional] |
+| **price** | **Float** | SKU price. A positive integer in the smallest currency unit (e.g. 100 cents for $1.00). | [optional] |
+
diff --git a/docs/OrderRedemptions.md b/docs/OrderRedemptions.md
new file mode 100644
index 00000000..b49da7f2
--- /dev/null
+++ b/docs/OrderRedemptions.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::OrderRedemptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **date** | **Time** | Timestamp representing the date and time when the redemption was created in ISO 8601 format. | [optional] |
+| **rollback_id** | **String** | Unique ID of the redemption rollback. | [optional] |
+| **rollback_date** | **Time** | Timestamp representing the date and tiem when the redemption rollback was created in ISO 8601 format. | [optional] |
+| **related_object_type** | **String** | The source of the incentive. | [optional][default to 'redemption'] |
+| **related_object_id** | **String** | Unique ID of the parent redemption. | [optional] |
+| **related_object_parent_id** | **String** | Represent's the campaign ID of the voucher if the redemption was based on a voucher that was part of bulk codes generated within a campaign. In case of a promotion tier, this represents the campaign ID of the promotion tier's parent campaign. | [optional] |
+| **stacked** | **Array<String>** | Contains a list of unique IDs of child redemptions, which belong to the stacked incentives. | [optional] |
+| **rollback_stacked** | **Array<String>** | Lists the rollback redemption IDs of the particular child redemptions. | [optional] |
+
diff --git a/docs/OrdersApi.md b/docs/OrdersApi.md
new file mode 100644
index 00000000..f1f8d46f
--- /dev/null
+++ b/docs/OrdersApi.md
@@ -0,0 +1,377 @@
+# VoucherifySdk::OrdersApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_order**](OrdersApi.md#create_order) | **POST** /v1/orders | Create Order |
+| [**create_order_export**](OrdersApi.md#create_order_export) | **POST** /v1/orders/export | Create Orders Export |
+| [**get_order**](OrdersApi.md#get_order) | **GET** /v1/orders/{orderId} | Get Order |
+| [**import_orders**](OrdersApi.md#import_orders) | **POST** /v1/orders/import | Import Orders |
+| [**list_orders**](OrdersApi.md#list_orders) | **GET** /v1/orders | List Orders |
+| [**update_order**](OrdersApi.md#update_order) | **PUT** /v1/orders/{orderId} | Update Order |
+
+
+## create_order
+
+> create_order(opts)
+
+Create Order
+
+Creates an order object and triggers an order creation event. 📘 Upsert Mode If you pass an id or a source_id that already exists in the order database, Voucherify will return a related order object with updated fields.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::OrdersApi.new
+opts = {
+ orders_create_request_body: VoucherifySdk::OrdersCreateRequestBody.new # OrdersCreateRequestBody | Specify the order parameters.
+}
+
+begin
+ # Create Order
+ result = api_instance.create_order(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling OrdersApi->create_order: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **orders_create_request_body** | [**OrdersCreateRequestBody**](OrdersCreateRequestBody.md) | Specify the order parameters. | [optional] |
+
+### Return type
+
+[**OrdersCreateResponseBody**](OrdersCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## create_order_export
+
+> create_order_export(opts)
+
+Create Orders Export
+
+Creates a downloadable CSV file containing a list of orders. The parameters listed in the payload resembles headers in the CSV file. To include a parameter to the file, add it to the parameters.fields object in the request body. The available filters are all order object attributes. Additionally, any metadata defined in the metadata schema can be exported. Passing an empty JSON will generate a file containing three default fields: id, source_id, and status. The fields array is an array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::OrdersApi.new
+opts = {
+ orders_export_create_request_body: VoucherifySdk::OrdersExportCreateRequestBody.new # OrdersExportCreateRequestBody | Specify which order parameters you would like to export.
+}
+
+begin
+ # Create Orders Export
+ result = api_instance.create_order_export(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling OrdersApi->create_order_export: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **orders_export_create_request_body** | [**OrdersExportCreateRequestBody**](OrdersExportCreateRequestBody.md) | Specify which order parameters you would like to export. | [optional] |
+
+### Return type
+
+[**OrdersExportCreateResponseBody**](OrdersExportCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## get_order
+
+> get_order(order_id)
+
+Get Order
+
+Retrieve an order.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::OrdersApi.new
+order_id = 'order_id_example' # String | Unique Voucherify order ID or order source ID.
+
+begin
+ # Get Order
+ result = api_instance.get_order(order_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling OrdersApi->get_order: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **order_id** | **String** | Unique Voucherify order ID or order source ID. | |
+
+### Return type
+
+[**OrdersGetResponseBody**](OrdersGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## import_orders
+
+> import_orders(opts)
+
+Import Orders
+
+ 🚧 Historical orders This endpoint should only be used to import historical orders into Voucherify. For on-going synchronization, the create order and update order endpoints should be used. This is critical because this endpoint does not store events or launch distributions. # Limitations ## Import volume There can be only a single on-going order import per tenant per project at a given time. The user can schedule more imports but those extra imports will be scheduled to run in sequence one by one. ## Maximum count of orders in single import There is a 2000 limit but we might decide to change it to a lower / higher value at any given time depending if we find this value is too high or too low with time. # Notifications There are no notifications on the Dashboard because this import is launched via the API. # Triggered actions If you import orders with customers, then a logic will be scheduled responsible for placing these customers into segments and refreshing the segments summary. Consequently, this update will trigger - **customers entering into segments** - **distributions** based on any rules tied to customer entering segment(s) - **earning rules** based on the customer entering segment(s) # What is not triggered 1. No webhooks are triggered during the import of orders - for both orders and upserted products / skus. 2. Distributions based on Order Update, Order Paid, Order Created and Order Cancelled. In other words if you have a distribution based on Order Paid and you import an order with a PAID status, the distribution is not going to be triggered. 3. No events are created during the import of orders - for both orders and upserted products / skus. In other words you wont see any events in the Activity tab in the Dashboard such as Order created or Order paid. If you are additionally upserting products / skus, then you wont see the Product created events listed, etc. 4. Earning rules based on Order Paid wont be triggered. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::OrdersApi.new
+opts = {
+ orders_import_create_request_body_item: [VoucherifySdk::OrdersImportCreateRequestBodyItem.new] # Array | The request body is sent in the form of an array of order objects.
+}
+
+begin
+ # Import Orders
+ result = api_instance.import_orders(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling OrdersApi->import_orders: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **orders_import_create_request_body_item** | [**Array<OrdersImportCreateRequestBodyItem>**](OrdersImportCreateRequestBodyItem.md) | The request body is sent in the form of an array of order objects. | [optional] |
+
+### Return type
+
+[**OrdersImportCreateResponseBody**](OrdersImportCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## list_orders
+
+> list_orders(opts)
+
+List Orders
+
+Returns a list of orders.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::OrdersApi.new
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ order: VoucherifySdk::ParameterOrderListOrders::CREATED_AT # ParameterOrderListOrders | This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+}
+
+begin
+ # List Orders
+ result = api_instance.list_orders(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling OrdersApi->list_orders: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **order** | [**ParameterOrderListOrders**](.md) | This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+
+### Return type
+
+[**OrdersListResponseBody**](OrdersListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## update_order
+
+> update_order(order_id, opts)
+
+Update Order
+
+Updates the specified order by setting the values of the parameters passed in the request body. Any parameters not provided will be left unchanged.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::OrdersApi.new
+order_id = 'order_id_example' # String | Unique Voucherify order ID or order source ID.
+opts = {
+ orders_update_request_body: VoucherifySdk::OrdersUpdateRequestBody.new # OrdersUpdateRequestBody | Specify the parameters of the order that are to be updated.
+}
+
+begin
+ # Update Order
+ result = api_instance.update_order(order_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling OrdersApi->update_order: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **order_id** | **String** | Unique Voucherify order ID or order source ID. | |
+| **orders_update_request_body** | [**OrdersUpdateRequestBody**](OrdersUpdateRequestBody.md) | Specify the parameters of the order that are to be updated. | [optional] |
+
+### Return type
+
+[**OrdersUpdateResponseBody**](OrdersUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/OrdersCreateRequestBody.md b/docs/OrdersCreateRequestBody.md
new file mode 100644
index 00000000..cd9a4906
--- /dev/null
+++ b/docs/OrdersCreateRequestBody.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::OrdersCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] |
+| **source_id** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] |
+| **status** | **String** | The order status. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **items** | [**Array<OrderItem>**](OrderItem.md) | Array of items applied to the order. | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | [optional] |
+| **referrer** | [**Referrer**](Referrer.md) | | [optional] |
+| **referrer_id** | **String** | Unique referrer ID. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+
diff --git a/docs/OrdersCreateResponseBody.md b/docs/OrdersCreateResponseBody.md
new file mode 100644
index 00000000..bed08297
--- /dev/null
+++ b/docs/OrdersCreateResponseBody.md
@@ -0,0 +1,29 @@
+# VoucherifySdk::OrdersCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] |
+| **source_id** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the order was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] |
+| **status** | **String** | The order status. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **items_discount_amount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] |
+| **total_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] |
+| **total_amount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] |
+| **applied_discount_amount** | **Integer** | This field shows the order-level discount applied. | [optional] |
+| **items_applied_discount_amount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] |
+| **total_applied_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] |
+| **items** | [**Array<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | |
+| **referrer_id** | **String** | Unique referrer ID. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'order'] |
+| **redemptions** | [**Hash<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] |
+| **customer** | [**OrderCalculatedCustomer**](OrderCalculatedCustomer.md) | | [optional] |
+| **referrer** | [**OrderCalculatedReferrer**](OrderCalculatedReferrer.md) | | [optional] |
+
diff --git a/docs/OrdersExportCreateRequestBody.md b/docs/OrdersExportCreateRequestBody.md
new file mode 100644
index 00000000..61b9a337
--- /dev/null
+++ b/docs/OrdersExportCreateRequestBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::OrdersExportCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **parameters** | [**OrdersExportCreateRequestBodyParameters**](OrdersExportCreateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/OrdersExportCreateRequestBodyParameters.md b/docs/OrdersExportCreateRequestBodyParameters.md
new file mode 100644
index 00000000..d9bf6133
--- /dev/null
+++ b/docs/OrdersExportCreateRequestBodyParameters.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::OrdersExportCreateRequestBodyParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **order** | [**ExportOrderOrder**](ExportOrderOrder.md) | | [optional] |
+| **fields** | [**Array<ExportOrderFields>**](ExportOrderFields.md) | Array of strings containing the data in the export. These fields define the headers in the CSV file. | [optional] |
+| **filters** | **Object** | Allowed additional properties must start with \"metadata.\" | [optional] |
+
diff --git a/docs/OrdersExportCreateResponseBody.md b/docs/OrdersExportCreateResponseBody.md
new file mode 100644
index 00000000..7770238a
--- /dev/null
+++ b/docs/OrdersExportCreateResponseBody.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::OrdersExportCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the export. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [optional] |
+| **result** | **Object** | Contains the URL of the CSV file. | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the channel value is WEBSITE. | |
+| **exported_object** | **String** | The type of object to be exported. | [default to 'order'] |
+| **parameters** | [**OrdersExportCreateRequestBodyParameters**](OrdersExportCreateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/OrdersGetResponseBody.md b/docs/OrdersGetResponseBody.md
new file mode 100644
index 00000000..fd3d1788
--- /dev/null
+++ b/docs/OrdersGetResponseBody.md
@@ -0,0 +1,29 @@
+# VoucherifySdk::OrdersGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] |
+| **source_id** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the order was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] |
+| **status** | **String** | The order status. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **items_discount_amount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] |
+| **total_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] |
+| **total_amount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] |
+| **applied_discount_amount** | **Integer** | This field shows the order-level discount applied. | [optional] |
+| **items_applied_discount_amount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] |
+| **total_applied_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] |
+| **items** | [**Array<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | |
+| **referrer_id** | **String** | Unique referrer ID. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'order'] |
+| **redemptions** | [**Hash<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] |
+| **customer** | [**CustomerId**](CustomerId.md) | | [optional] |
+| **referrer** | [**ReferrerId**](ReferrerId.md) | | [optional] |
+
diff --git a/docs/OrdersImportCreateRequestBodyItem.md b/docs/OrdersImportCreateRequestBodyItem.md
new file mode 100644
index 00000000..7d1bcb4f
--- /dev/null
+++ b/docs/OrdersImportCreateRequestBodyItem.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::OrdersImportCreateRequestBodyItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **status** | **String** | The order status. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **items** | [**Array<OrderItem>**](OrderItem.md) | Array of items applied to the order. | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | [optional] |
+| **referrer** | [**Referrer**](Referrer.md) | | [optional] |
+| **referrer_id** | **String** | Unique referrer ID. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+| **source_id** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] |
+
diff --git a/docs/OrdersImportCreateResponseBody.md b/docs/OrdersImportCreateResponseBody.md
new file mode 100644
index 00000000..6bc775a3
--- /dev/null
+++ b/docs/OrdersImportCreateResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::OrdersImportCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/OrdersListResponseBody.md b/docs/OrdersListResponseBody.md
new file mode 100644
index 00000000..37a32af9
--- /dev/null
+++ b/docs/OrdersListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::OrdersListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about orders in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of order objects. | [default to 'orders'] |
+| **orders** | [**Array<OrderCalculatedNoCustomerData>**](OrderCalculatedNoCustomerData.md) | Contains array of order objects. | |
+| **total** | **Integer** | Total number of orders. | |
+
diff --git a/docs/OrdersUpdateRequestBody.md b/docs/OrdersUpdateRequestBody.md
new file mode 100644
index 00000000..b2c1c1f5
--- /dev/null
+++ b/docs/OrdersUpdateRequestBody.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::OrdersUpdateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **status** | **String** | The order status. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **items** | [**Array<OrderItem>**](OrderItem.md) | Array of items applied to the order. | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | [optional] |
+| **referrer** | [**Referrer**](Referrer.md) | | [optional] |
+| **referrer_id** | **String** | Unique referrer ID. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+
diff --git a/docs/OrdersUpdateResponseBody.md b/docs/OrdersUpdateResponseBody.md
new file mode 100644
index 00000000..681671d2
--- /dev/null
+++ b/docs/OrdersUpdateResponseBody.md
@@ -0,0 +1,29 @@
+# VoucherifySdk::OrdersUpdateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] |
+| **source_id** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the order was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the order was last updated in ISO 8601 format. | [optional] |
+| **status** | **String** | The order status. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **initial_amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **items_discount_amount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] |
+| **total_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] |
+| **total_amount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] |
+| **applied_discount_amount** | **Integer** | This field shows the order-level discount applied. | [optional] |
+| **items_applied_discount_amount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] |
+| **total_applied_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] |
+| **items** | [**Array<OrderItemCalculated>**](OrderItemCalculated.md) | Array of items applied to the order. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | |
+| **referrer_id** | **String** | Unique referrer ID. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'order'] |
+| **redemptions** | [**Hash<String, OrderRedemptions>**](OrderRedemptions.md) | | [optional] |
+| **customer** | [**OrderCalculatedCustomer**](OrderCalculatedCustomer.md) | | [optional] |
+| **referrer** | [**OrderCalculatedReferrer**](OrderCalculatedReferrer.md) | | [optional] |
+
diff --git a/docs/ParameterCampaignType.md b/docs/ParameterCampaignType.md
new file mode 100644
index 00000000..d066d7a6
--- /dev/null
+++ b/docs/ParameterCampaignType.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterCampaignType
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterCreatedBeforeAfter.md b/docs/ParameterCreatedBeforeAfter.md
new file mode 100644
index 00000000..8927678f
--- /dev/null
+++ b/docs/ParameterCreatedBeforeAfter.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterCreatedBeforeAfter
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **before** | **Time** | Timestamp representing the date and time before the voucher was created in ISO 8601 format. | [optional] |
+| **after** | **Time** | Timestamp representing the date and time after the voucher was created in ISO 8601 format. | [optional] |
+
diff --git a/docs/ParameterExpandListCampaigns.md b/docs/ParameterExpandListCampaigns.md
new file mode 100644
index 00000000..6264013f
--- /dev/null
+++ b/docs/ParameterExpandListCampaigns.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterExpandListCampaigns
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterFiltersListRedemptions.md b/docs/ParameterFiltersListRedemptions.md
new file mode 100644
index 00000000..c8efb349
--- /dev/null
+++ b/docs/ParameterFiltersListRedemptions.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::ParameterFiltersListRedemptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **voucher_code** | [**ParameterFiltersListRedemptionsVoucherCode**](ParameterFiltersListRedemptionsVoucherCode.md) | | [optional] |
+| **related_object_id** | [**ParameterFiltersListRedemptionsRelatedObjectId**](ParameterFiltersListRedemptionsRelatedObjectId.md) | | [optional] |
+| **related_object_parent_id** | [**ParameterFiltersListRedemptionsRelatedObjectParentId**](ParameterFiltersListRedemptionsRelatedObjectParentId.md) | | [optional] |
+| **parent_redemption_id** | [**ParameterFiltersListRedemptionsParentRedemptionId**](ParameterFiltersListRedemptionsParentRedemptionId.md) | | [optional] |
+| **failure_code** | [**ParameterFiltersListRedemptionsFailureCode**](ParameterFiltersListRedemptionsFailureCode.md) | | [optional] |
+| **result** | [**ParameterFiltersListRedemptionsResult**](ParameterFiltersListRedemptionsResult.md) | | [optional] |
+| **object** | [**ParameterFiltersListRedemptionsObject**](ParameterFiltersListRedemptionsObject.md) | | [optional] |
+| **customer_id** | [**ParameterFiltersListRedemptionsCustomerId**](ParameterFiltersListRedemptionsCustomerId.md) | | [optional] |
+| **campaign_name** | [**ParameterFiltersListRedemptionsCampaignName**](ParameterFiltersListRedemptionsCampaignName.md) | | [optional] |
+| **user_login** | [**ParameterFiltersListRedemptionsUserLogin**](ParameterFiltersListRedemptionsUserLogin.md) | | [optional] |
+
diff --git a/docs/ParameterFiltersListRedemptionsCampaignName.md b/docs/ParameterFiltersListRedemptionsCampaignName.md
new file mode 100644
index 00000000..b4a97f62
--- /dev/null
+++ b/docs/ParameterFiltersListRedemptionsCampaignName.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterFiltersListRedemptionsCampaignName
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+
diff --git a/docs/ParameterFiltersListRedemptionsCustomerId.md b/docs/ParameterFiltersListRedemptionsCustomerId.md
new file mode 100644
index 00000000..fe0f6c08
--- /dev/null
+++ b/docs/ParameterFiltersListRedemptionsCustomerId.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterFiltersListRedemptionsCustomerId
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+
diff --git a/docs/ParameterFiltersListRedemptionsFailureCode.md b/docs/ParameterFiltersListRedemptionsFailureCode.md
new file mode 100644
index 00000000..152fed1e
--- /dev/null
+++ b/docs/ParameterFiltersListRedemptionsFailureCode.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterFiltersListRedemptionsFailureCode
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+
diff --git a/docs/ParameterFiltersListRedemptionsObject.md b/docs/ParameterFiltersListRedemptionsObject.md
new file mode 100644
index 00000000..eee296fa
--- /dev/null
+++ b/docs/ParameterFiltersListRedemptionsObject.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterFiltersListRedemptionsObject
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+
diff --git a/docs/ParameterFiltersListRedemptionsParentRedemptionId.md b/docs/ParameterFiltersListRedemptionsParentRedemptionId.md
new file mode 100644
index 00000000..d5bba7da
--- /dev/null
+++ b/docs/ParameterFiltersListRedemptionsParentRedemptionId.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterFiltersListRedemptionsParentRedemptionId
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+
diff --git a/docs/ParameterFiltersListRedemptionsRelatedObjectId.md b/docs/ParameterFiltersListRedemptionsRelatedObjectId.md
new file mode 100644
index 00000000..7ba481c5
--- /dev/null
+++ b/docs/ParameterFiltersListRedemptionsRelatedObjectId.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterFiltersListRedemptionsRelatedObjectId
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+
diff --git a/docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md b/docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md
new file mode 100644
index 00000000..7296ad9d
--- /dev/null
+++ b/docs/ParameterFiltersListRedemptionsRelatedObjectParentId.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterFiltersListRedemptionsRelatedObjectParentId
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+
diff --git a/docs/ParameterFiltersListRedemptionsResult.md b/docs/ParameterFiltersListRedemptionsResult.md
new file mode 100644
index 00000000..fc0bbf26
--- /dev/null
+++ b/docs/ParameterFiltersListRedemptionsResult.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterFiltersListRedemptionsResult
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+
diff --git a/docs/ParameterFiltersListRedemptionsUserLogin.md b/docs/ParameterFiltersListRedemptionsUserLogin.md
new file mode 100644
index 00000000..136e95da
--- /dev/null
+++ b/docs/ParameterFiltersListRedemptionsUserLogin.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterFiltersListRedemptionsUserLogin
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+
diff --git a/docs/ParameterFiltersListRedemptionsVoucherCode.md b/docs/ParameterFiltersListRedemptionsVoucherCode.md
new file mode 100644
index 00000000..484f7918
--- /dev/null
+++ b/docs/ParameterFiltersListRedemptionsVoucherCode.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterFiltersListRedemptionsVoucherCode
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**FilterConditionsString**](FilterConditionsString.md) | | [optional] |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+
diff --git a/docs/ParameterOrder.md b/docs/ParameterOrder.md
new file mode 100644
index 00000000..4d6385a3
--- /dev/null
+++ b/docs/ParameterOrder.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterOrderListAllPromotionStacks.md b/docs/ParameterOrderListAllPromotionStacks.md
new file mode 100644
index 00000000..b76e4a12
--- /dev/null
+++ b/docs/ParameterOrderListAllPromotionStacks.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterOrderListAllPromotionStacks
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterOrderListCampaigns.md b/docs/ParameterOrderListCampaigns.md
new file mode 100644
index 00000000..a888fef1
--- /dev/null
+++ b/docs/ParameterOrderListCampaigns.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterOrderListCampaigns
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterOrderListCustomers.md b/docs/ParameterOrderListCustomers.md
new file mode 100644
index 00000000..7c1f4e6b
--- /dev/null
+++ b/docs/ParameterOrderListCustomers.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterOrderListCustomers
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterOrderListExports.md b/docs/ParameterOrderListExports.md
new file mode 100644
index 00000000..c5964028
--- /dev/null
+++ b/docs/ParameterOrderListExports.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterOrderListExports
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterOrderListLoyaltyTiers.md b/docs/ParameterOrderListLoyaltyTiers.md
new file mode 100644
index 00000000..f0c82da4
--- /dev/null
+++ b/docs/ParameterOrderListLoyaltyTiers.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterOrderListLoyaltyTiers
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterOrderListOrders.md b/docs/ParameterOrderListOrders.md
new file mode 100644
index 00000000..b1b09a9f
--- /dev/null
+++ b/docs/ParameterOrderListOrders.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterOrderListOrders
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterOrderListPublications.md b/docs/ParameterOrderListPublications.md
new file mode 100644
index 00000000..5de2a50c
--- /dev/null
+++ b/docs/ParameterOrderListPublications.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterOrderListPublications
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterOrderListRedemptions.md b/docs/ParameterOrderListRedemptions.md
new file mode 100644
index 00000000..c15c1f73
--- /dev/null
+++ b/docs/ParameterOrderListRedemptions.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterOrderListRedemptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterOrderListValidationRuleAssignments.md b/docs/ParameterOrderListValidationRuleAssignments.md
new file mode 100644
index 00000000..dba033d5
--- /dev/null
+++ b/docs/ParameterOrderListValidationRuleAssignments.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterOrderListValidationRuleAssignments
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterOrderListValidationRules.md b/docs/ParameterOrderListValidationRules.md
new file mode 100644
index 00000000..4cbf9681
--- /dev/null
+++ b/docs/ParameterOrderListValidationRules.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterOrderListValidationRules
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterResultListPublications.md b/docs/ParameterResultListPublications.md
new file mode 100644
index 00000000..4b2fb72b
--- /dev/null
+++ b/docs/ParameterResultListPublications.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterResultListPublications
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/ParameterUpdatedBeforeAfter.md b/docs/ParameterUpdatedBeforeAfter.md
new file mode 100644
index 00000000..0c3c45a5
--- /dev/null
+++ b/docs/ParameterUpdatedBeforeAfter.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ParameterUpdatedBeforeAfter
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **before** | **Time** | Timestamp representing the date and time before the voucher was updated in ISO 8601 format. | [optional] |
+| **after** | **Time** | Timestamp representing the date and time after the voucher was updated in ISO 8601 format. | [optional] |
+
diff --git a/docs/ParameterVoucherTypeListPublications.md b/docs/ParameterVoucherTypeListPublications.md
new file mode 100644
index 00000000..301ac5c8
--- /dev/null
+++ b/docs/ParameterVoucherTypeListPublications.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ParameterVoucherTypeListPublications
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/PointsExpirationTypes.md b/docs/PointsExpirationTypes.md
new file mode 100644
index 00000000..54ab2e38
--- /dev/null
+++ b/docs/PointsExpirationTypes.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::PointsExpirationTypes
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/Product.md b/docs/Product.md
new file mode 100644
index 00000000..acc0d332
--- /dev/null
+++ b/docs/Product.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::Product
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique product ID assigned by Voucherify. | |
+| **source_id** | **String** | Unique product source ID. | |
+| **name** | **String** | Unique user-defined product name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **attributes** | **Array<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the product was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the product was updated in ISO 8601 format. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the product. | [default to 'product'] |
+| **skus** | [**SkusListForProduct**](SkusListForProduct.md) | | [optional] |
+
diff --git a/docs/ProductCollectionsApi.md b/docs/ProductCollectionsApi.md
new file mode 100644
index 00000000..2a020cc5
--- /dev/null
+++ b/docs/ProductCollectionsApi.md
@@ -0,0 +1,319 @@
+# VoucherifySdk::ProductCollectionsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_product_collection**](ProductCollectionsApi.md#create_product_collection) | **POST** /v1/product-collections | Create Product Collection |
+| [**delete_product_collection**](ProductCollectionsApi.md#delete_product_collection) | **DELETE** /v1/product-collections/{productCollectionId} | Delete Product Collection |
+| [**get_product_collection**](ProductCollectionsApi.md#get_product_collection) | **GET** /v1/product-collections/{productCollectionId} | Get Product Collection |
+| [**list_product_collections**](ProductCollectionsApi.md#list_product_collections) | **GET** /v1/product-collections | List Product Collections |
+| [**list_products_in_collection**](ProductCollectionsApi.md#list_products_in_collection) | **GET** /v1/product-collections/{productCollectionId}/products | List Products in Collection |
+
+
+## create_product_collection
+
+> create_product_collection(opts)
+
+Create Product Collection
+
+This method creates a new product collection.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductCollectionsApi.new
+opts = {
+ product_collections_create_request_body: VoucherifySdk::ProductCollectionsCreateDynamicRequestBody.new({type: 'AUTO_UPDATE', name: 'name_example', filter: VoucherifySdk::ProductCollectionsCreateDynamicRequestBodyFilter.new({junction: VoucherifySdk::Junction::AND})}) # ProductCollectionsCreateRequestBody |
+}
+
+begin
+ # Create Product Collection
+ result = api_instance.create_product_collection(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductCollectionsApi->create_product_collection: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product_collections_create_request_body** | [**ProductCollectionsCreateRequestBody**](ProductCollectionsCreateRequestBody.md) | | [optional] |
+
+### Return type
+
+[**ProductCollectionsCreateResponseBody**](ProductCollectionsCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## delete_product_collection
+
+> delete_product_collection(product_collection_id)
+
+Delete Product Collection
+
+This method deletes a product collection.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductCollectionsApi.new
+product_collection_id = 'product_collection_id_example' # String | A unique product collection ID.
+
+begin
+ # Delete Product Collection
+ api_instance.delete_product_collection(product_collection_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductCollectionsApi->delete_product_collection: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product_collection_id** | **String** | A unique product collection ID. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## get_product_collection
+
+> get_product_collection(product_collection_id)
+
+Get Product Collection
+
+Retrieves the product collection.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductCollectionsApi.new
+product_collection_id = 'product_collection_id_example' # String | A unique product collection ID.
+
+begin
+ # Get Product Collection
+ result = api_instance.get_product_collection(product_collection_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductCollectionsApi->get_product_collection: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product_collection_id** | **String** | A unique product collection ID. | |
+
+### Return type
+
+[**ProductCollectionsGetResponseBody**](ProductCollectionsGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_product_collections
+
+> list_product_collections(opts)
+
+List Product Collections
+
+This method returns a list of product collections.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductCollectionsApi.new
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ order: VoucherifySdk::ParameterOrder::CREATED_AT # ParameterOrder | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+}
+
+begin
+ # List Product Collections
+ result = api_instance.list_product_collections(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductCollectionsApi->list_product_collections: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **order** | [**ParameterOrder**](.md) | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+
+### Return type
+
+[**ProductCollectionsListResponseBody**](ProductCollectionsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_products_in_collection
+
+> list_products_in_collection(product_collection_id, opts)
+
+List Products in Collection
+
+Retrieves list of products from a product collection; works for both dynamic and static product collections.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductCollectionsApi.new
+product_collection_id = 'product_collection_id_example' # String | Unique product collection ID.
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ order: VoucherifySdk::ParameterOrder::CREATED_AT, # ParameterOrder | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ starting_after: Time.parse('2013-10-20T19:20:30+01:00') # Time | Timestamp representing the date and time to use in starting_after cursor to get more data. Represented in ISO 8601 format.
+}
+
+begin
+ # List Products in Collection
+ result = api_instance.list_products_in_collection(product_collection_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductCollectionsApi->list_products_in_collection: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product_collection_id** | **String** | Unique product collection ID. | |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **order** | [**ParameterOrder**](.md) | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+| **starting_after** | **Time** | Timestamp representing the date and time to use in starting_after cursor to get more data. Represented in ISO 8601 format. | [optional] |
+
+### Return type
+
+[**ProductCollectionsProductsListResponseBody**](ProductCollectionsProductsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
diff --git a/docs/ProductCollectionsCreateDynamicRequestBody.md b/docs/ProductCollectionsCreateDynamicRequestBody.md
new file mode 100644
index 00000000..20b62c3f
--- /dev/null
+++ b/docs/ProductCollectionsCreateDynamicRequestBody.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ProductCollectionsCreateDynamicRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Show that the product collection is dynamic (products come in and leave based on set criteria). | [default to 'AUTO_UPDATE'] |
+| **name** | **String** | Unique user-defined product collection name. | |
+| **filter** | [**ProductCollectionsCreateDynamicRequestBodyFilter**](ProductCollectionsCreateDynamicRequestBodyFilter.md) | | |
+
diff --git a/docs/ProductCollectionsCreateDynamicRequestBodyFilter.md b/docs/ProductCollectionsCreateDynamicRequestBodyFilter.md
new file mode 100644
index 00000000..18b91215
--- /dev/null
+++ b/docs/ProductCollectionsCreateDynamicRequestBodyFilter.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::ProductCollectionsCreateDynamicRequestBodyFilter
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **junction** | [**Junction**](Junction.md) | | |
+| **id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **product_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **source_id** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **name** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **price** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **object** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **attributes** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **metadata** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **image_url** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **skus** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **created_at** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+| **updated_at** | [**FieldConditions**](FieldConditions.md) | | [optional] |
+
diff --git a/docs/ProductCollectionsCreateDynamicRequestBodyProductsItem.md b/docs/ProductCollectionsCreateDynamicRequestBodyProductsItem.md
new file mode 100644
index 00000000..83f13f30
--- /dev/null
+++ b/docs/ProductCollectionsCreateDynamicRequestBodyProductsItem.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ProductCollectionsCreateDynamicRequestBodyProductsItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | The product ID. | |
+| **product_id** | **String** | Product ID for SKUs. | [optional] |
+| **object** | **String** | Denotes the type of object represented by the ID. | |
+
diff --git a/docs/ProductCollectionsCreateRequestBody.md b/docs/ProductCollectionsCreateRequestBody.md
new file mode 100644
index 00000000..03461f1c
--- /dev/null
+++ b/docs/ProductCollectionsCreateRequestBody.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::ProductCollectionsCreateRequestBody
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ProductCollectionsCreateRequestBody.openapi_one_of
+# =>
+# [
+# :'ProductCollectionsCreateDynamicRequestBody',
+# :'ProductCollectionsCreateStaticRequestBody'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ProductCollectionsCreateRequestBody.build(data)
+# => #
+
+VoucherifySdk::ProductCollectionsCreateRequestBody.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `ProductCollectionsCreateDynamicRequestBody`
+- `ProductCollectionsCreateStaticRequestBody`
+- `nil` (if no type matches)
+
diff --git a/docs/ProductCollectionsCreateResponseBody.md b/docs/ProductCollectionsCreateResponseBody.md
new file mode 100644
index 00000000..bae7cac0
--- /dev/null
+++ b/docs/ProductCollectionsCreateResponseBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ProductCollectionsCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Product collection ID. | |
+| **name** | **String** | Unique user-defined product collection name. | |
+| **type** | **String** | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | |
+| **filter** | [**ProductCollectionsCreateDynamicRequestBodyFilter**](ProductCollectionsCreateDynamicRequestBodyFilter.md) | | [optional] |
+| **products** | [**Array<ProductCollectionsItemProductsItem>**](ProductCollectionsItemProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the product collection was created in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the static product collection. | [default to 'products_collection'] |
+
diff --git a/docs/ProductCollectionsCreateStaticRequestBody.md b/docs/ProductCollectionsCreateStaticRequestBody.md
new file mode 100644
index 00000000..ec6e107b
--- /dev/null
+++ b/docs/ProductCollectionsCreateStaticRequestBody.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ProductCollectionsCreateStaticRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Show that the product collection is static (manually selected products). | [default to 'STATIC'] |
+| **name** | **String** | Unique user-defined product collection name. | |
+| **products** | [**Array<ProductCollectionsCreateDynamicRequestBodyProductsItem>**](ProductCollectionsCreateDynamicRequestBodyProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional] |
+
diff --git a/docs/ProductCollectionsGetResponseBody.md b/docs/ProductCollectionsGetResponseBody.md
new file mode 100644
index 00000000..cb485064
--- /dev/null
+++ b/docs/ProductCollectionsGetResponseBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ProductCollectionsGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Product collection ID. | |
+| **name** | **String** | Unique user-defined product collection name. | |
+| **type** | **String** | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | |
+| **filter** | [**ProductCollectionsCreateDynamicRequestBodyFilter**](ProductCollectionsCreateDynamicRequestBodyFilter.md) | | [optional] |
+| **products** | [**Array<ProductCollectionsItemProductsItem>**](ProductCollectionsItemProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the product collection was created in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the static product collection. | [default to 'products_collection'] |
+
diff --git a/docs/ProductCollectionsItem.md b/docs/ProductCollectionsItem.md
new file mode 100644
index 00000000..2ffba218
--- /dev/null
+++ b/docs/ProductCollectionsItem.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ProductCollectionsItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Product collection ID. | |
+| **name** | **String** | Unique user-defined product collection name. | |
+| **type** | **String** | Describes whether the product collection is dynamic (products come in and leave based on set criteria) or static (manually selected products). | |
+| **filter** | [**ProductCollectionsCreateDynamicRequestBodyFilter**](ProductCollectionsCreateDynamicRequestBodyFilter.md) | | [optional] |
+| **products** | [**Array<ProductCollectionsItemProductsItem>**](ProductCollectionsItemProductsItem.md) | Defines a set of products for a `STATIC` product collection type. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the product collection was created in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the static product collection. | [default to 'products_collection'] |
+
diff --git a/docs/ProductCollectionsItemProductsItem.md b/docs/ProductCollectionsItemProductsItem.md
new file mode 100644
index 00000000..6bdf11bb
--- /dev/null
+++ b/docs/ProductCollectionsItemProductsItem.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ProductCollectionsItemProductsItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | The product ID. | |
+| **product_id** | **String** | Product ID for SKUs. | [optional] |
+| **object** | **String** | Denotes the type of object represented by the ID. | |
+
diff --git a/docs/ProductCollectionsList.md b/docs/ProductCollectionsList.md
new file mode 100644
index 00000000..217f06cb
--- /dev/null
+++ b/docs/ProductCollectionsList.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ProductCollectionsList
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about product collections. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the JSON property that contains the array of product collections. | [default to 'data'] |
+| **data** | [**Array<ProductCollectionsItem>**](ProductCollectionsItem.md) | A dictionary that contains an array of product collections and their details. | |
+| **total** | **Integer** | Total number of product collections. | |
+
diff --git a/docs/ProductCollectionsListResponseBody.md b/docs/ProductCollectionsListResponseBody.md
new file mode 100644
index 00000000..e7b28025
--- /dev/null
+++ b/docs/ProductCollectionsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ProductCollectionsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about product collections. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the JSON property that contains the array of product collections. | [default to 'data'] |
+| **data** | [**Array<ProductCollectionsItem>**](ProductCollectionsItem.md) | A dictionary that contains an array of product collections and their details. | |
+| **total** | **Integer** | Total number of product collections. | |
+
diff --git a/docs/ProductCollectionsProductsList.md b/docs/ProductCollectionsProductsList.md
new file mode 100644
index 00000000..54347bbe
--- /dev/null
+++ b/docs/ProductCollectionsProductsList.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ProductCollectionsProductsList
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about products and SKUs. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the JSON property that contains the array of products and SKUs. | [default to 'data'] |
+| **data** | [**Array<ProductCollectionsProductsListProductsItem>**](ProductCollectionsProductsListProductsItem.md) | A dictionary that contains an array of products and SKUs. | |
+| **total** | **Integer** | Total number of products & SKUs in the product collection. | |
+
diff --git a/docs/ProductCollectionsProductsListProductsItem.md b/docs/ProductCollectionsProductsListProductsItem.md
new file mode 100644
index 00000000..0689433d
--- /dev/null
+++ b/docs/ProductCollectionsProductsListProductsItem.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::ProductCollectionsProductsListProductsItem
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ProductCollectionsProductsListProductsItem.openapi_one_of
+# =>
+# [
+# :'ProductWithoutSkus',
+# :'SkuWithProduct'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ProductCollectionsProductsListProductsItem.build(data)
+# => #
+
+VoucherifySdk::ProductCollectionsProductsListProductsItem.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `ProductWithoutSkus`
+- `SkuWithProduct`
+- `nil` (if no type matches)
+
diff --git a/docs/ProductCollectionsProductsListResponseBody.md b/docs/ProductCollectionsProductsListResponseBody.md
new file mode 100644
index 00000000..10d883cd
--- /dev/null
+++ b/docs/ProductCollectionsProductsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ProductCollectionsProductsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about products and SKUs. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the JSON property that contains the array of products and SKUs. | [default to 'data'] |
+| **data** | [**Array<ProductCollectionsProductsListProductsItem>**](ProductCollectionsProductsListProductsItem.md) | A dictionary that contains an array of products and SKUs. | |
+| **total** | **Integer** | Total number of products & SKUs in the product collection. | |
+
diff --git a/docs/ProductWithoutSkus.md b/docs/ProductWithoutSkus.md
new file mode 100644
index 00000000..81455ecb
--- /dev/null
+++ b/docs/ProductWithoutSkus.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::ProductWithoutSkus
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique product ID assigned by Voucherify. | |
+| **source_id** | **String** | Unique product source ID. | |
+| **name** | **String** | Unique user-defined product name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **attributes** | **Array<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the product was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the product was updated in ISO 8601 format. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the product. | [default to 'product'] |
+
diff --git a/docs/ProductsApi.md b/docs/ProductsApi.md
new file mode 100644
index 00000000..422a0ada
--- /dev/null
+++ b/docs/ProductsApi.md
@@ -0,0 +1,883 @@
+# VoucherifySdk::ProductsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_product**](ProductsApi.md#create_product) | **POST** /v1/products | Create Product |
+| [**create_sku**](ProductsApi.md#create_sku) | **POST** /v1/products/{productId}/skus | Create SKU |
+| [**delete_product**](ProductsApi.md#delete_product) | **DELETE** /v1/products/{productId} | Delete Product |
+| [**delete_sku**](ProductsApi.md#delete_sku) | **DELETE** /v1/products/{productId}/skus/{skuId} | Delete SKU |
+| [**get_product**](ProductsApi.md#get_product) | **GET** /v1/products/{productId} | Get Product |
+| [**get_sku**](ProductsApi.md#get_sku) | **GET** /v1/skus/{skuId} | Get SKU |
+| [**import_products_using_csv**](ProductsApi.md#import_products_using_csv) | **POST** /v1/products/importCSV | Import Products using CSV |
+| [**import_skus_using_csv**](ProductsApi.md#import_skus_using_csv) | **POST** /v1/skus/importCSV | Import SKUs using CSV |
+| [**list_products**](ProductsApi.md#list_products) | **GET** /v1/products | List Products |
+| [**list_skus_in_product**](ProductsApi.md#list_skus_in_product) | **GET** /v1/products/{productId}/skus | List SKUs in Product |
+| [**update_product**](ProductsApi.md#update_product) | **PUT** /v1/products/{productId} | Update Product |
+| [**update_products_in_bulk**](ProductsApi.md#update_products_in_bulk) | **POST** /v1/products/bulk/async | Update Products in bulk |
+| [**update_products_metadata_in_bulk**](ProductsApi.md#update_products_metadata_in_bulk) | **POST** /v1/products/metadata/async | Update Products' Metadata in bulk |
+| [**update_sku**](ProductsApi.md#update_sku) | **PUT** /v1/products/{productId}/skus/{skuId} | Update SKU |
+
+
+## create_product
+
+> create_product(opts)
+
+Create Product
+
+Creates a product object. 📘 Upsert Mode If you pass an id or a source_id that already exists in the product database, Voucherify will return a related product object with updated fields.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+opts = {
+ products_create_request_body: VoucherifySdk::ProductsCreateRequestBody.new # ProductsCreateRequestBody | Specify the product parameters.
+}
+
+begin
+ # Create Product
+ result = api_instance.create_product(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->create_product: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **products_create_request_body** | [**ProductsCreateRequestBody**](ProductsCreateRequestBody.md) | Specify the product parameters. | [optional] |
+
+### Return type
+
+[**ProductsCreateResponseBody**](ProductsCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## create_sku
+
+> create_sku(product_id, opts)
+
+Create SKU
+
+This method adds product variants to a created product. 📘 Upsert Mode If you pass an id or a source_id that already exists in the sku database, Voucherify will return a related sku object with updated fields.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+product_id = 'product_id_example' # String | A Voucherify product ID or product source ID.
+opts = {
+ products_skus_create_request_body: VoucherifySdk::ProductsSkusCreateRequestBody.new # ProductsSkusCreateRequestBody | Specify the SKU parameters to be created.
+}
+
+begin
+ # Create SKU
+ result = api_instance.create_sku(product_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->create_sku: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product_id** | **String** | A Voucherify product ID or product source ID. | |
+| **products_skus_create_request_body** | [**ProductsSkusCreateRequestBody**](ProductsSkusCreateRequestBody.md) | Specify the SKU parameters to be created. | [optional] |
+
+### Return type
+
+[**ProductsSkusCreateResponseBody**](ProductsSkusCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## delete_product
+
+> delete_product(product_id, opts)
+
+Delete Product
+
+This method deletes a product.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+product_id = 'product_id_example' # String | A Voucherify product ID or source ID.
+opts = {
+ force: true # Boolean | If this flag is set to true, the product will be removed permanently. Going forward, the user will be able to create another product with exactly the same source_id.
+}
+
+begin
+ # Delete Product
+ api_instance.delete_product(product_id, opts)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->delete_product: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product_id** | **String** | A Voucherify product ID or source ID. | |
+| **force** | **Boolean** | If this flag is set to true, the product will be removed permanently. Going forward, the user will be able to create another product with exactly the same source_id. | [optional] |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## delete_sku
+
+> delete_sku(product_id, sku_id, opts)
+
+Delete SKU
+
+This method deletes a product SKU.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+product_id = 'product_id_example' # String | A unique Voucherify product ID or product source ID.
+sku_id = 'sku_id_example' # String | A Voucherify SKU ID or SKU source ID.
+opts = {
+ force: true # Boolean | If this flag is set to true, the SKU will be removed permanently. Going forward, the user will be able to create another SKU with exactly the same source_id.
+}
+
+begin
+ # Delete SKU
+ api_instance.delete_sku(product_id, sku_id, opts)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->delete_sku: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product_id** | **String** | A unique Voucherify product ID or product source ID. | |
+| **sku_id** | **String** | A Voucherify SKU ID or SKU source ID. | |
+| **force** | **Boolean** | If this flag is set to true, the SKU will be removed permanently. Going forward, the user will be able to create another SKU with exactly the same source_id. | [optional] |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## get_product
+
+> get_product(product_id)
+
+Get Product
+
+Retrieve product details.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+product_id = 'product_id_example' # String | A Voucherify product ID or source ID.
+
+begin
+ # Get Product
+ result = api_instance.get_product(product_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->get_product: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product_id** | **String** | A Voucherify product ID or source ID. | |
+
+### Return type
+
+[**ProductsGetResponseBody**](ProductsGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## get_sku
+
+> get_sku(sku_id)
+
+Get SKU
+
+Retrieve details of a SKU.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+sku_id = 'sku_id_example' # String | A Voucherify SKU identifier or SKU source ID.
+
+begin
+ # Get SKU
+ result = api_instance.get_sku(sku_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->get_sku: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **sku_id** | **String** | A Voucherify SKU identifier or SKU source ID. | |
+
+### Return type
+
+[**SkusGetResponseBody**](SkusGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## import_products_using_csv
+
+> import_products_using_csv(file)
+
+Import Products using CSV
+
+Import products into the repository using a CSV file. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+file = File.new('/path/to/some/file') # File | File path.
+
+begin
+ # Import Products using CSV
+ result = api_instance.import_products_using_csv(file)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->import_products_using_csv: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **file** | **File** | File path. | |
+
+### Return type
+
+[**ProductsImportCsvCreateResponseBody**](ProductsImportCsvCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
+
+
+## import_skus_using_csv
+
+> import_skus_using_csv(file)
+
+Import SKUs using CSV
+
+Import SKUs into the repository using a CSV file. The CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+file = File.new('/path/to/some/file') # File | File path.
+
+begin
+ # Import SKUs using CSV
+ result = api_instance.import_skus_using_csv(file)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->import_skus_using_csv: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **file** | **File** | File path. | |
+
+### Return type
+
+[**SkusImportCsvCreateResponseBody**](SkusImportCsvCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
+
+
+## list_products
+
+> list_products(opts)
+
+List Products
+
+Retrieve a list of products.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ order: VoucherifySdk::ParameterOrder::CREATED_AT, # ParameterOrder | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ start_date: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ end_date: Time.parse('2013-10-20T19:20:30+01:00') # Time | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+}
+
+begin
+ # List Products
+ result = api_instance.list_products(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->list_products: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **order** | [**ParameterOrder**](.md) | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+| **start_date** | **Time** | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] |
+| **end_date** | **Time** | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] |
+
+### Return type
+
+[**ProductsListResponseBody**](ProductsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_skus_in_product
+
+> list_skus_in_product(product_id, opts)
+
+List SKUs in Product
+
+Retrieve all SKUs for a given product.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+product_id = 'product_id_example' # String | A Voucherify product ID or product source ID.
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ order: VoucherifySdk::ParameterOrder::CREATED_AT, # ParameterOrder | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ start_date: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ end_date: Time.parse('2013-10-20T19:20:30+01:00') # Time | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+}
+
+begin
+ # List SKUs in Product
+ result = api_instance.list_skus_in_product(product_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->list_skus_in_product: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product_id** | **String** | A Voucherify product ID or product source ID. | |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **order** | [**ParameterOrder**](.md) | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+| **start_date** | **Time** | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] |
+| **end_date** | **Time** | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] |
+
+### Return type
+
+[**ProductsSkusListResponseBody**](ProductsSkusListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## update_product
+
+> update_product(product_id, opts)
+
+Update Product
+
+Updates the specified product by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+product_id = 'product_id_example' # String | A Voucherify product ID or source ID.
+opts = {
+ products_update_request_body: VoucherifySdk::ProductsUpdateRequestBody.new # ProductsUpdateRequestBody | Specify the parameters of the product that are to be updated.
+}
+
+begin
+ # Update Product
+ result = api_instance.update_product(product_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->update_product: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product_id** | **String** | A Voucherify product ID or source ID. | |
+| **products_update_request_body** | [**ProductsUpdateRequestBody**](ProductsUpdateRequestBody.md) | Specify the parameters of the product that are to be updated. | [optional] |
+
+### Return type
+
+[**ProductsUpdateResponseBody**](ProductsUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## update_products_in_bulk
+
+> update_products_in_bulk(opts)
+
+Update Products in bulk
+
+Update several products in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested product object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+opts = {
+ products_update_in_bulk_request_body: [VoucherifySdk::ProductsUpdateInBulkRequestBody.new({source_id: 'test_prod_id_1'})] # Array | Create an array of product objects, each with the parameters which you want to update.
+}
+
+begin
+ # Update Products in bulk
+ result = api_instance.update_products_in_bulk(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->update_products_in_bulk: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **products_update_in_bulk_request_body** | [**Array<ProductsUpdateInBulkRequestBody>**](ProductsUpdateInBulkRequestBody.md) | Create an array of product objects, each with the parameters which you want to update. | [optional] |
+
+### Return type
+
+[**ProductsUpdateInBulkResponseBody**](ProductsUpdateInBulkResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## update_products_metadata_in_bulk
+
+> update_products_metadata_in_bulk(opts)
+
+Update Products' Metadata in bulk
+
+Update several product metadata properties in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested product object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+opts = {
+ products_metadata_update_in_bulk_request_body: VoucherifySdk::ProductsMetadataUpdateInBulkRequestBody.new({source_ids: ['source_ids_example'], metadata: 3.56}) # ProductsMetadataUpdateInBulkRequestBody | Specify the list of product source IDs and the metadata key value pairs to be udpated for these products.
+}
+
+begin
+ # Update Products' Metadata in bulk
+ result = api_instance.update_products_metadata_in_bulk(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->update_products_metadata_in_bulk: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **products_metadata_update_in_bulk_request_body** | [**ProductsMetadataUpdateInBulkRequestBody**](ProductsMetadataUpdateInBulkRequestBody.md) | Specify the list of product source IDs and the metadata key value pairs to be udpated for these products. | [optional] |
+
+### Return type
+
+[**ProductsMetadataUpdateInBulkResponseBody**](ProductsMetadataUpdateInBulkResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## update_sku
+
+> update_sku(product_id, sku_id, opts)
+
+Update SKU
+
+Updates the specified SKU by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body schema wont be modified. Even if provided, they will be silently skipped.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ProductsApi.new
+product_id = 'product_id_example' # String | A unique Voucherify product ID or product source ID.
+sku_id = 'sku_id_example' # String | A Voucherify SKU ID or SKU source ID.
+opts = {
+ products_skus_update_request_body: VoucherifySdk::ProductsSkusUpdateRequestBody.new # ProductsSkusUpdateRequestBody | Specify the parameters to be updated.
+}
+
+begin
+ # Update SKU
+ result = api_instance.update_sku(product_id, sku_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ProductsApi->update_sku: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product_id** | **String** | A unique Voucherify product ID or product source ID. | |
+| **sku_id** | **String** | A Voucherify SKU ID or SKU source ID. | |
+| **products_skus_update_request_body** | [**ProductsSkusUpdateRequestBody**](ProductsSkusUpdateRequestBody.md) | Specify the parameters to be updated. | [optional] |
+
+### Return type
+
+[**ProductsSkusUpdateResponseBody**](ProductsSkusUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/ProductsCreateRequestBody.md b/docs/ProductsCreateRequestBody.md
new file mode 100644
index 00000000..b897fa11
--- /dev/null
+++ b/docs/ProductsCreateRequestBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ProductsCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier that represents the product and is assigned by Voucherify. | [optional] |
+| **source_id** | **String** | Unique product source ID. | [optional] |
+| **name** | **String** | Unique user-defined product name. | [optional] |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] |
+| **attributes** | **Array<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional] |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] |
+
diff --git a/docs/ProductsCreateResponseBody.md b/docs/ProductsCreateResponseBody.md
new file mode 100644
index 00000000..82448bc5
--- /dev/null
+++ b/docs/ProductsCreateResponseBody.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::ProductsCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique product ID assigned by Voucherify. | |
+| **source_id** | **String** | Unique product source ID. | |
+| **name** | **String** | Unique user-defined product name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **attributes** | **Array<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the product was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the product was updated in ISO 8601 format. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the product. | [default to 'product'] |
+| **skus** | [**SkusListForProduct**](SkusListForProduct.md) | | [optional] |
+
diff --git a/docs/ProductsGetResponseBody.md b/docs/ProductsGetResponseBody.md
new file mode 100644
index 00000000..12e6d10c
--- /dev/null
+++ b/docs/ProductsGetResponseBody.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::ProductsGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique product ID assigned by Voucherify. | |
+| **source_id** | **String** | Unique product source ID. | |
+| **name** | **String** | Unique user-defined product name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **attributes** | **Array<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the product was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the product was updated in ISO 8601 format. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the product. | [default to 'product'] |
+| **skus** | [**SkusListForProduct**](SkusListForProduct.md) | | [optional] |
+
diff --git a/docs/ProductsImportCsvCreateResponseBody.md b/docs/ProductsImportCsvCreateResponseBody.md
new file mode 100644
index 00000000..cf6a8028
--- /dev/null
+++ b/docs/ProductsImportCsvCreateResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::ProductsImportCsvCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/ProductsListResponseBody.md b/docs/ProductsListResponseBody.md
new file mode 100644
index 00000000..5543fcbf
--- /dev/null
+++ b/docs/ProductsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ProductsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about products in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of product objects. | [default to 'products'] |
+| **products** | [**Array<Product>**](Product.md) | Contains array of product objects. | |
+| **total** | **Integer** | Total number of product objects. | |
+
diff --git a/docs/ProductsMetadataUpdateInBulkRequestBody.md b/docs/ProductsMetadataUpdateInBulkRequestBody.md
new file mode 100644
index 00000000..8860c912
--- /dev/null
+++ b/docs/ProductsMetadataUpdateInBulkRequestBody.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ProductsMetadataUpdateInBulkRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **source_ids** | **Array<String>** | Array of unique product source IDs. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | |
+
diff --git a/docs/ProductsMetadataUpdateInBulkResponseBody.md b/docs/ProductsMetadataUpdateInBulkResponseBody.md
new file mode 100644
index 00000000..8f3e0722
--- /dev/null
+++ b/docs/ProductsMetadataUpdateInBulkResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::ProductsMetadataUpdateInBulkResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/ProductsSkusCreateRequestBody.md b/docs/ProductsSkusCreateRequestBody.md
new file mode 100644
index 00000000..69f946a2
--- /dev/null
+++ b/docs/ProductsSkusCreateRequestBody.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::ProductsSkusCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique SKU ID. | [optional] |
+| **source_id** | **String** | A unique SKU identifier from your inventory system. | [optional] |
+| **sku** | **String** | Unique user-defined SKU name. | [optional] |
+| **price** | **Integer** | SKU unit price. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] |
+| **currency** | **String** | SKU price currency. | [optional] |
+| **attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | [optional] |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | [optional] |
+
diff --git a/docs/ProductsSkusCreateResponseBody.md b/docs/ProductsSkusCreateResponseBody.md
new file mode 100644
index 00000000..2cd7546a
--- /dev/null
+++ b/docs/ProductsSkusCreateResponseBody.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::ProductsSkusCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | |
+| **source_id** | **String** | A unique SKU identifier from your inventory system. | |
+| **product_id** | **String** | The parent product's unique ID. | |
+| **sku** | **String** | Unique user-defined SKU name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **currency** | **String** | SKU price currency. | [optional] |
+| **attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the SKU was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the SKU was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the `SKU`. | [default to 'sku'] |
+
diff --git a/docs/ProductsSkusListResponseBody.md b/docs/ProductsSkusListResponseBody.md
new file mode 100644
index 00000000..a060691a
--- /dev/null
+++ b/docs/ProductsSkusListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ProductsSkusListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about SKUs. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the JSON property that contains the array of SKUs. | [default to 'data'] |
+| **skus** | [**Array<Sku>**](Sku.md) | A dictionary that contains an array of SKUs. | |
+| **total** | **Integer** | Total number of SKUs in the product. | |
+
diff --git a/docs/ProductsSkusUpdateRequestBody.md b/docs/ProductsSkusUpdateRequestBody.md
new file mode 100644
index 00000000..9349f6ed
--- /dev/null
+++ b/docs/ProductsSkusUpdateRequestBody.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::ProductsSkusUpdateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **sku** | **String** | Unique user-defined SKU name. | [optional] |
+| **price** | **Integer** | SKU unit price. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] |
+| **currency** | **String** | SKU price currency. | [optional] |
+| **attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | [optional] |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | [optional] |
+
diff --git a/docs/ProductsSkusUpdateResponseBody.md b/docs/ProductsSkusUpdateResponseBody.md
new file mode 100644
index 00000000..e34a6306
--- /dev/null
+++ b/docs/ProductsSkusUpdateResponseBody.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::ProductsSkusUpdateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | |
+| **source_id** | **String** | A unique SKU identifier from your inventory system. | |
+| **product_id** | **String** | The parent product's unique ID. | |
+| **sku** | **String** | Unique user-defined SKU name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **currency** | **String** | SKU price currency. | [optional] |
+| **attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the SKU was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the SKU was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the `SKU`. | [default to 'sku'] |
+
diff --git a/docs/ProductsUpdateInBulkRequestBody.md b/docs/ProductsUpdateInBulkRequestBody.md
new file mode 100644
index 00000000..9c7e80be
--- /dev/null
+++ b/docs/ProductsUpdateInBulkRequestBody.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::ProductsUpdateInBulkRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **source_id** | **String** | Unique product source ID from your inventory system. | |
+| **name** | **String** | Unique user-defined product name. | [optional] |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] |
+| **attributes** | **Array<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional] |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional] |
+
diff --git a/docs/ProductsUpdateInBulkResponseBody.md b/docs/ProductsUpdateInBulkResponseBody.md
new file mode 100644
index 00000000..024e90fb
--- /dev/null
+++ b/docs/ProductsUpdateInBulkResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::ProductsUpdateInBulkResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/ProductsUpdateRequestBody.md b/docs/ProductsUpdateRequestBody.md
new file mode 100644
index 00000000..bbfa406f
--- /dev/null
+++ b/docs/ProductsUpdateRequestBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::ProductsUpdateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Unique user-defined product name. | [optional] |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | [optional] |
+| **attributes** | **Array<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional] |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] |
+
diff --git a/docs/ProductsUpdateResponseBody.md b/docs/ProductsUpdateResponseBody.md
new file mode 100644
index 00000000..86f14961
--- /dev/null
+++ b/docs/ProductsUpdateResponseBody.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::ProductsUpdateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique product ID assigned by Voucherify. | |
+| **source_id** | **String** | Unique product source ID. | |
+| **name** | **String** | Unique user-defined product name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **attributes** | **Array<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the product was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the product was updated in ISO 8601 format. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the product. | [default to 'product'] |
+| **skus** | [**SkusListForProduct**](SkusListForProduct.md) | | [optional] |
+
diff --git a/docs/PromotionStack.md b/docs/PromotionStack.md
new file mode 100644
index 00000000..e63704a0
--- /dev/null
+++ b/docs/PromotionStack.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::PromotionStack
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Promotion stack name. | |
+| **tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | |
+| **id** | **String** | Unique promotion stack ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the promotion stack was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the promotion stack was updated in ISO 8601 format. | [optional] |
+| **campaign_id** | **String** | Promotion stack's parent campaign's unique ID. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'promotion_stack'] |
+| **category_id** | **String** | Promotion stack category ID. | |
+| **categories** | [**Array<Category>**](Category.md) | Details about the category assigned to the promotion stack. | |
+
diff --git a/docs/PromotionStackBase.md b/docs/PromotionStackBase.md
new file mode 100644
index 00000000..b5a29bb6
--- /dev/null
+++ b/docs/PromotionStackBase.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::PromotionStackBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Promotion stack name. | |
+| **tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | |
+
diff --git a/docs/PromotionStackBaseTiers.md b/docs/PromotionStackBaseTiers.md
new file mode 100644
index 00000000..e2b1f378
--- /dev/null
+++ b/docs/PromotionStackBaseTiers.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::PromotionStackBaseTiers
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **ids** | **Array<String>** | Contains the list of tiers in a pre-defined sequence. | |
+| **hierarchy_mode** | **String** | | [optional][default to 'MANUAL'] |
+
diff --git a/docs/PromotionTier.md b/docs/PromotionTier.md
new file mode 100644
index 00000000..7c143425
--- /dev/null
+++ b/docs/PromotionTier.md
@@ -0,0 +1,28 @@
+# VoucherifySdk::PromotionTier
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique promotion tier ID. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the promotion tier was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the promotion tier was updated in ISO 8601 format. | [optional] |
+| **name** | **String** | Name of the promotion tier. | [optional] |
+| **banner** | **String** | Text to be displayed to your customers on your website. | [optional] |
+| **action** | [**PromotionTierAction**](PromotionTierAction.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional] |
+| **hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] |
+| **promotion_id** | **String** | Promotion unique ID. | [optional] |
+| **campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | [optional] |
+| **campaign_id** | **String** | Promotion tier's parent campaign's unique ID. | [optional] |
+| **active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the promotion tier. | [optional][default to 'promotion_tier'] |
+| **validation_rule_assignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional] |
+| **category_id** | **String** | Promotion tier category ID. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | | [optional] |
+
diff --git a/docs/PromotionTierAction.md b/docs/PromotionTierAction.md
new file mode 100644
index 00000000..a51cb8c0
--- /dev/null
+++ b/docs/PromotionTierAction.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::PromotionTierAction
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+
diff --git a/docs/PromotionTierCampaign.md b/docs/PromotionTierCampaign.md
new file mode 100644
index 00000000..2d62fe92
--- /dev/null
+++ b/docs/PromotionTierCampaign.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::PromotionTierCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique campaign ID. | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**PromotionTierCampaignValidityTimeframe**](PromotionTierCampaignValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **active** | **Boolean** | A flag indicating whether the campaign is active or not active. A campaign can be disabled even though it's within the active period defined by the `start_date` and `expiration_date` using the <!-- [Disable Campaign](OpenAPI.json/paths/~1campaigns~1{campaignId}~1disable) -->[Disable Campaign](ref:disable-campaign) endpoint. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign | [optional] |
+| **category_id** | **String** | Unique category ID that this campaign belongs to. | [optional] |
+| **object** | **String** | The type of object represented by the campaign object. This object stores information about the campaign. | [optional][default to 'campaign'] |
+
diff --git a/docs/PromotionTierCampaignValidityTimeframe.md b/docs/PromotionTierCampaignValidityTimeframe.md
new file mode 100644
index 00000000..fb2eb0a0
--- /dev/null
+++ b/docs/PromotionTierCampaignValidityTimeframe.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::PromotionTierCampaignValidityTimeframe
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day. | [optional] |
+| **duration** | **String** | Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day. | [optional] |
+
diff --git a/docs/PromotionTierCreateParams.md b/docs/PromotionTierCreateParams.md
new file mode 100644
index 00000000..e6d2630d
--- /dev/null
+++ b/docs/PromotionTierCreateParams.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::PromotionTierCreateParams
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Name of the promotion tier. | |
+| **banner** | **String** | Text to be displayed to your customers on your website. | [optional] |
+| **action** | [**PromotionTierAction**](PromotionTierAction.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional] |
+| **validation_rules** | **Array<String>** | Array containing the ID of the validation rule associated with the promotion tier. | [optional] |
+| **active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] |
+| **hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **category** | **String** | Assign category to the promotion tier. | [optional] |
+| **category_id** | **String** | Instead of using the category name, you can alternatively assign a new category to a promotion tier using a unique category ID, i.e. `cat_0c9da30e7116ba6bba`. | [optional] |
+
diff --git a/docs/PromotionTierSummary.md b/docs/PromotionTierSummary.md
new file mode 100644
index 00000000..b3e71156
--- /dev/null
+++ b/docs/PromotionTierSummary.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::PromotionTierSummary
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redemptions** | [**PromotionTierSummaryRedemptions**](PromotionTierSummaryRedemptions.md) | | [optional] |
+| **orders** | [**PromotionTierSummaryOrders**](PromotionTierSummaryOrders.md) | | [optional] |
+
diff --git a/docs/PromotionTierSummaryOrders.md b/docs/PromotionTierSummaryOrders.md
new file mode 100644
index 00000000..d95c6b12
--- /dev/null
+++ b/docs/PromotionTierSummaryOrders.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::PromotionTierSummaryOrders
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **total_amount** | **Integer** | Sum of order totals. | [optional] |
+| **total_discount_amount** | **Integer** | Sum of total discount applied using the promotion tier. | [optional] |
+
diff --git a/docs/PromotionTierSummaryRedemptions.md b/docs/PromotionTierSummaryRedemptions.md
new file mode 100644
index 00000000..619e910b
--- /dev/null
+++ b/docs/PromotionTierSummaryRedemptions.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::PromotionTierSummaryRedemptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **total_redeemed** | **Integer** | Number of times the promotion tier was redeemed. | [optional] |
+
diff --git a/docs/PromotionTierValidityTimeframe.md b/docs/PromotionTierValidityTimeframe.md
new file mode 100644
index 00000000..0e43f522
--- /dev/null
+++ b/docs/PromotionTierValidityTimeframe.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::PromotionTierValidityTimeframe
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a promotion tier with an `interval` of `P2D` will be active every other day. | [optional] |
+| **duration** | **String** | Defines the amount of time the promotion tier will be active in ISO 8601 format. For example, a promotion tier with a `duration` of `P1D` will be valid for a duration of one day. | [optional] |
+
diff --git a/docs/PromotionTiersList.md b/docs/PromotionTiersList.md
new file mode 100644
index 00000000..52bbf623
--- /dev/null
+++ b/docs/PromotionTiersList.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::PromotionTiersList
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about promotion tiers in a dictionary. | [optional][default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of promotion tier objects. | [optional][default to 'tiers'] |
+| **tiers** | [**Array<PromotionTier>**](PromotionTier.md) | Contains array of promotion tier objects. | [optional] |
+| **total** | **Integer** | Total number of promotion tiers. | [optional] |
+| **has_more** | **Boolean** | As query results are always limited (by the limit parameter), the `has_more` flag indicates whether there are more records for given filter parameters. This let's you know if you are able to run another request (with a different page or a different start date filter) to get more records returned in the results. | [optional] |
+
diff --git a/docs/PromotionsApi.md b/docs/PromotionsApi.md
new file mode 100644
index 00000000..70c8b35f
--- /dev/null
+++ b/docs/PromotionsApi.md
@@ -0,0 +1,678 @@
+# VoucherifySdk::PromotionsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_promotion_stack**](PromotionsApi.md#create_promotion_stack) | **POST** /v1/promotions/{campaignId}/stacks | Create Promotion Stack |
+| [**delete_promotion_stack**](PromotionsApi.md#delete_promotion_stack) | **DELETE** /v1/promotions/{campaignId}/stacks/{stackId} | Delete Promotion Stack |
+| [**delete_promotion_tier**](PromotionsApi.md#delete_promotion_tier) | **DELETE** /v1/promotions/tiers/{promotionTierId} | Delete Promotion Tier |
+| [**disable_promotion_tier**](PromotionsApi.md#disable_promotion_tier) | **POST** /v1/promotions/tiers/{promotionTierId}/disable | Disable Promotion Tier |
+| [**enable_promotion_tier**](PromotionsApi.md#enable_promotion_tier) | **POST** /v1/promotions/tiers/{promotionTierId}/enable | Enable Promotion Tier |
+| [**get_promotion_stack**](PromotionsApi.md#get_promotion_stack) | **GET** /v1/promotions/{campaignId}/stacks/{stackId} | Get Promotion Stack |
+| [**get_promotion_tier**](PromotionsApi.md#get_promotion_tier) | **GET** /v1/promotions/tiers/{promotionTierId} | Get Promotion Tier |
+| [**list_all_promotion_stacks**](PromotionsApi.md#list_all_promotion_stacks) | **GET** /v1/promotions/stacks | List Promotion Stacks |
+| [**list_promotion_stacks_in_campaign**](PromotionsApi.md#list_promotion_stacks_in_campaign) | **GET** /v1/promotions/{campaignId}/stacks | List Promotion Stacks in Campaign |
+| [**list_promotion_tiers_from_campaign**](PromotionsApi.md#list_promotion_tiers_from_campaign) | **GET** /v1/promotions/{campaignId}/tiers | List Promotion Tiers from Campaign |
+| [**update_promotion_stack**](PromotionsApi.md#update_promotion_stack) | **PUT** /v1/promotions/{campaignId}/stacks/{stackId} | Update Promotion Stack |
+
+
+## create_promotion_stack
+
+> create_promotion_stack(campaign_id, opts)
+
+Create Promotion Stack
+
+This method creates one promotion stack. The sequence of promotion tier IDs will determine the promotion stacking order.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PromotionsApi.new
+campaign_id = 'campaign_id_example' # String | Unique campaign ID.
+opts = {
+ promotions_stacks_create_request_body: VoucherifySdk::PromotionsStacksCreateRequestBody.new({name: 'name_example', tiers: VoucherifySdk::PromotionStackBaseTiers.new({ids: ['ids_example']})}) # PromotionsStacksCreateRequestBody | Specify the order of promotion tiers for the promotion stack.
+}
+
+begin
+ # Create Promotion Stack
+ result = api_instance.create_promotion_stack(campaign_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PromotionsApi->create_promotion_stack: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique campaign ID. | |
+| **promotions_stacks_create_request_body** | [**PromotionsStacksCreateRequestBody**](PromotionsStacksCreateRequestBody.md) | Specify the order of promotion tiers for the promotion stack. | [optional] |
+
+### Return type
+
+[**PromotionsStacksCreateResponseBody**](PromotionsStacksCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## delete_promotion_stack
+
+> delete_promotion_stack(campaign_id, stack_id)
+
+Delete Promotion Stack
+
+This method deletes a promotion stack.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PromotionsApi.new
+campaign_id = 'campaign_id_example' # String | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign.
+stack_id = 'stack_id_example' # String | Promotion stack ID.
+
+begin
+ # Delete Promotion Stack
+ api_instance.delete_promotion_stack(campaign_id, stack_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PromotionsApi->delete_promotion_stack: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign. | |
+| **stack_id** | **String** | Promotion stack ID. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## delete_promotion_tier
+
+> delete_promotion_tier(promotion_tier_id)
+
+Delete Promotion Tier
+
+This method deletes a promotion tier.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PromotionsApi.new
+promotion_tier_id = 'promotion_tier_id_example' # String | Unique promotion tier ID.
+
+begin
+ # Delete Promotion Tier
+ api_instance.delete_promotion_tier(promotion_tier_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PromotionsApi->delete_promotion_tier: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **promotion_tier_id** | **String** | Unique promotion tier ID. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## disable_promotion_tier
+
+> disable_promotion_tier(promotion_tier_id)
+
+Disable Promotion Tier
+
+This method disables a promotion tier, i.e. makes the active parameter false.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PromotionsApi.new
+promotion_tier_id = 'promotion_tier_id_example' # String | Unique promotion tier ID.
+
+begin
+ # Disable Promotion Tier
+ result = api_instance.disable_promotion_tier(promotion_tier_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PromotionsApi->disable_promotion_tier: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **promotion_tier_id** | **String** | Unique promotion tier ID. | |
+
+### Return type
+
+[**PromotionsTiersDisableResponseBody**](PromotionsTiersDisableResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## enable_promotion_tier
+
+> enable_promotion_tier(promotion_tier_id)
+
+Enable Promotion Tier
+
+This method enables a promotion tier, i.e. makes the active parameter true.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PromotionsApi.new
+promotion_tier_id = 'promotion_tier_id_example' # String | Unique promotion tier ID.
+
+begin
+ # Enable Promotion Tier
+ result = api_instance.enable_promotion_tier(promotion_tier_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PromotionsApi->enable_promotion_tier: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **promotion_tier_id** | **String** | Unique promotion tier ID. | |
+
+### Return type
+
+[**PromotionsTiersEnableResponseBody**](PromotionsTiersEnableResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## get_promotion_stack
+
+> get_promotion_stack(campaign_id, stack_id)
+
+Get Promotion Stack
+
+This method returns the details of a promotion stack, including the promotion tiers grouped within the stack.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PromotionsApi.new
+campaign_id = 'campaign_id_example' # String | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign.
+stack_id = 'stack_id_example' # String | Promotion stack ID.
+
+begin
+ # Get Promotion Stack
+ result = api_instance.get_promotion_stack(campaign_id, stack_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PromotionsApi->get_promotion_stack: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign. | |
+| **stack_id** | **String** | Promotion stack ID. | |
+
+### Return type
+
+[**PromotionsStacksGetResponseBody**](PromotionsStacksGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## get_promotion_tier
+
+> get_promotion_tier(promotion_tier_id)
+
+Get Promotion Tier
+
+This method enables you to retrieve a specific promotion tier.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PromotionsApi.new
+promotion_tier_id = 'promotion_tier_id_example' # String | Unique promotion tier ID.
+
+begin
+ # Get Promotion Tier
+ result = api_instance.get_promotion_tier(promotion_tier_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PromotionsApi->get_promotion_tier: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **promotion_tier_id** | **String** | Unique promotion tier ID. | |
+
+### Return type
+
+[**PromotionsTiersGetResponseBody**](PromotionsTiersGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_all_promotion_stacks
+
+> list_all_promotion_stacks(opts)
+
+List Promotion Stacks
+
+This method enables you to list promotion stacks irrespective of the campaign they are associated with. You can use filters in the query parameters to specify the stacks to be returned in the response. # Advanced filters for fetching promotion stacks
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PromotionsApi.new
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ order: VoucherifySdk::ParameterOrderListAllPromotionStacks::CREATED_AT, # ParameterOrderListAllPromotionStacks | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ created_at: VoucherifySdk::ParameterCreatedBeforeAfter.new, # ParameterCreatedBeforeAfter | A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z
+ updated_at: VoucherifySdk::ParameterUpdatedBeforeAfter.new # ParameterUpdatedBeforeAfter | A filter on the list based on the object updated_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [updated_at][before] 2017-09-08T13:52:18.227Z
+}
+
+begin
+ # List Promotion Stacks
+ result = api_instance.list_all_promotion_stacks(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PromotionsApi->list_all_promotion_stacks: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **order** | [**ParameterOrderListAllPromotionStacks**](.md) | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+| **created_at** | [**ParameterCreatedBeforeAfter**](.md) | A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z | [optional] |
+| **updated_at** | [**ParameterUpdatedBeforeAfter**](.md) | A filter on the list based on the object updated_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [updated_at][before] 2017-09-08T13:52:18.227Z | [optional] |
+
+### Return type
+
+[**PromotionsStacksListResponseBody**](PromotionsStacksListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_promotion_stacks_in_campaign
+
+> list_promotion_stacks_in_campaign(campaign_id)
+
+List Promotion Stacks in Campaign
+
+This method enables you to list promotion stacks from a specified campaign.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PromotionsApi.new
+campaign_id = 'campaign_id_example' # String | Unique campaign ID.
+
+begin
+ # List Promotion Stacks in Campaign
+ result = api_instance.list_promotion_stacks_in_campaign(campaign_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PromotionsApi->list_promotion_stacks_in_campaign: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique campaign ID. | |
+
+### Return type
+
+[**PromotionsStacksListResponseBody**](PromotionsStacksListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_promotion_tiers_from_campaign
+
+> list_promotion_tiers_from_campaign(campaign_id)
+
+List Promotion Tiers from Campaign
+
+This method enables you to list promotion tiers from a specified campaign.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PromotionsApi.new
+campaign_id = 'campaign_id_example' # String | Unique campaign ID assigned by Voucherify.
+
+begin
+ # List Promotion Tiers from Campaign
+ result = api_instance.list_promotion_tiers_from_campaign(campaign_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PromotionsApi->list_promotion_tiers_from_campaign: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | Unique campaign ID assigned by Voucherify. | |
+
+### Return type
+
+[**PromotionsTiersListResponseBody**](PromotionsTiersListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## update_promotion_stack
+
+> update_promotion_stack(campaign_id, stack_id, opts)
+
+Update Promotion Stack
+
+This methods allows for editing an existing stack.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PromotionsApi.new
+campaign_id = 'campaign_id_example' # String | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign.
+stack_id = 'stack_id_example' # String | Promotion stack ID.
+opts = {
+ promotions_stacks_update_request_body: VoucherifySdk::PromotionsStacksUpdateRequestBody.new # PromotionsStacksUpdateRequestBody | Specify the promotion stack parameters that you would like to update.
+}
+
+begin
+ # Update Promotion Stack
+ result = api_instance.update_promotion_stack(campaign_id, stack_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PromotionsApi->update_promotion_stack: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign_id** | **String** | ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign. | |
+| **stack_id** | **String** | Promotion stack ID. | |
+| **promotions_stacks_update_request_body** | [**PromotionsStacksUpdateRequestBody**](PromotionsStacksUpdateRequestBody.md) | Specify the promotion stack parameters that you would like to update. | [optional] |
+
+### Return type
+
+[**PromotionsStacksUpdateResponseBody**](PromotionsStacksUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/PromotionsStacksCreateRequestBody.md b/docs/PromotionsStacksCreateRequestBody.md
new file mode 100644
index 00000000..8aae4395
--- /dev/null
+++ b/docs/PromotionsStacksCreateRequestBody.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::PromotionsStacksCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Promotion stack name. | |
+| **tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | |
+| **category_id** | **String** | Promotion stack category ID. | [optional] |
+
diff --git a/docs/PromotionsStacksCreateResponseBody.md b/docs/PromotionsStacksCreateResponseBody.md
new file mode 100644
index 00000000..224445ff
--- /dev/null
+++ b/docs/PromotionsStacksCreateResponseBody.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::PromotionsStacksCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Promotion stack name. | |
+| **tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | |
+| **id** | **String** | Unique promotion stack ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the promotion stack was created in ISO 8601 format. | |
+| **campaign_id** | **String** | Promotion stack's parent campaign's unique ID. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'promotion_stack'] |
+| **category_id** | **String** | Promotion stack category ID. | |
+| **categories** | [**Array<PromotionStackBase>**](PromotionStackBase.md) | Details about the category assigned to the promotion stack. | |
+
diff --git a/docs/PromotionsStacksGetResponseBody.md b/docs/PromotionsStacksGetResponseBody.md
new file mode 100644
index 00000000..289ade4a
--- /dev/null
+++ b/docs/PromotionsStacksGetResponseBody.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::PromotionsStacksGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Promotion stack name. | |
+| **tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | |
+| **id** | **String** | Unique promotion stack ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the promotion stack was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the promotion stack was updated in ISO 8601 format. | [optional] |
+| **campaign_id** | **String** | Promotion stack's parent campaign's unique ID. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'promotion_stack'] |
+| **category_id** | **String** | Promotion stack category ID. | |
+| **categories** | [**Array<Category>**](Category.md) | Details about the category assigned to the promotion stack. | |
+
diff --git a/docs/PromotionsStacksListResponseBody.md b/docs/PromotionsStacksListResponseBody.md
new file mode 100644
index 00000000..9b0b394c
--- /dev/null
+++ b/docs/PromotionsStacksListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::PromotionsStacksListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about promotion stacks in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of promotion stack objects. | [default to 'data'] |
+| **data** | [**Array<PromotionStack>**](PromotionStack.md) | Contains array of promotion stack objects. | |
+| **total** | **Integer** | Total number of promotion stacks. | |
+
diff --git a/docs/PromotionsStacksUpdateRequestBody.md b/docs/PromotionsStacksUpdateRequestBody.md
new file mode 100644
index 00000000..55637dc0
--- /dev/null
+++ b/docs/PromotionsStacksUpdateRequestBody.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::PromotionsStacksUpdateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Promotion stack name. | [optional] |
+| **tiers** | [**PromotionsStacksUpdateRequestBodyTiers**](PromotionsStacksUpdateRequestBodyTiers.md) | | [optional] |
+| **category_id** | **String** | Promotion stack category ID. | [optional] |
+
diff --git a/docs/PromotionsStacksUpdateRequestBodyTiers.md b/docs/PromotionsStacksUpdateRequestBodyTiers.md
new file mode 100644
index 00000000..893d5a37
--- /dev/null
+++ b/docs/PromotionsStacksUpdateRequestBodyTiers.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::PromotionsStacksUpdateRequestBodyTiers
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **ids** | **Array<String>** | Contains the list of tiers in a pre-defined sequence. | [optional] |
+| **hierarchy_mode** | **String** | Category hierarchy. | [optional][default to 'MANUAL'] |
+
diff --git a/docs/PromotionsStacksUpdateResponseBody.md b/docs/PromotionsStacksUpdateResponseBody.md
new file mode 100644
index 00000000..662af7a6
--- /dev/null
+++ b/docs/PromotionsStacksUpdateResponseBody.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::PromotionsStacksUpdateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Promotion stack name. | |
+| **tiers** | [**PromotionStackBaseTiers**](PromotionStackBaseTiers.md) | | |
+| **id** | **String** | Unique promotion stack ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the promotion stack was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the promotion stack was updated in ISO 8601 format. | |
+| **campaign_id** | **String** | Promotion stack's parent campaign's unique ID. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'promotion_stack'] |
+| **category_id** | **String** | Promotion stack category ID. | |
+| **categories** | [**Array<PromotionStackBase>**](PromotionStackBase.md) | Details about the category assigned to the promotion stack. | |
+
diff --git a/docs/PromotionsTiersDisableResponseBody.md b/docs/PromotionsTiersDisableResponseBody.md
new file mode 100644
index 00000000..4a5ce620
--- /dev/null
+++ b/docs/PromotionsTiersDisableResponseBody.md
@@ -0,0 +1,28 @@
+# VoucherifySdk::PromotionsTiersDisableResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique promotion tier ID. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the promotion tier was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the promotion tier was updated in ISO 8601 format. | [optional] |
+| **name** | **String** | Name of the promotion tier. | [optional] |
+| **banner** | **String** | Text to be displayed to your customers on your website. | [optional] |
+| **action** | [**PromotionTierAction**](PromotionTierAction.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional] |
+| **hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] |
+| **promotion_id** | **String** | Promotion unique ID. | [optional] |
+| **campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | [optional] |
+| **campaign_id** | **String** | Promotion tier's parent campaign's unique ID. | [optional] |
+| **active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the promotion tier. | [optional][default to 'promotion_tier'] |
+| **validation_rule_assignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional] |
+| **category_id** | **String** | Promotion tier category ID. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | | [optional] |
+
diff --git a/docs/PromotionsTiersEnableResponseBody.md b/docs/PromotionsTiersEnableResponseBody.md
new file mode 100644
index 00000000..cdfc1388
--- /dev/null
+++ b/docs/PromotionsTiersEnableResponseBody.md
@@ -0,0 +1,28 @@
+# VoucherifySdk::PromotionsTiersEnableResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique promotion tier ID. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the promotion tier was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the promotion tier was updated in ISO 8601 format. | [optional] |
+| **name** | **String** | Name of the promotion tier. | [optional] |
+| **banner** | **String** | Text to be displayed to your customers on your website. | [optional] |
+| **action** | [**PromotionTierAction**](PromotionTierAction.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional] |
+| **hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] |
+| **promotion_id** | **String** | Promotion unique ID. | [optional] |
+| **campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | [optional] |
+| **campaign_id** | **String** | Promotion tier's parent campaign's unique ID. | [optional] |
+| **active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the promotion tier. | [optional][default to 'promotion_tier'] |
+| **validation_rule_assignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional] |
+| **category_id** | **String** | Promotion tier category ID. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | | [optional] |
+
diff --git a/docs/PromotionsTiersGetResponseBody.md b/docs/PromotionsTiersGetResponseBody.md
new file mode 100644
index 00000000..b3aee91c
--- /dev/null
+++ b/docs/PromotionsTiersGetResponseBody.md
@@ -0,0 +1,28 @@
+# VoucherifySdk::PromotionsTiersGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique promotion tier ID. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the promotion tier was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the promotion tier was updated in ISO 8601 format. | [optional] |
+| **name** | **String** | Name of the promotion tier. | [optional] |
+| **banner** | **String** | Text to be displayed to your customers on your website. | [optional] |
+| **action** | [**PromotionTierAction**](PromotionTierAction.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the promotion tier. A set of key/value pairs that you can attach to a promotion tier object. It can be useful for storing additional information about the promotion tier in a structured format. | [optional] |
+| **hierarchy** | **Integer** | The promotions hierarchy defines the order in which the discounts from different tiers will be applied to a customer's order. If a customer qualifies for discounts from more than one tier, discounts will be applied in the order defined in the hierarchy. | [optional] |
+| **promotion_id** | **String** | Promotion unique ID. | [optional] |
+| **campaign** | [**PromotionTierCampaign**](PromotionTierCampaign.md) | | [optional] |
+| **campaign_id** | **String** | Promotion tier's parent campaign's unique ID. | [optional] |
+| **active** | **Boolean** | A flag to toggle the promotion tier on or off. You can disable a promotion tier even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* promotion tier - `false` indicates an *inactive* promotion tier | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the promotion tier starts to be active in ISO 8601 format. Promotion tier is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Activation timestamp defines when the promotion tier expires in ISO 8601 format. Promotion tier is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**PromotionTierValidityTimeframe**](PromotionTierValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the promotion tier is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **summary** | [**PromotionTierSummary**](PromotionTierSummary.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the promotion tier. | [optional][default to 'promotion_tier'] |
+| **validation_rule_assignments** | [**ValidationRuleAssignmentsList**](ValidationRuleAssignmentsList.md) | | [optional] |
+| **category_id** | **String** | Promotion tier category ID. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | | [optional] |
+
diff --git a/docs/PromotionsTiersListResponseBody.md b/docs/PromotionsTiersListResponseBody.md
new file mode 100644
index 00000000..560d9fb5
--- /dev/null
+++ b/docs/PromotionsTiersListResponseBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::PromotionsTiersListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about promotion tiers in a dictionary. | [optional][default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of promotion tier objects. | [optional][default to 'tiers'] |
+| **tiers** | [**Array<PromotionTier>**](PromotionTier.md) | Contains array of promotion tier objects. | [optional] |
+| **total** | **Integer** | Total number of promotion tiers. | [optional] |
+| **has_more** | **Boolean** | As query results are always limited (by the limit parameter), the `has_more` flag indicates whether there are more records for given filter parameters. This let's you know if you are able to run another request (with a different page or a different start date filter) to get more records returned in the results. | [optional] |
+
diff --git a/docs/PropertiesForLoyaltyCampaignOptions.md b/docs/PropertiesForLoyaltyCampaignOptions.md
new file mode 100644
index 00000000..dfe27fed
--- /dev/null
+++ b/docs/PropertiesForLoyaltyCampaignOptions.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::PropertiesForLoyaltyCampaignOptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **recalculate_tiers** | **Boolean** | Determine if tiers should be recalculated or no. | [optional] |
+
diff --git a/docs/PublicationsApi.md b/docs/PublicationsApi.md
new file mode 100644
index 00000000..1a5ca8bd
--- /dev/null
+++ b/docs/PublicationsApi.md
@@ -0,0 +1,222 @@
+# VoucherifySdk::PublicationsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_publication**](PublicationsApi.md#create_publication) | **POST** /v1/publications | Create Publication |
+| [**create_publication1**](PublicationsApi.md#create_publication1) | **GET** /v1/publications/create | Create Publication |
+| [**list_publications**](PublicationsApi.md#list_publications) | **GET** /v1/publications | List Publications |
+
+
+## create_publication
+
+> create_publication(opts)
+
+Create Publication
+
+This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers In case you want to publish multiple vouchers within a single publication, you need to specify the campaign name and number of vouchers you want to publish. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PublicationsApi.new
+opts = {
+ join_once: true, # Boolean | Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer.
+ publications_create_request_body: VoucherifySdk::CreatePublicationWithCampaign.new({customer: VoucherifySdk::Customer.new, campaign: VoucherifySdk::CreatePublicationCampaign.new({name: 'camp_dphuwqH7BOVkgh4JmpDtS32l'})}) # PublicationsCreateRequestBody | Specify the publication parameters.
+}
+
+begin
+ # Create Publication
+ result = api_instance.create_publication(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PublicationsApi->create_publication: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **join_once** | **Boolean** | Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. | [optional] |
+| **publications_create_request_body** | [**PublicationsCreateRequestBody**](PublicationsCreateRequestBody.md) | Specify the publication parameters. | [optional] |
+
+### Return type
+
+[**PublicationsCreateResponseBody**](PublicationsCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## create_publication1
+
+> create_publication1(customer, opts)
+
+Create Publication
+
+This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. ❗️ Limited access Access to this endpoint is limited. This endpoint is designed for specific integrations and the API keys need to be configured to access this endpoint. Navigate to the **Dashboard** → **Project Settings** → **General** → **Integration Keys** to set up a pair of API keys and use them to send the request. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers This endpoint does not support the publishing of multiple vouchers from a single campaign. In case you want to publish multiple vouchers within a single publication, you need to use a dedicated endpoint. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign. # Example Request ❗️ Required Query param voucher OR campaign MUST be filled out. If you provide both, campaign param will be skipped.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PublicationsApi.new
+customer = VoucherifySdk::Customer.new # Customer | Contains information about the customer to whom the publication was directed.
+opts = {
+ join_once: true, # Boolean | Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer.
+ voucher: 'voucher_example', # String | Code of voucher being published.
+ campaign: VoucherifySdk::CreatePublicationCampaign.new({name: 'camp_dphuwqH7BOVkgh4JmpDtS32l'}), # CreatePublicationCampaign | Create publication with campaign.
+ source_id: 'source_id_example', # String | The merchant’s publication ID if it is different from the Voucherify publication ID. Its an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If source_id is provided only 1 voucher can be published per request.
+ metadata: { key: 3.56} # Object | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format.
+}
+
+begin
+ # Create Publication
+ result = api_instance.create_publication1(customer, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PublicationsApi->create_publication1: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**Customer**](.md) | Contains information about the customer to whom the publication was directed. | |
+| **join_once** | **Boolean** | Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer. | [optional] |
+| **voucher** | **String** | Code of voucher being published. | [optional] |
+| **campaign** | [**CreatePublicationCampaign**](.md) | Create publication with campaign. | [optional] |
+| **source_id** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. Its an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If source_id is provided only 1 voucher can be published per request. | [optional] |
+| **metadata** | [**Object**](.md) | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. | [optional] |
+
+### Return type
+
+[**PublicationsCreateResponseBody**](PublicationsCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_publications
+
+> list_publications(opts)
+
+List Publications
+
+Retrieve a list of publications. To return a **particular** publication, you can use the source_id query parameter and provide the source_id of the publication you are looking for specifically. # Pagination 🚧 Important! If you want to scroll through a huge set of records, it is recommended to use the Exports API. This API will return an error page_over_limit if you reach a page above 1000. # Filter Query The filters query parameter allows for joining multiple parameters with logical operators. The syntax looks as follows: ## Operators: ## Examples
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::PublicationsApi.new
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ order: VoucherifySdk::ParameterOrderListPublications::ID, # ParameterOrderListPublications | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ campaign: 'campaign_example', # String | Filters by a given campaign name.
+ customer: 'customer_example', # String | Filters by a unique customer ID.
+ voucher: 'voucher_example', # String | Filters by a given voucher code.
+ result: VoucherifySdk::ParameterResultListPublications::SUCCESS, # ParameterResultListPublications | Filters by a publication result.
+ voucher_type: VoucherifySdk::ParameterVoucherTypeListPublications::DISCOUNT, # ParameterVoucherTypeListPublications | Filters by a voucher type.
+ is_referral_code: true, # Boolean | This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns.
+ filters: 'filters_example', # String | Allows for combining the filters mentioned in the endpoint description.
+ source_id: 'source_id_example' # String | Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id.
+}
+
+begin
+ # List Publications
+ result = api_instance.list_publications(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling PublicationsApi->list_publications: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **order** | [**ParameterOrderListPublications**](.md) | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+| **campaign** | **String** | Filters by a given campaign name. | [optional] |
+| **customer** | **String** | Filters by a unique customer ID. | [optional] |
+| **voucher** | **String** | Filters by a given voucher code. | [optional] |
+| **result** | [**ParameterResultListPublications**](.md) | Filters by a publication result. | [optional] |
+| **voucher_type** | [**ParameterVoucherTypeListPublications**](.md) | Filters by a voucher type. | [optional] |
+| **is_referral_code** | **Boolean** | This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns. | [optional] |
+| **filters** | **String** | Allows for combining the filters mentioned in the endpoint description. | [optional] |
+| **source_id** | **String** | Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id. | [optional] |
+
+### Return type
+
+[**PublicationsListResponseBody**](PublicationsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
diff --git a/docs/PublicationsCreateBaseResponseBody.md b/docs/PublicationsCreateBaseResponseBody.md
new file mode 100644
index 00000000..a69ef685
--- /dev/null
+++ b/docs/PublicationsCreateBaseResponseBody.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::PublicationsCreateBaseResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique publication ID, assigned by Voucherify. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the `publication`. | [default to 'publication'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the publication was created in ISO 8601 format. | |
+| **customer_id** | **String** | Unique customer ID of the customer receiving the publication. | |
+| **tracking_id** | **String** | Customer's `source_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. | |
+| **channel** | **String** | How the publication was originated. It can be your own custom channel or an example value provided here. | [default to 'API'] |
+| **source_id** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. | |
+| **result** | **String** | Status of the publication attempt. | [default to 'SUCCESS'] |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | |
+| **vouchers_id** | **Array<String>** | Contains the unique internal voucher ID that was assigned by Voucherify. | |
+
diff --git a/docs/PublicationsCreateRequestBody.md b/docs/PublicationsCreateRequestBody.md
new file mode 100644
index 00000000..911a83ad
--- /dev/null
+++ b/docs/PublicationsCreateRequestBody.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::PublicationsCreateRequestBody
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::PublicationsCreateRequestBody.openapi_one_of
+# =>
+# [
+# :'CreatePublicationWithCampaign',
+# :'CreatePublicationWithSpecificVoucher'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::PublicationsCreateRequestBody.build(data)
+# => #
+
+VoucherifySdk::PublicationsCreateRequestBody.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `CreatePublicationWithCampaign`
+- `CreatePublicationWithSpecificVoucher`
+- `nil` (if no type matches)
+
diff --git a/docs/PublicationsCreateResponseBody.md b/docs/PublicationsCreateResponseBody.md
new file mode 100644
index 00000000..4e92d30a
--- /dev/null
+++ b/docs/PublicationsCreateResponseBody.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::PublicationsCreateResponseBody
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::PublicationsCreateResponseBody.openapi_one_of
+# =>
+# [
+# :'PublicationsCreateVoucherResponseBody',
+# :'PublicationsCreateVouchersResponseBody'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::PublicationsCreateResponseBody.build(data)
+# => #
+
+VoucherifySdk::PublicationsCreateResponseBody.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `PublicationsCreateVoucherResponseBody`
+- `PublicationsCreateVouchersResponseBody`
+- `nil` (if no type matches)
+
diff --git a/docs/PublicationsCreateVoucherResponseBody.md b/docs/PublicationsCreateVoucherResponseBody.md
new file mode 100644
index 00000000..52e0f14f
--- /dev/null
+++ b/docs/PublicationsCreateVoucherResponseBody.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::PublicationsCreateVoucherResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique publication ID, assigned by Voucherify. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the `publication`. | [default to 'publication'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the publication was created in ISO 8601 format. | |
+| **customer_id** | **String** | Unique customer ID of the customer receiving the publication. | |
+| **tracking_id** | **String** | Customer's `source_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. | |
+| **channel** | **String** | How the publication was originated. It can be your own custom channel or an example value provided here. | [default to 'API'] |
+| **source_id** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. | |
+| **result** | **String** | Status of the publication attempt. | [default to 'SUCCESS'] |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | |
+| **vouchers_id** | **Array<String>** | Contains the unique internal voucher ID that was assigned by Voucherify. | |
+| **voucher** | [**Voucher**](Voucher.md) | | |
+
diff --git a/docs/PublicationsCreateVouchersResponseBody.md b/docs/PublicationsCreateVouchersResponseBody.md
new file mode 100644
index 00000000..0496a955
--- /dev/null
+++ b/docs/PublicationsCreateVouchersResponseBody.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::PublicationsCreateVouchersResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique publication ID, assigned by Voucherify. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the `publication`. | [default to 'publication'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the publication was created in ISO 8601 format. | |
+| **customer_id** | **String** | Unique customer ID of the customer receiving the publication. | |
+| **tracking_id** | **String** | Customer's `source_id`. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format. | |
+| **channel** | **String** | How the publication was originated. It can be your own custom channel or an example value provided here. | [default to 'API'] |
+| **source_id** | **String** | The merchant’s publication ID if it is different from the Voucherify publication ID. It's an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. | |
+| **result** | **String** | Status of the publication attempt. | [default to 'SUCCESS'] |
+| **customer** | [**CustomerWithSummaryLoyaltyReferrals**](CustomerWithSummaryLoyaltyReferrals.md) | | |
+| **vouchers_id** | **Array<String>** | Contains the unique internal voucher ID that was assigned by Voucherify. | |
+| **vouchers** | **Array<String>** | Contains the unique voucher codes that was assigned by Voucherify. | |
+
diff --git a/docs/PublicationsListResponseBody.md b/docs/PublicationsListResponseBody.md
new file mode 100644
index 00000000..72b2e50e
--- /dev/null
+++ b/docs/PublicationsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::PublicationsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about publications in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of publications. | [default to 'publications'] |
+| **publications** | [**Array<PublicationsListResponseBodyPublicationsItem>**](PublicationsListResponseBodyPublicationsItem.md) | Contains array of publication objects, voucher object will be simplified. | |
+| **total** | **Integer** | Total number of publications. | |
+
diff --git a/docs/PublicationsListResponseBodyPublicationsItem.md b/docs/PublicationsListResponseBodyPublicationsItem.md
new file mode 100644
index 00000000..174a2e4e
--- /dev/null
+++ b/docs/PublicationsListResponseBodyPublicationsItem.md
@@ -0,0 +1,51 @@
+# VoucherifySdk::PublicationsListResponseBodyPublicationsItem
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::PublicationsListResponseBodyPublicationsItem.openapi_one_of
+# =>
+# [
+# :'ListPublicationsItemInvalid',
+# :'ListPublicationsItemValidMultipleVouchers',
+# :'ListPublicationsItemValidSingleVoucher'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::PublicationsListResponseBodyPublicationsItem.build(data)
+# => #
+
+VoucherifySdk::PublicationsListResponseBodyPublicationsItem.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `ListPublicationsItemInvalid`
+- `ListPublicationsItemValidMultipleVouchers`
+- `ListPublicationsItemValidSingleVoucher`
+- `nil` (if no type matches)
+
diff --git a/docs/QualificationsApi.md b/docs/QualificationsApi.md
new file mode 100644
index 00000000..aab8a9aa
--- /dev/null
+++ b/docs/QualificationsApi.md
@@ -0,0 +1,68 @@
+# VoucherifySdk::QualificationsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**check_eligibility**](QualificationsApi.md#check_eligibility) | **POST** /v1/qualifications | Check Eligibility |
+
+
+## check_eligibility
+
+> check_eligibility(opts)
+
+Check Eligibility
+
+ 🚧 The Qualifications endpoint in the basic mode ignores the rules checking: - Limit of total redeemed discount amount per campaign - Limit of total redemptions count per campaign - Redemptions per customer - Redemptions per customer in a campaign Generate a list of redeemables that are applicable in the context of the customer and order. The new qualifications method is an improved version of Campaign Qualifications, Voucher Qualifications, and Promotions Validation API requests. The new qualification method introduces the following improvements: - Qualification results are returned faster - No limit on the number of returned redeemables - Introduces new qualification scenarios, not available in the previous version 👍 Scenario Guide Read our dedicated guide to learn about some use cases this endpoint can cover here. # Paging The Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 50 redeemables. To get the next batch of redeemables, you need to use the starting_after cursor. To process of paging the redeemables works in the following manner: - You send the first API request for Qualifications without the starting_after parameter. - The response will contain a parameter named has_more. If the parameters value is set to true, then more redeemables are available. - Get the value of the created_at parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables. - Send another API request for Qualification with the starting_after parameter set to the value taken from the created_at parameter from the last returned redeemable. - Voucherify will return the next page of redeemables. - If the has_more parameter is set to true, apply steps 3-5 to get the next page of redeemables.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::QualificationsApi.new
+opts = {
+ qualifications_check_eligibility_request_body: VoucherifySdk::QualificationsCheckEligibilityRequestBody.new # QualificationsCheckEligibilityRequestBody | Define order and customer context.
+}
+
+begin
+ # Check Eligibility
+ result = api_instance.check_eligibility(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling QualificationsApi->check_eligibility: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **qualifications_check_eligibility_request_body** | [**QualificationsCheckEligibilityRequestBody**](QualificationsCheckEligibilityRequestBody.md) | Define order and customer context. | [optional] |
+
+### Return type
+
+[**QualificationsCheckEligibilityResponseBody**](QualificationsCheckEligibilityResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/QualificationsCheckEligibilityRequestBody.md b/docs/QualificationsCheckEligibilityRequestBody.md
new file mode 100644
index 00000000..1fb6dc57
--- /dev/null
+++ b/docs/QualificationsCheckEligibilityRequestBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::QualificationsCheckEligibilityRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **order** | [**Order**](Order.md) | | [optional] |
+| **mode** | **String** | Defines which resources Voucherify will use. The `ADVANCED` mode is available after purchase only. | [optional] |
+| **tracking_id** | **String** | Is correspondent to Customer's source_id | [optional] |
+| **scenario** | **String** | Defines the scenario Voucherify should consider during the qualification process. - `ALL` - Scenario that returns all redeemables available for the customer in one API request. This scenario is used by default when no value is selected. - `CUSTOMER_WALLET` - returns vouchers applicable to the customer’s cart based on the vouchers assigned to the customer’s profile. - `AUDIENCE_ONLY` - returns all vouchers, promotion tiers, and campaigns available to the customer. Voucherify validates the rules based on the customer profile only. - `PRODUCTS` - returns all promotions available for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT` - returns all promotions available for products when a discount is defined as applicable to specific item(s). - `PROMOTION_STACKS` - returns the applicable promotion stacks. - `PRODUCTS_BY_CUSTOMER` - returns all promotions available for a customer for the products (when a discount is defined to be applied to the item or when the item is required in the validation rule). - `PRODUCTS_DISCOUNT_BY_CUSTOMER` - returns all promotions available for a customer for products when a discount is defined as applicable to specific item(s). | [optional] |
+| **options** | [**QualificationsOption**](QualificationsOption.md) | | [optional] |
+| **metadata** | **Object** | A set of key/value pairs that you can send in the request body to check against redeemables requiring **redemption** metadata validation rules to be satisfied. The validation runs against rules that are defined through the <!-- [Create Validation Rules](https://docs.voucherify.io/reference/create-validation-rules) -->[Create Validation Rules](ref:create-validation-rules) endpoint or via the Dashboard; in the _Advanced Rule Builder_ → _Advanced_ → _Redemption metadata satisfy_ or _Basic Builder_ → _Attributes match_ → _REDEMPTION METADATA_. [Read more](https://support.voucherify.io/article/148-how-to-build-a-rule). | [optional] |
+
diff --git a/docs/QualificationsCheckEligibilityResponseBody.md b/docs/QualificationsCheckEligibilityResponseBody.md
new file mode 100644
index 00000000..11748da3
--- /dev/null
+++ b/docs/QualificationsCheckEligibilityResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::QualificationsCheckEligibilityResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redeemables** | [**QualificationsRedeemables**](QualificationsRedeemables.md) | | [optional] |
+| **tracking_id** | **String** | This identifier is generated during voucher qualification based on your internal id (e.g., email, database ID). This is a hashed customer source ID. | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **stacking_rules** | [**StackingRules**](StackingRules.md) | | [optional] |
+
diff --git a/docs/QualificationsFieldConditions.md b/docs/QualificationsFieldConditions.md
new file mode 100644
index 00000000..f8835697
--- /dev/null
+++ b/docs/QualificationsFieldConditions.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::QualificationsFieldConditions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**QualificationsFiltersCondition**](QualificationsFiltersCondition.md) | | [optional] |
+
diff --git a/docs/QualificationsFiltersCondition.md b/docs/QualificationsFiltersCondition.md
new file mode 100644
index 00000000..e4a15897
--- /dev/null
+++ b/docs/QualificationsFiltersCondition.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::QualificationsFiltersCondition
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **is** | [**Any**](Any.md) | | [optional] |
+| **is_not** | [**Any**](Any.md) | | [optional] |
+| **has_value** | [**Any**](Any.md) | | [optional] |
+| **is_unknown** | [**Any**](Any.md) | | [optional] |
+| **_in** | [**Any**](Any.md) | | [optional] |
+| **not_in** | [**Any**](Any.md) | | [optional] |
+
diff --git a/docs/QualificationsOption.md b/docs/QualificationsOption.md
new file mode 100644
index 00000000..2720bc07
--- /dev/null
+++ b/docs/QualificationsOption.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::QualificationsOption
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | The maximum number of redeemables to be returned in the API request. The actual number of returned redeemables will be determined by the API. The default value is set to 5 | [optional] |
+| **starting_after** | **Time** | Cursor used for paging. | [optional] |
+| **filters** | [**QualificationsOptionFilters**](QualificationsOptionFilters.md) | | [optional] |
+| **expand** | **Array<String>** | The expand array lets you configure the parameters included in the response. Depending on the strings included in the array, the response will contain different details. | **Expand Option** | **Response Body** | |:---|:---| | [\"redeemable\"] | - Returns the redeemables' metadata. | | [\"category\"] | - Returns an expanded `categories` object, showing details about the category. | | [\"validation_rules\"] | - Returns an expanded `validation_rules` object, showing details about the validation rules. | | [optional] |
+| **sorting_rule** | **String** | Is used to determine the order in which data is displayed in the result array. - `DEFAULT` - Sorting descending by `created_at` - `BEST_DEAL` - Sorting descending by `total_applied_discount_amount` - `LEAST_DEAL` - Sorting ascending by `total_applied_discount_amount` | [optional] |
+
diff --git a/docs/QualificationsOptionFilters.md b/docs/QualificationsOptionFilters.md
new file mode 100644
index 00000000..374377d2
--- /dev/null
+++ b/docs/QualificationsOptionFilters.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::QualificationsOptionFilters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **junction** | [**Junction**](Junction.md) | | [optional] |
+| **category_id** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] |
+| **campaign_id** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] |
+| **resource_id** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] |
+| **resource_type** | [**QualificationsOptionFiltersResourceType**](QualificationsOptionFiltersResourceType.md) | | [optional] |
+| **voucher_type** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] |
+| **code** | [**QualificationsFieldConditions**](QualificationsFieldConditions.md) | | [optional] |
+
diff --git a/docs/QualificationsOptionFiltersResourceType.md b/docs/QualificationsOptionFiltersResourceType.md
new file mode 100644
index 00000000..ed312dfb
--- /dev/null
+++ b/docs/QualificationsOptionFiltersResourceType.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::QualificationsOptionFiltersResourceType
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**QualificationsOptionFiltersResourceTypeConditions**](QualificationsOptionFiltersResourceTypeConditions.md) | | [optional] |
+
diff --git a/docs/QualificationsOptionFiltersResourceTypeConditions.md b/docs/QualificationsOptionFiltersResourceTypeConditions.md
new file mode 100644
index 00000000..e9506a9f
--- /dev/null
+++ b/docs/QualificationsOptionFiltersResourceTypeConditions.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::QualificationsOptionFiltersResourceTypeConditions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **is** | [**ResourceTypes**](ResourceTypes.md) | | [optional] |
+| **is_not** | [**ResourceTypes**](ResourceTypes.md) | | [optional] |
+| **_in** | [**Array<ResourceTypes>**](ResourceTypes.md) | Array of qualified redeemables. Accepts more than one value. Returns the resource types entered in the array. | [optional] |
+| **not_in** | [**Array<ResourceTypes>**](ResourceTypes.md) | Array of qualified redeemables. Accepts more than one value. Returns the resource types except those entered in the array. | [optional] |
+
diff --git a/docs/QualificationsRedeemable.md b/docs/QualificationsRedeemable.md
new file mode 100644
index 00000000..2db0724f
--- /dev/null
+++ b/docs/QualificationsRedeemable.md
@@ -0,0 +1,23 @@
+# VoucherifySdk::QualificationsRedeemable
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Id of the redeemable. | [optional] |
+| **object** | **String** | Object type of the redeemable. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | [optional] |
+| **result** | [**RedeemableResult**](RedeemableResult.md) | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **validation_rule_id** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | [optional] |
+| **applicable_to** | [**ApplicableToResultList**](ApplicableToResultList.md) | | [optional] |
+| **inapplicable_to** | [**InapplicableToResultList**](InapplicableToResultList.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | List of category information. | [optional] |
+| **banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | [optional] |
+| **name** | **String** | Name of the redeemable. | [optional] |
+| **campaign_name** | **String** | Name of the campaign associated to the redeemable. This field is available only if object is not `campaign` | [optional] |
+| **campaign_id** | **String** | Id of the campaign associated to the redeemable. This field is available only if object is not `campaign` | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+| **redeemables** | [**Array<QualificationsRedeemableBase>**](QualificationsRedeemableBase.md) | | [optional] |
+
diff --git a/docs/QualificationsRedeemableBase.md b/docs/QualificationsRedeemableBase.md
new file mode 100644
index 00000000..ed69dd29
--- /dev/null
+++ b/docs/QualificationsRedeemableBase.md
@@ -0,0 +1,22 @@
+# VoucherifySdk::QualificationsRedeemableBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Id of the redeemable. | [optional] |
+| **object** | **String** | Object type of the redeemable. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | [optional] |
+| **result** | [**RedeemableResult**](RedeemableResult.md) | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **validation_rule_id** | **String** | A unique validation rule identifier assigned by the Voucherify API. The validation rule is verified before points are added to the balance. | [optional] |
+| **applicable_to** | [**ApplicableToResultList**](ApplicableToResultList.md) | | [optional] |
+| **inapplicable_to** | [**InapplicableToResultList**](InapplicableToResultList.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | List of category information. | [optional] |
+| **banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | [optional] |
+| **name** | **String** | Name of the redeemable. | [optional] |
+| **campaign_name** | **String** | Name of the campaign associated to the redeemable. This field is available only if object is not `campaign` | [optional] |
+| **campaign_id** | **String** | Id of the campaign associated to the redeemable. This field is available only if object is not `campaign` | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+
diff --git a/docs/QualificationsRedeemables.md b/docs/QualificationsRedeemables.md
new file mode 100644
index 00000000..e40a5a49
--- /dev/null
+++ b/docs/QualificationsRedeemables.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::QualificationsRedeemables
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. Default is `list`. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of qualified redeemables. | [default to 'data'] |
+| **data** | [**Array<QualificationsRedeemable>**](QualificationsRedeemable.md) | Array of qualified redeemables. | |
+| **total** | **Integer** | The number of redeemables returned in the API request. | |
+| **has_more** | **Boolean** | As results are always limited, the `has_more` flag indicates whether there are more records for given parameters. This let's you know if you are able to run another request (with different options) to get more records returned in the results. | |
+| **more_starting_after** | **Time** | Timestamp representing the date and time to use in starting_after cursor to get more redeemables. | [optional] |
+
diff --git a/docs/QualificationsStackingRules.md b/docs/QualificationsStackingRules.md
new file mode 100644
index 00000000..b9eccdf6
--- /dev/null
+++ b/docs/QualificationsStackingRules.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::QualificationsStackingRules
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redeemables_limit** | **Integer** | Defines how many redeemables can be sent in one stacking request (note: more redeemables means more processing time!). | [default to 30] |
+| **applicable_redeemables_limit** | **Integer** | Defines how many of the sent redeemables will be applied to the order. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be labelled as SKIPPED. | [default to 5] |
+| **applicable_exclusive_redeemables_limit** | **Integer** | Defines how many redeemables with an exclusive category can be applied in one request. | [default to 1] |
+| **exclusive_categories** | **Array<String>** | Lists all exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint. | |
+| **joint_categories** | **Array<String>** | Lists all joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns. | |
+
diff --git a/docs/RedeemGiftCard.md b/docs/RedeemGiftCard.md
new file mode 100644
index 00000000..422721a5
--- /dev/null
+++ b/docs/RedeemGiftCard.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::RedeemGiftCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | Redeemable object type. | [default to 'voucher'] |
+| **id** | **String** | Redeemable code. | |
+| **gift** | [**RedeemGiftCardAllOfGift**](RedeemGiftCardAllOfGift.md) | | [optional] |
+
diff --git a/docs/RedeemGiftCardAllOfGift.md b/docs/RedeemGiftCardAllOfGift.md
new file mode 100644
index 00000000..f7222d9e
--- /dev/null
+++ b/docs/RedeemGiftCardAllOfGift.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RedeemGiftCardAllOfGift
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **credits** | **Integer** | The number of credits that the user wants to use from the gift card to fulfill the order. The value of credits cannot be higher than the current balance on the gift card. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] |
+
diff --git a/docs/RedeemLoyaltyCard.md b/docs/RedeemLoyaltyCard.md
new file mode 100644
index 00000000..6b670a93
--- /dev/null
+++ b/docs/RedeemLoyaltyCard.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::RedeemLoyaltyCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | Redeemable object type. | [default to 'voucher'] |
+| **id** | **String** | Redeemable code. | |
+| **reward** | [**RedeemLoyaltyCardAllOfReward**](RedeemLoyaltyCardAllOfReward.md) | | [optional] |
+
diff --git a/docs/RedeemLoyaltyCardAllOfReward.md b/docs/RedeemLoyaltyCardAllOfReward.md
new file mode 100644
index 00000000..597f7978
--- /dev/null
+++ b/docs/RedeemLoyaltyCardAllOfReward.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedeemLoyaltyCardAllOfReward
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward ID assigned by Voucherify. The reward must be assigned to the campaign in order for the user to be able to use the reward. | [optional] |
+| **points** | **Integer** | The number of loyalty points that the user wants to spend in order to fulfill the order using a **pay with points** reward. The number of points cannot be higher than the current balance on the loyalty card. | [optional] |
+
diff --git a/docs/RedeemPromotionStack.md b/docs/RedeemPromotionStack.md
new file mode 100644
index 00000000..38e129fe
--- /dev/null
+++ b/docs/RedeemPromotionStack.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedeemPromotionStack
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | Redeemable object type. | [default to 'promotion_stack'] |
+| **id** | **String** | Promotion stack unique id, such as: stack_KxSD0GahLUg9ULB6TseGfUHJ | |
+
diff --git a/docs/RedeemPromotionTier.md b/docs/RedeemPromotionTier.md
new file mode 100644
index 00000000..0d635766
--- /dev/null
+++ b/docs/RedeemPromotionTier.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedeemPromotionTier
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | Redeemable object type. | [default to 'promotion_tier'] |
+| **id** | **String** | Promotion tier unique id, such as: promo_Mwy9XpA0TLctSGriM5kum0qp | |
+
diff --git a/docs/RedeemVoucher.md b/docs/RedeemVoucher.md
new file mode 100644
index 00000000..fade8ec4
--- /dev/null
+++ b/docs/RedeemVoucher.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedeemVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | Redeemable object type. | [default to 'voucher'] |
+| **id** | **String** | Redeemable code. | |
+
diff --git a/docs/RedeemableGift.md b/docs/RedeemableGift.md
new file mode 100644
index 00000000..11f8254d
--- /dev/null
+++ b/docs/RedeemableGift.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedeemableGift
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **balance** | **Float** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] |
+| **credits** | **Float** | The number of credits that the user wants to use from the gift card to fulfil the order. The value of credits cannot be higher than the current balance on the gift card. If the user gives more points than he has on the gift card, the application will return an error code in response. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] |
+
diff --git a/docs/RedeemableLoyaltyCard.md b/docs/RedeemableLoyaltyCard.md
new file mode 100644
index 00000000..7e3812c0
--- /dev/null
+++ b/docs/RedeemableLoyaltyCard.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::RedeemableLoyaltyCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | Total points incurred over lifespan of loyalty card. | [optional] |
+| **balance** | **Integer** | Points available for reward redemption. | [optional] |
+| **exchange_ratio** | **Float** | The cash equivalent of the points defined in the points_ratio property. | [optional] |
+| **points_ratio** | **Integer** | The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property. | [optional] |
+| **transfers** | [**Array<LoyaltiesTransferPoints>**](LoyaltiesTransferPoints.md) | | [optional] |
+
diff --git a/docs/RedeemableResult.md b/docs/RedeemableResult.md
new file mode 100644
index 00000000..43a92271
--- /dev/null
+++ b/docs/RedeemableResult.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::RedeemableResult
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **gift** | [**RedeemableGift**](RedeemableGift.md) | | [optional] |
+| **loyalty_card** | [**RedeemableLoyaltyCard**](RedeemableLoyaltyCard.md) | | [optional] |
+| **error** | [**Error**](Error.md) | | [optional] |
+
diff --git a/docs/RedeemableResultGiftCard.md b/docs/RedeemableResultGiftCard.md
new file mode 100644
index 00000000..cb391500
--- /dev/null
+++ b/docs/RedeemableResultGiftCard.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RedeemableResultGiftCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **gift** | [**RedeemableResultGiftCardGift**](RedeemableResultGiftCardGift.md) | | [optional] |
+
diff --git a/docs/RedeemableResultGiftCardGift.md b/docs/RedeemableResultGiftCardGift.md
new file mode 100644
index 00000000..c374b431
--- /dev/null
+++ b/docs/RedeemableResultGiftCardGift.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RedeemableResultGiftCardGift
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **credits** | **Integer** | Total number of gift card credits to be applied in the redemption expressed as the smallest currency unit (e.g. 100 cents for $1.00). | [optional] |
+
diff --git a/docs/RedeemableResultLoyaltyCard.md b/docs/RedeemableResultLoyaltyCard.md
new file mode 100644
index 00000000..cf44c3e8
--- /dev/null
+++ b/docs/RedeemableResultLoyaltyCard.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RedeemableResultLoyaltyCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **loyalty_card** | [**RedeemableResultLoyaltyCardLoyaltyCard**](RedeemableResultLoyaltyCardLoyaltyCard.md) | | [optional] |
+
diff --git a/docs/RedeemableResultLoyaltyCardLoyaltyCard.md b/docs/RedeemableResultLoyaltyCardLoyaltyCard.md
new file mode 100644
index 00000000..921179cf
--- /dev/null
+++ b/docs/RedeemableResultLoyaltyCardLoyaltyCard.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RedeemableResultLoyaltyCardLoyaltyCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | Total number of loyalty points to be applied in the redemption. | [optional] |
+
diff --git a/docs/RedeemableResultPromotionStack.md b/docs/RedeemableResultPromotionStack.md
new file mode 100644
index 00000000..7fbaa728
--- /dev/null
+++ b/docs/RedeemableResultPromotionStack.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RedeemableResultPromotionStack
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **loyalty_card** | [**RedeemableResultLoyaltyCardLoyaltyCard**](RedeemableResultLoyaltyCardLoyaltyCard.md) | | [optional] |
+
diff --git a/docs/RedeemableResultPromotionTier.md b/docs/RedeemableResultPromotionTier.md
new file mode 100644
index 00000000..0bafe2e0
--- /dev/null
+++ b/docs/RedeemableResultPromotionTier.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RedeemableResultPromotionTier
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **discount** | [**RedeemableResultPromotionTierDiscount**](RedeemableResultPromotionTierDiscount.md) | | [optional] |
+
diff --git a/docs/RedeemableResultPromotionTierDiscount.md b/docs/RedeemableResultPromotionTierDiscount.md
new file mode 100644
index 00000000..3241653c
--- /dev/null
+++ b/docs/RedeemableResultPromotionTierDiscount.md
@@ -0,0 +1,55 @@
+# VoucherifySdk::RedeemableResultPromotionTierDiscount
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::RedeemableResultPromotionTierDiscount.openapi_one_of
+# =>
+# [
+# :'DiscountAmount',
+# :'DiscountFixed',
+# :'DiscountPercent',
+# :'DiscountUnit',
+# :'DiscountUnitMultiple'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::RedeemableResultPromotionTierDiscount.build(data)
+# => #
+
+VoucherifySdk::RedeemableResultPromotionTierDiscount.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `DiscountAmount`
+- `DiscountFixed`
+- `DiscountPercent`
+- `DiscountUnit`
+- `DiscountUnitMultiple`
+- `nil` (if no type matches)
+
diff --git a/docs/RedeemableResultVoucherCode.md b/docs/RedeemableResultVoucherCode.md
new file mode 100644
index 00000000..f1051972
--- /dev/null
+++ b/docs/RedeemableResultVoucherCode.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RedeemableResultVoucherCode
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **discount** | [**RedeemableResultPromotionTierDiscount**](RedeemableResultPromotionTierDiscount.md) | | [optional] |
+
diff --git a/docs/Redemption.md b/docs/Redemption.md
new file mode 100644
index 00000000..d1e02866
--- /dev/null
+++ b/docs/Redemption.md
@@ -0,0 +1,30 @@
+# VoucherifySdk::Redemption
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique redemption ID. | |
+| **object** | **String** | The type of object represented by the JSON | [default to 'redemption'] |
+| **date** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | |
+| **customer_id** | **String** | Unique customer ID of the redeeming customer. | |
+| **tracking_id** | **String** | Hashed customer source ID. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **redemption** | **String** | Unique redemption ID of the parent redemption. | |
+| **result** | **String** | Redemption result. | |
+| **status** | **String** | Redemption status. | |
+| **related_redemptions** | [**RedemptionRelatedRedemptions**](RedemptionRelatedRedemptions.md) | | [optional] |
+| **failure_code** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] |
+| **failure_message** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] |
+| **order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | |
+| **channel** | [**RedemptionChannel**](RedemptionChannel.md) | | |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | |
+| **related_object_type** | **String** | Defines the related object. | |
+| **related_object_id** | **String** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | |
+| **voucher** | [**Voucher**](Voucher.md) | | [optional] |
+| **promotion_tier** | [**PromotionTier**](PromotionTier.md) | | [optional] |
+| **reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional] |
+| **gift** | [**RedemptionGift**](RedemptionGift.md) | | [optional] |
+| **loyalty_card** | [**RedemptionLoyaltyCard**](RedemptionLoyaltyCard.md) | | [optional] |
+
diff --git a/docs/RedemptionChannel.md b/docs/RedemptionChannel.md
new file mode 100644
index 00000000..42329b0e
--- /dev/null
+++ b/docs/RedemptionChannel.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionChannel
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **channel_id** | **String** | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. | [optional] |
+| **channel_type** | **String** | The source of the channel for the redemption. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional] |
+
diff --git a/docs/RedemptionGift.md b/docs/RedemptionGift.md
new file mode 100644
index 00000000..bd05fa92
--- /dev/null
+++ b/docs/RedemptionGift.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RedemptionGift
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **amount** | **Integer** | The amount subtracted from the gift card expressed as the smallest currency unit (e.g. 100 cents for $1.00). | [optional] |
+
diff --git a/docs/RedemptionInternal.md b/docs/RedemptionInternal.md
new file mode 100644
index 00000000..67e72692
--- /dev/null
+++ b/docs/RedemptionInternal.md
@@ -0,0 +1,34 @@
+# VoucherifySdk::RedemptionInternal
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique redemption ID. | [optional] |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the `redemption`. | [optional][default to 'redemption'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the redemption was created in ISO 8601 format. | [optional] |
+| **tracking_id** | **String** | Hashed customer source ID. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | [optional] |
+| **channel_type** | **String** | The source of the channel for the redemption rollback. A `USER` corresponds to the Voucherify Dashboard and an `API` corresponds to the API. | [optional] |
+| **channel_id** | **String** | Unique channel ID of the user performing the redemption. This is either a user ID from a user using the Voucherify Dashboard or an X-APP-Id of a user using the API. | [optional] |
+| **failure_code** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] |
+| **failure_message** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **previous_order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | [optional] |
+| **result** | **String** | Redemption result. | [optional] |
+| **status** | **String** | Redemption status. | [optional] |
+| **related_redemptions** | [**RedemptionInternalRelatedRedemptions**](RedemptionInternalRelatedRedemptions.md) | | [optional] |
+| **parent_redemption_id** | **String** | Unique redemption ID of the parent redemption. | [optional] |
+| **redemption** | **String** | Unique redemption ID of the parent redemption. | [optional] |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **customer_id** | **String** | Unique customer ID of the redeeming customer. | [optional] |
+| **related_object_type** | **String** | Defines the related object. | [optional] |
+| **related_object_id** | **String** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | [optional] |
+| **related_object_parent_id** | **String** | Unique related parent object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | [optional] |
+| **campaign_name** | **String** | Campaign name | [optional] |
+| **voucher** | [**Voucher**](Voucher.md) | | [optional] |
+| **promotion_tier** | [**PromotionTier**](PromotionTier.md) | | [optional] |
+
diff --git a/docs/RedemptionInternalRelatedRedemptions.md b/docs/RedemptionInternalRelatedRedemptions.md
new file mode 100644
index 00000000..ad085319
--- /dev/null
+++ b/docs/RedemptionInternalRelatedRedemptions.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionInternalRelatedRedemptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **rollbacks** | [**Array<RedemptionInternalRelatedRedemptionsRollbacksItem>**](RedemptionInternalRelatedRedemptionsRollbacksItem.md) | | [optional] |
+| **redemptions** | [**Array<RedemptionInternalRelatedRedemptionsItem>**](RedemptionInternalRelatedRedemptionsItem.md) | | [optional] |
+
diff --git a/docs/RedemptionInternalRelatedRedemptionsItem.md b/docs/RedemptionInternalRelatedRedemptionsItem.md
new file mode 100644
index 00000000..212a3591
--- /dev/null
+++ b/docs/RedemptionInternalRelatedRedemptionsItem.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionInternalRelatedRedemptionsItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique redemption ID. | [optional] |
+| **date** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | [optional] |
+
diff --git a/docs/RedemptionInternalRelatedRedemptionsRollbacksItem.md b/docs/RedemptionInternalRelatedRedemptionsRollbacksItem.md
new file mode 100644
index 00000000..8cf5f1fc
--- /dev/null
+++ b/docs/RedemptionInternalRelatedRedemptionsRollbacksItem.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionInternalRelatedRedemptionsRollbacksItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique rollback redemption ID. | [optional] |
+| **date** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | [optional] |
+
diff --git a/docs/RedemptionLoyaltyCard.md b/docs/RedemptionLoyaltyCard.md
new file mode 100644
index 00000000..ab01f2f3
--- /dev/null
+++ b/docs/RedemptionLoyaltyCard.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RedemptionLoyaltyCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | Number of points being added back to the loyalty card for the reward redemption rollback. | [optional] |
+
diff --git a/docs/RedemptionRelatedRedemptions.md b/docs/RedemptionRelatedRedemptions.md
new file mode 100644
index 00000000..8af6d7ee
--- /dev/null
+++ b/docs/RedemptionRelatedRedemptions.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionRelatedRedemptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **rollbacks** | [**Array<RedemptionRelatedRedemptionsRollbacksItem>**](RedemptionRelatedRedemptionsRollbacksItem.md) | | [optional] |
+| **redemptions** | [**Array<RedemptionRelatedRedemptionsItem>**](RedemptionRelatedRedemptionsItem.md) | | [optional] |
+
diff --git a/docs/RedemptionRelatedRedemptionsItem.md b/docs/RedemptionRelatedRedemptionsItem.md
new file mode 100644
index 00000000..fb94aa2e
--- /dev/null
+++ b/docs/RedemptionRelatedRedemptionsItem.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionRelatedRedemptionsItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique redemption ID. | [optional] |
+| **date** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | [optional] |
+
diff --git a/docs/RedemptionRelatedRedemptionsRollbacksItem.md b/docs/RedemptionRelatedRedemptionsRollbacksItem.md
new file mode 100644
index 00000000..32ceee3d
--- /dev/null
+++ b/docs/RedemptionRelatedRedemptionsRollbacksItem.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionRelatedRedemptionsRollbacksItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique rollback redemption ID. | [optional] |
+| **date** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | [optional] |
+
diff --git a/docs/RedemptionRewardResult.md b/docs/RedemptionRewardResult.md
new file mode 100644
index 00000000..51b583f2
--- /dev/null
+++ b/docs/RedemptionRewardResult.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::RedemptionRewardResult
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | |
+| **assignment_id** | **String** | Unique reward assignment ID assigned by Voucherify. | |
+| **voucher** | [**RedemptionRewardResultVoucher**](RedemptionRewardResultVoucher.md) | | |
+| **product** | [**RedemptionRewardResultProduct**](RedemptionRewardResultProduct.md) | | |
+| **sku** | [**RedemptionRewardResultSku**](RedemptionRewardResultSku.md) | | |
+| **loyalty_tier_id** | **String** | Unique loyalty tier ID assigned by Voucherify. | |
+| **id** | **String** | Unique reward ID. | [optional] |
+| **name** | **String** | Name of the reward. | [optional] |
+| **object** | **String** | The type of object represented by the JSON | [optional][default to 'reward'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the redemption was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp in ISO 8601 format indicating when the reward was updated. | [optional] |
+| **parameters** | [**RedemptionRewardResultParameters**](RedemptionRewardResultParameters.md) | | [optional] |
+| **type** | **String** | Reward type. | [optional] |
+
diff --git a/docs/RedemptionRewardResultParameters.md b/docs/RedemptionRewardResultParameters.md
new file mode 100644
index 00000000..d97171d5
--- /dev/null
+++ b/docs/RedemptionRewardResultParameters.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::RedemptionRewardResultParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign** | [**RedemptionRewardResultParametersCampaign**](RedemptionRewardResultParametersCampaign.md) | | [optional] |
+| **product** | [**RedemptionRewardResultParametersProduct**](RedemptionRewardResultParametersProduct.md) | | [optional] |
+| **coin** | [**RedemptionRewardResultParametersCoin**](RedemptionRewardResultParametersCoin.md) | | [optional] |
+
diff --git a/docs/RedemptionRewardResultParametersCampaign.md b/docs/RedemptionRewardResultParametersCampaign.md
new file mode 100644
index 00000000..50fae226
--- /dev/null
+++ b/docs/RedemptionRewardResultParametersCampaign.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::RedemptionRewardResultParametersCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Campaign unique ID. | [optional] |
+| **balance** | **Integer** | Points available for reward redemption. | [optional] |
+| **type** | **String** | Defines the type of the campaign. | [optional] |
+
diff --git a/docs/RedemptionRewardResultParametersCoin.md b/docs/RedemptionRewardResultParametersCoin.md
new file mode 100644
index 00000000..e0bcb18f
--- /dev/null
+++ b/docs/RedemptionRewardResultParametersCoin.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionRewardResultParametersCoin
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **exchange_ratio** | **Integer** | The cash equivalent of the points defined in the `points_ratio` property. | [optional] |
+| **points_ratio** | **Integer** | The number of loyalty points that will map to the predefined cash amount defined by the `exchange_ratio` property. | [optional] |
+
diff --git a/docs/RedemptionRewardResultParametersProduct.md b/docs/RedemptionRewardResultParametersProduct.md
new file mode 100644
index 00000000..1efcae0f
--- /dev/null
+++ b/docs/RedemptionRewardResultParametersProduct.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionRewardResultParametersProduct
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique product ID, assigned by Voucherify. | [optional] |
+| **sku_id** | **String** | A unique SKU ID assigned by Voucherify. | [optional] |
+
diff --git a/docs/RedemptionRewardResultProduct.md b/docs/RedemptionRewardResultProduct.md
new file mode 100644
index 00000000..3169519b
--- /dev/null
+++ b/docs/RedemptionRewardResultProduct.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::RedemptionRewardResultProduct
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique product ID assigned by Voucherify. | |
+| **source_id** | **String** | Unique product source ID. | |
+| **name** | **String** | Unique user-defined product name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **attributes** | **Array<String>** | A list of product attributes whose values you can customize for given SKUs: `[\"color\",\"size\",\"ranking\"]`. Each child SKU can have a unique value for a given attribute. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the product. A set of key/value pairs that you can attach to a product object. It can be useful for storing additional information about the product in a structured format. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the product image. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the product was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the product was updated in ISO 8601 format. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the product. | [default to 'product'] |
+| **skus** | [**SkusListForProduct**](SkusListForProduct.md) | | [optional] |
+
diff --git a/docs/RedemptionRewardResultSku.md b/docs/RedemptionRewardResultSku.md
new file mode 100644
index 00000000..967ca767
--- /dev/null
+++ b/docs/RedemptionRewardResultSku.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::RedemptionRewardResultSku
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | |
+| **source_id** | **String** | A unique SKU identifier from your inventory system. | |
+| **product_id** | **String** | The parent product's unique ID. | |
+| **sku** | **String** | Unique user-defined SKU name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **currency** | **String** | SKU price currency. | [optional] |
+| **attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the SKU was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the SKU was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the `SKU`. | [default to 'sku'] |
+
diff --git a/docs/RedemptionRewardResultVoucher.md b/docs/RedemptionRewardResultVoucher.md
new file mode 100644
index 00000000..29717cf9
--- /dev/null
+++ b/docs/RedemptionRewardResultVoucher.md
@@ -0,0 +1,37 @@
+# VoucherifySdk::RedemptionRewardResultVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] |
+| **code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] |
+| **campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] |
+| **campaign_id** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] |
+| **category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] |
+| **category_id** | **String** | Unique category ID assigned by Voucherify. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | Contains details about the category. | [optional] |
+| **type** | **String** | Defines the type of the voucher. | [optional] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **gift** | [**VoucherGift**](VoucherGift.md) | | [optional] |
+| **loyalty_card** | [**VoucherLoyaltyCard**](VoucherLoyaltyCard.md) | | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**VoucherValidityTimeframe**](VoucherValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] |
+| **additional_info** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] |
+| **assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the voucher was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] |
+| **holder_id** | **String** | Unique customer ID of voucher owner. | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. Default is `voucher`. | [optional][default to 'voucher'] |
+| **distributions** | **Array<Object>** | | [optional] |
+| **deleted** | **Boolean** | Flag indicating whether this voucher is deleted. | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+| **publish** | [**VoucherPublish**](VoucherPublish.md) | | [optional] |
+| **redemption** | [**VoucherRedemption**](VoucherRedemption.md) | | [optional] |
+
diff --git a/docs/RedemptionRollback.md b/docs/RedemptionRollback.md
new file mode 100644
index 00000000..2710b7ab
--- /dev/null
+++ b/docs/RedemptionRollback.md
@@ -0,0 +1,31 @@
+# VoucherifySdk::RedemptionRollback
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique redemption ID. | |
+| **object** | **String** | The type of object represented by the JSON | [default to 'redemption_rollback'] |
+| **date** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | |
+| **customer_id** | **String** | Unique customer ID of the redeeming customer. | |
+| **tracking_id** | **String** | Hashed customer source ID. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **redemption** | **String** | Unique redemption ID of the parent redemption. | |
+| **reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | [optional] |
+| **result** | **String** | Redemption result. | |
+| **status** | **String** | Redemption status. | |
+| **related_redemptions** | [**RedemptionRollbackRelatedRedemptions**](RedemptionRollbackRelatedRedemptions.md) | | [optional] |
+| **failure_code** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] |
+| **failure_message** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] |
+| **order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | |
+| **channel** | [**RedemptionChannel**](RedemptionChannel.md) | | |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | |
+| **related_object_type** | **String** | Defines the related object. | |
+| **related_object_id** | **String** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | |
+| **voucher** | [**Voucher**](Voucher.md) | | [optional] |
+| **promotion_tier** | [**PromotionTier**](PromotionTier.md) | | [optional] |
+| **reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional] |
+| **gift** | [**RedemptionGift**](RedemptionGift.md) | | [optional] |
+| **loyalty_card** | [**RedemptionLoyaltyCard**](RedemptionLoyaltyCard.md) | | [optional] |
+
diff --git a/docs/RedemptionRollbackRelatedRedemptions.md b/docs/RedemptionRollbackRelatedRedemptions.md
new file mode 100644
index 00000000..e817c47e
--- /dev/null
+++ b/docs/RedemptionRollbackRelatedRedemptions.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionRollbackRelatedRedemptions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **rollbacks** | [**Array<RedemptionRollbackRelatedRedemptionsRollbacksItem>**](RedemptionRollbackRelatedRedemptionsRollbacksItem.md) | | [optional] |
+| **redemptions** | [**Array<RedemptionRollbackRelatedRedemptionsItem>**](RedemptionRollbackRelatedRedemptionsItem.md) | | [optional] |
+
diff --git a/docs/RedemptionRollbackRelatedRedemptionsItem.md b/docs/RedemptionRollbackRelatedRedemptionsItem.md
new file mode 100644
index 00000000..a0a26de5
--- /dev/null
+++ b/docs/RedemptionRollbackRelatedRedemptionsItem.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionRollbackRelatedRedemptionsItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique redemption ID. | [optional] |
+| **date** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | [optional] |
+
diff --git a/docs/RedemptionRollbackRelatedRedemptionsRollbacksItem.md b/docs/RedemptionRollbackRelatedRedemptionsRollbacksItem.md
new file mode 100644
index 00000000..8a092abf
--- /dev/null
+++ b/docs/RedemptionRollbackRelatedRedemptionsRollbacksItem.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RedemptionRollbackRelatedRedemptionsRollbacksItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique rollback redemption ID. | [optional] |
+| **date** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | [optional] |
+
diff --git a/docs/RedemptionsApi.md b/docs/RedemptionsApi.md
new file mode 100644
index 00000000..1fb70b17
--- /dev/null
+++ b/docs/RedemptionsApi.md
@@ -0,0 +1,395 @@
+# VoucherifySdk::RedemptionsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**get_redemption**](RedemptionsApi.md#get_redemption) | **GET** /v1/redemptions/{redemptionId} | Get Redemption |
+| [**get_voucher_redemptions**](RedemptionsApi.md#get_voucher_redemptions) | **GET** /v1/vouchers/{code}/redemption | Get Voucher's Redemptions |
+| [**list_redemptions**](RedemptionsApi.md#list_redemptions) | **GET** /v1/redemptions | List Redemptions |
+| [**redeem_stacked_discounts**](RedemptionsApi.md#redeem_stacked_discounts) | **POST** /v1/redemptions | Redeem Stackable Discounts |
+| [**rollback_redemption**](RedemptionsApi.md#rollback_redemption) | **POST** /v1/redemptions/{redemptionId}/rollback | Rollback Redemption |
+| [**rollback_stacked_redemptions**](RedemptionsApi.md#rollback_stacked_redemptions) | **POST** /v1/redemptions/{parentRedemptionId}/rollbacks | Rollback Stackable Redemptions |
+
+
+## get_redemption
+
+> get_redemption(redemption_id)
+
+Get Redemption
+
+Return a redemption or redemption rollback object. This object can either be a successfull or failed redemption or redemption rollback.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RedemptionsApi.new
+redemption_id = 'redemption_id_example' # String | ID of previously created redemption.
+
+begin
+ # Get Redemption
+ result = api_instance.get_redemption(redemption_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RedemptionsApi->get_redemption: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redemption_id** | **String** | ID of previously created redemption. | |
+
+### Return type
+
+[**RedemptionsGetResponseBody**](RedemptionsGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## get_voucher_redemptions
+
+> get_voucher_redemptions(code)
+
+Get Voucher's Redemptions
+
+Retrieve the number of times a voucher was redeemed and each of the redemption details.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RedemptionsApi.new
+code = 'code_example' # String | A **code** that identifies the voucher.
+
+begin
+ # Get Voucher's Redemptions
+ result = api_instance.get_voucher_redemptions(code)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RedemptionsApi->get_voucher_redemptions: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | A **code** that identifies the voucher. | |
+
+### Return type
+
+[**VouchersRedemptionGetResponseBody**](VouchersRedemptionGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_redemptions
+
+> list_redemptions(opts)
+
+List Redemptions
+
+Returns a list of redemptions previously created. The redemptions are returned in a sorted order, with the most recent redemptions appearing first. The response returns a list of redemptions of all vouchers. # Filtering results The result can be narrowed according to specified (or default) filters, for example, you can sort redemptions by date: https://api.voucherify.io/v1/redemptions?limit 3&[created_at][before] 2017-09-08T13:52:18.227Z. A filter based on the object created_at field narrows down the results and lists redemptions done before or after a particular date time. You can use the following options: [created_at][after], [created_at][before]. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z. # Failed Redemptions A redemption may fail for various reasons. You can figure out an exact reason from the failure_code: - resource_not_found - voucher with given code does not exist - voucher_not_active - voucher is not active yet (before start date) - voucher_expired - voucher has already expired (after expiration date) - voucher_disabled - voucher has been disabled (active: false) - quantity_exceeded - vouchers redemptions limit has been exceeded - gift_amount_exceeded - gift amount has been exceeded - customer_rules_violated - customer did not match the segment - order_rules_violated - order did not match validation rules - invalid_order - order was specified incorrectly - invalid_amount - order amount was specified incorrectly - missing_amount - order amount was not specified - missing_order_items - order items were not specified - missing_customer - customer was not specified
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RedemptionsApi.new
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ result: 'result_example', # String | A filter on the list based on the redemption result. Available options are: SUCCESS, FAILURE. You can provide multiple values by repeating the param.
+ campaign: 'campaign_example', # String | A filter by the campaign **name** that the redemption resources originate from.
+ customer: 'customer_example', # String | Return redemptions performed by the customer with given id or source_id.
+ order: VoucherifySdk::ParameterOrderListRedemptions::CREATED_AT, # ParameterOrderListRedemptions | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ created_at: VoucherifySdk::ParameterCreatedBeforeAfter.new, # ParameterCreatedBeforeAfter | A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z
+ filters: VoucherifySdk::ParameterFiltersListRedemptions.new # ParameterFiltersListRedemptions | Filters for listing responses.
+}
+
+begin
+ # List Redemptions
+ result = api_instance.list_redemptions(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RedemptionsApi->list_redemptions: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **result** | **String** | A filter on the list based on the redemption result. Available options are: SUCCESS, FAILURE. You can provide multiple values by repeating the param. | [optional] |
+| **campaign** | **String** | A filter by the campaign **name** that the redemption resources originate from. | [optional] |
+| **customer** | **String** | Return redemptions performed by the customer with given id or source_id. | [optional] |
+| **order** | [**ParameterOrderListRedemptions**](.md) | Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+| **created_at** | [**ParameterCreatedBeforeAfter**](.md) | A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z | [optional] |
+| **filters** | [**ParameterFiltersListRedemptions**](.md) | Filters for listing responses. | [optional] |
+
+### Return type
+
+[**RedemptionsListResponseBody**](RedemptionsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## redeem_stacked_discounts
+
+> redeem_stacked_discounts(opts)
+
+Redeem Stackable Discounts
+
+# How API returns calculated discounts and order amounts in the response In the table below, you can see the logic the API follows to calculate discounts and amounts: 📘 Rollbacks You cant roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your rollback request. 📘 Also available on client-side This method is also accessible through public keys which you can use in client-side apps: mobile and web browser apps. Go to the dedicated endpoint to learn more. - Use X-Client-Application-Id as the application ID header. - Use X-Client-Token as the appliction secret key header. - Use client-side base URL. - Use an origin header for your custom domain.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RedemptionsApi.new
+opts = {
+ redemptions_redeem_request_body: VoucherifySdk::RedemptionsRedeemRequestBody.new({redeemables: [VoucherifySdk::RedeemGiftCard.new({object: 'voucher', id: 'id_example'})]}) # RedemptionsRedeemRequestBody |
+}
+
+begin
+ # Redeem Stackable Discounts
+ result = api_instance.redeem_stacked_discounts(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RedemptionsApi->redeem_stacked_discounts: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redemptions_redeem_request_body** | [**RedemptionsRedeemRequestBody**](RedemptionsRedeemRequestBody.md) | | [optional] |
+
+### Return type
+
+[**RedemptionsRedeemResponseBody**](RedemptionsRedeemResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## rollback_redemption
+
+> rollback_redemption(redemption_id, opts)
+
+Rollback Redemption
+
+Your business logic may include a case when you need to undo a redemption. You can revert a redemption by calling this API endpoint. # Effect The operation - creates a rollback entry in vouchers redemption history (redemption.redemption_entries) and - gives 1 redemption back to the pool (decreases redeemed_quantity by 1). # Returned funds In case of *gift card vouchers*, this method returns funds back according to the source redemption. In case of *loyalty card vouchers*, this method returns points back according to the source redemption.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RedemptionsApi.new
+redemption_id = 'redemption_id_example' # String | The original redemption ID to be rolled back (undone).
+opts = {
+ reason: 'reason_example', # String | Reason for the rollback.
+ tracking_id: 'tracking_id_example', # String | Customers source_id.
+ redemptions_rollback_create_request_body: VoucherifySdk::RedemptionsRollbackCreateRequestBody.new # RedemptionsRollbackCreateRequestBody | Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.
+}
+
+begin
+ # Rollback Redemption
+ result = api_instance.rollback_redemption(redemption_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RedemptionsApi->rollback_redemption: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redemption_id** | **String** | The original redemption ID to be rolled back (undone). | |
+| **reason** | **String** | Reason for the rollback. | [optional] |
+| **tracking_id** | **String** | Customers source_id. | [optional] |
+| **redemptions_rollback_create_request_body** | [**RedemptionsRollbackCreateRequestBody**](RedemptionsRollbackCreateRequestBody.md) | Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. | [optional] |
+
+### Return type
+
+[**RedemptionsRollbackCreateResponseBody**](RedemptionsRollbackCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## rollback_stacked_redemptions
+
+> rollback_stacked_redemptions(parent_redemption_id, opts)
+
+Rollback Stackable Redemptions
+
+Rollback a stackable redemption. When you rollback a stacked redemption, all child redemptions will be rolled back. Provide the parent redemption ID as the path parameter.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RedemptionsApi.new
+parent_redemption_id = 'parent_redemption_id_example' # String | Unique identifier of a parent redemption, e.g. r_JQfm73zWSJFQxs3bGxweYjgm.
+opts = {
+ reason: 'reason_example', # String | Reason for the rollback.
+ tracking_id: 'tracking_id_example', # String | Customers source_id.
+ redemptions_rollbacks_create_request_body: VoucherifySdk::RedemptionsRollbacksCreateRequestBody.new # RedemptionsRollbacksCreateRequestBody | Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.
+}
+
+begin
+ # Rollback Stackable Redemptions
+ result = api_instance.rollback_stacked_redemptions(parent_redemption_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RedemptionsApi->rollback_stacked_redemptions: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **parent_redemption_id** | **String** | Unique identifier of a parent redemption, e.g. r_JQfm73zWSJFQxs3bGxweYjgm. | |
+| **reason** | **String** | Reason for the rollback. | [optional] |
+| **tracking_id** | **String** | Customers source_id. | [optional] |
+| **redemptions_rollbacks_create_request_body** | [**RedemptionsRollbacksCreateRequestBody**](RedemptionsRollbacksCreateRequestBody.md) | Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. | [optional] |
+
+### Return type
+
+[**RedemptionsRollbacksCreateResponseBody**](RedemptionsRollbacksCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/RedemptionsGetResponseBody.md b/docs/RedemptionsGetResponseBody.md
new file mode 100644
index 00000000..1313090a
--- /dev/null
+++ b/docs/RedemptionsGetResponseBody.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::RedemptionsGetResponseBody
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::RedemptionsGetResponseBody.openapi_one_of
+# =>
+# [
+# :'Redemption',
+# :'RedemptionRollback'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::RedemptionsGetResponseBody.build(data)
+# => #
+
+VoucherifySdk::RedemptionsGetResponseBody.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `Redemption`
+- `RedemptionRollback`
+- `nil` (if no type matches)
+
diff --git a/docs/RedemptionsListResponseBody.md b/docs/RedemptionsListResponseBody.md
new file mode 100644
index 00000000..bf64937c
--- /dev/null
+++ b/docs/RedemptionsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::RedemptionsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about redemptions in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of redemption objects. | [default to 'redemptions'] |
+| **redemptions** | [**Array<RedemptionsListResponseBodyRedemptionsItem>**](RedemptionsListResponseBodyRedemptionsItem.md) | | |
+| **total** | **Integer** | Total number of redemptions. | |
+
diff --git a/docs/RedemptionsListResponseBodyRedemptionsItem.md b/docs/RedemptionsListResponseBodyRedemptionsItem.md
new file mode 100644
index 00000000..2ad50530
--- /dev/null
+++ b/docs/RedemptionsListResponseBodyRedemptionsItem.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::RedemptionsListResponseBodyRedemptionsItem
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::RedemptionsListResponseBodyRedemptionsItem.openapi_one_of
+# =>
+# [
+# :'Redemption',
+# :'RedemptionRollback'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::RedemptionsListResponseBodyRedemptionsItem.build(data)
+# => #
+
+VoucherifySdk::RedemptionsListResponseBodyRedemptionsItem.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `Redemption`
+- `RedemptionRollback`
+- `nil` (if no type matches)
+
diff --git a/docs/RedemptionsRedeemRequestBody.md b/docs/RedemptionsRedeemRequestBody.md
new file mode 100644
index 00000000..00454317
--- /dev/null
+++ b/docs/RedemptionsRedeemRequestBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::RedemptionsRedeemRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redeemables** | [**Array<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | An array of redeemables. You can combine `voucher`(s) and `promotion_tier`(s). Alternatively, send one unique`promotion_stack` in the array. | |
+| **order** | [**Order**](Order.md) | | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **session** | [**Session**](Session.md) | | [optional] |
+| **tracking_id** | **String** | Is correspondent to Customer's source_id | [optional] |
+| **metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | [optional] |
+| **options** | [**ClientRedemptionsRedeemRequestBodyAllOfOptions**](ClientRedemptionsRedeemRequestBodyAllOfOptions.md) | | [optional] |
+
diff --git a/docs/RedemptionsRedeemResponseBody.md b/docs/RedemptionsRedeemResponseBody.md
new file mode 100644
index 00000000..e80d054d
--- /dev/null
+++ b/docs/RedemptionsRedeemResponseBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::RedemptionsRedeemResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redemptions** | [**Array<Redemption>**](Redemption.md) | | [optional] |
+| **parent_redemption** | [**Redemption**](Redemption.md) | | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **inapplicable_redeemables** | [**Array<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional] |
+| **skipped_redeemables** | [**Array<ValidationsRedeemableSkipped>**](ValidationsRedeemableSkipped.md) | Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`. | [optional] |
+
diff --git a/docs/RedemptionsRollbackCreateRequestBody.md b/docs/RedemptionsRollbackCreateRequestBody.md
new file mode 100644
index 00000000..ebef1f27
--- /dev/null
+++ b/docs/RedemptionsRollbackCreateRequestBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::RedemptionsRollbackCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **reason** | **String** | Reason for the rollback. | [optional] |
+| **tracking_id** | **String** | Customer's `source_id`. | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **order** | [**Order**](Order.md) | | [optional] |
+| **metadata** | **Object** | A set of key/value pairs that you can send in the request body to update **redemption** metadata. | [optional] |
+
diff --git a/docs/RedemptionsRollbackCreateResponseBody.md b/docs/RedemptionsRollbackCreateResponseBody.md
new file mode 100644
index 00000000..895345bb
--- /dev/null
+++ b/docs/RedemptionsRollbackCreateResponseBody.md
@@ -0,0 +1,31 @@
+# VoucherifySdk::RedemptionsRollbackCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique redemption ID. | |
+| **object** | **String** | The type of object represented by the JSON | [default to 'redemption_rollback'] |
+| **date** | **Time** | Timestamp representing the date and time when the object was created in ISO 8601 format. | |
+| **customer_id** | **String** | Unique customer ID of the redeeming customer. | |
+| **tracking_id** | **String** | Hashed customer source ID. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the redemption. | |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **redemption** | **String** | Unique redemption ID of the parent redemption. | |
+| **reason** | **String** | System generated cause for the redemption being invalid in the context of the provided parameters. | [optional] |
+| **result** | **String** | Redemption result. | |
+| **status** | **String** | Redemption status. | |
+| **related_redemptions** | [**RedemptionRollbackRelatedRedemptions**](RedemptionRollbackRelatedRedemptions.md) | | [optional] |
+| **failure_code** | **String** | If the result is `FAILURE`, this parameter will provide a generic reason as to why the redemption failed. | [optional] |
+| **failure_message** | **String** | If the result is `FAILURE`, this parameter will provide a more expanded reason as to why the redemption failed. | [optional] |
+| **order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | |
+| **channel** | [**RedemptionChannel**](RedemptionChannel.md) | | |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | |
+| **related_object_type** | **String** | Defines the related object. | |
+| **related_object_id** | **String** | Unique related object ID assigned by Voucherify, i.e. v_lfZi4rcEGe0sN9gmnj40bzwK2FH6QUno for a voucher. | |
+| **voucher** | [**Voucher**](Voucher.md) | | [optional] |
+| **promotion_tier** | [**PromotionTier**](PromotionTier.md) | | [optional] |
+| **reward** | [**RedemptionRewardResult**](RedemptionRewardResult.md) | | [optional] |
+| **gift** | [**RedemptionGift**](RedemptionGift.md) | | [optional] |
+| **loyalty_card** | [**RedemptionLoyaltyCard**](RedemptionLoyaltyCard.md) | | [optional] |
+
diff --git a/docs/RedemptionsRollbacksCreateRequestBody.md b/docs/RedemptionsRollbacksCreateRequestBody.md
new file mode 100644
index 00000000..da6e3140
--- /dev/null
+++ b/docs/RedemptionsRollbacksCreateRequestBody.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::RedemptionsRollbacksCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **reason** | **String** | Reason for the rollback. | [optional] |
+| **tracking_id** | **String** | Customer's `source_id`. | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **order** | [**Order**](Order.md) | | [optional] |
+| **metadata** | **Object** | A set of key/value pairs that you can send in the request body to update **redemption** metadata. | [optional] |
+
diff --git a/docs/RedemptionsRollbacksCreateResponseBody.md b/docs/RedemptionsRollbacksCreateResponseBody.md
new file mode 100644
index 00000000..f8a63ea2
--- /dev/null
+++ b/docs/RedemptionsRollbacksCreateResponseBody.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::RedemptionsRollbacksCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **rollbacks** | [**Array<RedemptionRollback>**](RedemptionRollback.md) | Contains the rollback redemption objects of the particular incentives. | [optional] |
+| **parent_rollback** | [**RedemptionRollback**](RedemptionRollback.md) | | [optional] |
+| **order** | [**OrderCalculatedNoCustomerData**](OrderCalculatedNoCustomerData.md) | | [optional] |
+
diff --git a/docs/ReferralCampaignVoucher.md b/docs/ReferralCampaignVoucher.md
new file mode 100644
index 00000000..de81358d
--- /dev/null
+++ b/docs/ReferralCampaignVoucher.md
@@ -0,0 +1,12 @@
+# VoucherifySdk::ReferralCampaignVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | Type of voucher. | [default to 'DISCOUNT_VOUCHER'] |
+| **discount** | [**Discount**](Discount.md) | | |
+| **code_config** | [**CodeConfig**](CodeConfig.md) | | [optional] |
+| **redemption** | [**CampaignLoyaltyVoucherRedemption**](CampaignLoyaltyVoucherRedemption.md) | | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | |
+
diff --git a/docs/ReferralProgram.md b/docs/ReferralProgram.md
new file mode 100644
index 00000000..4b4a6950
--- /dev/null
+++ b/docs/ReferralProgram.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ReferralProgram
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conversion_event_type** | **String** | Define how a referral is triggered. | [optional] |
+| **custom_event** | [**ReferralProgramCustomEvent**](ReferralProgramCustomEvent.md) | | [optional] |
+| **referee_reward** | [**ReferralProgramRefereeReward**](ReferralProgramRefereeReward.md) | | [optional] |
+
diff --git a/docs/ReferralProgramCustomEvent.md b/docs/ReferralProgramCustomEvent.md
new file mode 100644
index 00000000..e0dfee95
--- /dev/null
+++ b/docs/ReferralProgramCustomEvent.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ReferralProgramCustomEvent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique custom event ID. | [optional] |
+| **name** | **String** | Custom event name. | [optional] |
+
diff --git a/docs/ReferralProgramRefereeReward.md b/docs/ReferralProgramRefereeReward.md
new file mode 100644
index 00000000..bd3beff9
--- /dev/null
+++ b/docs/ReferralProgramRefereeReward.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ReferralProgramRefereeReward
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **related_object_parent** | [**ReferralProgramRefereeRewardRelatedObjectParent**](ReferralProgramRefereeRewardRelatedObjectParent.md) | | [optional] |
+| **type** | **String** | Type of reward. | [optional] |
+| **amount** | **String** | Define the number of `points` to add to a loyalty card or `credits` to the balance on a gift card. In case of the gift card, the value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] |
+
diff --git a/docs/ReferralProgramRefereeRewardRelatedObjectParent.md b/docs/ReferralProgramRefereeRewardRelatedObjectParent.md
new file mode 100644
index 00000000..7026ecc3
--- /dev/null
+++ b/docs/ReferralProgramRefereeRewardRelatedObjectParent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ReferralProgramRefereeRewardRelatedObjectParent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique ID of the reward source. | [optional] |
+| **name** | **String** | Name of the reward source. | [optional] |
+| **object** | **String** | Type of resource represented by the source of the reward. | [optional][default to 'CAMPAIGN'] |
+
diff --git a/docs/Referrer.md b/docs/Referrer.md
new file mode 100644
index 00000000..49ad22bf
--- /dev/null
+++ b/docs/Referrer.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::Referrer
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | The ID of an existing customer. | [optional] |
+| **source_id** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] |
+| **birthday** | **Date** | *Deprecated* Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **birthdate** | **Date** | Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+
diff --git a/docs/ReferrerId.md b/docs/ReferrerId.md
new file mode 100644
index 00000000..f9236e7e
--- /dev/null
+++ b/docs/ReferrerId.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::ReferrerId
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier of an existing customer. | |
+| **object** | **String** | The type of object represented by JSON. | [default to 'customer'] |
+
diff --git a/docs/ReferrerWithSummaryLoyaltyReferrals.md b/docs/ReferrerWithSummaryLoyaltyReferrals.md
new file mode 100644
index 00000000..4b456e9f
--- /dev/null
+++ b/docs/ReferrerWithSummaryLoyaltyReferrals.md
@@ -0,0 +1,25 @@
+# VoucherifySdk::ReferrerWithSummaryLoyaltyReferrals
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] |
+| **source_id** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] |
+| **summary** | [**CustomerSummary**](CustomerSummary.md) | | |
+| **loyalty** | [**CustomerLoyalty**](CustomerLoyalty.md) | | |
+| **referrals** | [**CustomerReferrals**](CustomerReferrals.md) | | |
+| **system_metadata** | **Object** | Object used to store system metadata information. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the customer was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the customer was updated in ISO 8601 format. | [optional] |
+| **assets** | [**CustomerResponseDataAssets**](CustomerResponseDataAssets.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. | [default to 'customer'] |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a customer object. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **phone** | **String** | Customer's phone number. This parameter is mandatory when you try to send out codes to customers via an SMS channel. | [optional] |
+| **birthday** | **Date** | *Deprecated* Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **birthdate** | **Date** | Customer's birthdate; format YYYY-MM-DD. | [optional] |
+| **address** | [**CustomerBaseAddress**](CustomerBaseAddress.md) | | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+
diff --git a/docs/ResourceTypes.md b/docs/ResourceTypes.md
new file mode 100644
index 00000000..33ad67f4
--- /dev/null
+++ b/docs/ResourceTypes.md
@@ -0,0 +1,7 @@
+# VoucherifySdk::ResourceTypes
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+
diff --git a/docs/Reward.md b/docs/Reward.md
new file mode 100644
index 00000000..5e7764a6
--- /dev/null
+++ b/docs/Reward.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::Reward
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward ID, assigned by Voucherify. | |
+| **name** | **String** | Reward name. | |
+| **stock** | **Integer** | Configurable for **material rewards**. The number of units of the product that you want to share as reward. | |
+| **redeemed** | **Integer** | Defines the number of already invoked (successful) reward redemptions. | |
+| **attributes** | [**RewardAttributes**](RewardAttributes.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the reward. A set of key/value pairs that you can attach to a reward object. It can be useful for storing additional information about the reward in a structured format. | |
+| **type** | **String** | Reward type. | |
+| **parameters** | [**RewardType**](RewardType.md) | | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the reward was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the reward was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the reward. | [default to 'reward'] |
+
diff --git a/docs/RewardAssignment.md b/docs/RewardAssignment.md
new file mode 100644
index 00000000..87aac727
--- /dev/null
+++ b/docs/RewardAssignment.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::RewardAssignment
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward assignment ID, assigned by Voucherify. | |
+| **reward_id** | **String** | Associated reward ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the reward assignment was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the reward assignment was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the reward assignment. | [default to 'reward_assignment'] |
+| **related_object_id** | **String** | Related object ID to which the reward was assigned. | |
+| **related_object_type** | **String** | Related object type to which the reward was assigned. | [default to 'campaign'] |
+| **parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] |
+
diff --git a/docs/RewardAssignmentBase.md b/docs/RewardAssignmentBase.md
new file mode 100644
index 00000000..1e21f8c7
--- /dev/null
+++ b/docs/RewardAssignmentBase.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::RewardAssignmentBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward assignment ID, assigned by Voucherify. | |
+| **reward_id** | **String** | Associated reward ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the reward assignment was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the reward assignment was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the reward assignment. | [default to 'reward_assignment'] |
+| **related_object_id** | **String** | Related object ID to which the reward was assigned. | |
+| **related_object_type** | **String** | Related object type to which the reward was assigned. | [default to 'campaign'] |
+
diff --git a/docs/RewardAssignmentParameters.md b/docs/RewardAssignmentParameters.md
new file mode 100644
index 00000000..86247ea3
--- /dev/null
+++ b/docs/RewardAssignmentParameters.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RewardAssignmentParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] |
+
diff --git a/docs/RewardAssignmentParametersParameters.md b/docs/RewardAssignmentParametersParameters.md
new file mode 100644
index 00000000..f10a11b1
--- /dev/null
+++ b/docs/RewardAssignmentParametersParameters.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RewardAssignmentParametersParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **loyalty** | [**RewardAssignmentParametersParametersLoyalty**](RewardAssignmentParametersParametersLoyalty.md) | | |
+
diff --git a/docs/RewardAssignmentParametersParametersLoyalty.md b/docs/RewardAssignmentParametersParametersLoyalty.md
new file mode 100644
index 00000000..82e306ca
--- /dev/null
+++ b/docs/RewardAssignmentParametersParametersLoyalty.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RewardAssignmentParametersParametersLoyalty
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | The number of points required to redeem the reward. | [optional] |
+
diff --git a/docs/RewardAssignmentsCreateCoinRewardRequestBody.md b/docs/RewardAssignmentsCreateCoinRewardRequestBody.md
new file mode 100644
index 00000000..5dc89207
--- /dev/null
+++ b/docs/RewardAssignmentsCreateCoinRewardRequestBody.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RewardAssignmentsCreateCoinRewardRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign** | **String** | The campaign ID of the campaign to which the reward is to be assigned. | |
+| **validation_rules** | **Array<String>** | | [optional] |
+
diff --git a/docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBody.md b/docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBody.md
new file mode 100644
index 00000000..f5ce1df8
--- /dev/null
+++ b/docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBody.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RewardAssignmentsCreateDigitalOrMaterialRewardRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign** | **String** | The campaign ID of the campaign to which the reward is to be assigned. | |
+| **parameters** | [**RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParameters**](RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParameters.md) | | |
+
diff --git a/docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParameters.md b/docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParameters.md
new file mode 100644
index 00000000..b2670ea6
--- /dev/null
+++ b/docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParameters.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **loyalty** | [**RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParametersLoyalty**](RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParametersLoyalty.md) | | |
+
diff --git a/docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParametersLoyalty.md b/docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParametersLoyalty.md
new file mode 100644
index 00000000..f2cb0843
--- /dev/null
+++ b/docs/RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParametersLoyalty.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RewardAssignmentsCreateDigitalOrMaterialRewardRequestBodyParametersLoyalty
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | Number of points that will be subtracted from the loyalty card points balance if the reward is redeemed. | [optional] |
+
diff --git a/docs/RewardAttributes.md b/docs/RewardAttributes.md
new file mode 100644
index 00000000..4fc089da
--- /dev/null
+++ b/docs/RewardAttributes.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RewardAttributes
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file. | [optional] |
+| **description** | **String** | An arbitrary string that you can attach to a material reward. | [optional] |
+
diff --git a/docs/RewardType.md b/docs/RewardType.md
new file mode 100644
index 00000000..7331b505
--- /dev/null
+++ b/docs/RewardType.md
@@ -0,0 +1,51 @@
+# VoucherifySdk::RewardType
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::RewardType.openapi_one_of
+# =>
+# [
+# :'RewardTypeCampaign',
+# :'RewardTypeCoin',
+# :'RewardTypeMaterial'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::RewardType.build(data)
+# => #
+
+VoucherifySdk::RewardType.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `RewardTypeCampaign`
+- `RewardTypeCoin`
+- `RewardTypeMaterial`
+- `nil` (if no type matches)
+
diff --git a/docs/RewardTypeCampaign.md b/docs/RewardTypeCampaign.md
new file mode 100644
index 00000000..fa960e6d
--- /dev/null
+++ b/docs/RewardTypeCampaign.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RewardTypeCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **campaign** | [**RewardTypeCampaignCampaign**](RewardTypeCampaignCampaign.md) | | |
+
diff --git a/docs/RewardTypeCampaignCampaign.md b/docs/RewardTypeCampaignCampaign.md
new file mode 100644
index 00000000..ac099530
--- /dev/null
+++ b/docs/RewardTypeCampaignCampaign.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::RewardTypeCampaignCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique campaign ID, assigned by Voucherify. | |
+| **balance** | **Integer** | The incremental amout to be added to the current balance on the gift card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] |
+| **type** | **String** | Campaign type. | |
+
diff --git a/docs/RewardTypeCoin.md b/docs/RewardTypeCoin.md
new file mode 100644
index 00000000..3c36692d
--- /dev/null
+++ b/docs/RewardTypeCoin.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RewardTypeCoin
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **coin** | [**RewardTypeCoinCoin**](RewardTypeCoinCoin.md) | | |
+
diff --git a/docs/RewardTypeCoinCoin.md b/docs/RewardTypeCoinCoin.md
new file mode 100644
index 00000000..44f090f2
--- /dev/null
+++ b/docs/RewardTypeCoinCoin.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RewardTypeCoinCoin
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **exchange_ratio** | **Float** | The cash equivalent of the points defined in the points_ratio property. | |
+| **points_ratio** | **Integer** | The number of loyalty points that will map to the predefined cash amount defined by the exchange_ratio property. | [optional] |
+
diff --git a/docs/RewardTypeMaterial.md b/docs/RewardTypeMaterial.md
new file mode 100644
index 00000000..0b48e5eb
--- /dev/null
+++ b/docs/RewardTypeMaterial.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RewardTypeMaterial
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **product** | [**RewardTypeMaterialProduct**](RewardTypeMaterialProduct.md) | | |
+
diff --git a/docs/RewardTypeMaterialProduct.md b/docs/RewardTypeMaterialProduct.md
new file mode 100644
index 00000000..189e9e3e
--- /dev/null
+++ b/docs/RewardTypeMaterialProduct.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::RewardTypeMaterialProduct
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique product ID, assigned by Voucherify. | |
+| **sku_id** | **String** | Unique SKU ID, assigned by Voucherify, of the SKU given as a reward. | |
+
diff --git a/docs/RewardsApi.md b/docs/RewardsApi.md
new file mode 100644
index 00000000..90b6b155
--- /dev/null
+++ b/docs/RewardsApi.md
@@ -0,0 +1,379 @@
+# VoucherifySdk::RewardsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_reward_assignment**](RewardsApi.md#create_reward_assignment) | **POST** /v1/rewards/{rewardId}/assignments | Create Reward Assignment |
+| [**delete_reward**](RewardsApi.md#delete_reward) | **DELETE** /v1/rewards/{rewardId} | Delete Reward |
+| [**delete_reward_assignment**](RewardsApi.md#delete_reward_assignment) | **DELETE** /v1/rewards/{rewardId}/assignments/{assignmentId} | Delete Reward Assignment |
+| [**get_reward_assignment**](RewardsApi.md#get_reward_assignment) | **GET** /v1/rewards/{rewardId}/assignments/{assignmentId} | Get Reward Assignment |
+| [**list_reward_assignments**](RewardsApi.md#list_reward_assignments) | **GET** /v1/rewards/{rewardId}/assignments | List Reward Assignments |
+| [**update_reward_assignment**](RewardsApi.md#update_reward_assignment) | **PUT** /v1/rewards/{rewardId}/assignments/{assignmentId} | Update Reward Assignment |
+
+
+## create_reward_assignment
+
+> create_reward_assignment(reward_id, opts)
+
+Create Reward Assignment
+
+Assigns a reward to a specified loyalty campaign.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RewardsApi.new
+reward_id = 'reward_id_example' # String | A unique reward ID.
+opts = {
+ rewards_assignments_create_request_body: VoucherifySdk::RewardAssignmentsCreateCoinRewardRequestBody.new({campaign: 'campaign_example'}) # RewardsAssignmentsCreateRequestBody | Provide the campaign ID of the campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points.
+}
+
+begin
+ # Create Reward Assignment
+ result = api_instance.create_reward_assignment(reward_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RewardsApi->create_reward_assignment: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **reward_id** | **String** | A unique reward ID. | |
+| **rewards_assignments_create_request_body** | [**RewardsAssignmentsCreateRequestBody**](RewardsAssignmentsCreateRequestBody.md) | Provide the campaign ID of the campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points. | [optional] |
+
+### Return type
+
+[**RewardsAssignmentsCreateResponseBody**](RewardsAssignmentsCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## delete_reward
+
+> delete_reward(reward_id)
+
+Delete Reward
+
+Delete a reward.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RewardsApi.new
+reward_id = 'reward_id_example' # String | A unique reward ID.
+
+begin
+ # Delete Reward
+ api_instance.delete_reward(reward_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RewardsApi->delete_reward: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **reward_id** | **String** | A unique reward ID. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## delete_reward_assignment
+
+> delete_reward_assignment(reward_id, assignment_id)
+
+Delete Reward Assignment
+
+This method deletes a reward assignment for a particular reward.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RewardsApi.new
+reward_id = 'reward_id_example' # String | A unique reward ID.
+assignment_id = 'assignment_id_example' # String | A unique reward assignment ID.
+
+begin
+ # Delete Reward Assignment
+ api_instance.delete_reward_assignment(reward_id, assignment_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RewardsApi->delete_reward_assignment: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **reward_id** | **String** | A unique reward ID. | |
+| **assignment_id** | **String** | A unique reward assignment ID. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## get_reward_assignment
+
+> get_reward_assignment(reward_id, assignment_id)
+
+Get Reward Assignment
+
+Retrieve a reward assignment.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RewardsApi.new
+reward_id = 'reward_id_example' # String | A unique reward ID.
+assignment_id = 'assignment_id_example' # String | A unique reward assignment ID.
+
+begin
+ # Get Reward Assignment
+ result = api_instance.get_reward_assignment(reward_id, assignment_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RewardsApi->get_reward_assignment: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **reward_id** | **String** | A unique reward ID. | |
+| **assignment_id** | **String** | A unique reward assignment ID. | |
+
+### Return type
+
+[**RewardsAssignmentsGetResponseBody**](RewardsAssignmentsGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_reward_assignments
+
+> list_reward_assignments(reward_id, opts)
+
+List Reward Assignments
+
+Retrieve reward assignments by the reward ID.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RewardsApi.new
+reward_id = 'reward_id_example' # String | A unique reward ID.
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56 # Integer | Which page of results to return.
+}
+
+begin
+ # List Reward Assignments
+ result = api_instance.list_reward_assignments(reward_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RewardsApi->list_reward_assignments: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **reward_id** | **String** | A unique reward ID. | |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+
+### Return type
+
+[**RewardsAssignmentsListResponseBody**](RewardsAssignmentsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## update_reward_assignment
+
+> update_reward_assignment(reward_id, assignment_id, opts)
+
+Update Reward Assignment
+
+Update the number of points needed to successfully redeem the reward.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::RewardsApi.new
+reward_id = 'reward_id_example' # String | A unique reward ID.
+assignment_id = 'assignment_id_example' # String | A unique reward assignment ID.
+opts = {
+ rewards_assignments_update_request_body: VoucherifySdk::RewardsAssignmentsUpdateRequestBody.new # RewardsAssignmentsUpdateRequestBody | Define the number of points required to exchange for the reward.
+}
+
+begin
+ # Update Reward Assignment
+ result = api_instance.update_reward_assignment(reward_id, assignment_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling RewardsApi->update_reward_assignment: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **reward_id** | **String** | A unique reward ID. | |
+| **assignment_id** | **String** | A unique reward assignment ID. | |
+| **rewards_assignments_update_request_body** | [**RewardsAssignmentsUpdateRequestBody**](RewardsAssignmentsUpdateRequestBody.md) | Define the number of points required to exchange for the reward. | [optional] |
+
+### Return type
+
+[**RewardsAssignmentsUpdateResponseBody**](RewardsAssignmentsUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/RewardsAssignmentsCreateRequestBody.md b/docs/RewardsAssignmentsCreateRequestBody.md
new file mode 100644
index 00000000..f8a5d853
--- /dev/null
+++ b/docs/RewardsAssignmentsCreateRequestBody.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::RewardsAssignmentsCreateRequestBody
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::RewardsAssignmentsCreateRequestBody.openapi_one_of
+# =>
+# [
+# :'RewardAssignmentsCreateCoinRewardRequestBody',
+# :'RewardAssignmentsCreateDigitalOrMaterialRewardRequestBody'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::RewardsAssignmentsCreateRequestBody.build(data)
+# => #
+
+VoucherifySdk::RewardsAssignmentsCreateRequestBody.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `RewardAssignmentsCreateCoinRewardRequestBody`
+- `RewardAssignmentsCreateDigitalOrMaterialRewardRequestBody`
+- `nil` (if no type matches)
+
diff --git a/docs/RewardsAssignmentsCreateResponseBody.md b/docs/RewardsAssignmentsCreateResponseBody.md
new file mode 100644
index 00000000..7dbe8ec9
--- /dev/null
+++ b/docs/RewardsAssignmentsCreateResponseBody.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::RewardsAssignmentsCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward assignment ID, assigned by Voucherify. | |
+| **reward_id** | **String** | Associated reward ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the reward assignment was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the reward assignment was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the reward assignment. | [default to 'reward_assignment'] |
+| **related_object_id** | **String** | Related object ID to which the reward was assigned. | |
+| **related_object_type** | **String** | Related object type to which the reward was assigned. | [default to 'campaign'] |
+| **parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] |
+
diff --git a/docs/RewardsAssignmentsGetResponseBody.md b/docs/RewardsAssignmentsGetResponseBody.md
new file mode 100644
index 00000000..0ba67df1
--- /dev/null
+++ b/docs/RewardsAssignmentsGetResponseBody.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::RewardsAssignmentsGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward assignment ID, assigned by Voucherify. | |
+| **reward_id** | **String** | Associated reward ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the reward assignment was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the reward assignment was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the reward assignment. | [default to 'reward_assignment'] |
+| **related_object_id** | **String** | Related object ID to which the reward was assigned. | |
+| **related_object_type** | **String** | Related object type to which the reward was assigned. | [default to 'campaign'] |
+| **parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] |
+
diff --git a/docs/RewardsAssignmentsListResponseBody.md b/docs/RewardsAssignmentsListResponseBody.md
new file mode 100644
index 00000000..9adaa975
--- /dev/null
+++ b/docs/RewardsAssignmentsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::RewardsAssignmentsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about reward assignments in a dictionary. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of reward assignments. | [default to 'data'] |
+| **data** | [**Array<RewardAssignment>**](RewardAssignment.md) | | |
+| **total** | **Integer** | Total number of reward assignments. | |
+
diff --git a/docs/RewardsAssignmentsUpdateRequestBody.md b/docs/RewardsAssignmentsUpdateRequestBody.md
new file mode 100644
index 00000000..49c15f8e
--- /dev/null
+++ b/docs/RewardsAssignmentsUpdateRequestBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RewardsAssignmentsUpdateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **parameters** | [**RewardsAssignmentsUpdateRequestBodyParameters**](RewardsAssignmentsUpdateRequestBodyParameters.md) | | [optional] |
+
diff --git a/docs/RewardsAssignmentsUpdateRequestBodyParameters.md b/docs/RewardsAssignmentsUpdateRequestBodyParameters.md
new file mode 100644
index 00000000..02442466
--- /dev/null
+++ b/docs/RewardsAssignmentsUpdateRequestBodyParameters.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RewardsAssignmentsUpdateRequestBodyParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **loyalty** | [**RewardsAssignmentsUpdateRequestBodyParametersLoyalty**](RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md) | | [optional] |
+
diff --git a/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md b/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md
new file mode 100644
index 00000000..413ee4d6
--- /dev/null
+++ b/docs/RewardsAssignmentsUpdateRequestBodyParametersLoyalty.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::RewardsAssignmentsUpdateRequestBodyParametersLoyalty
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | Defines how many points are required to obtain the reward. | [optional] |
+
diff --git a/docs/RewardsAssignmentsUpdateResponseBody.md b/docs/RewardsAssignmentsUpdateResponseBody.md
new file mode 100644
index 00000000..c3fd79d2
--- /dev/null
+++ b/docs/RewardsAssignmentsUpdateResponseBody.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::RewardsAssignmentsUpdateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward assignment ID, assigned by Voucherify. | |
+| **reward_id** | **String** | Associated reward ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the reward assignment was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the reward assignment was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the reward assignment. | [default to 'reward_assignment'] |
+| **related_object_id** | **String** | Related object ID to which the reward was assigned. | |
+| **related_object_type** | **String** | Related object type to which the reward was assigned. | [default to 'campaign'] |
+| **parameters** | [**RewardAssignmentParametersParameters**](RewardAssignmentParametersParameters.md) | | [optional] |
+
diff --git a/docs/SchemaThatContainsUniquePropertiesForPromotionCampaignPromotion.md b/docs/SchemaThatContainsUniquePropertiesForPromotionCampaignPromotion.md
new file mode 100644
index 00000000..f60a996b
--- /dev/null
+++ b/docs/SchemaThatContainsUniquePropertiesForPromotionCampaignPromotion.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::SchemaThatContainsUniquePropertiesForPromotionCampaignPromotion
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **tiers** | [**Array<PromotionTierCreateParams>**](PromotionTierCreateParams.md) | | [optional] |
+
diff --git a/docs/SegmentsApi.md b/docs/SegmentsApi.md
new file mode 100644
index 00000000..d0810bab
--- /dev/null
+++ b/docs/SegmentsApi.md
@@ -0,0 +1,65 @@
+# VoucherifySdk::SegmentsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**delete_segment**](SegmentsApi.md#delete_segment) | **DELETE** /v1/segments/{segmentId} | Delete Segment |
+
+
+## delete_segment
+
+> delete_segment(segment_id)
+
+Delete Segment
+
+This method deletes a customer segment.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::SegmentsApi.new
+segment_id = 'segment_id_example' # String | A unique customer segment ID.
+
+begin
+ # Delete Segment
+ api_instance.delete_segment(segment_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling SegmentsApi->delete_segment: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **segment_id** | **String** | A unique customer segment ID. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
diff --git a/docs/Session.md b/docs/Session.md
new file mode 100644
index 00000000..b94c5181
--- /dev/null
+++ b/docs/Session.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::Session
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **key** | **String** | The session unique ID assigned by Voucherify or your own unique session ID. Sending an existing ID will result in overwriting an existing session. If no session key is provided, then a new ID will be generated. | [optional][default to 'LOCK'] |
+| **type** | **String** | This parameter is required to establish a new session. The session locks the redemption quantity by 1. | [optional][default to 'LOCK'] |
+| **ttl** | **Float** | Value for the period of time that the session is active. Units for this parameter are defined by the session.ttl_unit parameter. | [optional] |
+| **ttl_unit** | **String** | Defines the type of unit in which the session time is counted. | [optional] |
+
diff --git a/docs/SimpleCampaign.md b/docs/SimpleCampaign.md
new file mode 100644
index 00000000..9753bc02
--- /dev/null
+++ b/docs/SimpleCampaign.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::SimpleCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Campaign name. | [optional] |
+| **name** | **String** | Campaign name. | [optional] |
+| **campaign_type** | **String** | Type of campaign. | [optional] |
+| **type** | **String** | Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published. | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] |
+| **voucher** | **Object** | | [optional] |
+| **lucky_draw** | **Object** | | [optional] |
+| **referral_program** | [**ReferralProgram**](ReferralProgram.md) | | [optional] |
+| **auto_join** | **Boolean** | Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled. | [optional] |
+| **join_once** | **Boolean** | If this value is set to `true`, customers will be able to join the campaign only once. | [optional] |
+| **active** | **Boolean** | Indicates whether campaign is active | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the campaign was created in ISO 8601 format. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the campaign. | [optional][default to 'campaign'] |
+
diff --git a/docs/SimpleConsent.md b/docs/SimpleConsent.md
new file mode 100644
index 00000000..909db8d4
--- /dev/null
+++ b/docs/SimpleConsent.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::SimpleConsent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | | [optional] |
+| **name** | **String** | | [optional] |
+| **object** | **String** | | [default to 'consent'] |
+
diff --git a/docs/SimpleCustomer.md b/docs/SimpleCustomer.md
new file mode 100644
index 00000000..c52a3687
--- /dev/null
+++ b/docs/SimpleCustomer.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::SimpleCustomer
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | The ID of an existing customer that will be linked to redemption in this request. | [optional] |
+| **source_id** | **String** | A unique identifier of the customer who validates a voucher. It can be a customer ID or email from a CRM system, database, or a third-party service. If you also pass a customer ID (unique ID assigned by Voucherify), the source ID will be ignored. | [optional] |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+| **object** | **String** | The type of object represented by JSON. | [optional][default to 'customer'] |
+
diff --git a/docs/SimpleCustomerRequiredObjectType.md b/docs/SimpleCustomerRequiredObjectType.md
new file mode 100644
index 00000000..49adcd4e
--- /dev/null
+++ b/docs/SimpleCustomerRequiredObjectType.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::SimpleCustomerRequiredObjectType
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | The unique ID of a customer that is assigned by Voucherify. | [optional] |
+| **source_id** | **String** | The merchant’s customer ID if it is different from the Voucherify customer ID. It is really useful in case of an integration between multiple systems. It can be a customer ID from a CRM system, database or 3rd-party service. | [optional] |
+| **name** | **String** | Customer's first and last name. | [optional] |
+| **email** | **String** | Customer's email address. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to a customer. The metadata object stores all custom attributes assigned to the customer. It can be useful for storing additional information about the customer in a structured format. This metadata can be used for validating whether the customer qualifies for a discount or it can be used in building customer segments. | [optional] |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the customer. | [default to 'customer'] |
+
diff --git a/docs/SimpleOrder.md b/docs/SimpleOrder.md
new file mode 100644
index 00000000..f7abc0eb
--- /dev/null
+++ b/docs/SimpleOrder.md
@@ -0,0 +1,23 @@
+# VoucherifySdk::SimpleOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique ID assigned by Voucherify of an existing order that will be linked to the redemption of this request. | [optional] |
+| **source_id** | **String** | Unique source ID of an existing order that will be linked to the redemption of this request. | [optional] |
+| **status** | **String** | The order status. | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | [optional] |
+| **referrer_id** | **String** | Unique referrer ID. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-level discounts applied to the order. | [optional] |
+| **applied_discount_amount** | **Integer** | This field shows the order-level discount applied. | [optional] |
+| **items_discount_amount** | **Integer** | Sum of all product-specific discounts applied to the order. | [optional] |
+| **items_applied_discount_amount** | **Integer** | Sum of all product-specific discounts applied in a particular request. `sum(items, i => i.applied_discount_amount)` | [optional] |
+| **total_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied to the order. | [optional] |
+| **total_applied_discount_amount** | **Integer** | Sum of all order-level AND all product-specific discounts applied in a particular request. `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | [optional] |
+| **total_amount** | **Integer** | Order amount after undoing all the discounts through the rollback redemption. | [optional] |
+| **items** | [**Array<SimpleOrderItem>**](SimpleOrderItem.md) | Array of items applied to the order. | [optional] |
+| **metadata** | **Object** | A set of custom key/value pairs that you can attach to an order. It can be useful for storing additional information about the order in a structured format. | [optional] |
+| **object** | **String** | The type of object represented by JSON. | [default to 'order'] |
+
diff --git a/docs/SimpleOrderItem.md b/docs/SimpleOrderItem.md
new file mode 100644
index 00000000..bb6342a6
--- /dev/null
+++ b/docs/SimpleOrderItem.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::SimpleOrderItem
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the `order_item`. | [optional][default to 'order_item'] |
+| **source_id** | **String** | The merchant’s product/SKU ID (if it is different from the Voucherify product/SKU ID). It is useful in the integration between multiple systems. It can be an ID from an eCommerce site, a database, or a third-party service. | [optional] |
+| **related_object** | **String** | Used along with the source_id property, can be set to either sku or product. | [optional] |
+| **product_id** | **String** | A unique product ID assigned by Voucherify. | [optional] |
+| **sku_id** | **String** | A unique SKU ID assigned by Voucherify. | [optional] |
+| **quantity** | **Integer** | The quantity of the particular item in the cart. | [optional] |
+| **discount_quantity** | **Integer** | Number of dicounted items. | [optional] |
+| **amount** | **Integer** | The total amount of the order item (price * quantity). | [optional] |
+| **discount_amount** | **Integer** | Sum of all order-item-level discounts applied to the order. | [optional] |
+| **applied_discount_amount** | **Integer** | This field shows the order-level discount applied. | [optional] |
+| **price** | **Integer** | Unit price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example `10000 cents` for `$100.00`. | [optional] |
+
diff --git a/docs/SimpleProduct.md b/docs/SimpleProduct.md
new file mode 100644
index 00000000..7e28a255
--- /dev/null
+++ b/docs/SimpleProduct.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::SimpleProduct
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique product ID. | [optional] |
+| **source_id** | **String** | Product source id. | [optional] |
+| **name** | **String** | Product name. | [optional] |
+
diff --git a/docs/SimpleProductDiscountUnit.md b/docs/SimpleProductDiscountUnit.md
new file mode 100644
index 00000000..bae147dc
--- /dev/null
+++ b/docs/SimpleProductDiscountUnit.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::SimpleProductDiscountUnit
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique product ID, assigned by Voucherify. | |
+| **source_id** | **String** | Product's source ID. | [optional] |
+| **name** | **String** | Product name. | |
+
diff --git a/docs/SimplePromotionTier.md b/docs/SimplePromotionTier.md
new file mode 100644
index 00000000..9509f9dc
--- /dev/null
+++ b/docs/SimplePromotionTier.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::SimplePromotionTier
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique promotion tier ID. | [optional] |
+| **name** | **String** | Name of the promotion tier. | [optional] |
+| **banner** | **String** | Text to be displayed to your customers on your website. | [optional] |
+| **campaign** | [**SimplePromotionTierCampaign**](SimplePromotionTierCampaign.md) | | [optional] |
+
diff --git a/docs/SimplePromotionTierCampaign.md b/docs/SimplePromotionTierCampaign.md
new file mode 100644
index 00000000..d8de02bd
--- /dev/null
+++ b/docs/SimplePromotionTierCampaign.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::SimplePromotionTierCampaign
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique campaign ID. | [optional] |
+
diff --git a/docs/SimpleRedemption.md b/docs/SimpleRedemption.md
new file mode 100644
index 00000000..1648207e
--- /dev/null
+++ b/docs/SimpleRedemption.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::SimpleRedemption
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique redemption ID. | [optional] |
+| **customer_id** | **String** | Unique customer ID of the redeeming customer. | [optional] |
+| **tracking_id** | **String** | Hashed customer source ID. | [optional] |
+| **date** | **Time** | Timestamp representing the date and time when the redemption was created in ISO 8601 format. | [optional] |
+| **amount** | **Integer** | A positive integer in the smallest currency unit (e.g. 100 cents for $1.00) representing the total amount of the order. This is the sum of the order items' amounts. | [optional] |
+| **order** | [**SimpleOrder**](SimpleOrder.md) | | [optional] |
+| **reward** | [**SimpleRedemptionRewardResult**](SimpleRedemptionRewardResult.md) | | [optional] |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **result** | **String** | Redemption result. | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **promotion_tier** | [**SimplePromotionTier**](SimplePromotionTier.md) | | [optional] |
+| **redemption** | **String** | Unique redemption ID of the parent redemption. | [optional] |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the `redemption`. | [optional][default to 'redemption'] |
+
diff --git a/docs/SimpleRedemptionRewardResult.md b/docs/SimpleRedemptionRewardResult.md
new file mode 100644
index 00000000..661fc2fc
--- /dev/null
+++ b/docs/SimpleRedemptionRewardResult.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::SimpleRedemptionRewardResult
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **customer** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **assignment_id** | **String** | Unique reward assignment ID assigned by Voucherify. | [optional] |
+| **voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **product** | [**SimpleProduct**](SimpleProduct.md) | | [optional] |
+| **sku** | [**SimpleSku**](SimpleSku.md) | | [optional] |
+| **loyalty_tier_id** | **String** | Unique loyalty tier ID assigned by Voucherify. | [optional] |
+| **id** | **String** | Unique reward ID, assigned by Voucherify. | [optional] |
+| **object** | **String** | The type of object represented by the JSON. This object stores information about the reward. | [optional][default to 'reward'] |
+| **name** | **String** | Reward name. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the reward was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the reward was updated in ISO 8601 format. | [optional] |
+| **parameters** | **Object** | Defines how the reward is generated. | [optional] |
+| **type** | **String** | Reward type. | [optional] |
+
diff --git a/docs/SimpleReferralTier.md b/docs/SimpleReferralTier.md
new file mode 100644
index 00000000..3369883a
--- /dev/null
+++ b/docs/SimpleReferralTier.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::SimpleReferralTier
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique referral tier ID. | [optional] |
+| **campaign_id** | **String** | Campaign Id. | [optional] |
+| **banner** | **String** | Text to be displayed to your customers on your website. | [optional] |
+| **parameters** | **Object** | Referral tier parameters | [optional] |
+
diff --git a/docs/SimpleSegment.md b/docs/SimpleSegment.md
new file mode 100644
index 00000000..a2ee0464
--- /dev/null
+++ b/docs/SimpleSegment.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::SimpleSegment
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique segment ID. | |
+| **name** | **String** | Segment name. | |
+| **object** | **String** | The type of object represented by the ID. | [default to 'segment'] |
+
diff --git a/docs/SimpleSku.md b/docs/SimpleSku.md
new file mode 100644
index 00000000..a548e646
--- /dev/null
+++ b/docs/SimpleSku.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::SimpleSku
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique sku ID. | [optional] |
+| **source_id** | **String** | Sku source id. | [optional] |
+| **sku** | **String** | Sku name. | [optional] |
+
diff --git a/docs/SimpleSkuDiscountUnit.md b/docs/SimpleSkuDiscountUnit.md
new file mode 100644
index 00000000..fedaeb79
--- /dev/null
+++ b/docs/SimpleSkuDiscountUnit.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::SimpleSkuDiscountUnit
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique SKU ID, assigned by Voucherify. | |
+| **source_id** | **String** | Product variant's source ID. | [optional] |
+| **name** | **String** | Sku name | |
+
diff --git a/docs/SimpleVoucher.md b/docs/SimpleVoucher.md
new file mode 100644
index 00000000..633405e5
--- /dev/null
+++ b/docs/SimpleVoucher.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::SimpleVoucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier that represents the voucher assigned by Voucherify. | [optional] |
+| **code** | **String** | Voucher code. | |
+| **gift** | [**Gift**](Gift.md) | | [optional] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **loyalty_card** | **Object** | Defines the loyalty card details. | [optional] |
+| **type** | **String** | Type of the object. | [optional][default to 'voucher'] |
+| **campaign** | **Object** | Campaign object | [optional] |
+| **campaign_id** | **String** | Campaign unique ID. | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] |
+| **holder_id** | **String** | Unique customer ID of campaign owner. | [optional] |
+| **referrer_id** | **String** | Unique referrer ID. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the order was created in ISO 8601 format. | [optional] |
+| **object** | **String** | The type of object represented by JSON. | [optional][default to 'voucher'] |
+
diff --git a/docs/Sku.md b/docs/Sku.md
new file mode 100644
index 00000000..028d0a6b
--- /dev/null
+++ b/docs/Sku.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::Sku
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | |
+| **source_id** | **String** | A unique SKU identifier from your inventory system. | |
+| **product_id** | **String** | The parent product's unique ID. | |
+| **sku** | **String** | Unique user-defined SKU name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **currency** | **String** | SKU price currency. | [optional] |
+| **attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the SKU was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the SKU was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the `SKU`. | [default to 'sku'] |
+
diff --git a/docs/SkuWithProduct.md b/docs/SkuWithProduct.md
new file mode 100644
index 00000000..bc32419c
--- /dev/null
+++ b/docs/SkuWithProduct.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::SkuWithProduct
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | |
+| **source_id** | **String** | A unique SKU identifier from your inventory system. | |
+| **product_id** | **String** | The parent product's unique ID. | |
+| **sku** | **String** | Unique user-defined SKU name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **currency** | **String** | SKU price currency. | [optional] |
+| **attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the SKU was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the SKU was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the `SKU`. | [default to 'sku'] |
+| **product** | [**ProductWithoutSkus**](ProductWithoutSkus.md) | | [optional] |
+
diff --git a/docs/SkusGetResponseBody.md b/docs/SkusGetResponseBody.md
new file mode 100644
index 00000000..0ba156fc
--- /dev/null
+++ b/docs/SkusGetResponseBody.md
@@ -0,0 +1,19 @@
+# VoucherifySdk::SkusGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | A unique identifier that represents the SKU and is assigned by Voucherify. | |
+| **source_id** | **String** | A unique SKU identifier from your inventory system. | |
+| **product_id** | **String** | The parent product's unique ID. | |
+| **sku** | **String** | Unique user-defined SKU name. | |
+| **price** | **Integer** | Unit price. It is represented by a value multiplied by 100 to accurately reflect 2 decimal places, such as `$100.00` being expressed as `10000`. | |
+| **currency** | **String** | SKU price currency. | [optional] |
+| **attributes** | **Object** | The attributes object stores values for all custom attributes inherited by the SKU from the parent product. A set of key/value pairs that are attached to a SKU object and are unique to each SKU within a product family. | |
+| **image_url** | **String** | The HTTPS URL pointing to the .png or .jpg file that will be used to render the SKU image. | |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the SKU. A set of key/value pairs that you can attach to a SKU object. It can be useful for storing additional information about the SKU in a structured format. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the SKU was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the SKU was updated in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the `SKU`. | [default to 'sku'] |
+
diff --git a/docs/SkusImportCsvCreateResponseBody.md b/docs/SkusImportCsvCreateResponseBody.md
new file mode 100644
index 00000000..ece40a93
--- /dev/null
+++ b/docs/SkusImportCsvCreateResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::SkusImportCsvCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/SkusList.md b/docs/SkusList.md
new file mode 100644
index 00000000..526e6c8a
--- /dev/null
+++ b/docs/SkusList.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::SkusList
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about SKUs. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the JSON property that contains the array of SKUs. | [default to 'data'] |
+| **skus** | [**Array<Sku>**](Sku.md) | A dictionary that contains an array of SKUs. | |
+| **total** | **Integer** | Total number of SKUs in the product. | |
+
diff --git a/docs/SkusListForProduct.md b/docs/SkusListForProduct.md
new file mode 100644
index 00000000..081d6476
--- /dev/null
+++ b/docs/SkusListForProduct.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::SkusListForProduct
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about SKUs. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the JSON property that contains the array of SKUs. | [default to 'data'] |
+| **data** | [**Array<Sku>**](Sku.md) | A dictionary that contains an array of SKUs. | |
+| **total** | **Integer** | Total number of SKUs in the product. | |
+
diff --git a/docs/StackableDiscountsApi.md b/docs/StackableDiscountsApi.md
new file mode 100644
index 00000000..309a3314
--- /dev/null
+++ b/docs/StackableDiscountsApi.md
@@ -0,0 +1,412 @@
+# VoucherifySdk::StackableDiscountsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**redeem_stacked_discounts**](StackableDiscountsApi.md#redeem_stacked_discounts) | **POST** /v1/redemptions | Redeem Stackable Discounts |
+| [**redeem_stacked_discounts_client_side**](StackableDiscountsApi.md#redeem_stacked_discounts_client_side) | **POST** /client/v1/redemptions | Redeem Stackable Discounts (client-side) |
+| [**rollback_stacked_redemptions**](StackableDiscountsApi.md#rollback_stacked_redemptions) | **POST** /v1/redemptions/{parentRedemptionId}/rollbacks | Rollback Stackable Redemptions |
+| [**validate_stacked_discounts**](StackableDiscountsApi.md#validate_stacked_discounts) | **POST** /v1/validations | Validate Stackable Discounts |
+| [**validate_stacked_discounts_client_side**](StackableDiscountsApi.md#validate_stacked_discounts_client_side) | **POST** /client/v1/validations | Validate Stackable Discounts (client-side) |
+
+
+## redeem_stacked_discounts
+
+> redeem_stacked_discounts(opts)
+
+Redeem Stackable Discounts
+
+## How API returns calculated discounts and order amounts in the response In the table below, you can see the logic the API follows to calculate discounts and amounts: | **Field** | **Calculation** | **Description** | |:---|:---|:---| | amount | N/A | This field shows the order amount before applying any discount | | total_amount | `total_amount` = `amount` - `total_discount_amount` | This field shows the order amount after applying all the discounts | | discount_amount | `discount_amount` = `previous_discount_amount` + `applied_discount_amount` | This field sums up all order-level discounts up to and including the specific discount being calculated for the stacked redemption. | | items_discount_amount | sum(items, i => i.discount_amount) | This field sums up all product-specific discounts | | total_discount_amount | `total_discount_amount` = `discount_amount` + `items_discount_amount` | This field sums up all order-level and all product-specific discounts | | applied_discount_amount | N/A | This field shows the order-level discount applied in a particular request | | items_applied_discount_amount | sum(items, i => i.applied_discount_amount) | This field sums up all product-specific discounts applied in a particular request | | total_applied_discount_amount | `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | This field sums up all order-level and all product-specific discounts applied in a particular request | > 📘 Rollbacks > > You can't roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your [rollback request](ref:rollback-stacked-redemptions). > 📘 Also available on client-side > > This method is also accessible through public keys which you can use in client-side apps: mobile and web browser apps. Go to the dedicated [endpoint](ref:redeem-stacked-discounts-client-side) to learn more. > - Use `X-Client-Application-Id` as the application ID header. > - Use `X-Client-Token` as the appliction secret key header. > - Use client-side base URL. > - Use an `origin` header for your custom domain.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::StackableDiscountsApi.new
+opts = {
+ redemptions_redeem_request_body: VoucherifySdk::RedemptionsRedeemRequestBody.new({redeemables: [VoucherifySdk::RedeemGiftCard.new({object: 'voucher', id: 'id_example'})]}) # RedemptionsRedeemRequestBody |
+}
+
+begin
+ # Redeem Stackable Discounts
+ result = api_instance.redeem_stacked_discounts(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling StackableDiscountsApi->redeem_stacked_discounts: #{e}"
+end
+```
+
+#### Using the redeem_stacked_discounts_with_http_info variant
+
+This returns an Array which contains the response data, status code and headers.
+
+> , Integer, Hash)> redeem_stacked_discounts_with_http_info(opts)
+
+```ruby
+begin
+ # Redeem Stackable Discounts
+ data, status_code, headers = api_instance.redeem_stacked_discounts_with_http_info(opts)
+ p status_code # => 2xx
+ p headers # => { ... }
+ p data # =>
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling StackableDiscountsApi->redeem_stacked_discounts_with_http_info: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redemptions_redeem_request_body** | [**RedemptionsRedeemRequestBody**](RedemptionsRedeemRequestBody.md) | | [optional] |
+
+### Return type
+
+[**RedemptionsRedeemResponseBody**](RedemptionsRedeemResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## redeem_stacked_discounts_client_side
+
+> redeem_stacked_discounts_client_side(origin, opts)
+
+Redeem Stackable Discounts (client-side)
+
+This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications. ## How API returns calculated discounts and order amounts in the response In the table below, you can see the logic the API follows to calculate discounts and amounts: | **Field** | **Calculation** | **Description** | |:---|:---|:---| | amount | N/A | This field shows the order amount before applying any discount | | total_amount | `total_amount` = `amount` - `total_discount_amount` | This field shows the order amount after applying all the discounts | | discount_amount | `discount_amount` = `previous_discount_amount` + `applied_discount_amount` | This field sums up all order-level discounts up to and including the specific discount being calculated for the stacked redemption. | | items_discount_amount | sum(items, i => i.discount_amount) | This field sums up all product-specific discounts | | total_discount_amount | `total_discount_amount` = `discount_amount` + `items_discount_amount` | This field sums up all order-level and all product-specific discounts | | applied_discount_amount | N/A | This field shows the order-level discount applied in a particular request | | items_applied_discount_amount | sum(items, i => i.applied_discount_amount) | This field sums up all product-specific discounts applied in a particular request | | total_applied_discount_amount | `total_applied_discount_amount` = `applied_discount_amount` + `items_applied_discount_amount` | This field sums up all order-level and all product-specific discounts applied in a particular request | > 📘 Rollbacks > > You can't roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your [rollback request](ref:rollback-stacked-redemptions).
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-Client-Application-Id
+ config.api_key['X-Client-Application-Id'] = '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['X-Client-Application-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-Client-Token
+ config.api_key['X-Client-Token'] = '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['X-Client-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::StackableDiscountsApi.new
+origin = 'origin_example' # String | Indicates the origin (scheme, hostname, and port).
+opts = {
+ client_redemptions_redeem_request_body: VoucherifySdk::ClientRedemptionsRedeemRequestBody.new({redeemables: [VoucherifySdk::RedeemGiftCard.new({object: 'voucher', id: 'id_example'})]}) # ClientRedemptionsRedeemRequestBody |
+}
+
+begin
+ # Redeem Stackable Discounts (client-side)
+ result = api_instance.redeem_stacked_discounts_client_side(origin, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling StackableDiscountsApi->redeem_stacked_discounts_client_side: #{e}"
+end
+```
+
+#### Using the redeem_stacked_discounts_client_side_with_http_info variant
+
+This returns an Array which contains the response data, status code and headers.
+
+> , Integer, Hash)> redeem_stacked_discounts_client_side_with_http_info(origin, opts)
+
+```ruby
+begin
+ # Redeem Stackable Discounts (client-side)
+ data, status_code, headers = api_instance.redeem_stacked_discounts_client_side_with_http_info(origin, opts)
+ p status_code # => 2xx
+ p headers # => { ... }
+ p data # =>
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling StackableDiscountsApi->redeem_stacked_discounts_client_side_with_http_info: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **origin** | **String** | Indicates the origin (scheme, hostname, and port). | |
+| **client_redemptions_redeem_request_body** | [**ClientRedemptionsRedeemRequestBody**](ClientRedemptionsRedeemRequestBody.md) | | [optional] |
+
+### Return type
+
+[**ClientRedemptionsRedeemResponseBody**](ClientRedemptionsRedeemResponseBody.md)
+
+### Authorization
+
+[X-Client-Application-Id](../README.md#X-Client-Application-Id), [X-Client-Token](../README.md#X-Client-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## rollback_stacked_redemptions
+
+> rollback_stacked_redemptions(parent_redemption_id, opts)
+
+Rollback Stackable Redemptions
+
+Rollback a stackable redemption. When you rollback a stacked redemption, all child redemptions will be rolled back. Provide the parent redemption ID as the path parameter.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::StackableDiscountsApi.new
+parent_redemption_id = 'parent_redemption_id_example' # String | Unique identifier of a parent redemption, e.g. `r_JQfm73zWSJFQxs3bGxweYjgm`.
+opts = {
+ reason: 'reason_example', # String | Reason for the rollback.
+ tracking_id: 'tracking_id_example', # String | Customer's `source_id`.
+ redemptions_rollbacks_create_request_body: VoucherifySdk::RedemptionsRollbacksCreateRequestBody.new # RedemptionsRollbacksCreateRequestBody | Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.
+}
+
+begin
+ # Rollback Stackable Redemptions
+ result = api_instance.rollback_stacked_redemptions(parent_redemption_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling StackableDiscountsApi->rollback_stacked_redemptions: #{e}"
+end
+```
+
+#### Using the rollback_stacked_redemptions_with_http_info variant
+
+This returns an Array which contains the response data, status code and headers.
+
+> , Integer, Hash)> rollback_stacked_redemptions_with_http_info(parent_redemption_id, opts)
+
+```ruby
+begin
+ # Rollback Stackable Redemptions
+ data, status_code, headers = api_instance.rollback_stacked_redemptions_with_http_info(parent_redemption_id, opts)
+ p status_code # => 2xx
+ p headers # => { ... }
+ p data # =>
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling StackableDiscountsApi->rollback_stacked_redemptions_with_http_info: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **parent_redemption_id** | **String** | Unique identifier of a parent redemption, e.g. `r_JQfm73zWSJFQxs3bGxweYjgm`. | |
+| **reason** | **String** | Reason for the rollback. | [optional] |
+| **tracking_id** | **String** | Customer's `source_id`. | [optional] |
+| **redemptions_rollbacks_create_request_body** | [**RedemptionsRollbacksCreateRequestBody**](RedemptionsRollbacksCreateRequestBody.md) | Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body. | [optional] |
+
+### Return type
+
+[**RedemptionsRollbacksCreateResponseBody**](RedemptionsRollbacksCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## validate_stacked_discounts
+
+> validate_stacked_discounts(opts)
+
+Validate Stackable Discounts
+
+Verify redeemables provided in the request. This method is designed for server side integration which means that it is accessible only through private keys.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::StackableDiscountsApi.new
+opts = {
+ validations_validate_request_body: VoucherifySdk::ValidationsValidateRequestBody.new({redeemables: [VoucherifySdk::RedeemGiftCard.new({object: 'voucher', id: 'id_example'})]}) # ValidationsValidateRequestBody |
+}
+
+begin
+ # Validate Stackable Discounts
+ result = api_instance.validate_stacked_discounts(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling StackableDiscountsApi->validate_stacked_discounts: #{e}"
+end
+```
+
+#### Using the validate_stacked_discounts_with_http_info variant
+
+This returns an Array which contains the response data, status code and headers.
+
+> , Integer, Hash)> validate_stacked_discounts_with_http_info(opts)
+
+```ruby
+begin
+ # Validate Stackable Discounts
+ data, status_code, headers = api_instance.validate_stacked_discounts_with_http_info(opts)
+ p status_code # => 2xx
+ p headers # => { ... }
+ p data # =>
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling StackableDiscountsApi->validate_stacked_discounts_with_http_info: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **validations_validate_request_body** | [**ValidationsValidateRequestBody**](ValidationsValidateRequestBody.md) | | [optional] |
+
+### Return type
+
+[**ValidationsValidateResponseBody**](ValidationsValidateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## validate_stacked_discounts_client_side
+
+> validate_stacked_discounts_client_side(origin, opts)
+
+Validate Stackable Discounts (client-side)
+
+Verify redeemables provided in the request. This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-Client-Application-Id
+ config.api_key['X-Client-Application-Id'] = '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['X-Client-Application-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-Client-Token
+ config.api_key['X-Client-Token'] = '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['X-Client-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::StackableDiscountsApi.new
+origin = 'origin_example' # String | Indicates the origin (scheme, hostname, and port).
+opts = {
+ client_validations_validate_request_body: VoucherifySdk::ClientValidationsValidateRequestBody.new({redeemables: [VoucherifySdk::RedeemGiftCard.new({object: 'voucher', id: 'id_example'})]}) # ClientValidationsValidateRequestBody |
+}
+
+begin
+ # Validate Stackable Discounts (client-side)
+ result = api_instance.validate_stacked_discounts_client_side(origin, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling StackableDiscountsApi->validate_stacked_discounts_client_side: #{e}"
+end
+```
+
+#### Using the validate_stacked_discounts_client_side_with_http_info variant
+
+This returns an Array which contains the response data, status code and headers.
+
+> , Integer, Hash)> validate_stacked_discounts_client_side_with_http_info(origin, opts)
+
+```ruby
+begin
+ # Validate Stackable Discounts (client-side)
+ data, status_code, headers = api_instance.validate_stacked_discounts_client_side_with_http_info(origin, opts)
+ p status_code # => 2xx
+ p headers # => { ... }
+ p data # =>
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling StackableDiscountsApi->validate_stacked_discounts_client_side_with_http_info: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **origin** | **String** | Indicates the origin (scheme, hostname, and port). | |
+| **client_validations_validate_request_body** | [**ClientValidationsValidateRequestBody**](ClientValidationsValidateRequestBody.md) | | [optional] |
+
+### Return type
+
+[**ClientValidationsValidateResponseBody**](ClientValidationsValidateResponseBody.md)
+
+### Authorization
+
+[X-Client-Application-Id](../README.md#X-Client-Application-Id), [X-Client-Token](../README.md#X-Client-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/StackableValidateRedeemBase.md b/docs/StackableValidateRedeemBase.md
new file mode 100644
index 00000000..b4f421e8
--- /dev/null
+++ b/docs/StackableValidateRedeemBase.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::StackableValidateRedeemBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redeemables** | [**Array<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | An array of redeemables. You can combine `voucher`(s) and `promotion_tier`(s). Alternatively, send one unique`promotion_stack` in the array. | |
+| **order** | [**Order**](Order.md) | | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **session** | [**Session**](Session.md) | | [optional] |
+| **tracking_id** | **String** | Is correspondent to Customer's source_id | [optional] |
+| **metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | [optional] |
+
diff --git a/docs/StackableValidateRedeemBaseRedeemablesItem.md b/docs/StackableValidateRedeemBaseRedeemablesItem.md
new file mode 100644
index 00000000..1049bfdb
--- /dev/null
+++ b/docs/StackableValidateRedeemBaseRedeemablesItem.md
@@ -0,0 +1,55 @@
+# VoucherifySdk::StackableValidateRedeemBaseRedeemablesItem
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::StackableValidateRedeemBaseRedeemablesItem.openapi_one_of
+# =>
+# [
+# :'RedeemGiftCard',
+# :'RedeemLoyaltyCard',
+# :'RedeemPromotionStack',
+# :'RedeemPromotionTier',
+# :'RedeemVoucher'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::StackableValidateRedeemBaseRedeemablesItem.build(data)
+# => #
+
+VoucherifySdk::StackableValidateRedeemBaseRedeemablesItem.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `RedeemGiftCard`
+- `RedeemLoyaltyCard`
+- `RedeemPromotionStack`
+- `RedeemPromotionTier`
+- `RedeemVoucher`
+- `nil` (if no type matches)
+
diff --git a/docs/StackingRules.md b/docs/StackingRules.md
new file mode 100644
index 00000000..423e8dd2
--- /dev/null
+++ b/docs/StackingRules.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::StackingRules
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redeemables_limit** | **Integer** | Defines how many redeemables can be sent in one stacking request (note: more redeemables means more processing time!). | [default to 30] |
+| **applicable_redeemables_limit** | **Integer** | Defines how many of the sent redeemables will be applied to the order. For example, a user can select 30 discounts but only 5 will be applied to the order and the remaining will be labelled as SKIPPED. | [default to 5] |
+| **applicable_exclusive_redeemables_limit** | **Integer** | Defines how many redeemables with an exclusive category can be applied in one request. | [default to 1] |
+| **applicable_redeemables_per_category_limit** | **Integer** | Defines how many redeemables per category can be applied in one request. | [optional][default to 1] |
+| **exclusive_categories** | **Array<String>** | Lists all exclusive categories. A redeemable from a campaign with an exclusive category is the only redeemable to be redeemed when applied with redeemables from other campaigns unless these campaigns are exclusive or joint. | |
+| **joint_categories** | **Array<String>** | Lists all joint categories. A campaign with a joint category is always applied regardless of the exclusivity of other campaigns. | |
+| **redeemables_application_mode** | **String** | Defines redeemables application mode. | [optional] |
+| **redeemables_sorting_rule** | **String** | Defines redeemables sorting rule. | [optional][default to 'REQUESTED_ORDER'] |
+
diff --git a/docs/ValidationEntity.md b/docs/ValidationEntity.md
new file mode 100644
index 00000000..a4c7e645
--- /dev/null
+++ b/docs/ValidationEntity.md
@@ -0,0 +1,15 @@
+# VoucherifySdk::ValidationEntity
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique validation id. | [optional] |
+| **session_id** | **String** | Unique session id. | [optional] |
+| **status** | **String** | The validation status | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the validation was created in ISO 8601 format. | [optional] |
+| **customer_id** | **String** | Unique customer ID of the customer making the purchase. | [optional] |
+| **redeemables** | [**Array<ValidationsRedeemableApplicable>**](ValidationsRedeemableApplicable.md) | Lists validation results of each redeemable. | [optional] |
+| **skipped_redeemables** | [**Array<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each redeemable. | [optional] |
+| **inapplicable_redeemables** | [**Array<ValidationsRedeemableSkipped>**](ValidationsRedeemableSkipped.md) | Lists validation results of each redeemable. | [optional] |
+
diff --git a/docs/ValidationRule.md b/docs/ValidationRule.md
new file mode 100644
index 00000000..8dcf9524
--- /dev/null
+++ b/docs/ValidationRule.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::ValidationRule
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Custom, unique name for set of validation rules. | |
+| **rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | |
+| **error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] |
+| **applicable_to** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | |
+| **type** | **String** | Type of validation rule. | [default to 'expression'] |
+| **context_type** | **String** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [default to 'global'] |
+| **id** | **String** | Unique validation rule ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the validation rule was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the validation rule was updated in ISO 8601 format. | [optional] |
+| **assignments_count** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the validation rule. | [default to 'validation_rules'] |
+
diff --git a/docs/ValidationRuleAssignment.md b/docs/ValidationRuleAssignment.md
new file mode 100644
index 00000000..e55c21ba
--- /dev/null
+++ b/docs/ValidationRuleAssignment.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::ValidationRuleAssignment
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Validation rule assignment ID. | |
+| **rule_id** | **String** | Validation rule ID. | |
+| **related_object_id** | **String** | The resource ID to which the validation rule was assigned. | |
+| **related_object_type** | **String** | The type of resource to which the validation rule was assigned. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the validation rule assignment was created in ISO 8601 format. | |
+| **object** | **String** | The type of object represented by the ID. | [default to 'validation_rules_assignment'] |
+
diff --git a/docs/ValidationRuleAssignmentsList.md b/docs/ValidationRuleAssignmentsList.md
new file mode 100644
index 00000000..52e32a28
--- /dev/null
+++ b/docs/ValidationRuleAssignmentsList.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ValidationRuleAssignmentsList
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about validation rule assignments. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the JSON property that contains the array of validation rule assignments. | [default to 'data'] |
+| **data** | [**Array<ValidationRuleAssignment>**](ValidationRuleAssignment.md) | A dictionary that contains an array of validation rule assignments. | |
+| **total** | **Integer** | Total number of validation rule assignments. | |
+
diff --git a/docs/ValidationRuleBase.md b/docs/ValidationRuleBase.md
new file mode 100644
index 00000000..deba2555
--- /dev/null
+++ b/docs/ValidationRuleBase.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::ValidationRuleBase
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Custom, unique name for set of validation rules. | [optional] |
+| **rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | [optional] |
+| **error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] |
+| **applicable_to** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | [optional] |
+| **type** | **String** | Type of validation rule. | [optional][default to 'expression'] |
+| **context_type** | **String** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional][default to 'global'] |
+
diff --git a/docs/ValidationRuleBaseApplicableTo.md b/docs/ValidationRuleBaseApplicableTo.md
new file mode 100644
index 00000000..a456ddfe
--- /dev/null
+++ b/docs/ValidationRuleBaseApplicableTo.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::ValidationRuleBaseApplicableTo
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **excluded** | [**Array<ApplicableTo>**](ApplicableTo.md) | Defines which items are excluded from a discount. | [optional] |
+| **included** | [**Array<ApplicableTo>**](ApplicableTo.md) | Defines which items are included in a discount. | [optional] |
+| **included_all** | **Boolean** | Indicates whether all items are included in the discount. | [optional] |
+
diff --git a/docs/ValidationRuleBaseError.md b/docs/ValidationRuleBaseError.md
new file mode 100644
index 00000000..78b4a7d9
--- /dev/null
+++ b/docs/ValidationRuleBaseError.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::ValidationRuleBaseError
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **message** | **String** | The error message returned from API when validation / redemption fails to meet requirements of defined rules. | [optional] |
+
diff --git a/docs/ValidationRulesApi.md b/docs/ValidationRulesApi.md
new file mode 100644
index 00000000..a58c1624
--- /dev/null
+++ b/docs/ValidationRulesApi.md
@@ -0,0 +1,513 @@
+# VoucherifySdk::ValidationRulesApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**create_validation_rules**](ValidationRulesApi.md#create_validation_rules) | **POST** /v1/validation-rules | Create Validation Rules |
+| [**delete_validation_rule_assignment**](ValidationRulesApi.md#delete_validation_rule_assignment) | **DELETE** /v1/validation-rules/{validationRuleId}/assignments/{assignmentId} | Delete Validation Rule Assignment |
+| [**delete_validation_rules**](ValidationRulesApi.md#delete_validation_rules) | **DELETE** /v1/validation-rules/{validationRuleId} | Delete Validation Rule |
+| [**get_validation_rule**](ValidationRulesApi.md#get_validation_rule) | **GET** /v1/validation-rules/{validationRuleId} | Get Validation Rule |
+| [**list_validation_rule_assignments**](ValidationRulesApi.md#list_validation_rule_assignments) | **GET** /v1/validation-rules/{validationRuleId}/assignments | List Validation Rule Assignments |
+| [**list_validation_rules**](ValidationRulesApi.md#list_validation_rules) | **GET** /v1/validation-rules | List Validation Rules |
+| [**list_validation_rules_assignments**](ValidationRulesApi.md#list_validation_rules_assignments) | **GET** /v1/validation-rules-assignments | List Validation Rules' Assignment(s) |
+| [**update_validation_rule**](ValidationRulesApi.md#update_validation_rule) | **PUT** /v1/validation-rules/{validationRuleId} | Update Validation Rule |
+
+
+## create_validation_rules
+
+> create_validation_rules(opts)
+
+Create Validation Rules
+
+Create validation rules.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ValidationRulesApi.new
+opts = {
+ validation_rules_create_request_body: VoucherifySdk::ValidationRulesCreateRequestBody.new({name: 'Business Validation Rule'}) # ValidationRulesCreateRequestBody | Specify the validation rules parameters.
+}
+
+begin
+ # Create Validation Rules
+ result = api_instance.create_validation_rules(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ValidationRulesApi->create_validation_rules: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **validation_rules_create_request_body** | [**ValidationRulesCreateRequestBody**](ValidationRulesCreateRequestBody.md) | Specify the validation rules parameters. | [optional] |
+
+### Return type
+
+[**ValidationRulesCreateResponseBody**](ValidationRulesCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## delete_validation_rule_assignment
+
+> delete_validation_rule_assignment(validation_rule_id, assignment_id)
+
+Delete Validation Rule Assignment
+
+This method deletes a validation rule assignment.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ValidationRulesApi.new
+validation_rule_id = 'validation_rule_id_example' # String | A unique validation rule ID.
+assignment_id = 'assignment_id_example' # String | A unique validation rule assignment ID.
+
+begin
+ # Delete Validation Rule Assignment
+ api_instance.delete_validation_rule_assignment(validation_rule_id, assignment_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ValidationRulesApi->delete_validation_rule_assignment: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **validation_rule_id** | **String** | A unique validation rule ID. | |
+| **assignment_id** | **String** | A unique validation rule assignment ID. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## delete_validation_rules
+
+> delete_validation_rules(validation_rule_id)
+
+Delete Validation Rule
+
+This method deletes a validation rule.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ValidationRulesApi.new
+validation_rule_id = 'validation_rule_id_example' # String | A unique validation rule ID.
+
+begin
+ # Delete Validation Rule
+ api_instance.delete_validation_rules(validation_rule_id)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ValidationRulesApi->delete_validation_rules: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **validation_rule_id** | **String** | A unique validation rule ID. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## get_validation_rule
+
+> get_validation_rule(validation_rule_id)
+
+Get Validation Rule
+
+Retrieve the details of a validation rule.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ValidationRulesApi.new
+validation_rule_id = 'validation_rule_id_example' # String | A unique validation rule ID.
+
+begin
+ # Get Validation Rule
+ result = api_instance.get_validation_rule(validation_rule_id)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ValidationRulesApi->get_validation_rule: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **validation_rule_id** | **String** | A unique validation rule ID. | |
+
+### Return type
+
+[**ValidationRulesGetResponseBody**](ValidationRulesGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_validation_rule_assignments
+
+> list_validation_rule_assignments(validation_rule_id, opts)
+
+List Validation Rule Assignments
+
+Retrieve validation rule assignments for a specific validation rule.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ValidationRulesApi.new
+validation_rule_id = 'validation_rule_id_example' # String | Unique validation rule ID.
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ order: VoucherifySdk::ParameterOrderListValidationRuleAssignments::CREATED_AT # ParameterOrderListValidationRuleAssignments | This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+}
+
+begin
+ # List Validation Rule Assignments
+ result = api_instance.list_validation_rule_assignments(validation_rule_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ValidationRulesApi->list_validation_rule_assignments: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **validation_rule_id** | **String** | Unique validation rule ID. | |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **order** | [**ParameterOrderListValidationRuleAssignments**](.md) | This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+
+### Return type
+
+[**ValidationRulesAssignmentsListResponseBody**](ValidationRulesAssignmentsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_validation_rules
+
+> list_validation_rules(opts)
+
+List Validation Rules
+
+Retrieve validation rules.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ValidationRulesApi.new
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56, # Integer | Which page of results to return.
+ order: VoucherifySdk::ParameterOrderListValidationRules::CREATED_AT, # ParameterOrderListValidationRules | This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ start_date: Time.parse('2013-10-20T19:20:30+01:00'), # Time | Timestamp representing the date and time which results must start on. Represented in ISO 8601 format.
+ end_date: Time.parse('2013-10-20T19:20:30+01:00') # Time | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+}
+
+begin
+ # List Validation Rules
+ result = api_instance.list_validation_rules(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ValidationRulesApi->list_validation_rules: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **order** | [**ParameterOrderListValidationRules**](.md) | This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+| **start_date** | **Time** | Timestamp representing the date and time which results must start on. Represented in ISO 8601 format. | [optional] |
+| **end_date** | **Time** | Timestamp representing the date and time which results must end on. Represented in ISO 8601 format. | [optional] |
+
+### Return type
+
+[**ValidationRulesListResponseBody**](ValidationRulesListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## list_validation_rules_assignments
+
+> list_validation_rules_assignments(opts)
+
+List Validation Rules' Assignment(s)
+
+List all validation rules assignments or filter the results using the related object ID or the validation rule ID query parameters. # How to retrieve specific validation rule assignments(s) ## Related object ID To find an assignment for a particular resource, you can use the ID of the object to which the validation rule was assigned. This could be, for example, an ID of a: voucher, campaign, distribution, reward assignment, earning rule, promotion tier. ## Validation rule ID You can use the validation rule ID to find assignment(s) for a specific validation rule.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ValidationRulesApi.new
+opts = {
+ related_object_id: 'related_object_id_example', # String | The resource ID to which the validation rule was assigned; this could be, for example, a resource ID of a voucher, campaign, earning rule, reward assignment, promotion tier, or distribution.
+ rule: 'rule_example', # String | Validation rule ID.
+ page: 56, # Integer | Which page of results to return.
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ order: 'order_example' # String | Sorts the results using one of the filtering options: -created_at, created_at, where the dash - preceding a sorting option means sorting in a descending order.
+}
+
+begin
+ # List Validation Rules' Assignment(s)
+ result = api_instance.list_validation_rules_assignments(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ValidationRulesApi->list_validation_rules_assignments: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **related_object_id** | **String** | The resource ID to which the validation rule was assigned; this could be, for example, a resource ID of a voucher, campaign, earning rule, reward assignment, promotion tier, or distribution. | [optional] |
+| **rule** | **String** | Validation rule ID. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **order** | **String** | Sorts the results using one of the filtering options: -created_at, created_at, where the dash - preceding a sorting option means sorting in a descending order. | [optional] |
+
+### Return type
+
+[**ValidationRulesAssignmentsListResponseBody**](ValidationRulesAssignmentsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## update_validation_rule
+
+> update_validation_rule(validation_rule_id, opts)
+
+Update Validation Rule
+
+Update validation rule parameters.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ValidationRulesApi.new
+validation_rule_id = 'validation_rule_id_example' # String | A unique validation rule ID.
+opts = {
+ validation_rules_update_request_body: VoucherifySdk::ValidationRulesUpdateRequestBody.new # ValidationRulesUpdateRequestBody | Specify the parameters to be updated.
+}
+
+begin
+ # Update Validation Rule
+ result = api_instance.update_validation_rule(validation_rule_id, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ValidationRulesApi->update_validation_rule: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **validation_rule_id** | **String** | A unique validation rule ID. | |
+| **validation_rules_update_request_body** | [**ValidationRulesUpdateRequestBody**](ValidationRulesUpdateRequestBody.md) | Specify the parameters to be updated. | [optional] |
+
+### Return type
+
+[**ValidationRulesUpdateResponseBody**](ValidationRulesUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/ValidationRulesAssignmentsList.md b/docs/ValidationRulesAssignmentsList.md
new file mode 100644
index 00000000..d4621df2
--- /dev/null
+++ b/docs/ValidationRulesAssignmentsList.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ValidationRulesAssignmentsList
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about validation rules assignments. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of validation rules assignments. | [default to 'data'] |
+| **data** | [**Array<BusValRuleAssignment>**](BusValRuleAssignment.md) | Contains array of validation rules assignments. | |
+| **total** | **Integer** | Total number of validation rules assignments. | |
+
diff --git a/docs/ValidationRulesAssignmentsListResponseBody.md b/docs/ValidationRulesAssignmentsListResponseBody.md
new file mode 100644
index 00000000..414facd6
--- /dev/null
+++ b/docs/ValidationRulesAssignmentsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ValidationRulesAssignmentsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about validation rule assignments. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the JSON property that contains the array of validation rule assignments. | [default to 'data'] |
+| **data** | [**Array<ValidationRuleAssignment>**](ValidationRuleAssignment.md) | A dictionary that contains an array of validation rule assignments. | |
+| **total** | **Integer** | Total number of validation rule assignments. | |
+
diff --git a/docs/ValidationRulesCreateRequestBody.md b/docs/ValidationRulesCreateRequestBody.md
new file mode 100644
index 00000000..3408b1e5
--- /dev/null
+++ b/docs/ValidationRulesCreateRequestBody.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::ValidationRulesCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Custom, unique name for set of validation rules. | |
+| **rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | [optional] |
+| **error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] |
+| **applicable_to** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | [optional] |
+| **type** | **String** | Type of validation rule. | [optional][default to 'expression'] |
+| **context_type** | **String** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional][default to 'global'] |
+
diff --git a/docs/ValidationRulesCreateResponseBody.md b/docs/ValidationRulesCreateResponseBody.md
new file mode 100644
index 00000000..92e2276b
--- /dev/null
+++ b/docs/ValidationRulesCreateResponseBody.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::ValidationRulesCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Custom, unique name for set of validation rules. | |
+| **rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | |
+| **error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] |
+| **applicable_to** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | |
+| **type** | **String** | Type of validation rule. | [default to 'expression'] |
+| **context_type** | **String** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [default to 'global'] |
+| **id** | **String** | Unique validation rule ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the validation rule was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the validation rule was updated in ISO 8601 format. | [optional] |
+| **assignments_count** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the validation rule. | [default to 'validation_rules'] |
+
diff --git a/docs/ValidationRulesGetResponseBody.md b/docs/ValidationRulesGetResponseBody.md
new file mode 100644
index 00000000..887e55a4
--- /dev/null
+++ b/docs/ValidationRulesGetResponseBody.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::ValidationRulesGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Custom, unique name for set of validation rules. | |
+| **rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | |
+| **error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] |
+| **applicable_to** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | |
+| **type** | **String** | Type of validation rule. | [default to 'expression'] |
+| **context_type** | **String** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [default to 'global'] |
+| **id** | **String** | Unique validation rule ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the validation rule was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the validation rule was updated in ISO 8601 format. | [optional] |
+| **assignments_count** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the validation rule. | [default to 'validation_rules'] |
+
diff --git a/docs/ValidationRulesListResponseBody.md b/docs/ValidationRulesListResponseBody.md
new file mode 100644
index 00000000..77c1e9b3
--- /dev/null
+++ b/docs/ValidationRulesListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ValidationRulesListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. This object stores information about validation rules. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of validation rules. | [default to 'data'] |
+| **data** | [**Array<ValidationRule>**](ValidationRule.md) | An array of validation rules. | |
+| **total** | **Integer** | Total number of validation rules in the project. | |
+
diff --git a/docs/ValidationRulesUpdateRequestBody.md b/docs/ValidationRulesUpdateRequestBody.md
new file mode 100644
index 00000000..93582512
--- /dev/null
+++ b/docs/ValidationRulesUpdateRequestBody.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::ValidationRulesUpdateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Custom, unique name for set of validation rules. | [optional] |
+| **rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | [optional] |
+| **error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] |
+| **applicable_to** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | [optional] |
+| **type** | **String** | Type of validation rule. | [optional][default to 'expression'] |
+| **context_type** | **String** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [optional][default to 'global'] |
+
diff --git a/docs/ValidationRulesUpdateResponseBody.md b/docs/ValidationRulesUpdateResponseBody.md
new file mode 100644
index 00000000..a1cd7232
--- /dev/null
+++ b/docs/ValidationRulesUpdateResponseBody.md
@@ -0,0 +1,18 @@
+# VoucherifySdk::ValidationRulesUpdateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **name** | **String** | Custom, unique name for set of validation rules. | |
+| **rules** | **Object** | Contains all the rule definitions for the validation rule. It is a set of key value pairs representing the rules and logic between the rules. The keys are numbered consecutively beginning from `1`. The values are objects containing the rule conditions. | |
+| **error** | [**ValidationRuleBaseError**](ValidationRuleBaseError.md) | | [optional] |
+| **applicable_to** | [**ValidationRuleBaseApplicableTo**](ValidationRuleBaseApplicableTo.md) | | |
+| **type** | **String** | Type of validation rule. | [default to 'expression'] |
+| **context_type** | **String** | Validation rule context type. | **Context Type** | **Definition** | |:---|:---| | earning_rule.order.paid | | | earning_rule.custom_event | | | earning_rule.customer.segment.entered | | | campaign.discount_coupons | | | campaign.discount_coupons.discount.apply_to_order | | | campaign.discount_coupons.discount.apply_to_items | | | campaign.discount_coupons.discount.apply_to_items_proportionally | | | campaign.discount_coupons.discount.apply_to_items_proportionally_by_quantity | | | campaign.discount_coupons.discount.fixed.apply_to_items | | | campaign.gift_vouchers | | | campaign.gift_vouchers.gift.apply_to_order | | | campaign.gift_vouchers.gift.apply_to_items | | | campaign.referral_program | | | campaign.referral_program.discount.apply_to_order | | | campaign.referral_program.discount.apply_to_items | | | campaign.referral_program.discount.apply_to_items_proportionally | | | campaign.referral_program.discount.apply_to_items_proportionally_by_quantity | | | campaign.referral_program.discount.fixed.apply_to_items | | | campaign.promotion | | | campaign.promotion.discount.apply_to_order | | | campaign.promotion.discount.apply_to_items | | | campaign.promotion.discount.apply_to_items_proportionally | | | campaign.promotion.discount.apply_to_items_proportionally_by_quantity | | | campaign.promotion.discount.fixed.apply_to_items | | | campaign.loyalty_program | | | campaign.lucky_draw | | | voucher.discount_voucher | | | voucher.discount_voucher.discount.apply_to_order | | | voucher.discount_voucher.discount.apply_to_items | | | voucher.discount_voucher.discount.apply_to_items_proportionally | | | voucher.discount_voucher.discount.apply_to_items_proportionally_by_quantity | | | voucher.discount_voucher.discount.fixed.apply_to_items | | | voucher.gift_voucher | | | voucher.gift_voucher.gift.apply_to_order | | | voucher.gift_voucher.gift.apply_to_items | | | voucher.loyalty_card | | | voucher.lucky_draw_code | | | distribution.custom_event | | | reward_assignment.pay_with_points | | | global | | | [default to 'global'] |
+| **id** | **String** | Unique validation rule ID. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the validation rule was created in ISO 8601 format. | |
+| **updated_at** | **Time** | Timestamp representing the date and time when the validation rule was updated in ISO 8601 format. | [optional] |
+| **assignments_count** | **Integer** | The number of instances the validation rule has been assigned to different types of redeemables. | [optional] |
+| **object** | **String** | The type of object represented by JSON. This object stores information about the validation rule. | [default to 'validation_rules'] |
+
diff --git a/docs/ValidationsApi.md b/docs/ValidationsApi.md
new file mode 100644
index 00000000..45317c8c
--- /dev/null
+++ b/docs/ValidationsApi.md
@@ -0,0 +1,68 @@
+# VoucherifySdk::ValidationsApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**validate_stacked_discounts**](ValidationsApi.md#validate_stacked_discounts) | **POST** /v1/validations | Validate Stackable Discounts |
+
+
+## validate_stacked_discounts
+
+> validate_stacked_discounts(opts)
+
+Validate Stackable Discounts
+
+Verify redeemables provided in the request. This method is designed for server side integration which means that it is accessible only through private keys.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::ValidationsApi.new
+opts = {
+ validations_validate_request_body: VoucherifySdk::ValidationsValidateRequestBody.new({redeemables: [VoucherifySdk::RedeemGiftCard.new({object: 'voucher', id: 'id_example'})]}) # ValidationsValidateRequestBody |
+}
+
+begin
+ # Validate Stackable Discounts
+ result = api_instance.validate_stacked_discounts(opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling ValidationsApi->validate_stacked_discounts: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **validations_validate_request_body** | [**ValidationsValidateRequestBody**](ValidationsValidateRequestBody.md) | | [optional] |
+
+### Return type
+
+[**ValidationsValidateResponseBody**](ValidationsValidateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/ValidationsRedeemableApplicable.md b/docs/ValidationsRedeemableApplicable.md
new file mode 100644
index 00000000..6d90fc28
--- /dev/null
+++ b/docs/ValidationsRedeemableApplicable.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::ValidationsRedeemableApplicable
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **status** | **String** | Indicates whether the redeemable can be applied or not applied based on the validation rules. | [optional][default to 'APPLICABLE'] |
+| **id** | **String** | Redeemable ID, i.e. the voucher code. | [optional] |
+| **object** | **String** | Redeemable's object type. | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **applicable_to** | [**ApplicableToResultList**](ApplicableToResultList.md) | | [optional] |
+| **inapplicable_to** | [**InapplicableToResultList**](InapplicableToResultList.md) | | [optional] |
+| **result** | [**ValidationsRedeemableApplicableResult**](ValidationsRedeemableApplicableResult.md) | | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes in the form of key/value pairs assigned to the redeemable. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | | [optional] |
+
diff --git a/docs/ValidationsRedeemableApplicableResult.md b/docs/ValidationsRedeemableApplicableResult.md
new file mode 100644
index 00000000..adebc619
--- /dev/null
+++ b/docs/ValidationsRedeemableApplicableResult.md
@@ -0,0 +1,55 @@
+# VoucherifySdk::ValidationsRedeemableApplicableResult
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ValidationsRedeemableApplicableResult.openapi_one_of
+# =>
+# [
+# :'RedeemableResultGiftCard',
+# :'RedeemableResultLoyaltyCard',
+# :'RedeemableResultPromotionStack',
+# :'RedeemableResultPromotionTier',
+# :'RedeemableResultVoucherCode'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ValidationsRedeemableApplicableResult.build(data)
+# => #
+
+VoucherifySdk::ValidationsRedeemableApplicableResult.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `RedeemableResultGiftCard`
+- `RedeemableResultLoyaltyCard`
+- `RedeemableResultPromotionStack`
+- `RedeemableResultPromotionTier`
+- `RedeemableResultVoucherCode`
+- `nil` (if no type matches)
+
diff --git a/docs/ValidationsRedeemableInapplicable.md b/docs/ValidationsRedeemableInapplicable.md
new file mode 100644
index 00000000..d6c20914
--- /dev/null
+++ b/docs/ValidationsRedeemableInapplicable.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ValidationsRedeemableInapplicable
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **status** | **String** | Indicates whether the redeemable can be applied or not applied based on the validation rules. | [optional][default to 'INAPPLICABLE'] |
+| **id** | **String** | Redeemable ID, i.e. the voucher code. | [optional] |
+| **object** | **String** | Redeemable's object type. | [optional] |
+| **result** | [**ValidationsRedeemableInapplicableResult**](ValidationsRedeemableInapplicableResult.md) | | [optional] |
+
diff --git a/docs/ValidationsRedeemableInapplicableResult.md b/docs/ValidationsRedeemableInapplicableResult.md
new file mode 100644
index 00000000..b69d724d
--- /dev/null
+++ b/docs/ValidationsRedeemableInapplicableResult.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::ValidationsRedeemableInapplicableResult
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **error** | [**Error**](Error.md) | | [optional] |
+
diff --git a/docs/ValidationsRedeemableSkipped.md b/docs/ValidationsRedeemableSkipped.md
new file mode 100644
index 00000000..03f34506
--- /dev/null
+++ b/docs/ValidationsRedeemableSkipped.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::ValidationsRedeemableSkipped
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **status** | **String** | Indicates whether the redeemable can be applied or not applied based on the validation rules. | [optional][default to 'SKIPPED'] |
+| **id** | **String** | Redeemable ID, i.e. the voucher code. | [optional] |
+| **object** | **String** | Redeemable's object type. | [optional] |
+| **result** | **Object** | | [optional] |
+
diff --git a/docs/ValidationsValidateAllResponseBody.md b/docs/ValidationsValidateAllResponseBody.md
new file mode 100644
index 00000000..c32f0f3c
--- /dev/null
+++ b/docs/ValidationsValidateAllResponseBody.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::ValidationsValidateAllResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **valid** | **Boolean** | The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. | |
+| **redeemables** | [**Array<ValidationsValidateAllResponseBodyRedeemablesItem>**](ValidationsValidateAllResponseBodyRedeemablesItem.md) | Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`. | |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **tracking_id** | **String** | Hashed customer source ID. | [optional] |
+| **session** | [**Session**](Session.md) | | [optional] |
+| **application_mode** | **String** | | [default to 'ALL'] |
+
diff --git a/docs/ValidationsValidateAllResponseBodyRedeemablesItem.md b/docs/ValidationsValidateAllResponseBodyRedeemablesItem.md
new file mode 100644
index 00000000..f4067b85
--- /dev/null
+++ b/docs/ValidationsValidateAllResponseBodyRedeemablesItem.md
@@ -0,0 +1,51 @@
+# VoucherifySdk::ValidationsValidateAllResponseBodyRedeemablesItem
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ValidationsValidateAllResponseBodyRedeemablesItem.openapi_one_of
+# =>
+# [
+# :'ValidationsRedeemableApplicable',
+# :'ValidationsRedeemableInapplicable',
+# :'ValidationsRedeemableSkipped'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::ValidationsValidateAllResponseBodyRedeemablesItem.build(data)
+# => #
+
+VoucherifySdk::ValidationsValidateAllResponseBodyRedeemablesItem.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `ValidationsRedeemableApplicable`
+- `ValidationsRedeemableInapplicable`
+- `ValidationsRedeemableSkipped`
+- `nil` (if no type matches)
+
diff --git a/docs/ValidationsValidatePartialResponseBody.md b/docs/ValidationsValidatePartialResponseBody.md
new file mode 100644
index 00000000..48dc0d71
--- /dev/null
+++ b/docs/ValidationsValidatePartialResponseBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ValidationsValidatePartialResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **valid** | **Boolean** | The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. | |
+| **redeemables** | [**Array<ValidationsRedeemableApplicable>**](ValidationsRedeemableApplicable.md) | Lists validation results of each redeemable. If a redeemable can be applied, the API returns `\"status\": \"APPLICABLE\"`. | |
+| **inapplicable_redeemables** | [**Array<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **tracking_id** | **String** | Hashed customer source ID. | [optional] |
+| **session** | [**Session**](Session.md) | | [optional] |
+| **application_mode** | **String** | | [default to 'PARTIAL'] |
+
diff --git a/docs/ValidationsValidateRequestBody.md b/docs/ValidationsValidateRequestBody.md
new file mode 100644
index 00000000..c573d443
--- /dev/null
+++ b/docs/ValidationsValidateRequestBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ValidationsValidateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **redeemables** | [**Array<StackableValidateRedeemBaseRedeemablesItem>**](StackableValidateRedeemBaseRedeemablesItem.md) | An array of redeemables. You can combine `voucher`(s) and `promotion_tier`(s). Alternatively, send one unique`promotion_stack` in the array. | |
+| **order** | [**Order**](Order.md) | | [optional] |
+| **customer** | [**Customer**](Customer.md) | | [optional] |
+| **session** | [**Session**](Session.md) | | [optional] |
+| **tracking_id** | **String** | Is correspondent to Customer's source_id | [optional] |
+| **metadata** | **Object** | A set of key/value pairs that you can attach to a redemption object. It can be useful for storing additional information about the redemption in a structured format. | [optional] |
+| **options** | [**ClientValidationsValidateRequestBodyAllOfOptions**](ClientValidationsValidateRequestBodyAllOfOptions.md) | | [optional] |
+
diff --git a/docs/ValidationsValidateResponseBody.md b/docs/ValidationsValidateResponseBody.md
new file mode 100644
index 00000000..1dc6098d
--- /dev/null
+++ b/docs/ValidationsValidateResponseBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::ValidationsValidateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **valid** | **Boolean** | The result of the validation. It takes all of the redeemables into account and returns a `false` if at least one redeemable is inapplicable. Returns `true` if all redeemables are applicable. | |
+| **redeemables** | [**Array<ValidationsValidateAllResponseBodyRedeemablesItem>**](ValidationsValidateAllResponseBodyRedeemablesItem.md) | Lists validation results of each redeemable. If redeemables_application_mode=\"PARTIAL\" all redeemables here will be \"APPLICABLE\" | |
+| **skipped_redeemables** | [**Array<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each skipped redeemable. | [optional] |
+| **inapplicable_redeemables** | [**Array<ValidationsRedeemableInapplicable>**](ValidationsRedeemableInapplicable.md) | Lists validation results of each inapplicable redeemable. | [optional] |
+| **order** | [**OrderCalculated**](OrderCalculated.md) | | [optional] |
+| **tracking_id** | **String** | Hashed customer source ID. | [optional] |
+| **session** | [**Session**](Session.md) | | [optional] |
+
diff --git a/docs/Voucher.md b/docs/Voucher.md
new file mode 100644
index 00000000..70f496ce
--- /dev/null
+++ b/docs/Voucher.md
@@ -0,0 +1,37 @@
+# VoucherifySdk::Voucher
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] |
+| **code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] |
+| **campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] |
+| **campaign_id** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] |
+| **category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] |
+| **category_id** | **String** | Unique category ID assigned by Voucherify. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | Contains details about the category. | [optional] |
+| **type** | **String** | Defines the type of the voucher. | [optional] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **gift** | [**VoucherGift**](VoucherGift.md) | | [optional] |
+| **loyalty_card** | [**VoucherLoyaltyCard**](VoucherLoyaltyCard.md) | | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**VoucherValidityTimeframe**](VoucherValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] |
+| **additional_info** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] |
+| **assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the voucher was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] |
+| **holder_id** | **String** | Unique customer ID of voucher owner. | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. Default is `voucher`. | [optional][default to 'voucher'] |
+| **distributions** | **Array<Object>** | | [optional] |
+| **deleted** | **Boolean** | Flag indicating whether this voucher is deleted. | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+| **publish** | [**VoucherPublish**](VoucherPublish.md) | | [optional] |
+| **redemption** | [**VoucherRedemption**](VoucherRedemption.md) | | [optional] |
+
diff --git a/docs/VoucherAssets.md b/docs/VoucherAssets.md
new file mode 100644
index 00000000..5c91a496
--- /dev/null
+++ b/docs/VoucherAssets.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherAssets
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **qr** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsQr**](LoyaltiesMembersTransfersCreateResponseBodyAssetsQr.md) | | [optional] |
+| **barcode** | [**LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode**](LoyaltiesMembersTransfersCreateResponseBodyAssetsBarcode.md) | | [optional] |
+
diff --git a/docs/VoucherGift.md b/docs/VoucherGift.md
new file mode 100644
index 00000000..4cf44576
--- /dev/null
+++ b/docs/VoucherGift.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::VoucherGift
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **amount** | **Integer** | Total gift card income over the lifetime of the card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] |
+| **balance** | **Integer** | Available funds. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | [optional] |
+| **effect** | **String** | Defines how the credits are applied to the customer's order. | [optional] |
+
diff --git a/docs/VoucherLoyaltyCard.md b/docs/VoucherLoyaltyCard.md
new file mode 100644
index 00000000..9f68badb
--- /dev/null
+++ b/docs/VoucherLoyaltyCard.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::VoucherLoyaltyCard
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **points** | **Integer** | Total points incurred over lifespan of loyalty card. | [optional] |
+| **balance** | **Integer** | Points available for reward redemption. | [optional] |
+| **next_expiration_date** | **Date** | The next closest date when the next set of points are due to expire. | [optional] |
+| **next_expiration_points** | **Integer** | The amount of points that are set to expire next. | [optional] |
+
diff --git a/docs/VoucherPublish.md b/docs/VoucherPublish.md
new file mode 100644
index 00000000..d759f01c
--- /dev/null
+++ b/docs/VoucherPublish.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::VoucherPublish
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the `url` attribute. | [optional][default to 'list'] |
+| **count** | **Integer** | Publication events counter. | [optional] |
+| **url** | **String** | The endpoint where this list of publications can be accessed using a GET method. `/v1/vouchers/{voucher_code}/publications` | [optional] |
+
diff --git a/docs/VoucherRedemption.md b/docs/VoucherRedemption.md
new file mode 100644
index 00000000..a6fbad97
--- /dev/null
+++ b/docs/VoucherRedemption.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::VoucherRedemption
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **quantity** | **Integer** | How many times a voucher can be redeemed. A `null` value means unlimited. | [optional] |
+| **redeemed_quantity** | **Integer** | How many times a voucher has already been redeemed. | [optional] |
+| **redeemed_amount** | **Integer** | Total amount redeemed. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 balance is written as 10000. | [optional] |
+| **redeemed_points** | **Integer** | Total loyalty points redeemed. | [optional] |
+| **object** | **String** | The type of object represented is by default `list`. To get this list, you need to make a call to the endpoint returned in the url attribute. | [optional][default to 'list'] |
+| **url** | **String** | The endpoint where this list of redemptions can be accessed using a GET method. `/v1/vouchers/{voucher_code}/redemptions` | [optional] |
+
diff --git a/docs/VoucherTransaction.md b/docs/VoucherTransaction.md
new file mode 100644
index 00000000..c778f1dd
--- /dev/null
+++ b/docs/VoucherTransaction.md
@@ -0,0 +1,17 @@
+# VoucherifySdk::VoucherTransaction
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique transaction ID. | |
+| **source_id** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. In case of a redemption, this value is null. | |
+| **voucher_id** | **String** | Unique voucher ID. | |
+| **campaign_id** | **String** | Unqiue campaign ID of the voucher's parent campaign if it is part of campaign that generates bulk codes. | |
+| **source** | **String** | The channel through which the transaction took place, whether through the API or the the Dashboard. In case of a redemption, this value is null. | |
+| **reason** | **String** | Reason why the transaction occurred. In case of a redemption, this value is null. | |
+| **type** | [**LoyaltyCardTransactionsType**](LoyaltyCardTransactionsType.md) | | |
+| **details** | [**VoucherTransactionDetails**](VoucherTransactionDetails.md) | | |
+| **related_transaction_id** | **String** | The related transaction ID on the receiving card. | |
+| **created_at** | **Time** | Timestamp representing the date and time when the transaction was created in ISO 8601 format. | |
+
diff --git a/docs/VoucherTransactionDetails.md b/docs/VoucherTransactionDetails.md
new file mode 100644
index 00000000..e1cc724c
--- /dev/null
+++ b/docs/VoucherTransactionDetails.md
@@ -0,0 +1,20 @@
+# VoucherifySdk::VoucherTransactionDetails
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **balance** | [**VoucherTransactionDetailsBalance**](VoucherTransactionDetailsBalance.md) | | [optional] |
+| **order** | [**VoucherTransactionDetailsOrder**](VoucherTransactionDetailsOrder.md) | | [optional] |
+| **event** | [**VoucherTransactionDetailsEvent**](VoucherTransactionDetailsEvent.md) | | [optional] |
+| **earning_rule** | [**VoucherTransactionDetailsEarningRule**](VoucherTransactionDetailsEarningRule.md) | | [optional] |
+| **segment** | [**VoucherTransactionDetailsSegment**](VoucherTransactionDetailsSegment.md) | | [optional] |
+| **loyalty_tier** | [**VoucherTransactionDetailsLoyaltyTier**](VoucherTransactionDetailsLoyaltyTier.md) | | [optional] |
+| **redemption** | [**VoucherTransactionDetailsRedemption**](VoucherTransactionDetailsRedemption.md) | | [optional] |
+| **rollback** | [**VoucherTransactionDetailsRollback**](VoucherTransactionDetailsRollback.md) | | [optional] |
+| **custom_event** | [**VoucherTransactionDetailsCustomEvent**](VoucherTransactionDetailsCustomEvent.md) | | [optional] |
+| **event_schema** | [**VoucherTransactionDetailsEventSchema**](VoucherTransactionDetailsEventSchema.md) | | [optional] |
+| **reward** | [**VoucherTransactionDetailsReward**](VoucherTransactionDetailsReward.md) | | [optional] |
+| **source_voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+| **destination_voucher** | [**SimpleVoucher**](SimpleVoucher.md) | | [optional] |
+
diff --git a/docs/VoucherTransactionDetailsBalance.md b/docs/VoucherTransactionDetailsBalance.md
new file mode 100644
index 00000000..93865528
--- /dev/null
+++ b/docs/VoucherTransactionDetailsBalance.md
@@ -0,0 +1,13 @@
+# VoucherifySdk::VoucherTransactionDetailsBalance
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | The type of voucher whose balance is being adjusted due to the transaction. | [default to 'loyalty_card'] |
+| **total** | **Integer** | The available points prior to the transaction. | |
+| **object** | **String** | The type of object represented by the JSON. | [default to 'balance'] |
+| **points** | **Integer** | The amount of points being used up in the transaction. | |
+| **balance** | **Integer** | The points balance on the loyalty card after the points in the transaction are subtracted from the loyalty card. | |
+| **related_object** | [**VoucherTransactionDetailsBalanceRelatedObject**](VoucherTransactionDetailsBalanceRelatedObject.md) | | |
+
diff --git a/docs/VoucherTransactionDetailsBalanceRelatedObject.md b/docs/VoucherTransactionDetailsBalanceRelatedObject.md
new file mode 100644
index 00000000..fac080fe
--- /dev/null
+++ b/docs/VoucherTransactionDetailsBalanceRelatedObject.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherTransactionDetailsBalanceRelatedObject
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API. | |
+| **type** | **String** | The object being modified, i.e. voucher. | [default to 'voucher'] |
+
diff --git a/docs/VoucherTransactionDetailsCustomEvent.md b/docs/VoucherTransactionDetailsCustomEvent.md
new file mode 100644
index 00000000..af432a63
--- /dev/null
+++ b/docs/VoucherTransactionDetailsCustomEvent.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherTransactionDetailsCustomEvent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique event ID. | |
+| **type** | **String** | Type of custom event. | |
+
diff --git a/docs/VoucherTransactionDetailsEarningRule.md b/docs/VoucherTransactionDetailsEarningRule.md
new file mode 100644
index 00000000..720847e4
--- /dev/null
+++ b/docs/VoucherTransactionDetailsEarningRule.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherTransactionDetailsEarningRule
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique earning rule ID. | |
+| **source** | [**VoucherTransactionDetailsEarningRuleSource**](VoucherTransactionDetailsEarningRuleSource.md) | | |
+
diff --git a/docs/VoucherTransactionDetailsEarningRuleSource.md b/docs/VoucherTransactionDetailsEarningRuleSource.md
new file mode 100644
index 00000000..108a8f34
--- /dev/null
+++ b/docs/VoucherTransactionDetailsEarningRuleSource.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::VoucherTransactionDetailsEarningRuleSource
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **banner** | **String** | Name of the earning rule. This is displayed as a header for the earning rule in the Dashboard. | |
+
diff --git a/docs/VoucherTransactionDetailsEvent.md b/docs/VoucherTransactionDetailsEvent.md
new file mode 100644
index 00000000..51925067
--- /dev/null
+++ b/docs/VoucherTransactionDetailsEvent.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherTransactionDetailsEvent
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique event ID. | |
+| **type** | **String** | Type of event. | |
+
diff --git a/docs/VoucherTransactionDetailsEventSchema.md b/docs/VoucherTransactionDetailsEventSchema.md
new file mode 100644
index 00000000..9f404316
--- /dev/null
+++ b/docs/VoucherTransactionDetailsEventSchema.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherTransactionDetailsEventSchema
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique metadata schema ID. | |
+| **name** | **String** | Type of custom event. | |
+
diff --git a/docs/VoucherTransactionDetailsLoyaltyTier.md b/docs/VoucherTransactionDetailsLoyaltyTier.md
new file mode 100644
index 00000000..a17c354c
--- /dev/null
+++ b/docs/VoucherTransactionDetailsLoyaltyTier.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherTransactionDetailsLoyaltyTier
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | | |
+| **name** | **String** | | |
+
diff --git a/docs/VoucherTransactionDetailsOrder.md b/docs/VoucherTransactionDetailsOrder.md
new file mode 100644
index 00000000..12b09bf6
--- /dev/null
+++ b/docs/VoucherTransactionDetailsOrder.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherTransactionDetailsOrder
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique order ID. | |
+| **source_id** | **String** | The merchant’s order ID if it is different from the Voucherify order ID. It is really useful in case of integration between multiple systems. It can be an order ID from CRM, database or 3rd party service. | |
+
diff --git a/docs/VoucherTransactionDetailsRedemption.md b/docs/VoucherTransactionDetailsRedemption.md
new file mode 100644
index 00000000..cd7c00d9
--- /dev/null
+++ b/docs/VoucherTransactionDetailsRedemption.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::VoucherTransactionDetailsRedemption
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique redemption ID. | |
+
diff --git a/docs/VoucherTransactionDetailsReward.md b/docs/VoucherTransactionDetailsReward.md
new file mode 100644
index 00000000..19541be1
--- /dev/null
+++ b/docs/VoucherTransactionDetailsReward.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherTransactionDetailsReward
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique reward ID. | |
+| **name** | **String** | Reward name. | |
+
diff --git a/docs/VoucherTransactionDetailsRollback.md b/docs/VoucherTransactionDetailsRollback.md
new file mode 100644
index 00000000..ee9e3a3e
--- /dev/null
+++ b/docs/VoucherTransactionDetailsRollback.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::VoucherTransactionDetailsRollback
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique redemption rollback ID. | |
+
diff --git a/docs/VoucherTransactionDetailsSegment.md b/docs/VoucherTransactionDetailsSegment.md
new file mode 100644
index 00000000..92f4ab15
--- /dev/null
+++ b/docs/VoucherTransactionDetailsSegment.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherTransactionDetailsSegment
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | | |
+| **name** | **String** | | |
+
diff --git a/docs/VoucherTransactionsExport.md b/docs/VoucherTransactionsExport.md
new file mode 100644
index 00000000..882085e2
--- /dev/null
+++ b/docs/VoucherTransactionsExport.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::VoucherTransactionsExport
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the `export`. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [default to 'API'] |
+| **exported_object** | **String** | The type of exported object. | [default to 'voucher_transactions'] |
+| **parameters** | [**VoucherTransactionsFilters**](VoucherTransactionsFilters.md) | | |
+| **result** | [**VoucherTransactionsExportResult**](VoucherTransactionsExportResult.md) | | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the `channel` value is `WEBSITE`. | |
+
diff --git a/docs/VoucherTransactionsExportFilterConditions.md b/docs/VoucherTransactionsExportFilterConditions.md
new file mode 100644
index 00000000..a77447df
--- /dev/null
+++ b/docs/VoucherTransactionsExportFilterConditions.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::VoucherTransactionsExportFilterConditions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **voucher_id** | [**VoucherTransactionsExportFilterConditionsVoucherId**](VoucherTransactionsExportFilterConditionsVoucherId.md) | | |
+
diff --git a/docs/VoucherTransactionsExportFilterConditionsVoucherId.md b/docs/VoucherTransactionsExportFilterConditionsVoucherId.md
new file mode 100644
index 00000000..ec59238d
--- /dev/null
+++ b/docs/VoucherTransactionsExportFilterConditionsVoucherId.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::VoucherTransactionsExportFilterConditionsVoucherId
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **conditions** | [**VoucherTransactionsExportFilterConditionsVoucherIdConditions**](VoucherTransactionsExportFilterConditionsVoucherIdConditions.md) | | |
+
diff --git a/docs/VoucherTransactionsExportFilterConditionsVoucherIdConditions.md b/docs/VoucherTransactionsExportFilterConditionsVoucherIdConditions.md
new file mode 100644
index 00000000..d3924b1a
--- /dev/null
+++ b/docs/VoucherTransactionsExportFilterConditionsVoucherIdConditions.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::VoucherTransactionsExportFilterConditionsVoucherIdConditions
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **_in** | **Array<String>** | | |
+
diff --git a/docs/VoucherTransactionsExportParameters.md b/docs/VoucherTransactionsExportParameters.md
new file mode 100644
index 00000000..3216064c
--- /dev/null
+++ b/docs/VoucherTransactionsExportParameters.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherTransactionsExportParameters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **order** | **String** | How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] |
+| **fields** | **Array<String>** | Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields: | **Field** | **Definition** | **Example Export** | |:---|:---|:---| | id | Unique transaction ID. | vtx_0cb7811f1c07765800 | | type | Transaction type. | - `CREDITS_REMOVAL` <br> - `CREDITS_ADDITION` <br> - `CREDITS_REFUND` <br> - `CREDITS_REDEMPTION` <br> - `POINTS_ACCRUAL` <br> - `POINTS_CANCELLATION` <br> - `POINTS_REDEMPTION`<br> - `POINTS_REFUND`<br> - `POINTS_ADDITION`<br> - `POINTS_REMOVAL`<br> - `POINTS_EXPIRATION`<br> - `POINTS_TRANSFER_IN`<br> - `POINTS_TRANSFER_OUT` | | source_id | Unique transaction source ID. | 8638 | | reason | Contains the reason for the transaction if one was included originally. | | | balance | The gift card or loyalty card balance after the transaction. | | | amount | The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. | | | created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2022-03-09T09:16:32.521Z | | voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp | | campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV | | source| Channel through which the transaction was initiated. | API | | details | More detailed information stored in the form of a JSON. | Provides more details related to the transaction in the form of an object. | | related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 | | [optional] |
+
diff --git a/docs/VoucherTransactionsExportResult.md b/docs/VoucherTransactionsExportResult.md
new file mode 100644
index 00000000..0b7abe98
--- /dev/null
+++ b/docs/VoucherTransactionsExportResult.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::VoucherTransactionsExportResult
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **url** | **String** | URL of the CSV file location. It contains the `token` used for authorization in the <!-- [Download export](OpenAPI.json/paths/~1exports~1{export_Id}/get) -->[Download export](ref:download-export) method. | |
+
diff --git a/docs/VoucherTransactionsFilters.md b/docs/VoucherTransactionsFilters.md
new file mode 100644
index 00000000..a94a4a6a
--- /dev/null
+++ b/docs/VoucherTransactionsFilters.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::VoucherTransactionsFilters
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **order** | **String** | How the export is filtered, where the dash `-` preceding a sorting option means sorting in a descending order. | [optional] |
+| **fields** | **Array<String>** | Array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields: | **Field** | **Definition** | **Example Export** | |:---|:---|:---| | id | Unique transaction ID. | vtx_0cb7811f1c07765800 | | type | Transaction type. | - `CREDITS_REMOVAL` <br> - `CREDITS_ADDITION` <br> - `CREDITS_REFUND` <br> - `CREDITS_REDEMPTION` <br> - `POINTS_ACCRUAL` <br> - `POINTS_CANCELLATION` <br> - `POINTS_REDEMPTION`<br> - `POINTS_REFUND`<br> - `POINTS_ADDITION`<br> - `POINTS_REMOVAL`<br> - `POINTS_EXPIRATION`<br> - `POINTS_TRANSFER_IN`<br> - `POINTS_TRANSFER_OUT` | | source_id | Unique transaction source ID. | 8638 | | reason | Contains the reason for the transaction if one was included originally. | | | balance | The gift card or loyalty card balance after the transaction. | | | amount | The amount of gift card or loyalty card credits being allocated during the transaction. This value can either be negative or positive depending on the nature of the transaction. | | | created_at | Timestamp in ISO 8601 format representing the date and time when the transaction was created. | 2022-03-09T09:16:32.521Z | | voucher_id | Unique Voucher ID. | v_dky7ksKfPX50Wb2Bxvcoeb1xT20b6tcp | | campaign_id | Parent campaign ID. | camp_FNYR4jhqZBM9xTptxDGgeNBV | | source| Channel through which the transaction was initiated. | API | | details | More detailed information stored in the form of a JSON. | Provides more details related to the transaction in the form of an object. | | related_transaction_id | Unique transaction ID related to a receiver/donor card in the case of a points transfer from/to another card. | vtx_0c9afe802593b34b80 | | [optional] |
+| **filters** | [**VoucherTransactionsExportFilterConditions**](VoucherTransactionsExportFilterConditions.md) | | |
+
diff --git a/docs/VoucherValidityTimeframe.md b/docs/VoucherValidityTimeframe.md
new file mode 100644
index 00000000..16cc3561
--- /dev/null
+++ b/docs/VoucherValidityTimeframe.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VoucherValidityTimeframe
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **duration** | **String** | Defines the amount of time the voucher will be active in ISO 8601 format. For example, a voucher with a `duration` of `PT1H` will be valid for a duration of one hour. | [optional] |
+| **interval** | **String** | Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a voucher with an `interval` of `P2D` will be active every other day. | [optional] |
+
diff --git a/docs/VouchersApi.md b/docs/VouchersApi.md
new file mode 100644
index 00000000..3d7ed2c2
--- /dev/null
+++ b/docs/VouchersApi.md
@@ -0,0 +1,554 @@
+# VoucherifySdk::VouchersApi
+
+All URIs are relative to *https://api.voucherify.io*
+
+| Method | HTTP request | Description |
+| ------ | ------------ | ----------- |
+| [**delete_voucher**](VouchersApi.md#delete_voucher) | **DELETE** /v1/vouchers/{code} | Delete Voucher |
+| [**disable_voucher**](VouchersApi.md#disable_voucher) | **POST** /v1/vouchers/{code}/disable | Disable Voucher |
+| [**enable_voucher**](VouchersApi.md#enable_voucher) | **POST** /v1/vouchers/{code}/enable | Enable Voucher |
+| [**export_voucher_transactions**](VouchersApi.md#export_voucher_transactions) | **POST** /v1/vouchers/{code}/transactions/export | Export Voucher Transactions |
+| [**get_voucher**](VouchersApi.md#get_voucher) | **GET** /v1/vouchers/{code} | Get Voucher |
+| [**import_vouchers_using_csv**](VouchersApi.md#import_vouchers_using_csv) | **POST** /v1/vouchers/importCSV | Import Vouchers using CSV |
+| [**list_voucher_transactions**](VouchersApi.md#list_voucher_transactions) | **GET** /v1/vouchers/{code}/transactions | List Voucher Transactions |
+| [**release_validation_session**](VouchersApi.md#release_validation_session) | **DELETE** /v1/vouchers/{code}/sessions/{sessionKey} | Release Validation Session |
+| [**update_voucher_balance**](VouchersApi.md#update_voucher_balance) | **POST** /v1/vouchers/{code}/balance | Add or Remove Voucher Balance |
+
+
+## delete_voucher
+
+> delete_voucher(code, opts)
+
+Delete Voucher
+
+Deletes a voucher. This operation cannot be undone. Additionally, this operation removes any redemptions on the voucher.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::VouchersApi.new
+code = 'code_example' # String | A unique **code** that identifies the voucher.
+opts = {
+ force: true # Boolean | If this flag is set to true, the voucher will be removed permanently. Going forward, the user will be able to create another voucher with exactly the same code.
+}
+
+begin
+ # Delete Voucher
+ api_instance.delete_voucher(code, opts)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling VouchersApi->delete_voucher: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | A unique **code** that identifies the voucher. | |
+| **force** | **Boolean** | If this flag is set to true, the voucher will be removed permanently. Going forward, the user will be able to create another voucher with exactly the same code. | [optional] |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## disable_voucher
+
+> disable_voucher(code)
+
+Disable Voucher
+
+There are various times when youll want to manage a vouchers accessibility. This can be done by two API methods for managing the voucher state - *enable* and *disable*. ___ This method sets the voucher state to **inactive**. The voucher cannot be redeemed.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::VouchersApi.new
+code = 'code_example' # String | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+
+begin
+ # Disable Voucher
+ result = api_instance.disable_voucher(code)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling VouchersApi->disable_voucher: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u. | |
+
+### Return type
+
+[**VouchersDisableResponseBody**](VouchersDisableResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## enable_voucher
+
+> enable_voucher(code)
+
+Enable Voucher
+
+There are various times when youll want to manage a vouchers accessibility. This can be done by two API methods for managing the voucher state - *enable* and *disable*. ___ The method sets the voucher state to **active**. The voucher can be redeemed - only if the redemption occurs after the start date and the voucher is not expired.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::VouchersApi.new
+code = 'code_example' # String | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+
+begin
+ # Enable Voucher
+ result = api_instance.enable_voucher(code)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling VouchersApi->enable_voucher: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u. | |
+
+### Return type
+
+[**VouchersEnableResponseBody**](VouchersEnableResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## export_voucher_transactions
+
+> export_voucher_transactions(code, opts)
+
+Export Voucher Transactions
+
+Export transactions that are associated with credit movements on a gift card or loyalty card.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::VouchersApi.new
+code = 'GIFT-CARD-1' # String | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+opts = {
+ vouchers_transactions_export_create_request_body: VoucherifySdk::VouchersTransactionsExportCreateRequestBody.new # VouchersTransactionsExportCreateRequestBody | Specify the parameters for the transaction export.
+}
+
+begin
+ # Export Voucher Transactions
+ result = api_instance.export_voucher_transactions(code, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling VouchersApi->export_voucher_transactions: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u. | |
+| **vouchers_transactions_export_create_request_body** | [**VouchersTransactionsExportCreateRequestBody**](VouchersTransactionsExportCreateRequestBody.md) | Specify the parameters for the transaction export. | [optional] |
+
+### Return type
+
+[**VouchersTransactionsExportCreateResponseBody**](VouchersTransactionsExportCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
+
+## get_voucher
+
+> get_voucher(code)
+
+Get Voucher
+
+Retrieves the voucher with the given code or unique Voucherify ID. You can either pass the voucher ID which was assigned by Voucherify, e.g., v_7HxHkf4VAkMuc8u4lZs78lyRwhRze5UE, or the code of the voucher as the path parameter value, e.g., 7fjWdr.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::VouchersApi.new
+code = 'code_example' # String | A unique **code** that identifies the voucher.
+
+begin
+ # Get Voucher
+ result = api_instance.get_voucher(code)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling VouchersApi->get_voucher: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | A unique **code** that identifies the voucher. | |
+
+### Return type
+
+[**VouchersGetResponseBody**](VouchersGetResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## import_vouchers_using_csv
+
+> import_vouchers_using_csv(file)
+
+Import Vouchers using CSV
+
+Import standalone vouchers into the repository using a CSV file. The CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object. You can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons). ___ 📘 Standard voucher fields mapping - Go to the import vouchers endpoint to see all standard CSV fields description (body params section). - Supported CSV file headers: Code,Voucher Type,Value,Discount Type,Category,Start Date,Expiration Date,Redemption Limit,Redeemed Quantity, Redeemed Amount,Active,Additional Info,Custom Metadata Property Name - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - YYYY-MM-DD - YYYY-MM-DDTHH - YYYY-MM-DDTHH:mm - YYYY-MM-DDTHH:mm:ss - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ss.SSSZ - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. 📘 Categories In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the List Vouchers endpoint. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::VouchersApi.new
+file = File.new('/path/to/some/file') # File | File path.
+
+begin
+ # Import Vouchers using CSV
+ result = api_instance.import_vouchers_using_csv(file)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling VouchersApi->import_vouchers_using_csv: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **file** | **File** | File path. | |
+
+### Return type
+
+[**VouchersImportCsvCreateResponseBody**](VouchersImportCsvCreateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: multipart/form-data
+- **Accept**: application/json
+
+
+## list_voucher_transactions
+
+> list_voucher_transactions(code, opts)
+
+List Voucher Transactions
+
+List transactions that are associated with credit movements on a gift card or loyalty card.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::VouchersApi.new
+code = 'code_example' # String | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+opts = {
+ limit: 56, # Integer | A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ page: 56 # Integer | Which page of results to return.
+}
+
+begin
+ # List Voucher Transactions
+ result = api_instance.list_voucher_transactions(code, opts)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling VouchersApi->list_voucher_transactions: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u. | |
+| **limit** | **Integer** | A limit on the number of objects to be returned. Limit can range between 1 and 100 items. | [optional] |
+| **page** | **Integer** | Which page of results to return. | [optional] |
+
+### Return type
+
+[**VouchersTransactionsListResponseBody**](VouchersTransactionsListResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: application/json
+
+
+## release_validation_session
+
+> release_validation_session(code, session_key)
+
+Release Validation Session
+
+Manually release a validation session that has been set up for the voucher. This method undos the actions that are explained in our guide on how a validation session was established, you can read more here. 📘 Release Session using Dashboard You can also use the Validations Manager in the Dashboard to unlock sessions. [Read more](https://support.voucherify.io/article/16-dashboard-sections#validations).
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::VouchersApi.new
+code = 'code_example' # String | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify.
+session_key = 'ssn_yQGMTeKBSw8OOuFPwlBEjzGy8d8VA9Ts' # String | A unique session identifier.
+
+begin
+ # Release Validation Session
+ api_instance.release_validation_session(code, session_key)
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling VouchersApi->release_validation_session: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify. | |
+| **session_key** | **String** | A unique session identifier. | |
+
+### Return type
+
+nil (empty response body)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: Not defined
+
+
+## update_voucher_balance
+
+> update_voucher_balance(code, vouchers_balance_update_request_body)
+
+Add or Remove Voucher Balance
+
+Add balance to an existing gift card or loyalty card.
+
+### Examples
+
+```ruby
+require 'time'
+require 'VoucherifySdk'
+# setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = '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['X-App-Id'] = 'Bearer'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = '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['X-App-Token'] = 'Bearer'
+end
+
+api_instance = VoucherifySdk::VouchersApi.new
+code = 'code_example' # String | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+vouchers_balance_update_request_body = VoucherifySdk::VouchersBalanceUpdateRequestBody.new({amount: 37}) # VouchersBalanceUpdateRequestBody | Provide the amount to be added to/subtracted from the voucher.
+
+begin
+ # Add or Remove Voucher Balance
+ result = api_instance.update_voucher_balance(code, vouchers_balance_update_request_body)
+ p result
+rescue VoucherifySdk::ApiError => e
+ puts "Error when calling VouchersApi->update_voucher_balance: #{e}"
+end
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **code** | **String** | A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u. | |
+| **vouchers_balance_update_request_body** | [**VouchersBalanceUpdateRequestBody**](VouchersBalanceUpdateRequestBody.md) | Provide the amount to be added to/subtracted from the voucher. | |
+
+### Return type
+
+[**VouchersBalanceUpdateResponseBody**](VouchersBalanceUpdateResponseBody.md)
+
+### Authorization
+
+[X-App-Id](../README.md#X-App-Id), [X-App-Token](../README.md#X-App-Token)
+
+### HTTP request headers
+
+- **Content-Type**: application/json
+- **Accept**: application/json
+
diff --git a/docs/VouchersBalanceUpdateRequestBody.md b/docs/VouchersBalanceUpdateRequestBody.md
new file mode 100644
index 00000000..f6ed0e5d
--- /dev/null
+++ b/docs/VouchersBalanceUpdateRequestBody.md
@@ -0,0 +1,10 @@
+# VoucherifySdk::VouchersBalanceUpdateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **amount** | **Integer** | The incremental amount to be added to or removed from the current balance on the gift card or loyalty card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. To remove balance, simply add a minus sign before the value, i.e. to remove $20, use -2000. | |
+| **source_id** | **String** | The merchant’s transaction ID if it is different from the Voucherify transaction ID. It is really useful in case of an integration between multiple systems. It can be a transaction ID from a CRM system, database or 3rd-party service. | [optional] |
+| **reason** | **String** | Reason why the transaction occurred. | [optional] |
+
diff --git a/docs/VouchersBalanceUpdateResponseBody.md b/docs/VouchersBalanceUpdateResponseBody.md
new file mode 100644
index 00000000..0e9b975a
--- /dev/null
+++ b/docs/VouchersBalanceUpdateResponseBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::VouchersBalanceUpdateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **amount** | **Integer** | The incremental amount added (positive integer) or subtracted (negative integer) to the current balance on the gift card or loyalty card. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | |
+| **total** | **Integer** | Total income incurred over the lifespan of the gift card or loyalty card. | |
+| **balance** | **Integer** | The balance after adding or subtracting a specified amount. Value is multiplied by 100 to precisely represent 2 decimal places. For example, $100 amount is written as 10000. | |
+| **type** | **String** | The type of voucher being modified. | |
+| **operation_type** | **String** | | [default to 'MANUAL'] |
+| **object** | **String** | The type of object represented by JSON. Default is `balance`. | [default to 'balance'] |
+| **related_object** | [**VouchersBalanceUpdateResponseBodyRelatedObject**](VouchersBalanceUpdateResponseBodyRelatedObject.md) | | |
+
diff --git a/docs/VouchersBalanceUpdateResponseBodyRelatedObject.md b/docs/VouchersBalanceUpdateResponseBodyRelatedObject.md
new file mode 100644
index 00000000..b9795ca0
--- /dev/null
+++ b/docs/VouchersBalanceUpdateResponseBodyRelatedObject.md
@@ -0,0 +1,9 @@
+# VoucherifySdk::VouchersBalanceUpdateResponseBodyRelatedObject
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **type** | **String** | The object being modified, i.e. `voucher`. | [default to 'voucher'] |
+| **id** | **String** | Identifies the voucher that is being modified, this is the ID that was assigned by the Voucherify API. | |
+
diff --git a/docs/VouchersDisableResponseBody.md b/docs/VouchersDisableResponseBody.md
new file mode 100644
index 00000000..0698724e
--- /dev/null
+++ b/docs/VouchersDisableResponseBody.md
@@ -0,0 +1,37 @@
+# VoucherifySdk::VouchersDisableResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] |
+| **code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] |
+| **campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] |
+| **campaign_id** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] |
+| **category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] |
+| **category_id** | **String** | Unique category ID assigned by Voucherify. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | Contains details about the category. | [optional] |
+| **type** | **String** | Defines the type of the voucher. | [optional] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **gift** | [**VoucherGift**](VoucherGift.md) | | [optional] |
+| **loyalty_card** | [**VoucherLoyaltyCard**](VoucherLoyaltyCard.md) | | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**VoucherValidityTimeframe**](VoucherValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] |
+| **additional_info** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] |
+| **assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the voucher was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] |
+| **holder_id** | **String** | Unique customer ID of voucher owner. | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. Default is `voucher`. | [optional][default to 'voucher'] |
+| **distributions** | **Array<Object>** | | [optional] |
+| **deleted** | **Boolean** | Flag indicating whether this voucher is deleted. | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+| **publish** | [**VoucherPublish**](VoucherPublish.md) | | [optional] |
+| **redemption** | [**VoucherRedemption**](VoucherRedemption.md) | | [optional] |
+
diff --git a/docs/VouchersEnableResponseBody.md b/docs/VouchersEnableResponseBody.md
new file mode 100644
index 00000000..844adc5c
--- /dev/null
+++ b/docs/VouchersEnableResponseBody.md
@@ -0,0 +1,37 @@
+# VoucherifySdk::VouchersEnableResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] |
+| **code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] |
+| **campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] |
+| **campaign_id** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] |
+| **category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] |
+| **category_id** | **String** | Unique category ID assigned by Voucherify. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | Contains details about the category. | [optional] |
+| **type** | **String** | Defines the type of the voucher. | [optional] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **gift** | [**VoucherGift**](VoucherGift.md) | | [optional] |
+| **loyalty_card** | [**VoucherLoyaltyCard**](VoucherLoyaltyCard.md) | | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**VoucherValidityTimeframe**](VoucherValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] |
+| **additional_info** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] |
+| **assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the voucher was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] |
+| **holder_id** | **String** | Unique customer ID of voucher owner. | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. Default is `voucher`. | [optional][default to 'voucher'] |
+| **distributions** | **Array<Object>** | | [optional] |
+| **deleted** | **Boolean** | Flag indicating whether this voucher is deleted. | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+| **publish** | [**VoucherPublish**](VoucherPublish.md) | | [optional] |
+| **redemption** | [**VoucherRedemption**](VoucherRedemption.md) | | [optional] |
+
diff --git a/docs/VouchersGetResponseBody.md b/docs/VouchersGetResponseBody.md
new file mode 100644
index 00000000..ffe34cc9
--- /dev/null
+++ b/docs/VouchersGetResponseBody.md
@@ -0,0 +1,37 @@
+# VoucherifySdk::VouchersGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Assigned by the Voucherify API, identifies the voucher. | [optional] |
+| **code** | **String** | A code that identifies a voucher. Pattern can use all letters of the English alphabet, Arabic numerals, and special characters. | [optional] |
+| **campaign** | **String** | A unique campaign name, identifies the voucher's parent campaign. | [optional] |
+| **campaign_id** | **String** | Assigned by the Voucherify API, identifies the voucher's parent campaign. | [optional] |
+| **category** | **String** | Tag defining the category that this voucher belongs to. Useful when listing vouchers using the List Vouchers endpoint. | [optional] |
+| **category_id** | **String** | Unique category ID assigned by Voucherify. | [optional] |
+| **categories** | [**Array<Category>**](Category.md) | Contains details about the category. | [optional] |
+| **type** | **String** | Defines the type of the voucher. | [optional] |
+| **discount** | [**Discount**](Discount.md) | | [optional] |
+| **gift** | [**VoucherGift**](VoucherGift.md) | | [optional] |
+| **loyalty_card** | [**VoucherLoyaltyCard**](VoucherLoyaltyCard.md) | | [optional] |
+| **start_date** | **Time** | Activation timestamp defines when the code starts to be active in ISO 8601 format. Voucher is *inactive before* this date. | [optional] |
+| **expiration_date** | **Time** | Expiration timestamp defines when the code expires in ISO 8601 format. Voucher is *inactive after* this date. | [optional] |
+| **validity_timeframe** | [**VoucherValidityTimeframe**](VoucherValidityTimeframe.md) | | [optional] |
+| **validity_day_of_week** | **Array<Integer>** | Integer array corresponding to the particular days of the week in which the voucher is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday | [optional] |
+| **active** | **Boolean** | A flag to toggle the voucher on or off. You can disable a voucher even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* voucher - `false` indicates an *inactive* voucher | [optional] |
+| **additional_info** | **String** | An optional field to keep any extra textual information about the code such as a code description and details. | [optional] |
+| **metadata** | **Object** | The metadata object stores all custom attributes assigned to the code. A set of key/value pairs that you can attach to a voucher object. It can be useful for storing additional information about the voucher in a structured format. | [optional] |
+| **assets** | [**VoucherAssets**](VoucherAssets.md) | | [optional] |
+| **is_referral_code** | **Boolean** | Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`. | [optional] |
+| **created_at** | **Time** | Timestamp representing the date and time when the voucher was created in ISO 8601 format. | [optional] |
+| **updated_at** | **Time** | Timestamp representing the date and time when the voucher was last updated in ISO 8601 format. | [optional] |
+| **holder_id** | **String** | Unique customer ID of voucher owner. | [optional] |
+| **holder** | [**SimpleCustomer**](SimpleCustomer.md) | | [optional] |
+| **object** | **String** | The type of object represented by JSON. Default is `voucher`. | [optional][default to 'voucher'] |
+| **distributions** | **Array<Object>** | | [optional] |
+| **deleted** | **Boolean** | Flag indicating whether this voucher is deleted. | [optional] |
+| **validation_rules_assignments** | [**ValidationRulesAssignmentsList**](ValidationRulesAssignmentsList.md) | | [optional] |
+| **publish** | [**VoucherPublish**](VoucherPublish.md) | | [optional] |
+| **redemption** | [**VoucherRedemption**](VoucherRedemption.md) | | [optional] |
+
diff --git a/docs/VouchersImportCsvCreateResponseBody.md b/docs/VouchersImportCsvCreateResponseBody.md
new file mode 100644
index 00000000..d4369a12
--- /dev/null
+++ b/docs/VouchersImportCsvCreateResponseBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::VouchersImportCsvCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **async_action_id** | **String** | The ID of the scheduled asynchronous action. | |
+
diff --git a/docs/VouchersRedemptionGetResponseBody.md b/docs/VouchersRedemptionGetResponseBody.md
new file mode 100644
index 00000000..a6b9ee0e
--- /dev/null
+++ b/docs/VouchersRedemptionGetResponseBody.md
@@ -0,0 +1,14 @@
+# VoucherifySdk::VouchersRedemptionGetResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **quantity** | **Integer** | The maximum number of times a voucher can be redeemed. | |
+| **redeemed_quantity** | **Integer** | The number of times the voucher was redeemed successfully. | |
+| **object** | **String** | The type of object represented by JSON. This object stores information about redemptions in a dictionary. | [default to 'list'] |
+| **url** | **String** | URL | |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of `redemption_entries`. | [default to 'redemption_entries'] |
+| **total** | **Integer** | Total number of redemption objects. | |
+| **redemption_entries** | [**Array<VouchersRedemptionGetResponseBodyRedemptionEntriesItem>**](VouchersRedemptionGetResponseBodyRedemptionEntriesItem.md) | Contains the array of successful and failed redemption objects. | |
+
diff --git a/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.md b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.md
new file mode 100644
index 00000000..691c8e35
--- /dev/null
+++ b/docs/VouchersRedemptionGetResponseBodyRedemptionEntriesItem.md
@@ -0,0 +1,49 @@
+# VoucherifySdk::VouchersRedemptionGetResponseBodyRedemptionEntriesItem
+
+## Class instance methods
+
+### `openapi_one_of`
+
+Returns the list of classes defined in oneOf.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::VouchersRedemptionGetResponseBodyRedemptionEntriesItem.openapi_one_of
+# =>
+# [
+# :'Redemption',
+# :'RedemptionRollback'
+# ]
+```
+
+### build
+
+Find the appropriate object from the `openapi_one_of` list and casts the data into it.
+
+#### Example
+
+```ruby
+require 'VoucherifySdk'
+
+VoucherifySdk::VouchersRedemptionGetResponseBodyRedemptionEntriesItem.build(data)
+# => #
+
+VoucherifySdk::VouchersRedemptionGetResponseBodyRedemptionEntriesItem.build(data_that_doesnt_match)
+# => nil
+```
+
+#### Parameters
+
+| Name | Type | Description |
+| ---- | ---- | ----------- |
+| **data** | **Mixed** | data to be matched against the list of oneOf items |
+
+#### Return type
+
+- `Redemption`
+- `RedemptionRollback`
+- `nil` (if no type matches)
+
diff --git a/docs/VouchersTransactionsExportCreateRequestBody.md b/docs/VouchersTransactionsExportCreateRequestBody.md
new file mode 100644
index 00000000..146a3e10
--- /dev/null
+++ b/docs/VouchersTransactionsExportCreateRequestBody.md
@@ -0,0 +1,8 @@
+# VoucherifySdk::VouchersTransactionsExportCreateRequestBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **parameters** | [**VoucherTransactionsExportParameters**](VoucherTransactionsExportParameters.md) | | [optional] |
+
diff --git a/docs/VouchersTransactionsExportCreateResponseBody.md b/docs/VouchersTransactionsExportCreateResponseBody.md
new file mode 100644
index 00000000..3f0b0046
--- /dev/null
+++ b/docs/VouchersTransactionsExportCreateResponseBody.md
@@ -0,0 +1,16 @@
+# VoucherifySdk::VouchersTransactionsExportCreateResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **id** | **String** | Unique export ID. | |
+| **object** | **String** | The type of object being represented. This object stores information about the `export`. | [default to 'export'] |
+| **created_at** | **Time** | Timestamp representing the date and time when the export was scheduled in ISO 8601 format. | |
+| **status** | **String** | Status of the export. Informs you whether the export has already been completed, i.e. indicates whether the file containing the exported data has been generated. | [default to 'SCHEDULED'] |
+| **channel** | **String** | The channel through which the export was triggered. | [default to 'API'] |
+| **exported_object** | **String** | The type of exported object. | [default to 'voucher_transactions'] |
+| **parameters** | [**VoucherTransactionsFilters**](VoucherTransactionsFilters.md) | | |
+| **result** | [**VoucherTransactionsExportResult**](VoucherTransactionsExportResult.md) | | |
+| **user_id** | **String** | Identifies the specific user who initiated the export through the Voucherify Dashboard; returned when the `channel` value is `WEBSITE`. | |
+
diff --git a/docs/VouchersTransactionsListResponseBody.md b/docs/VouchersTransactionsListResponseBody.md
new file mode 100644
index 00000000..2e04b8b5
--- /dev/null
+++ b/docs/VouchersTransactionsListResponseBody.md
@@ -0,0 +1,11 @@
+# VoucherifySdk::VouchersTransactionsListResponseBody
+
+## Properties
+
+| Name | Type | Description | Notes |
+| ---- | ---- | ----------- | ----- |
+| **object** | **String** | The type of object represented by JSON. | [default to 'list'] |
+| **data_ref** | **String** | Identifies the name of the attribute that contains the array of transaction objects. | [default to 'data'] |
+| **data** | [**Array<VoucherTransaction>**](VoucherTransaction.md) | A dictionary that contains an array of transactions. Each entry in the array is a separate transaction object. | |
+| **has_more** | **Boolean** | As query results are always limited (by the limit parameter), the `has_more` flag indicates whether there are more records for given filter parameters. This let's you know if you are able to run another request (with a different page or a different start date filter) to get more records returned in the results. | |
+
diff --git a/example.rb b/example.rb
new file mode 100644
index 00000000..3457e923
--- /dev/null
+++ b/example.rb
@@ -0,0 +1,25 @@
+# Load the gem
+require 'VoucherifySdk'
+
+# Setup authorization
+VoucherifySdk.configure do |config|
+ # Configure API key authorization: X-App-Id
+ config.api_key['X-App-Id'] = 'YOUR API KEY'
+
+ # Configure API key authorization: X-App-Token
+ config.api_key['X-App-Token'] = 'YOUR API KEY'
+
+ # (Optional) Configure Voucherify cluster, default is https://api.voucherify.io
+ # config.host = 'https://us1.api.voucherify.io'
+end
+
+# Creating API Instance
+api_instance = VoucherifySdk::CampaignsApi.new
+
+# Calling list_campaigns
+begin
+ result = api_instance.list_campaigns()
+ puts result
+rescue VoucherifySdk::ApiError => e
+ puts "Exception when calling VouchersApi->list_campaigns: #{e}"
+end
diff --git a/examples/customers.rb b/examples/customers.rb
deleted file mode 100644
index 89fea270..00000000
--- a/examples/customers.rb
+++ /dev/null
@@ -1,32 +0,0 @@
-require 'voucherify'
-
-voucherify = Voucherify::Client.new({
- :applicationId => 'c70a6f00-cf91-4756-9df5-47628850002b',
- :clientSecretKey => '3266b9f8-e246-4f79-bdf0-833929b1380c'
- })
-
-new_customer = voucherify.customers.create({
- name: 'John Doe',
- email: 'john@email.com',
- description: 'Sample description about customer',
- metadata: {
- lang: 'en'
- }
- })
-
-puts 'Created Customer:'
-puts new_customer
-
-customer = voucherify.customers.get new_customer['id']
-
-puts 'Retrieved Customer:'
-puts customer
-
-customer[:description] = 'Sample description of customer with updates'
-
-updated_customer = voucherify.customers.update customer
-
-puts 'Updated Customer:'
-puts updated_customer
-
-voucherify.customers.delete updated_customer['id']
diff --git a/examples/utils.rb b/examples/utils.rb
deleted file mode 100644
index cfe1aa95..00000000
--- a/examples/utils.rb
+++ /dev/null
@@ -1,71 +0,0 @@
-require 'voucherify/utils'
-
-base_price = 20.00
-
-puts 'base price: ' + base_price.to_s
-
-puts '===== amount discount ====='
-amount_voucher = {
- discount: {
- amount_off: 1000, # 10.0
- type: 'AMOUNT'
- }
-}
-puts 'discount: ' + Voucherify::Utils.calculate_discount(base_price, amount_voucher).to_s
-puts 'price after discount: ' + Voucherify::Utils.calculate_price(base_price, amount_voucher).to_s
-puts
-
-
-puts '===== percent discount ===='
-
-percent_discount_voucher = {
- discount: {
- percent_off: 20,
- type: 'PERCENT'
- }
-}
-
-puts 'discount: ' + Voucherify::Utils.calculate_discount(base_price, percent_discount_voucher).to_s
-puts 'price after discount: ' + Voucherify::Utils.calculate_price(base_price, percent_discount_voucher).to_s
-puts
-
-
-puts '===== unit discount ======='
-
-unit_discount_voucher = {
- discount: {
- unit_off: 2,
- type: 'UNIT'
- }
-}
-
-puts 'discount: ' + Voucherify::Utils.calculate_discount(base_price, unit_discount_voucher, 5).to_s
-puts 'price after discount: ' + Voucherify::Utils.calculate_price(base_price, unit_discount_voucher, 5).to_s
-puts
-
-
-puts '===== gift voucher ========'
-
-gift_voucher = {
- gift: {
- amount: 1000,
- balance: 500
- }
-}
-
-puts 'discount: ' + Voucherify::Utils.calculate_discount(base_price, gift_voucher).to_s
-puts 'price after discount: ' + Voucherify::Utils.calculate_price(base_price, gift_voucher).to_s
-puts
-
-puts '===== gift voucher 2 ======'
-
-gift_voucher2 = {
- gift: {
- amount: 10000,
- balance: 5000
- }
-}
-
-puts 'discount: ' + Voucherify::Utils.calculate_discount(base_price, gift_voucher2).to_s
-puts 'price after discount: ' + Voucherify::Utils.calculate_price(base_price, gift_voucher2).to_s
-puts
\ No newline at end of file
diff --git a/examples/vouchers.rb b/examples/vouchers.rb
deleted file mode 100644
index 88169442..00000000
--- a/examples/vouchers.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-require 'voucherify'
-
-voucherify = Voucherify::Client.new({
- :applicationId => 'c70a6f00-cf91-4756-9df5-47628850002b',
- :clientSecretKey => '3266b9f8-e246-4f79-bdf0-833929b1380c'
- })
-begin
- puts voucherify.validations.validate_voucher('91Ft4U', {
- tracking_id: 'john@lemon.com',
- order: {
- amount: 1000
- }
- })
-rescue Voucherify::VoucherifyError => e
- puts e.message
- puts e.details
- puts e.key
-end
-
-query = {limit: 10, skip: 20, category: 'API Test'}
-puts voucherify.vouchers.list(query)
-
-puts voucherify.vouchers.enable '91Ft4U'
-
-puts voucherify.vouchers.disable '91Ft4U'
\ No newline at end of file
diff --git a/lib/VoucherifySdk.rb b/lib/VoucherifySdk.rb
new file mode 100644
index 00000000..a5cba275
--- /dev/null
+++ b/lib/VoucherifySdk.rb
@@ -0,0 +1,716 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+# Common files
+require 'VoucherifySdk/api_client'
+require 'VoucherifySdk/api_error'
+require 'VoucherifySdk/version'
+require 'VoucherifySdk/configuration'
+
+# Models
+require 'VoucherifySdk/models/any'
+require 'VoucherifySdk/models/applicable_to'
+require 'VoucherifySdk/models/applicable_to_effect'
+require 'VoucherifySdk/models/applicable_to_result_list'
+require 'VoucherifySdk/models/array_inner'
+require 'VoucherifySdk/models/async_actions'
+require 'VoucherifySdk/models/bus_val_rule_assignment'
+require 'VoucherifySdk/models/campaign'
+require 'VoucherifySdk/models/campaign_base'
+require 'VoucherifySdk/models/campaign_base_validity_timeframe'
+require 'VoucherifySdk/models/campaign_loyalty_card'
+require 'VoucherifySdk/models/campaign_loyalty_card_expiration_rules'
+require 'VoucherifySdk/models/campaign_loyalty_voucher'
+require 'VoucherifySdk/models/campaign_loyalty_voucher_redemption'
+require 'VoucherifySdk/models/campaign_voucher'
+require 'VoucherifySdk/models/campaign_voucher_redemption'
+require 'VoucherifySdk/models/campaigns_create_base'
+require 'VoucherifySdk/models/campaigns_create_discount_coupons_campaign'
+require 'VoucherifySdk/models/campaigns_create_gift_campaign'
+require 'VoucherifySdk/models/campaigns_create_giveaway_campaign'
+require 'VoucherifySdk/models/campaigns_create_loyalty_campaign'
+require 'VoucherifySdk/models/campaigns_create_promotion_campaign'
+require 'VoucherifySdk/models/campaigns_create_referral_campaign'
+require 'VoucherifySdk/models/campaigns_create_request_body'
+require 'VoucherifySdk/models/campaigns_create_response_body'
+require 'VoucherifySdk/models/campaigns_delete_response_body'
+require 'VoucherifySdk/models/campaigns_disable_response_body'
+require 'VoucherifySdk/models/campaigns_enable_response_body'
+require 'VoucherifySdk/models/campaigns_get_response_body'
+require 'VoucherifySdk/models/campaigns_import_create_response_body'
+require 'VoucherifySdk/models/campaigns_import_csv_create_response_body'
+require 'VoucherifySdk/models/campaigns_import_voucher_item'
+require 'VoucherifySdk/models/campaigns_import_voucher_item_redemption'
+require 'VoucherifySdk/models/campaigns_import_voucher_loyalty_card'
+require 'VoucherifySdk/models/campaigns_list_response_body'
+require 'VoucherifySdk/models/campaigns_update_base'
+require 'VoucherifySdk/models/campaigns_update_coupon_campaign_base'
+require 'VoucherifySdk/models/campaigns_update_discount_coupons_campaign'
+require 'VoucherifySdk/models/campaigns_update_gift_campaign'
+require 'VoucherifySdk/models/campaigns_update_giveaway_campaign'
+require 'VoucherifySdk/models/campaigns_update_loyalty_campaign'
+require 'VoucherifySdk/models/campaigns_update_promotion_campaign'
+require 'VoucherifySdk/models/campaigns_update_referral_campaign'
+require 'VoucherifySdk/models/campaigns_update_request_body'
+require 'VoucherifySdk/models/campaigns_update_response_body'
+require 'VoucherifySdk/models/campaigns_vouchers_create_base_request_body'
+require 'VoucherifySdk/models/campaigns_vouchers_create_in_bulk_request_body'
+require 'VoucherifySdk/models/campaigns_vouchers_create_in_bulk_response_body'
+require 'VoucherifySdk/models/campaigns_vouchers_create_request_body'
+require 'VoucherifySdk/models/campaigns_vouchers_create_response_body'
+require 'VoucherifySdk/models/categories_create_request_body'
+require 'VoucherifySdk/models/categories_create_response_body'
+require 'VoucherifySdk/models/categories_get_response_body'
+require 'VoucherifySdk/models/categories_list_response_body'
+require 'VoucherifySdk/models/categories_update_request_body'
+require 'VoucherifySdk/models/categories_update_response_body'
+require 'VoucherifySdk/models/category'
+require 'VoucherifySdk/models/client_events_create_request_body'
+require 'VoucherifySdk/models/client_events_create_request_body_loyalty'
+require 'VoucherifySdk/models/client_events_create_request_body_referral'
+require 'VoucherifySdk/models/client_events_create_response_body'
+require 'VoucherifySdk/models/client_qualifications_check_eligibility_request_body'
+require 'VoucherifySdk/models/client_qualifications_check_eligibility_response_body'
+require 'VoucherifySdk/models/client_redemptions_redeem_request_body'
+require 'VoucherifySdk/models/client_redemptions_redeem_request_body_all_of_options'
+require 'VoucherifySdk/models/client_redemptions_redeem_response_body'
+require 'VoucherifySdk/models/client_validations_validate_request_body'
+require 'VoucherifySdk/models/client_validations_validate_request_body_all_of_options'
+require 'VoucherifySdk/models/client_validations_validate_response_body'
+require 'VoucherifySdk/models/code_config'
+require 'VoucherifySdk/models/code_config_required_length_charset_pattern'
+require 'VoucherifySdk/models/create_publication_base'
+require 'VoucherifySdk/models/create_publication_campaign'
+require 'VoucherifySdk/models/create_publication_with_campaign'
+require 'VoucherifySdk/models/create_publication_with_specific_voucher'
+require 'VoucherifySdk/models/custom_event'
+require 'VoucherifySdk/models/custom_event_referral'
+require 'VoucherifySdk/models/customer'
+require 'VoucherifySdk/models/customer_activity'
+require 'VoucherifySdk/models/customer_activity_data'
+require 'VoucherifySdk/models/customer_base'
+require 'VoucherifySdk/models/customer_base_address'
+require 'VoucherifySdk/models/customer_id'
+require 'VoucherifySdk/models/customer_loyalty'
+require 'VoucherifySdk/models/customer_loyalty_campaigns_value'
+require 'VoucherifySdk/models/customer_referrals'
+require 'VoucherifySdk/models/customer_referrals_campaigns_item'
+require 'VoucherifySdk/models/customer_response_data_assets'
+require 'VoucherifySdk/models/customer_segments_list'
+require 'VoucherifySdk/models/customer_summary'
+require 'VoucherifySdk/models/customer_summary_orders'
+require 'VoucherifySdk/models/customer_summary_redemptions'
+require 'VoucherifySdk/models/customer_summary_redemptions_gift'
+require 'VoucherifySdk/models/customer_summary_redemptions_loyalty_card'
+require 'VoucherifySdk/models/customer_with_summary_loyalty_referrals'
+require 'VoucherifySdk/models/customers_activities_list_response_body'
+require 'VoucherifySdk/models/customers_create_request_body'
+require 'VoucherifySdk/models/customers_create_response_body'
+require 'VoucherifySdk/models/customers_get_response_body'
+require 'VoucherifySdk/models/customers_import_csv_create_response_body'
+require 'VoucherifySdk/models/customers_list_response_body'
+require 'VoucherifySdk/models/customers_metadata_update_in_bulk_request_body'
+require 'VoucherifySdk/models/customers_metadata_update_in_bulk_response_body'
+require 'VoucherifySdk/models/customers_permanent_deletion_create_response_body'
+require 'VoucherifySdk/models/customers_permanent_deletion_create_response_body_data_json'
+require 'VoucherifySdk/models/customers_segments_list_response_body'
+require 'VoucherifySdk/models/customers_update_in_bulk_request_body'
+require 'VoucherifySdk/models/customers_update_in_bulk_response_body'
+require 'VoucherifySdk/models/customers_update_request_body'
+require 'VoucherifySdk/models/customers_update_response_body'
+require 'VoucherifySdk/models/discount'
+require 'VoucherifySdk/models/discount_amount'
+require 'VoucherifySdk/models/discount_amount_vouchers_effect_types'
+require 'VoucherifySdk/models/discount_coupons_campaign_voucher'
+require 'VoucherifySdk/models/discount_fixed'
+require 'VoucherifySdk/models/discount_fixed_vouchers_effect_types'
+require 'VoucherifySdk/models/discount_percent'
+require 'VoucherifySdk/models/discount_percent_vouchers_effect_types'
+require 'VoucherifySdk/models/discount_unit'
+require 'VoucherifySdk/models/discount_unit_multiple'
+require 'VoucherifySdk/models/discount_unit_multiple_one_unit'
+require 'VoucherifySdk/models/discount_unit_vouchers_effect_types'
+require 'VoucherifySdk/models/earning_rule'
+require 'VoucherifySdk/models/earning_rule_base'
+require 'VoucherifySdk/models/earning_rule_base_custom_event'
+require 'VoucherifySdk/models/earning_rule_base_loyalty'
+require 'VoucherifySdk/models/earning_rule_base_segment'
+require 'VoucherifySdk/models/earning_rule_base_source'
+require 'VoucherifySdk/models/earning_rule_base_validity_timeframe'
+require 'VoucherifySdk/models/earning_rule_event'
+require 'VoucherifySdk/models/earning_rule_fixed'
+require 'VoucherifySdk/models/earning_rule_proportional'
+require 'VoucherifySdk/models/earning_rule_proportional_custom_event'
+require 'VoucherifySdk/models/earning_rule_proportional_custom_event_custom_event'
+require 'VoucherifySdk/models/earning_rule_proportional_custom_event_custom_event_metadata'
+require 'VoucherifySdk/models/earning_rule_proportional_customer_metadata'
+require 'VoucherifySdk/models/earning_rule_proportional_customer_metadata_customer'
+require 'VoucherifySdk/models/earning_rule_proportional_customer_metadata_customer_metadata'
+require 'VoucherifySdk/models/earning_rule_proportional_order'
+require 'VoucherifySdk/models/earning_rule_proportional_order_amount'
+require 'VoucherifySdk/models/earning_rule_proportional_order_amount_order'
+require 'VoucherifySdk/models/earning_rule_proportional_order_amount_order_amount'
+require 'VoucherifySdk/models/earning_rule_proportional_order_items'
+require 'VoucherifySdk/models/earning_rule_proportional_order_items_amount'
+require 'VoucherifySdk/models/earning_rule_proportional_order_items_amount_order_items'
+require 'VoucherifySdk/models/earning_rule_proportional_order_items_amount_order_items_amount'
+require 'VoucherifySdk/models/earning_rule_proportional_order_items_quantity'
+require 'VoucherifySdk/models/earning_rule_proportional_order_items_quantity_order_items'
+require 'VoucherifySdk/models/earning_rule_proportional_order_items_subtotal_amount'
+require 'VoucherifySdk/models/earning_rule_proportional_order_items_subtotal_amount_order_items'
+require 'VoucherifySdk/models/earning_rule_proportional_order_metadata'
+require 'VoucherifySdk/models/earning_rule_proportional_order_metadata_order'
+require 'VoucherifySdk/models/earning_rule_proportional_order_metadata_order_metadata'
+require 'VoucherifySdk/models/earning_rule_proportional_order_total_amount'
+require 'VoucherifySdk/models/earning_rule_proportional_order_total_amount_order'
+require 'VoucherifySdk/models/error'
+require 'VoucherifySdk/models/event_customer_active_campaign_failed'
+require 'VoucherifySdk/models/event_customer_active_campaign_recovered'
+require 'VoucherifySdk/models/event_customer_active_campaign_sent'
+require 'VoucherifySdk/models/event_customer_batch_failed'
+require 'VoucherifySdk/models/event_customer_batch_recovered'
+require 'VoucherifySdk/models/event_customer_batch_sent'
+require 'VoucherifySdk/models/event_customer_braze_failed'
+require 'VoucherifySdk/models/event_customer_braze_recovered'
+require 'VoucherifySdk/models/event_customer_braze_sent'
+require 'VoucherifySdk/models/event_customer_confirmed'
+require 'VoucherifySdk/models/event_customer_confirmed_unconfirmed_customer'
+require 'VoucherifySdk/models/event_customer_consents'
+require 'VoucherifySdk/models/event_customer_consents_given'
+require 'VoucherifySdk/models/event_customer_consents_revoked'
+require 'VoucherifySdk/models/event_customer_created'
+require 'VoucherifySdk/models/event_customer_custom_event'
+require 'VoucherifySdk/models/event_customer_deleted'
+require 'VoucherifySdk/models/event_customer_email_failed'
+require 'VoucherifySdk/models/event_customer_email_recovered'
+require 'VoucherifySdk/models/event_customer_email_sent'
+require 'VoucherifySdk/models/event_customer_failed'
+require 'VoucherifySdk/models/event_customer_gift_voucher_balance_added'
+require 'VoucherifySdk/models/event_customer_intercom_failed'
+require 'VoucherifySdk/models/event_customer_intercom_recovered'
+require 'VoucherifySdk/models/event_customer_intercom_sent'
+require 'VoucherifySdk/models/event_customer_klaviyo_failed'
+require 'VoucherifySdk/models/event_customer_klaviyo_recovered'
+require 'VoucherifySdk/models/event_customer_klaviyo_sent'
+require 'VoucherifySdk/models/event_customer_loyalty_card_points_added'
+require 'VoucherifySdk/models/event_customer_loyalty_card_points_transferred'
+require 'VoucherifySdk/models/event_customer_loyalty_tier_base'
+require 'VoucherifySdk/models/event_customer_loyalty_tier_downgraded'
+require 'VoucherifySdk/models/event_customer_loyalty_tier_expiration_changed'
+require 'VoucherifySdk/models/event_customer_loyalty_tier_joined'
+require 'VoucherifySdk/models/event_customer_loyalty_tier_left'
+require 'VoucherifySdk/models/event_customer_loyalty_tier_prolonged'
+require 'VoucherifySdk/models/event_customer_loyalty_tier_upgraded'
+require 'VoucherifySdk/models/event_customer_loyalty_updated'
+require 'VoucherifySdk/models/event_customer_mailchimp_failed'
+require 'VoucherifySdk/models/event_customer_mailchimp_recovered'
+require 'VoucherifySdk/models/event_customer_mailchimp_sent'
+require 'VoucherifySdk/models/event_customer_order'
+require 'VoucherifySdk/models/event_customer_order_canceled'
+require 'VoucherifySdk/models/event_customer_order_created'
+require 'VoucherifySdk/models/event_customer_order_fulfilled'
+require 'VoucherifySdk/models/event_customer_order_paid'
+require 'VoucherifySdk/models/event_customer_order_processing'
+require 'VoucherifySdk/models/event_customer_order_updated'
+require 'VoucherifySdk/models/event_customer_publication_failed'
+require 'VoucherifySdk/models/event_customer_publication_succeeded'
+require 'VoucherifySdk/models/event_customer_recovered'
+require 'VoucherifySdk/models/event_customer_redemption'
+require 'VoucherifySdk/models/event_customer_redemption_failed'
+require 'VoucherifySdk/models/event_customer_redemption_rollback_failed'
+require 'VoucherifySdk/models/event_customer_redemption_rollback_succeeded'
+require 'VoucherifySdk/models/event_customer_redemption_succeeded'
+require 'VoucherifySdk/models/event_customer_referred'
+require 'VoucherifySdk/models/event_customer_reward_redemptions'
+require 'VoucherifySdk/models/event_customer_reward_redemptions_completed'
+require 'VoucherifySdk/models/event_customer_reward_redemptions_created'
+require 'VoucherifySdk/models/event_customer_reward_redemptions_pending'
+require 'VoucherifySdk/models/event_customer_reward_redemptions_rolled_back'
+require 'VoucherifySdk/models/event_customer_rewarded'
+require 'VoucherifySdk/models/event_customer_rewarded_loyalty_points'
+require 'VoucherifySdk/models/event_customer_segment_entered'
+require 'VoucherifySdk/models/event_customer_segment_left'
+require 'VoucherifySdk/models/event_customer_sent'
+require 'VoucherifySdk/models/event_customer_shopify_failed'
+require 'VoucherifySdk/models/event_customer_shopify_recovered'
+require 'VoucherifySdk/models/event_customer_shopify_sent'
+require 'VoucherifySdk/models/event_customer_sms_failed'
+require 'VoucherifySdk/models/event_customer_sms_recovered'
+require 'VoucherifySdk/models/event_customer_sms_sent'
+require 'VoucherifySdk/models/event_customer_updated'
+require 'VoucherifySdk/models/event_customer_validation_failed'
+require 'VoucherifySdk/models/event_customer_validation_succeeded'
+require 'VoucherifySdk/models/event_customer_voucher_deleted'
+require 'VoucherifySdk/models/event_customer_vouchers_loyalty_points_expired'
+require 'VoucherifySdk/models/events_create_request_body'
+require 'VoucherifySdk/models/events_create_response_body'
+require 'VoucherifySdk/models/export'
+require 'VoucherifySdk/models/export_base'
+require 'VoucherifySdk/models/export_base_result'
+require 'VoucherifySdk/models/export_customer'
+require 'VoucherifySdk/models/export_customer_base'
+require 'VoucherifySdk/models/export_customer_base_parameters'
+require 'VoucherifySdk/models/export_customer_fields'
+require 'VoucherifySdk/models/export_customer_order'
+require 'VoucherifySdk/models/export_customer_scheduled'
+require 'VoucherifySdk/models/export_order'
+require 'VoucherifySdk/models/export_order_base'
+require 'VoucherifySdk/models/export_order_fields'
+require 'VoucherifySdk/models/export_order_order'
+require 'VoucherifySdk/models/export_order_scheduled'
+require 'VoucherifySdk/models/export_points_expiration'
+require 'VoucherifySdk/models/export_points_expiration_base'
+require 'VoucherifySdk/models/export_points_expiration_base_parameters'
+require 'VoucherifySdk/models/export_points_expiration_fields'
+require 'VoucherifySdk/models/export_points_expiration_filters'
+require 'VoucherifySdk/models/export_points_expiration_order'
+require 'VoucherifySdk/models/export_points_expiration_scheduled'
+require 'VoucherifySdk/models/export_publication'
+require 'VoucherifySdk/models/export_publication_base'
+require 'VoucherifySdk/models/export_publication_base_parameters'
+require 'VoucherifySdk/models/export_publication_fields'
+require 'VoucherifySdk/models/export_publication_order'
+require 'VoucherifySdk/models/export_publication_scheduled'
+require 'VoucherifySdk/models/export_redemption'
+require 'VoucherifySdk/models/export_redemption_base'
+require 'VoucherifySdk/models/export_redemption_base_parameters'
+require 'VoucherifySdk/models/export_redemption_fields'
+require 'VoucherifySdk/models/export_redemption_order'
+require 'VoucherifySdk/models/export_redemption_scheduled'
+require 'VoucherifySdk/models/export_scheduled_base'
+require 'VoucherifySdk/models/export_voucher'
+require 'VoucherifySdk/models/export_voucher_base'
+require 'VoucherifySdk/models/export_voucher_base_parameters'
+require 'VoucherifySdk/models/export_voucher_fields'
+require 'VoucherifySdk/models/export_voucher_order'
+require 'VoucherifySdk/models/export_voucher_scheduled'
+require 'VoucherifySdk/models/export_voucher_transactions'
+require 'VoucherifySdk/models/export_voucher_transactions_base'
+require 'VoucherifySdk/models/export_voucher_transactions_fields'
+require 'VoucherifySdk/models/export_voucher_transactions_filters'
+require 'VoucherifySdk/models/export_voucher_transactions_order'
+require 'VoucherifySdk/models/export_voucher_transactions_scheduled'
+require 'VoucherifySdk/models/exports_create_request_body'
+require 'VoucherifySdk/models/exports_create_response_body'
+require 'VoucherifySdk/models/exports_get_response_body'
+require 'VoucherifySdk/models/exports_list_response_body'
+require 'VoucherifySdk/models/field_conditions'
+require 'VoucherifySdk/models/filter_conditions_string'
+require 'VoucherifySdk/models/filters_condition'
+require 'VoucherifySdk/models/gift'
+require 'VoucherifySdk/models/gift_campaign_voucher'
+require 'VoucherifySdk/models/giveaway_campaign_voucher'
+require 'VoucherifySdk/models/inapplicable_to'
+require 'VoucherifySdk/models/inapplicable_to_result_list'
+require 'VoucherifySdk/models/junction'
+require 'VoucherifySdk/models/list_publications_item_base'
+require 'VoucherifySdk/models/list_publications_item_invalid'
+require 'VoucherifySdk/models/list_publications_item_valid_multiple_vouchers'
+require 'VoucherifySdk/models/list_publications_item_valid_single_voucher'
+require 'VoucherifySdk/models/list_publications_item_voucher'
+require 'VoucherifySdk/models/loyalties_delete_response_body'
+require 'VoucherifySdk/models/loyalties_earning_rules_disable_response_body'
+require 'VoucherifySdk/models/loyalties_earning_rules_enable_response_body'
+require 'VoucherifySdk/models/loyalties_earning_rules_get_response_body'
+require 'VoucherifySdk/models/loyalties_loyalty_tier_reward'
+require 'VoucherifySdk/models/loyalties_members_balance_update_request_body'
+require 'VoucherifySdk/models/loyalties_members_balance_update_response_body'
+require 'VoucherifySdk/models/loyalties_members_balance_update_response_body_related_object'
+require 'VoucherifySdk/models/loyalties_members_points_expiration_list_response_body'
+require 'VoucherifySdk/models/loyalties_members_points_expiration_list_response_body_data_item'
+require 'VoucherifySdk/models/loyalties_members_points_expiration_list_response_body_data_item_bucket'
+require 'VoucherifySdk/models/loyalties_members_redemption_redeem_request_body'
+require 'VoucherifySdk/models/loyalties_members_redemption_redeem_request_body_reward'
+require 'VoucherifySdk/models/loyalties_members_redemption_redeem_response_body'
+require 'VoucherifySdk/models/loyalties_members_rewards_list_response_body'
+require 'VoucherifySdk/models/loyalties_members_rewards_list_response_body_data_item'
+require 'VoucherifySdk/models/loyalties_members_tiers_list_response_body'
+require 'VoucherifySdk/models/loyalties_members_transactions_export_create_request_body'
+require 'VoucherifySdk/models/loyalties_members_transactions_export_create_request_body_parameters'
+require 'VoucherifySdk/models/loyalties_members_transactions_export_create_response_body'
+require 'VoucherifySdk/models/loyalties_members_transactions_list_response_body'
+require 'VoucherifySdk/models/loyalties_members_transfers_create_response_body'
+require 'VoucherifySdk/models/loyalties_members_transfers_create_response_body_assets'
+require 'VoucherifySdk/models/loyalties_members_transfers_create_response_body_assets_barcode'
+require 'VoucherifySdk/models/loyalties_members_transfers_create_response_body_assets_qr'
+require 'VoucherifySdk/models/loyalties_members_transfers_create_response_body_loyalty_card'
+require 'VoucherifySdk/models/loyalties_members_transfers_create_response_body_publish'
+require 'VoucherifySdk/models/loyalties_members_transfers_create_response_body_redemption'
+require 'VoucherifySdk/models/loyalties_members_transfers_create_response_body_validity_timeframe'
+require 'VoucherifySdk/models/loyalties_reward_assignments_get_response_body'
+require 'VoucherifySdk/models/loyalties_reward_assignments_reward_get_response_body'
+require 'VoucherifySdk/models/loyalties_rewards_get_response_body'
+require 'VoucherifySdk/models/loyalties_tiers_create_in_bulk_request_body_item'
+require 'VoucherifySdk/models/loyalties_tiers_earning_rules_list_response_body'
+require 'VoucherifySdk/models/loyalties_tiers_get_response_body'
+require 'VoucherifySdk/models/loyalties_tiers_list_response_body'
+require 'VoucherifySdk/models/loyalties_tiers_rewards_list_response_body'
+require 'VoucherifySdk/models/loyalties_transfer_points'
+require 'VoucherifySdk/models/loyalty_card_transaction'
+require 'VoucherifySdk/models/loyalty_card_transactions_type'
+require 'VoucherifySdk/models/loyalty_tier'
+require 'VoucherifySdk/models/loyalty_tier_all_of_config'
+require 'VoucherifySdk/models/loyalty_tier_all_of_config_points'
+require 'VoucherifySdk/models/loyalty_tier_base'
+require 'VoucherifySdk/models/loyalty_tier_base_points'
+require 'VoucherifySdk/models/loyalty_tier_expiration'
+require 'VoucherifySdk/models/loyalty_tiers_expiration_all'
+require 'VoucherifySdk/models/loyalty_tiers_expiration_all_expiration_date'
+require 'VoucherifySdk/models/loyalty_tiers_expiration_all_expiration_date_rounding'
+require 'VoucherifySdk/models/loyalty_tiers_expiration_all_start_date'
+require 'VoucherifySdk/models/lucky_draw'
+require 'VoucherifySdk/models/mapping_fixed'
+require 'VoucherifySdk/models/mapping_multiply'
+require 'VoucherifySdk/models/mapping_points'
+require 'VoucherifySdk/models/order'
+require 'VoucherifySdk/models/order_base'
+require 'VoucherifySdk/models/order_calculated'
+require 'VoucherifySdk/models/order_calculated_base'
+require 'VoucherifySdk/models/order_calculated_customer'
+require 'VoucherifySdk/models/order_calculated_no_customer_data'
+require 'VoucherifySdk/models/order_calculated_referrer'
+require 'VoucherifySdk/models/order_item'
+require 'VoucherifySdk/models/order_item_calculated'
+require 'VoucherifySdk/models/order_item_product'
+require 'VoucherifySdk/models/order_item_sku'
+require 'VoucherifySdk/models/order_redemptions'
+require 'VoucherifySdk/models/orders_create_request_body'
+require 'VoucherifySdk/models/orders_create_response_body'
+require 'VoucherifySdk/models/orders_export_create_request_body'
+require 'VoucherifySdk/models/orders_export_create_request_body_parameters'
+require 'VoucherifySdk/models/orders_export_create_response_body'
+require 'VoucherifySdk/models/orders_get_response_body'
+require 'VoucherifySdk/models/orders_import_create_request_body_item'
+require 'VoucherifySdk/models/orders_import_create_response_body'
+require 'VoucherifySdk/models/orders_list_response_body'
+require 'VoucherifySdk/models/orders_update_request_body'
+require 'VoucherifySdk/models/orders_update_response_body'
+require 'VoucherifySdk/models/parameter_campaign_type'
+require 'VoucherifySdk/models/parameter_created_before_after'
+require 'VoucherifySdk/models/parameter_expand_list_campaigns'
+require 'VoucherifySdk/models/parameter_filters_list_redemptions'
+require 'VoucherifySdk/models/parameter_filters_list_redemptions_campaign_name'
+require 'VoucherifySdk/models/parameter_filters_list_redemptions_customer_id'
+require 'VoucherifySdk/models/parameter_filters_list_redemptions_failure_code'
+require 'VoucherifySdk/models/parameter_filters_list_redemptions_object'
+require 'VoucherifySdk/models/parameter_filters_list_redemptions_parent_redemption_id'
+require 'VoucherifySdk/models/parameter_filters_list_redemptions_related_object_id'
+require 'VoucherifySdk/models/parameter_filters_list_redemptions_related_object_parent_id'
+require 'VoucherifySdk/models/parameter_filters_list_redemptions_result'
+require 'VoucherifySdk/models/parameter_filters_list_redemptions_user_login'
+require 'VoucherifySdk/models/parameter_filters_list_redemptions_voucher_code'
+require 'VoucherifySdk/models/parameter_order'
+require 'VoucherifySdk/models/parameter_order_list_all_promotion_stacks'
+require 'VoucherifySdk/models/parameter_order_list_campaigns'
+require 'VoucherifySdk/models/parameter_order_list_customers'
+require 'VoucherifySdk/models/parameter_order_list_exports'
+require 'VoucherifySdk/models/parameter_order_list_loyalty_tiers'
+require 'VoucherifySdk/models/parameter_order_list_orders'
+require 'VoucherifySdk/models/parameter_order_list_publications'
+require 'VoucherifySdk/models/parameter_order_list_redemptions'
+require 'VoucherifySdk/models/parameter_order_list_validation_rule_assignments'
+require 'VoucherifySdk/models/parameter_order_list_validation_rules'
+require 'VoucherifySdk/models/parameter_result_list_publications'
+require 'VoucherifySdk/models/parameter_updated_before_after'
+require 'VoucherifySdk/models/parameter_voucher_type_list_publications'
+require 'VoucherifySdk/models/points_expiration_types'
+require 'VoucherifySdk/models/product'
+require 'VoucherifySdk/models/product_collections_create_dynamic_request_body'
+require 'VoucherifySdk/models/product_collections_create_dynamic_request_body_filter'
+require 'VoucherifySdk/models/product_collections_create_dynamic_request_body_products_item'
+require 'VoucherifySdk/models/product_collections_create_request_body'
+require 'VoucherifySdk/models/product_collections_create_response_body'
+require 'VoucherifySdk/models/product_collections_create_static_request_body'
+require 'VoucherifySdk/models/product_collections_get_response_body'
+require 'VoucherifySdk/models/product_collections_item'
+require 'VoucherifySdk/models/product_collections_item_products_item'
+require 'VoucherifySdk/models/product_collections_list'
+require 'VoucherifySdk/models/product_collections_list_response_body'
+require 'VoucherifySdk/models/product_collections_products_list'
+require 'VoucherifySdk/models/product_collections_products_list_products_item'
+require 'VoucherifySdk/models/product_collections_products_list_response_body'
+require 'VoucherifySdk/models/product_without_skus'
+require 'VoucherifySdk/models/products_create_request_body'
+require 'VoucherifySdk/models/products_create_response_body'
+require 'VoucherifySdk/models/products_get_response_body'
+require 'VoucherifySdk/models/products_import_csv_create_response_body'
+require 'VoucherifySdk/models/products_list_response_body'
+require 'VoucherifySdk/models/products_metadata_update_in_bulk_request_body'
+require 'VoucherifySdk/models/products_metadata_update_in_bulk_response_body'
+require 'VoucherifySdk/models/products_skus_create_request_body'
+require 'VoucherifySdk/models/products_skus_create_response_body'
+require 'VoucherifySdk/models/products_skus_list_response_body'
+require 'VoucherifySdk/models/products_skus_update_request_body'
+require 'VoucherifySdk/models/products_skus_update_response_body'
+require 'VoucherifySdk/models/products_update_in_bulk_request_body'
+require 'VoucherifySdk/models/products_update_in_bulk_response_body'
+require 'VoucherifySdk/models/products_update_request_body'
+require 'VoucherifySdk/models/products_update_response_body'
+require 'VoucherifySdk/models/promotion_stack'
+require 'VoucherifySdk/models/promotion_stack_base'
+require 'VoucherifySdk/models/promotion_stack_base_tiers'
+require 'VoucherifySdk/models/promotion_tier'
+require 'VoucherifySdk/models/promotion_tier_action'
+require 'VoucherifySdk/models/promotion_tier_campaign'
+require 'VoucherifySdk/models/promotion_tier_campaign_validity_timeframe'
+require 'VoucherifySdk/models/promotion_tier_create_params'
+require 'VoucherifySdk/models/promotion_tier_summary'
+require 'VoucherifySdk/models/promotion_tier_summary_orders'
+require 'VoucherifySdk/models/promotion_tier_summary_redemptions'
+require 'VoucherifySdk/models/promotion_tier_validity_timeframe'
+require 'VoucherifySdk/models/promotion_tiers_list'
+require 'VoucherifySdk/models/promotions_stacks_create_request_body'
+require 'VoucherifySdk/models/promotions_stacks_create_response_body'
+require 'VoucherifySdk/models/promotions_stacks_get_response_body'
+require 'VoucherifySdk/models/promotions_stacks_list_response_body'
+require 'VoucherifySdk/models/promotions_stacks_update_request_body'
+require 'VoucherifySdk/models/promotions_stacks_update_request_body_tiers'
+require 'VoucherifySdk/models/promotions_stacks_update_response_body'
+require 'VoucherifySdk/models/promotions_tiers_disable_response_body'
+require 'VoucherifySdk/models/promotions_tiers_enable_response_body'
+require 'VoucherifySdk/models/promotions_tiers_get_response_body'
+require 'VoucherifySdk/models/promotions_tiers_list_response_body'
+require 'VoucherifySdk/models/properties_for_loyalty_campaign_options'
+require 'VoucherifySdk/models/publications_create_base_response_body'
+require 'VoucherifySdk/models/publications_create_request_body'
+require 'VoucherifySdk/models/publications_create_response_body'
+require 'VoucherifySdk/models/publications_create_voucher_response_body'
+require 'VoucherifySdk/models/publications_create_vouchers_response_body'
+require 'VoucherifySdk/models/publications_list_response_body'
+require 'VoucherifySdk/models/publications_list_response_body_publications_item'
+require 'VoucherifySdk/models/qualifications_check_eligibility_request_body'
+require 'VoucherifySdk/models/qualifications_check_eligibility_response_body'
+require 'VoucherifySdk/models/qualifications_field_conditions'
+require 'VoucherifySdk/models/qualifications_filters_condition'
+require 'VoucherifySdk/models/qualifications_option'
+require 'VoucherifySdk/models/qualifications_option_filters'
+require 'VoucherifySdk/models/qualifications_option_filters_resource_type'
+require 'VoucherifySdk/models/qualifications_option_filters_resource_type_conditions'
+require 'VoucherifySdk/models/qualifications_redeemable'
+require 'VoucherifySdk/models/qualifications_redeemable_base'
+require 'VoucherifySdk/models/qualifications_redeemables'
+require 'VoucherifySdk/models/redeem_gift_card'
+require 'VoucherifySdk/models/redeem_gift_card_all_of_gift'
+require 'VoucherifySdk/models/redeem_loyalty_card'
+require 'VoucherifySdk/models/redeem_loyalty_card_all_of_reward'
+require 'VoucherifySdk/models/redeem_promotion_stack'
+require 'VoucherifySdk/models/redeem_promotion_tier'
+require 'VoucherifySdk/models/redeem_voucher'
+require 'VoucherifySdk/models/redeemable_gift'
+require 'VoucherifySdk/models/redeemable_loyalty_card'
+require 'VoucherifySdk/models/redeemable_result'
+require 'VoucherifySdk/models/redeemable_result_gift_card'
+require 'VoucherifySdk/models/redeemable_result_gift_card_gift'
+require 'VoucherifySdk/models/redeemable_result_loyalty_card'
+require 'VoucherifySdk/models/redeemable_result_loyalty_card_loyalty_card'
+require 'VoucherifySdk/models/redeemable_result_promotion_stack'
+require 'VoucherifySdk/models/redeemable_result_promotion_tier'
+require 'VoucherifySdk/models/redeemable_result_promotion_tier_discount'
+require 'VoucherifySdk/models/redeemable_result_voucher_code'
+require 'VoucherifySdk/models/redemption'
+require 'VoucherifySdk/models/redemption_channel'
+require 'VoucherifySdk/models/redemption_gift'
+require 'VoucherifySdk/models/redemption_internal'
+require 'VoucherifySdk/models/redemption_internal_related_redemptions'
+require 'VoucherifySdk/models/redemption_internal_related_redemptions_item'
+require 'VoucherifySdk/models/redemption_internal_related_redemptions_rollbacks_item'
+require 'VoucherifySdk/models/redemption_loyalty_card'
+require 'VoucherifySdk/models/redemption_related_redemptions'
+require 'VoucherifySdk/models/redemption_related_redemptions_item'
+require 'VoucherifySdk/models/redemption_related_redemptions_rollbacks_item'
+require 'VoucherifySdk/models/redemption_reward_result'
+require 'VoucherifySdk/models/redemption_reward_result_parameters'
+require 'VoucherifySdk/models/redemption_reward_result_parameters_campaign'
+require 'VoucherifySdk/models/redemption_reward_result_parameters_coin'
+require 'VoucherifySdk/models/redemption_reward_result_parameters_product'
+require 'VoucherifySdk/models/redemption_reward_result_product'
+require 'VoucherifySdk/models/redemption_reward_result_sku'
+require 'VoucherifySdk/models/redemption_reward_result_voucher'
+require 'VoucherifySdk/models/redemption_rollback'
+require 'VoucherifySdk/models/redemption_rollback_related_redemptions'
+require 'VoucherifySdk/models/redemption_rollback_related_redemptions_item'
+require 'VoucherifySdk/models/redemption_rollback_related_redemptions_rollbacks_item'
+require 'VoucherifySdk/models/redemptions_get_response_body'
+require 'VoucherifySdk/models/redemptions_list_response_body'
+require 'VoucherifySdk/models/redemptions_list_response_body_redemptions_item'
+require 'VoucherifySdk/models/redemptions_redeem_request_body'
+require 'VoucherifySdk/models/redemptions_redeem_response_body'
+require 'VoucherifySdk/models/redemptions_rollback_create_request_body'
+require 'VoucherifySdk/models/redemptions_rollback_create_response_body'
+require 'VoucherifySdk/models/redemptions_rollbacks_create_request_body'
+require 'VoucherifySdk/models/redemptions_rollbacks_create_response_body'
+require 'VoucherifySdk/models/referral_campaign_voucher'
+require 'VoucherifySdk/models/referral_program'
+require 'VoucherifySdk/models/referral_program_custom_event'
+require 'VoucherifySdk/models/referral_program_referee_reward'
+require 'VoucherifySdk/models/referral_program_referee_reward_related_object_parent'
+require 'VoucherifySdk/models/referrer'
+require 'VoucherifySdk/models/referrer_id'
+require 'VoucherifySdk/models/referrer_with_summary_loyalty_referrals'
+require 'VoucherifySdk/models/resource_types'
+require 'VoucherifySdk/models/reward'
+require 'VoucherifySdk/models/reward_assignment'
+require 'VoucherifySdk/models/reward_assignment_base'
+require 'VoucherifySdk/models/reward_assignment_parameters'
+require 'VoucherifySdk/models/reward_assignment_parameters_parameters'
+require 'VoucherifySdk/models/reward_assignment_parameters_parameters_loyalty'
+require 'VoucherifySdk/models/reward_assignments_create_coin_reward_request_body'
+require 'VoucherifySdk/models/reward_assignments_create_digital_or_material_reward_request_body'
+require 'VoucherifySdk/models/reward_assignments_create_digital_or_material_reward_request_body_parameters'
+require 'VoucherifySdk/models/reward_assignments_create_digital_or_material_reward_request_body_parameters_loyalty'
+require 'VoucherifySdk/models/reward_attributes'
+require 'VoucherifySdk/models/reward_type'
+require 'VoucherifySdk/models/reward_type_campaign'
+require 'VoucherifySdk/models/reward_type_campaign_campaign'
+require 'VoucherifySdk/models/reward_type_coin'
+require 'VoucherifySdk/models/reward_type_coin_coin'
+require 'VoucherifySdk/models/reward_type_material'
+require 'VoucherifySdk/models/reward_type_material_product'
+require 'VoucherifySdk/models/rewards_assignments_create_request_body'
+require 'VoucherifySdk/models/rewards_assignments_create_response_body'
+require 'VoucherifySdk/models/rewards_assignments_get_response_body'
+require 'VoucherifySdk/models/rewards_assignments_list_response_body'
+require 'VoucherifySdk/models/rewards_assignments_update_request_body'
+require 'VoucherifySdk/models/rewards_assignments_update_request_body_parameters'
+require 'VoucherifySdk/models/rewards_assignments_update_request_body_parameters_loyalty'
+require 'VoucherifySdk/models/rewards_assignments_update_response_body'
+require 'VoucherifySdk/models/schema_that_contains_unique_properties_for_promotion_campaign_promotion'
+require 'VoucherifySdk/models/session'
+require 'VoucherifySdk/models/simple_campaign'
+require 'VoucherifySdk/models/simple_consent'
+require 'VoucherifySdk/models/simple_customer'
+require 'VoucherifySdk/models/simple_customer_required_object_type'
+require 'VoucherifySdk/models/simple_order'
+require 'VoucherifySdk/models/simple_order_item'
+require 'VoucherifySdk/models/simple_product'
+require 'VoucherifySdk/models/simple_product_discount_unit'
+require 'VoucherifySdk/models/simple_promotion_tier'
+require 'VoucherifySdk/models/simple_promotion_tier_campaign'
+require 'VoucherifySdk/models/simple_redemption'
+require 'VoucherifySdk/models/simple_redemption_reward_result'
+require 'VoucherifySdk/models/simple_referral_tier'
+require 'VoucherifySdk/models/simple_segment'
+require 'VoucherifySdk/models/simple_sku'
+require 'VoucherifySdk/models/simple_sku_discount_unit'
+require 'VoucherifySdk/models/simple_voucher'
+require 'VoucherifySdk/models/sku'
+require 'VoucherifySdk/models/sku_with_product'
+require 'VoucherifySdk/models/skus_get_response_body'
+require 'VoucherifySdk/models/skus_import_csv_create_response_body'
+require 'VoucherifySdk/models/skus_list'
+require 'VoucherifySdk/models/skus_list_for_product'
+require 'VoucherifySdk/models/stackable_validate_redeem_base'
+require 'VoucherifySdk/models/stackable_validate_redeem_base_redeemables_item'
+require 'VoucherifySdk/models/stacking_rules'
+require 'VoucherifySdk/models/validation_entity'
+require 'VoucherifySdk/models/validation_rule'
+require 'VoucherifySdk/models/validation_rule_assignment'
+require 'VoucherifySdk/models/validation_rule_assignments_list'
+require 'VoucherifySdk/models/validation_rule_base'
+require 'VoucherifySdk/models/validation_rule_base_applicable_to'
+require 'VoucherifySdk/models/validation_rule_base_error'
+require 'VoucherifySdk/models/validation_rules_assignments_list'
+require 'VoucherifySdk/models/validation_rules_assignments_list_response_body'
+require 'VoucherifySdk/models/validation_rules_create_request_body'
+require 'VoucherifySdk/models/validation_rules_create_response_body'
+require 'VoucherifySdk/models/validation_rules_get_response_body'
+require 'VoucherifySdk/models/validation_rules_list_response_body'
+require 'VoucherifySdk/models/validation_rules_update_request_body'
+require 'VoucherifySdk/models/validation_rules_update_response_body'
+require 'VoucherifySdk/models/validations_redeemable_applicable'
+require 'VoucherifySdk/models/validations_redeemable_applicable_result'
+require 'VoucherifySdk/models/validations_redeemable_inapplicable'
+require 'VoucherifySdk/models/validations_redeemable_inapplicable_result'
+require 'VoucherifySdk/models/validations_redeemable_skipped'
+require 'VoucherifySdk/models/validations_validate_all_response_body_redeemables_item'
+require 'VoucherifySdk/models/validations_validate_request_body'
+require 'VoucherifySdk/models/validations_validate_response_body'
+require 'VoucherifySdk/models/voucher'
+require 'VoucherifySdk/models/voucher_assets'
+require 'VoucherifySdk/models/voucher_gift'
+require 'VoucherifySdk/models/voucher_loyalty_card'
+require 'VoucherifySdk/models/voucher_publish'
+require 'VoucherifySdk/models/voucher_redemption'
+require 'VoucherifySdk/models/voucher_transaction'
+require 'VoucherifySdk/models/voucher_transaction_details'
+require 'VoucherifySdk/models/voucher_transaction_details_balance'
+require 'VoucherifySdk/models/voucher_transaction_details_balance_related_object'
+require 'VoucherifySdk/models/voucher_transaction_details_custom_event'
+require 'VoucherifySdk/models/voucher_transaction_details_earning_rule'
+require 'VoucherifySdk/models/voucher_transaction_details_earning_rule_source'
+require 'VoucherifySdk/models/voucher_transaction_details_event'
+require 'VoucherifySdk/models/voucher_transaction_details_event_schema'
+require 'VoucherifySdk/models/voucher_transaction_details_loyalty_tier'
+require 'VoucherifySdk/models/voucher_transaction_details_order'
+require 'VoucherifySdk/models/voucher_transaction_details_redemption'
+require 'VoucherifySdk/models/voucher_transaction_details_reward'
+require 'VoucherifySdk/models/voucher_transaction_details_rollback'
+require 'VoucherifySdk/models/voucher_transaction_details_segment'
+require 'VoucherifySdk/models/voucher_transactions_export'
+require 'VoucherifySdk/models/voucher_transactions_export_filter_conditions'
+require 'VoucherifySdk/models/voucher_transactions_export_filter_conditions_voucher_id'
+require 'VoucherifySdk/models/voucher_transactions_export_filter_conditions_voucher_id_conditions'
+require 'VoucherifySdk/models/voucher_transactions_export_parameters'
+require 'VoucherifySdk/models/voucher_transactions_export_result'
+require 'VoucherifySdk/models/voucher_transactions_filters'
+require 'VoucherifySdk/models/voucher_validity_timeframe'
+require 'VoucherifySdk/models/vouchers_balance_update_request_body'
+require 'VoucherifySdk/models/vouchers_balance_update_response_body'
+require 'VoucherifySdk/models/vouchers_balance_update_response_body_related_object'
+require 'VoucherifySdk/models/vouchers_disable_response_body'
+require 'VoucherifySdk/models/vouchers_enable_response_body'
+require 'VoucherifySdk/models/vouchers_get_response_body'
+require 'VoucherifySdk/models/vouchers_import_csv_create_response_body'
+require 'VoucherifySdk/models/vouchers_redemption_get_response_body'
+require 'VoucherifySdk/models/vouchers_redemption_get_response_body_redemption_entries_item'
+require 'VoucherifySdk/models/vouchers_transactions_export_create_request_body'
+require 'VoucherifySdk/models/vouchers_transactions_export_create_response_body'
+require 'VoucherifySdk/models/vouchers_transactions_list_response_body'
+
+# APIs
+require 'VoucherifySdk/api/campaigns_api'
+require 'VoucherifySdk/api/categories_api'
+require 'VoucherifySdk/api/client_side_api'
+require 'VoucherifySdk/api/customers_api'
+require 'VoucherifySdk/api/events_api'
+require 'VoucherifySdk/api/exports_api'
+require 'VoucherifySdk/api/loyalties_api'
+require 'VoucherifySdk/api/orders_api'
+require 'VoucherifySdk/api/product_collections_api'
+require 'VoucherifySdk/api/products_api'
+require 'VoucherifySdk/api/promotions_api'
+require 'VoucherifySdk/api/publications_api'
+require 'VoucherifySdk/api/qualifications_api'
+require 'VoucherifySdk/api/redemptions_api'
+require 'VoucherifySdk/api/rewards_api'
+require 'VoucherifySdk/api/segments_api'
+require 'VoucherifySdk/api/validation_rules_api'
+require 'VoucherifySdk/api/validations_api'
+require 'VoucherifySdk/api/vouchers_api'
+
+module VoucherifySdk
+ class << self
+ # Customize default settings for the SDK using block.
+ # VoucherifySdk.configure do |config|
+ # config.username = "xxx"
+ # config.password = "xxx"
+ # end
+ # If no block given, return the default Configuration object.
+ def configure
+ if block_given?
+ yield(Configuration.default)
+ else
+ Configuration.default
+ end
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/campaigns_api.rb b/lib/VoucherifySdk/api/campaigns_api.rb
new file mode 100644
index 00000000..2cb2d0c3
--- /dev/null
+++ b/lib/VoucherifySdk/api/campaigns_api.rb
@@ -0,0 +1,789 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class CampaignsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Add Voucher with Specific Code to Campaign
+ # This method gives a possibility to add a new voucher to an existing campaign. The voucher definition will be inherited from the definition kept in the campaign profile. However, you are able to overwrite a few properties inherited from the campaign.
+ # @param campaign_id [String] The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param code [String] A custom **code** that identifies the voucher.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CampaignsVouchersCreateRequestBody] :campaigns_vouchers_create_request_body Specify the voucher parameters that you would like to overwrite.
+ # @return [CampaignsVouchersCreateResponseBody]
+ def add_voucher_with_specific_code_to_campaign(campaign_id, code, opts = {})
+ data, _status_code, _headers = add_voucher_with_specific_code_to_campaign_with_http_info(campaign_id, code, opts)
+ data
+ end
+
+ # Add Voucher with Specific Code to Campaign
+ # This method gives a possibility to add a new voucher to an existing campaign. The voucher definition will be inherited from the definition kept in the campaign profile. However, you are able to overwrite a few properties inherited from the campaign.
+ # @param campaign_id [String] The campaign ID or name of the campaign to which voucher will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param code [String] A custom **code** that identifies the voucher.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CampaignsVouchersCreateRequestBody] :campaigns_vouchers_create_request_body Specify the voucher parameters that you would like to overwrite.
+ # @return [Array<(CampaignsVouchersCreateResponseBody, Integer, Hash)>] CampaignsVouchersCreateResponseBody data, response status code and response headers
+ private def add_voucher_with_specific_code_to_campaign_with_http_info(campaign_id, code, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.add_voucher_with_specific_code_to_campaign ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling CampaignsApi.add_voucher_with_specific_code_to_campaign"
+ end
+ # verify the required parameter 'code' is set
+ if @api_client.config.client_side_validation && code.nil?
+ fail ArgumentError, "Missing the required parameter 'code' when calling CampaignsApi.add_voucher_with_specific_code_to_campaign"
+ end
+ # resource path
+ local_var_path = '/v1/campaigns/{campaignId}/vouchers/{code}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'code' + '}', CGI.escape(code.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'campaigns_vouchers_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CampaignsVouchersCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.add_voucher_with_specific_code_to_campaign",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#add_voucher_with_specific_code_to_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Add Vouchers to Campaign
+ # This method gives the possibility to push new vouchers to an existing campaign. New vouchers will inherit properties from the campaign profile. However, it is possible to overwrite some of them in the request body. If you provide an optional code_config parameter with a voucher code configuration, then it will be used to generate new voucher codes. Otherwise, the voucher code configuration from the campaign will be used. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param campaign_id [String] The campaign ID or name of the campaign to which voucher(s) will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :vouchers_count Number of vouchers that should be added.
+ # @option opts [CampaignsVouchersCreateInBulkRequestBody] :campaigns_vouchers_create_in_bulk_request_body Specify the voucher parameters that you would like to overwrite.
+ # @return [CampaignsVouchersCreateResponseBody]
+ def add_vouchers_to_campaign(campaign_id, opts = {})
+ data, _status_code, _headers = add_vouchers_to_campaign_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # Add Vouchers to Campaign
+ # This method gives the possibility to push new vouchers to an existing campaign. New vouchers will inherit properties from the campaign profile. However, it is possible to overwrite some of them in the request body. If you provide an optional code_config parameter with a voucher code configuration, then it will be used to generate new voucher codes. Otherwise, the voucher code configuration from the campaign will be used. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param campaign_id [String] The campaign ID or name of the campaign to which voucher(s) will be added. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :vouchers_count Number of vouchers that should be added.
+ # @option opts [CampaignsVouchersCreateInBulkRequestBody] :campaigns_vouchers_create_in_bulk_request_body Specify the voucher parameters that you would like to overwrite.
+ # @return [Array<(CampaignsVouchersCreateResponseBody, Integer, Hash)>] CampaignsVouchersCreateResponseBody data, response status code and response headers
+ private def add_vouchers_to_campaign_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.add_vouchers_to_campaign ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling CampaignsApi.add_vouchers_to_campaign"
+ end
+ # resource path
+ local_var_path = '/v1/campaigns/{campaignId}/vouchers'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'vouchers_count'] = opts[:'vouchers_count'] if !opts[:'vouchers_count'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'campaigns_vouchers_create_in_bulk_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CampaignsVouchersCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.add_vouchers_to_campaign",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#add_vouchers_to_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Create Campaign
+ # Method to create a batch of vouchers aggregated in one campaign. You can choose a variety of voucher types and define a unique pattern for generating codes. 📘 Global uniqueness All campaign codes are unique across the whole project. Voucherify will not allow you to generate 2 campaigns with the same coupon code. 🚧 Code generation status This is an asynchronous action; you cant read or modify a newly created campaign until the code generation is completed. See the creation_status field in the campaign object description.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CampaignsCreateRequestBody] :campaigns_create_request_body Specify the details of the campaign that you would like to create.
+ # @return [CampaignsCreateResponseBody]
+ def create_campaign(opts = {})
+ data, _status_code, _headers = create_campaign_with_http_info(opts)
+ data
+ end
+
+ # Create Campaign
+ # Method to create a batch of vouchers aggregated in one campaign. You can choose a variety of voucher types and define a unique pattern for generating codes. 📘 Global uniqueness All campaign codes are unique across the whole project. Voucherify will not allow you to generate 2 campaigns with the same coupon code. 🚧 Code generation status This is an asynchronous action; you cant read or modify a newly created campaign until the code generation is completed. See the creation_status field in the campaign object description.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CampaignsCreateRequestBody] :campaigns_create_request_body Specify the details of the campaign that you would like to create.
+ # @return [Array<(CampaignsCreateResponseBody, Integer, Hash)>] CampaignsCreateResponseBody data, response status code and response headers
+ private def create_campaign_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.create_campaign ...'
+ end
+ # resource path
+ local_var_path = '/v1/campaigns'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'campaigns_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CampaignsCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.create_campaign",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#create_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Campaign
+ # Permanently deletes a campaign and all related vouchers. This action cannot be undone. Also, this method immediately removes any redemptions on the voucher. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param campaign_id [String] You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :force If this flag is set to true, the campaign and related vouchers will be removed permanently. Going forward, the user will be able to create the next campaign with exactly the same name.
+ # @return [CampaignsDeleteResponseBody]
+ def delete_campaign(campaign_id, opts = {})
+ data, _status_code, _headers = delete_campaign_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # Delete Campaign
+ # Permanently deletes a campaign and all related vouchers. This action cannot be undone. Also, this method immediately removes any redemptions on the voucher. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param campaign_id [String] You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :force If this flag is set to true, the campaign and related vouchers will be removed permanently. Going forward, the user will be able to create the next campaign with exactly the same name.
+ # @return [Array<(CampaignsDeleteResponseBody, Integer, Hash)>] CampaignsDeleteResponseBody data, response status code and response headers
+ private def delete_campaign_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.delete_campaign ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling CampaignsApi.delete_campaign"
+ end
+ # resource path
+ local_var_path = '/v1/campaigns/{campaignId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CampaignsDeleteResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.delete_campaign",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#delete_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Disable Campaign
+ # There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **inactive**. The vouchers in this campaign can no longer be redeemed.
+ # @param campaign_id [String] The campaign ID or name of the campaign being disabled. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @return [CampaignsDisableResponseBody]
+ def disable_campaign(campaign_id, opts = {})
+ data, _status_code, _headers = disable_campaign_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # Disable Campaign
+ # There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **inactive**. The vouchers in this campaign can no longer be redeemed.
+ # @param campaign_id [String] The campaign ID or name of the campaign being disabled. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(CampaignsDisableResponseBody, Integer, Hash)>] CampaignsDisableResponseBody data, response status code and response headers
+ private def disable_campaign_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.disable_campaign ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling CampaignsApi.disable_campaign"
+ end
+ # resource path
+ local_var_path = '/v1/campaigns/{campaignId}/disable'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CampaignsDisableResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.disable_campaign",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#disable_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Enable Campaign
+ # There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **active**. The vouchers in this campaign can be redeemed - only if the redemption occurs after the start date of the campaign and voucher and the voucher and campaign are not expired.
+ # @param campaign_id [String] The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @return [CampaignsEnableResponseBody]
+ def enable_campaign(campaign_id, opts = {})
+ data, _status_code, _headers = enable_campaign_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # Enable Campaign
+ # There are various times when youll want to manage a campaigns accessibility. This can be done by two API methods for managing the campaign state - *enable* and *disable*. Sets campaign state to **active**. The vouchers in this campaign can be redeemed - only if the redemption occurs after the start date of the campaign and voucher and the voucher and campaign are not expired.
+ # @param campaign_id [String] The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(CampaignsEnableResponseBody, Integer, Hash)>] CampaignsEnableResponseBody data, response status code and response headers
+ private def enable_campaign_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.enable_campaign ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling CampaignsApi.enable_campaign"
+ end
+ # resource path
+ local_var_path = '/v1/campaigns/{campaignId}/enable'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CampaignsEnableResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.enable_campaign",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#enable_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Campaign
+ # Retrieves the campaign with the given campaign ID or campaign name.
+ # @param campaign_id [String] You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @return [CampaignsGetResponseBody]
+ def get_campaign(campaign_id, opts = {})
+ data, _status_code, _headers = get_campaign_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # Get Campaign
+ # Retrieves the campaign with the given campaign ID or campaign name.
+ # @param campaign_id [String] You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(CampaignsGetResponseBody, Integer, Hash)>] CampaignsGetResponseBody data, response status code and response headers
+ private def get_campaign_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.get_campaign ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling CampaignsApi.get_campaign"
+ end
+ # resource path
+ local_var_path = '/v1/campaigns/{campaignId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CampaignsGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.get_campaign",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#get_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Import Vouchers to Campaign
+ # Imports vouchers to an **existing** campaign. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param campaign_id [String] The ID of an existing campaign to which youre importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :campaigns_import_voucher_item Discount type, expiration date and the remaining attributes will be taken from the Campaign settings.
+ # @return [CampaignsImportCreateResponseBody]
+ def import_vouchers_to_campaign(campaign_id, opts = {})
+ data, _status_code, _headers = import_vouchers_to_campaign_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # Import Vouchers to Campaign
+ # Imports vouchers to an **existing** campaign. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param campaign_id [String] The ID of an existing campaign to which youre importing the codes. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :campaigns_import_voucher_item Discount type, expiration date and the remaining attributes will be taken from the Campaign settings.
+ # @return [Array<(CampaignsImportCreateResponseBody, Integer, Hash)>] CampaignsImportCreateResponseBody data, response status code and response headers
+ private def import_vouchers_to_campaign_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.import_vouchers_to_campaign ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling CampaignsApi.import_vouchers_to_campaign"
+ end
+ # resource path
+ local_var_path = '/v1/campaigns/{campaignId}/import'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'campaigns_import_voucher_item'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CampaignsImportCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.import_vouchers_to_campaign",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#import_vouchers_to_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Import Vouchers to Campaign by CSV
+ # Imports vouchers to an **existing** campaign. The CSV file has to include headers in the first line. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param campaign_id [String] The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value.
+ # @param file [File] File path.
+ # @param [Hash] opts the optional parameters
+ # @return [CampaignsImportCsvCreateResponseBody]
+ def import_vouchers_to_campaign_using_csv(campaign_id, file, opts = {})
+ data, _status_code, _headers = import_vouchers_to_campaign_using_csv_with_http_info(campaign_id, file, opts)
+ data
+ end
+
+ # Import Vouchers to Campaign by CSV
+ # Imports vouchers to an **existing** campaign. The CSV file has to include headers in the first line. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param campaign_id [String] The campaign ID or name of the campaign being enabled. You can either pass the campaign ID, which was assigned by Voucherify or the name of the campaign as the path parameter value.
+ # @param file [File] File path.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(CampaignsImportCsvCreateResponseBody, Integer, Hash)>] CampaignsImportCsvCreateResponseBody data, response status code and response headers
+ private def import_vouchers_to_campaign_using_csv_with_http_info(campaign_id, file, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.import_vouchers_to_campaign_using_csv ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling CampaignsApi.import_vouchers_to_campaign_using_csv"
+ end
+ # verify the required parameter 'file' is set
+ if @api_client.config.client_side_validation && file.nil?
+ fail ArgumentError, "Missing the required parameter 'file' when calling CampaignsApi.import_vouchers_to_campaign_using_csv"
+ end
+ # resource path
+ local_var_path = '/v1/campaigns/{campaignId}/importCSV'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['multipart/form-data'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+ form_params['file'] = file
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CampaignsImportCsvCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.import_vouchers_to_campaign_using_csv",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#import_vouchers_to_campaign_using_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Campaigns
+ # Retrieve a list of campaigns in a project. The campaigns are returned sorted by creation date, with the most recent campaigns appearing first. When you get a list of campaigns, you can optionally specify query parameters to customize the amount of campaigns returned per call using limit, which page of campaigns to return using page, sort the campaigns using the order query parameter and filter the results by the campaign_type. This method will return an error when trying to return a limit of more than 100 campaigns.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterCampaignType] :campaign_type This attribute allows filtering by campaign type.
+ # @option opts [ParameterExpandListCampaigns] :expand Include an expanded categories object in the response. (default to 'category')
+ # @option opts [ParameterOrderListCampaigns] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [CampaignsListResponseBody]
+ def list_campaigns(opts = {})
+ data, _status_code, _headers = list_campaigns_with_http_info(opts)
+ data
+ end
+
+ # List Campaigns
+ # Retrieve a list of campaigns in a project. The campaigns are returned sorted by creation date, with the most recent campaigns appearing first. When you get a list of campaigns, you can optionally specify query parameters to customize the amount of campaigns returned per call using limit, which page of campaigns to return using page, sort the campaigns using the order query parameter and filter the results by the campaign_type. This method will return an error when trying to return a limit of more than 100 campaigns.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterCampaignType] :campaign_type This attribute allows filtering by campaign type.
+ # @option opts [ParameterExpandListCampaigns] :expand Include an expanded categories object in the response. (default to 'category')
+ # @option opts [ParameterOrderListCampaigns] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [Array<(CampaignsListResponseBody, Integer, Hash)>] CampaignsListResponseBody data, response status code and response headers
+ private def list_campaigns_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.list_campaigns ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CampaignsApi.list_campaigns, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CampaignsApi.list_campaigns, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CampaignsApi.list_campaigns, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/campaigns'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'campaign_type'] = opts[:'campaign_type'] if !opts[:'campaign_type'].nil?
+ query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CampaignsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.list_campaigns",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#list_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Campaign
+ # Updates the specified campaign by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body wont be modified. Even if provided, they will be silently skipped. ## Vouchers will be affected This method will update vouchers aggregated in the campaign. It will affect all vouchers that are not published or redeemed yet.
+ # @param campaign_id [String] You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CampaignsUpdateRequestBody] :campaigns_update_request_body Specify the campaign parameters to be updated.
+ # @return [CampaignsUpdateResponseBody]
+ def update_campaign(campaign_id, opts = {})
+ data, _status_code, _headers = update_campaign_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # Update Campaign
+ # Updates the specified campaign by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body wont be modified. Even if provided, they will be silently skipped. ## Vouchers will be affected This method will update vouchers aggregated in the campaign. It will affect all vouchers that are not published or redeemed yet.
+ # @param campaign_id [String] You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CampaignsUpdateRequestBody] :campaigns_update_request_body Specify the campaign parameters to be updated.
+ # @return [Array<(CampaignsUpdateResponseBody, Integer, Hash)>] CampaignsUpdateResponseBody data, response status code and response headers
+ private def update_campaign_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CampaignsApi.update_campaign ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling CampaignsApi.update_campaign"
+ end
+ # resource path
+ local_var_path = '/v1/campaigns/{campaignId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'campaigns_update_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CampaignsUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CampaignsApi.update_campaign",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CampaignsApi#update_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/categories_api.rb b/lib/VoucherifySdk/api/categories_api.rb
new file mode 100644
index 00000000..36a0a9ce
--- /dev/null
+++ b/lib/VoucherifySdk/api/categories_api.rb
@@ -0,0 +1,337 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class CategoriesApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create Category
+ # Create category with a specific name and hierarchy.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CategoriesCreateRequestBody] :categories_create_request_body Specify the details of the category that you would like to create.
+ # @return [CategoriesCreateResponseBody]
+ def create_category(opts = {})
+ data, _status_code, _headers = create_category_with_http_info(opts)
+ data
+ end
+
+ # Create Category
+ # Create category with a specific name and hierarchy.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CategoriesCreateRequestBody] :categories_create_request_body Specify the details of the category that you would like to create.
+ # @return [Array<(CategoriesCreateResponseBody, Integer, Hash)>] CategoriesCreateResponseBody data, response status code and response headers
+ private def create_category_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.create_category ...'
+ end
+ # resource path
+ local_var_path = '/v1/categories'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'categories_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CategoriesCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CategoriesApi.create_category",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CategoriesApi#create_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Category
+ # Delete a category by the category ID.
+ # @param category_id [String] Unique category ID assigned by Voucherify.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_category(category_id, opts = {})
+ delete_category_with_http_info(category_id, opts)
+ nil
+ end
+
+ # Delete Category
+ # Delete a category by the category ID.
+ # @param category_id [String] Unique category ID assigned by Voucherify.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_category_with_http_info(category_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.delete_category ...'
+ end
+ # verify the required parameter 'category_id' is set
+ if @api_client.config.client_side_validation && category_id.nil?
+ fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoriesApi.delete_category"
+ end
+ # resource path
+ local_var_path = '/v1/categories/{categoryId}'.sub('{' + 'categoryId' + '}', CGI.escape(category_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CategoriesApi.delete_category",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CategoriesApi#delete_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Category
+ # Retrieve a category by the category ID.
+ # @param category_id [String] Unique category ID assigned by Voucherify.
+ # @param [Hash] opts the optional parameters
+ # @return [CategoriesGetResponseBody]
+ def get_category(category_id, opts = {})
+ data, _status_code, _headers = get_category_with_http_info(category_id, opts)
+ data
+ end
+
+ # Get Category
+ # Retrieve a category by the category ID.
+ # @param category_id [String] Unique category ID assigned by Voucherify.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(CategoriesGetResponseBody, Integer, Hash)>] CategoriesGetResponseBody data, response status code and response headers
+ private def get_category_with_http_info(category_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.get_category ...'
+ end
+ # verify the required parameter 'category_id' is set
+ if @api_client.config.client_side_validation && category_id.nil?
+ fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoriesApi.get_category"
+ end
+ # resource path
+ local_var_path = '/v1/categories/{categoryId}'.sub('{' + 'categoryId' + '}', CGI.escape(category_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CategoriesGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CategoriesApi.get_category",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CategoriesApi#get_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Categories
+ # List all categories.
+ # @param [Hash] opts the optional parameters
+ # @return [CategoriesListResponseBody]
+ def list_categories(opts = {})
+ data, _status_code, _headers = list_categories_with_http_info(opts)
+ data
+ end
+
+ # List Categories
+ # List all categories.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(CategoriesListResponseBody, Integer, Hash)>] CategoriesListResponseBody data, response status code and response headers
+ private def list_categories_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.list_categories ...'
+ end
+ # resource path
+ local_var_path = '/v1/categories'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CategoriesListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CategoriesApi.list_categories",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CategoriesApi#list_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Category
+ # Update category using the category ID.
+ # @param category_id [String] Unique category ID assigned by Voucherify.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CategoriesUpdateRequestBody] :categories_update_request_body Specify the details of the category that you would like to update.
+ # @return [CategoriesUpdateResponseBody]
+ def update_category(category_id, opts = {})
+ data, _status_code, _headers = update_category_with_http_info(category_id, opts)
+ data
+ end
+
+ # Update Category
+ # Update category using the category ID.
+ # @param category_id [String] Unique category ID assigned by Voucherify.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CategoriesUpdateRequestBody] :categories_update_request_body Specify the details of the category that you would like to update.
+ # @return [Array<(CategoriesUpdateResponseBody, Integer, Hash)>] CategoriesUpdateResponseBody data, response status code and response headers
+ private def update_category_with_http_info(category_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CategoriesApi.update_category ...'
+ end
+ # verify the required parameter 'category_id' is set
+ if @api_client.config.client_side_validation && category_id.nil?
+ fail ArgumentError, "Missing the required parameter 'category_id' when calling CategoriesApi.update_category"
+ end
+ # resource path
+ local_var_path = '/v1/categories/{categoryId}'.sub('{' + 'categoryId' + '}', CGI.escape(category_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'categories_update_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CategoriesUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CategoriesApi.update_category",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CategoriesApi#update_category\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/client_side_api.rb b/lib/VoucherifySdk/api/client_side_api.rb
new file mode 100644
index 00000000..88e9a828
--- /dev/null
+++ b/lib/VoucherifySdk/api/client_side_api.rb
@@ -0,0 +1,367 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class ClientSideApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Check Eligibility (client-side)
+ # Generate a list of redeemables that are applicable in the context of the customer and order. The new qualifications method is an improved version of Campaign Qualifications, Voucher Qualifications, and Promotions Validation API requests. The new qualification method introduces the following improvements: - Qualification results are returned faster - No limit on the number of returned redeemables - Introduces new qualification scenarios, not available in the previous version 👍 Scenario Guide Read our dedicated guide to learn about some use cases this endpoint can cover here. # Paging The Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 50 redeemables. To get the next batch of redeemables, you need to use the starting_after cursor. To process of paging the redeemables works in the following manner: - You send the first API request for Qualifications without the starting_after parameter. - The response will contain a parameter named has_more. If the parameters value is set to true, then more redeemables are available. - Get the value of the created_at parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables. - Send another API request for Qualification with the starting_after parameter set to the value taken from the created_at parameter from the last returned redeemable. - Voucherify will return the next page of redeemables. - If the has_more parameter is set to true, apply steps 3-5 to get the next page of redeemables.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ClientQualificationsCheckEligibilityRequestBody] :client_qualifications_check_eligibility_request_body Define order and customer context.
+ # @return [ClientQualificationsCheckEligibilityResponseBody]
+ def check_eligibility_client_side(opts = {})
+ data, _status_code, _headers = check_eligibility_client_side_with_http_info(opts)
+ data
+ end
+
+ # Check Eligibility (client-side)
+ # Generate a list of redeemables that are applicable in the context of the customer and order. The new qualifications method is an improved version of Campaign Qualifications, Voucher Qualifications, and Promotions Validation API requests. The new qualification method introduces the following improvements: - Qualification results are returned faster - No limit on the number of returned redeemables - Introduces new qualification scenarios, not available in the previous version 👍 Scenario Guide Read our dedicated guide to learn about some use cases this endpoint can cover here. # Paging The Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 50 redeemables. To get the next batch of redeemables, you need to use the starting_after cursor. To process of paging the redeemables works in the following manner: - You send the first API request for Qualifications without the starting_after parameter. - The response will contain a parameter named has_more. If the parameters value is set to true, then more redeemables are available. - Get the value of the created_at parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables. - Send another API request for Qualification with the starting_after parameter set to the value taken from the created_at parameter from the last returned redeemable. - Voucherify will return the next page of redeemables. - If the has_more parameter is set to true, apply steps 3-5 to get the next page of redeemables.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ClientQualificationsCheckEligibilityRequestBody] :client_qualifications_check_eligibility_request_body Define order and customer context.
+ # @return [Array<(ClientQualificationsCheckEligibilityResponseBody, Integer, Hash)>] ClientQualificationsCheckEligibilityResponseBody data, response status code and response headers
+ private def check_eligibility_client_side_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ClientSideApi.check_eligibility_client_side ...'
+ end
+ # resource path
+ local_var_path = '/client/v1/qualifications'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'client_qualifications_check_eligibility_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ClientQualificationsCheckEligibilityResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-Client-Application-Id', 'X-Client-Token']
+
+ new_options = opts.merge(
+ :operation => :"ClientSideApi.check_eligibility_client_side",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ClientSideApi#check_eligibility_client_side\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Redeem Stackable Discounts (client-side)
+ # This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications. # How API returns calculated discounts and order amounts in the response In the table below, you can see the logic the API follows to calculate discounts and amounts: 📘 Rollbacks You cant roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your rollback request.
+ # @param origin [String] Indicates the origin (scheme, hostname, and port).
+ # @param [Hash] opts the optional parameters
+ # @option opts [ClientRedemptionsRedeemRequestBody] :client_redemptions_redeem_request_body
+ # @return [ClientRedemptionsRedeemResponseBody]
+ def redeem_stacked_discounts_client_side(origin, opts = {})
+ data, _status_code, _headers = redeem_stacked_discounts_client_side_with_http_info(origin, opts)
+ data
+ end
+
+ # Redeem Stackable Discounts (client-side)
+ # This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications. # How API returns calculated discounts and order amounts in the response In the table below, you can see the logic the API follows to calculate discounts and amounts: 📘 Rollbacks You cant roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your rollback request.
+ # @param origin [String] Indicates the origin (scheme, hostname, and port).
+ # @param [Hash] opts the optional parameters
+ # @option opts [ClientRedemptionsRedeemRequestBody] :client_redemptions_redeem_request_body
+ # @return [Array<(ClientRedemptionsRedeemResponseBody, Integer, Hash)>] ClientRedemptionsRedeemResponseBody data, response status code and response headers
+ private def redeem_stacked_discounts_client_side_with_http_info(origin, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ClientSideApi.redeem_stacked_discounts_client_side ...'
+ end
+ # verify the required parameter 'origin' is set
+ if @api_client.config.client_side_validation && origin.nil?
+ fail ArgumentError, "Missing the required parameter 'origin' when calling ClientSideApi.redeem_stacked_discounts_client_side"
+ end
+ # resource path
+ local_var_path = '/client/v1/redemptions'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+ header_params[:'origin'] = origin
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'client_redemptions_redeem_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ClientRedemptionsRedeemResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-Client-Application-Id', 'X-Client-Token']
+
+ new_options = opts.merge(
+ :operation => :"ClientSideApi.redeem_stacked_discounts_client_side",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ClientSideApi#redeem_stacked_discounts_client_side\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Track Custom Event (client-side)
+ # To track a custom event, you create an event object. The event object must be linked to the customer who performs the action. If a customer doesnt exist in Voucherify, the customer will be created.
+ # @param origin [String] Indicates the origin (scheme, hostname, and port).
+ # @param [Hash] opts the optional parameters
+ # @option opts [ClientEventsCreateRequestBody] :client_events_create_request_body Specify the details of the custom event.
+ # @return [ClientEventsCreateResponseBody]
+ def track_custom_event_client_side(origin, opts = {})
+ data, _status_code, _headers = track_custom_event_client_side_with_http_info(origin, opts)
+ data
+ end
+
+ # Track Custom Event (client-side)
+ # To track a custom event, you create an event object. The event object must be linked to the customer who performs the action. If a customer doesnt exist in Voucherify, the customer will be created.
+ # @param origin [String] Indicates the origin (scheme, hostname, and port).
+ # @param [Hash] opts the optional parameters
+ # @option opts [ClientEventsCreateRequestBody] :client_events_create_request_body Specify the details of the custom event.
+ # @return [Array<(ClientEventsCreateResponseBody, Integer, Hash)>] ClientEventsCreateResponseBody data, response status code and response headers
+ private def track_custom_event_client_side_with_http_info(origin, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ClientSideApi.track_custom_event_client_side ...'
+ end
+ # verify the required parameter 'origin' is set
+ if @api_client.config.client_side_validation && origin.nil?
+ fail ArgumentError, "Missing the required parameter 'origin' when calling ClientSideApi.track_custom_event_client_side"
+ end
+ # resource path
+ local_var_path = '/client/v1/events'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+ header_params[:'origin'] = origin
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'client_events_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ClientEventsCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-Client-Application-Id', 'X-Client-Token']
+
+ new_options = opts.merge(
+ :operation => :"ClientSideApi.track_custom_event_client_side",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ClientSideApi#track_custom_event_client_side\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Customer's consents (client-side)
+ # Update marketing permissions for the specified customer.
+ # @param customer_id [String] A Voucherify customer identifier or source_id
+ # @param [Hash] opts the optional parameters
+ # @option opts [Object] :body Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use unsubscribed as a consent identifier and true as its value. ## Examples Opt-out from all communication:
+ # @return [nil]
+ def update_customers_consents_client_side(customer_id, opts = {})
+ update_customers_consents_client_side_with_http_info(customer_id, opts)
+ nil
+ end
+
+ # Update Customer's consents (client-side)
+ # Update marketing permissions for the specified customer.
+ # @param customer_id [String] A Voucherify customer identifier or source_id
+ # @param [Hash] opts the optional parameters
+ # @option opts [Object] :body Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use unsubscribed as a consent identifier and true as its value. ## Examples Opt-out from all communication:
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def update_customers_consents_client_side_with_http_info(customer_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ClientSideApi.update_customers_consents_client_side ...'
+ end
+ # verify the required parameter 'customer_id' is set
+ if @api_client.config.client_side_validation && customer_id.nil?
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling ClientSideApi.update_customers_consents_client_side"
+ end
+ # resource path
+ local_var_path = '/client/v1/customers/{customerId}/consents'.sub('{' + 'customerId' + '}', CGI.escape(customer_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-Client-Application-Id', 'X-Client-Token']
+
+ new_options = opts.merge(
+ :operation => :"ClientSideApi.update_customers_consents_client_side",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ClientSideApi#update_customers_consents_client_side\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Validate Stackable Discounts (client-side)
+ # Verify redeemables provided in the request. This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications.
+ # @param origin [String] Indicates the origin (scheme, hostname, and port).
+ # @param [Hash] opts the optional parameters
+ # @option opts [ClientValidationsValidateRequestBody] :client_validations_validate_request_body
+ # @return [ClientValidationsValidateResponseBody]
+ def validate_stacked_discounts_client_side(origin, opts = {})
+ data, _status_code, _headers = validate_stacked_discounts_client_side_with_http_info(origin, opts)
+ data
+ end
+
+ # Validate Stackable Discounts (client-side)
+ # Verify redeemables provided in the request. This method is accessible through public keys which you can use in client side requests coming from mobile and web browser applications.
+ # @param origin [String] Indicates the origin (scheme, hostname, and port).
+ # @param [Hash] opts the optional parameters
+ # @option opts [ClientValidationsValidateRequestBody] :client_validations_validate_request_body
+ # @return [Array<(ClientValidationsValidateResponseBody, Integer, Hash)>] ClientValidationsValidateResponseBody data, response status code and response headers
+ private def validate_stacked_discounts_client_side_with_http_info(origin, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ClientSideApi.validate_stacked_discounts_client_side ...'
+ end
+ # verify the required parameter 'origin' is set
+ if @api_client.config.client_side_validation && origin.nil?
+ fail ArgumentError, "Missing the required parameter 'origin' when calling ClientSideApi.validate_stacked_discounts_client_side"
+ end
+ # resource path
+ local_var_path = '/client/v1/validations'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+ header_params[:'origin'] = origin
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'client_validations_validate_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ClientValidationsValidateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-Client-Application-Id', 'X-Client-Token']
+
+ new_options = opts.merge(
+ :operation => :"ClientSideApi.validate_stacked_discounts_client_side",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ClientSideApi#validate_stacked_discounts_client_side\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/customers_api.rb b/lib/VoucherifySdk/api/customers_api.rb
new file mode 100644
index 00000000..2a46f99e
--- /dev/null
+++ b/lib/VoucherifySdk/api/customers_api.rb
@@ -0,0 +1,874 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class CustomersApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create Customer
+ # Creates a customer object. 📘 Upsert Mode If you pass an id or a source_id that already exists in the customer database, Voucherify will return a related customer object with updated fields.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CustomersCreateRequestBody] :customers_create_request_body Create a customer with specified parameters.
+ # @return [CustomersCreateResponseBody]
+ def create_customer(opts = {})
+ data, _status_code, _headers = create_customer_with_http_info(opts)
+ data
+ end
+
+ # Create Customer
+ # Creates a customer object. 📘 Upsert Mode If you pass an id or a source_id that already exists in the customer database, Voucherify will return a related customer object with updated fields.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CustomersCreateRequestBody] :customers_create_request_body Create a customer with specified parameters.
+ # @return [Array<(CustomersCreateResponseBody, Integer, Hash)>] CustomersCreateResponseBody data, response status code and response headers
+ private def create_customer_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.create_customer ...'
+ end
+ # resource path
+ local_var_path = '/v1/customers'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'customers_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CustomersCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.create_customer",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#create_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Customer Permanently
+ # The organization user can remove consumer data permanently from the Voucherify system by using this API method. It deletes all customer data and connected resources. It makes the customer profile forgotten by Voucherify.
+ # @param customer_id [String] A Voucherify customers id or source_id.
+ # @param [Hash] opts the optional parameters
+ # @return [CustomersPermanentDeletionCreateResponseBody]
+ def customer_permanently_deletion(customer_id, opts = {})
+ data, _status_code, _headers = customer_permanently_deletion_with_http_info(customer_id, opts)
+ data
+ end
+
+ # Delete Customer Permanently
+ # The organization user can remove consumer data permanently from the Voucherify system by using this API method. It deletes all customer data and connected resources. It makes the customer profile forgotten by Voucherify.
+ # @param customer_id [String] A Voucherify customers id or source_id.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(CustomersPermanentDeletionCreateResponseBody, Integer, Hash)>] CustomersPermanentDeletionCreateResponseBody data, response status code and response headers
+ private def customer_permanently_deletion_with_http_info(customer_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.customer_permanently_deletion ...'
+ end
+ # verify the required parameter 'customer_id' is set
+ if @api_client.config.client_side_validation && customer_id.nil?
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.customer_permanently_deletion"
+ end
+ # resource path
+ local_var_path = '/v1/customers/{customerId}/permanent-deletion'.sub('{' + 'customerId' + '}', CGI.escape(customer_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CustomersPermanentDeletionCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.customer_permanently_deletion",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#customer_permanently_deletion\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Customer
+ # This method deletes a customer.
+ # @param customer_id [String] A Voucherify customers id or source_id.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_customer(customer_id, opts = {})
+ delete_customer_with_http_info(customer_id, opts)
+ nil
+ end
+
+ # Delete Customer
+ # This method deletes a customer.
+ # @param customer_id [String] A Voucherify customers id or source_id.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_customer_with_http_info(customer_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.delete_customer ...'
+ end
+ # verify the required parameter 'customer_id' is set
+ if @api_client.config.client_side_validation && customer_id.nil?
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.delete_customer"
+ end
+ # resource path
+ local_var_path = '/v1/customers/{customerId}'.sub('{' + 'customerId' + '}', CGI.escape(customer_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.delete_customer",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#delete_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Customer
+ # Retrieve customer details.
+ # @param customer_id [String] A Voucherify customers id or source_id.
+ # @param [Hash] opts the optional parameters
+ # @return [CustomersGetResponseBody]
+ def get_customer(customer_id, opts = {})
+ data, _status_code, _headers = get_customer_with_http_info(customer_id, opts)
+ data
+ end
+
+ # Get Customer
+ # Retrieve customer details.
+ # @param customer_id [String] A Voucherify customers id or source_id.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(CustomersGetResponseBody, Integer, Hash)>] CustomersGetResponseBody data, response status code and response headers
+ private def get_customer_with_http_info(customer_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.get_customer ...'
+ end
+ # verify the required parameter 'customer_id' is set
+ if @api_client.config.client_side_validation && customer_id.nil?
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.get_customer"
+ end
+ # resource path
+ local_var_path = '/v1/customers/{customerId}'.sub('{' + 'customerId' + '}', CGI.escape(customer_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CustomersGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.get_customer",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#get_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Import and Update Customers using CSV
+ # This API method lets you import or update customer data. To get a proper and valid response, please send a CSV file with data separated by commas. # Request Example # CSV File Format The CSV file has to include headers in the first line. All properties which cannot be mapped to standard customer fields will be added to the metadata object. 📘 Standard customer fields mapping **No spaces allowed in field names** Id, Name, Email, Phone, Birthdate, Source_id, Address_line_1, Address_line_2, Address_Postal_Code, Address_City, Address_State, Address_Country, Description, Metadata_name_1, Metadata_name_2 # Update Customers using CSV If you would like to update customers data, you can do it using the CSV file with new data. However, remember to include a source_id in your CSV file to manage the update successfully. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param file [File] File path.
+ # @param [Hash] opts the optional parameters
+ # @return [CustomersImportCsvCreateResponseBody]
+ def import_customers_using_csv(file, opts = {})
+ data, _status_code, _headers = import_customers_using_csv_with_http_info(file, opts)
+ data
+ end
+
+ # Import and Update Customers using CSV
+ # This API method lets you import or update customer data. To get a proper and valid response, please send a CSV file with data separated by commas. # Request Example # CSV File Format The CSV file has to include headers in the first line. All properties which cannot be mapped to standard customer fields will be added to the metadata object. 📘 Standard customer fields mapping **No spaces allowed in field names** Id, Name, Email, Phone, Birthdate, Source_id, Address_line_1, Address_line_2, Address_Postal_Code, Address_City, Address_State, Address_Country, Description, Metadata_name_1, Metadata_name_2 # Update Customers using CSV If you would like to update customers data, you can do it using the CSV file with new data. However, remember to include a source_id in your CSV file to manage the update successfully. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param file [File] File path.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(CustomersImportCsvCreateResponseBody, Integer, Hash)>] CustomersImportCsvCreateResponseBody data, response status code and response headers
+ private def import_customers_using_csv_with_http_info(file, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.import_customers_using_csv ...'
+ end
+ # verify the required parameter 'file' is set
+ if @api_client.config.client_side_validation && file.nil?
+ fail ArgumentError, "Missing the required parameter 'file' when calling CustomersApi.import_customers_using_csv"
+ end
+ # resource path
+ local_var_path = '/v1/customers/importCSV'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['multipart/form-data'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+ form_params['file'] = file
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CustomersImportCsvCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.import_customers_using_csv",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#import_customers_using_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Customer Activities
+ # Retrieve customer activities.
+ # @param customer_id [String] A Voucherify customers id or source ID of the customer who performed the activities.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [ParameterOrder] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :starting_after A cursor for use in pagination. starting_after is a date-time value that defines your place in the list based on created_at property from the activity object. For instance, if you make a list request and receive 100 objects, ending with an object created at 2020-05-24T13:43:09.024Z, your subsequent call can include starting_after 2020-05-24T13:43:09.024Z in order to fetch the next page of the list.
+ # @option opts [String] :starting_after_id By applying this filter value, you will get events starting after an event with the given ID.
+ # @option opts [ParameterCampaignType] :campaign_type Through this parameter you can control a type of campaign by which Voucherify will filter related customers activity. API will return only records related to that given type. Allowed values: DISCOUNT_COUPONS, REFERRAL_PROGRAM, GIFT_VOUCHERS, PROMOTION, LOYALTY_PROGRAM
+ # @option opts [String] :campaign_id By applying this parameter you request only events related to specific campaign identified by its ID.
+ # @option opts [String] :product_id By applying this parameter you request only events related to specific product identified by its ID.
+ # @option opts [Time] :start_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @option opts [Time] :end_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @return [CustomersActivitiesListResponseBody]
+ def list_customer_activities(customer_id, opts = {})
+ data, _status_code, _headers = list_customer_activities_with_http_info(customer_id, opts)
+ data
+ end
+
+ # List Customer Activities
+ # Retrieve customer activities.
+ # @param customer_id [String] A Voucherify customers id or source ID of the customer who performed the activities.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [ParameterOrder] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :starting_after A cursor for use in pagination. starting_after is a date-time value that defines your place in the list based on created_at property from the activity object. For instance, if you make a list request and receive 100 objects, ending with an object created at 2020-05-24T13:43:09.024Z, your subsequent call can include starting_after 2020-05-24T13:43:09.024Z in order to fetch the next page of the list.
+ # @option opts [String] :starting_after_id By applying this filter value, you will get events starting after an event with the given ID.
+ # @option opts [ParameterCampaignType] :campaign_type Through this parameter you can control a type of campaign by which Voucherify will filter related customers activity. API will return only records related to that given type. Allowed values: DISCOUNT_COUPONS, REFERRAL_PROGRAM, GIFT_VOUCHERS, PROMOTION, LOYALTY_PROGRAM
+ # @option opts [String] :campaign_id By applying this parameter you request only events related to specific campaign identified by its ID.
+ # @option opts [String] :product_id By applying this parameter you request only events related to specific product identified by its ID.
+ # @option opts [Time] :start_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @option opts [Time] :end_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @return [Array<(CustomersActivitiesListResponseBody, Integer, Hash)>] CustomersActivitiesListResponseBody data, response status code and response headers
+ private def list_customer_activities_with_http_info(customer_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.list_customer_activities ...'
+ end
+ # verify the required parameter 'customer_id' is set
+ if @api_client.config.client_side_validation && customer_id.nil?
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.list_customer_activities"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CustomersApi.list_customer_activities, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CustomersApi.list_customer_activities, must be greater than or equal to 1.'
+ end
+
+ # resource path
+ local_var_path = '/v1/customers/{customerId}/activities'.sub('{' + 'customerId' + '}', CGI.escape(customer_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
+ query_params[:'starting_after_id'] = opts[:'starting_after_id'] if !opts[:'starting_after_id'].nil?
+ query_params[:'campaign_type'] = opts[:'campaign_type'] if !opts[:'campaign_type'].nil?
+ query_params[:'campaign_id'] = opts[:'campaign_id'] if !opts[:'campaign_id'].nil?
+ query_params[:'product_id'] = opts[:'product_id'] if !opts[:'product_id'].nil?
+ query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
+ query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CustomersActivitiesListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.list_customer_activities",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#list_customer_activities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Customer's Segments
+ # Returns the list of segments IDs to which the customer belongs to. If you pass a customerId which is not stored and recognized by Voucherify as an existing customer in the system, the response will generate a list of segments that the customer would potentialy qualify for if they were to become a customer tracked in the system.
+ # @param customer_id [String] Unique identifier of a customer represented by an internal customer ID or customer source ID.
+ # @param [Hash] opts the optional parameters
+ # @return [CustomersSegmentsListResponseBody]
+ def list_customer_segments(customer_id, opts = {})
+ data, _status_code, _headers = list_customer_segments_with_http_info(customer_id, opts)
+ data
+ end
+
+ # List Customer's Segments
+ # Returns the list of segments IDs to which the customer belongs to. If you pass a customerId which is not stored and recognized by Voucherify as an existing customer in the system, the response will generate a list of segments that the customer would potentialy qualify for if they were to become a customer tracked in the system.
+ # @param customer_id [String] Unique identifier of a customer represented by an internal customer ID or customer source ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(CustomersSegmentsListResponseBody, Integer, Hash)>] CustomersSegmentsListResponseBody data, response status code and response headers
+ private def list_customer_segments_with_http_info(customer_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.list_customer_segments ...'
+ end
+ # verify the required parameter 'customer_id' is set
+ if @api_client.config.client_side_validation && customer_id.nil?
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.list_customer_segments"
+ end
+ # resource path
+ local_var_path = '/v1/customers/{customerId}/segments'.sub('{' + 'customerId' + '}', CGI.escape(customer_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CustomersSegmentsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.list_customer_segments",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#list_customer_segments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Customers
+ # Returns a list of customers.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [String] :email Limit the customers to the ones that have this specific email address.
+ # @option opts [String] :city Limit the customers to the ones that are located in the specified city.
+ # @option opts [String] :name Filter customers by the name property.
+ # @option opts [String] :segment_id Filter customers by the segment id.
+ # @option opts [Time] :created_at_before Filter customers by date customer was created.
+ # @option opts [Time] :created_at_after Filter customers by date customer was created.
+ # @option opts [Time] :updated_at_before Filter customers by date customer was updated last time.
+ # @option opts [Time] :updated_at_after Filter customers by date customer was updated last time.
+ # @option opts [ParameterOrderListCustomers] :order This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :starting_after A cursor for use in pagination. This is a date-time value that defines your place in the list based on created_at property from the customer object. For instance, if you make a list request and receive 100 objects, ending with an object created at 2020-05-24T13:43:09.024Z, your subsequent call can include starting_after 2020-05-24T13:43:09.024Z in order to fetch the next page of the list.
+ # @return [CustomersListResponseBody]
+ def list_customers(opts = {})
+ data, _status_code, _headers = list_customers_with_http_info(opts)
+ data
+ end
+
+ # List Customers
+ # Returns a list of customers.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [String] :email Limit the customers to the ones that have this specific email address.
+ # @option opts [String] :city Limit the customers to the ones that are located in the specified city.
+ # @option opts [String] :name Filter customers by the name property.
+ # @option opts [String] :segment_id Filter customers by the segment id.
+ # @option opts [Time] :created_at_before Filter customers by date customer was created.
+ # @option opts [Time] :created_at_after Filter customers by date customer was created.
+ # @option opts [Time] :updated_at_before Filter customers by date customer was updated last time.
+ # @option opts [Time] :updated_at_after Filter customers by date customer was updated last time.
+ # @option opts [ParameterOrderListCustomers] :order This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :starting_after A cursor for use in pagination. This is a date-time value that defines your place in the list based on created_at property from the customer object. For instance, if you make a list request and receive 100 objects, ending with an object created at 2020-05-24T13:43:09.024Z, your subsequent call can include starting_after 2020-05-24T13:43:09.024Z in order to fetch the next page of the list.
+ # @return [Array<(CustomersListResponseBody, Integer, Hash)>] CustomersListResponseBody data, response status code and response headers
+ private def list_customers_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.list_customers ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CustomersApi.list_customers, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling CustomersApi.list_customers, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling CustomersApi.list_customers, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/customers'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil?
+ query_params[:'city'] = opts[:'city'] if !opts[:'city'].nil?
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
+ query_params[:'segment_id'] = opts[:'segment_id'] if !opts[:'segment_id'].nil?
+ query_params[:'created_at[before]'] = opts[:'created_at_before'] if !opts[:'created_at_before'].nil?
+ query_params[:'created_at[after]'] = opts[:'created_at_after'] if !opts[:'created_at_after'].nil?
+ query_params[:'updated_at[before]'] = opts[:'updated_at_before'] if !opts[:'updated_at_before'].nil?
+ query_params[:'updated_at[after]'] = opts[:'updated_at_after'] if !opts[:'updated_at_after'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CustomersListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.list_customers",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#list_customers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Customer
+ # Updates the specified customer by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.
+ # @param customer_id [String] A Voucherify customers id or source_id.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CustomersUpdateRequestBody] :customers_update_request_body Specify the parameters to be updated.
+ # @return [CustomersUpdateResponseBody]
+ def update_customer(customer_id, opts = {})
+ data, _status_code, _headers = update_customer_with_http_info(customer_id, opts)
+ data
+ end
+
+ # Update Customer
+ # Updates the specified customer by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.
+ # @param customer_id [String] A Voucherify customers id or source_id.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CustomersUpdateRequestBody] :customers_update_request_body Specify the parameters to be updated.
+ # @return [Array<(CustomersUpdateResponseBody, Integer, Hash)>] CustomersUpdateResponseBody data, response status code and response headers
+ private def update_customer_with_http_info(customer_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.update_customer ...'
+ end
+ # verify the required parameter 'customer_id' is set
+ if @api_client.config.client_side_validation && customer_id.nil?
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.update_customer"
+ end
+ # resource path
+ local_var_path = '/v1/customers/{customerId}'.sub('{' + 'customerId' + '}', CGI.escape(customer_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'customers_update_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CustomersUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.update_customer",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#update_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Customer's consents
+ # Update marketing permissions for the specified customer.
+ # @param customer_id [String] A Voucherify unique customer identifier or source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Object] :body Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use unsubscribed as a consent identifier and true as its value. ## Examples Opt-out from all communication:
+ # @return [nil]
+ def update_customers_consents(customer_id, opts = {})
+ update_customers_consents_with_http_info(customer_id, opts)
+ nil
+ end
+
+ # Update Customer's consents
+ # Update marketing permissions for the specified customer.
+ # @param customer_id [String] A Voucherify unique customer identifier or source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Object] :body Key-value pairs where the key is the consent identifier and value is a boolean that identifies if a customer has given the consent or not. To deny all consents use unsubscribed as a consent identifier and true as its value. ## Examples Opt-out from all communication:
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def update_customers_consents_with_http_info(customer_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.update_customers_consents ...'
+ end
+ # verify the required parameter 'customer_id' is set
+ if @api_client.config.client_side_validation && customer_id.nil?
+ fail ArgumentError, "Missing the required parameter 'customer_id' when calling CustomersApi.update_customers_consents"
+ end
+ # resource path
+ local_var_path = '/v1/customers/{customerId}/consents'.sub('{' + 'customerId' + '}', CGI.escape(customer_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.update_customers_consents",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#update_customers_consents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Customers in bulk
+ # Update several customers in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested customer object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :customers_update_in_bulk_request_body Specify the customer fields that you would like to update in each customer object.
+ # @return [CustomersUpdateInBulkResponseBody]
+ def update_customers_in_bulk(opts = {})
+ data, _status_code, _headers = update_customers_in_bulk_with_http_info(opts)
+ data
+ end
+
+ # Update Customers in bulk
+ # Update several customers in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested customer object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :customers_update_in_bulk_request_body Specify the customer fields that you would like to update in each customer object.
+ # @return [Array<(CustomersUpdateInBulkResponseBody, Integer, Hash)>] CustomersUpdateInBulkResponseBody data, response status code and response headers
+ private def update_customers_in_bulk_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.update_customers_in_bulk ...'
+ end
+ # resource path
+ local_var_path = '/v1/customers/bulk/async'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'customers_update_in_bulk_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CustomersUpdateInBulkResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.update_customers_in_bulk",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#update_customers_in_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Customers' Metadata in bulk
+ # Update several customers metadata properties in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested customer object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CustomersMetadataUpdateInBulkRequestBody] :customers_metadata_update_in_bulk_request_body List the source_ids of the customers you would like to update along with the metadata key value pairs.
+ # @return [CustomersMetadataUpdateInBulkResponseBody]
+ def update_customers_metadata_in_bulk(opts = {})
+ data, _status_code, _headers = update_customers_metadata_in_bulk_with_http_info(opts)
+ data
+ end
+
+ # Update Customers' Metadata in bulk
+ # Update several customers metadata properties in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested customer object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param [Hash] opts the optional parameters
+ # @option opts [CustomersMetadataUpdateInBulkRequestBody] :customers_metadata_update_in_bulk_request_body List the source_ids of the customers you would like to update along with the metadata key value pairs.
+ # @return [Array<(CustomersMetadataUpdateInBulkResponseBody, Integer, Hash)>] CustomersMetadataUpdateInBulkResponseBody data, response status code and response headers
+ private def update_customers_metadata_in_bulk_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: CustomersApi.update_customers_metadata_in_bulk ...'
+ end
+ # resource path
+ local_var_path = '/v1/customers/metadata/async'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'customers_metadata_update_in_bulk_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'CustomersMetadataUpdateInBulkResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"CustomersApi.update_customers_metadata_in_bulk",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: CustomersApi#update_customers_metadata_in_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/events_api.rb b/lib/VoucherifySdk/api/events_api.rb
new file mode 100644
index 00000000..210271fd
--- /dev/null
+++ b/lib/VoucherifySdk/api/events_api.rb
@@ -0,0 +1,86 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class EventsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Track Custom Event
+ # To track a custom event, you create an event object. The event object must be linked to the customer who performs the action. If a customer doesnt exist in Voucherify, the customer will be created.
+ # @param [Hash] opts the optional parameters
+ # @option opts [EventsCreateRequestBody] :events_create_request_body Specify the details of the custom event.
+ # @return [EventsCreateResponseBody]
+ def track_custom_event(opts = {})
+ data, _status_code, _headers = track_custom_event_with_http_info(opts)
+ data
+ end
+
+ # Track Custom Event
+ # To track a custom event, you create an event object. The event object must be linked to the customer who performs the action. If a customer doesnt exist in Voucherify, the customer will be created.
+ # @param [Hash] opts the optional parameters
+ # @option opts [EventsCreateRequestBody] :events_create_request_body Specify the details of the custom event.
+ # @return [Array<(EventsCreateResponseBody, Integer, Hash)>] EventsCreateResponseBody data, response status code and response headers
+ private def track_custom_event_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: EventsApi.track_custom_event ...'
+ end
+ # resource path
+ local_var_path = '/v1/events'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'events_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'EventsCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"EventsApi.track_custom_event",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: EventsApi#track_custom_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/exports_api.rb b/lib/VoucherifySdk/api/exports_api.rb
new file mode 100644
index 00000000..e1b296d8
--- /dev/null
+++ b/lib/VoucherifySdk/api/exports_api.rb
@@ -0,0 +1,354 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class ExportsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create Export
+ # Create export object. The export can be any of the following types: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions. # Defaults If you only specify the object type in the request body without specifying the fields, the API will return the following fields per export object: # Fetching particular data sets Using the parameters body parameter, you can narrow down which fields to export and how to filter the results. The fields are an array of strings containing the data that you would like to export. These fields define the headers in the CSV file. The array can be a combintation of any of the following available fields: # Orders # Vouchers # Publications # Redemptions # Customers # Points Expirations # Gift Card Transactions # Loyalty Card Transactions
+ # @param [Hash] opts the optional parameters
+ # @option opts [ExportsCreateRequestBody] :exports_create_request_body Specify the details of the export that you would like to create.
+ # @return [ExportsCreateResponseBody]
+ def create_export(opts = {})
+ data, _status_code, _headers = create_export_with_http_info(opts)
+ data
+ end
+
+ # Create Export
+ # Create export object. The export can be any of the following types: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions. # Defaults If you only specify the object type in the request body without specifying the fields, the API will return the following fields per export object: # Fetching particular data sets Using the parameters body parameter, you can narrow down which fields to export and how to filter the results. The fields are an array of strings containing the data that you would like to export. These fields define the headers in the CSV file. The array can be a combintation of any of the following available fields: # Orders # Vouchers # Publications # Redemptions # Customers # Points Expirations # Gift Card Transactions # Loyalty Card Transactions
+ # @param [Hash] opts the optional parameters
+ # @option opts [ExportsCreateRequestBody] :exports_create_request_body Specify the details of the export that you would like to create.
+ # @return [Array<(ExportsCreateResponseBody, Integer, Hash)>] ExportsCreateResponseBody data, response status code and response headers
+ private def create_export_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ExportsApi.create_export ...'
+ end
+ # resource path
+ local_var_path = '/v1/exports'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'exports_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ExportsCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ExportsApi.create_export",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ExportsApi#create_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Export
+ # This method deletes a previously created export object.
+ # @param export_id [String] Unique export object ID of previously created export. This object can be a: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_export(export_id, opts = {})
+ delete_export_with_http_info(export_id, opts)
+ nil
+ end
+
+ # Delete Export
+ # This method deletes a previously created export object.
+ # @param export_id [String] Unique export object ID of previously created export. This object can be a: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_export_with_http_info(export_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ExportsApi.delete_export ...'
+ end
+ # verify the required parameter 'export_id' is set
+ if @api_client.config.client_side_validation && export_id.nil?
+ fail ArgumentError, "Missing the required parameter 'export_id' when calling ExportsApi.delete_export"
+ end
+ # resource path
+ local_var_path = '/v1/exports/{exportId}'.sub('{' + 'exportId' + '}', CGI.escape(export_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ExportsApi.delete_export",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ExportsApi#delete_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Download Export
+ # Download the contents of the exported CSV file. 📘 Important notes **Base URL:** - https://download.voucherify.io (Europe) - https://us1.download.voucherify.io (US) - https://as1.download.voucherify.io (Asia) **Token:** Can be found within the result parameter of the Get Export method response.
+ # @param export_id [String] Unique export object ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [String] :token Token that was issued to the export, to get this token, get the export first
+ # @return [String]
+ def download_export(export_id, opts = {})
+ data, _status_code, _headers = download_export_with_http_info(export_id, opts)
+ data
+ end
+
+ # Download Export
+ # Download the contents of the exported CSV file. 📘 Important notes **Base URL:** - https://download.voucherify.io (Europe) - https://us1.download.voucherify.io (US) - https://as1.download.voucherify.io (Asia) **Token:** Can be found within the result parameter of the Get Export method response.
+ # @param export_id [String] Unique export object ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [String] :token Token that was issued to the export, to get this token, get the export first
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
+ private def download_export_with_http_info(export_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ExportsApi.download_export ...'
+ end
+ # verify the required parameter 'export_id' is set
+ if @api_client.config.client_side_validation && export_id.nil?
+ fail ArgumentError, "Missing the required parameter 'export_id' when calling ExportsApi.download_export"
+ end
+ # resource path
+ local_var_path = '/v1/exports/{export_Id}'.sub('{' + 'export_Id' + '}', CGI.escape(export_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'token'] = opts[:'token'] if !opts[:'token'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['text/plain'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'String'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || []
+
+ new_options = opts.merge(
+ :operation => :"ExportsApi.download_export",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ExportsApi#download_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Export
+ # Retrieves the URL of the downloadable file, which was generated via the Create Export method.
+ # @param export_id [String] Unique export object ID of previously created export. This object can be a: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions.
+ # @param [Hash] opts the optional parameters
+ # @return [ExportsGetResponseBody]
+ def get_export(export_id, opts = {})
+ data, _status_code, _headers = get_export_with_http_info(export_id, opts)
+ data
+ end
+
+ # Get Export
+ # Retrieves the URL of the downloadable file, which was generated via the Create Export method.
+ # @param export_id [String] Unique export object ID of previously created export. This object can be a: voucher, redemption, publication, customer, order, points_expiration, or voucher_transactions.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(ExportsGetResponseBody, Integer, Hash)>] ExportsGetResponseBody data, response status code and response headers
+ private def get_export_with_http_info(export_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ExportsApi.get_export ...'
+ end
+ # verify the required parameter 'export_id' is set
+ if @api_client.config.client_side_validation && export_id.nil?
+ fail ArgumentError, "Missing the required parameter 'export_id' when calling ExportsApi.get_export"
+ end
+ # resource path
+ local_var_path = '/v1/exports/{exportId}'.sub('{' + 'exportId' + '}', CGI.escape(export_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ExportsGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ExportsApi.get_export",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ExportsApi#get_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Exports
+ # List all exports.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListExports] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [ExportsListResponseBody]
+ def list_exports(opts = {})
+ data, _status_code, _headers = list_exports_with_http_info(opts)
+ data
+ end
+
+ # List Exports
+ # List all exports.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListExports] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [Array<(ExportsListResponseBody, Integer, Hash)>] ExportsListResponseBody data, response status code and response headers
+ private def list_exports_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ExportsApi.list_exports ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ExportsApi.list_exports, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ExportsApi.list_exports, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ExportsApi.list_exports, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/exports'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ExportsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ExportsApi.list_exports",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ExportsApi#list_exports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/loyalties_api.rb b/lib/VoucherifySdk/api/loyalties_api.rb
new file mode 100644
index 00000000..d3787b95
--- /dev/null
+++ b/lib/VoucherifySdk/api/loyalties_api.rb
@@ -0,0 +1,1906 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class LoyaltiesApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create loyalty tiers
+ # Creates loyalty tiers for desired campaign.
+ # @param campaign_id [String] Unique loyalty campaign ID or name.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :loyalties_tiers_create_in_bulk_request_body_item Provide tier definitions you want to add to existing loyalty campaign.
+ # @return [Array]
+ def create_in_bulk_loyalty_tiers(campaign_id, opts = {})
+ data, _status_code, _headers = create_in_bulk_loyalty_tiers_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # Create loyalty tiers
+ # Creates loyalty tiers for desired campaign.
+ # @param campaign_id [String] Unique loyalty campaign ID or name.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :loyalties_tiers_create_in_bulk_request_body_item Provide tier definitions you want to add to existing loyalty campaign.
+ # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers
+ private def create_in_bulk_loyalty_tiers_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.create_in_bulk_loyalty_tiers ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.create_in_bulk_loyalty_tiers"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/tiers'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'loyalties_tiers_create_in_bulk_request_body_item'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'Array'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.create_in_bulk_loyalty_tiers",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#create_in_bulk_loyalty_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Earning Rule
+ # This method deletes an earning rule for a specific loyalty campaign.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param earning_rule_id [String] A unique earning rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_earning_rule(campaign_id, earning_rule_id, opts = {})
+ delete_earning_rule_with_http_info(campaign_id, earning_rule_id, opts)
+ nil
+ end
+
+ # Delete Earning Rule
+ # This method deletes an earning rule for a specific loyalty campaign.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param earning_rule_id [String] A unique earning rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_earning_rule_with_http_info(campaign_id, earning_rule_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.delete_earning_rule ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.delete_earning_rule"
+ end
+ # verify the required parameter 'earning_rule_id' is set
+ if @api_client.config.client_side_validation && earning_rule_id.nil?
+ fail ArgumentError, "Missing the required parameter 'earning_rule_id' when calling LoyaltiesApi.delete_earning_rule"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/earning-rules/{earningRuleId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'earningRuleId' + '}', CGI.escape(earning_rule_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.delete_earning_rule",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#delete_earning_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Loyalty Campaign
+ # This method permanently deletes a loyalty campaign and all related loyalty cards. This action cannot be undone. Also, it immediately removes any redemptions on loyalty cards.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :force If this flag is set to true, the campaign and related vouchers will be removed permanently. Going forward, the user will be able to create the next campaign with the same name.
+ # @return [LoyaltiesDeleteResponseBody]
+ def delete_loyalty_program(campaign_id, opts = {})
+ data, _status_code, _headers = delete_loyalty_program_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # Delete Loyalty Campaign
+ # This method permanently deletes a loyalty campaign and all related loyalty cards. This action cannot be undone. Also, it immediately removes any redemptions on loyalty cards.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :force If this flag is set to true, the campaign and related vouchers will be removed permanently. Going forward, the user will be able to create the next campaign with the same name.
+ # @return [Array<(LoyaltiesDeleteResponseBody, Integer, Hash)>] LoyaltiesDeleteResponseBody data, response status code and response headers
+ private def delete_loyalty_program_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.delete_loyalty_program ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.delete_loyalty_program"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesDeleteResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.delete_loyalty_program",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#delete_loyalty_program\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Reward Assignment
+ # This method deletes a reward assignment for a particular loyalty campaign.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param assignment_id [String] A unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_reward_assignment1(campaign_id, assignment_id, opts = {})
+ delete_reward_assignment1_with_http_info(campaign_id, assignment_id, opts)
+ nil
+ end
+
+ # Delete Reward Assignment
+ # This method deletes a reward assignment for a particular loyalty campaign.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param assignment_id [String] A unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_reward_assignment1_with_http_info(campaign_id, assignment_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.delete_reward_assignment1 ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.delete_reward_assignment1"
+ end
+ # verify the required parameter 'assignment_id' is set
+ if @api_client.config.client_side_validation && assignment_id.nil?
+ fail ArgumentError, "Missing the required parameter 'assignment_id' when calling LoyaltiesApi.delete_reward_assignment1"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/rewards/{assignmentId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'assignmentId' + '}', CGI.escape(assignment_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.delete_reward_assignment1",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#delete_reward_assignment1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Disable Earning Rule
+ # Disable an earning rule.
+ # @param campaign_id [String] Unique campaign ID or name.
+ # @param earning_rule_id [String] Unique earning rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [LoyaltiesEarningRulesDisableResponseBody]
+ def disable_earning_rule(campaign_id, earning_rule_id, opts = {})
+ data, _status_code, _headers = disable_earning_rule_with_http_info(campaign_id, earning_rule_id, opts)
+ data
+ end
+
+ # Disable Earning Rule
+ # Disable an earning rule.
+ # @param campaign_id [String] Unique campaign ID or name.
+ # @param earning_rule_id [String] Unique earning rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(LoyaltiesEarningRulesDisableResponseBody, Integer, Hash)>] LoyaltiesEarningRulesDisableResponseBody data, response status code and response headers
+ private def disable_earning_rule_with_http_info(campaign_id, earning_rule_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.disable_earning_rule ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.disable_earning_rule"
+ end
+ # verify the required parameter 'earning_rule_id' is set
+ if @api_client.config.client_side_validation && earning_rule_id.nil?
+ fail ArgumentError, "Missing the required parameter 'earning_rule_id' when calling LoyaltiesApi.disable_earning_rule"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/disable'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'earningRuleId' + '}', CGI.escape(earning_rule_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesEarningRulesDisableResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.disable_earning_rule",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#disable_earning_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Enable Earning Rule
+ # Enable an earning rule.
+ # @param campaign_id [String] Unique campaign ID or name.
+ # @param earning_rule_id [String] Unique earning rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [LoyaltiesEarningRulesEnableResponseBody]
+ def enable_earning_rule(campaign_id, earning_rule_id, opts = {})
+ data, _status_code, _headers = enable_earning_rule_with_http_info(campaign_id, earning_rule_id, opts)
+ data
+ end
+
+ # Enable Earning Rule
+ # Enable an earning rule.
+ # @param campaign_id [String] Unique campaign ID or name.
+ # @param earning_rule_id [String] Unique earning rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(LoyaltiesEarningRulesEnableResponseBody, Integer, Hash)>] LoyaltiesEarningRulesEnableResponseBody data, response status code and response headers
+ private def enable_earning_rule_with_http_info(campaign_id, earning_rule_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.enable_earning_rule ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.enable_earning_rule"
+ end
+ # verify the required parameter 'earning_rule_id' is set
+ if @api_client.config.client_side_validation && earning_rule_id.nil?
+ fail ArgumentError, "Missing the required parameter 'earning_rule_id' when calling LoyaltiesApi.enable_earning_rule"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/earning-rules/{earningRuleId}/enable'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'earningRuleId' + '}', CGI.escape(earning_rule_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesEarningRulesEnableResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.enable_earning_rule",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#enable_earning_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Export Loyalty Card Transactions
+ # Export transactions that are associated with point movements on a loyalty card.
+ # @param member_id [String] A unique code identifying the loyalty card that you are looking to export transaction data for.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersTransactionsExportCreateRequestBody] :loyalties_members_transactions_export_create_request_body Specify the parameters and filters for the transaction export.
+ # @return [LoyaltiesMembersTransactionsExportCreateResponseBody]
+ def export_loyalty_card_transactions(member_id, opts = {})
+ data, _status_code, _headers = export_loyalty_card_transactions_with_http_info(member_id, opts)
+ data
+ end
+
+ # Export Loyalty Card Transactions
+ # Export transactions that are associated with point movements on a loyalty card.
+ # @param member_id [String] A unique code identifying the loyalty card that you are looking to export transaction data for.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersTransactionsExportCreateRequestBody] :loyalties_members_transactions_export_create_request_body Specify the parameters and filters for the transaction export.
+ # @return [Array<(LoyaltiesMembersTransactionsExportCreateResponseBody, Integer, Hash)>] LoyaltiesMembersTransactionsExportCreateResponseBody data, response status code and response headers
+ private def export_loyalty_card_transactions_with_http_info(member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.export_loyalty_card_transactions ...'
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.export_loyalty_card_transactions"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/members/{memberId}/transactions/export'.sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'loyalties_members_transactions_export_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersTransactionsExportCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.export_loyalty_card_transactions",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#export_loyalty_card_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Export Loyalty Card Transactions
+ # Export transactions that are associated with point movements on a loyalty card.
+ # @param campaign_id [String] A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to export.
+ # @param member_id [String] A unique code identifying the loyalty card that you are looking to export transaction data for.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersTransactionsExportCreateRequestBody] :loyalties_members_transactions_export_create_request_body Specify the parameters and filters for the transaction export.
+ # @return [LoyaltiesMembersTransactionsExportCreateResponseBody]
+ def export_loyalty_card_transactions1(campaign_id, member_id, opts = {})
+ data, _status_code, _headers = export_loyalty_card_transactions1_with_http_info(campaign_id, member_id, opts)
+ data
+ end
+
+ # Export Loyalty Card Transactions
+ # Export transactions that are associated with point movements on a loyalty card.
+ # @param campaign_id [String] A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to export.
+ # @param member_id [String] A unique code identifying the loyalty card that you are looking to export transaction data for.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersTransactionsExportCreateRequestBody] :loyalties_members_transactions_export_create_request_body Specify the parameters and filters for the transaction export.
+ # @return [Array<(LoyaltiesMembersTransactionsExportCreateResponseBody, Integer, Hash)>] LoyaltiesMembersTransactionsExportCreateResponseBody data, response status code and response headers
+ private def export_loyalty_card_transactions1_with_http_info(campaign_id, member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.export_loyalty_card_transactions1 ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.export_loyalty_card_transactions1"
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.export_loyalty_card_transactions1"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/members/{memberId}/transactions/export'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'loyalties_members_transactions_export_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersTransactionsExportCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.export_loyalty_card_transactions1",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#export_loyalty_card_transactions1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Earning Rule
+ # Retrieves an earning rule assigned to a campaign.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param earning_rule_id [String] A unique earning rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [LoyaltiesEarningRulesGetResponseBody]
+ def get_earning_rule(campaign_id, earning_rule_id, opts = {})
+ data, _status_code, _headers = get_earning_rule_with_http_info(campaign_id, earning_rule_id, opts)
+ data
+ end
+
+ # Get Earning Rule
+ # Retrieves an earning rule assigned to a campaign.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param earning_rule_id [String] A unique earning rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(LoyaltiesEarningRulesGetResponseBody, Integer, Hash)>] LoyaltiesEarningRulesGetResponseBody data, response status code and response headers
+ private def get_earning_rule_with_http_info(campaign_id, earning_rule_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.get_earning_rule ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.get_earning_rule"
+ end
+ # verify the required parameter 'earning_rule_id' is set
+ if @api_client.config.client_side_validation && earning_rule_id.nil?
+ fail ArgumentError, "Missing the required parameter 'earning_rule_id' when calling LoyaltiesApi.get_earning_rule"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/earning-rules/{earningRuleId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'earningRuleId' + '}', CGI.escape(earning_rule_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesEarningRulesGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.get_earning_rule",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#get_earning_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Loyalty Tier
+ # Retrieve a loyalty tier from a loyalty campaign by the loyalty tier ID.
+ # @param campaign_id [String] Unique loyalty campaign ID or name.
+ # @param loyalty_tier_id [String] Unique loyalty tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [LoyaltiesTiersGetResponseBody]
+ def get_loyalty_tier(campaign_id, loyalty_tier_id, opts = {})
+ data, _status_code, _headers = get_loyalty_tier_with_http_info(campaign_id, loyalty_tier_id, opts)
+ data
+ end
+
+ # Get Loyalty Tier
+ # Retrieve a loyalty tier from a loyalty campaign by the loyalty tier ID.
+ # @param campaign_id [String] Unique loyalty campaign ID or name.
+ # @param loyalty_tier_id [String] Unique loyalty tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(LoyaltiesTiersGetResponseBody, Integer, Hash)>] LoyaltiesTiersGetResponseBody data, response status code and response headers
+ private def get_loyalty_tier_with_http_info(campaign_id, loyalty_tier_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.get_loyalty_tier ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.get_loyalty_tier"
+ end
+ # verify the required parameter 'loyalty_tier_id' is set
+ if @api_client.config.client_side_validation && loyalty_tier_id.nil?
+ fail ArgumentError, "Missing the required parameter 'loyalty_tier_id' when calling LoyaltiesApi.get_loyalty_tier"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/tiers/{loyaltyTierId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'loyaltyTierId' + '}', CGI.escape(loyalty_tier_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesTiersGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.get_loyalty_tier",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#get_loyalty_tier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Reward Assignment
+ # Retrieve specific reward assignment.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param assignment_id [String] Unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [LoyaltiesRewardAssignmentsGetResponseBody]
+ def get_reward_assignment1(campaign_id, assignment_id, opts = {})
+ data, _status_code, _headers = get_reward_assignment1_with_http_info(campaign_id, assignment_id, opts)
+ data
+ end
+
+ # Get Reward Assignment
+ # Retrieve specific reward assignment.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param assignment_id [String] Unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(LoyaltiesRewardAssignmentsGetResponseBody, Integer, Hash)>] LoyaltiesRewardAssignmentsGetResponseBody data, response status code and response headers
+ private def get_reward_assignment1_with_http_info(campaign_id, assignment_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.get_reward_assignment1 ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.get_reward_assignment1"
+ end
+ # verify the required parameter 'assignment_id' is set
+ if @api_client.config.client_side_validation && assignment_id.nil?
+ fail ArgumentError, "Missing the required parameter 'assignment_id' when calling LoyaltiesApi.get_reward_assignment1"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/reward-assignments/{assignmentId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'assignmentId' + '}', CGI.escape(assignment_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesRewardAssignmentsGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.get_reward_assignment1",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#get_reward_assignment1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Reward Assignment
+ # Retrieve specific reward assignment. 📘 Alternative endpoint This endpoint is an alternative to this endpoint.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param assignment_id [String] A unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [LoyaltiesRewardsGetResponseBody]
+ def get_reward_assignment2(campaign_id, assignment_id, opts = {})
+ data, _status_code, _headers = get_reward_assignment2_with_http_info(campaign_id, assignment_id, opts)
+ data
+ end
+
+ # Get Reward Assignment
+ # Retrieve specific reward assignment. 📘 Alternative endpoint This endpoint is an alternative to this endpoint.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param assignment_id [String] A unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(LoyaltiesRewardsGetResponseBody, Integer, Hash)>] LoyaltiesRewardsGetResponseBody data, response status code and response headers
+ private def get_reward_assignment2_with_http_info(campaign_id, assignment_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.get_reward_assignment2 ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.get_reward_assignment2"
+ end
+ # verify the required parameter 'assignment_id' is set
+ if @api_client.config.client_side_validation && assignment_id.nil?
+ fail ArgumentError, "Missing the required parameter 'assignment_id' when calling LoyaltiesApi.get_reward_assignment2"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/rewards/{assignmentId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'assignmentId' + '}', CGI.escape(assignment_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesRewardsGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.get_reward_assignment2",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#get_reward_assignment2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Reward Details
+ # Get reward details in the context of a loyalty campaign and reward assignment ID.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param assignment_id [String] Unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [LoyaltiesRewardAssignmentsRewardGetResponseBody]
+ def get_reward_details(campaign_id, assignment_id, opts = {})
+ data, _status_code, _headers = get_reward_details_with_http_info(campaign_id, assignment_id, opts)
+ data
+ end
+
+ # Get Reward Details
+ # Get reward details in the context of a loyalty campaign and reward assignment ID.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param assignment_id [String] Unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(LoyaltiesRewardAssignmentsRewardGetResponseBody, Integer, Hash)>] LoyaltiesRewardAssignmentsRewardGetResponseBody data, response status code and response headers
+ private def get_reward_details_with_http_info(campaign_id, assignment_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.get_reward_details ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.get_reward_details"
+ end
+ # verify the required parameter 'assignment_id' is set
+ if @api_client.config.client_side_validation && assignment_id.nil?
+ fail ArgumentError, "Missing the required parameter 'assignment_id' when calling LoyaltiesApi.get_reward_details"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/reward-assignments/{assignmentId}/reward'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'assignmentId' + '}', CGI.escape(assignment_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesRewardAssignmentsRewardGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.get_reward_details",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#get_reward_details\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Loyalty Card Transactions
+ # Retrieve transaction data related to point movements for a specific loyalty card.
+ # @param member_id [String] A unique code identifying the loyalty card that you are looking to retrieve transaction data for.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [LoyaltiesMembersTransactionsListResponseBody]
+ def list_loyalty_card_transactions(member_id, opts = {})
+ data, _status_code, _headers = list_loyalty_card_transactions_with_http_info(member_id, opts)
+ data
+ end
+
+ # List Loyalty Card Transactions
+ # Retrieve transaction data related to point movements for a specific loyalty card.
+ # @param member_id [String] A unique code identifying the loyalty card that you are looking to retrieve transaction data for.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [Array<(LoyaltiesMembersTransactionsListResponseBody, Integer, Hash)>] LoyaltiesMembersTransactionsListResponseBody data, response status code and response headers
+ private def list_loyalty_card_transactions_with_http_info(member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.list_loyalty_card_transactions ...'
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.list_loyalty_card_transactions"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LoyaltiesApi.list_loyalty_card_transactions, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LoyaltiesApi.list_loyalty_card_transactions, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling LoyaltiesApi.list_loyalty_card_transactions, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/loyalties/members/{memberId}/transactions'.sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersTransactionsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.list_loyalty_card_transactions",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#list_loyalty_card_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Loyalty Card Transactions
+ # Retrieve transaction data related to point movements for a specific loyalty card.
+ # @param campaign_id [String] A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to return.
+ # @param member_id [String] A unique code identifying the loyalty card that you are looking to retrieve transaction data for.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [LoyaltiesMembersTransactionsListResponseBody]
+ def list_loyalty_card_transactions1(campaign_id, member_id, opts = {})
+ data, _status_code, _headers = list_loyalty_card_transactions1_with_http_info(campaign_id, member_id, opts)
+ data
+ end
+
+ # List Loyalty Card Transactions
+ # Retrieve transaction data related to point movements for a specific loyalty card.
+ # @param campaign_id [String] A unique identifier of the loyalty campaign containing the voucher whose transactions you would like to return.
+ # @param member_id [String] A unique code identifying the loyalty card that you are looking to retrieve transaction data for.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [Array<(LoyaltiesMembersTransactionsListResponseBody, Integer, Hash)>] LoyaltiesMembersTransactionsListResponseBody data, response status code and response headers
+ private def list_loyalty_card_transactions1_with_http_info(campaign_id, member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.list_loyalty_card_transactions1 ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.list_loyalty_card_transactions1"
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.list_loyalty_card_transactions1"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LoyaltiesApi.list_loyalty_card_transactions1, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LoyaltiesApi.list_loyalty_card_transactions1, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling LoyaltiesApi.list_loyalty_card_transactions1, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/members/{memberId}/transactions'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersTransactionsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.list_loyalty_card_transactions1",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#list_loyalty_card_transactions1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Loyalty Tier Earning Rules
+ # Retrieve available earning rules for a given tier and the calculation method for earning points.
+ # @param campaign_id [String] Unique campaign ID or name.
+ # @param loyalty_tier_id [String] Unique loyalty tier ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [LoyaltiesTiersEarningRulesListResponseBody]
+ def list_loyalty_tier_earning_rules(campaign_id, loyalty_tier_id, opts = {})
+ data, _status_code, _headers = list_loyalty_tier_earning_rules_with_http_info(campaign_id, loyalty_tier_id, opts)
+ data
+ end
+
+ # List Loyalty Tier Earning Rules
+ # Retrieve available earning rules for a given tier and the calculation method for earning points.
+ # @param campaign_id [String] Unique campaign ID or name.
+ # @param loyalty_tier_id [String] Unique loyalty tier ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [Array<(LoyaltiesTiersEarningRulesListResponseBody, Integer, Hash)>] LoyaltiesTiersEarningRulesListResponseBody data, response status code and response headers
+ private def list_loyalty_tier_earning_rules_with_http_info(campaign_id, loyalty_tier_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.list_loyalty_tier_earning_rules ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.list_loyalty_tier_earning_rules"
+ end
+ # verify the required parameter 'loyalty_tier_id' is set
+ if @api_client.config.client_side_validation && loyalty_tier_id.nil?
+ fail ArgumentError, "Missing the required parameter 'loyalty_tier_id' when calling LoyaltiesApi.list_loyalty_tier_earning_rules"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LoyaltiesApi.list_loyalty_tier_earning_rules, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LoyaltiesApi.list_loyalty_tier_earning_rules, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling LoyaltiesApi.list_loyalty_tier_earning_rules, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/earning-rules'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'loyaltyTierId' + '}', CGI.escape(loyalty_tier_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesTiersEarningRulesListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.list_loyalty_tier_earning_rules",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#list_loyalty_tier_earning_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Loyalty Tier Rewards
+ # Get available rewards for a given tier.
+ # @param campaign_id [String] Unique campaign ID or name.
+ # @param loyalty_tier_id [String] Unique loyalty tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [LoyaltiesTiersRewardsListResponseBody]
+ def list_loyalty_tier_rewards(campaign_id, loyalty_tier_id, opts = {})
+ data, _status_code, _headers = list_loyalty_tier_rewards_with_http_info(campaign_id, loyalty_tier_id, opts)
+ data
+ end
+
+ # List Loyalty Tier Rewards
+ # Get available rewards for a given tier.
+ # @param campaign_id [String] Unique campaign ID or name.
+ # @param loyalty_tier_id [String] Unique loyalty tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(LoyaltiesTiersRewardsListResponseBody, Integer, Hash)>] LoyaltiesTiersRewardsListResponseBody data, response status code and response headers
+ private def list_loyalty_tier_rewards_with_http_info(campaign_id, loyalty_tier_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.list_loyalty_tier_rewards ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.list_loyalty_tier_rewards"
+ end
+ # verify the required parameter 'loyalty_tier_id' is set
+ if @api_client.config.client_side_validation && loyalty_tier_id.nil?
+ fail ArgumentError, "Missing the required parameter 'loyalty_tier_id' when calling LoyaltiesApi.list_loyalty_tier_rewards"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/tiers/{loyaltyTierId}/rewards'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'loyaltyTierId' + '}', CGI.escape(loyalty_tier_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesTiersRewardsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.list_loyalty_tier_rewards",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#list_loyalty_tier_rewards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Loyalty Tiers
+ # Retrieve a list of loyalty tiers which were added to the loyalty program.
+ # @param campaign_id [String] Unique loyalty campaign ID or name.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [ParameterOrderListLoyaltyTiers] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [LoyaltiesTiersListResponseBody]
+ def list_loyalty_tiers(campaign_id, opts = {})
+ data, _status_code, _headers = list_loyalty_tiers_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # List Loyalty Tiers
+ # Retrieve a list of loyalty tiers which were added to the loyalty program.
+ # @param campaign_id [String] Unique loyalty campaign ID or name.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [ParameterOrderListLoyaltyTiers] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [Array<(LoyaltiesTiersListResponseBody, Integer, Hash)>] LoyaltiesTiersListResponseBody data, response status code and response headers
+ private def list_loyalty_tiers_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.list_loyalty_tiers ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.list_loyalty_tiers"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LoyaltiesApi.list_loyalty_tiers, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LoyaltiesApi.list_loyalty_tiers, must be greater than or equal to 1.'
+ end
+
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/tiers'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesTiersListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.list_loyalty_tiers",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#list_loyalty_tiers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Member's Loyalty Tiers
+ # Retrieve member tiers using the loyalty card ID.
+ # @param member_id [String] Unique loyalty card assigned to a particular customer.
+ # @param [Hash] opts the optional parameters
+ # @return [LoyaltiesMembersTiersListResponseBody]
+ def list_member_loyalty_tier(member_id, opts = {})
+ data, _status_code, _headers = list_member_loyalty_tier_with_http_info(member_id, opts)
+ data
+ end
+
+ # List Member's Loyalty Tiers
+ # Retrieve member tiers using the loyalty card ID.
+ # @param member_id [String] Unique loyalty card assigned to a particular customer.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(LoyaltiesMembersTiersListResponseBody, Integer, Hash)>] LoyaltiesMembersTiersListResponseBody data, response status code and response headers
+ private def list_member_loyalty_tier_with_http_info(member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.list_member_loyalty_tier ...'
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.list_member_loyalty_tier"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/members/{memberId}/tiers'.sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersTiersListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.list_member_loyalty_tier",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#list_member_loyalty_tier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Member Rewards
+ # Retrieves the list of rewards that the given customer (identified by member_id, which is a loyalty card assigned to a particular customer) **can get in exchange for loyalty points**. You can use the affordable_only parameter to limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Please note that rewards that are disabled (i.e. set to Not Available in the Dashboard) for a given loyalty tier reward mapping will not be returned in this endpoint.
+ # @param member_id [String] Unique loyalty card assigned to a particular customer.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :affordable_only Limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Set this flag to true to return rewards which the customer can actually afford.
+ # @return [LoyaltiesMembersRewardsListResponseBody]
+ def list_member_rewards(member_id, opts = {})
+ data, _status_code, _headers = list_member_rewards_with_http_info(member_id, opts)
+ data
+ end
+
+ # List Member Rewards
+ # Retrieves the list of rewards that the given customer (identified by member_id, which is a loyalty card assigned to a particular customer) **can get in exchange for loyalty points**. You can use the affordable_only parameter to limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Please note that rewards that are disabled (i.e. set to Not Available in the Dashboard) for a given loyalty tier reward mapping will not be returned in this endpoint.
+ # @param member_id [String] Unique loyalty card assigned to a particular customer.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :affordable_only Limit the results to rewards that the customer can actually afford (only rewards whose price in points is not higher than the loyalty points balance on a loyalty card). Set this flag to true to return rewards which the customer can actually afford.
+ # @return [Array<(LoyaltiesMembersRewardsListResponseBody, Integer, Hash)>] LoyaltiesMembersRewardsListResponseBody data, response status code and response headers
+ private def list_member_rewards_with_http_info(member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.list_member_rewards ...'
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.list_member_rewards"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/members/{memberId}/rewards'.sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'affordable_only'] = opts[:'affordable_only'] if !opts[:'affordable_only'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersRewardsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.list_member_rewards",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#list_member_rewards\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Points Expiration
+ # Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param member_id [String] Loyalty card code.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [LoyaltiesMembersPointsExpirationListResponseBody]
+ def list_points_expiration(campaign_id, member_id, opts = {})
+ data, _status_code, _headers = list_points_expiration_with_http_info(campaign_id, member_id, opts)
+ data
+ end
+
+ # Get Points Expiration
+ # Retrieve loyalty point expiration buckets for a given loyalty card. Expired point buckets are not returned in this endpoint. You can use the Exports API to retrieve a list of both ACTIVE and EXPIRED point buckets.
+ # @param campaign_id [String] The campaign ID or name of the loyalty campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty%20Campaign.
+ # @param member_id [String] Loyalty card code.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [Array<(LoyaltiesMembersPointsExpirationListResponseBody, Integer, Hash)>] LoyaltiesMembersPointsExpirationListResponseBody data, response status code and response headers
+ private def list_points_expiration_with_http_info(campaign_id, member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.list_points_expiration ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.list_points_expiration"
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.list_points_expiration"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LoyaltiesApi.list_points_expiration, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling LoyaltiesApi.list_points_expiration, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling LoyaltiesApi.list_points_expiration, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/members/{memberId}/points-expiration'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersPointsExpirationListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.list_points_expiration",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#list_points_expiration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Redeem Reward
+ # 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to allow you to redeem a reward without having to provide the campaignId as a path parameter.
+ # @param member_id [String] Unique loyalty card assigned to a particular customer.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersRedemptionRedeemRequestBody] :loyalties_members_redemption_redeem_request_body Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order.
+ # @return [LoyaltiesMembersRedemptionRedeemResponseBody]
+ def redeem_reward(member_id, opts = {})
+ data, _status_code, _headers = redeem_reward_with_http_info(member_id, opts)
+ data
+ end
+
+ # Redeem Reward
+ # 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to allow you to redeem a reward without having to provide the campaignId as a path parameter.
+ # @param member_id [String] Unique loyalty card assigned to a particular customer.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersRedemptionRedeemRequestBody] :loyalties_members_redemption_redeem_request_body Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order.
+ # @return [Array<(LoyaltiesMembersRedemptionRedeemResponseBody, Integer, Hash)>] LoyaltiesMembersRedemptionRedeemResponseBody data, response status code and response headers
+ private def redeem_reward_with_http_info(member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.redeem_reward ...'
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.redeem_reward"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/members/{memberId}/redemption'.sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'loyalties_members_redemption_redeem_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersRedemptionRedeemResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.redeem_reward",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#redeem_reward\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Redeem Reward
+ # Exchange points from a loyalty card for a specified reward. This API method returns an assigned award in the response. It means that if a requesting customer gets a coupon code with a discount for the next order, that discount code will be visible in response as part of the reward object definition.
+ # @param campaign_id [String] Unique campaign ID.
+ # @param member_id [String] A code that identifies the loyalty card.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersRedemptionRedeemRequestBody] :loyalties_members_redemption_redeem_request_body Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order.
+ # @return [LoyaltiesMembersRedemptionRedeemResponseBody]
+ def redeem_reward1(campaign_id, member_id, opts = {})
+ data, _status_code, _headers = redeem_reward1_with_http_info(campaign_id, member_id, opts)
+ data
+ end
+
+ # Redeem Reward
+ # Exchange points from a loyalty card for a specified reward. This API method returns an assigned award in the response. It means that if a requesting customer gets a coupon code with a discount for the next order, that discount code will be visible in response as part of the reward object definition.
+ # @param campaign_id [String] Unique campaign ID.
+ # @param member_id [String] A code that identifies the loyalty card.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersRedemptionRedeemRequestBody] :loyalties_members_redemption_redeem_request_body Specify the reward to be redeemed. In case of a pay with points reward, specify the order and the number of points to be applied to the order. Please note that if you do not specify the amount of points, the application will default to applying the number of points to pay for the remainder of the order. If the limit of available points on the card is reached, then only the available points on the card will be applied to the order.
+ # @return [Array<(LoyaltiesMembersRedemptionRedeemResponseBody, Integer, Hash)>] LoyaltiesMembersRedemptionRedeemResponseBody data, response status code and response headers
+ private def redeem_reward1_with_http_info(campaign_id, member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.redeem_reward1 ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.redeem_reward1"
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.redeem_reward1"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/members/{memberId}/redemption'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'loyalties_members_redemption_redeem_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersRedemptionRedeemResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.redeem_reward1",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#redeem_reward1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Transfer Loyalty Points
+ # Transfer points between different loyalty cards. You need to provide the campaign ID and the loyalty card ID you want the points to be transferred to as path parameters in the URL. In the request body, you provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.
+ # @param campaign_id [String] A unique identifier of the loyalty campaign containing the voucher to which the loyalty points will be sent (destination).
+ # @param member_id [String] A unique code identifying the loyalty card to which the user wants to transfer loyalty points (destination).
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :loyalties_transfer_points Provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.
+ # @return [LoyaltiesMembersTransfersCreateResponseBody]
+ def transfer_points(campaign_id, member_id, opts = {})
+ data, _status_code, _headers = transfer_points_with_http_info(campaign_id, member_id, opts)
+ data
+ end
+
+ # Transfer Loyalty Points
+ # Transfer points between different loyalty cards. You need to provide the campaign ID and the loyalty card ID you want the points to be transferred to as path parameters in the URL. In the request body, you provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.
+ # @param campaign_id [String] A unique identifier of the loyalty campaign containing the voucher to which the loyalty points will be sent (destination).
+ # @param member_id [String] A unique code identifying the loyalty card to which the user wants to transfer loyalty points (destination).
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :loyalties_transfer_points Provide the loyalty cards you want the points to be transferred from and the number of points to transfer from each card.
+ # @return [Array<(LoyaltiesMembersTransfersCreateResponseBody, Integer, Hash)>] LoyaltiesMembersTransfersCreateResponseBody data, response status code and response headers
+ private def transfer_points_with_http_info(campaign_id, member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.transfer_points ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.transfer_points"
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.transfer_points"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/members/{memberId}/transfers'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'loyalties_transfer_points'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersTransfersCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.transfer_points",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#transfer_points\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Add or Remove Loyalty Card Balance
+ # This method gives adds or removes balance to an existing loyalty card. The removal of points will consume the points that expire the soonest. 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to allow you to add or remove loyalty card balance without having to provide the campaignId as a path parameter.
+ # @param member_id [String] Unique loyalty card assigned to a particular customer.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersBalanceUpdateRequestBody] :loyalties_members_balance_update_request_body Specify the point adjustment along with the expiration mechanism.
+ # @return [LoyaltiesMembersBalanceUpdateResponseBody]
+ def update_loyalty_card_balance(member_id, opts = {})
+ data, _status_code, _headers = update_loyalty_card_balance_with_http_info(member_id, opts)
+ data
+ end
+
+ # Add or Remove Loyalty Card Balance
+ # This method gives adds or removes balance to an existing loyalty card. The removal of points will consume the points that expire the soonest. 📘 Alternative endpoint This endpoint is an alternative to this endpoint. The URL was re-designed to allow you to add or remove loyalty card balance without having to provide the campaignId as a path parameter.
+ # @param member_id [String] Unique loyalty card assigned to a particular customer.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersBalanceUpdateRequestBody] :loyalties_members_balance_update_request_body Specify the point adjustment along with the expiration mechanism.
+ # @return [Array<(LoyaltiesMembersBalanceUpdateResponseBody, Integer, Hash)>] LoyaltiesMembersBalanceUpdateResponseBody data, response status code and response headers
+ private def update_loyalty_card_balance_with_http_info(member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.update_loyalty_card_balance ...'
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.update_loyalty_card_balance"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/members/{memberId}/balance'.sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'loyalties_members_balance_update_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersBalanceUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.update_loyalty_card_balance",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#update_loyalty_card_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Add or Remove Loyalty Card Balance
+ # This method adds or removes balance to an existing loyalty card. The removal of points will consume the points that expire the soonest.
+ # @param campaign_id [String] Unique campaign ID.
+ # @param member_id [String] A code that identifies the loyalty card.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersBalanceUpdateRequestBody] :loyalties_members_balance_update_request_body Specify the point adjustment along with the expiration mechanism.
+ # @return [LoyaltiesMembersBalanceUpdateResponseBody]
+ def update_loyalty_card_balance1(campaign_id, member_id, opts = {})
+ data, _status_code, _headers = update_loyalty_card_balance1_with_http_info(campaign_id, member_id, opts)
+ data
+ end
+
+ # Add or Remove Loyalty Card Balance
+ # This method adds or removes balance to an existing loyalty card. The removal of points will consume the points that expire the soonest.
+ # @param campaign_id [String] Unique campaign ID.
+ # @param member_id [String] A code that identifies the loyalty card.
+ # @param [Hash] opts the optional parameters
+ # @option opts [LoyaltiesMembersBalanceUpdateRequestBody] :loyalties_members_balance_update_request_body Specify the point adjustment along with the expiration mechanism.
+ # @return [Array<(LoyaltiesMembersBalanceUpdateResponseBody, Integer, Hash)>] LoyaltiesMembersBalanceUpdateResponseBody data, response status code and response headers
+ private def update_loyalty_card_balance1_with_http_info(campaign_id, member_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: LoyaltiesApi.update_loyalty_card_balance1 ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling LoyaltiesApi.update_loyalty_card_balance1"
+ end
+ # verify the required parameter 'member_id' is set
+ if @api_client.config.client_side_validation && member_id.nil?
+ fail ArgumentError, "Missing the required parameter 'member_id' when calling LoyaltiesApi.update_loyalty_card_balance1"
+ end
+ # resource path
+ local_var_path = '/v1/loyalties/{campaignId}/members/{memberId}/balance'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'memberId' + '}', CGI.escape(member_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'loyalties_members_balance_update_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'LoyaltiesMembersBalanceUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"LoyaltiesApi.update_loyalty_card_balance1",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: LoyaltiesApi#update_loyalty_card_balance1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/orders_api.rb b/lib/VoucherifySdk/api/orders_api.rb
new file mode 100644
index 00000000..815c4249
--- /dev/null
+++ b/lib/VoucherifySdk/api/orders_api.rb
@@ -0,0 +1,425 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class OrdersApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create Order
+ # Creates an order object and triggers an order creation event. 📘 Upsert Mode If you pass an id or a source_id that already exists in the order database, Voucherify will return a related order object with updated fields.
+ # @param [Hash] opts the optional parameters
+ # @option opts [OrdersCreateRequestBody] :orders_create_request_body Specify the order parameters.
+ # @return [OrdersCreateResponseBody]
+ def create_order(opts = {})
+ data, _status_code, _headers = create_order_with_http_info(opts)
+ data
+ end
+
+ # Create Order
+ # Creates an order object and triggers an order creation event. 📘 Upsert Mode If you pass an id or a source_id that already exists in the order database, Voucherify will return a related order object with updated fields.
+ # @param [Hash] opts the optional parameters
+ # @option opts [OrdersCreateRequestBody] :orders_create_request_body Specify the order parameters.
+ # @return [Array<(OrdersCreateResponseBody, Integer, Hash)>] OrdersCreateResponseBody data, response status code and response headers
+ private def create_order_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrdersApi.create_order ...'
+ end
+ # resource path
+ local_var_path = '/v1/orders'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'orders_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrdersCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"OrdersApi.create_order",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrdersApi#create_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Create Orders Export
+ # Creates a downloadable CSV file containing a list of orders. The parameters listed in the payload resembles headers in the CSV file. To include a parameter to the file, add it to the parameters.fields object in the request body. The available filters are all order object attributes. Additionally, any metadata defined in the metadata schema can be exported. Passing an empty JSON will generate a file containing three default fields: id, source_id, and status. The fields array is an array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:
+ # @param [Hash] opts the optional parameters
+ # @option opts [OrdersExportCreateRequestBody] :orders_export_create_request_body Specify which order parameters you would like to export.
+ # @return [OrdersExportCreateResponseBody]
+ def create_order_export(opts = {})
+ data, _status_code, _headers = create_order_export_with_http_info(opts)
+ data
+ end
+
+ # Create Orders Export
+ # Creates a downloadable CSV file containing a list of orders. The parameters listed in the payload resembles headers in the CSV file. To include a parameter to the file, add it to the parameters.fields object in the request body. The available filters are all order object attributes. Additionally, any metadata defined in the metadata schema can be exported. Passing an empty JSON will generate a file containing three default fields: id, source_id, and status. The fields array is an array of strings containing the data in the export. These fields define the headers in the CSV file. The array can be a combination of any of the following available fields:
+ # @param [Hash] opts the optional parameters
+ # @option opts [OrdersExportCreateRequestBody] :orders_export_create_request_body Specify which order parameters you would like to export.
+ # @return [Array<(OrdersExportCreateResponseBody, Integer, Hash)>] OrdersExportCreateResponseBody data, response status code and response headers
+ private def create_order_export_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrdersApi.create_order_export ...'
+ end
+ # resource path
+ local_var_path = '/v1/orders/export'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'orders_export_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrdersExportCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"OrdersApi.create_order_export",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrdersApi#create_order_export\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Order
+ # Retrieve an order.
+ # @param order_id [String] Unique Voucherify order ID or order source ID.
+ # @param [Hash] opts the optional parameters
+ # @return [OrdersGetResponseBody]
+ def get_order(order_id, opts = {})
+ data, _status_code, _headers = get_order_with_http_info(order_id, opts)
+ data
+ end
+
+ # Get Order
+ # Retrieve an order.
+ # @param order_id [String] Unique Voucherify order ID or order source ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(OrdersGetResponseBody, Integer, Hash)>] OrdersGetResponseBody data, response status code and response headers
+ private def get_order_with_http_info(order_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrdersApi.get_order ...'
+ end
+ # verify the required parameter 'order_id' is set
+ if @api_client.config.client_side_validation && order_id.nil?
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersApi.get_order"
+ end
+ # resource path
+ local_var_path = '/v1/orders/{orderId}'.sub('{' + 'orderId' + '}', CGI.escape(order_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrdersGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"OrdersApi.get_order",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrdersApi#get_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Import Orders
+ # 🚧 Historical orders This endpoint should only be used to import historical orders into Voucherify. For on-going synchronization, the create order and update order endpoints should be used. This is critical because this endpoint does not store events or launch distributions. # Limitations ## Import volume There can be only a single on-going order import per tenant per project at a given time. The user can schedule more imports but those extra imports will be scheduled to run in sequence one by one. ## Maximum count of orders in single import There is a 2000 limit but we might decide to change it to a lower / higher value at any given time depending if we find this value is too high or too low with time. # Notifications There are no notifications on the Dashboard because this import is launched via the API. # Triggered actions If you import orders with customers, then a logic will be scheduled responsible for placing these customers into segments and refreshing the segments summary. Consequently, this update will trigger - **customers entering into segments** - **distributions** based on any rules tied to customer entering segment(s) - **earning rules** based on the customer entering segment(s) # What is not triggered 1. No webhooks are triggered during the import of orders - for both orders and upserted products / skus. 2. Distributions based on Order Update, Order Paid, Order Created and Order Cancelled. In other words if you have a distribution based on Order Paid and you import an order with a PAID status, the distribution is not going to be triggered. 3. No events are created during the import of orders - for both orders and upserted products / skus. In other words you wont see any events in the Activity tab in the Dashboard such as Order created or Order paid. If you are additionally upserting products / skus, then you wont see the Product created events listed, etc. 4. Earning rules based on Order Paid wont be triggered. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :orders_import_create_request_body_item The request body is sent in the form of an array of order objects.
+ # @return [OrdersImportCreateResponseBody]
+ def import_orders(opts = {})
+ data, _status_code, _headers = import_orders_with_http_info(opts)
+ data
+ end
+
+ # Import Orders
+ # 🚧 Historical orders This endpoint should only be used to import historical orders into Voucherify. For on-going synchronization, the create order and update order endpoints should be used. This is critical because this endpoint does not store events or launch distributions. # Limitations ## Import volume There can be only a single on-going order import per tenant per project at a given time. The user can schedule more imports but those extra imports will be scheduled to run in sequence one by one. ## Maximum count of orders in single import There is a 2000 limit but we might decide to change it to a lower / higher value at any given time depending if we find this value is too high or too low with time. # Notifications There are no notifications on the Dashboard because this import is launched via the API. # Triggered actions If you import orders with customers, then a logic will be scheduled responsible for placing these customers into segments and refreshing the segments summary. Consequently, this update will trigger - **customers entering into segments** - **distributions** based on any rules tied to customer entering segment(s) - **earning rules** based on the customer entering segment(s) # What is not triggered 1. No webhooks are triggered during the import of orders - for both orders and upserted products / skus. 2. Distributions based on Order Update, Order Paid, Order Created and Order Cancelled. In other words if you have a distribution based on Order Paid and you import an order with a PAID status, the distribution is not going to be triggered. 3. No events are created during the import of orders - for both orders and upserted products / skus. In other words you wont see any events in the Activity tab in the Dashboard such as Order created or Order paid. If you are additionally upserting products / skus, then you wont see the Product created events listed, etc. 4. Earning rules based on Order Paid wont be triggered. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :orders_import_create_request_body_item The request body is sent in the form of an array of order objects.
+ # @return [Array<(OrdersImportCreateResponseBody, Integer, Hash)>] OrdersImportCreateResponseBody data, response status code and response headers
+ private def import_orders_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrdersApi.import_orders ...'
+ end
+ # resource path
+ local_var_path = '/v1/orders/import'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'orders_import_create_request_body_item'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrdersImportCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"OrdersApi.import_orders",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrdersApi#import_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Orders
+ # Returns a list of orders.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListOrders] :order This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [OrdersListResponseBody]
+ def list_orders(opts = {})
+ data, _status_code, _headers = list_orders_with_http_info(opts)
+ data
+ end
+
+ # List Orders
+ # Returns a list of orders.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListOrders] :order This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [Array<(OrdersListResponseBody, Integer, Hash)>] OrdersListResponseBody data, response status code and response headers
+ private def list_orders_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrdersApi.list_orders ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrdersApi.list_orders, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling OrdersApi.list_orders, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling OrdersApi.list_orders, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/orders'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrdersListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"OrdersApi.list_orders",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrdersApi#list_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Order
+ # Updates the specified order by setting the values of the parameters passed in the request body. Any parameters not provided will be left unchanged.
+ # @param order_id [String] Unique Voucherify order ID or order source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [OrdersUpdateRequestBody] :orders_update_request_body Specify the parameters of the order that are to be updated.
+ # @return [OrdersUpdateResponseBody]
+ def update_order(order_id, opts = {})
+ data, _status_code, _headers = update_order_with_http_info(order_id, opts)
+ data
+ end
+
+ # Update Order
+ # Updates the specified order by setting the values of the parameters passed in the request body. Any parameters not provided will be left unchanged.
+ # @param order_id [String] Unique Voucherify order ID or order source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [OrdersUpdateRequestBody] :orders_update_request_body Specify the parameters of the order that are to be updated.
+ # @return [Array<(OrdersUpdateResponseBody, Integer, Hash)>] OrdersUpdateResponseBody data, response status code and response headers
+ private def update_order_with_http_info(order_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: OrdersApi.update_order ...'
+ end
+ # verify the required parameter 'order_id' is set
+ if @api_client.config.client_side_validation && order_id.nil?
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrdersApi.update_order"
+ end
+ # resource path
+ local_var_path = '/v1/orders/{orderId}'.sub('{' + 'orderId' + '}', CGI.escape(order_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'orders_update_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'OrdersUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"OrdersApi.update_order",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: OrdersApi#update_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/product_collections_api.rb b/lib/VoucherifySdk/api/product_collections_api.rb
new file mode 100644
index 00000000..cb0ba190
--- /dev/null
+++ b/lib/VoucherifySdk/api/product_collections_api.rb
@@ -0,0 +1,375 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class ProductCollectionsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create Product Collection
+ # This method creates a new product collection.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductCollectionsCreateRequestBody] :product_collections_create_request_body
+ # @return [ProductCollectionsCreateResponseBody]
+ def create_product_collection(opts = {})
+ data, _status_code, _headers = create_product_collection_with_http_info(opts)
+ data
+ end
+
+ # Create Product Collection
+ # This method creates a new product collection.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductCollectionsCreateRequestBody] :product_collections_create_request_body
+ # @return [Array<(ProductCollectionsCreateResponseBody, Integer, Hash)>] ProductCollectionsCreateResponseBody data, response status code and response headers
+ private def create_product_collection_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductCollectionsApi.create_product_collection ...'
+ end
+ # resource path
+ local_var_path = '/v1/product-collections'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'product_collections_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductCollectionsCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductCollectionsApi.create_product_collection",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductCollectionsApi#create_product_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Product Collection
+ # This method deletes a product collection.
+ # @param product_collection_id [String] A unique product collection ID.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_product_collection(product_collection_id, opts = {})
+ delete_product_collection_with_http_info(product_collection_id, opts)
+ nil
+ end
+
+ # Delete Product Collection
+ # This method deletes a product collection.
+ # @param product_collection_id [String] A unique product collection ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_product_collection_with_http_info(product_collection_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductCollectionsApi.delete_product_collection ...'
+ end
+ # verify the required parameter 'product_collection_id' is set
+ if @api_client.config.client_side_validation && product_collection_id.nil?
+ fail ArgumentError, "Missing the required parameter 'product_collection_id' when calling ProductCollectionsApi.delete_product_collection"
+ end
+ # resource path
+ local_var_path = '/v1/product-collections/{productCollectionId}'.sub('{' + 'productCollectionId' + '}', CGI.escape(product_collection_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductCollectionsApi.delete_product_collection",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductCollectionsApi#delete_product_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Product Collection
+ # Retrieves the product collection.
+ # @param product_collection_id [String] A unique product collection ID.
+ # @param [Hash] opts the optional parameters
+ # @return [ProductCollectionsGetResponseBody]
+ def get_product_collection(product_collection_id, opts = {})
+ data, _status_code, _headers = get_product_collection_with_http_info(product_collection_id, opts)
+ data
+ end
+
+ # Get Product Collection
+ # Retrieves the product collection.
+ # @param product_collection_id [String] A unique product collection ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(ProductCollectionsGetResponseBody, Integer, Hash)>] ProductCollectionsGetResponseBody data, response status code and response headers
+ private def get_product_collection_with_http_info(product_collection_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductCollectionsApi.get_product_collection ...'
+ end
+ # verify the required parameter 'product_collection_id' is set
+ if @api_client.config.client_side_validation && product_collection_id.nil?
+ fail ArgumentError, "Missing the required parameter 'product_collection_id' when calling ProductCollectionsApi.get_product_collection"
+ end
+ # resource path
+ local_var_path = '/v1/product-collections/{productCollectionId}'.sub('{' + 'productCollectionId' + '}', CGI.escape(product_collection_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductCollectionsGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductCollectionsApi.get_product_collection",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductCollectionsApi#get_product_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Product Collections
+ # This method returns a list of product collections.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrder] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [ProductCollectionsListResponseBody]
+ def list_product_collections(opts = {})
+ data, _status_code, _headers = list_product_collections_with_http_info(opts)
+ data
+ end
+
+ # List Product Collections
+ # This method returns a list of product collections.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrder] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [Array<(ProductCollectionsListResponseBody, Integer, Hash)>] ProductCollectionsListResponseBody data, response status code and response headers
+ private def list_product_collections_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductCollectionsApi.list_product_collections ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProductCollectionsApi.list_product_collections, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProductCollectionsApi.list_product_collections, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ProductCollectionsApi.list_product_collections, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/product-collections'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductCollectionsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductCollectionsApi.list_product_collections",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductCollectionsApi#list_product_collections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Products in Collection
+ # Retrieves list of products from a product collection; works for both dynamic and static product collections.
+ # @param product_collection_id [String] Unique product collection ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrder] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :starting_after Timestamp representing the date and time to use in starting_after cursor to get more data. Represented in ISO 8601 format.
+ # @return [ProductCollectionsProductsListResponseBody]
+ def list_products_in_collection(product_collection_id, opts = {})
+ data, _status_code, _headers = list_products_in_collection_with_http_info(product_collection_id, opts)
+ data
+ end
+
+ # List Products in Collection
+ # Retrieves list of products from a product collection; works for both dynamic and static product collections.
+ # @param product_collection_id [String] Unique product collection ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrder] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :starting_after Timestamp representing the date and time to use in starting_after cursor to get more data. Represented in ISO 8601 format.
+ # @return [Array<(ProductCollectionsProductsListResponseBody, Integer, Hash)>] ProductCollectionsProductsListResponseBody data, response status code and response headers
+ private def list_products_in_collection_with_http_info(product_collection_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductCollectionsApi.list_products_in_collection ...'
+ end
+ # verify the required parameter 'product_collection_id' is set
+ if @api_client.config.client_side_validation && product_collection_id.nil?
+ fail ArgumentError, "Missing the required parameter 'product_collection_id' when calling ProductCollectionsApi.list_products_in_collection"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProductCollectionsApi.list_products_in_collection, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProductCollectionsApi.list_products_in_collection, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ProductCollectionsApi.list_products_in_collection, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/product-collections/{productCollectionId}/products'.sub('{' + 'productCollectionId' + '}', CGI.escape(product_collection_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+ query_params[:'starting_after'] = opts[:'starting_after'] if !opts[:'starting_after'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductCollectionsProductsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductCollectionsApi.list_products_in_collection",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductCollectionsApi#list_products_in_collection\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/products_api.rb b/lib/VoucherifySdk/api/products_api.rb
new file mode 100644
index 00000000..6d3352b0
--- /dev/null
+++ b/lib/VoucherifySdk/api/products_api.rb
@@ -0,0 +1,1002 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class ProductsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create Product
+ # Creates a product object. 📘 Upsert Mode If you pass an id or a source_id that already exists in the product database, Voucherify will return a related product object with updated fields.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductsCreateRequestBody] :products_create_request_body Specify the product parameters.
+ # @return [ProductsCreateResponseBody]
+ def create_product(opts = {})
+ data, _status_code, _headers = create_product_with_http_info(opts)
+ data
+ end
+
+ # Create Product
+ # Creates a product object. 📘 Upsert Mode If you pass an id or a source_id that already exists in the product database, Voucherify will return a related product object with updated fields.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductsCreateRequestBody] :products_create_request_body Specify the product parameters.
+ # @return [Array<(ProductsCreateResponseBody, Integer, Hash)>] ProductsCreateResponseBody data, response status code and response headers
+ private def create_product_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.create_product ...'
+ end
+ # resource path
+ local_var_path = '/v1/products'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'products_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductsCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.create_product",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#create_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Create SKU
+ # This method adds product variants to a created product. 📘 Upsert Mode If you pass an id or a source_id that already exists in the sku database, Voucherify will return a related sku object with updated fields.
+ # @param product_id [String] A Voucherify product ID or product source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductsSkusCreateRequestBody] :products_skus_create_request_body Specify the SKU parameters to be created.
+ # @return [ProductsSkusCreateResponseBody]
+ def create_sku(product_id, opts = {})
+ data, _status_code, _headers = create_sku_with_http_info(product_id, opts)
+ data
+ end
+
+ # Create SKU
+ # This method adds product variants to a created product. 📘 Upsert Mode If you pass an id or a source_id that already exists in the sku database, Voucherify will return a related sku object with updated fields.
+ # @param product_id [String] A Voucherify product ID or product source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductsSkusCreateRequestBody] :products_skus_create_request_body Specify the SKU parameters to be created.
+ # @return [Array<(ProductsSkusCreateResponseBody, Integer, Hash)>] ProductsSkusCreateResponseBody data, response status code and response headers
+ private def create_sku_with_http_info(product_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.create_sku ...'
+ end
+ # verify the required parameter 'product_id' is set
+ if @api_client.config.client_side_validation && product_id.nil?
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductsApi.create_sku"
+ end
+ # resource path
+ local_var_path = '/v1/products/{productId}/skus'.sub('{' + 'productId' + '}', CGI.escape(product_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'products_skus_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductsSkusCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.create_sku",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#create_sku\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Product
+ # This method deletes a product.
+ # @param product_id [String] A Voucherify product ID or source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :force If this flag is set to true, the product will be removed permanently. Going forward, the user will be able to create another product with exactly the same source_id.
+ # @return [nil]
+ def delete_product(product_id, opts = {})
+ delete_product_with_http_info(product_id, opts)
+ nil
+ end
+
+ # Delete Product
+ # This method deletes a product.
+ # @param product_id [String] A Voucherify product ID or source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :force If this flag is set to true, the product will be removed permanently. Going forward, the user will be able to create another product with exactly the same source_id.
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_product_with_http_info(product_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.delete_product ...'
+ end
+ # verify the required parameter 'product_id' is set
+ if @api_client.config.client_side_validation && product_id.nil?
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductsApi.delete_product"
+ end
+ # resource path
+ local_var_path = '/v1/products/{productId}'.sub('{' + 'productId' + '}', CGI.escape(product_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.delete_product",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#delete_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete SKU
+ # This method deletes a product SKU.
+ # @param product_id [String] A unique Voucherify product ID or product source ID.
+ # @param sku_id [String] A Voucherify SKU ID or SKU source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :force If this flag is set to true, the SKU will be removed permanently. Going forward, the user will be able to create another SKU with exactly the same source_id.
+ # @return [nil]
+ def delete_sku(product_id, sku_id, opts = {})
+ delete_sku_with_http_info(product_id, sku_id, opts)
+ nil
+ end
+
+ # Delete SKU
+ # This method deletes a product SKU.
+ # @param product_id [String] A unique Voucherify product ID or product source ID.
+ # @param sku_id [String] A Voucherify SKU ID or SKU source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :force If this flag is set to true, the SKU will be removed permanently. Going forward, the user will be able to create another SKU with exactly the same source_id.
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_sku_with_http_info(product_id, sku_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.delete_sku ...'
+ end
+ # verify the required parameter 'product_id' is set
+ if @api_client.config.client_side_validation && product_id.nil?
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductsApi.delete_sku"
+ end
+ # verify the required parameter 'sku_id' is set
+ if @api_client.config.client_side_validation && sku_id.nil?
+ fail ArgumentError, "Missing the required parameter 'sku_id' when calling ProductsApi.delete_sku"
+ end
+ # resource path
+ local_var_path = '/v1/products/{productId}/skus/{skuId}'.sub('{' + 'productId' + '}', CGI.escape(product_id.to_s)).sub('{' + 'skuId' + '}', CGI.escape(sku_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.delete_sku",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#delete_sku\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Product
+ # Retrieve product details.
+ # @param product_id [String] A Voucherify product ID or source ID.
+ # @param [Hash] opts the optional parameters
+ # @return [ProductsGetResponseBody]
+ def get_product(product_id, opts = {})
+ data, _status_code, _headers = get_product_with_http_info(product_id, opts)
+ data
+ end
+
+ # Get Product
+ # Retrieve product details.
+ # @param product_id [String] A Voucherify product ID or source ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(ProductsGetResponseBody, Integer, Hash)>] ProductsGetResponseBody data, response status code and response headers
+ private def get_product_with_http_info(product_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.get_product ...'
+ end
+ # verify the required parameter 'product_id' is set
+ if @api_client.config.client_side_validation && product_id.nil?
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductsApi.get_product"
+ end
+ # resource path
+ local_var_path = '/v1/products/{productId}'.sub('{' + 'productId' + '}', CGI.escape(product_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductsGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.get_product",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#get_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get SKU
+ # Retrieve details of a SKU.
+ # @param sku_id [String] A Voucherify SKU identifier or SKU source ID.
+ # @param [Hash] opts the optional parameters
+ # @return [SkusGetResponseBody]
+ def get_sku(sku_id, opts = {})
+ data, _status_code, _headers = get_sku_with_http_info(sku_id, opts)
+ data
+ end
+
+ # Get SKU
+ # Retrieve details of a SKU.
+ # @param sku_id [String] A Voucherify SKU identifier or SKU source ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(SkusGetResponseBody, Integer, Hash)>] SkusGetResponseBody data, response status code and response headers
+ private def get_sku_with_http_info(sku_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.get_sku ...'
+ end
+ # verify the required parameter 'sku_id' is set
+ if @api_client.config.client_side_validation && sku_id.nil?
+ fail ArgumentError, "Missing the required parameter 'sku_id' when calling ProductsApi.get_sku"
+ end
+ # resource path
+ local_var_path = '/v1/skus/{skuId}'.sub('{' + 'skuId' + '}', CGI.escape(sku_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'SkusGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.get_sku",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#get_sku\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Import Products using CSV
+ # Import products into the repository using a CSV file. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param file [File] File path.
+ # @param [Hash] opts the optional parameters
+ # @return [ProductsImportCsvCreateResponseBody]
+ def import_products_using_csv(file, opts = {})
+ data, _status_code, _headers = import_products_using_csv_with_http_info(file, opts)
+ data
+ end
+
+ # Import Products using CSV
+ # Import products into the repository using a CSV file. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param file [File] File path.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(ProductsImportCsvCreateResponseBody, Integer, Hash)>] ProductsImportCsvCreateResponseBody data, response status code and response headers
+ private def import_products_using_csv_with_http_info(file, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.import_products_using_csv ...'
+ end
+ # verify the required parameter 'file' is set
+ if @api_client.config.client_side_validation && file.nil?
+ fail ArgumentError, "Missing the required parameter 'file' when calling ProductsApi.import_products_using_csv"
+ end
+ # resource path
+ local_var_path = '/v1/products/importCSV'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['multipart/form-data'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+ form_params['file'] = file
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductsImportCsvCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.import_products_using_csv",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#import_products_using_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Import SKUs using CSV
+ # Import SKUs into the repository using a CSV file. The CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param file [File] File path.
+ # @param [Hash] opts the optional parameters
+ # @return [SkusImportCsvCreateResponseBody]
+ def import_skus_using_csv(file, opts = {})
+ data, _status_code, _headers = import_skus_using_csv_with_http_info(file, opts)
+ data
+ end
+
+ # Import SKUs using CSV
+ # Import SKUs into the repository using a CSV file. The CSV file has to include headers in the first line. All properties which cannot be mapped to standard SKU fields will be added to the metadata object. You can find an example template [here](https://s3.amazonaws.com/helpscout.net/docs/assets/5902f1c12c7d3a057f88a36d/attachments/627b98d08c9b585083488a4c/Import_SKUS_template.csv). This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param file [File] File path.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(SkusImportCsvCreateResponseBody, Integer, Hash)>] SkusImportCsvCreateResponseBody data, response status code and response headers
+ private def import_skus_using_csv_with_http_info(file, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.import_skus_using_csv ...'
+ end
+ # verify the required parameter 'file' is set
+ if @api_client.config.client_side_validation && file.nil?
+ fail ArgumentError, "Missing the required parameter 'file' when calling ProductsApi.import_skus_using_csv"
+ end
+ # resource path
+ local_var_path = '/v1/skus/importCSV'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['multipart/form-data'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+ form_params['file'] = file
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'SkusImportCsvCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.import_skus_using_csv",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#import_skus_using_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Products
+ # Retrieve a list of products.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrder] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :start_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @option opts [Time] :end_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @return [ProductsListResponseBody]
+ def list_products(opts = {})
+ data, _status_code, _headers = list_products_with_http_info(opts)
+ data
+ end
+
+ # List Products
+ # Retrieve a list of products.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrder] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :start_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @option opts [Time] :end_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @return [Array<(ProductsListResponseBody, Integer, Hash)>] ProductsListResponseBody data, response status code and response headers
+ private def list_products_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.list_products ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProductsApi.list_products, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProductsApi.list_products, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ProductsApi.list_products, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/products'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+ query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
+ query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.list_products",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#list_products\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List SKUs in Product
+ # Retrieve all SKUs for a given product.
+ # @param product_id [String] A Voucherify product ID or product source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrder] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :start_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @option opts [Time] :end_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @return [ProductsSkusListResponseBody]
+ def list_skus_in_product(product_id, opts = {})
+ data, _status_code, _headers = list_skus_in_product_with_http_info(product_id, opts)
+ data
+ end
+
+ # List SKUs in Product
+ # Retrieve all SKUs for a given product.
+ # @param product_id [String] A Voucherify product ID or product source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrder] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :start_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @option opts [Time] :end_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @return [Array<(ProductsSkusListResponseBody, Integer, Hash)>] ProductsSkusListResponseBody data, response status code and response headers
+ private def list_skus_in_product_with_http_info(product_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.list_skus_in_product ...'
+ end
+ # verify the required parameter 'product_id' is set
+ if @api_client.config.client_side_validation && product_id.nil?
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductsApi.list_skus_in_product"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProductsApi.list_skus_in_product, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ProductsApi.list_skus_in_product, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ProductsApi.list_skus_in_product, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/products/{productId}/skus'.sub('{' + 'productId' + '}', CGI.escape(product_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+ query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
+ query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductsSkusListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.list_skus_in_product",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#list_skus_in_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Product
+ # Updates the specified product by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.
+ # @param product_id [String] A Voucherify product ID or source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductsUpdateRequestBody] :products_update_request_body Specify the parameters of the product that are to be updated.
+ # @return [ProductsUpdateResponseBody]
+ def update_product(product_id, opts = {})
+ data, _status_code, _headers = update_product_with_http_info(product_id, opts)
+ data
+ end
+
+ # Update Product
+ # Updates the specified product by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged.
+ # @param product_id [String] A Voucherify product ID or source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductsUpdateRequestBody] :products_update_request_body Specify the parameters of the product that are to be updated.
+ # @return [Array<(ProductsUpdateResponseBody, Integer, Hash)>] ProductsUpdateResponseBody data, response status code and response headers
+ private def update_product_with_http_info(product_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.update_product ...'
+ end
+ # verify the required parameter 'product_id' is set
+ if @api_client.config.client_side_validation && product_id.nil?
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductsApi.update_product"
+ end
+ # resource path
+ local_var_path = '/v1/products/{productId}'.sub('{' + 'productId' + '}', CGI.escape(product_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'products_update_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductsUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.update_product",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#update_product\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Products in bulk
+ # Update several products in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested product object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :products_update_in_bulk_request_body Create an array of product objects, each with the parameters which you want to update.
+ # @return [ProductsUpdateInBulkResponseBody]
+ def update_products_in_bulk(opts = {})
+ data, _status_code, _headers = update_products_in_bulk_with_http_info(opts)
+ data
+ end
+
+ # Update Products in bulk
+ # Update several products in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested product object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Array] :products_update_in_bulk_request_body Create an array of product objects, each with the parameters which you want to update.
+ # @return [Array<(ProductsUpdateInBulkResponseBody, Integer, Hash)>] ProductsUpdateInBulkResponseBody data, response status code and response headers
+ private def update_products_in_bulk_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.update_products_in_bulk ...'
+ end
+ # resource path
+ local_var_path = '/v1/products/bulk/async'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'products_update_in_bulk_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductsUpdateInBulkResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.update_products_in_bulk",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#update_products_in_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Products' Metadata in bulk
+ # Update several product metadata properties in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested product object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductsMetadataUpdateInBulkRequestBody] :products_metadata_update_in_bulk_request_body Specify the list of product source IDs and the metadata key value pairs to be udpated for these products.
+ # @return [ProductsMetadataUpdateInBulkResponseBody]
+ def update_products_metadata_in_bulk(opts = {})
+ data, _status_code, _headers = update_products_metadata_in_bulk_with_http_info(opts)
+ data
+ end
+
+ # Update Products' Metadata in bulk
+ # Update several product metadata properties in one asynchronous operation. In one request, it is possible to update a maximum of **100** records. In the response body, you get a unique async action identifier. If a requested product object is not found, then an **upsert** occurs. This is reflected in the Get Async Action endpoint as follows: This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductsMetadataUpdateInBulkRequestBody] :products_metadata_update_in_bulk_request_body Specify the list of product source IDs and the metadata key value pairs to be udpated for these products.
+ # @return [Array<(ProductsMetadataUpdateInBulkResponseBody, Integer, Hash)>] ProductsMetadataUpdateInBulkResponseBody data, response status code and response headers
+ private def update_products_metadata_in_bulk_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.update_products_metadata_in_bulk ...'
+ end
+ # resource path
+ local_var_path = '/v1/products/metadata/async'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'products_metadata_update_in_bulk_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductsMetadataUpdateInBulkResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.update_products_metadata_in_bulk",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#update_products_metadata_in_bulk\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update SKU
+ # Updates the specified SKU by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body schema wont be modified. Even if provided, they will be silently skipped.
+ # @param product_id [String] A unique Voucherify product ID or product source ID.
+ # @param sku_id [String] A Voucherify SKU ID or SKU source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductsSkusUpdateRequestBody] :products_skus_update_request_body Specify the parameters to be updated.
+ # @return [ProductsSkusUpdateResponseBody]
+ def update_sku(product_id, sku_id, opts = {})
+ data, _status_code, _headers = update_sku_with_http_info(product_id, sku_id, opts)
+ data
+ end
+
+ # Update SKU
+ # Updates the specified SKU by setting the values of the parameters passed in the request body. Any parameters not provided in the payload will be left unchanged. Fields other than the ones listed in the request body schema wont be modified. Even if provided, they will be silently skipped.
+ # @param product_id [String] A unique Voucherify product ID or product source ID.
+ # @param sku_id [String] A Voucherify SKU ID or SKU source ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ProductsSkusUpdateRequestBody] :products_skus_update_request_body Specify the parameters to be updated.
+ # @return [Array<(ProductsSkusUpdateResponseBody, Integer, Hash)>] ProductsSkusUpdateResponseBody data, response status code and response headers
+ private def update_sku_with_http_info(product_id, sku_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ProductsApi.update_sku ...'
+ end
+ # verify the required parameter 'product_id' is set
+ if @api_client.config.client_side_validation && product_id.nil?
+ fail ArgumentError, "Missing the required parameter 'product_id' when calling ProductsApi.update_sku"
+ end
+ # verify the required parameter 'sku_id' is set
+ if @api_client.config.client_side_validation && sku_id.nil?
+ fail ArgumentError, "Missing the required parameter 'sku_id' when calling ProductsApi.update_sku"
+ end
+ # resource path
+ local_var_path = '/v1/products/{productId}/skus/{skuId}'.sub('{' + 'productId' + '}', CGI.escape(product_id.to_s)).sub('{' + 'skuId' + '}', CGI.escape(sku_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'products_skus_update_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ProductsSkusUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ProductsApi.update_sku",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ProductsApi#update_sku\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/promotions_api.rb b/lib/VoucherifySdk/api/promotions_api.rb
new file mode 100644
index 00000000..cde2aaa6
--- /dev/null
+++ b/lib/VoucherifySdk/api/promotions_api.rb
@@ -0,0 +1,764 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class PromotionsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create Promotion Stack
+ # This method creates one promotion stack. The sequence of promotion tier IDs will determine the promotion stacking order.
+ # @param campaign_id [String] Unique campaign ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [PromotionsStacksCreateRequestBody] :promotions_stacks_create_request_body Specify the order of promotion tiers for the promotion stack.
+ # @return [PromotionsStacksCreateResponseBody]
+ def create_promotion_stack(campaign_id, opts = {})
+ data, _status_code, _headers = create_promotion_stack_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # Create Promotion Stack
+ # This method creates one promotion stack. The sequence of promotion tier IDs will determine the promotion stacking order.
+ # @param campaign_id [String] Unique campaign ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [PromotionsStacksCreateRequestBody] :promotions_stacks_create_request_body Specify the order of promotion tiers for the promotion stack.
+ # @return [Array<(PromotionsStacksCreateResponseBody, Integer, Hash)>] PromotionsStacksCreateResponseBody data, response status code and response headers
+ private def create_promotion_stack_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PromotionsApi.create_promotion_stack ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling PromotionsApi.create_promotion_stack"
+ end
+ # resource path
+ local_var_path = '/v1/promotions/{campaignId}/stacks'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'promotions_stacks_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PromotionsStacksCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PromotionsApi.create_promotion_stack",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PromotionsApi#create_promotion_stack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Promotion Stack
+ # This method deletes a promotion stack.
+ # @param campaign_id [String] ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign.
+ # @param stack_id [String] Promotion stack ID.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_promotion_stack(campaign_id, stack_id, opts = {})
+ delete_promotion_stack_with_http_info(campaign_id, stack_id, opts)
+ nil
+ end
+
+ # Delete Promotion Stack
+ # This method deletes a promotion stack.
+ # @param campaign_id [String] ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign.
+ # @param stack_id [String] Promotion stack ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_promotion_stack_with_http_info(campaign_id, stack_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PromotionsApi.delete_promotion_stack ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling PromotionsApi.delete_promotion_stack"
+ end
+ # verify the required parameter 'stack_id' is set
+ if @api_client.config.client_side_validation && stack_id.nil?
+ fail ArgumentError, "Missing the required parameter 'stack_id' when calling PromotionsApi.delete_promotion_stack"
+ end
+ # resource path
+ local_var_path = '/v1/promotions/{campaignId}/stacks/{stackId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'stackId' + '}', CGI.escape(stack_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PromotionsApi.delete_promotion_stack",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PromotionsApi#delete_promotion_stack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Promotion Tier
+ # This method deletes a promotion tier.
+ # @param promotion_tier_id [String] Unique promotion tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_promotion_tier(promotion_tier_id, opts = {})
+ delete_promotion_tier_with_http_info(promotion_tier_id, opts)
+ nil
+ end
+
+ # Delete Promotion Tier
+ # This method deletes a promotion tier.
+ # @param promotion_tier_id [String] Unique promotion tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_promotion_tier_with_http_info(promotion_tier_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PromotionsApi.delete_promotion_tier ...'
+ end
+ # verify the required parameter 'promotion_tier_id' is set
+ if @api_client.config.client_side_validation && promotion_tier_id.nil?
+ fail ArgumentError, "Missing the required parameter 'promotion_tier_id' when calling PromotionsApi.delete_promotion_tier"
+ end
+ # resource path
+ local_var_path = '/v1/promotions/tiers/{promotionTierId}'.sub('{' + 'promotionTierId' + '}', CGI.escape(promotion_tier_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PromotionsApi.delete_promotion_tier",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PromotionsApi#delete_promotion_tier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Disable Promotion Tier
+ # This method disables a promotion tier, i.e. makes the active parameter false.
+ # @param promotion_tier_id [String] Unique promotion tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [PromotionsTiersDisableResponseBody]
+ def disable_promotion_tier(promotion_tier_id, opts = {})
+ data, _status_code, _headers = disable_promotion_tier_with_http_info(promotion_tier_id, opts)
+ data
+ end
+
+ # Disable Promotion Tier
+ # This method disables a promotion tier, i.e. makes the active parameter false.
+ # @param promotion_tier_id [String] Unique promotion tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(PromotionsTiersDisableResponseBody, Integer, Hash)>] PromotionsTiersDisableResponseBody data, response status code and response headers
+ private def disable_promotion_tier_with_http_info(promotion_tier_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PromotionsApi.disable_promotion_tier ...'
+ end
+ # verify the required parameter 'promotion_tier_id' is set
+ if @api_client.config.client_side_validation && promotion_tier_id.nil?
+ fail ArgumentError, "Missing the required parameter 'promotion_tier_id' when calling PromotionsApi.disable_promotion_tier"
+ end
+ # resource path
+ local_var_path = '/v1/promotions/tiers/{promotionTierId}/disable'.sub('{' + 'promotionTierId' + '}', CGI.escape(promotion_tier_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PromotionsTiersDisableResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PromotionsApi.disable_promotion_tier",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PromotionsApi#disable_promotion_tier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Enable Promotion Tier
+ # This method enables a promotion tier, i.e. makes the active parameter true.
+ # @param promotion_tier_id [String] Unique promotion tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [PromotionsTiersEnableResponseBody]
+ def enable_promotion_tier(promotion_tier_id, opts = {})
+ data, _status_code, _headers = enable_promotion_tier_with_http_info(promotion_tier_id, opts)
+ data
+ end
+
+ # Enable Promotion Tier
+ # This method enables a promotion tier, i.e. makes the active parameter true.
+ # @param promotion_tier_id [String] Unique promotion tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(PromotionsTiersEnableResponseBody, Integer, Hash)>] PromotionsTiersEnableResponseBody data, response status code and response headers
+ private def enable_promotion_tier_with_http_info(promotion_tier_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PromotionsApi.enable_promotion_tier ...'
+ end
+ # verify the required parameter 'promotion_tier_id' is set
+ if @api_client.config.client_side_validation && promotion_tier_id.nil?
+ fail ArgumentError, "Missing the required parameter 'promotion_tier_id' when calling PromotionsApi.enable_promotion_tier"
+ end
+ # resource path
+ local_var_path = '/v1/promotions/tiers/{promotionTierId}/enable'.sub('{' + 'promotionTierId' + '}', CGI.escape(promotion_tier_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PromotionsTiersEnableResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PromotionsApi.enable_promotion_tier",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PromotionsApi#enable_promotion_tier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Promotion Stack
+ # This method returns the details of a promotion stack, including the promotion tiers grouped within the stack.
+ # @param campaign_id [String] ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign.
+ # @param stack_id [String] Promotion stack ID.
+ # @param [Hash] opts the optional parameters
+ # @return [PromotionsStacksGetResponseBody]
+ def get_promotion_stack(campaign_id, stack_id, opts = {})
+ data, _status_code, _headers = get_promotion_stack_with_http_info(campaign_id, stack_id, opts)
+ data
+ end
+
+ # Get Promotion Stack
+ # This method returns the details of a promotion stack, including the promotion tiers grouped within the stack.
+ # @param campaign_id [String] ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign.
+ # @param stack_id [String] Promotion stack ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(PromotionsStacksGetResponseBody, Integer, Hash)>] PromotionsStacksGetResponseBody data, response status code and response headers
+ private def get_promotion_stack_with_http_info(campaign_id, stack_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PromotionsApi.get_promotion_stack ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling PromotionsApi.get_promotion_stack"
+ end
+ # verify the required parameter 'stack_id' is set
+ if @api_client.config.client_side_validation && stack_id.nil?
+ fail ArgumentError, "Missing the required parameter 'stack_id' when calling PromotionsApi.get_promotion_stack"
+ end
+ # resource path
+ local_var_path = '/v1/promotions/{campaignId}/stacks/{stackId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'stackId' + '}', CGI.escape(stack_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PromotionsStacksGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PromotionsApi.get_promotion_stack",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PromotionsApi#get_promotion_stack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Promotion Tier
+ # This method enables you to retrieve a specific promotion tier.
+ # @param promotion_tier_id [String] Unique promotion tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [PromotionsTiersGetResponseBody]
+ def get_promotion_tier(promotion_tier_id, opts = {})
+ data, _status_code, _headers = get_promotion_tier_with_http_info(promotion_tier_id, opts)
+ data
+ end
+
+ # Get Promotion Tier
+ # This method enables you to retrieve a specific promotion tier.
+ # @param promotion_tier_id [String] Unique promotion tier ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(PromotionsTiersGetResponseBody, Integer, Hash)>] PromotionsTiersGetResponseBody data, response status code and response headers
+ private def get_promotion_tier_with_http_info(promotion_tier_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PromotionsApi.get_promotion_tier ...'
+ end
+ # verify the required parameter 'promotion_tier_id' is set
+ if @api_client.config.client_side_validation && promotion_tier_id.nil?
+ fail ArgumentError, "Missing the required parameter 'promotion_tier_id' when calling PromotionsApi.get_promotion_tier"
+ end
+ # resource path
+ local_var_path = '/v1/promotions/tiers/{promotionTierId}'.sub('{' + 'promotionTierId' + '}', CGI.escape(promotion_tier_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PromotionsTiersGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PromotionsApi.get_promotion_tier",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PromotionsApi#get_promotion_tier\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Promotion Stacks
+ # This method enables you to list promotion stacks irrespective of the campaign they are associated with. You can use filters in the query parameters to specify the stacks to be returned in the response. # Advanced filters for fetching promotion stacks
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListAllPromotionStacks] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [ParameterCreatedBeforeAfter] :created_at A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z
+ # @option opts [ParameterUpdatedBeforeAfter] :updated_at A filter on the list based on the object updated_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [updated_at][before] 2017-09-08T13:52:18.227Z
+ # @return [PromotionsStacksListResponseBody]
+ def list_all_promotion_stacks(opts = {})
+ data, _status_code, _headers = list_all_promotion_stacks_with_http_info(opts)
+ data
+ end
+
+ # List Promotion Stacks
+ # This method enables you to list promotion stacks irrespective of the campaign they are associated with. You can use filters in the query parameters to specify the stacks to be returned in the response. # Advanced filters for fetching promotion stacks
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListAllPromotionStacks] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [ParameterCreatedBeforeAfter] :created_at A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z
+ # @option opts [ParameterUpdatedBeforeAfter] :updated_at A filter on the list based on the object updated_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [updated_at][before] 2017-09-08T13:52:18.227Z
+ # @return [Array<(PromotionsStacksListResponseBody, Integer, Hash)>] PromotionsStacksListResponseBody data, response status code and response headers
+ private def list_all_promotion_stacks_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PromotionsApi.list_all_promotion_stacks ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PromotionsApi.list_all_promotion_stacks, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PromotionsApi.list_all_promotion_stacks, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling PromotionsApi.list_all_promotion_stacks, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/promotions/stacks'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+ query_params[:'created_at'] = opts[:'created_at'] if !opts[:'created_at'].nil?
+ query_params[:'updated_at'] = opts[:'updated_at'] if !opts[:'updated_at'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PromotionsStacksListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PromotionsApi.list_all_promotion_stacks",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PromotionsApi#list_all_promotion_stacks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Promotion Stacks in Campaign
+ # This method enables you to list promotion stacks from a specified campaign.
+ # @param campaign_id [String] Unique campaign ID.
+ # @param [Hash] opts the optional parameters
+ # @return [PromotionsStacksListResponseBody]
+ def list_promotion_stacks_in_campaign(campaign_id, opts = {})
+ data, _status_code, _headers = list_promotion_stacks_in_campaign_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # List Promotion Stacks in Campaign
+ # This method enables you to list promotion stacks from a specified campaign.
+ # @param campaign_id [String] Unique campaign ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(PromotionsStacksListResponseBody, Integer, Hash)>] PromotionsStacksListResponseBody data, response status code and response headers
+ private def list_promotion_stacks_in_campaign_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PromotionsApi.list_promotion_stacks_in_campaign ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling PromotionsApi.list_promotion_stacks_in_campaign"
+ end
+ # resource path
+ local_var_path = '/v1/promotions/{campaignId}/stacks'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PromotionsStacksListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PromotionsApi.list_promotion_stacks_in_campaign",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PromotionsApi#list_promotion_stacks_in_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Promotion Tiers from Campaign
+ # This method enables you to list promotion tiers from a specified campaign.
+ # @param campaign_id [String] Unique campaign ID assigned by Voucherify.
+ # @param [Hash] opts the optional parameters
+ # @return [PromotionsTiersListResponseBody]
+ def list_promotion_tiers_from_campaign(campaign_id, opts = {})
+ data, _status_code, _headers = list_promotion_tiers_from_campaign_with_http_info(campaign_id, opts)
+ data
+ end
+
+ # List Promotion Tiers from Campaign
+ # This method enables you to list promotion tiers from a specified campaign.
+ # @param campaign_id [String] Unique campaign ID assigned by Voucherify.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(PromotionsTiersListResponseBody, Integer, Hash)>] PromotionsTiersListResponseBody data, response status code and response headers
+ private def list_promotion_tiers_from_campaign_with_http_info(campaign_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PromotionsApi.list_promotion_tiers_from_campaign ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling PromotionsApi.list_promotion_tiers_from_campaign"
+ end
+ # resource path
+ local_var_path = '/v1/promotions/{campaignId}/tiers'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PromotionsTiersListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PromotionsApi.list_promotion_tiers_from_campaign",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PromotionsApi#list_promotion_tiers_from_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Promotion Stack
+ # This methods allows for editing an existing stack.
+ # @param campaign_id [String] ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign.
+ # @param stack_id [String] Promotion stack ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [PromotionsStacksUpdateRequestBody] :promotions_stacks_update_request_body Specify the promotion stack parameters that you would like to update.
+ # @return [PromotionsStacksUpdateResponseBody]
+ def update_promotion_stack(campaign_id, stack_id, opts = {})
+ data, _status_code, _headers = update_promotion_stack_with_http_info(campaign_id, stack_id, opts)
+ data
+ end
+
+ # Update Promotion Stack
+ # This methods allows for editing an existing stack.
+ # @param campaign_id [String] ID of the promotion campaign. You can either pass the campaign ID, which was assigned by Voucherify, or the name of the campaign as the path parameter value, e.g., Loyalty Campaign.
+ # @param stack_id [String] Promotion stack ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [PromotionsStacksUpdateRequestBody] :promotions_stacks_update_request_body Specify the promotion stack parameters that you would like to update.
+ # @return [Array<(PromotionsStacksUpdateResponseBody, Integer, Hash)>] PromotionsStacksUpdateResponseBody data, response status code and response headers
+ private def update_promotion_stack_with_http_info(campaign_id, stack_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PromotionsApi.update_promotion_stack ...'
+ end
+ # verify the required parameter 'campaign_id' is set
+ if @api_client.config.client_side_validation && campaign_id.nil?
+ fail ArgumentError, "Missing the required parameter 'campaign_id' when calling PromotionsApi.update_promotion_stack"
+ end
+ # verify the required parameter 'stack_id' is set
+ if @api_client.config.client_side_validation && stack_id.nil?
+ fail ArgumentError, "Missing the required parameter 'stack_id' when calling PromotionsApi.update_promotion_stack"
+ end
+ # resource path
+ local_var_path = '/v1/promotions/{campaignId}/stacks/{stackId}'.sub('{' + 'campaignId' + '}', CGI.escape(campaign_id.to_s)).sub('{' + 'stackId' + '}', CGI.escape(stack_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'promotions_stacks_update_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PromotionsStacksUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PromotionsApi.update_promotion_stack",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PromotionsApi#update_promotion_stack\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/publications_api.rb b/lib/VoucherifySdk/api/publications_api.rb
new file mode 100644
index 00000000..ec9a0473
--- /dev/null
+++ b/lib/VoucherifySdk/api/publications_api.rb
@@ -0,0 +1,270 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class PublicationsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create Publication
+ # This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers In case you want to publish multiple vouchers within a single publication, you need to specify the campaign name and number of vouchers you want to publish. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :join_once Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer.
+ # @option opts [PublicationsCreateRequestBody] :publications_create_request_body Specify the publication parameters.
+ # @return [PublicationsCreateResponseBody]
+ def create_publication(opts = {})
+ data, _status_code, _headers = create_publication_with_http_info(opts)
+ data
+ end
+
+ # Create Publication
+ # This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers In case you want to publish multiple vouchers within a single publication, you need to specify the campaign name and number of vouchers you want to publish. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :join_once Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer.
+ # @option opts [PublicationsCreateRequestBody] :publications_create_request_body Specify the publication parameters.
+ # @return [Array<(PublicationsCreateResponseBody, Integer, Hash)>] PublicationsCreateResponseBody data, response status code and response headers
+ private def create_publication_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PublicationsApi.create_publication ...'
+ end
+ # resource path
+ local_var_path = '/v1/publications'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'join_once'] = opts[:'join_once'] if !opts[:'join_once'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'publications_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PublicationsCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PublicationsApi.create_publication",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PublicationsApi#create_publication\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Create Publication
+ # This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. ❗️ Limited access Access to this endpoint is limited. This endpoint is designed for specific integrations and the API keys need to be configured to access this endpoint. Navigate to the **Dashboard** → **Project Settings** → **General** → **Integration Keys** to set up a pair of API keys and use them to send the request. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers This endpoint does not support the publishing of multiple vouchers from a single campaign. In case you want to publish multiple vouchers within a single publication, you need to use a dedicated endpoint. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign. # Example Request ❗️ Required Query param voucher OR campaign MUST be filled out. If you provide both, campaign param will be skipped.
+ # @param customer [Customer] Contains information about the customer to whom the publication was directed.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :join_once Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer.
+ # @option opts [String] :voucher Code of voucher being published.
+ # @option opts [CreatePublicationCampaign] :campaign Create publication with campaign.
+ # @option opts [String] :source_id The merchant’s publication ID if it is different from the Voucherify publication ID. Its an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If source_id is provided only 1 voucher can be published per request.
+ # @option opts [Object] :metadata The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format.
+ # @return [PublicationsCreateResponseBody]
+ def create_publication1(customer, opts = {})
+ data, _status_code, _headers = create_publication1_with_http_info(customer, opts)
+ data
+ end
+
+ # Create Publication
+ # This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication. A voucher is suitable for publication when its active and hasnt been published yet. ❗️ Limited access Access to this endpoint is limited. This endpoint is designed for specific integrations and the API keys need to be configured to access this endpoint. Navigate to the **Dashboard** → **Project Settings** → **General** → **Integration Keys** to set up a pair of API keys and use them to send the request. 🚧 Clearly define the source of the voucher You must clearly define which source you want to publish the voucher code from. It can either be a code from a campaign or a specific voucher identified by a code. 🚧 Publish multiple vouchers This endpoint does not support the publishing of multiple vouchers from a single campaign. In case you want to publish multiple vouchers within a single publication, you need to use a dedicated endpoint. 📘 Auto-update campaign In case you want to ensure the number of publishable codes increases automatically with the number of customers, you should use an **auto-update** campaign. # Example Request ❗️ Required Query param voucher OR campaign MUST be filled out. If you provide both, campaign param will be skipped.
+ # @param customer [Customer] Contains information about the customer to whom the publication was directed.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :join_once Through this flag, you can control if a particular person gets only one and always the same code even if the app sends multiple publication requests. It means that if you have a referral program, a referrer is assigned only to one code if an integration sends publication requests more than once for the same customer.
+ # @option opts [String] :voucher Code of voucher being published.
+ # @option opts [CreatePublicationCampaign] :campaign Create publication with campaign.
+ # @option opts [String] :source_id The merchant’s publication ID if it is different from the Voucherify publication ID. Its an optional tracking identifier of a publication. It is really useful in case of an integration between multiple systems. It can be a publication ID from a CRM system, database or 3rd-party service. If source_id is provided only 1 voucher can be published per request.
+ # @option opts [Object] :metadata The metadata object stores all custom attributes assigned to the publication. A set of key/value pairs that you can attach to a publication object. It can be useful for storing additional information about the publication in a structured format.
+ # @return [Array<(PublicationsCreateResponseBody, Integer, Hash)>] PublicationsCreateResponseBody data, response status code and response headers
+ private def create_publication1_with_http_info(customer, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PublicationsApi.create_publication1 ...'
+ end
+ # verify the required parameter 'customer' is set
+ if @api_client.config.client_side_validation && customer.nil?
+ fail ArgumentError, "Missing the required parameter 'customer' when calling PublicationsApi.create_publication1"
+ end
+ # resource path
+ local_var_path = '/v1/publications/create'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'customer'] = customer
+ query_params[:'join_once'] = opts[:'join_once'] if !opts[:'join_once'].nil?
+ query_params[:'voucher'] = opts[:'voucher'] if !opts[:'voucher'].nil?
+ query_params[:'campaign'] = opts[:'campaign'] if !opts[:'campaign'].nil?
+ query_params[:'source_id'] = opts[:'source_id'] if !opts[:'source_id'].nil?
+ query_params[:'metadata'] = opts[:'metadata'] if !opts[:'metadata'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PublicationsCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PublicationsApi.create_publication1",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PublicationsApi#create_publication1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Publications
+ # Retrieve a list of publications. To return a **particular** publication, you can use the source_id query parameter and provide the source_id of the publication you are looking for specifically. # Pagination 🚧 Important! If you want to scroll through a huge set of records, it is recommended to use the Exports API. This API will return an error page_over_limit if you reach a page above 1000. # Filter Query The filters query parameter allows for joining multiple parameters with logical operators. The syntax looks as follows: ## Operators: ## Examples
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListPublications] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [String] :campaign Filters by a given campaign name.
+ # @option opts [String] :customer Filters by a unique customer ID.
+ # @option opts [String] :voucher Filters by a given voucher code.
+ # @option opts [ParameterResultListPublications] :result Filters by a publication result.
+ # @option opts [ParameterVoucherTypeListPublications] :voucher_type Filters by a voucher type.
+ # @option opts [Boolean] :is_referral_code This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns.
+ # @option opts [String] :filters Allows for combining the filters mentioned in the endpoint description.
+ # @option opts [String] :source_id Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id.
+ # @return [PublicationsListResponseBody]
+ def list_publications(opts = {})
+ data, _status_code, _headers = list_publications_with_http_info(opts)
+ data
+ end
+
+ # List Publications
+ # Retrieve a list of publications. To return a **particular** publication, you can use the source_id query parameter and provide the source_id of the publication you are looking for specifically. # Pagination 🚧 Important! If you want to scroll through a huge set of records, it is recommended to use the Exports API. This API will return an error page_over_limit if you reach a page above 1000. # Filter Query The filters query parameter allows for joining multiple parameters with logical operators. The syntax looks as follows: ## Operators: ## Examples
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListPublications] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [String] :campaign Filters by a given campaign name.
+ # @option opts [String] :customer Filters by a unique customer ID.
+ # @option opts [String] :voucher Filters by a given voucher code.
+ # @option opts [ParameterResultListPublications] :result Filters by a publication result.
+ # @option opts [ParameterVoucherTypeListPublications] :voucher_type Filters by a voucher type.
+ # @option opts [Boolean] :is_referral_code This filter works only for the true option. If set to true, the query returns only publications of codes from referral campaigns.
+ # @option opts [String] :filters Allows for combining the filters mentioned in the endpoint description.
+ # @option opts [String] :source_id Using this endpoint with a particular publication source_id, which was sent with the original request to create a publication, returns in the response, exactly the same code published initially because the code was assigned to the given publication. As a result, you can use this endpoint as a reference and return a code that was assigned in a publication by using a particular source_id.
+ # @return [Array<(PublicationsListResponseBody, Integer, Hash)>] PublicationsListResponseBody data, response status code and response headers
+ private def list_publications_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: PublicationsApi.list_publications ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PublicationsApi.list_publications, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling PublicationsApi.list_publications, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling PublicationsApi.list_publications, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/publications'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+ query_params[:'campaign'] = opts[:'campaign'] if !opts[:'campaign'].nil?
+ query_params[:'customer'] = opts[:'customer'] if !opts[:'customer'].nil?
+ query_params[:'voucher'] = opts[:'voucher'] if !opts[:'voucher'].nil?
+ query_params[:'result'] = opts[:'result'] if !opts[:'result'].nil?
+ query_params[:'voucher_type'] = opts[:'voucher_type'] if !opts[:'voucher_type'].nil?
+ query_params[:'is_referral_code'] = opts[:'is_referral_code'] if !opts[:'is_referral_code'].nil?
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
+ query_params[:'source_id'] = opts[:'source_id'] if !opts[:'source_id'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'PublicationsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"PublicationsApi.list_publications",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: PublicationsApi#list_publications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/qualifications_api.rb b/lib/VoucherifySdk/api/qualifications_api.rb
new file mode 100644
index 00000000..15cbaaa6
--- /dev/null
+++ b/lib/VoucherifySdk/api/qualifications_api.rb
@@ -0,0 +1,86 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class QualificationsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Check Eligibility
+ # 🚧 The Qualifications endpoint in the basic mode ignores the rules checking: - Limit of total redeemed discount amount per campaign - Limit of total redemptions count per campaign - Redemptions per customer - Redemptions per customer in a campaign Generate a list of redeemables that are applicable in the context of the customer and order. The new qualifications method is an improved version of Campaign Qualifications, Voucher Qualifications, and Promotions Validation API requests. The new qualification method introduces the following improvements: - Qualification results are returned faster - No limit on the number of returned redeemables - Introduces new qualification scenarios, not available in the previous version 👍 Scenario Guide Read our dedicated guide to learn about some use cases this endpoint can cover here. # Paging The Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 50 redeemables. To get the next batch of redeemables, you need to use the starting_after cursor. To process of paging the redeemables works in the following manner: - You send the first API request for Qualifications without the starting_after parameter. - The response will contain a parameter named has_more. If the parameters value is set to true, then more redeemables are available. - Get the value of the created_at parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables. - Send another API request for Qualification with the starting_after parameter set to the value taken from the created_at parameter from the last returned redeemable. - Voucherify will return the next page of redeemables. - If the has_more parameter is set to true, apply steps 3-5 to get the next page of redeemables.
+ # @param [Hash] opts the optional parameters
+ # @option opts [QualificationsCheckEligibilityRequestBody] :qualifications_check_eligibility_request_body Define order and customer context.
+ # @return [QualificationsCheckEligibilityResponseBody]
+ def check_eligibility(opts = {})
+ data, _status_code, _headers = check_eligibility_with_http_info(opts)
+ data
+ end
+
+ # Check Eligibility
+ # 🚧 The Qualifications endpoint in the basic mode ignores the rules checking: - Limit of total redeemed discount amount per campaign - Limit of total redemptions count per campaign - Redemptions per customer - Redemptions per customer in a campaign Generate a list of redeemables that are applicable in the context of the customer and order. The new qualifications method is an improved version of Campaign Qualifications, Voucher Qualifications, and Promotions Validation API requests. The new qualification method introduces the following improvements: - Qualification results are returned faster - No limit on the number of returned redeemables - Introduces new qualification scenarios, not available in the previous version 👍 Scenario Guide Read our dedicated guide to learn about some use cases this endpoint can cover here. # Paging The Voucherify Qualifications API request will return to you all of the redeemables available for the customer in batches of up to 50 redeemables. To get the next batch of redeemables, you need to use the starting_after cursor. To process of paging the redeemables works in the following manner: - You send the first API request for Qualifications without the starting_after parameter. - The response will contain a parameter named has_more. If the parameters value is set to true, then more redeemables are available. - Get the value of the created_at parameter of the last returned redeemable. The value of this parameter will be used as a cursor to retrieve the next page of redeemables. - Send another API request for Qualification with the starting_after parameter set to the value taken from the created_at parameter from the last returned redeemable. - Voucherify will return the next page of redeemables. - If the has_more parameter is set to true, apply steps 3-5 to get the next page of redeemables.
+ # @param [Hash] opts the optional parameters
+ # @option opts [QualificationsCheckEligibilityRequestBody] :qualifications_check_eligibility_request_body Define order and customer context.
+ # @return [Array<(QualificationsCheckEligibilityResponseBody, Integer, Hash)>] QualificationsCheckEligibilityResponseBody data, response status code and response headers
+ private def check_eligibility_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: QualificationsApi.check_eligibility ...'
+ end
+ # resource path
+ local_var_path = '/v1/qualifications'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'qualifications_check_eligibility_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'QualificationsCheckEligibilityResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"QualificationsApi.check_eligibility",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: QualificationsApi#check_eligibility\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/redemptions_api.rb b/lib/VoucherifySdk/api/redemptions_api.rb
new file mode 100644
index 00000000..26616d7d
--- /dev/null
+++ b/lib/VoucherifySdk/api/redemptions_api.rb
@@ -0,0 +1,457 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class RedemptionsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Get Redemption
+ # Return a redemption or redemption rollback object. This object can either be a successfull or failed redemption or redemption rollback.
+ # @param redemption_id [String] ID of previously created redemption.
+ # @param [Hash] opts the optional parameters
+ # @return [RedemptionsGetResponseBody]
+ def get_redemption(redemption_id, opts = {})
+ data, _status_code, _headers = get_redemption_with_http_info(redemption_id, opts)
+ data
+ end
+
+ # Get Redemption
+ # Return a redemption or redemption rollback object. This object can either be a successfull or failed redemption or redemption rollback.
+ # @param redemption_id [String] ID of previously created redemption.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(RedemptionsGetResponseBody, Integer, Hash)>] RedemptionsGetResponseBody data, response status code and response headers
+ private def get_redemption_with_http_info(redemption_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RedemptionsApi.get_redemption ...'
+ end
+ # verify the required parameter 'redemption_id' is set
+ if @api_client.config.client_side_validation && redemption_id.nil?
+ fail ArgumentError, "Missing the required parameter 'redemption_id' when calling RedemptionsApi.get_redemption"
+ end
+ # resource path
+ local_var_path = '/v1/redemptions/{redemptionId}'.sub('{' + 'redemptionId' + '}', CGI.escape(redemption_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'RedemptionsGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RedemptionsApi.get_redemption",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RedemptionsApi#get_redemption\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Voucher's Redemptions
+ # Retrieve the number of times a voucher was redeemed and each of the redemption details.
+ # @param code [String] A **code** that identifies the voucher.
+ # @param [Hash] opts the optional parameters
+ # @return [VouchersRedemptionGetResponseBody]
+ def get_voucher_redemptions(code, opts = {})
+ data, _status_code, _headers = get_voucher_redemptions_with_http_info(code, opts)
+ data
+ end
+
+ # Get Voucher's Redemptions
+ # Retrieve the number of times a voucher was redeemed and each of the redemption details.
+ # @param code [String] A **code** that identifies the voucher.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(VouchersRedemptionGetResponseBody, Integer, Hash)>] VouchersRedemptionGetResponseBody data, response status code and response headers
+ private def get_voucher_redemptions_with_http_info(code, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RedemptionsApi.get_voucher_redemptions ...'
+ end
+ # verify the required parameter 'code' is set
+ if @api_client.config.client_side_validation && code.nil?
+ fail ArgumentError, "Missing the required parameter 'code' when calling RedemptionsApi.get_voucher_redemptions"
+ end
+ # resource path
+ local_var_path = '/v1/vouchers/{code}/redemption'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'VouchersRedemptionGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RedemptionsApi.get_voucher_redemptions",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RedemptionsApi#get_voucher_redemptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Redemptions
+ # Returns a list of redemptions previously created. The redemptions are returned in a sorted order, with the most recent redemptions appearing first. The response returns a list of redemptions of all vouchers. # Filtering results The result can be narrowed according to specified (or default) filters, for example, you can sort redemptions by date: https://api.voucherify.io/v1/redemptions?limit 3&[created_at][before] 2017-09-08T13:52:18.227Z. A filter based on the object created_at field narrows down the results and lists redemptions done before or after a particular date time. You can use the following options: [created_at][after], [created_at][before]. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z. # Failed Redemptions A redemption may fail for various reasons. You can figure out an exact reason from the failure_code: - resource_not_found - voucher with given code does not exist - voucher_not_active - voucher is not active yet (before start date) - voucher_expired - voucher has already expired (after expiration date) - voucher_disabled - voucher has been disabled (active: false) - quantity_exceeded - vouchers redemptions limit has been exceeded - gift_amount_exceeded - gift amount has been exceeded - customer_rules_violated - customer did not match the segment - order_rules_violated - order did not match validation rules - invalid_order - order was specified incorrectly - invalid_amount - order amount was specified incorrectly - missing_amount - order amount was not specified - missing_order_items - order items were not specified - missing_customer - customer was not specified
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [String] :result A filter on the list based on the redemption result. Available options are: SUCCESS, FAILURE. You can provide multiple values by repeating the param.
+ # @option opts [String] :campaign A filter by the campaign **name** that the redemption resources originate from.
+ # @option opts [String] :customer Return redemptions performed by the customer with given id or source_id.
+ # @option opts [ParameterOrderListRedemptions] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [ParameterCreatedBeforeAfter] :created_at A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z
+ # @option opts [ParameterFiltersListRedemptions] :filters Filters for listing responses.
+ # @return [RedemptionsListResponseBody]
+ def list_redemptions(opts = {})
+ data, _status_code, _headers = list_redemptions_with_http_info(opts)
+ data
+ end
+
+ # List Redemptions
+ # Returns a list of redemptions previously created. The redemptions are returned in a sorted order, with the most recent redemptions appearing first. The response returns a list of redemptions of all vouchers. # Filtering results The result can be narrowed according to specified (or default) filters, for example, you can sort redemptions by date: https://api.voucherify.io/v1/redemptions?limit 3&[created_at][before] 2017-09-08T13:52:18.227Z. A filter based on the object created_at field narrows down the results and lists redemptions done before or after a particular date time. You can use the following options: [created_at][after], [created_at][before]. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z. # Failed Redemptions A redemption may fail for various reasons. You can figure out an exact reason from the failure_code: - resource_not_found - voucher with given code does not exist - voucher_not_active - voucher is not active yet (before start date) - voucher_expired - voucher has already expired (after expiration date) - voucher_disabled - voucher has been disabled (active: false) - quantity_exceeded - vouchers redemptions limit has been exceeded - gift_amount_exceeded - gift amount has been exceeded - customer_rules_violated - customer did not match the segment - order_rules_violated - order did not match validation rules - invalid_order - order was specified incorrectly - invalid_amount - order amount was specified incorrectly - missing_amount - order amount was not specified - missing_order_items - order items were not specified - missing_customer - customer was not specified
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [String] :result A filter on the list based on the redemption result. Available options are: SUCCESS, FAILURE. You can provide multiple values by repeating the param.
+ # @option opts [String] :campaign A filter by the campaign **name** that the redemption resources originate from.
+ # @option opts [String] :customer Return redemptions performed by the customer with given id or source_id.
+ # @option opts [ParameterOrderListRedemptions] :order Sorts the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [ParameterCreatedBeforeAfter] :created_at A filter on the list based on the object created_at field. The value is a dictionary with the following options: before, after. A date value must be presented in ISO 8601 format (2016-11-16T14:14:31Z or 2016-11-16). An example: [created_at][before] 2017-09-08T13:52:18.227Z
+ # @option opts [ParameterFiltersListRedemptions] :filters Filters for listing responses.
+ # @return [Array<(RedemptionsListResponseBody, Integer, Hash)>] RedemptionsListResponseBody data, response status code and response headers
+ private def list_redemptions_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RedemptionsApi.list_redemptions ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedemptionsApi.list_redemptions, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RedemptionsApi.list_redemptions, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling RedemptionsApi.list_redemptions, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/redemptions'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'result'] = opts[:'result'] if !opts[:'result'].nil?
+ query_params[:'campaign'] = opts[:'campaign'] if !opts[:'campaign'].nil?
+ query_params[:'customer'] = opts[:'customer'] if !opts[:'customer'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+ query_params[:'created_at'] = opts[:'created_at'] if !opts[:'created_at'].nil?
+ query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'RedemptionsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RedemptionsApi.list_redemptions",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RedemptionsApi#list_redemptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Redeem Stackable Discounts
+ # # How API returns calculated discounts and order amounts in the response In the table below, you can see the logic the API follows to calculate discounts and amounts: 📘 Rollbacks You cant roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your rollback request. 📘 Also available on client-side This method is also accessible through public keys which you can use in client-side apps: mobile and web browser apps. Go to the dedicated endpoint to learn more. - Use X-Client-Application-Id as the application ID header. - Use X-Client-Token as the appliction secret key header. - Use client-side base URL. - Use an origin header for your custom domain.
+ # @param [Hash] opts the optional parameters
+ # @option opts [RedemptionsRedeemRequestBody] :redemptions_redeem_request_body
+ # @return [RedemptionsRedeemResponseBody]
+ def redeem_stacked_discounts(opts = {})
+ data, _status_code, _headers = redeem_stacked_discounts_with_http_info(opts)
+ data
+ end
+
+ # Redeem Stackable Discounts
+ # # How API returns calculated discounts and order amounts in the response In the table below, you can see the logic the API follows to calculate discounts and amounts: 📘 Rollbacks You cant roll back a child redemption. When you call rollback on a stacked redemption, all child redemptions will be rolled back. You need to refer to a parent redemption ID in your rollback request. 📘 Also available on client-side This method is also accessible through public keys which you can use in client-side apps: mobile and web browser apps. Go to the dedicated endpoint to learn more. - Use X-Client-Application-Id as the application ID header. - Use X-Client-Token as the appliction secret key header. - Use client-side base URL. - Use an origin header for your custom domain.
+ # @param [Hash] opts the optional parameters
+ # @option opts [RedemptionsRedeemRequestBody] :redemptions_redeem_request_body
+ # @return [Array<(RedemptionsRedeemResponseBody, Integer, Hash)>] RedemptionsRedeemResponseBody data, response status code and response headers
+ private def redeem_stacked_discounts_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RedemptionsApi.redeem_stacked_discounts ...'
+ end
+ # resource path
+ local_var_path = '/v1/redemptions'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'redemptions_redeem_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'RedemptionsRedeemResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RedemptionsApi.redeem_stacked_discounts",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RedemptionsApi#redeem_stacked_discounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Rollback Redemption
+ # Your business logic may include a case when you need to undo a redemption. You can revert a redemption by calling this API endpoint. # Effect The operation - creates a rollback entry in vouchers redemption history (redemption.redemption_entries) and - gives 1 redemption back to the pool (decreases redeemed_quantity by 1). # Returned funds In case of *gift card vouchers*, this method returns funds back according to the source redemption. In case of *loyalty card vouchers*, this method returns points back according to the source redemption.
+ # @param redemption_id [String] The original redemption ID to be rolled back (undone).
+ # @param [Hash] opts the optional parameters
+ # @option opts [String] :reason Reason for the rollback.
+ # @option opts [String] :tracking_id Customers source_id.
+ # @option opts [RedemptionsRollbackCreateRequestBody] :redemptions_rollback_create_request_body Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.
+ # @return [RedemptionsRollbackCreateResponseBody]
+ def rollback_redemption(redemption_id, opts = {})
+ data, _status_code, _headers = rollback_redemption_with_http_info(redemption_id, opts)
+ data
+ end
+
+ # Rollback Redemption
+ # Your business logic may include a case when you need to undo a redemption. You can revert a redemption by calling this API endpoint. # Effect The operation - creates a rollback entry in vouchers redemption history (redemption.redemption_entries) and - gives 1 redemption back to the pool (decreases redeemed_quantity by 1). # Returned funds In case of *gift card vouchers*, this method returns funds back according to the source redemption. In case of *loyalty card vouchers*, this method returns points back according to the source redemption.
+ # @param redemption_id [String] The original redemption ID to be rolled back (undone).
+ # @param [Hash] opts the optional parameters
+ # @option opts [String] :reason Reason for the rollback.
+ # @option opts [String] :tracking_id Customers source_id.
+ # @option opts [RedemptionsRollbackCreateRequestBody] :redemptions_rollback_create_request_body Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.
+ # @return [Array<(RedemptionsRollbackCreateResponseBody, Integer, Hash)>] RedemptionsRollbackCreateResponseBody data, response status code and response headers
+ private def rollback_redemption_with_http_info(redemption_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RedemptionsApi.rollback_redemption ...'
+ end
+ # verify the required parameter 'redemption_id' is set
+ if @api_client.config.client_side_validation && redemption_id.nil?
+ fail ArgumentError, "Missing the required parameter 'redemption_id' when calling RedemptionsApi.rollback_redemption"
+ end
+ # resource path
+ local_var_path = '/v1/redemptions/{redemptionId}/rollback'.sub('{' + 'redemptionId' + '}', CGI.escape(redemption_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'reason'] = opts[:'reason'] if !opts[:'reason'].nil?
+ query_params[:'tracking_id'] = opts[:'tracking_id'] if !opts[:'tracking_id'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'redemptions_rollback_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'RedemptionsRollbackCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RedemptionsApi.rollback_redemption",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RedemptionsApi#rollback_redemption\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Rollback Stackable Redemptions
+ # Rollback a stackable redemption. When you rollback a stacked redemption, all child redemptions will be rolled back. Provide the parent redemption ID as the path parameter.
+ # @param parent_redemption_id [String] Unique identifier of a parent redemption, e.g. r_JQfm73zWSJFQxs3bGxweYjgm.
+ # @param [Hash] opts the optional parameters
+ # @option opts [String] :reason Reason for the rollback.
+ # @option opts [String] :tracking_id Customers source_id.
+ # @option opts [RedemptionsRollbacksCreateRequestBody] :redemptions_rollbacks_create_request_body Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.
+ # @return [RedemptionsRollbacksCreateResponseBody]
+ def rollback_stacked_redemptions(parent_redemption_id, opts = {})
+ data, _status_code, _headers = rollback_stacked_redemptions_with_http_info(parent_redemption_id, opts)
+ data
+ end
+
+ # Rollback Stackable Redemptions
+ # Rollback a stackable redemption. When you rollback a stacked redemption, all child redemptions will be rolled back. Provide the parent redemption ID as the path parameter.
+ # @param parent_redemption_id [String] Unique identifier of a parent redemption, e.g. r_JQfm73zWSJFQxs3bGxweYjgm.
+ # @param [Hash] opts the optional parameters
+ # @option opts [String] :reason Reason for the rollback.
+ # @option opts [String] :tracking_id Customers source_id.
+ # @option opts [RedemptionsRollbacksCreateRequestBody] :redemptions_rollbacks_create_request_body Add information about the original customer and order. Customer data and Redemption metadata can be updated in Voucherify when passing the customer data in the request body.
+ # @return [Array<(RedemptionsRollbacksCreateResponseBody, Integer, Hash)>] RedemptionsRollbacksCreateResponseBody data, response status code and response headers
+ private def rollback_stacked_redemptions_with_http_info(parent_redemption_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RedemptionsApi.rollback_stacked_redemptions ...'
+ end
+ # verify the required parameter 'parent_redemption_id' is set
+ if @api_client.config.client_side_validation && parent_redemption_id.nil?
+ fail ArgumentError, "Missing the required parameter 'parent_redemption_id' when calling RedemptionsApi.rollback_stacked_redemptions"
+ end
+ # resource path
+ local_var_path = '/v1/redemptions/{parentRedemptionId}/rollbacks'.sub('{' + 'parentRedemptionId' + '}', CGI.escape(parent_redemption_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'reason'] = opts[:'reason'] if !opts[:'reason'].nil?
+ query_params[:'tracking_id'] = opts[:'tracking_id'] if !opts[:'tracking_id'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'redemptions_rollbacks_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'RedemptionsRollbacksCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RedemptionsApi.rollback_stacked_redemptions",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RedemptionsApi#rollback_stacked_redemptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/rewards_api.rb b/lib/VoucherifySdk/api/rewards_api.rb
new file mode 100644
index 00000000..3e96d13a
--- /dev/null
+++ b/lib/VoucherifySdk/api/rewards_api.rb
@@ -0,0 +1,446 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class RewardsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create Reward Assignment
+ # Assigns a reward to a specified loyalty campaign.
+ # @param reward_id [String] A unique reward ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [RewardsAssignmentsCreateRequestBody] :rewards_assignments_create_request_body Provide the campaign ID of the campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points.
+ # @return [RewardsAssignmentsCreateResponseBody]
+ def create_reward_assignment(reward_id, opts = {})
+ data, _status_code, _headers = create_reward_assignment_with_http_info(reward_id, opts)
+ data
+ end
+
+ # Create Reward Assignment
+ # Assigns a reward to a specified loyalty campaign.
+ # @param reward_id [String] A unique reward ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [RewardsAssignmentsCreateRequestBody] :rewards_assignments_create_request_body Provide the campaign ID of the campaign to which the reward is to be assigned and define the cost of the reward in terms of loyalty points.
+ # @return [Array<(RewardsAssignmentsCreateResponseBody, Integer, Hash)>] RewardsAssignmentsCreateResponseBody data, response status code and response headers
+ private def create_reward_assignment_with_http_info(reward_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RewardsApi.create_reward_assignment ...'
+ end
+ # verify the required parameter 'reward_id' is set
+ if @api_client.config.client_side_validation && reward_id.nil?
+ fail ArgumentError, "Missing the required parameter 'reward_id' when calling RewardsApi.create_reward_assignment"
+ end
+ # resource path
+ local_var_path = '/v1/rewards/{rewardId}/assignments'.sub('{' + 'rewardId' + '}', CGI.escape(reward_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'rewards_assignments_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'RewardsAssignmentsCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RewardsApi.create_reward_assignment",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RewardsApi#create_reward_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Reward
+ # Delete a reward.
+ # @param reward_id [String] A unique reward ID.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_reward(reward_id, opts = {})
+ delete_reward_with_http_info(reward_id, opts)
+ nil
+ end
+
+ # Delete Reward
+ # Delete a reward.
+ # @param reward_id [String] A unique reward ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_reward_with_http_info(reward_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RewardsApi.delete_reward ...'
+ end
+ # verify the required parameter 'reward_id' is set
+ if @api_client.config.client_side_validation && reward_id.nil?
+ fail ArgumentError, "Missing the required parameter 'reward_id' when calling RewardsApi.delete_reward"
+ end
+ # resource path
+ local_var_path = '/v1/rewards/{rewardId}'.sub('{' + 'rewardId' + '}', CGI.escape(reward_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RewardsApi.delete_reward",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RewardsApi#delete_reward\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Reward Assignment
+ # This method deletes a reward assignment for a particular reward.
+ # @param reward_id [String] A unique reward ID.
+ # @param assignment_id [String] A unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_reward_assignment(reward_id, assignment_id, opts = {})
+ delete_reward_assignment_with_http_info(reward_id, assignment_id, opts)
+ nil
+ end
+
+ # Delete Reward Assignment
+ # This method deletes a reward assignment for a particular reward.
+ # @param reward_id [String] A unique reward ID.
+ # @param assignment_id [String] A unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_reward_assignment_with_http_info(reward_id, assignment_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RewardsApi.delete_reward_assignment ...'
+ end
+ # verify the required parameter 'reward_id' is set
+ if @api_client.config.client_side_validation && reward_id.nil?
+ fail ArgumentError, "Missing the required parameter 'reward_id' when calling RewardsApi.delete_reward_assignment"
+ end
+ # verify the required parameter 'assignment_id' is set
+ if @api_client.config.client_side_validation && assignment_id.nil?
+ fail ArgumentError, "Missing the required parameter 'assignment_id' when calling RewardsApi.delete_reward_assignment"
+ end
+ # resource path
+ local_var_path = '/v1/rewards/{rewardId}/assignments/{assignmentId}'.sub('{' + 'rewardId' + '}', CGI.escape(reward_id.to_s)).sub('{' + 'assignmentId' + '}', CGI.escape(assignment_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RewardsApi.delete_reward_assignment",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RewardsApi#delete_reward_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Reward Assignment
+ # Retrieve a reward assignment.
+ # @param reward_id [String] A unique reward ID.
+ # @param assignment_id [String] A unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [RewardsAssignmentsGetResponseBody]
+ def get_reward_assignment(reward_id, assignment_id, opts = {})
+ data, _status_code, _headers = get_reward_assignment_with_http_info(reward_id, assignment_id, opts)
+ data
+ end
+
+ # Get Reward Assignment
+ # Retrieve a reward assignment.
+ # @param reward_id [String] A unique reward ID.
+ # @param assignment_id [String] A unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(RewardsAssignmentsGetResponseBody, Integer, Hash)>] RewardsAssignmentsGetResponseBody data, response status code and response headers
+ private def get_reward_assignment_with_http_info(reward_id, assignment_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RewardsApi.get_reward_assignment ...'
+ end
+ # verify the required parameter 'reward_id' is set
+ if @api_client.config.client_side_validation && reward_id.nil?
+ fail ArgumentError, "Missing the required parameter 'reward_id' when calling RewardsApi.get_reward_assignment"
+ end
+ # verify the required parameter 'assignment_id' is set
+ if @api_client.config.client_side_validation && assignment_id.nil?
+ fail ArgumentError, "Missing the required parameter 'assignment_id' when calling RewardsApi.get_reward_assignment"
+ end
+ # resource path
+ local_var_path = '/v1/rewards/{rewardId}/assignments/{assignmentId}'.sub('{' + 'rewardId' + '}', CGI.escape(reward_id.to_s)).sub('{' + 'assignmentId' + '}', CGI.escape(assignment_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'RewardsAssignmentsGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RewardsApi.get_reward_assignment",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RewardsApi#get_reward_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Reward Assignments
+ # Retrieve reward assignments by the reward ID.
+ # @param reward_id [String] A unique reward ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [RewardsAssignmentsListResponseBody]
+ def list_reward_assignments(reward_id, opts = {})
+ data, _status_code, _headers = list_reward_assignments_with_http_info(reward_id, opts)
+ data
+ end
+
+ # List Reward Assignments
+ # Retrieve reward assignments by the reward ID.
+ # @param reward_id [String] A unique reward ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [Array<(RewardsAssignmentsListResponseBody, Integer, Hash)>] RewardsAssignmentsListResponseBody data, response status code and response headers
+ private def list_reward_assignments_with_http_info(reward_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RewardsApi.list_reward_assignments ...'
+ end
+ # verify the required parameter 'reward_id' is set
+ if @api_client.config.client_side_validation && reward_id.nil?
+ fail ArgumentError, "Missing the required parameter 'reward_id' when calling RewardsApi.list_reward_assignments"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RewardsApi.list_reward_assignments, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling RewardsApi.list_reward_assignments, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling RewardsApi.list_reward_assignments, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/rewards/{rewardId}/assignments'.sub('{' + 'rewardId' + '}', CGI.escape(reward_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'RewardsAssignmentsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RewardsApi.list_reward_assignments",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RewardsApi#list_reward_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Reward Assignment
+ # Update the number of points needed to successfully redeem the reward.
+ # @param reward_id [String] A unique reward ID.
+ # @param assignment_id [String] A unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [RewardsAssignmentsUpdateRequestBody] :rewards_assignments_update_request_body Define the number of points required to exchange for the reward.
+ # @return [RewardsAssignmentsUpdateResponseBody]
+ def update_reward_assignment(reward_id, assignment_id, opts = {})
+ data, _status_code, _headers = update_reward_assignment_with_http_info(reward_id, assignment_id, opts)
+ data
+ end
+
+ # Update Reward Assignment
+ # Update the number of points needed to successfully redeem the reward.
+ # @param reward_id [String] A unique reward ID.
+ # @param assignment_id [String] A unique reward assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [RewardsAssignmentsUpdateRequestBody] :rewards_assignments_update_request_body Define the number of points required to exchange for the reward.
+ # @return [Array<(RewardsAssignmentsUpdateResponseBody, Integer, Hash)>] RewardsAssignmentsUpdateResponseBody data, response status code and response headers
+ private def update_reward_assignment_with_http_info(reward_id, assignment_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: RewardsApi.update_reward_assignment ...'
+ end
+ # verify the required parameter 'reward_id' is set
+ if @api_client.config.client_side_validation && reward_id.nil?
+ fail ArgumentError, "Missing the required parameter 'reward_id' when calling RewardsApi.update_reward_assignment"
+ end
+ # verify the required parameter 'assignment_id' is set
+ if @api_client.config.client_side_validation && assignment_id.nil?
+ fail ArgumentError, "Missing the required parameter 'assignment_id' when calling RewardsApi.update_reward_assignment"
+ end
+ # resource path
+ local_var_path = '/v1/rewards/{rewardId}/assignments/{assignmentId}'.sub('{' + 'rewardId' + '}', CGI.escape(reward_id.to_s)).sub('{' + 'assignmentId' + '}', CGI.escape(assignment_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'rewards_assignments_update_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'RewardsAssignmentsUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"RewardsApi.update_reward_assignment",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: RewardsApi#update_reward_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/segments_api.rb b/lib/VoucherifySdk/api/segments_api.rb
new file mode 100644
index 00000000..cde4f208
--- /dev/null
+++ b/lib/VoucherifySdk/api/segments_api.rb
@@ -0,0 +1,83 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class SegmentsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Delete Segment
+ # This method deletes a customer segment.
+ # @param segment_id [String] A unique customer segment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_segment(segment_id, opts = {})
+ delete_segment_with_http_info(segment_id, opts)
+ nil
+ end
+
+ # Delete Segment
+ # This method deletes a customer segment.
+ # @param segment_id [String] A unique customer segment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_segment_with_http_info(segment_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: SegmentsApi.delete_segment ...'
+ end
+ # verify the required parameter 'segment_id' is set
+ if @api_client.config.client_side_validation && segment_id.nil?
+ fail ArgumentError, "Missing the required parameter 'segment_id' when calling SegmentsApi.delete_segment"
+ end
+ # resource path
+ local_var_path = '/v1/segments/{segmentId}'.sub('{' + 'segmentId' + '}', CGI.escape(segment_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"SegmentsApi.delete_segment",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: SegmentsApi#delete_segment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/validation_rules_api.rb b/lib/VoucherifySdk/api/validation_rules_api.rb
new file mode 100644
index 00000000..97238643
--- /dev/null
+++ b/lib/VoucherifySdk/api/validation_rules_api.rb
@@ -0,0 +1,599 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class ValidationRulesApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Create Validation Rules
+ # Create validation rules.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ValidationRulesCreateRequestBody] :validation_rules_create_request_body Specify the validation rules parameters.
+ # @return [ValidationRulesCreateResponseBody]
+ def create_validation_rules(opts = {})
+ data, _status_code, _headers = create_validation_rules_with_http_info(opts)
+ data
+ end
+
+ # Create Validation Rules
+ # Create validation rules.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ValidationRulesCreateRequestBody] :validation_rules_create_request_body Specify the validation rules parameters.
+ # @return [Array<(ValidationRulesCreateResponseBody, Integer, Hash)>] ValidationRulesCreateResponseBody data, response status code and response headers
+ private def create_validation_rules_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ValidationRulesApi.create_validation_rules ...'
+ end
+ # resource path
+ local_var_path = '/v1/validation-rules'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'validation_rules_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ValidationRulesCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ValidationRulesApi.create_validation_rules",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ValidationRulesApi#create_validation_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Validation Rule Assignment
+ # This method deletes a validation rule assignment.
+ # @param validation_rule_id [String] A unique validation rule ID.
+ # @param assignment_id [String] A unique validation rule assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_validation_rule_assignment(validation_rule_id, assignment_id, opts = {})
+ delete_validation_rule_assignment_with_http_info(validation_rule_id, assignment_id, opts)
+ nil
+ end
+
+ # Delete Validation Rule Assignment
+ # This method deletes a validation rule assignment.
+ # @param validation_rule_id [String] A unique validation rule ID.
+ # @param assignment_id [String] A unique validation rule assignment ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_validation_rule_assignment_with_http_info(validation_rule_id, assignment_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ValidationRulesApi.delete_validation_rule_assignment ...'
+ end
+ # verify the required parameter 'validation_rule_id' is set
+ if @api_client.config.client_side_validation && validation_rule_id.nil?
+ fail ArgumentError, "Missing the required parameter 'validation_rule_id' when calling ValidationRulesApi.delete_validation_rule_assignment"
+ end
+ # verify the required parameter 'assignment_id' is set
+ if @api_client.config.client_side_validation && assignment_id.nil?
+ fail ArgumentError, "Missing the required parameter 'assignment_id' when calling ValidationRulesApi.delete_validation_rule_assignment"
+ end
+ # resource path
+ local_var_path = '/v1/validation-rules/{validationRuleId}/assignments/{assignmentId}'.sub('{' + 'validationRuleId' + '}', CGI.escape(validation_rule_id.to_s)).sub('{' + 'assignmentId' + '}', CGI.escape(assignment_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ValidationRulesApi.delete_validation_rule_assignment",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ValidationRulesApi#delete_validation_rule_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Delete Validation Rule
+ # This method deletes a validation rule.
+ # @param validation_rule_id [String] A unique validation rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def delete_validation_rules(validation_rule_id, opts = {})
+ delete_validation_rules_with_http_info(validation_rule_id, opts)
+ nil
+ end
+
+ # Delete Validation Rule
+ # This method deletes a validation rule.
+ # @param validation_rule_id [String] A unique validation rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_validation_rules_with_http_info(validation_rule_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ValidationRulesApi.delete_validation_rules ...'
+ end
+ # verify the required parameter 'validation_rule_id' is set
+ if @api_client.config.client_side_validation && validation_rule_id.nil?
+ fail ArgumentError, "Missing the required parameter 'validation_rule_id' when calling ValidationRulesApi.delete_validation_rules"
+ end
+ # resource path
+ local_var_path = '/v1/validation-rules/{validationRuleId}'.sub('{' + 'validationRuleId' + '}', CGI.escape(validation_rule_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ValidationRulesApi.delete_validation_rules",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ValidationRulesApi#delete_validation_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Validation Rule
+ # Retrieve the details of a validation rule.
+ # @param validation_rule_id [String] A unique validation rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [ValidationRulesGetResponseBody]
+ def get_validation_rule(validation_rule_id, opts = {})
+ data, _status_code, _headers = get_validation_rule_with_http_info(validation_rule_id, opts)
+ data
+ end
+
+ # Get Validation Rule
+ # Retrieve the details of a validation rule.
+ # @param validation_rule_id [String] A unique validation rule ID.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(ValidationRulesGetResponseBody, Integer, Hash)>] ValidationRulesGetResponseBody data, response status code and response headers
+ private def get_validation_rule_with_http_info(validation_rule_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ValidationRulesApi.get_validation_rule ...'
+ end
+ # verify the required parameter 'validation_rule_id' is set
+ if @api_client.config.client_side_validation && validation_rule_id.nil?
+ fail ArgumentError, "Missing the required parameter 'validation_rule_id' when calling ValidationRulesApi.get_validation_rule"
+ end
+ # resource path
+ local_var_path = '/v1/validation-rules/{validationRuleId}'.sub('{' + 'validationRuleId' + '}', CGI.escape(validation_rule_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ValidationRulesGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ValidationRulesApi.get_validation_rule",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ValidationRulesApi#get_validation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Validation Rule Assignments
+ # Retrieve validation rule assignments for a specific validation rule.
+ # @param validation_rule_id [String] Unique validation rule ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListValidationRuleAssignments] :order This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [ValidationRulesAssignmentsListResponseBody]
+ def list_validation_rule_assignments(validation_rule_id, opts = {})
+ data, _status_code, _headers = list_validation_rule_assignments_with_http_info(validation_rule_id, opts)
+ data
+ end
+
+ # List Validation Rule Assignments
+ # Retrieve validation rule assignments for a specific validation rule.
+ # @param validation_rule_id [String] Unique validation rule ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListValidationRuleAssignments] :order This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [Array<(ValidationRulesAssignmentsListResponseBody, Integer, Hash)>] ValidationRulesAssignmentsListResponseBody data, response status code and response headers
+ private def list_validation_rule_assignments_with_http_info(validation_rule_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ValidationRulesApi.list_validation_rule_assignments ...'
+ end
+ # verify the required parameter 'validation_rule_id' is set
+ if @api_client.config.client_side_validation && validation_rule_id.nil?
+ fail ArgumentError, "Missing the required parameter 'validation_rule_id' when calling ValidationRulesApi.list_validation_rule_assignments"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ValidationRulesApi.list_validation_rule_assignments, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ValidationRulesApi.list_validation_rule_assignments, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ValidationRulesApi.list_validation_rule_assignments, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/validation-rules/{validationRuleId}/assignments'.sub('{' + 'validationRuleId' + '}', CGI.escape(validation_rule_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ValidationRulesAssignmentsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ValidationRulesApi.list_validation_rule_assignments",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ValidationRulesApi#list_validation_rule_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Validation Rules
+ # Retrieve validation rules.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListValidationRules] :order This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :start_date Timestamp representing the date and time which results must start on. Represented in ISO 8601 format.
+ # @option opts [Time] :end_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @return [ValidationRulesListResponseBody]
+ def list_validation_rules(opts = {})
+ data, _status_code, _headers = list_validation_rules_with_http_info(opts)
+ data
+ end
+
+ # List Validation Rules
+ # Retrieve validation rules.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [ParameterOrderListValidationRules] :order This is a property that controls the sorting direction of the results. Sort the results using one of the filtering options, where the dash - preceding a sorting option means sorting in a descending order.
+ # @option opts [Time] :start_date Timestamp representing the date and time which results must start on. Represented in ISO 8601 format.
+ # @option opts [Time] :end_date Timestamp representing the date and time which results must end on. Represented in ISO 8601 format.
+ # @return [Array<(ValidationRulesListResponseBody, Integer, Hash)>] ValidationRulesListResponseBody data, response status code and response headers
+ private def list_validation_rules_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ValidationRulesApi.list_validation_rules ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ValidationRulesApi.list_validation_rules, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ValidationRulesApi.list_validation_rules, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ValidationRulesApi.list_validation_rules, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/validation-rules'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+ query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
+ query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ValidationRulesListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ValidationRulesApi.list_validation_rules",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ValidationRulesApi#list_validation_rules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Validation Rules' Assignment(s)
+ # List all validation rules assignments or filter the results using the related object ID or the validation rule ID query parameters. # How to retrieve specific validation rule assignments(s) ## Related object ID To find an assignment for a particular resource, you can use the ID of the object to which the validation rule was assigned. This could be, for example, an ID of a: voucher, campaign, distribution, reward assignment, earning rule, promotion tier. ## Validation rule ID You can use the validation rule ID to find assignment(s) for a specific validation rule.
+ # @param [Hash] opts the optional parameters
+ # @option opts [String] :related_object_id The resource ID to which the validation rule was assigned; this could be, for example, a resource ID of a voucher, campaign, earning rule, reward assignment, promotion tier, or distribution.
+ # @option opts [String] :rule Validation rule ID.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [String] :order Sorts the results using one of the filtering options: -created_at, created_at, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [ValidationRulesAssignmentsListResponseBody]
+ def list_validation_rules_assignments(opts = {})
+ data, _status_code, _headers = list_validation_rules_assignments_with_http_info(opts)
+ data
+ end
+
+ # List Validation Rules' Assignment(s)
+ # List all validation rules assignments or filter the results using the related object ID or the validation rule ID query parameters. # How to retrieve specific validation rule assignments(s) ## Related object ID To find an assignment for a particular resource, you can use the ID of the object to which the validation rule was assigned. This could be, for example, an ID of a: voucher, campaign, distribution, reward assignment, earning rule, promotion tier. ## Validation rule ID You can use the validation rule ID to find assignment(s) for a specific validation rule.
+ # @param [Hash] opts the optional parameters
+ # @option opts [String] :related_object_id The resource ID to which the validation rule was assigned; this could be, for example, a resource ID of a voucher, campaign, earning rule, reward assignment, promotion tier, or distribution.
+ # @option opts [String] :rule Validation rule ID.
+ # @option opts [Integer] :page Which page of results to return.
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [String] :order Sorts the results using one of the filtering options: -created_at, created_at, where the dash - preceding a sorting option means sorting in a descending order.
+ # @return [Array<(ValidationRulesAssignmentsListResponseBody, Integer, Hash)>] ValidationRulesAssignmentsListResponseBody data, response status code and response headers
+ private def list_validation_rules_assignments_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ValidationRulesApi.list_validation_rules_assignments ...'
+ end
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling ValidationRulesApi.list_validation_rules_assignments, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ValidationRulesApi.list_validation_rules_assignments, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ValidationRulesApi.list_validation_rules_assignments, must be greater than or equal to 1.'
+ end
+
+ # resource path
+ local_var_path = '/v1/validation-rules-assignments'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'related_object_id'] = opts[:'related_object_id'] if !opts[:'related_object_id'].nil?
+ query_params[:'rule'] = opts[:'rule'] if !opts[:'rule'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ValidationRulesAssignmentsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ValidationRulesApi.list_validation_rules_assignments",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ValidationRulesApi#list_validation_rules_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Update Validation Rule
+ # Update validation rule parameters.
+ # @param validation_rule_id [String] A unique validation rule ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ValidationRulesUpdateRequestBody] :validation_rules_update_request_body Specify the parameters to be updated.
+ # @return [ValidationRulesUpdateResponseBody]
+ def update_validation_rule(validation_rule_id, opts = {})
+ data, _status_code, _headers = update_validation_rule_with_http_info(validation_rule_id, opts)
+ data
+ end
+
+ # Update Validation Rule
+ # Update validation rule parameters.
+ # @param validation_rule_id [String] A unique validation rule ID.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ValidationRulesUpdateRequestBody] :validation_rules_update_request_body Specify the parameters to be updated.
+ # @return [Array<(ValidationRulesUpdateResponseBody, Integer, Hash)>] ValidationRulesUpdateResponseBody data, response status code and response headers
+ private def update_validation_rule_with_http_info(validation_rule_id, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ValidationRulesApi.update_validation_rule ...'
+ end
+ # verify the required parameter 'validation_rule_id' is set
+ if @api_client.config.client_side_validation && validation_rule_id.nil?
+ fail ArgumentError, "Missing the required parameter 'validation_rule_id' when calling ValidationRulesApi.update_validation_rule"
+ end
+ # resource path
+ local_var_path = '/v1/validation-rules/{validationRuleId}'.sub('{' + 'validationRuleId' + '}', CGI.escape(validation_rule_id.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'validation_rules_update_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ValidationRulesUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ValidationRulesApi.update_validation_rule",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ValidationRulesApi#update_validation_rule\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/validations_api.rb b/lib/VoucherifySdk/api/validations_api.rb
new file mode 100644
index 00000000..68fb3268
--- /dev/null
+++ b/lib/VoucherifySdk/api/validations_api.rb
@@ -0,0 +1,86 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class ValidationsApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Validate Stackable Discounts
+ # Verify redeemables provided in the request. This method is designed for server side integration which means that it is accessible only through private keys.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ValidationsValidateRequestBody] :validations_validate_request_body
+ # @return [ValidationsValidateResponseBody]
+ def validate_stacked_discounts(opts = {})
+ data, _status_code, _headers = validate_stacked_discounts_with_http_info(opts)
+ data
+ end
+
+ # Validate Stackable Discounts
+ # Verify redeemables provided in the request. This method is designed for server side integration which means that it is accessible only through private keys.
+ # @param [Hash] opts the optional parameters
+ # @option opts [ValidationsValidateRequestBody] :validations_validate_request_body
+ # @return [Array<(ValidationsValidateResponseBody, Integer, Hash)>] ValidationsValidateResponseBody data, response status code and response headers
+ private def validate_stacked_discounts_with_http_info(opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: ValidationsApi.validate_stacked_discounts ...'
+ end
+ # resource path
+ local_var_path = '/v1/validations'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'validations_validate_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'ValidationsValidateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"ValidationsApi.validate_stacked_discounts",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: ValidationsApi#validate_stacked_discounts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api/vouchers_api.rb b/lib/VoucherifySdk/api/vouchers_api.rb
new file mode 100644
index 00000000..28b87330
--- /dev/null
+++ b/lib/VoucherifySdk/api/vouchers_api.rb
@@ -0,0 +1,636 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'cgi'
+
+module VoucherifySdk
+ class VouchersApi
+ attr_accessor :api_client
+
+ def initialize(api_client = ApiClient.default)
+ @api_client = api_client
+ end
+ # Delete Voucher
+ # Deletes a voucher. This operation cannot be undone. Additionally, this operation removes any redemptions on the voucher.
+ # @param code [String] A unique **code** that identifies the voucher.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :force If this flag is set to true, the voucher will be removed permanently. Going forward, the user will be able to create another voucher with exactly the same code.
+ # @return [nil]
+ def delete_voucher(code, opts = {})
+ delete_voucher_with_http_info(code, opts)
+ nil
+ end
+
+ # Delete Voucher
+ # Deletes a voucher. This operation cannot be undone. Additionally, this operation removes any redemptions on the voucher.
+ # @param code [String] A unique **code** that identifies the voucher.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Boolean] :force If this flag is set to true, the voucher will be removed permanently. Going forward, the user will be able to create another voucher with exactly the same code.
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def delete_voucher_with_http_info(code, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: VouchersApi.delete_voucher ...'
+ end
+ # verify the required parameter 'code' is set
+ if @api_client.config.client_side_validation && code.nil?
+ fail ArgumentError, "Missing the required parameter 'code' when calling VouchersApi.delete_voucher"
+ end
+ # resource path
+ local_var_path = '/v1/vouchers/{code}'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"VouchersApi.delete_voucher",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: VouchersApi#delete_voucher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Disable Voucher
+ # There are various times when youll want to manage a vouchers accessibility. This can be done by two API methods for managing the voucher state - *enable* and *disable*. ___ This method sets the voucher state to **inactive**. The voucher cannot be redeemed.
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+ # @param [Hash] opts the optional parameters
+ # @return [VouchersDisableResponseBody]
+ def disable_voucher(code, opts = {})
+ data, _status_code, _headers = disable_voucher_with_http_info(code, opts)
+ data
+ end
+
+ # Disable Voucher
+ # There are various times when youll want to manage a vouchers accessibility. This can be done by two API methods for managing the voucher state - *enable* and *disable*. ___ This method sets the voucher state to **inactive**. The voucher cannot be redeemed.
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(VouchersDisableResponseBody, Integer, Hash)>] VouchersDisableResponseBody data, response status code and response headers
+ private def disable_voucher_with_http_info(code, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: VouchersApi.disable_voucher ...'
+ end
+ # verify the required parameter 'code' is set
+ if @api_client.config.client_side_validation && code.nil?
+ fail ArgumentError, "Missing the required parameter 'code' when calling VouchersApi.disable_voucher"
+ end
+ # resource path
+ local_var_path = '/v1/vouchers/{code}/disable'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'VouchersDisableResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"VouchersApi.disable_voucher",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: VouchersApi#disable_voucher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Enable Voucher
+ # There are various times when youll want to manage a vouchers accessibility. This can be done by two API methods for managing the voucher state - *enable* and *disable*. ___ The method sets the voucher state to **active**. The voucher can be redeemed - only if the redemption occurs after the start date and the voucher is not expired.
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+ # @param [Hash] opts the optional parameters
+ # @return [VouchersEnableResponseBody]
+ def enable_voucher(code, opts = {})
+ data, _status_code, _headers = enable_voucher_with_http_info(code, opts)
+ data
+ end
+
+ # Enable Voucher
+ # There are various times when youll want to manage a vouchers accessibility. This can be done by two API methods for managing the voucher state - *enable* and *disable*. ___ The method sets the voucher state to **active**. The voucher can be redeemed - only if the redemption occurs after the start date and the voucher is not expired.
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(VouchersEnableResponseBody, Integer, Hash)>] VouchersEnableResponseBody data, response status code and response headers
+ private def enable_voucher_with_http_info(code, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: VouchersApi.enable_voucher ...'
+ end
+ # verify the required parameter 'code' is set
+ if @api_client.config.client_side_validation && code.nil?
+ fail ArgumentError, "Missing the required parameter 'code' when calling VouchersApi.enable_voucher"
+ end
+ # resource path
+ local_var_path = '/v1/vouchers/{code}/enable'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'VouchersEnableResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"VouchersApi.enable_voucher",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: VouchersApi#enable_voucher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Export Voucher Transactions
+ # Export transactions that are associated with credit movements on a gift card or loyalty card.
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+ # @param [Hash] opts the optional parameters
+ # @option opts [VouchersTransactionsExportCreateRequestBody] :vouchers_transactions_export_create_request_body Specify the parameters for the transaction export.
+ # @return [VouchersTransactionsExportCreateResponseBody]
+ def export_voucher_transactions(code, opts = {})
+ data, _status_code, _headers = export_voucher_transactions_with_http_info(code, opts)
+ data
+ end
+
+ # Export Voucher Transactions
+ # Export transactions that are associated with credit movements on a gift card or loyalty card.
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+ # @param [Hash] opts the optional parameters
+ # @option opts [VouchersTransactionsExportCreateRequestBody] :vouchers_transactions_export_create_request_body Specify the parameters for the transaction export.
+ # @return [Array<(VouchersTransactionsExportCreateResponseBody, Integer, Hash)>] VouchersTransactionsExportCreateResponseBody data, response status code and response headers
+ private def export_voucher_transactions_with_http_info(code, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: VouchersApi.export_voucher_transactions ...'
+ end
+ # verify the required parameter 'code' is set
+ if @api_client.config.client_side_validation && code.nil?
+ fail ArgumentError, "Missing the required parameter 'code' when calling VouchersApi.export_voucher_transactions"
+ end
+ # resource path
+ local_var_path = '/v1/vouchers/{code}/transactions/export'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'vouchers_transactions_export_create_request_body'])
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'VouchersTransactionsExportCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"VouchersApi.export_voucher_transactions",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: VouchersApi#export_voucher_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Get Voucher
+ # Retrieves the voucher with the given code or unique Voucherify ID. You can either pass the voucher ID which was assigned by Voucherify, e.g., v_7HxHkf4VAkMuc8u4lZs78lyRwhRze5UE, or the code of the voucher as the path parameter value, e.g., 7fjWdr.
+ # @param code [String] A unique **code** that identifies the voucher.
+ # @param [Hash] opts the optional parameters
+ # @return [VouchersGetResponseBody]
+ def get_voucher(code, opts = {})
+ data, _status_code, _headers = get_voucher_with_http_info(code, opts)
+ data
+ end
+
+ # Get Voucher
+ # Retrieves the voucher with the given code or unique Voucherify ID. You can either pass the voucher ID which was assigned by Voucherify, e.g., v_7HxHkf4VAkMuc8u4lZs78lyRwhRze5UE, or the code of the voucher as the path parameter value, e.g., 7fjWdr.
+ # @param code [String] A unique **code** that identifies the voucher.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(VouchersGetResponseBody, Integer, Hash)>] VouchersGetResponseBody data, response status code and response headers
+ private def get_voucher_with_http_info(code, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: VouchersApi.get_voucher ...'
+ end
+ # verify the required parameter 'code' is set
+ if @api_client.config.client_side_validation && code.nil?
+ fail ArgumentError, "Missing the required parameter 'code' when calling VouchersApi.get_voucher"
+ end
+ # resource path
+ local_var_path = '/v1/vouchers/{code}'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'VouchersGetResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"VouchersApi.get_voucher",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: VouchersApi#get_voucher\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Import Vouchers using CSV
+ # Import standalone vouchers into the repository using a CSV file. The CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object. You can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons). ___ 📘 Standard voucher fields mapping - Go to the import vouchers endpoint to see all standard CSV fields description (body params section). - Supported CSV file headers: Code,Voucher Type,Value,Discount Type,Category,Start Date,Expiration Date,Redemption Limit,Redeemed Quantity, Redeemed Amount,Active,Additional Info,Custom Metadata Property Name - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - YYYY-MM-DD - YYYY-MM-DDTHH - YYYY-MM-DDTHH:mm - YYYY-MM-DDTHH:mm:ss - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ss.SSSZ - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. 📘 Categories In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the List Vouchers endpoint. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param file [File] File path.
+ # @param [Hash] opts the optional parameters
+ # @return [VouchersImportCsvCreateResponseBody]
+ def import_vouchers_using_csv(file, opts = {})
+ data, _status_code, _headers = import_vouchers_using_csv_with_http_info(file, opts)
+ data
+ end
+
+ # Import Vouchers using CSV
+ # Import standalone vouchers into the repository using a CSV file. The CSV file has to include headers in the first line. All properties listed in the file headers that cannot be mapped to standard voucher fields will be added to the metadata object. You can find an example CSV file [here](https://support.voucherify.io/article/45-import-codes-and-share-them-digitally#coupons). ___ 📘 Standard voucher fields mapping - Go to the import vouchers endpoint to see all standard CSV fields description (body params section). - Supported CSV file headers: Code,Voucher Type,Value,Discount Type,Category,Start Date,Expiration Date,Redemption Limit,Redeemed Quantity, Redeemed Amount,Active,Additional Info,Custom Metadata Property Name - **Start and expiration dates** need to be provided in compliance with the ISO 8601 norms. For example, 2020-03-11T09:00:00.000Z. - YYYY-MM-DD - YYYY-MM-DDTHH - YYYY-MM-DDTHH:mm - YYYY-MM-DDTHH:mm:ss - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ssZ - YYYY-MM-DDTHH:mm:ss.SSSZ - Custom code attributes (not supported by-default) need to be added as code **metadata**. - You **cannot import the same codes** to a single Voucherify Project. 📘 Categories In the structure representing your data, you can define a category that the voucher belongs to. You can later use the category of a voucher to group and search by specific criteria in the Dashboard and using the List Vouchers endpoint. This API request starts a process that affects Voucherify data in bulk. In case of small jobs (like bulk update) the request is put into a queue and processed once every other bulk request placed in the queue prior to this request is finished. However, when the job takes a longer time (like vouchers generation) then it is processed in small portions in a round-robin fashion. When there is a list of vouchers generation scheduled, then they will all have the IN_PROGRESS status shortly. This way, small jobs added just after scheduling big jobs of the same type will be processed in a short time window. The result will return the async ID. You can verify the status of your request via this API request.
+ # @param file [File] File path.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(VouchersImportCsvCreateResponseBody, Integer, Hash)>] VouchersImportCsvCreateResponseBody data, response status code and response headers
+ private def import_vouchers_using_csv_with_http_info(file, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: VouchersApi.import_vouchers_using_csv ...'
+ end
+ # verify the required parameter 'file' is set
+ if @api_client.config.client_side_validation && file.nil?
+ fail ArgumentError, "Missing the required parameter 'file' when calling VouchersApi.import_vouchers_using_csv"
+ end
+ # resource path
+ local_var_path = '/v1/vouchers/importCSV'
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['multipart/form-data'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+ form_params['file'] = file
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'VouchersImportCsvCreateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"VouchersApi.import_vouchers_using_csv",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: VouchersApi#import_vouchers_using_csv\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # List Voucher Transactions
+ # List transactions that are associated with credit movements on a gift card or loyalty card.
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [VouchersTransactionsListResponseBody]
+ def list_voucher_transactions(code, opts = {})
+ data, _status_code, _headers = list_voucher_transactions_with_http_info(code, opts)
+ data
+ end
+
+ # List Voucher Transactions
+ # List transactions that are associated with credit movements on a gift card or loyalty card.
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+ # @param [Hash] opts the optional parameters
+ # @option opts [Integer] :limit A limit on the number of objects to be returned. Limit can range between 1 and 100 items.
+ # @option opts [Integer] :page Which page of results to return.
+ # @return [Array<(VouchersTransactionsListResponseBody, Integer, Hash)>] VouchersTransactionsListResponseBody data, response status code and response headers
+ private def list_voucher_transactions_with_http_info(code, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: VouchersApi.list_voucher_transactions ...'
+ end
+ # verify the required parameter 'code' is set
+ if @api_client.config.client_side_validation && code.nil?
+ fail ArgumentError, "Missing the required parameter 'code' when calling VouchersApi.list_voucher_transactions"
+ end
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VouchersApi.list_voucher_transactions, must be smaller than or equal to 100.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling VouchersApi.list_voucher_transactions, must be greater than or equal to 1.'
+ end
+
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] > 100
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling VouchersApi.list_voucher_transactions, must be smaller than or equal to 100.'
+ end
+
+ # resource path
+ local_var_path = '/v1/vouchers/{code}/transactions'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'VouchersTransactionsListResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"VouchersApi.list_voucher_transactions",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: VouchersApi#list_voucher_transactions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Release Validation Session
+ # Manually release a validation session that has been set up for the voucher. This method undos the actions that are explained in our guide on how a validation session was established, you can read more here. 📘 Release Session using Dashboard You can also use the Validations Manager in the Dashboard to unlock sessions. [Read more](https://support.voucherify.io/article/16-dashboard-sections#validations).
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify.
+ # @param session_key [String] A unique session identifier.
+ # @param [Hash] opts the optional parameters
+ # @return [nil]
+ def release_validation_session(code, session_key, opts = {})
+ release_validation_session_with_http_info(code, session_key, opts)
+ nil
+ end
+
+ # Release Validation Session
+ # Manually release a validation session that has been set up for the voucher. This method undos the actions that are explained in our guide on how a validation session was established, you can read more here. 📘 Release Session using Dashboard You can also use the Validations Manager in the Dashboard to unlock sessions. [Read more](https://support.voucherify.io/article/16-dashboard-sections#validations).
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify.
+ # @param session_key [String] A unique session identifier.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
+ private def release_validation_session_with_http_info(code, session_key, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: VouchersApi.release_validation_session ...'
+ end
+ # verify the required parameter 'code' is set
+ if @api_client.config.client_side_validation && code.nil?
+ fail ArgumentError, "Missing the required parameter 'code' when calling VouchersApi.release_validation_session"
+ end
+ # verify the required parameter 'session_key' is set
+ if @api_client.config.client_side_validation && session_key.nil?
+ fail ArgumentError, "Missing the required parameter 'session_key' when calling VouchersApi.release_validation_session"
+ end
+ # resource path
+ local_var_path = '/v1/vouchers/{code}/sessions/{sessionKey}'.sub('{' + 'code' + '}', CGI.escape(code.to_s)).sub('{' + 'sessionKey' + '}', CGI.escape(session_key.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body]
+
+ # return_type
+ return_type = opts[:debug_return_type]
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"VouchersApi.release_validation_session",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: VouchersApi#release_validation_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+
+ # Add or Remove Voucher Balance
+ # Add balance to an existing gift card or loyalty card.
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+ # @param vouchers_balance_update_request_body [VouchersBalanceUpdateRequestBody] Provide the amount to be added to/subtracted from the voucher.
+ # @param [Hash] opts the optional parameters
+ # @return [VouchersBalanceUpdateResponseBody]
+ def update_voucher_balance(code, vouchers_balance_update_request_body, opts = {})
+ data, _status_code, _headers = update_voucher_balance_with_http_info(code, vouchers_balance_update_request_body, opts)
+ data
+ end
+
+ # Add or Remove Voucher Balance
+ # Add balance to an existing gift card or loyalty card.
+ # @param code [String] A **code** that identifies the voucher or a unique voucher ID assigned by Voucherify, i.e. v_TzD19aeNiqGc9LWciMWknyEZT8IW7u4u.
+ # @param vouchers_balance_update_request_body [VouchersBalanceUpdateRequestBody] Provide the amount to be added to/subtracted from the voucher.
+ # @param [Hash] opts the optional parameters
+ # @return [Array<(VouchersBalanceUpdateResponseBody, Integer, Hash)>] VouchersBalanceUpdateResponseBody data, response status code and response headers
+ private def update_voucher_balance_with_http_info(code, vouchers_balance_update_request_body, opts = {})
+ if @api_client.config.debugging
+ @api_client.config.logger.debug 'Calling API: VouchersApi.update_voucher_balance ...'
+ end
+ # verify the required parameter 'code' is set
+ if @api_client.config.client_side_validation && code.nil?
+ fail ArgumentError, "Missing the required parameter 'code' when calling VouchersApi.update_voucher_balance"
+ end
+ # verify the required parameter 'vouchers_balance_update_request_body' is set
+ if @api_client.config.client_side_validation && vouchers_balance_update_request_body.nil?
+ fail ArgumentError, "Missing the required parameter 'vouchers_balance_update_request_body' when calling VouchersApi.update_voucher_balance"
+ end
+ # resource path
+ local_var_path = '/v1/vouchers/{code}/balance'.sub('{' + 'code' + '}', CGI.escape(code.to_s))
+
+ # query parameters
+ query_params = opts[:query_params] || {}
+
+ # header parameters
+ header_params = opts[:header_params] || {}
+ # HTTP header 'Accept' (if needed)
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
+ # HTTP header 'Content-Type'
+ content_type = @api_client.select_header_content_type(['application/json'])
+ if !content_type.nil?
+ header_params['Content-Type'] = content_type
+ end
+
+ # form parameters
+ form_params = opts[:form_params] || {}
+
+ # http body (model)
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(vouchers_balance_update_request_body)
+
+ # return_type
+ return_type = opts[:debug_return_type] || 'VouchersBalanceUpdateResponseBody'
+
+ # auth_names
+ auth_names = opts[:debug_auth_names] || ['X-App-Id', 'X-App-Token']
+
+ new_options = opts.merge(
+ :operation => :"VouchersApi.update_voucher_balance",
+ :header_params => header_params,
+ :query_params => query_params,
+ :form_params => form_params,
+ :body => post_body,
+ :auth_names => auth_names,
+ :return_type => return_type
+ )
+
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
+ if @api_client.config.debugging
+ @api_client.config.logger.debug "API called: VouchersApi#update_voucher_balance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
+ end
+ return data, status_code, headers
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api_client.rb b/lib/VoucherifySdk/api_client.rb
new file mode 100644
index 00000000..caa8c766
--- /dev/null
+++ b/lib/VoucherifySdk/api_client.rb
@@ -0,0 +1,392 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'json'
+require 'logger'
+require 'tempfile'
+require 'time'
+require 'typhoeus'
+
+module VoucherifySdk
+ class ApiClient
+ # The Configuration object holding settings to be used in the API client.
+ attr_accessor :config
+
+ # Defines the headers to be used in HTTP requests of all API calls by default.
+ #
+ # @return [Hash]
+ attr_accessor :default_headers
+
+ # Initializes the ApiClient
+ # @option config [Configuration] Configuration for initializing the object, default to Configuration.default
+ def initialize(config = Configuration.default)
+ @config = config
+ @user_agent = "OpenAPI-Generator/#{VERSION}/ruby"
+ @default_headers = {
+ 'Content-Type' => 'application/json',
+ 'User-Agent' => @user_agent
+ }
+ end
+
+ def self.default
+ @@default ||= ApiClient.new
+ end
+
+ # Call an API with given options.
+ #
+ # @return [Array<(Object, Integer, Hash)>] an array of 3 elements:
+ # the data deserialized from response body (could be nil), response status code and response headers.
+ def call_api(http_method, path, opts = {})
+ request = build_request(http_method, path, opts)
+ response = request.run
+
+ if @config.debugging
+ @config.logger.debug "HTTP response body ~BEGIN~\n#{response.body}\n~END~\n"
+ end
+
+ unless response.success?
+ if response.timed_out?
+ fail ApiError.new('Connection timed out')
+ elsif response.code == 0
+ # Errors from libcurl will be made visible here
+ fail ApiError.new(:code => 0,
+ :message => response.return_message)
+ else
+ fail ApiError.new(:code => response.code,
+ :response_headers => response.headers,
+ :response_body => response.body),
+ response.status_message
+ end
+ end
+
+ if opts[:return_type]
+ data = deserialize(response, opts[:return_type])
+ else
+ data = nil
+ end
+ return data, response.code, response.headers
+ end
+
+ # Builds the HTTP request
+ #
+ # @param [String] http_method HTTP method/verb (e.g. POST)
+ # @param [String] path URL path (e.g. /account/new)
+ # @option opts [Hash] :header_params Header parameters
+ # @option opts [Hash] :query_params Query parameters
+ # @option opts [Hash] :form_params Query parameters
+ # @option opts [Object] :body HTTP body (JSON/XML)
+ # @return [Typhoeus::Request] A Typhoeus Request
+ def build_request(http_method, path, opts = {})
+ url = build_request_url(path, opts)
+ http_method = http_method.to_sym.downcase
+
+ header_params = @default_headers.merge(opts[:header_params] || {})
+ query_params = opts[:query_params] || {}
+ form_params = opts[:form_params] || {}
+ follow_location = opts[:follow_location] || true
+
+ update_params_for_auth! header_params, query_params, opts[:auth_names]
+
+ # set ssl_verifyhosts option based on @config.verify_ssl_host (true/false)
+ _verify_ssl_host = @config.verify_ssl_host ? 2 : 0
+
+ req_opts = {
+ :method => http_method,
+ :headers => header_params,
+ :params => query_params,
+ :params_encoding => @config.params_encoding,
+ :timeout => @config.timeout,
+ :ssl_verifypeer => @config.verify_ssl,
+ :ssl_verifyhost => _verify_ssl_host,
+ :sslcert => @config.cert_file,
+ :sslkey => @config.key_file,
+ :verbose => @config.debugging,
+ :followlocation => follow_location
+ }
+
+ # set custom cert, if provided
+ req_opts[:cainfo] = @config.ssl_ca_cert if @config.ssl_ca_cert
+
+ if [:post, :patch, :put, :delete].include?(http_method)
+ req_body = build_request_body(header_params, form_params, opts[:body])
+ req_opts.update :body => req_body
+ if @config.debugging
+ @config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
+ end
+ end
+
+ request = Typhoeus::Request.new(url, req_opts)
+ download_file(request) if opts[:return_type] == 'File'
+ request
+ end
+
+ # Builds the HTTP request body
+ #
+ # @param [Hash] header_params Header parameters
+ # @param [Hash] form_params Query parameters
+ # @param [Object] body HTTP body (JSON/XML)
+ # @return [String] HTTP body data in the form of string
+ def build_request_body(header_params, form_params, body)
+ # http form
+ if header_params['Content-Type'] == 'application/x-www-form-urlencoded' ||
+ header_params['Content-Type'] == 'multipart/form-data'
+ data = {}
+ form_params.each do |key, value|
+ case value
+ when ::File, ::Array, nil
+ # let typhoeus handle File, Array and nil parameters
+ data[key] = value
+ else
+ data[key] = value.to_s
+ end
+ end
+ elsif body
+ data = body.is_a?(String) ? body : body.to_json
+ else
+ data = nil
+ end
+ data
+ end
+
+ # Save response body into a file in (the defined) temporary folder, using the filename
+ # from the "Content-Disposition" header if provided, otherwise a random filename.
+ # The response body is written to the file in chunks in order to handle files which
+ # size is larger than maximum Ruby String or even larger than the maximum memory a Ruby
+ # process can use.
+ #
+ # @see Configuration#temp_folder_path
+ def download_file(request)
+ tempfile = nil
+ encoding = nil
+ request.on_headers do |response|
+ content_disposition = response.headers['Content-Disposition']
+ if content_disposition && content_disposition =~ /filename=/i
+ filename = content_disposition[/filename=['"]?([^'"\s]+)['"]?/, 1]
+ prefix = sanitize_filename(filename)
+ else
+ prefix = 'download-'
+ end
+ prefix = prefix + '-' unless prefix.end_with?('-')
+ encoding = response.body.encoding
+ tempfile = Tempfile.open(prefix, @config.temp_folder_path, encoding: encoding)
+ @tempfile = tempfile
+ end
+ request.on_body do |chunk|
+ chunk.force_encoding(encoding)
+ tempfile.write(chunk)
+ end
+ request.on_complete do |response|
+ if tempfile
+ tempfile.close
+ @config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
+ "with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
+ "will be deleted automatically with GC. It's also recommended to delete the temp file "\
+ "explicitly with `tempfile.delete`"
+ end
+ end
+ end
+
+ # Check if the given MIME is a JSON MIME.
+ # JSON MIME examples:
+ # application/json
+ # application/json; charset=UTF8
+ # APPLICATION/JSON
+ # */*
+ # @param [String] mime MIME
+ # @return [Boolean] True if the MIME is application/json
+ def json_mime?(mime)
+ (mime == '*/*') || !(mime =~ /Application\/.*json(?!p)(;.*)?/i).nil?
+ end
+
+ # Deserialize the response to the given return type.
+ #
+ # @param [Response] response HTTP response
+ # @param [String] return_type some examples: "User", "Array", "Hash"
+ def deserialize(response, return_type)
+ body = response.body
+
+ # handle file downloading - return the File instance processed in request callbacks
+ # note that response body is empty when the file is written in chunks in request on_body callback
+ return @tempfile if return_type == 'File'
+
+ return nil if body.nil? || body.empty?
+
+ # return response body directly for String return type
+ return body if return_type == 'String'
+
+ # ensuring a default content type
+ content_type = response.headers['Content-Type'] || 'application/json'
+
+ fail "Content-Type is not supported: #{content_type}" unless json_mime?(content_type)
+
+ begin
+ data = JSON.parse("[#{body}]", :symbolize_names => true)[0]
+ rescue JSON::ParserError => e
+ if %w(String Date Time).include?(return_type)
+ data = body
+ else
+ raise e
+ end
+ end
+
+ convert_to_type data, return_type
+ end
+
+ # Convert data to the given return type.
+ # @param [Object] data Data to be converted
+ # @param [String] return_type Return type
+ # @return [Mixed] Data in a particular type
+ def convert_to_type(data, return_type)
+ return nil if data.nil?
+ case return_type
+ when 'String'
+ data.to_s
+ when 'Integer'
+ data.to_i
+ when 'Float'
+ data.to_f
+ when 'Boolean'
+ data == true
+ when 'Time'
+ # parse date time (expecting ISO 8601 format)
+ Time.parse data
+ when 'Date'
+ # parse date time (expecting ISO 8601 format)
+ Date.parse data
+ when 'Object'
+ # generic object (usually a Hash), return directly
+ data
+ when /\AArray<(.+)>\z/
+ # e.g. Array
+ sub_type = $1
+ data.map { |item| convert_to_type(item, sub_type) }
+ when /\AHash\\z/
+ # e.g. Hash
+ sub_type = $1
+ {}.tap do |hash|
+ data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
+ end
+ else
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(return_type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(data) : klass.build_from_hash(data)
+ end
+ end
+
+ # Sanitize filename by removing path.
+ # e.g. ../../sun.gif becomes sun.gif
+ #
+ # @param [String] filename the filename to be sanitized
+ # @return [String] the sanitized filename
+ def sanitize_filename(filename)
+ filename.gsub(/.*[\/\\]/, '')
+ end
+
+ def build_request_url(path, opts = {})
+ # Add leading and trailing slashes to path
+ path = "/#{path}".gsub(/\/+/, '/')
+ @config.base_url(opts[:operation]) + path
+ end
+
+ # Update header and query params based on authentication settings.
+ #
+ # @param [Hash] header_params Header parameters
+ # @param [Hash] query_params Query parameters
+ # @param [String] auth_names Authentication scheme name
+ def update_params_for_auth!(header_params, query_params, auth_names)
+ Array(auth_names).each do |auth_name|
+ auth_setting = @config.auth_settings[auth_name]
+ next unless auth_setting
+ case auth_setting[:in]
+ when 'header' then header_params[auth_setting[:key]] = auth_setting[:value]
+ when 'query' then query_params[auth_setting[:key]] = auth_setting[:value]
+ else fail ArgumentError, 'Authentication token must be in `query` or `header`'
+ end
+ end
+ end
+
+ # Sets user agent in HTTP header
+ #
+ # @param [String] user_agent User agent (e.g. openapi-generator/ruby/1.0.0)
+ def user_agent=(user_agent)
+ @user_agent = user_agent
+ @default_headers['User-Agent'] = @user_agent
+ end
+
+ # Return Accept header based on an array of accepts provided.
+ # @param [Array] accepts array for Accept
+ # @return [String] the Accept header (e.g. application/json)
+ def select_header_accept(accepts)
+ return nil if accepts.nil? || accepts.empty?
+ # use JSON when present, otherwise use all of the provided
+ json_accept = accepts.find { |s| json_mime?(s) }
+ json_accept || accepts.join(',')
+ end
+
+ # Return Content-Type header based on an array of content types provided.
+ # @param [Array] content_types array for Content-Type
+ # @return [String] the Content-Type header (e.g. application/json)
+ def select_header_content_type(content_types)
+ # return nil by default
+ return if content_types.nil? || content_types.empty?
+ # use JSON when present, otherwise use the first one
+ json_content_type = content_types.find { |s| json_mime?(s) }
+ json_content_type || content_types.first
+ end
+
+ # Convert object (array, hash, object, etc) to JSON string.
+ # @param [Object] model object to be converted into JSON string
+ # @return [String] JSON string representation of the object
+ def object_to_http_body(model)
+ return model if model.nil? || model.is_a?(String)
+ local_body = nil
+ if model.is_a?(Array)
+ local_body = model.map { |m| object_to_hash(m) }
+ else
+ local_body = object_to_hash(model)
+ end
+ local_body.to_json
+ end
+
+ # Convert object(non-array) to hash.
+ # @param [Object] obj object to be converted into JSON string
+ # @return [String] JSON string representation of the object
+ def object_to_hash(obj)
+ if obj.respond_to?(:to_hash)
+ obj.to_hash
+ else
+ obj
+ end
+ end
+
+ # Build parameter value according to the given collection format.
+ # @param [String] collection_format one of :csv, :ssv, :tsv, :pipes and :multi
+ def build_collection_param(param, collection_format)
+ case collection_format
+ when :csv
+ param.join(',')
+ when :ssv
+ param.join(' ')
+ when :tsv
+ param.join("\t")
+ when :pipes
+ param.join('|')
+ when :multi
+ # return the array directly as typhoeus will handle it as expected
+ param
+ else
+ fail "unknown collection format: #{collection_format.inspect}"
+ end
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/api_error.rb b/lib/VoucherifySdk/api_error.rb
new file mode 100644
index 00000000..04901e36
--- /dev/null
+++ b/lib/VoucherifySdk/api_error.rb
@@ -0,0 +1,58 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+module VoucherifySdk
+ class ApiError < StandardError
+ attr_reader :code, :response_headers, :response_body
+
+ # Usage examples:
+ # ApiError.new
+ # ApiError.new("message")
+ # ApiError.new(:code => 500, :response_headers => {}, :response_body => "")
+ # ApiError.new(:code => 404, :message => "Not Found")
+ def initialize(arg = nil)
+ if arg.is_a? Hash
+ if arg.key?(:message) || arg.key?('message')
+ super(arg[:message] || arg['message'])
+ else
+ super arg
+ end
+
+ arg.each do |k, v|
+ instance_variable_set "@#{k}", v
+ end
+ else
+ super arg
+ @message = arg
+ end
+ end
+
+ # Override to_s to display a friendly error message
+ def to_s
+ message
+ end
+
+ def message
+ if @message.nil?
+ msg = "Error message: the server returns an error"
+ else
+ msg = @message
+ end
+
+ msg += "\nHTTP status code: #{code}" if code
+ msg += "\nResponse headers: #{response_headers}" if response_headers
+ msg += "\nResponse body: #{response_body}" if response_body
+
+ msg
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/configuration.rb b/lib/VoucherifySdk/configuration.rb
new file mode 100644
index 00000000..1bb8b480
--- /dev/null
+++ b/lib/VoucherifySdk/configuration.rb
@@ -0,0 +1,332 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+module VoucherifySdk
+ class Configuration
+ # Defines url scheme
+ attr_accessor :scheme
+
+ # Defines url host
+ attr_accessor :host
+
+ # Defines url base path
+ attr_accessor :base_path
+
+ # Define server configuration index
+ attr_accessor :server_index
+
+ # Define server operation configuration index
+ attr_accessor :server_operation_index
+
+ # Default server variables
+ attr_accessor :server_variables
+
+ # Default server operation variables
+ attr_accessor :server_operation_variables
+
+ # Defines API keys used with API Key authentications.
+ #
+ # @return [Hash] key: parameter name, value: parameter value (API key)
+ #
+ # @example parameter name is "api_key", API key is "xxx" (e.g. "api_key=xxx" in query string)
+ # config.api_key['api_key'] = 'xxx'
+ attr_accessor :api_key
+
+ # Defines API key prefixes used with API Key authentications.
+ #
+ # @return [Hash] key: parameter name, value: API key prefix
+ #
+ # @example parameter name is "Authorization", API key prefix is "Token" (e.g. "Authorization: Token xxx" in headers)
+ # config.api_key_prefix['api_key'] = 'Token'
+ attr_accessor :api_key_prefix
+
+ # Defines the username used with HTTP basic authentication.
+ #
+ # @return [String]
+ attr_accessor :username
+
+ # Defines the password used with HTTP basic authentication.
+ #
+ # @return [String]
+ attr_accessor :password
+
+ # Defines the access token (Bearer) used with OAuth2.
+ attr_accessor :access_token
+
+ # Defines a Proc used to fetch or refresh access tokens (Bearer) used with OAuth2.
+ # Overrides the access_token if set
+ # @return [Proc]
+ attr_accessor :access_token_getter
+
+ # Set this to return data as binary instead of downloading a temp file. When enabled (set to true)
+ # HTTP responses with return type `File` will be returned as a stream of binary data.
+ # Default to false.
+ attr_accessor :return_binary_data
+
+ # Set this to enable/disable debugging. When enabled (set to true), HTTP request/response
+ # details will be logged with `logger.debug` (see the `logger` attribute).
+ # Default to false.
+ #
+ # @return [true, false]
+ attr_accessor :debugging
+
+ # Defines the logger used for debugging.
+ # Default to `Rails.logger` (when in Rails) or logging to STDOUT.
+ #
+ # @return [#debug]
+ attr_accessor :logger
+
+ # Defines the temporary folder to store downloaded files
+ # (for API endpoints that have file response).
+ # Default to use `Tempfile`.
+ #
+ # @return [String]
+ attr_accessor :temp_folder_path
+
+ # The time limit for HTTP request in seconds.
+ # Default to 0 (never times out).
+ attr_accessor :timeout
+
+ # Set this to false to skip client side validation in the operation.
+ # Default to true.
+ # @return [true, false]
+ attr_accessor :client_side_validation
+
+ ### TLS/SSL setting
+ # Set this to false to skip verifying SSL certificate when calling API from https server.
+ # Default to true.
+ #
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
+ #
+ # @return [true, false]
+ attr_accessor :verify_ssl
+
+ ### TLS/SSL setting
+ # Set this to false to skip verifying SSL host name
+ # Default to true.
+ #
+ # @note Do NOT set it to false in production code, otherwise you would face multiple types of cryptographic attacks.
+ #
+ # @return [true, false]
+ attr_accessor :verify_ssl_host
+
+ ### TLS/SSL setting
+ # Set this to customize the certificate file to verify the peer.
+ #
+ # @return [String] the path to the certificate file
+ #
+ # @see The `cainfo` option of Typhoeus, `--cert` option of libcurl. Related source code:
+ # https://github.com/typhoeus/typhoeus/blob/master/lib/typhoeus/easy_factory.rb#L145
+ attr_accessor :ssl_ca_cert
+
+ ### TLS/SSL setting
+ # Client certificate file (for client certificate)
+ attr_accessor :cert_file
+
+ ### TLS/SSL setting
+ # Client private key file (for client certificate)
+ attr_accessor :key_file
+
+ # Set this to customize parameters encoding of array parameter with multi collectionFormat.
+ # Default to nil.
+ #
+ # @see The params_encoding option of Ethon. Related source code:
+ # https://github.com/typhoeus/ethon/blob/master/lib/ethon/easy/queryable.rb#L96
+ attr_accessor :params_encoding
+
+
+ attr_accessor :inject_format
+
+ attr_accessor :force_ending_format
+
+ def initialize
+ @scheme = 'https'
+ @host = 'api.voucherify.io'
+ @base_path = ''
+ @server_index = nil
+ @server_operation_index = {}
+ @server_variables = {}
+ @server_operation_variables = {}
+ @api_key = {}
+ @api_key_prefix = {}
+ @client_side_validation = true
+ @verify_ssl = true
+ @verify_ssl_host = true
+ @cert_file = nil
+ @key_file = nil
+ @timeout = 0
+ @params_encoding = nil
+ @debugging = false
+ @inject_format = false
+ @force_ending_format = false
+ @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT)
+
+ yield(self) if block_given?
+ end
+
+ # The default Configuration object.
+ def self.default
+ @@default ||= Configuration.new
+ end
+
+ def configure
+ yield(self) if block_given?
+ end
+
+ def scheme=(scheme)
+ # remove :// from scheme
+ @scheme = scheme.sub(/:\/\//, '')
+ end
+
+ def host=(host)
+ # remove http(s):// and anything after a slash
+ @host = host.sub(/https?:\/\//, '').split('/').first
+ end
+
+ def base_path=(base_path)
+ # Add leading and trailing slashes to base_path
+ @base_path = "/#{base_path}".gsub(/\/+/, '/')
+ @base_path = '' if @base_path == '/'
+ end
+
+ # Returns base URL for specified operation based on server settings
+ def base_url(operation = nil)
+ if operation_server_settings.key?(operation) then
+ index = server_operation_index.fetch(operation, server_index)
+ server_url(index.nil? ? 0 : index, server_operation_variables.fetch(operation, server_variables), operation_server_settings[operation])
+ else
+ server_index.nil? ? "#{scheme}://#{[host, base_path].join('/').gsub(/\/+/, '/')}".sub(/\/+\z/, '') : server_url(server_index, server_variables, nil)
+ end
+ end
+
+ # Gets API key (with prefix if set).
+ # @param [String] param_name the parameter name of API key auth
+ def api_key_with_prefix(param_name, param_alias = nil)
+ key = @api_key[param_name]
+ key = @api_key.fetch(param_alias, key) unless param_alias.nil?
+ if @api_key_prefix[param_name]
+ "#{@api_key_prefix[param_name]} #{key}"
+ else
+ key
+ end
+ end
+
+ # Gets access_token using access_token_getter or uses the static access_token
+ def access_token_with_refresh
+ return access_token if access_token_getter.nil?
+ access_token_getter.call
+ end
+
+ # Gets Basic Auth token string
+ def basic_auth_token
+ 'Basic ' + ["#{username}:#{password}"].pack('m').delete("\r\n")
+ end
+
+ # Returns Auth Settings hash for api client.
+ def auth_settings
+ {
+ 'X-App-Id' =>
+ {
+ type: 'api_key',
+ in: 'header',
+ key: 'X-App-Id',
+ value: api_key_with_prefix('X-App-Id')
+ },
+ 'X-App-Token' =>
+ {
+ type: 'api_key',
+ in: 'header',
+ key: 'X-App-Token',
+ value: api_key_with_prefix('X-App-Token')
+ },
+ 'X-Client-Token' =>
+ {
+ type: 'api_key',
+ in: 'header',
+ key: 'X-Client-Token',
+ value: api_key_with_prefix('X-Client-Token')
+ },
+ 'X-Client-Application-Id' =>
+ {
+ type: 'api_key',
+ in: 'header',
+ key: 'X-Client-Application-Id',
+ value: api_key_with_prefix('X-Client-Application-Id')
+ },
+ }
+ end
+
+ # Returns an array of Server setting
+ def server_settings
+ [
+ {
+ url: "https://{cluster}.voucherify.io",
+ description: "Base URL",
+ variables: {
+ cluster: {
+ description: "No description provided",
+ default_value: "api",
+ enum_values: [
+ "api",
+ "us1.api",
+ "as1.api",
+ "download",
+ "us1.download",
+ "as1.download"
+ ]
+ }
+ }
+ }
+ ]
+ end
+
+ def operation_server_settings
+ {
+ }
+ end
+
+ # Returns URL based on server settings
+ #
+ # @param index array index of the server settings
+ # @param variables hash of variable and the corresponding value
+ def server_url(index, variables = {}, servers = nil)
+ servers = server_settings if servers == nil
+
+ # check array index out of bound
+ if (index.nil? || index < 0 || index >= servers.size)
+ fail ArgumentError, "Invalid index #{index} when selecting the server. Must not be nil and must be less than #{servers.size}"
+ end
+
+ server = servers[index]
+ url = server[:url]
+
+ return url unless server.key? :variables
+
+ # go through variable and assign a value
+ server[:variables].each do |name, variable|
+ if variables.key?(name)
+ if (!server[:variables][name].key?(:enum_values) || server[:variables][name][:enum_values].include?(variables[name]))
+ url.gsub! "{" + name.to_s + "}", variables[name]
+ else
+ fail ArgumentError, "The variable `#{name}` in the server URL has invalid value #{variables[name]}. Must be #{server[:variables][name][:enum_values]}."
+ end
+ else
+ # use default value
+ url.gsub! "{" + name.to_s + "}", server[:variables][name][:default_value]
+ end
+ end
+
+ url
+ end
+
+ end
+end
diff --git a/lib/VoucherifySdk/models/any.rb b/lib/VoucherifySdk/models/any.rb
new file mode 100644
index 00000000..0454e9c3
--- /dev/null
+++ b/lib/VoucherifySdk/models/any.rb
@@ -0,0 +1,107 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ module Any
+ class << self
+ # List of class defined in oneOf (OpenAPI v3)
+ def openapi_one_of
+ [
+ :'Array',
+ :'Float',
+ :'Object',
+ :'String'
+ ]
+ end
+
+ # Builds the object
+ # @param [Mixed] Data to be matched against the list of oneOf items
+ # @return [Object] Returns the model or the data itself
+ def build(data)
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
+ # Note:
+ # - We do not attempt to check whether exactly one item matches.
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
+ # - TODO: scalar values are de facto behaving as if they were nullable.
+ # - TODO: logging when debugging is set.
+ openapi_one_of.each do |klass|
+ begin
+ next if klass == :AnyType # "nullable: true"
+ typed_data = find_and_cast_into_type(klass, data)
+ return typed_data if typed_data
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
+ end
+ end
+
+ openapi_one_of.include?(:AnyType) ? data : nil
+ end
+
+ private
+
+ SchemaMismatchError = Class.new(StandardError)
+
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
+ def find_and_cast_into_type(klass, data)
+ return if data.nil?
+
+ case klass.to_s
+ when 'Boolean'
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
+ when 'Float'
+ return data if data.instance_of?(Float)
+ when 'Integer'
+ return data if data.instance_of?(Integer)
+ when 'Time'
+ return Time.parse(data)
+ when 'Date'
+ return Date.parse(data)
+ when 'String'
+ return data if data.instance_of?(String)
+ when 'Object' # "type: object"
+ return data if data.instance_of?(Hash)
+ when /\AArray<(?.+)>\z/ # "type: array"
+ if data.instance_of?(Array)
+ sub_type = Regexp.last_match[:sub_type]
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
+ end
+ when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }"
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
+ sub_type = Regexp.last_match[:sub_type]
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
+ end
+ else # model
+ const = VoucherifySdk.const_get(klass)
+ if const
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
+ model = const.build(data)
+ return model if model
+ else
+ # raise if data contains keys that are not known to the model
+ raise unless (data.keys - const.acceptable_attributes).empty?
+ model = const.build_from_hash(data)
+ return model if model
+ end
+ end
+ end
+
+ raise # if no match by now, raise
+ rescue
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
+ end
+ end
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/applicable_to.rb b/lib/VoucherifySdk/models/applicable_to.rb
new file mode 100644
index 00000000..09016d80
--- /dev/null
+++ b/lib/VoucherifySdk/models/applicable_to.rb
@@ -0,0 +1,406 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ class ApplicableTo
+ # This object stores information about the product collection.
+ attr_accessor :object
+
+ # Unique product collection ID assigned by Voucherify.
+ attr_accessor :id
+
+ # The source ID from your inventory system.
+ attr_accessor :source_id
+
+ # Parent product's unique ID assigned by Voucherify.
+ attr_accessor :product_id
+
+ # Parent product's source ID from your inventory system.
+ attr_accessor :product_source_id
+
+ attr_accessor :strict
+
+ # New fixed price of an item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $10 price is written as 1000. In case of the fixed price being calculated by the formula, i.e. the price_formula parameter is present in the fixed price definition, this value becomes the fallback value. Such that in a case where the formula cannot be calculated due to missing metadata, for example, this value will be used as the fixed price.
+ attr_accessor :price
+
+ # Formula used to calculate the discounted price of an item.
+ attr_accessor :price_formula
+
+ attr_accessor :effect
+
+ # The maximum number of units allowed to be discounted per order line item.
+ attr_accessor :quantity_limit
+
+ # The maximum number of units allowed to be discounted combined across all matched order line items.
+ attr_accessor :aggregated_quantity_limit
+
+ # Upper limit allowed to be applied as a discount per order line item. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount is written as 600.
+ attr_accessor :amount_limit
+
+ # Maximum discount amount per order. Value is multiplied by 100 to precisely represent 2 decimal places. For example, a $6 maximum discount on the entire order is written as 600. This value is definable for the following discount effects: - `APPLY_TO_ITEMS` (each item subtotal is discounted equally) - `APPLY_TO_ITEMS_BY_QUANTITY` (each unit of matched products has the same discount value)
+ attr_accessor :aggregated_amount_limit
+
+ attr_accessor :order_item_indices
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'object' => :'object',
+ :'id' => :'id',
+ :'source_id' => :'source_id',
+ :'product_id' => :'product_id',
+ :'product_source_id' => :'product_source_id',
+ :'strict' => :'strict',
+ :'price' => :'price',
+ :'price_formula' => :'price_formula',
+ :'effect' => :'effect',
+ :'quantity_limit' => :'quantity_limit',
+ :'aggregated_quantity_limit' => :'aggregated_quantity_limit',
+ :'amount_limit' => :'amount_limit',
+ :'aggregated_amount_limit' => :'aggregated_amount_limit',
+ :'order_item_indices' => :'order_item_indices'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'object' => :'String',
+ :'id' => :'String',
+ :'source_id' => :'String',
+ :'product_id' => :'String',
+ :'product_source_id' => :'String',
+ :'strict' => :'Boolean',
+ :'price' => :'Float',
+ :'price_formula' => :'Float',
+ :'effect' => :'ApplicableToEffect',
+ :'quantity_limit' => :'Integer',
+ :'aggregated_quantity_limit' => :'Integer',
+ :'amount_limit' => :'Integer',
+ :'aggregated_amount_limit' => :'Integer',
+ :'order_item_indices' => :'Array'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::ApplicableTo` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::ApplicableTo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'object')
+ self.object = attributes[:'object']
+ else
+ self.object = nil
+ end
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ else
+ self.id = nil
+ end
+
+ if attributes.key?(:'source_id')
+ self.source_id = attributes[:'source_id']
+ end
+
+ if attributes.key?(:'product_id')
+ self.product_id = attributes[:'product_id']
+ end
+
+ if attributes.key?(:'product_source_id')
+ self.product_source_id = attributes[:'product_source_id']
+ end
+
+ if attributes.key?(:'strict')
+ self.strict = attributes[:'strict']
+ else
+ self.strict = nil
+ end
+
+ if attributes.key?(:'price')
+ self.price = attributes[:'price']
+ end
+
+ if attributes.key?(:'price_formula')
+ self.price_formula = attributes[:'price_formula']
+ end
+
+ if attributes.key?(:'effect')
+ self.effect = attributes[:'effect']
+ else
+ self.effect = nil
+ end
+
+ if attributes.key?(:'quantity_limit')
+ self.quantity_limit = attributes[:'quantity_limit']
+ end
+
+ if attributes.key?(:'aggregated_quantity_limit')
+ self.aggregated_quantity_limit = attributes[:'aggregated_quantity_limit']
+ end
+
+ if attributes.key?(:'amount_limit')
+ self.amount_limit = attributes[:'amount_limit']
+ end
+
+ if attributes.key?(:'aggregated_amount_limit')
+ self.aggregated_amount_limit = attributes[:'aggregated_amount_limit']
+ end
+
+ if attributes.key?(:'order_item_indices')
+ if (value = attributes[:'order_item_indices']).is_a?(Array)
+ self.order_item_indices = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @object.nil?
+ invalid_properties.push('invalid value for "object", object cannot be nil.')
+ end
+
+ if @id.nil?
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
+ end
+
+ if @strict.nil?
+ invalid_properties.push('invalid value for "strict", strict cannot be nil.')
+ end
+
+ if @effect.nil?
+ invalid_properties.push('invalid value for "effect", effect cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @object.nil?
+ object_validator = EnumAttributeValidator.new('String', ["product", "sku", "products_collection"])
+ return false unless object_validator.valid?(@object)
+ return false if @id.nil?
+ return false if @strict.nil?
+ return false if @effect.nil?
+ true
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] object Object to be assigned
+ def object=(object)
+ validator = EnumAttributeValidator.new('String', ["product", "sku", "products_collection"])
+ unless validator.valid?(object)
+ fail ArgumentError, "invalid value for \"object\", must be one of #{validator.allowable_values}."
+ end
+ @object = object
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ object == o.object &&
+ id == o.id &&
+ source_id == o.source_id &&
+ product_id == o.product_id &&
+ product_source_id == o.product_source_id &&
+ strict == o.strict &&
+ price == o.price &&
+ price_formula == o.price_formula &&
+ effect == o.effect &&
+ quantity_limit == o.quantity_limit &&
+ aggregated_quantity_limit == o.aggregated_quantity_limit &&
+ amount_limit == o.amount_limit &&
+ aggregated_amount_limit == o.aggregated_amount_limit &&
+ order_item_indices == o.order_item_indices
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [object, id, source_id, product_id, product_source_id, strict, price, price_formula, effect, quantity_limit, aggregated_quantity_limit, amount_limit, aggregated_amount_limit, order_item_indices].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/applicable_to_effect.rb b/lib/VoucherifySdk/models/applicable_to_effect.rb
new file mode 100644
index 00000000..a30b069d
--- /dev/null
+++ b/lib/VoucherifySdk/models/applicable_to_effect.rb
@@ -0,0 +1,41 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ class ApplicableToEffect
+ EVERY = "APPLY_TO_EVERY".freeze
+ CHEAPEST = "APPLY_TO_CHEAPEST".freeze
+ MOST_EXPENSIVE = "APPLY_TO_MOST_EXPENSIVE".freeze
+
+ def self.all_vars
+ @all_vars ||= [EVERY, CHEAPEST, MOST_EXPENSIVE].freeze
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def self.build_from_hash(value)
+ new.build_from_hash(value)
+ end
+
+ # Builds the enum from string
+ # @param [String] The enum value in the form of the string
+ # @return [String] The enum value
+ def build_from_hash(value)
+ return value if ApplicableToEffect.all_vars.include?(value)
+ raise "Invalid ENUM value #{value} for class #ApplicableToEffect"
+ end
+ end
+end
diff --git a/lib/VoucherifySdk/models/applicable_to_result_list.rb b/lib/VoucherifySdk/models/applicable_to_result_list.rb
new file mode 100644
index 00000000..328f7118
--- /dev/null
+++ b/lib/VoucherifySdk/models/applicable_to_result_list.rb
@@ -0,0 +1,340 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ class ApplicableToResultList
+ # Contains array of items to which the discount can apply.
+ attr_accessor :data
+
+ # Total number of objects defining included products, SKUs, or product collections.
+ attr_accessor :total
+
+ # The type of object represented by JSON.
+ attr_accessor :object
+
+ # The type of object represented by JSON.
+ attr_accessor :data_ref
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'data' => :'data',
+ :'total' => :'total',
+ :'object' => :'object',
+ :'data_ref' => :'data_ref'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'data' => :'Array',
+ :'total' => :'Integer',
+ :'object' => :'String',
+ :'data_ref' => :'String'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::ApplicableToResultList` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::ApplicableToResultList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'data')
+ if (value = attributes[:'data']).is_a?(Array)
+ self.data = value
+ end
+ else
+ self.data = nil
+ end
+
+ if attributes.key?(:'total')
+ self.total = attributes[:'total']
+ else
+ self.total = nil
+ end
+
+ if attributes.key?(:'object')
+ self.object = attributes[:'object']
+ else
+ self.object = 'list'
+ end
+
+ if attributes.key?(:'data_ref')
+ self.data_ref = attributes[:'data_ref']
+ else
+ self.data_ref = 'data'
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @data.nil?
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
+ end
+
+ if @total.nil?
+ invalid_properties.push('invalid value for "total", total cannot be nil.')
+ end
+
+ if @total < 0
+ invalid_properties.push('invalid value for "total", must be greater than or equal to 0.')
+ end
+
+ if @object.nil?
+ invalid_properties.push('invalid value for "object", object cannot be nil.')
+ end
+
+ if @data_ref.nil?
+ invalid_properties.push('invalid value for "data_ref", data_ref cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @data.nil?
+ return false if @total.nil?
+ return false if @total < 0
+ return false if @object.nil?
+ object_validator = EnumAttributeValidator.new('String', ["list"])
+ return false unless object_validator.valid?(@object)
+ return false if @data_ref.nil?
+ data_ref_validator = EnumAttributeValidator.new('String', ["data"])
+ return false unless data_ref_validator.valid?(@data_ref)
+ true
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] total Value to be assigned
+ def total=(total)
+ if total.nil?
+ fail ArgumentError, 'total cannot be nil'
+ end
+
+ if total < 0
+ fail ArgumentError, 'invalid value for "total", must be greater than or equal to 0.'
+ end
+
+ @total = total
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] object Object to be assigned
+ def object=(object)
+ validator = EnumAttributeValidator.new('String', ["list"])
+ unless validator.valid?(object)
+ fail ArgumentError, "invalid value for \"object\", must be one of #{validator.allowable_values}."
+ end
+ @object = object
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] data_ref Object to be assigned
+ def data_ref=(data_ref)
+ validator = EnumAttributeValidator.new('String', ["data"])
+ unless validator.valid?(data_ref)
+ fail ArgumentError, "invalid value for \"data_ref\", must be one of #{validator.allowable_values}."
+ end
+ @data_ref = data_ref
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ data == o.data &&
+ total == o.total &&
+ object == o.object &&
+ data_ref == o.data_ref
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [data, total, object, data_ref].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/array_inner.rb b/lib/VoucherifySdk/models/array_inner.rb
new file mode 100644
index 00000000..16bcdede
--- /dev/null
+++ b/lib/VoucherifySdk/models/array_inner.rb
@@ -0,0 +1,106 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ module ArrayInner
+ class << self
+ # List of class defined in oneOf (OpenAPI v3)
+ def openapi_one_of
+ [
+ :'Float',
+ :'Object',
+ :'String'
+ ]
+ end
+
+ # Builds the object
+ # @param [Mixed] Data to be matched against the list of oneOf items
+ # @return [Object] Returns the model or the data itself
+ def build(data)
+ # Go through the list of oneOf items and attempt to identify the appropriate one.
+ # Note:
+ # - We do not attempt to check whether exactly one item matches.
+ # - No advanced validation of types in some cases (e.g. "x: { type: string }" will happily match { x: 123 })
+ # due to the way the deserialization is made in the base_object template (it just casts without verifying).
+ # - TODO: scalar values are de facto behaving as if they were nullable.
+ # - TODO: logging when debugging is set.
+ openapi_one_of.each do |klass|
+ begin
+ next if klass == :AnyType # "nullable: true"
+ typed_data = find_and_cast_into_type(klass, data)
+ return typed_data if typed_data
+ rescue # rescue all errors so we keep iterating even if the current item lookup raises
+ end
+ end
+
+ openapi_one_of.include?(:AnyType) ? data : nil
+ end
+
+ private
+
+ SchemaMismatchError = Class.new(StandardError)
+
+ # Note: 'File' is missing here because in the regular case we get the data _after_ a call to JSON.parse.
+ def find_and_cast_into_type(klass, data)
+ return if data.nil?
+
+ case klass.to_s
+ when 'Boolean'
+ return data if data.instance_of?(TrueClass) || data.instance_of?(FalseClass)
+ when 'Float'
+ return data if data.instance_of?(Float)
+ when 'Integer'
+ return data if data.instance_of?(Integer)
+ when 'Time'
+ return Time.parse(data)
+ when 'Date'
+ return Date.parse(data)
+ when 'String'
+ return data if data.instance_of?(String)
+ when 'Object' # "type: object"
+ return data if data.instance_of?(Hash)
+ when /\AArray<(?.+)>\z/ # "type: array"
+ if data.instance_of?(Array)
+ sub_type = Regexp.last_match[:sub_type]
+ return data.map { |item| find_and_cast_into_type(sub_type, item) }
+ end
+ when /\AHash.+)>\z/ # "type: object" with "additionalProperties: { ... }"
+ if data.instance_of?(Hash) && data.keys.all? { |k| k.instance_of?(Symbol) || k.instance_of?(String) }
+ sub_type = Regexp.last_match[:sub_type]
+ return data.each_with_object({}) { |(k, v), hsh| hsh[k] = find_and_cast_into_type(sub_type, v) }
+ end
+ else # model
+ const = VoucherifySdk.const_get(klass)
+ if const
+ if const.respond_to?(:openapi_one_of) # nested oneOf model
+ model = const.build(data)
+ return model if model
+ else
+ # raise if data contains keys that are not known to the model
+ raise unless (data.keys - const.acceptable_attributes).empty?
+ model = const.build_from_hash(data)
+ return model if model
+ end
+ end
+ end
+
+ raise # if no match by now, raise
+ rescue
+ raise SchemaMismatchError, "#{data} doesn't match the #{klass} type"
+ end
+ end
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/async_actions.rb b/lib/VoucherifySdk/models/async_actions.rb
new file mode 100644
index 00000000..f12d63f8
--- /dev/null
+++ b/lib/VoucherifySdk/models/async_actions.rb
@@ -0,0 +1,223 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ # Response to requests that are processed asynchronously.
+ class AsyncActions
+ # The ID of the scheduled asynchronous action.
+ attr_accessor :async_action_id
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'async_action_id' => :'async_action_id'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'async_action_id' => :'String'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::AsyncActions` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::AsyncActions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'async_action_id')
+ self.async_action_id = attributes[:'async_action_id']
+ else
+ self.async_action_id = nil
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @async_action_id.nil?
+ invalid_properties.push('invalid value for "async_action_id", async_action_id cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @async_action_id.nil?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ async_action_id == o.async_action_id
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [async_action_id].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/bus_val_rule_assignment.rb b/lib/VoucherifySdk/models/bus_val_rule_assignment.rb
new file mode 100644
index 00000000..03f18bc7
--- /dev/null
+++ b/lib/VoucherifySdk/models/bus_val_rule_assignment.rb
@@ -0,0 +1,379 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ # Assignments of business validation rule
+ class BusValRuleAssignment
+ # The unique identifier for a assignment
+ attr_accessor :id
+
+ # The unique identifier for a rule
+ attr_accessor :rule_id
+
+ # The unique identifier for a related object
+ attr_accessor :related_object_id
+
+ # The type of related object
+ attr_accessor :related_object_type
+
+ # Timestamp representing the date and time when the object was created in ISO 8601 format.
+ attr_accessor :created_at
+
+ # Timestamp representing the date and time when the object was last updated in ISO 8601 format.
+ attr_accessor :updated_at
+
+ # The type of object represented by JSON.
+ attr_accessor :object
+
+ # The validation status of the assignment
+ attr_accessor :validation_status
+
+ # The list of omitted rules
+ attr_accessor :validation_omitted_rules
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'id',
+ :'rule_id' => :'rule_id',
+ :'related_object_id' => :'related_object_id',
+ :'related_object_type' => :'related_object_type',
+ :'created_at' => :'created_at',
+ :'updated_at' => :'updated_at',
+ :'object' => :'object',
+ :'validation_status' => :'validation_status',
+ :'validation_omitted_rules' => :'validation_omitted_rules'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'rule_id' => :'String',
+ :'related_object_id' => :'String',
+ :'related_object_type' => :'String',
+ :'created_at' => :'Time',
+ :'updated_at' => :'Time',
+ :'object' => :'String',
+ :'validation_status' => :'String',
+ :'validation_omitted_rules' => :'Array'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::BusValRuleAssignment` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::BusValRuleAssignment`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ else
+ self.id = nil
+ end
+
+ if attributes.key?(:'rule_id')
+ self.rule_id = attributes[:'rule_id']
+ else
+ self.rule_id = nil
+ end
+
+ if attributes.key?(:'related_object_id')
+ self.related_object_id = attributes[:'related_object_id']
+ else
+ self.related_object_id = nil
+ end
+
+ if attributes.key?(:'related_object_type')
+ self.related_object_type = attributes[:'related_object_type']
+ else
+ self.related_object_type = nil
+ end
+
+ if attributes.key?(:'created_at')
+ self.created_at = attributes[:'created_at']
+ end
+
+ if attributes.key?(:'updated_at')
+ self.updated_at = attributes[:'updated_at']
+ end
+
+ if attributes.key?(:'object')
+ self.object = attributes[:'object']
+ else
+ self.object = 'validation_rules_assignment'
+ end
+
+ if attributes.key?(:'validation_status')
+ self.validation_status = attributes[:'validation_status']
+ end
+
+ if attributes.key?(:'validation_omitted_rules')
+ if (value = attributes[:'validation_omitted_rules']).is_a?(Array)
+ self.validation_omitted_rules = value
+ end
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @id.nil?
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
+ end
+
+ if @rule_id.nil?
+ invalid_properties.push('invalid value for "rule_id", rule_id cannot be nil.')
+ end
+
+ if @related_object_id.nil?
+ invalid_properties.push('invalid value for "related_object_id", related_object_id cannot be nil.')
+ end
+
+ if @related_object_type.nil?
+ invalid_properties.push('invalid value for "related_object_type", related_object_type cannot be nil.')
+ end
+
+ if @object.nil?
+ invalid_properties.push('invalid value for "object", object cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @id.nil?
+ return false if @rule_id.nil?
+ return false if @related_object_id.nil?
+ return false if @related_object_type.nil?
+ return false if @object.nil?
+ object_validator = EnumAttributeValidator.new('String', ["validation_rules_assignment"])
+ return false unless object_validator.valid?(@object)
+ validation_status_validator = EnumAttributeValidator.new('String', ["VALID", "PARTIALLY_VALID", "INVALID"])
+ return false unless validation_status_validator.valid?(@validation_status)
+ true
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] object Object to be assigned
+ def object=(object)
+ validator = EnumAttributeValidator.new('String', ["validation_rules_assignment"])
+ unless validator.valid?(object)
+ fail ArgumentError, "invalid value for \"object\", must be one of #{validator.allowable_values}."
+ end
+ @object = object
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] validation_status Object to be assigned
+ def validation_status=(validation_status)
+ validator = EnumAttributeValidator.new('String', ["VALID", "PARTIALLY_VALID", "INVALID"])
+ unless validator.valid?(validation_status)
+ fail ArgumentError, "invalid value for \"validation_status\", must be one of #{validator.allowable_values}."
+ end
+ @validation_status = validation_status
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ rule_id == o.rule_id &&
+ related_object_id == o.related_object_id &&
+ related_object_type == o.related_object_type &&
+ created_at == o.created_at &&
+ updated_at == o.updated_at &&
+ object == o.object &&
+ validation_status == o.validation_status &&
+ validation_omitted_rules == o.validation_omitted_rules
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, rule_id, related_object_id, related_object_type, created_at, updated_at, object, validation_status, validation_omitted_rules].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaign.rb b/lib/VoucherifySdk/models/campaign.rb
new file mode 100644
index 00000000..5290a4c8
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaign.rb
@@ -0,0 +1,674 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ class Campaign
+ # Unique campaign ID, assigned by Voucherify.
+ attr_accessor :id
+
+ # Campaign name.
+ attr_accessor :name
+
+ # An optional field to keep any extra textual information about the campaign such as a campaign description and details.
+ attr_accessor :description
+
+ # Type of campaign.
+ attr_accessor :campaign_type
+
+ # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
+ attr_accessor :type
+
+ attr_accessor :voucher
+
+ # Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
+ attr_accessor :auto_join
+
+ # If this value is set to `true`, customers will be able to join the campaign only once.
+ attr_accessor :join_once
+
+ # Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
+ attr_accessor :use_voucher_metadata_schema
+
+ attr_accessor :validity_timeframe
+
+ # Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
+ attr_accessor :validity_day_of_week
+
+ # Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days.
+ attr_accessor :activity_duration_after_publishing
+
+ # Total number of unique vouchers in campaign.
+ attr_accessor :vouchers_count
+
+ # Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
+ attr_accessor :start_date
+
+ # Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
+ attr_accessor :expiration_date
+
+ # A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign
+ attr_accessor :active
+
+ # The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.
+ attr_accessor :metadata
+
+ # Timestamp representing the date and time when the campaign was created in ISO 8601 format.
+ attr_accessor :created_at
+
+ # Timestamp representing the date and time when the voucher was updated in ISO 8601 format.
+ attr_accessor :updated_at
+
+ # Unique category name.
+ attr_accessor :category
+
+ # Indicates the status of the campaign creation.
+ attr_accessor :creation_status
+
+ # Indicates the status of the campaign's vouchers.
+ attr_accessor :vouchers_generation_status
+
+ # Indicates whether the resource can be deleted.
+ attr_accessor :protected
+
+ # Unique category ID that this campaign belongs to.
+ attr_accessor :category_id
+
+ # Contains details about the category.
+ attr_accessor :categories
+
+ # The type of object represented by JSON. This object stores information about the campaign.
+ attr_accessor :object
+
+ attr_accessor :referral_program
+
+ attr_accessor :loyalty_tiers_expiration
+
+ attr_accessor :promotion
+
+ attr_accessor :validation_rules_assignments
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'id',
+ :'name' => :'name',
+ :'description' => :'description',
+ :'campaign_type' => :'campaign_type',
+ :'type' => :'type',
+ :'voucher' => :'voucher',
+ :'auto_join' => :'auto_join',
+ :'join_once' => :'join_once',
+ :'use_voucher_metadata_schema' => :'use_voucher_metadata_schema',
+ :'validity_timeframe' => :'validity_timeframe',
+ :'validity_day_of_week' => :'validity_day_of_week',
+ :'activity_duration_after_publishing' => :'activity_duration_after_publishing',
+ :'vouchers_count' => :'vouchers_count',
+ :'start_date' => :'start_date',
+ :'expiration_date' => :'expiration_date',
+ :'active' => :'active',
+ :'metadata' => :'metadata',
+ :'created_at' => :'created_at',
+ :'updated_at' => :'updated_at',
+ :'category' => :'category',
+ :'creation_status' => :'creation_status',
+ :'vouchers_generation_status' => :'vouchers_generation_status',
+ :'protected' => :'protected',
+ :'category_id' => :'category_id',
+ :'categories' => :'categories',
+ :'object' => :'object',
+ :'referral_program' => :'referral_program',
+ :'loyalty_tiers_expiration' => :'loyalty_tiers_expiration',
+ :'promotion' => :'promotion',
+ :'validation_rules_assignments' => :'validation_rules_assignments'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'name' => :'String',
+ :'description' => :'String',
+ :'campaign_type' => :'String',
+ :'type' => :'String',
+ :'voucher' => :'CampaignVoucher',
+ :'auto_join' => :'Boolean',
+ :'join_once' => :'Boolean',
+ :'use_voucher_metadata_schema' => :'Boolean',
+ :'validity_timeframe' => :'CampaignBaseValidityTimeframe',
+ :'validity_day_of_week' => :'Array',
+ :'activity_duration_after_publishing' => :'String',
+ :'vouchers_count' => :'Integer',
+ :'start_date' => :'Time',
+ :'expiration_date' => :'Time',
+ :'active' => :'Boolean',
+ :'metadata' => :'Object',
+ :'created_at' => :'Time',
+ :'updated_at' => :'Time',
+ :'category' => :'String',
+ :'creation_status' => :'String',
+ :'vouchers_generation_status' => :'String',
+ :'protected' => :'Boolean',
+ :'category_id' => :'String',
+ :'categories' => :'Array',
+ :'object' => :'String',
+ :'referral_program' => :'ReferralProgram',
+ :'loyalty_tiers_expiration' => :'LoyaltyTiersExpirationAll',
+ :'promotion' => :'PromotionTiersList',
+ :'validation_rules_assignments' => :'ValidationRulesAssignmentsList'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ :'category_id',
+ ])
+ end
+
+ # List of class defined in allOf (OpenAPI v3)
+ def self.openapi_all_of
+ [
+ :'CampaignBase'
+ ]
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::Campaign` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::Campaign`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ else
+ self.id = nil
+ end
+
+ if attributes.key?(:'name')
+ self.name = attributes[:'name']
+ else
+ self.name = nil
+ end
+
+ if attributes.key?(:'description')
+ self.description = attributes[:'description']
+ end
+
+ if attributes.key?(:'campaign_type')
+ self.campaign_type = attributes[:'campaign_type']
+ else
+ self.campaign_type = nil
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ else
+ self.type = nil
+ end
+
+ if attributes.key?(:'voucher')
+ self.voucher = attributes[:'voucher']
+ end
+
+ if attributes.key?(:'auto_join')
+ self.auto_join = attributes[:'auto_join']
+ else
+ self.auto_join = nil
+ end
+
+ if attributes.key?(:'join_once')
+ self.join_once = attributes[:'join_once']
+ else
+ self.join_once = nil
+ end
+
+ if attributes.key?(:'use_voucher_metadata_schema')
+ self.use_voucher_metadata_schema = attributes[:'use_voucher_metadata_schema']
+ else
+ self.use_voucher_metadata_schema = nil
+ end
+
+ if attributes.key?(:'validity_timeframe')
+ self.validity_timeframe = attributes[:'validity_timeframe']
+ end
+
+ if attributes.key?(:'validity_day_of_week')
+ if (value = attributes[:'validity_day_of_week']).is_a?(Array)
+ self.validity_day_of_week = value
+ end
+ end
+
+ if attributes.key?(:'activity_duration_after_publishing')
+ self.activity_duration_after_publishing = attributes[:'activity_duration_after_publishing']
+ end
+
+ if attributes.key?(:'vouchers_count')
+ self.vouchers_count = attributes[:'vouchers_count']
+ end
+
+ if attributes.key?(:'start_date')
+ self.start_date = attributes[:'start_date']
+ end
+
+ if attributes.key?(:'expiration_date')
+ self.expiration_date = attributes[:'expiration_date']
+ end
+
+ if attributes.key?(:'active')
+ self.active = attributes[:'active']
+ end
+
+ if attributes.key?(:'metadata')
+ self.metadata = attributes[:'metadata']
+ end
+
+ if attributes.key?(:'created_at')
+ self.created_at = attributes[:'created_at']
+ else
+ self.created_at = nil
+ end
+
+ if attributes.key?(:'updated_at')
+ self.updated_at = attributes[:'updated_at']
+ end
+
+ if attributes.key?(:'category')
+ self.category = attributes[:'category']
+ end
+
+ if attributes.key?(:'creation_status')
+ self.creation_status = attributes[:'creation_status']
+ else
+ self.creation_status = nil
+ end
+
+ if attributes.key?(:'vouchers_generation_status')
+ self.vouchers_generation_status = attributes[:'vouchers_generation_status']
+ else
+ self.vouchers_generation_status = nil
+ end
+
+ if attributes.key?(:'protected')
+ self.protected = attributes[:'protected']
+ else
+ self.protected = nil
+ end
+
+ if attributes.key?(:'category_id')
+ self.category_id = attributes[:'category_id']
+ else
+ self.category_id = nil
+ end
+
+ if attributes.key?(:'categories')
+ if (value = attributes[:'categories']).is_a?(Array)
+ self.categories = value
+ end
+ else
+ self.categories = nil
+ end
+
+ if attributes.key?(:'object')
+ self.object = attributes[:'object']
+ else
+ self.object = 'campaign'
+ end
+
+ if attributes.key?(:'referral_program')
+ self.referral_program = attributes[:'referral_program']
+ end
+
+ if attributes.key?(:'loyalty_tiers_expiration')
+ self.loyalty_tiers_expiration = attributes[:'loyalty_tiers_expiration']
+ end
+
+ if attributes.key?(:'promotion')
+ self.promotion = attributes[:'promotion']
+ end
+
+ if attributes.key?(:'validation_rules_assignments')
+ self.validation_rules_assignments = attributes[:'validation_rules_assignments']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @id.nil?
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
+ end
+
+ if @name.nil?
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
+ end
+
+ if @campaign_type.nil?
+ invalid_properties.push('invalid value for "campaign_type", campaign_type cannot be nil.')
+ end
+
+ if @type.nil?
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
+ end
+
+ if @auto_join.nil?
+ invalid_properties.push('invalid value for "auto_join", auto_join cannot be nil.')
+ end
+
+ if @join_once.nil?
+ invalid_properties.push('invalid value for "join_once", join_once cannot be nil.')
+ end
+
+ if @use_voucher_metadata_schema.nil?
+ invalid_properties.push('invalid value for "use_voucher_metadata_schema", use_voucher_metadata_schema cannot be nil.')
+ end
+
+ if @created_at.nil?
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
+ end
+
+ if @creation_status.nil?
+ invalid_properties.push('invalid value for "creation_status", creation_status cannot be nil.')
+ end
+
+ if @vouchers_generation_status.nil?
+ invalid_properties.push('invalid value for "vouchers_generation_status", vouchers_generation_status cannot be nil.')
+ end
+
+ if @protected.nil?
+ invalid_properties.push('invalid value for "protected", protected cannot be nil.')
+ end
+
+ if @categories.nil?
+ invalid_properties.push('invalid value for "categories", categories cannot be nil.')
+ end
+
+ if @object.nil?
+ invalid_properties.push('invalid value for "object", object cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @id.nil?
+ return false if @name.nil?
+ return false if @campaign_type.nil?
+ campaign_type_validator = EnumAttributeValidator.new('String', ["LOYALTY_PROGRAM", "GIFT_VOUCHERS", "DISCOUNT_COUPONS", "PROMOTION", "REFERRAL_PROGRAM", "LUCKY_DRAW"])
+ return false unless campaign_type_validator.valid?(@campaign_type)
+ return false if @type.nil?
+ type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
+ return false unless type_validator.valid?(@type)
+ return false if @auto_join.nil?
+ return false if @join_once.nil?
+ return false if @use_voucher_metadata_schema.nil?
+ return false if @created_at.nil?
+ return false if @creation_status.nil?
+ creation_status_validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
+ return false unless creation_status_validator.valid?(@creation_status)
+ return false if @vouchers_generation_status.nil?
+ vouchers_generation_status_validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
+ return false unless vouchers_generation_status_validator.valid?(@vouchers_generation_status)
+ return false if @protected.nil?
+ return false if @categories.nil?
+ return false if @object.nil?
+ true
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] campaign_type Object to be assigned
+ def campaign_type=(campaign_type)
+ validator = EnumAttributeValidator.new('String', ["LOYALTY_PROGRAM", "GIFT_VOUCHERS", "DISCOUNT_COUPONS", "PROMOTION", "REFERRAL_PROGRAM", "LUCKY_DRAW"])
+ unless validator.valid?(campaign_type)
+ fail ArgumentError, "invalid value for \"campaign_type\", must be one of #{validator.allowable_values}."
+ end
+ @campaign_type = campaign_type
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] type Object to be assigned
+ def type=(type)
+ validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
+ unless validator.valid?(type)
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
+ end
+ @type = type
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] creation_status Object to be assigned
+ def creation_status=(creation_status)
+ validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
+ unless validator.valid?(creation_status)
+ fail ArgumentError, "invalid value for \"creation_status\", must be one of #{validator.allowable_values}."
+ end
+ @creation_status = creation_status
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] vouchers_generation_status Object to be assigned
+ def vouchers_generation_status=(vouchers_generation_status)
+ validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
+ unless validator.valid?(vouchers_generation_status)
+ fail ArgumentError, "invalid value for \"vouchers_generation_status\", must be one of #{validator.allowable_values}."
+ end
+ @vouchers_generation_status = vouchers_generation_status
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ name == o.name &&
+ description == o.description &&
+ campaign_type == o.campaign_type &&
+ type == o.type &&
+ voucher == o.voucher &&
+ auto_join == o.auto_join &&
+ join_once == o.join_once &&
+ use_voucher_metadata_schema == o.use_voucher_metadata_schema &&
+ validity_timeframe == o.validity_timeframe &&
+ validity_day_of_week == o.validity_day_of_week &&
+ activity_duration_after_publishing == o.activity_duration_after_publishing &&
+ vouchers_count == o.vouchers_count &&
+ start_date == o.start_date &&
+ expiration_date == o.expiration_date &&
+ active == o.active &&
+ metadata == o.metadata &&
+ created_at == o.created_at &&
+ updated_at == o.updated_at &&
+ category == o.category &&
+ creation_status == o.creation_status &&
+ vouchers_generation_status == o.vouchers_generation_status &&
+ protected == o.protected &&
+ category_id == o.category_id &&
+ categories == o.categories &&
+ object == o.object &&
+ referral_program == o.referral_program &&
+ loyalty_tiers_expiration == o.loyalty_tiers_expiration &&
+ promotion == o.promotion &&
+ validation_rules_assignments == o.validation_rules_assignments
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, name, description, campaign_type, type, voucher, auto_join, join_once, use_voucher_metadata_schema, validity_timeframe, validity_day_of_week, activity_duration_after_publishing, vouchers_count, start_date, expiration_date, active, metadata, created_at, updated_at, category, creation_status, vouchers_generation_status, protected, category_id, categories, object, referral_program, loyalty_tiers_expiration, promotion, validation_rules_assignments].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaign_base.rb b/lib/VoucherifySdk/models/campaign_base.rb
new file mode 100644
index 00000000..b6b815b1
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaign_base.rb
@@ -0,0 +1,650 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ # This is an object representing a campaign.
+ class CampaignBase
+ # Unique campaign ID, assigned by Voucherify.
+ attr_accessor :id
+
+ # Campaign name.
+ attr_accessor :name
+
+ # An optional field to keep any extra textual information about the campaign such as a campaign description and details.
+ attr_accessor :description
+
+ # Type of campaign.
+ attr_accessor :campaign_type
+
+ # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: the campaign is dynamic, i.e. vouchers will generate based on set criteria - `STATIC`: vouchers need to be manually published
+ attr_accessor :type
+
+ attr_accessor :voucher
+
+ # Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
+ attr_accessor :auto_join
+
+ # If this value is set to `true`, customers will be able to join the campaign only once.
+ attr_accessor :join_once
+
+ # Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
+ attr_accessor :use_voucher_metadata_schema
+
+ attr_accessor :validity_timeframe
+
+ # Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
+ attr_accessor :validity_day_of_week
+
+ # Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days.
+ attr_accessor :activity_duration_after_publishing
+
+ # Total number of unique vouchers in campaign.
+ attr_accessor :vouchers_count
+
+ # Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
+ attr_accessor :start_date
+
+ # Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
+ attr_accessor :expiration_date
+
+ # A flag to toggle the campaign on or off. You can disable a campaign even though it's within the active period defined by the `start_date` and `expiration_date`. - `true` indicates an *active* campaign - `false` indicates an *inactive* campaign
+ attr_accessor :active
+
+ # The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.
+ attr_accessor :metadata
+
+ # Timestamp representing the date and time when the campaign was created in ISO 8601 format.
+ attr_accessor :created_at
+
+ # Timestamp representing the date and time when the voucher was updated in ISO 8601 format.
+ attr_accessor :updated_at
+
+ # Unique category name.
+ attr_accessor :category
+
+ # Indicates the status of the campaign creation.
+ attr_accessor :creation_status
+
+ # Indicates the status of the campaign's vouchers.
+ attr_accessor :vouchers_generation_status
+
+ # Indicates whether the resource can be deleted.
+ attr_accessor :protected
+
+ # Unique category ID that this campaign belongs to.
+ attr_accessor :category_id
+
+ # Contains details about the category.
+ attr_accessor :categories
+
+ # The type of object represented by JSON. This object stores information about the campaign.
+ attr_accessor :object
+
+ attr_accessor :referral_program
+
+ attr_accessor :loyalty_tiers_expiration
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'id' => :'id',
+ :'name' => :'name',
+ :'description' => :'description',
+ :'campaign_type' => :'campaign_type',
+ :'type' => :'type',
+ :'voucher' => :'voucher',
+ :'auto_join' => :'auto_join',
+ :'join_once' => :'join_once',
+ :'use_voucher_metadata_schema' => :'use_voucher_metadata_schema',
+ :'validity_timeframe' => :'validity_timeframe',
+ :'validity_day_of_week' => :'validity_day_of_week',
+ :'activity_duration_after_publishing' => :'activity_duration_after_publishing',
+ :'vouchers_count' => :'vouchers_count',
+ :'start_date' => :'start_date',
+ :'expiration_date' => :'expiration_date',
+ :'active' => :'active',
+ :'metadata' => :'metadata',
+ :'created_at' => :'created_at',
+ :'updated_at' => :'updated_at',
+ :'category' => :'category',
+ :'creation_status' => :'creation_status',
+ :'vouchers_generation_status' => :'vouchers_generation_status',
+ :'protected' => :'protected',
+ :'category_id' => :'category_id',
+ :'categories' => :'categories',
+ :'object' => :'object',
+ :'referral_program' => :'referral_program',
+ :'loyalty_tiers_expiration' => :'loyalty_tiers_expiration'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'id' => :'String',
+ :'name' => :'String',
+ :'description' => :'String',
+ :'campaign_type' => :'String',
+ :'type' => :'String',
+ :'voucher' => :'CampaignVoucher',
+ :'auto_join' => :'Boolean',
+ :'join_once' => :'Boolean',
+ :'use_voucher_metadata_schema' => :'Boolean',
+ :'validity_timeframe' => :'CampaignBaseValidityTimeframe',
+ :'validity_day_of_week' => :'Array',
+ :'activity_duration_after_publishing' => :'String',
+ :'vouchers_count' => :'Integer',
+ :'start_date' => :'Time',
+ :'expiration_date' => :'Time',
+ :'active' => :'Boolean',
+ :'metadata' => :'Object',
+ :'created_at' => :'Time',
+ :'updated_at' => :'Time',
+ :'category' => :'String',
+ :'creation_status' => :'String',
+ :'vouchers_generation_status' => :'String',
+ :'protected' => :'Boolean',
+ :'category_id' => :'String',
+ :'categories' => :'Array',
+ :'object' => :'String',
+ :'referral_program' => :'ReferralProgram',
+ :'loyalty_tiers_expiration' => :'LoyaltyTiersExpirationAll'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ :'category_id',
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::CampaignBase` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::CampaignBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
+ else
+ self.id = nil
+ end
+
+ if attributes.key?(:'name')
+ self.name = attributes[:'name']
+ else
+ self.name = nil
+ end
+
+ if attributes.key?(:'description')
+ self.description = attributes[:'description']
+ end
+
+ if attributes.key?(:'campaign_type')
+ self.campaign_type = attributes[:'campaign_type']
+ else
+ self.campaign_type = nil
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ else
+ self.type = nil
+ end
+
+ if attributes.key?(:'voucher')
+ self.voucher = attributes[:'voucher']
+ end
+
+ if attributes.key?(:'auto_join')
+ self.auto_join = attributes[:'auto_join']
+ else
+ self.auto_join = nil
+ end
+
+ if attributes.key?(:'join_once')
+ self.join_once = attributes[:'join_once']
+ else
+ self.join_once = nil
+ end
+
+ if attributes.key?(:'use_voucher_metadata_schema')
+ self.use_voucher_metadata_schema = attributes[:'use_voucher_metadata_schema']
+ else
+ self.use_voucher_metadata_schema = nil
+ end
+
+ if attributes.key?(:'validity_timeframe')
+ self.validity_timeframe = attributes[:'validity_timeframe']
+ end
+
+ if attributes.key?(:'validity_day_of_week')
+ if (value = attributes[:'validity_day_of_week']).is_a?(Array)
+ self.validity_day_of_week = value
+ end
+ end
+
+ if attributes.key?(:'activity_duration_after_publishing')
+ self.activity_duration_after_publishing = attributes[:'activity_duration_after_publishing']
+ end
+
+ if attributes.key?(:'vouchers_count')
+ self.vouchers_count = attributes[:'vouchers_count']
+ end
+
+ if attributes.key?(:'start_date')
+ self.start_date = attributes[:'start_date']
+ end
+
+ if attributes.key?(:'expiration_date')
+ self.expiration_date = attributes[:'expiration_date']
+ end
+
+ if attributes.key?(:'active')
+ self.active = attributes[:'active']
+ end
+
+ if attributes.key?(:'metadata')
+ self.metadata = attributes[:'metadata']
+ end
+
+ if attributes.key?(:'created_at')
+ self.created_at = attributes[:'created_at']
+ else
+ self.created_at = nil
+ end
+
+ if attributes.key?(:'updated_at')
+ self.updated_at = attributes[:'updated_at']
+ end
+
+ if attributes.key?(:'category')
+ self.category = attributes[:'category']
+ end
+
+ if attributes.key?(:'creation_status')
+ self.creation_status = attributes[:'creation_status']
+ else
+ self.creation_status = nil
+ end
+
+ if attributes.key?(:'vouchers_generation_status')
+ self.vouchers_generation_status = attributes[:'vouchers_generation_status']
+ else
+ self.vouchers_generation_status = nil
+ end
+
+ if attributes.key?(:'protected')
+ self.protected = attributes[:'protected']
+ else
+ self.protected = nil
+ end
+
+ if attributes.key?(:'category_id')
+ self.category_id = attributes[:'category_id']
+ else
+ self.category_id = nil
+ end
+
+ if attributes.key?(:'categories')
+ if (value = attributes[:'categories']).is_a?(Array)
+ self.categories = value
+ end
+ else
+ self.categories = nil
+ end
+
+ if attributes.key?(:'object')
+ self.object = attributes[:'object']
+ else
+ self.object = 'campaign'
+ end
+
+ if attributes.key?(:'referral_program')
+ self.referral_program = attributes[:'referral_program']
+ end
+
+ if attributes.key?(:'loyalty_tiers_expiration')
+ self.loyalty_tiers_expiration = attributes[:'loyalty_tiers_expiration']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @id.nil?
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
+ end
+
+ if @name.nil?
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
+ end
+
+ if @campaign_type.nil?
+ invalid_properties.push('invalid value for "campaign_type", campaign_type cannot be nil.')
+ end
+
+ if @type.nil?
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
+ end
+
+ if @auto_join.nil?
+ invalid_properties.push('invalid value for "auto_join", auto_join cannot be nil.')
+ end
+
+ if @join_once.nil?
+ invalid_properties.push('invalid value for "join_once", join_once cannot be nil.')
+ end
+
+ if @use_voucher_metadata_schema.nil?
+ invalid_properties.push('invalid value for "use_voucher_metadata_schema", use_voucher_metadata_schema cannot be nil.')
+ end
+
+ if @created_at.nil?
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
+ end
+
+ if @creation_status.nil?
+ invalid_properties.push('invalid value for "creation_status", creation_status cannot be nil.')
+ end
+
+ if @vouchers_generation_status.nil?
+ invalid_properties.push('invalid value for "vouchers_generation_status", vouchers_generation_status cannot be nil.')
+ end
+
+ if @protected.nil?
+ invalid_properties.push('invalid value for "protected", protected cannot be nil.')
+ end
+
+ if @categories.nil?
+ invalid_properties.push('invalid value for "categories", categories cannot be nil.')
+ end
+
+ if @object.nil?
+ invalid_properties.push('invalid value for "object", object cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @id.nil?
+ return false if @name.nil?
+ return false if @campaign_type.nil?
+ campaign_type_validator = EnumAttributeValidator.new('String', ["LOYALTY_PROGRAM", "GIFT_VOUCHERS", "DISCOUNT_COUPONS", "PROMOTION", "REFERRAL_PROGRAM", "LUCKY_DRAW"])
+ return false unless campaign_type_validator.valid?(@campaign_type)
+ return false if @type.nil?
+ type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
+ return false unless type_validator.valid?(@type)
+ return false if @auto_join.nil?
+ return false if @join_once.nil?
+ return false if @use_voucher_metadata_schema.nil?
+ return false if @created_at.nil?
+ return false if @creation_status.nil?
+ creation_status_validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
+ return false unless creation_status_validator.valid?(@creation_status)
+ return false if @vouchers_generation_status.nil?
+ vouchers_generation_status_validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
+ return false unless vouchers_generation_status_validator.valid?(@vouchers_generation_status)
+ return false if @protected.nil?
+ return false if @categories.nil?
+ return false if @object.nil?
+ true
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] campaign_type Object to be assigned
+ def campaign_type=(campaign_type)
+ validator = EnumAttributeValidator.new('String', ["LOYALTY_PROGRAM", "GIFT_VOUCHERS", "DISCOUNT_COUPONS", "PROMOTION", "REFERRAL_PROGRAM", "LUCKY_DRAW"])
+ unless validator.valid?(campaign_type)
+ fail ArgumentError, "invalid value for \"campaign_type\", must be one of #{validator.allowable_values}."
+ end
+ @campaign_type = campaign_type
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] type Object to be assigned
+ def type=(type)
+ validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
+ unless validator.valid?(type)
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
+ end
+ @type = type
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] creation_status Object to be assigned
+ def creation_status=(creation_status)
+ validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
+ unless validator.valid?(creation_status)
+ fail ArgumentError, "invalid value for \"creation_status\", must be one of #{validator.allowable_values}."
+ end
+ @creation_status = creation_status
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] vouchers_generation_status Object to be assigned
+ def vouchers_generation_status=(vouchers_generation_status)
+ validator = EnumAttributeValidator.new('String', ["DONE", "IN_PROGRESS", "FAILED", "DRAFT", "MODIFYING"])
+ unless validator.valid?(vouchers_generation_status)
+ fail ArgumentError, "invalid value for \"vouchers_generation_status\", must be one of #{validator.allowable_values}."
+ end
+ @vouchers_generation_status = vouchers_generation_status
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ id == o.id &&
+ name == o.name &&
+ description == o.description &&
+ campaign_type == o.campaign_type &&
+ type == o.type &&
+ voucher == o.voucher &&
+ auto_join == o.auto_join &&
+ join_once == o.join_once &&
+ use_voucher_metadata_schema == o.use_voucher_metadata_schema &&
+ validity_timeframe == o.validity_timeframe &&
+ validity_day_of_week == o.validity_day_of_week &&
+ activity_duration_after_publishing == o.activity_duration_after_publishing &&
+ vouchers_count == o.vouchers_count &&
+ start_date == o.start_date &&
+ expiration_date == o.expiration_date &&
+ active == o.active &&
+ metadata == o.metadata &&
+ created_at == o.created_at &&
+ updated_at == o.updated_at &&
+ category == o.category &&
+ creation_status == o.creation_status &&
+ vouchers_generation_status == o.vouchers_generation_status &&
+ protected == o.protected &&
+ category_id == o.category_id &&
+ categories == o.categories &&
+ object == o.object &&
+ referral_program == o.referral_program &&
+ loyalty_tiers_expiration == o.loyalty_tiers_expiration
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [id, name, description, campaign_type, type, voucher, auto_join, join_once, use_voucher_metadata_schema, validity_timeframe, validity_day_of_week, activity_duration_after_publishing, vouchers_count, start_date, expiration_date, active, metadata, created_at, updated_at, category, creation_status, vouchers_generation_status, protected, category_id, categories, object, referral_program, loyalty_tiers_expiration].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaign_base_validity_timeframe.rb b/lib/VoucherifySdk/models/campaign_base_validity_timeframe.rb
new file mode 100644
index 00000000..d685fe5d
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaign_base_validity_timeframe.rb
@@ -0,0 +1,226 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ # Set recurrent time periods when the campaign is valid. For example, valid for 1 hour every other day.`start_date` **required** when including the `validity_timeframe`.
+ class CampaignBaseValidityTimeframe
+ # Defines the intervening time between two time points in ISO 8601 format, expressed as a duration. For example, a campaign with an `interval` of `P2D` will be active every other day.
+ attr_accessor :interval
+
+ # Defines the amount of time the campaign will be active in ISO 8601 format. For example, a campaign with a `duration` of `P1D` will be valid for a duration of one day.
+ attr_accessor :duration
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'interval' => :'interval',
+ :'duration' => :'duration'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'interval' => :'String',
+ :'duration' => :'String'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::CampaignBaseValidityTimeframe` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::CampaignBaseValidityTimeframe`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'interval')
+ self.interval = attributes[:'interval']
+ end
+
+ if attributes.key?(:'duration')
+ self.duration = attributes[:'duration']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ interval == o.interval &&
+ duration == o.duration
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [interval, duration].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaign_loyalty_card.rb b/lib/VoucherifySdk/models/campaign_loyalty_card.rb
new file mode 100644
index 00000000..ed91af53
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaign_loyalty_card.rb
@@ -0,0 +1,232 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ # Schema model for a campaign loyalty card.
+ class CampaignLoyaltyCard
+ # The initial number of points to assign to the loyalty card. This is the current loyalty card score i.e. the number of loyalty points on the card.
+ attr_accessor :points
+
+ attr_accessor :expiration_rules
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'points' => :'points',
+ :'expiration_rules' => :'expiration_rules'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'points' => :'Integer',
+ :'expiration_rules' => :'CampaignLoyaltyCardExpirationRules'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::CampaignLoyaltyCard` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::CampaignLoyaltyCard`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'points')
+ self.points = attributes[:'points']
+ else
+ self.points = nil
+ end
+
+ if attributes.key?(:'expiration_rules')
+ self.expiration_rules = attributes[:'expiration_rules']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @points.nil?
+ invalid_properties.push('invalid value for "points", points cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @points.nil?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ points == o.points &&
+ expiration_rules == o.expiration_rules
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [points, expiration_rules].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaign_loyalty_card_expiration_rules.rb b/lib/VoucherifySdk/models/campaign_loyalty_card_expiration_rules.rb
new file mode 100644
index 00000000..b0a362cf
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaign_loyalty_card_expiration_rules.rb
@@ -0,0 +1,273 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ class CampaignLoyaltyCardExpirationRules
+ # Type of period
+ attr_accessor :period_type
+
+ # Value of the period
+ attr_accessor :period_value
+
+ # Type of rounding
+ attr_accessor :rounding_type
+
+ # Value of rounding
+ attr_accessor :rounding_value
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'period_type' => :'period_type',
+ :'period_value' => :'period_value',
+ :'rounding_type' => :'rounding_type',
+ :'rounding_value' => :'rounding_value'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'period_type' => :'String',
+ :'period_value' => :'Integer',
+ :'rounding_type' => :'String',
+ :'rounding_value' => :'Integer'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::CampaignLoyaltyCardExpirationRules` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::CampaignLoyaltyCardExpirationRules`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'period_type')
+ self.period_type = attributes[:'period_type']
+ else
+ self.period_type = nil
+ end
+
+ if attributes.key?(:'period_value')
+ self.period_value = attributes[:'period_value']
+ else
+ self.period_value = nil
+ end
+
+ if attributes.key?(:'rounding_type')
+ self.rounding_type = attributes[:'rounding_type']
+ else
+ self.rounding_type = nil
+ end
+
+ if attributes.key?(:'rounding_value')
+ self.rounding_value = attributes[:'rounding_value']
+ else
+ self.rounding_value = nil
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @period_type.nil?
+ invalid_properties.push('invalid value for "period_type", period_type cannot be nil.')
+ end
+
+ if @period_value.nil?
+ invalid_properties.push('invalid value for "period_value", period_value cannot be nil.')
+ end
+
+ if @rounding_type.nil?
+ invalid_properties.push('invalid value for "rounding_type", rounding_type cannot be nil.')
+ end
+
+ if @rounding_value.nil?
+ invalid_properties.push('invalid value for "rounding_value", rounding_value cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @period_type.nil?
+ return false if @period_value.nil?
+ return false if @rounding_type.nil?
+ return false if @rounding_value.nil?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ period_type == o.period_type &&
+ period_value == o.period_value &&
+ rounding_type == o.rounding_type &&
+ rounding_value == o.rounding_value
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [period_type, period_value, rounding_type, rounding_value].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaign_loyalty_voucher.rb b/lib/VoucherifySdk/models/campaign_loyalty_voucher.rb
new file mode 100644
index 00000000..5a3933fb
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaign_loyalty_voucher.rb
@@ -0,0 +1,291 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ # Schema model for a discount voucher.
+ class CampaignLoyaltyVoucher
+ # Type of voucher.
+ attr_accessor :type
+
+ attr_accessor :loyalty_card
+
+ attr_accessor :redemption
+
+ attr_accessor :code_config
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'type' => :'type',
+ :'loyalty_card' => :'loyalty_card',
+ :'redemption' => :'redemption',
+ :'code_config' => :'code_config'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'type' => :'String',
+ :'loyalty_card' => :'CampaignLoyaltyCard',
+ :'redemption' => :'CampaignLoyaltyVoucherRedemption',
+ :'code_config' => :'CodeConfig'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::CampaignLoyaltyVoucher` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::CampaignLoyaltyVoucher`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ else
+ self.type = 'LOYALTY_CARD'
+ end
+
+ if attributes.key?(:'loyalty_card')
+ self.loyalty_card = attributes[:'loyalty_card']
+ else
+ self.loyalty_card = nil
+ end
+
+ if attributes.key?(:'redemption')
+ self.redemption = attributes[:'redemption']
+ end
+
+ if attributes.key?(:'code_config')
+ self.code_config = attributes[:'code_config']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @type.nil?
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
+ end
+
+ if @loyalty_card.nil?
+ invalid_properties.push('invalid value for "loyalty_card", loyalty_card cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @type.nil?
+ type_validator = EnumAttributeValidator.new('String', ["LOYALTY_CARD"])
+ return false unless type_validator.valid?(@type)
+ return false if @loyalty_card.nil?
+ true
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] type Object to be assigned
+ def type=(type)
+ validator = EnumAttributeValidator.new('String', ["LOYALTY_CARD"])
+ unless validator.valid?(type)
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
+ end
+ @type = type
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ type == o.type &&
+ loyalty_card == o.loyalty_card &&
+ redemption == o.redemption &&
+ code_config == o.code_config
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [type, loyalty_card, redemption, code_config].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaign_loyalty_voucher_redemption.rb b/lib/VoucherifySdk/models/campaign_loyalty_voucher_redemption.rb
new file mode 100644
index 00000000..f7175ddd
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaign_loyalty_voucher_redemption.rb
@@ -0,0 +1,217 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ # Defines the redemption limits on vouchers.
+ class CampaignLoyaltyVoucherRedemption
+ # How many times a voucher can be redeemed. A `null` value means unlimited.
+ attr_accessor :quantity
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'quantity' => :'quantity'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'quantity' => :'Integer'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ :'quantity'
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::CampaignLoyaltyVoucherRedemption` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::CampaignLoyaltyVoucherRedemption`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'quantity')
+ self.quantity = attributes[:'quantity']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ quantity == o.quantity
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [quantity].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaign_voucher.rb b/lib/VoucherifySdk/models/campaign_voucher.rb
new file mode 100644
index 00000000..dbe1bc2f
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaign_voucher.rb
@@ -0,0 +1,328 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ # Schema model for a campaign voucher.
+ class CampaignVoucher
+ # Type of voucher.
+ attr_accessor :type
+
+ attr_accessor :discount
+
+ attr_accessor :gift
+
+ attr_accessor :loyalty_card
+
+ attr_accessor :redemption
+
+ attr_accessor :code_config
+
+ # Flag indicating whether this voucher is a referral code; `true` for campaign type `REFERRAL_PROGRAM`.
+ attr_accessor :is_referral_code
+
+ # Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
+ attr_accessor :start_date
+
+ # Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
+ attr_accessor :expiration_date
+
+ attr_accessor :validity_timeframe
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'type' => :'type',
+ :'discount' => :'discount',
+ :'gift' => :'gift',
+ :'loyalty_card' => :'loyalty_card',
+ :'redemption' => :'redemption',
+ :'code_config' => :'code_config',
+ :'is_referral_code' => :'is_referral_code',
+ :'start_date' => :'start_date',
+ :'expiration_date' => :'expiration_date',
+ :'validity_timeframe' => :'validity_timeframe'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'type' => :'String',
+ :'discount' => :'Discount',
+ :'gift' => :'Gift',
+ :'loyalty_card' => :'CampaignLoyaltyCard',
+ :'redemption' => :'CampaignVoucherRedemption',
+ :'code_config' => :'CodeConfigRequiredLengthCharsetPattern',
+ :'is_referral_code' => :'Boolean',
+ :'start_date' => :'Time',
+ :'expiration_date' => :'Time',
+ :'validity_timeframe' => :'CampaignBaseValidityTimeframe'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::CampaignVoucher` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::CampaignVoucher`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ else
+ self.type = 'DISCOUNT_VOUCHER'
+ end
+
+ if attributes.key?(:'discount')
+ self.discount = attributes[:'discount']
+ end
+
+ if attributes.key?(:'gift')
+ self.gift = attributes[:'gift']
+ end
+
+ if attributes.key?(:'loyalty_card')
+ self.loyalty_card = attributes[:'loyalty_card']
+ end
+
+ if attributes.key?(:'redemption')
+ self.redemption = attributes[:'redemption']
+ else
+ self.redemption = nil
+ end
+
+ if attributes.key?(:'code_config')
+ self.code_config = attributes[:'code_config']
+ else
+ self.code_config = nil
+ end
+
+ if attributes.key?(:'is_referral_code')
+ self.is_referral_code = attributes[:'is_referral_code']
+ else
+ self.is_referral_code = nil
+ end
+
+ if attributes.key?(:'start_date')
+ self.start_date = attributes[:'start_date']
+ end
+
+ if attributes.key?(:'expiration_date')
+ self.expiration_date = attributes[:'expiration_date']
+ end
+
+ if attributes.key?(:'validity_timeframe')
+ self.validity_timeframe = attributes[:'validity_timeframe']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if @type.nil?
+ invalid_properties.push('invalid value for "type", type cannot be nil.')
+ end
+
+ if @redemption.nil?
+ invalid_properties.push('invalid value for "redemption", redemption cannot be nil.')
+ end
+
+ if @code_config.nil?
+ invalid_properties.push('invalid value for "code_config", code_config cannot be nil.')
+ end
+
+ if @is_referral_code.nil?
+ invalid_properties.push('invalid value for "is_referral_code", is_referral_code cannot be nil.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ return false if @type.nil?
+ return false if @redemption.nil?
+ return false if @code_config.nil?
+ return false if @is_referral_code.nil?
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ type == o.type &&
+ discount == o.discount &&
+ gift == o.gift &&
+ loyalty_card == o.loyalty_card &&
+ redemption == o.redemption &&
+ code_config == o.code_config &&
+ is_referral_code == o.is_referral_code &&
+ start_date == o.start_date &&
+ expiration_date == o.expiration_date &&
+ validity_timeframe == o.validity_timeframe
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [type, discount, gift, loyalty_card, redemption, code_config, is_referral_code, start_date, expiration_date, validity_timeframe].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaign_voucher_redemption.rb b/lib/VoucherifySdk/models/campaign_voucher_redemption.rb
new file mode 100644
index 00000000..2e39f387
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaign_voucher_redemption.rb
@@ -0,0 +1,219 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ # Defines the redemption limits on vouchers.
+ class CampaignVoucherRedemption
+ # How many times a voucher can be redeemed. A `null` value means unlimited.
+ attr_accessor :quantity
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'quantity' => :'quantity'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'quantity' => :'Integer'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ :'quantity'
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::CampaignVoucherRedemption` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::CampaignVoucherRedemption`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'quantity')
+ self.quantity = attributes[:'quantity']
+ else
+ self.quantity = nil
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ true
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ quantity == o.quantity
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [quantity].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaigns_create_base.rb b/lib/VoucherifySdk/models/campaigns_create_base.rb
new file mode 100644
index 00000000..165d98f0
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaigns_create_base.rb
@@ -0,0 +1,422 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ # Base body schema for creating a campaign using **POST** `/campaigns`.
+ class CampaignsCreateBase
+ # Campaign name.
+ attr_accessor :name
+
+ # An optional field to keep any extra textual information about the campaign such as a campaign description and details.
+ attr_accessor :description
+
+ # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.
+ attr_accessor :type
+
+ # If this value is set to `true`, customers will be able to join the campaign only once.
+ attr_accessor :join_once
+
+ # Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
+ attr_accessor :auto_join
+
+ # Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
+ attr_accessor :use_voucher_metadata_schema
+
+ # Total number of unique vouchers in campaign (size of campaign).
+ attr_accessor :vouchers_count
+
+ # Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
+ attr_accessor :start_date
+
+ # Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
+ attr_accessor :expiration_date
+
+ attr_accessor :validity_timeframe
+
+ # Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
+ attr_accessor :validity_day_of_week
+
+ # Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days.
+ attr_accessor :activity_duration_after_publishing
+
+ # Array containing the ID of the validation rule associated with the promotion tier.
+ attr_accessor :validation_rules
+
+ # Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`.
+ attr_accessor :category_id
+
+ # The category assigned to the campaign. Either pass this parameter OR the `category_id`.
+ attr_accessor :category
+
+ # The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.
+ attr_accessor :metadata
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'name' => :'name',
+ :'description' => :'description',
+ :'type' => :'type',
+ :'join_once' => :'join_once',
+ :'auto_join' => :'auto_join',
+ :'use_voucher_metadata_schema' => :'use_voucher_metadata_schema',
+ :'vouchers_count' => :'vouchers_count',
+ :'start_date' => :'start_date',
+ :'expiration_date' => :'expiration_date',
+ :'validity_timeframe' => :'validity_timeframe',
+ :'validity_day_of_week' => :'validity_day_of_week',
+ :'activity_duration_after_publishing' => :'activity_duration_after_publishing',
+ :'validation_rules' => :'validation_rules',
+ :'category_id' => :'category_id',
+ :'category' => :'category',
+ :'metadata' => :'metadata'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'name' => :'String',
+ :'description' => :'String',
+ :'type' => :'String',
+ :'join_once' => :'Boolean',
+ :'auto_join' => :'Boolean',
+ :'use_voucher_metadata_schema' => :'Boolean',
+ :'vouchers_count' => :'Integer',
+ :'start_date' => :'Time',
+ :'expiration_date' => :'Time',
+ :'validity_timeframe' => :'CampaignBaseValidityTimeframe',
+ :'validity_day_of_week' => :'Array',
+ :'activity_duration_after_publishing' => :'String',
+ :'validation_rules' => :'Array',
+ :'category_id' => :'String',
+ :'category' => :'String',
+ :'metadata' => :'Object'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::CampaignsCreateBase` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::CampaignsCreateBase`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'name')
+ self.name = attributes[:'name']
+ end
+
+ if attributes.key?(:'description')
+ self.description = attributes[:'description']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+
+ if attributes.key?(:'join_once')
+ self.join_once = attributes[:'join_once']
+ end
+
+ if attributes.key?(:'auto_join')
+ self.auto_join = attributes[:'auto_join']
+ end
+
+ if attributes.key?(:'use_voucher_metadata_schema')
+ self.use_voucher_metadata_schema = attributes[:'use_voucher_metadata_schema']
+ end
+
+ if attributes.key?(:'vouchers_count')
+ self.vouchers_count = attributes[:'vouchers_count']
+ end
+
+ if attributes.key?(:'start_date')
+ self.start_date = attributes[:'start_date']
+ end
+
+ if attributes.key?(:'expiration_date')
+ self.expiration_date = attributes[:'expiration_date']
+ end
+
+ if attributes.key?(:'validity_timeframe')
+ self.validity_timeframe = attributes[:'validity_timeframe']
+ end
+
+ if attributes.key?(:'validity_day_of_week')
+ if (value = attributes[:'validity_day_of_week']).is_a?(Array)
+ self.validity_day_of_week = value
+ end
+ end
+
+ if attributes.key?(:'activity_duration_after_publishing')
+ self.activity_duration_after_publishing = attributes[:'activity_duration_after_publishing']
+ end
+
+ if attributes.key?(:'validation_rules')
+ if (value = attributes[:'validation_rules']).is_a?(Array)
+ self.validation_rules = value
+ end
+ end
+
+ if attributes.key?(:'category_id')
+ self.category_id = attributes[:'category_id']
+ end
+
+ if attributes.key?(:'category')
+ self.category = attributes[:'category']
+ end
+
+ if attributes.key?(:'metadata')
+ self.metadata = attributes[:'metadata']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if !@validation_rules.nil? && @validation_rules.length > 1
+ invalid_properties.push('invalid value for "validation_rules", number of items must be less than or equal to 1.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
+ return false unless type_validator.valid?(@type)
+ return false if !@validation_rules.nil? && @validation_rules.length > 1
+ true
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] type Object to be assigned
+ def type=(type)
+ validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
+ unless validator.valid?(type)
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
+ end
+ @type = type
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] validation_rules Value to be assigned
+ def validation_rules=(validation_rules)
+ if validation_rules.nil?
+ fail ArgumentError, 'validation_rules cannot be nil'
+ end
+
+ if validation_rules.length > 1
+ fail ArgumentError, 'invalid value for "validation_rules", number of items must be less than or equal to 1.'
+ end
+
+ @validation_rules = validation_rules
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ name == o.name &&
+ description == o.description &&
+ type == o.type &&
+ join_once == o.join_once &&
+ auto_join == o.auto_join &&
+ use_voucher_metadata_schema == o.use_voucher_metadata_schema &&
+ vouchers_count == o.vouchers_count &&
+ start_date == o.start_date &&
+ expiration_date == o.expiration_date &&
+ validity_timeframe == o.validity_timeframe &&
+ validity_day_of_week == o.validity_day_of_week &&
+ activity_duration_after_publishing == o.activity_duration_after_publishing &&
+ validation_rules == o.validation_rules &&
+ category_id == o.category_id &&
+ category == o.category &&
+ metadata == o.metadata
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [name, description, type, join_once, auto_join, use_voucher_metadata_schema, vouchers_count, start_date, expiration_date, validity_timeframe, validity_day_of_week, activity_duration_after_publishing, validation_rules, category_id, category, metadata].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaigns_create_discount_coupons_campaign.rb b/lib/VoucherifySdk/models/campaigns_create_discount_coupons_campaign.rb
new file mode 100644
index 00000000..fd98a0a1
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaigns_create_discount_coupons_campaign.rb
@@ -0,0 +1,461 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ class CampaignsCreateDiscountCouponsCampaign
+ # Campaign name.
+ attr_accessor :name
+
+ # An optional field to keep any extra textual information about the campaign such as a campaign description and details.
+ attr_accessor :description
+
+ # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.
+ attr_accessor :type
+
+ # If this value is set to `true`, customers will be able to join the campaign only once.
+ attr_accessor :join_once
+
+ # Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
+ attr_accessor :auto_join
+
+ # Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
+ attr_accessor :use_voucher_metadata_schema
+
+ # Total number of unique vouchers in campaign (size of campaign).
+ attr_accessor :vouchers_count
+
+ # Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
+ attr_accessor :start_date
+
+ # Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
+ attr_accessor :expiration_date
+
+ attr_accessor :validity_timeframe
+
+ # Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
+ attr_accessor :validity_day_of_week
+
+ # Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days.
+ attr_accessor :activity_duration_after_publishing
+
+ # Array containing the ID of the validation rule associated with the promotion tier.
+ attr_accessor :validation_rules
+
+ # Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`.
+ attr_accessor :category_id
+
+ # The category assigned to the campaign. Either pass this parameter OR the `category_id`.
+ attr_accessor :category
+
+ # The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.
+ attr_accessor :metadata
+
+ # Type of campaign.
+ attr_accessor :campaign_type
+
+ attr_accessor :voucher
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'name' => :'name',
+ :'description' => :'description',
+ :'type' => :'type',
+ :'join_once' => :'join_once',
+ :'auto_join' => :'auto_join',
+ :'use_voucher_metadata_schema' => :'use_voucher_metadata_schema',
+ :'vouchers_count' => :'vouchers_count',
+ :'start_date' => :'start_date',
+ :'expiration_date' => :'expiration_date',
+ :'validity_timeframe' => :'validity_timeframe',
+ :'validity_day_of_week' => :'validity_day_of_week',
+ :'activity_duration_after_publishing' => :'activity_duration_after_publishing',
+ :'validation_rules' => :'validation_rules',
+ :'category_id' => :'category_id',
+ :'category' => :'category',
+ :'metadata' => :'metadata',
+ :'campaign_type' => :'campaign_type',
+ :'voucher' => :'voucher'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'name' => :'String',
+ :'description' => :'String',
+ :'type' => :'String',
+ :'join_once' => :'Boolean',
+ :'auto_join' => :'Boolean',
+ :'use_voucher_metadata_schema' => :'Boolean',
+ :'vouchers_count' => :'Integer',
+ :'start_date' => :'Time',
+ :'expiration_date' => :'Time',
+ :'validity_timeframe' => :'CampaignBaseValidityTimeframe',
+ :'validity_day_of_week' => :'Array',
+ :'activity_duration_after_publishing' => :'String',
+ :'validation_rules' => :'Array',
+ :'category_id' => :'String',
+ :'category' => :'String',
+ :'metadata' => :'Object',
+ :'campaign_type' => :'String',
+ :'voucher' => :'DiscountCouponsCampaignVoucher'
+ }
+ end
+
+ # List of attributes with nullable: true
+ def self.openapi_nullable
+ Set.new([
+ ])
+ end
+
+ # List of class defined in allOf (OpenAPI v3)
+ def self.openapi_all_of
+ [
+ :'CampaignsCreateBase'
+ ]
+ end
+
+ # Initializes the object
+ # @param [Hash] attributes Model attributes in the form of hash
+ def initialize(attributes = {})
+ if (!attributes.is_a?(Hash))
+ fail ArgumentError, "The input argument (attributes) must be a hash in `VoucherifySdk::CampaignsCreateDiscountCouponsCampaign` initialize method"
+ end
+
+ # check to see if the attribute exists and convert string to symbol for hash key
+ attributes = attributes.each_with_object({}) { |(k, v), h|
+ if (!self.class.attribute_map.key?(k.to_sym))
+ fail ArgumentError, "`#{k}` is not a valid attribute in `VoucherifySdk::CampaignsCreateDiscountCouponsCampaign`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
+ end
+ h[k.to_sym] = v
+ }
+
+ if attributes.key?(:'name')
+ self.name = attributes[:'name']
+ end
+
+ if attributes.key?(:'description')
+ self.description = attributes[:'description']
+ end
+
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
+ end
+
+ if attributes.key?(:'join_once')
+ self.join_once = attributes[:'join_once']
+ end
+
+ if attributes.key?(:'auto_join')
+ self.auto_join = attributes[:'auto_join']
+ end
+
+ if attributes.key?(:'use_voucher_metadata_schema')
+ self.use_voucher_metadata_schema = attributes[:'use_voucher_metadata_schema']
+ end
+
+ if attributes.key?(:'vouchers_count')
+ self.vouchers_count = attributes[:'vouchers_count']
+ end
+
+ if attributes.key?(:'start_date')
+ self.start_date = attributes[:'start_date']
+ end
+
+ if attributes.key?(:'expiration_date')
+ self.expiration_date = attributes[:'expiration_date']
+ end
+
+ if attributes.key?(:'validity_timeframe')
+ self.validity_timeframe = attributes[:'validity_timeframe']
+ end
+
+ if attributes.key?(:'validity_day_of_week')
+ if (value = attributes[:'validity_day_of_week']).is_a?(Array)
+ self.validity_day_of_week = value
+ end
+ end
+
+ if attributes.key?(:'activity_duration_after_publishing')
+ self.activity_duration_after_publishing = attributes[:'activity_duration_after_publishing']
+ end
+
+ if attributes.key?(:'validation_rules')
+ if (value = attributes[:'validation_rules']).is_a?(Array)
+ self.validation_rules = value
+ end
+ end
+
+ if attributes.key?(:'category_id')
+ self.category_id = attributes[:'category_id']
+ end
+
+ if attributes.key?(:'category')
+ self.category = attributes[:'category']
+ end
+
+ if attributes.key?(:'metadata')
+ self.metadata = attributes[:'metadata']
+ end
+
+ if attributes.key?(:'campaign_type')
+ self.campaign_type = attributes[:'campaign_type']
+ else
+ self.campaign_type = 'DISCOUNT_COUPONS'
+ end
+
+ if attributes.key?(:'voucher')
+ self.voucher = attributes[:'voucher']
+ end
+ end
+
+ # Show invalid properties with the reasons. Usually used together with valid?
+ # @return Array for valid properties with the reasons
+ def list_invalid_properties
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
+ invalid_properties = Array.new
+ if !@validation_rules.nil? && @validation_rules.length > 1
+ invalid_properties.push('invalid value for "validation_rules", number of items must be less than or equal to 1.')
+ end
+
+ invalid_properties
+ end
+
+ # Check to see if the all the properties in the model are valid
+ # @return true if the model is valid
+ def valid?
+ warn '[DEPRECATED] the `valid?` method is obsolete'
+ type_validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
+ return false unless type_validator.valid?(@type)
+ return false if !@validation_rules.nil? && @validation_rules.length > 1
+ campaign_type_validator = EnumAttributeValidator.new('String', ["DISCOUNT_COUPONS"])
+ return false unless campaign_type_validator.valid?(@campaign_type)
+ true
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] type Object to be assigned
+ def type=(type)
+ validator = EnumAttributeValidator.new('String', ["AUTO_UPDATE", "STATIC"])
+ unless validator.valid?(type)
+ fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
+ end
+ @type = type
+ end
+
+ # Custom attribute writer method with validation
+ # @param [Object] validation_rules Value to be assigned
+ def validation_rules=(validation_rules)
+ if validation_rules.nil?
+ fail ArgumentError, 'validation_rules cannot be nil'
+ end
+
+ if validation_rules.length > 1
+ fail ArgumentError, 'invalid value for "validation_rules", number of items must be less than or equal to 1.'
+ end
+
+ @validation_rules = validation_rules
+ end
+
+ # Custom attribute writer method checking allowed values (enum).
+ # @param [Object] campaign_type Object to be assigned
+ def campaign_type=(campaign_type)
+ validator = EnumAttributeValidator.new('String', ["DISCOUNT_COUPONS"])
+ unless validator.valid?(campaign_type)
+ fail ArgumentError, "invalid value for \"campaign_type\", must be one of #{validator.allowable_values}."
+ end
+ @campaign_type = campaign_type
+ end
+
+ # Checks equality by comparing each attribute.
+ # @param [Object] Object to be compared
+ def ==(o)
+ return true if self.equal?(o)
+ self.class == o.class &&
+ name == o.name &&
+ description == o.description &&
+ type == o.type &&
+ join_once == o.join_once &&
+ auto_join == o.auto_join &&
+ use_voucher_metadata_schema == o.use_voucher_metadata_schema &&
+ vouchers_count == o.vouchers_count &&
+ start_date == o.start_date &&
+ expiration_date == o.expiration_date &&
+ validity_timeframe == o.validity_timeframe &&
+ validity_day_of_week == o.validity_day_of_week &&
+ activity_duration_after_publishing == o.activity_duration_after_publishing &&
+ validation_rules == o.validation_rules &&
+ category_id == o.category_id &&
+ category == o.category &&
+ metadata == o.metadata &&
+ campaign_type == o.campaign_type &&
+ voucher == o.voucher
+ end
+
+ # @see the `==` method
+ # @param [Object] Object to be compared
+ def eql?(o)
+ self == o
+ end
+
+ # Calculates hash code according to all attributes.
+ # @return [Integer] Hash code
+ def hash
+ [name, description, type, join_once, auto_join, use_voucher_metadata_schema, vouchers_count, start_date, expiration_date, validity_timeframe, validity_day_of_week, activity_duration_after_publishing, validation_rules, category_id, category, metadata, campaign_type, voucher].hash
+ end
+
+ # Builds the object from hash
+ # @param [Hash] attributes Model attributes in the form of hash
+ # @return [Object] Returns the model itself
+ def self.build_from_hash(attributes)
+ return nil unless attributes.is_a?(Hash)
+ attributes = attributes.transform_keys(&:to_sym)
+ transformed_hash = {}
+ openapi_types.each_pair do |key, type|
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = nil
+ elsif type =~ /\AArray<(.*)>/i
+ # check to ensure the input is an array given that the attribute
+ # is documented as an array but the input is not
+ if attributes[attribute_map[key]].is_a?(Array)
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
+ end
+ elsif !attributes[attribute_map[key]].nil?
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
+ end
+ end
+ new(transformed_hash)
+ end
+
+ # Deserializes the data based on type
+ # @param string type Data type
+ # @param string value Value to be deserialized
+ # @return [Object] Deserialized data
+ def self._deserialize(type, value)
+ case type.to_sym
+ when :Time
+ Time.parse(value)
+ when :Date
+ Date.parse(value)
+ when :String
+ value.to_s
+ when :Integer
+ value.to_i
+ when :Float
+ value.to_f
+ when :Boolean
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
+ true
+ else
+ false
+ end
+ when :Object
+ # generic object (usually a Hash), return directly
+ value
+ when /\AArray<(?.+)>\z/
+ inner_type = Regexp.last_match[:inner_type]
+ value.map { |v| _deserialize(inner_type, v) }
+ when /\AHash<(?.+?), (?.+)>\z/
+ k_type = Regexp.last_match[:k_type]
+ v_type = Regexp.last_match[:v_type]
+ {}.tap do |hash|
+ value.each do |k, v|
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
+ end
+ end
+ else # model
+ # models (e.g. Pet) or oneOf
+ klass = VoucherifySdk.const_get(type)
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
+ end
+ end
+
+ # Returns the string representation of the object
+ # @return [String] String presentation of the object
+ def to_s
+ to_hash.to_s
+ end
+
+ # to_body is an alias to to_hash (backward compatibility)
+ # @return [Hash] Returns the object in the form of hash
+ def to_body
+ to_hash
+ end
+
+ # Returns the object in the form of hash
+ # @return [Hash] Returns the object in the form of hash
+ def to_hash
+ hash = {}
+ self.class.attribute_map.each_pair do |attr, param|
+ value = self.send(attr)
+ if value.nil?
+ is_nullable = self.class.openapi_nullable.include?(attr)
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
+ end
+
+ hash[param] = _to_hash(value)
+ end
+ hash
+ end
+
+ # Outputs non-array value in the form of hash
+ # For object, use to_hash. Otherwise, just return the value
+ # @param [Object] value Any valid value
+ # @return [Hash] Returns the value in the form of hash
+ def _to_hash(value)
+ if value.is_a?(Array)
+ value.compact.map { |v| _to_hash(v) }
+ elsif value.is_a?(Hash)
+ {}.tap do |hash|
+ value.each { |k, v| hash[k] = _to_hash(v) }
+ end
+ elsif value.respond_to? :to_hash
+ value.to_hash
+ else
+ value
+ end
+ end
+
+ end
+
+end
diff --git a/lib/VoucherifySdk/models/campaigns_create_gift_campaign.rb b/lib/VoucherifySdk/models/campaigns_create_gift_campaign.rb
new file mode 100644
index 00000000..08aec94b
--- /dev/null
+++ b/lib/VoucherifySdk/models/campaigns_create_gift_campaign.rb
@@ -0,0 +1,461 @@
+=begin
+#Voucherify API
+
+#Voucherify promotion engine REST API. Please see https://docs.voucherify.io/docs for more details.
+
+The version of the OpenAPI document: v2018-08-01
+Contact: support@voucherify.io
+Generated by: https://openapi-generator.tech
+OpenAPI Generator version: 7.0.1
+
+=end
+
+require 'date'
+require 'time'
+
+module VoucherifySdk
+ class CampaignsCreateGiftCampaign
+ # Campaign name.
+ attr_accessor :name
+
+ # An optional field to keep any extra textual information about the campaign such as a campaign description and details.
+ attr_accessor :description
+
+ # Defines whether the campaign can be updated with new vouchers after campaign creation. - `AUTO_UPDATE`: By choosing the auto update option you will create a campaign that can be enhanced by new vouchers after the time of creation (e.g. by publish vouchers method). - `STATIC`: vouchers need to be manually published.
+ attr_accessor :type
+
+ # If this value is set to `true`, customers will be able to join the campaign only once.
+ attr_accessor :join_once
+
+ # Indicates whether customers will be able to auto-join a loyalty campaign if any earning rule is fulfilled.
+ attr_accessor :auto_join
+
+ # Flag indicating whether the campaign is to use the voucher's metadata schema instead of the campaign metadata schema.
+ attr_accessor :use_voucher_metadata_schema
+
+ # Total number of unique vouchers in campaign (size of campaign).
+ attr_accessor :vouchers_count
+
+ # Activation timestamp defines when the campaign starts to be active in ISO 8601 format. Campaign is *inactive before* this date.
+ attr_accessor :start_date
+
+ # Expiration timestamp defines when the campaign expires in ISO 8601 format. Campaign is *inactive after* this date.
+ attr_accessor :expiration_date
+
+ attr_accessor :validity_timeframe
+
+ # Integer array corresponding to the particular days of the week in which the campaign is valid. - `0` Sunday - `1` Monday - `2` Tuesday - `3` Wednesday - `4` Thursday - `5` Friday - `6` Saturday
+ attr_accessor :validity_day_of_week
+
+ # Defines the amount of time the campaign will be active in ISO 8601 format after publishing. For example, a campaign with a `duration` of `P24D` will be valid for a duration of 24 days.
+ attr_accessor :activity_duration_after_publishing
+
+ # Array containing the ID of the validation rule associated with the promotion tier.
+ attr_accessor :validation_rules
+
+ # Unique category ID that this campaign belongs to. Either pass this parameter OR the `category`.
+ attr_accessor :category_id
+
+ # The category assigned to the campaign. Either pass this parameter OR the `category_id`.
+ attr_accessor :category
+
+ # The metadata object stores all custom attributes assigned to the campaign. A set of key/value pairs that you can attach to a campaign object. It can be useful for storing additional information about the campaign in a structured format.
+ attr_accessor :metadata
+
+ # Type of campaign.
+ attr_accessor :campaign_type
+
+ attr_accessor :voucher
+
+ class EnumAttributeValidator
+ attr_reader :datatype
+ attr_reader :allowable_values
+
+ def initialize(datatype, allowable_values)
+ @allowable_values = allowable_values.map do |value|
+ case datatype.to_s
+ when /Integer/i
+ value.to_i
+ when /Float/i
+ value.to_f
+ else
+ value
+ end
+ end
+ end
+
+ def valid?(value)
+ !value || allowable_values.include?(value)
+ end
+ end
+
+ # Attribute mapping from ruby-style variable name to JSON key.
+ def self.attribute_map
+ {
+ :'name' => :'name',
+ :'description' => :'description',
+ :'type' => :'type',
+ :'join_once' => :'join_once',
+ :'auto_join' => :'auto_join',
+ :'use_voucher_metadata_schema' => :'use_voucher_metadata_schema',
+ :'vouchers_count' => :'vouchers_count',
+ :'start_date' => :'start_date',
+ :'expiration_date' => :'expiration_date',
+ :'validity_timeframe' => :'validity_timeframe',
+ :'validity_day_of_week' => :'validity_day_of_week',
+ :'activity_duration_after_publishing' => :'activity_duration_after_publishing',
+ :'validation_rules' => :'validation_rules',
+ :'category_id' => :'category_id',
+ :'category' => :'category',
+ :'metadata' => :'metadata',
+ :'campaign_type' => :'campaign_type',
+ :'voucher' => :'voucher'
+ }
+ end
+
+ # Returns all the JSON keys this model knows about
+ def self.acceptable_attributes
+ attribute_map.values
+ end
+
+ # Attribute type mapping.
+ def self.openapi_types
+ {
+ :'name' => :'String',
+ :'description' => :'String',
+ :'type' => :'String',
+ :'join_once' => :'Boolean',
+ :'auto_join' => :'Boolean',
+ :'use_voucher_metadata_schema' => :'Boolean',
+ :'vouchers_count' => :'Integer',
+ :'start_date' => :'Time',
+ :'expiration_date' => :'Time',
+ :'validity_timeframe' => :'CampaignBaseValidityTimeframe',
+ :'validity_day_of_week' => :'Array',
+ :'activity_duration_after_publishing' => :'String',
+ :'validation_rules' => :'Array