Class: VoucherifySdk::TemplatesApi
- Inherits:
-
Object
- Object
- VoucherifySdk::TemplatesApi
- Defined in:
- lib/VoucherifySdk/api/templates_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_tier_from_template(campaign_template_id, opts = {}) ⇒ TemplatesCampaignsTierSetupCreateResponseBody
Add Promotion Tier From Template Creates a promotion tier out of a discount campaign template and adds it to an existing promotion campaign.
-
#create_campaign_from_template(campaign_template_id, opts = {}) ⇒ TemplatesCampaignsCampaignSetupCreateResponseBody
Create Campaign From Template Creates a campaign out of a campaign template.
-
#create_campaign_template(opts = {}) ⇒ TemplatesCampaignsCreateTemplateResponseBody
Create Campaign Template Creates a template for a discount or gift campaign, or a promotion tier.
-
#delete_campaign_template(campaign_template_id, opts = {}) ⇒ nil
Delete Campaign Template Deletes the campaign template permanently.
-
#get_campaign_template(campaign_template_id, opts = {}) ⇒ TemplatesCampaignsGetResponseBody
Get Campaign Template Retrieves a campaign template available in the project.
-
#initialize(api_client = ApiClient.default) ⇒ TemplatesApi
constructor
A new instance of TemplatesApi.
-
#list_campaign_templates(opts = {}) ⇒ TemplatesCampaignsListResponseBody
List Campaign Templates Lists all campaign templates available in the project.
-
#update_campaign_template(campaign_template_id, opts = {}) ⇒ TemplatesCampaignsUpdateResponseBody
Update Campaign Template Updates the name or description of the campaign template.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ TemplatesApi
Returns a new instance of TemplatesApi.
19 20 21 |
# File 'lib/VoucherifySdk/api/templates_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/templates_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_tier_from_template(campaign_template_id, opts = {}) ⇒ TemplatesCampaignsTierSetupCreateResponseBody
Add Promotion Tier From Template Creates a promotion tier out of a discount campaign template and adds it to an existing promotion campaign. To add a promotion tier to a campaign, you need to provide the name in the request and the campaign ID. Other fields are optional. If no other fields are sent, the configuration from the template will be used. You can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an action or an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the promotion tier. When the promotion tier has been created, then you can: - Update the validation rule, - Unassign the validation rule, - Assign an existing validation rule. 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign - Promotion tier 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
28 29 30 31 |
# File 'lib/VoucherifySdk/api/templates_api.rb', line 28 def add_tier_from_template(campaign_template_id, opts = {}) data, _status_code, _headers = add_tier_from_template_with_http_info(campaign_template_id, opts) data end |
#create_campaign_from_template(campaign_template_id, opts = {}) ⇒ TemplatesCampaignsCampaignSetupCreateResponseBody
Create Campaign From Template Creates a campaign out of a campaign template. To create a campaign, you need to provide the name in the request, while other fields are optional. If no other fields are sent, the configuration from the template will be used. You can send new values of the fields listed below to replace the settings saved in the template. However, you cannot assign an existing validation rule or create a new one in the request. If the template has a validation rule, a new validation rule is always created for the campaign. When the campaign has been created, then you can: - Update the validation rule, - Unassign the validation rule, - Assign an existing validation rule. 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign - Promotion tier 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
94 95 96 97 |
# File 'lib/VoucherifySdk/api/templates_api.rb', line 94 def create_campaign_from_template(campaign_template_id, opts = {}) data, _status_code, _headers = create_campaign_from_template_with_http_info(campaign_template_id, opts) data end |
#create_campaign_template(opts = {}) ⇒ TemplatesCampaignsCreateTemplateResponseBody
Create Campaign Template Creates a template for a discount or gift campaign, or a promotion tier. A template stores campaign configuration without the following details: - Campaign name - Category - Code count The following elements are not supported by campaign templates: - Redeeming API keys - Redeeming users - Customer loyalty tier - Static segments 👍 Promotion Tiers and Campaign Templates You can create a campaign template out of a promotion tier. Promotion tiers are converted to a discount campaign with the DISCOUNT_COUPON type. You can use this template to create: - Discount campaign, - Promotion tier. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
159 160 161 162 |
# File 'lib/VoucherifySdk/api/templates_api.rb', line 159 def create_campaign_template(opts = {}) data, _status_code, _headers = create_campaign_template_with_http_info(opts) data end |
#delete_campaign_template(campaign_template_id, opts = {}) ⇒ nil
Delete Campaign Template Deletes the campaign template permanently. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
223 224 225 226 |
# File 'lib/VoucherifySdk/api/templates_api.rb', line 223 def delete_campaign_template(campaign_template_id, opts = {}) delete_campaign_template_with_http_info(campaign_template_id, opts) nil end |
#get_campaign_template(campaign_template_id, opts = {}) ⇒ TemplatesCampaignsGetResponseBody
Get Campaign Template Retrieves a campaign template available in the project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
280 281 282 283 |
# File 'lib/VoucherifySdk/api/templates_api.rb', line 280 def get_campaign_template(campaign_template_id, opts = {}) data, _status_code, _headers = get_campaign_template_with_http_info(campaign_template_id, opts) data end |
#list_campaign_templates(opts = {}) ⇒ TemplatesCampaignsListResponseBody
List Campaign Templates Lists all campaign templates available in the project. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
343 344 345 346 |
# File 'lib/VoucherifySdk/api/templates_api.rb', line 343 def list_campaign_templates(opts = {}) data, _status_code, _headers = list_campaign_templates_with_http_info(opts) data end |
#update_campaign_template(campaign_template_id, opts = {}) ⇒ TemplatesCampaignsUpdateResponseBody
Update Campaign Template Updates the name or description of the campaign template. 📘 Campaign Templates – Documentation Read the [Campaign Templates documentation](support.voucherify.io/article/620-campaign-templates) to learn more about this feature.
412 413 414 415 |
# File 'lib/VoucherifySdk/api/templates_api.rb', line 412 def update_campaign_template(campaign_template_id, opts = {}) data, _status_code, _headers = update_campaign_template_with_http_info(campaign_template_id, opts) data end |