=begin #Klaviyo API #The Klaviyo REST API. Please visit https://developers.klaviyo.com for more details. The version of the OpenAPI document: 2024-02-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::CouponsApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe 'CouponsApi' do before do # run before each test @api_instance = KlaviyoAPI::CouponsApi.new end after do # run after each test end describe 'test an instance of CouponsApi' do it 'should create an instance of CouponsApi' do expect(@api_instance).to be_instance_of(KlaviyoAPI::CouponsApi) end end # unit tests for create_coupon # Create Coupon # Creates a new coupon.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `coupons:write` # @param coupon_create_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'create_coupon 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_coupon_code # Create Coupon Code # Synchronously creates a coupon code for the given coupon.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `coupon-codes:write` # @param coupon_code_create_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'create_coupon_code 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_coupon # Delete Coupon # Delete the coupon with the given coupon ID.<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `coupons:write` # @param id The internal id of a Coupon is equivalent to its external id stored within an integration. # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_coupon 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_coupon_code # Delete Coupon Code # Deletes a coupon code specified by the given identifier synchronously. If a profile has been assigned to the coupon code, an exception will be raised<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `coupon-codes:write` # @param id The id of a coupon code is a combination of its unique code and the id of the coupon it is associated with. # @param [Hash] opts the optional parameters # @return [nil] describe 'delete_coupon_code 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_coupon # Get Coupon # Get a specific coupon with the given coupon ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `coupons:read` # @param id The internal id of a Coupon is equivalent to its external id stored within an integration. # @param [Hash] opts the optional parameters # @option opts [Array] :fields_coupon For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets # @return [Hash] describe 'get_coupon 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_coupon_code # Get Coupon Code # Returns a Coupon Code specified by the given identifier.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `coupon-codes:read` # @param id The id of a coupon code is a combination of its unique code and the id of the coupon it is associated with. # @param [Hash] opts the optional parameters # @option opts [Array] :fields_coupon_code For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets # @option opts [Array] :fields_coupon For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#relationships # @return [Hash] describe 'get_coupon_code 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_coupon_code_bulk_create_job # Get Coupon Code Bulk Create Job # Get a coupon code bulk create job with the given job ID.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `coupon-codes:read` # @param job_id ID of the job to retrieve. # @param [Hash] opts the optional parameters # @option opts [Array] :fields_coupon_code_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets # @option opts [Array] :fields_coupon_code For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#relationships # @return [Hash] describe 'get_coupon_code_bulk_create_job 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_coupon_code_bulk_create_jobs # Get Coupon Code Bulk Create Jobs # Get all coupon code bulk create jobs. Returns a maximum of 100 jobs per request.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `coupon-codes:read` # @param [Hash] opts the optional parameters # @option opts [Array] :fields_coupon_code_bulk_create_job For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`status`: `equals` # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#pagination # @return [Hash] describe 'get_coupon_code_bulk_create_jobs 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_coupon_code_relationships_coupon # Get Coupon Code Relationships Coupon # Gets a list of coupon code relationships associated with the given coupon id<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `coupon-codes:read` # @param id # @param [Hash] opts the optional parameters # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#pagination # @return [Hash] describe 'get_coupon_code_relationships_coupon 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_coupon_codes # Get Coupon Codes # Gets a list of coupon codes associated with a coupon/coupons or a profile/profiles. A coupon/coupons or a profile/profiles must be provided as required filter params.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `coupon-codes:read` # @param [Hash] opts the optional parameters # @option opts [Array] :fields_coupon_code For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets # @option opts [Array] :fields_coupon For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`expires_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`status`: `equals`<br>`coupon.id`: `any`, `equals`<br>`profile.id`: `any`, `equals` # @option opts [Array] :include For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#relationships # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#pagination # @return [Hash] describe 'get_coupon_codes 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_coupon_codes_for_coupon # Get Coupon Codes For Coupon # Gets a list of coupon codes associated with the given coupon id<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `coupon-codes:read` # @param id # @param [Hash] opts the optional parameters # @option opts [Array] :fields_coupon_code For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets # @option opts [String] :filter For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#filtering<br>Allowed field(s)/operator(s):<br>`expires_at`: `greater-or-equal`, `greater-than`, `less-or-equal`, `less-than`<br>`status`: `equals`<br>`coupon.id`: `any`, `equals`<br>`profile.id`: `any`, `equals` # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#pagination # @return [Hash] describe 'get_coupon_codes_for_coupon 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_coupon_for_coupon_code # Get Coupon For Coupon Code # Gets a list of coupon codes associated with the given coupon id<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `coupons:read` # @param id # @param [Hash] opts the optional parameters # @option opts [Array] :fields_coupon For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets # @return [Hash] describe 'get_coupon_for_coupon_code 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_coupon_relationships_coupon_codes # Get Coupon Relationships Coupon Codes # Gets the coupon relationship associated with the given coupon code id<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `coupons:read` # @param id # @param [Hash] opts the optional parameters # @return [Hash] describe 'get_coupon_relationships_coupon_codes 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_coupons # Get Coupons # Get all coupons in an account. To learn more, see our [Coupons API guide](https://developers.klaviyo.com/en/docs/use_klaviyos_coupons_api).<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `coupons:read` # @param [Hash] opts the optional parameters # @option opts [Array] :fields_coupon For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#sparse-fieldsets # @option opts [String] :page_cursor For more information please visit https://developers.klaviyo.com/en/v2024-02-15/reference/api-overview#pagination # @return [Hash] describe 'get_coupons 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 spawn_coupon_code_bulk_create_job # Spawn Coupon Code Bulk Create Job # Create a coupon-code-bulk-create-job to bulk create a list of coupon codes. Max number of jobs queued at once we allow for is 100.<br><br>*Rate limits*:<br>Burst: `75/s`<br>Steady: `700/m` **Scopes:** `coupon-codes:write` # @param coupon_code_create_job_create_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'spawn_coupon_code_bulk_create_job 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_coupon # Update Coupon # *Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m` **Scopes:** `coupons:write` # @param id The internal id of a Coupon is equivalent to its external id stored within an integration. # @param coupon_update_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'update_coupon 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_coupon_code # Update Coupon Code # Updates a coupon code specified by the given identifier synchronously. We allow updating the 'status' and 'expires_at' of coupon codes.<br><br>*Rate limits*:<br>Burst: `350/s`<br>Steady: `3500/m` **Scopes:** `coupon-codes:write` # @param id The id of a coupon code is a combination of its unique code and the id of the coupon it is associated with. # @param coupon_code_update_query # @param [Hash] opts the optional parameters # @return [Hash] describe 'update_coupon_code test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end