Class: VoucherifySdk::PromotionsApi
- Inherits:
-
Object
- Object
- VoucherifySdk::PromotionsApi
- Defined in:
- lib/VoucherifySdk/api/promotions_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#create_promotion_stack(campaign_id, opts = {}) ⇒ PromotionsStacksCreateResponseBody
Create Promotion Stack This method creates one promotion stack.
-
#delete_promotion_stack(campaign_id, stack_id, opts = {}) ⇒ nil
Delete Promotion Stack This method deletes a promotion stack.
-
#delete_promotion_tier(promotion_tier_id, opts = {}) ⇒ nil
Delete Promotion Tier This method deletes a promotion tier.
-
#disable_promotion_tier(promotion_tier_id, opts = {}) ⇒ PromotionsTiersDisableResponseBody
Disable Promotion Tier This method disables a promotion tier, i.e.
-
#enable_promotion_tier(promotion_tier_id, opts = {}) ⇒ PromotionsTiersEnableResponseBody
Enable Promotion Tier This method enables a promotion tier, i.e.
-
#get_promotion_stack(campaign_id, stack_id, opts = {}) ⇒ PromotionsStacksGetResponseBody
Get Promotion Stack This method returns the details of a promotion stack, including the promotion tiers grouped within the stack.
-
#get_promotion_tier(promotion_tier_id, opts = {}) ⇒ PromotionsTiersGetResponseBody
Get Promotion Tier This method enables you to retrieve a specific promotion tier.
-
#initialize(api_client = ApiClient.default) ⇒ PromotionsApi
constructor
A new instance of PromotionsApi.
-
#list_all_promotion_stacks(opts = {}) ⇒ PromotionsStacksListResponseBody
List Promotion Stacks This method enables you to list promotion stacks irrespective of the campaign they are associated with.
-
#list_promotion_stacks_in_campaign(campaign_id, opts = {}) ⇒ PromotionsStacksListResponseBody
List Promotion Stacks in Campaign This method enables you to list promotion stacks from a specified campaign.
-
#list_promotion_tiers_from_campaign(campaign_id, opts = {}) ⇒ PromotionsTiersListResponseBody
List Promotion Tiers from Campaign This method enables you to list promotion tiers from a specified campaign.
-
#update_promotion_stack(campaign_id, stack_id, opts = {}) ⇒ PromotionsStacksUpdateResponseBody
Update Promotion Stack This methods allows for editing an existing stack.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PromotionsApi
Returns a new instance of PromotionsApi.
19 20 21 |
# File 'lib/VoucherifySdk/api/promotions_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/promotions_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#create_promotion_stack(campaign_id, opts = {}) ⇒ PromotionsStacksCreateResponseBody
Create Promotion Stack This method creates one promotion stack. The sequence of promotion tier IDs will determine the promotion stacking order.
28 29 30 31 |
# File 'lib/VoucherifySdk/api/promotions_api.rb', line 28 def create_promotion_stack(campaign_id, opts = {}) data, _status_code, _headers = create_promotion_stack_with_http_info(campaign_id, opts) data end |
#delete_promotion_stack(campaign_id, stack_id, opts = {}) ⇒ nil
Delete Promotion Stack This method deletes a promotion stack.
98 99 100 101 |
# File 'lib/VoucherifySdk/api/promotions_api.rb', line 98 def delete_promotion_stack(campaign_id, stack_id, opts = {}) delete_promotion_stack_with_http_info(campaign_id, stack_id, opts) nil end |
#delete_promotion_tier(promotion_tier_id, opts = {}) ⇒ nil
Delete Promotion Tier This method deletes a promotion tier.
164 165 166 167 |
# File 'lib/VoucherifySdk/api/promotions_api.rb', line 164 def delete_promotion_tier(promotion_tier_id, opts = {}) delete_promotion_tier_with_http_info(promotion_tier_id, opts) nil end |
#disable_promotion_tier(promotion_tier_id, opts = {}) ⇒ PromotionsTiersDisableResponseBody
Disable Promotion Tier This method disables a promotion tier, i.e. makes the active parameter false.
225 226 227 228 |
# File 'lib/VoucherifySdk/api/promotions_api.rb', line 225 def disable_promotion_tier(promotion_tier_id, opts = {}) data, _status_code, _headers = disable_promotion_tier_with_http_info(promotion_tier_id, opts) data end |
#enable_promotion_tier(promotion_tier_id, opts = {}) ⇒ PromotionsTiersEnableResponseBody
Enable Promotion Tier This method enables a promotion tier, i.e. makes the active parameter true.
288 289 290 291 |
# File 'lib/VoucherifySdk/api/promotions_api.rb', line 288 def enable_promotion_tier(promotion_tier_id, opts = {}) data, _status_code, _headers = enable_promotion_tier_with_http_info(promotion_tier_id, opts) data end |
#get_promotion_stack(campaign_id, stack_id, opts = {}) ⇒ PromotionsStacksGetResponseBody
Get Promotion Stack This method returns the details of a promotion stack, including the promotion tiers grouped within the stack.
352 353 354 355 |
# File 'lib/VoucherifySdk/api/promotions_api.rb', line 352 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_tier(promotion_tier_id, opts = {}) ⇒ PromotionsTiersGetResponseBody
Get Promotion Tier This method enables you to retrieve a specific promotion tier.
420 421 422 423 |
# File 'lib/VoucherifySdk/api/promotions_api.rb', line 420 def get_promotion_tier(promotion_tier_id, opts = {}) data, _status_code, _headers = get_promotion_tier_with_http_info(promotion_tier_id, opts) data end |
#list_all_promotion_stacks(opts = {}) ⇒ PromotionsStacksListResponseBody
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
487 488 489 490 |
# File 'lib/VoucherifySdk/api/promotions_api.rb', line 487 def list_all_promotion_stacks(opts = {}) data, _status_code, _headers = list_all_promotion_stacks_with_http_info(opts) data end |
#list_promotion_stacks_in_campaign(campaign_id, opts = {}) ⇒ PromotionsStacksListResponseBody
List Promotion Stacks in Campaign This method enables you to list promotion stacks from a specified campaign.
567 568 569 570 |
# File 'lib/VoucherifySdk/api/promotions_api.rb', line 567 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_tiers_from_campaign(campaign_id, opts = {}) ⇒ PromotionsTiersListResponseBody
List Promotion Tiers from Campaign This method enables you to list promotion tiers from a specified campaign.
630 631 632 633 |
# File 'lib/VoucherifySdk/api/promotions_api.rb', line 630 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 |
#update_promotion_stack(campaign_id, stack_id, opts = {}) ⇒ PromotionsStacksUpdateResponseBody
Update Promotion Stack This methods allows for editing an existing stack.
695 696 697 698 |
# File 'lib/VoucherifySdk/api/promotions_api.rb', line 695 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 |