=begin #Klaviyo API #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. The version of the OpenAPI document: 2023-12-15 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::TemplatesApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe 'TemplatesApi' do before do # run before each test @api_instance = KlaviyoAPI::TemplatesApi.new end after do # run after each test end describe 'test an instance of TemplatesApi' do it 'should create an instance of TemplatesApi' do expect(@api_instance).to be_instance_of(KlaviyoAPI::TemplatesApi) end end # unit tests for create_template # Create Template # Create a new custom HTML template. If there are 1,000 or more templates in an account, creation will fail as there is a limit of 1,000 templates that can be created via the API. Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets).<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `templates:write` # @param template_create_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'create_template 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_template_clone # Create Template Clone # Create a clone of a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `templates:write` # @param template_clone_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'create_template_clone 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_template_render # Create Template Render # Render a template with the given template ID and context attribute. Returns the HTML and plain text versions of the email template. **Request body parameters** (nested under `attributes`): * `return_fields`: Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets). * `context`: This is the context your email template will be rendered with. You must pass in a `context` object as a JSON object. Email templates are rendered with contexts in a similar manner to Django templates. Nested template variables can be referenced via dot notation. Template variables without corresponding `context` values are treated as `FALSE` and output nothing. Ex. `{ \"name\" : \"George Washington\", \"state\" : \"VA\" }`<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `templates:read` # @param template_render_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'create_template_render 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_template # Delete Template # Delete a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `templates:write` # @param id The ID of template # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_template 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_template # Get Template # Get a template with the given template ID.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `templates:read` # @param id The ID of template # @param [Hash] opts the optional parameters # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2023-12-15/reference/api-overview#sparse-fieldsets # @return [Hash] describe 'get_template 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_templates # Get Templates # Get all templates in an account. Filter to request a subset of all templates. Templates can be sorted by the following fields, in ascending and descending order: `id`, `name`, `created`, `updated` Returns a maximum of 10 results per page.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `templates:read` # @param [Hash] opts the optional parameters # @option opts [Array] :fields_template For more information please visit https://developers.klaviyo.com/en/v2023-12-15/reference/api-overview#sparse-fieldsets # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2023-12-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`id`: `any`, `equals`<br>`name`: `any`, `equals`<br>`created`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`updated`: `equals`, `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than` # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2023-12-15/reference/api-overview#pagination # @option opts [String] :sort For more information please visit https://developers.klaviyo.com/en/v2023-12-15/reference/api-overview#sorting # @return [Hash] describe 'get_templates 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_template # Update Template # Update a template with the given template ID. Does not currently update drag & drop templates.<br><br>*Rate limits*:<br>Burst: `10/s`<br>Steady: `150/m` **Scopes:** `templates:write` # @param id The ID of template # @param template_update_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'update_template test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end