=begin #Klaviyo API #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. The version of the OpenAPI document: 2023-02-22 Contact: developers@klaviyo.com Generated by: https://openapi-generator.tech OpenAPI Generator version: 6.2.1 =end require 'spec_helper' require 'json' # Unit tests for KlaviyoAPI::TagsApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe 'TagsApi' do before do # run before each test @api_instance = KlaviyoAPI::TagsApi.new end after do # run after each test end describe 'test an instance of TagsApi' do it 'should create an instance of TagsApi' do expect(@api_instance).to be_instance_of(KlaviyoAPI::TagsApi) end end # unit tests for create_tag # Create Tag # Create a tag. An account cannot have more than **500** unique tags. A tag belongs to a single tag group. If the `tag_group_id` is not specified, the tag is added to the account's default tag group.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` `Tags Write` # @param tag_create_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'create_tag test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_tag_group # Create Tag Group # Create a tag group. An account cannot have more than **50** unique tag groups. If `exclusive` is not specified `true` or `false`, the tag group defaults to non-exclusive. If a tag group is non-exclusive, any given related resource (campaign, flow, etc.) can be linked to multiple tags from that tag group. If a tag group is exclusive, any given related resource can only be linked to one tag from that tag group.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` `Tags Write` # @param tag_group_create_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'create_tag_group test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_tag_relationships_campaigns # Create Tag Relationships Campaigns # Associate a tag with one or more campaigns. Any campaign cannot be associated with more than **100** tags. Use the request body to pass in the ID(s) of the campaign(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Campaigns Write` `Tags Write` # @param id # @param tag_campaign_op # @param [Hash] opts the optional parameters # @return [nil] describe 'create_tag_relationships_campaigns test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_tag_relationships_flows # Create Tag Relationships Flows # Associate a tag with one or more flows. Any flow cannot be associated with more than **100** tags. Use the request body to pass in the ID(s) of the flow(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Flows Write` `Tags Write` # @param id # @param tag_flow_op # @param [Hash] opts the optional parameters # @return [nil] describe 'create_tag_relationships_flows test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_tag_relationships_lists # Create Tag Relationships Lists # Associate a tag with one or more lists. Any list cannot be associated with more than **100** tags. Use the request body to pass in the ID(s) of the lists(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `List Write` `Tags Write` # @param id # @param tag_list_op # @param [Hash] opts the optional parameters # @return [nil] describe 'create_tag_relationships_lists test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for create_tag_relationships_segments # Create Tag Relationships Segments # Associate a tag with one or more segments. Any segment cannot be associated with more than **100** tags. Use the request body to pass in the ID(s) of the segments(s) that will be associated with the tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Segments Write` `Tags Write` # @param id # @param tag_segment_op # @param [Hash] opts the optional parameters # @return [nil] describe 'create_tag_relationships_segments test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_tag # Delete Tag # Delete the tag with the given tag ID. Any associations between the tag and other resources will also be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` `Tags Write` # @param id The Tag ID # @param [Hash] opts the optional parameters # @return [Hash] describe 'delete_tag test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_tag_group # Delete Tag Group # Delete the tag group with the given tag group ID. Any tags inside that tag group, and any associations between those tags and other resources, will also be removed. The default tag group cannot be deleted.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` `Tags Write` # @param id The Tag Group ID # @param [Hash] opts the optional parameters # @return [Hash] describe 'delete_tag_group test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_tag_relationships_campaigns # Delete Tag Relationships Campaigns # Remove a tag's association with one or more campaigns. Use the request body to pass in the ID(s) of the campaign(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Campaigns Write` `Tags Write` # @param id # @param tag_campaign_op # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_tag_relationships_campaigns test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_tag_relationships_flows # Delete Tag Relationships Flows # Remove a tag's association with one or more flows. Use the request body to pass in the ID(s) of the flows(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Flows Write` `Tags Write` # @param id # @param tag_flow_op # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_tag_relationships_flows test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_tag_relationships_lists # Delete Tag Relationships Lists # Remove a tag's association with one or more lists. Use the request body to pass in the ID(s) of the list(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `List Write` `Tags Write` # @param id # @param tag_list_op # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_tag_relationships_lists test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for delete_tag_relationships_segments # Delete Tag Relationships Segments # Remove a tag's association with one or more segments. Use the request body to pass in the ID(s) of the segments(s) whose association with the tag will be removed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Segments Write` `Tags Write` # @param id # @param tag_segment_op # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_tag_relationships_segments test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tag # Get Tag # Retrieve the tag with the given tag ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` # @param id The Tag ID # @param [Hash] opts the optional parameters # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets # @return [Hash] describe 'get_tag test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tag_group # Get Tag Group # Retrieve the tag group with the given tag group ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` # @param id The Tag Group ID # @param [Hash] opts the optional parameters # @option opts [Array] :fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets # @return [Hash] describe 'get_tag_group test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tag_group_relationships_tags # Get Tag Group Relationships Tags # Returns the tag IDs of all tags inside the given tag group.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` # @param id # @param [Hash] opts the optional parameters # @return [Hash] describe 'get_tag_group_relationships_tags test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tag_group_tags # Get Tag Group Tags # Return the tags for a given tag group ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` # @param id The Tag Group ID # @param [Hash] opts the optional parameters # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets # @return [Hash] describe 'get_tag_group_tags test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tag_groups # Get Tag Groups # List all tag groups in an account. Every account has one default tag group. Tag groups can be filtered by `name`, `exclusive`, and `default`, and sorted by `name` or `id` in ascending or descending order. Returns a maximum of 25 tag groups per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` # @param [Hash] opts the optional parameters # @option opts [Array] :fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with`<br>`exclusive`: `equals`<br>`default`: `equals` # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting # @return [Hash] describe 'get_tag_groups test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tag_relationships_campaigns # Get Tag Relationships Campaigns # Returns the IDs of all campaigns associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Campaigns Read` `Tags Read` # @param id # @param [Hash] opts the optional parameters # @return [Hash] describe 'get_tag_relationships_campaigns test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tag_relationships_flows # Get Tag Relationships Flows # Returns the IDs of all flows associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Flows Read` `Tags Read` # @param id # @param [Hash] opts the optional parameters # @return [Hash] describe 'get_tag_relationships_flows test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tag_relationships_lists # Get Tag Relationships Lists # Returns the IDs of all lists associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `List Read` `Tags Read` # @param id # @param [Hash] opts the optional parameters # @return [Hash] describe 'get_tag_relationships_lists test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tag_relationships_segments # Get Tag Relationships Segments # Returns the IDs of all segments associated with the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Segments Read` `Tags Read` # @param id # @param [Hash] opts the optional parameters # @return [Hash] describe 'get_tag_relationships_segments test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tag_relationships_tag_group # Get Tag Relationships Tag Group # Returns the ids of all tag groups related to the given tag.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` # @param id # @param [Hash] opts the optional parameters # @return [Hash] describe 'get_tag_relationships_tag_group test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tag_tag_group # Get Tag Tag Group # Returns the tag group resource for a given tag ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` # @param id The Tag ID # @param [Hash] opts the optional parameters # @option opts [Array] :fields_tag_group For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets # @return [Hash] describe 'get_tag_tag_group test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for get_tags # Get Tags # List all tags in an account. Tags can be filtered by `name`, and sorted by `name` or `id` in ascending or descending order. Returns a maximum of 50 tags per request, which can be paginated with [cursor-based pagination](https://developers.klaviyo.com/en/v2022-10-17/reference/api_overview#pagination).<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` # @param [Hash] opts the optional parameters # @option opts [Array] :fields_tag For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sparse-fieldsets # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`name`: `contains`, `ends-with`, `equals`, `starts-with` # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#pagination # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2023-02-22/reference/api-overview#sorting # @return [Hash] describe 'get_tags test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_tag # Update Tag # Update the tag with the given tag ID. Only a tag's `name` can be changed. A tag cannot be moved from one tag group to another.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` `Tags Write` # @param id The Tag ID # @param tag_update_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'update_tag test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for update_tag_group # Update Tag Group # Update the tag group with the given tag group ID. Only a tag group's `name` can be changed. A tag group's `exclusive` or `default` value cannot be changed.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `Tags Read` `Tags Write` # @param id The Tag Group ID # @param tag_group_update_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'update_tag_group test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end