Class: VoucherifySdk::PublicationsApi
- Inherits:
-
Object
- Object
- VoucherifySdk::PublicationsApi
- Defined in:
- lib/VoucherifySdk/api/publications_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_publication(opts = {}) ⇒ PublicationsCreateResponseBody
Create Publication This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.
-
#create_publication1(customer, opts = {}) ⇒ PublicationsCreateResponseBody
Create Publication This method selects vouchers that are suitable for publication, adds a publish entry and returns the publication.
-
#initialize(api_client = ApiClient.default) ⇒ PublicationsApi
constructor
A new instance of PublicationsApi.
-
#list_publications(opts = {}) ⇒ PublicationsListResponseBody
List Publications Retrieve a list of publications.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PublicationsApi
Returns a new instance of PublicationsApi.
19 20 21 |
# File 'lib/VoucherifySdk/api/publications_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/VoucherifySdk/api/publications_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_publication(opts = {}) ⇒ PublicationsCreateResponseBody
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.
28 29 30 31 |
# File 'lib/VoucherifySdk/api/publications_api.rb', line 28 def create_publication(opts = {}) data, _status_code, _headers = create_publication_with_http_info(opts) data end |
#create_publication1(customer, opts = {}) ⇒ PublicationsCreateResponseBody
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.
99 100 101 102 |
# File 'lib/VoucherifySdk/api/publications_api.rb', line 99 def create_publication1(customer, opts = {}) data, _status_code, _headers = create_publication1_with_http_info(customer, opts) data end |
#list_publications(opts = {}) ⇒ PublicationsListResponseBody
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
183 184 185 186 |
# File 'lib/VoucherifySdk/api/publications_api.rb', line 183 def list_publications(opts = {}) data, _status_code, _headers = list_publications_with_http_info(opts) data end |