Skip to content

Latest commit

 

History

History
419 lines (307 loc) · 11.5 KB

TaxesApi.md

File metadata and controls

419 lines (307 loc) · 11.5 KB

IO.Swagger.Api.TaxesApi

All URIs are relative to https://api.facestore.local/v1

Method HTTP request Description
AddTaxes POST /taxes
DeleteTaxById DELETE /taxes/{id}/
GetTaxById GET /taxes/{id}/
GetTaxes GET /taxes
UpdateTaxById PUT /taxes/{id}/
UpdateTaxById_0 PATCH /taxes/{id}/

AddTaxes

InlineResponse2012 AddTaxes (Tax tax)

Creates a new tax in the store.

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class AddTaxesExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");

            var apiInstance = new TaxesApi();
            var tax = new Tax(); // Tax | Tax to add to the store

            try
            {
                InlineResponse2012 result = apiInstance.AddTaxes(tax);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TaxesApi.AddTaxes: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
tax Tax Tax to add to the store

Return type

InlineResponse2012

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

DeleteTaxById

void DeleteTaxById (long? id)

deletes a single tax based on the ID supplied

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class DeleteTaxByIdExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");

            var apiInstance = new TaxesApi();
            var id = 789;  // long? | ID of tax to delete

            try
            {
                apiInstance.DeleteTaxById(id);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TaxesApi.DeleteTaxById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id long? ID of tax to delete

Return type

void (empty response body)

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTaxById

InlineResponse2012 GetTaxById (long? id, int? limit)

Returns a tax based on a single ID

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class GetTaxByIdExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");

            var apiInstance = new TaxesApi();
            var id = 789;  // long? | ID of tax to fetch
            var limit = 56;  // int? | max records to return (optional) 

            try
            {
                InlineResponse2012 result = apiInstance.GetTaxById(id, limit);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TaxesApi.GetTaxById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id long? ID of tax to fetch
limit int? max records to return [optional]

Return type

InlineResponse2012

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTaxes

InlineResponse2002 GetTaxes (List includes, int? limit, List orderBy)

Returns all taxes from the system that the user has access to

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class GetTaxesExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");

            var apiInstance = new TaxesApi();
            var includes = new List<string>(); // List<string> | Include associated objects within response (optional) 
            var limit = 56;  // int? | max records to return (optional) 
            var orderBy = new List<string>(); // List<string> | Specify the field to be sorted, examples:  - `?order_by=id|desc` - `?order_by=updated_at|desc,position|asc`  (optional) 

            try
            {
                InlineResponse2002 result = apiInstance.GetTaxes(includes, limit, orderBy);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TaxesApi.GetTaxes: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
includes List Include associated objects within response [optional]
limit int? max records to return [optional]
orderBy List Specify the field to be sorted, examples: - `?order_by=id desc` - `?order_by=updated_at

Return type

InlineResponse2002

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateTaxById

InlineResponse2012 UpdateTaxById (long? id, Tax tax)

update a single tax based on the ID supplied

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UpdateTaxByIdExample
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");

            var apiInstance = new TaxesApi();
            var id = 789;  // long? | ID of tax to update
            var tax = new Tax(); // Tax | Tax to add to the store

            try
            {
                InlineResponse2012 result = apiInstance.UpdateTaxById(id, tax);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TaxesApi.UpdateTaxById: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id long? ID of tax to update
tax Tax Tax to add to the store

Return type

InlineResponse2012

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

UpdateTaxById_0

InlineResponse2012 UpdateTaxById_0 (long? id, Tax tax)

update a single tax based on the ID supplied

Example

using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class UpdateTaxById_0Example
    {
        public void main()
        {
            
            // Configure API key authorization: APIKeyHeader
            Configuration.Default.ApiKey.Add("APIToken", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("APIToken", "Bearer");

            var apiInstance = new TaxesApi();
            var id = 789;  // long? | ID of tax to update
            var tax = new Tax(); // Tax | Tax to add to the store

            try
            {
                InlineResponse2012 result = apiInstance.UpdateTaxById_0(id, tax);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TaxesApi.UpdateTaxById_0: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id long? ID of tax to update
tax Tax Tax to add to the store

Return type

InlineResponse2012

Authorization

APIKeyHeader

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]