Skip to content

Latest commit

 

History

History
419 lines (307 loc) · 11.9 KB

ShippingsApi.md

File metadata and controls

419 lines (307 loc) · 11.9 KB

IO.Swagger.Api.ShippingsApi

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

Method HTTP request Description
AddShipping POST /shippings
DeleteShippingById DELETE /shippings/{id}/
GetShippingById GET /shippings/{id}/
GetShippings GET /shippings
UpdateShippingById PUT /shippings/{id}/
UpdateShippingById_0 PATCH /shippings/{id}/

AddShipping

InlineResponse2013 AddShipping (Shipping shipping)

Creates a new shipping 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 AddShippingExample
    {
        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 ShippingsApi();
            var shipping = new Shipping(); // Shipping | Shipping to add to the store

            try
            {
                InlineResponse2013 result = apiInstance.AddShipping(shipping);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ShippingsApi.AddShipping: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
shipping Shipping Shipping to add to the store

Return type

InlineResponse2013

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]

DeleteShippingById

void DeleteShippingById (long? id)

deletes a single shipping 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 DeleteShippingByIdExample
    {
        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 ShippingsApi();
            var id = 789;  // long? | ID of shipping to delete

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

Parameters

Name Type Description Notes
id long? ID of shipping 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]

GetShippingById

InlineResponse2013 GetShippingById (long? id, int? limit)

Returns a shipping 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 GetShippingByIdExample
    {
        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 ShippingsApi();
            var id = 789;  // long? | ID of shipping to fetch
            var limit = 56;  // int? | max records to return (optional) 

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

Parameters

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

Return type

InlineResponse2013

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]

GetShippings

InlineResponse2003 GetShippings (List includes, int? limit, List orderBy)

Returns all shippings 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 GetShippingsExample
    {
        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 ShippingsApi();
            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
            {
                InlineResponse2003 result = apiInstance.GetShippings(includes, limit, orderBy);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ShippingsApi.GetShippings: " + 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

InlineResponse2003

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]

UpdateShippingById

InlineResponse2013 UpdateShippingById (long? id, Shipping tax)

update a single shipping 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 UpdateShippingByIdExample
    {
        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 ShippingsApi();
            var id = 789;  // long? | ID of shipping to update
            var tax = new Shipping(); // Shipping | Shipping to update in store

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

Parameters

Name Type Description Notes
id long? ID of shipping to update
tax Shipping Shipping to update in store

Return type

InlineResponse2013

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]

UpdateShippingById_0

InlineResponse2013 UpdateShippingById_0 (long? id, Shipping tax)

update a single shipping 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 UpdateShippingById_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 ShippingsApi();
            var id = 789;  // long? | ID of shipping to update
            var tax = new Shipping(); // Shipping | Shipping to update in store

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

Parameters

Name Type Description Notes
id long? ID of shipping to update
tax Shipping Shipping to update in store

Return type

InlineResponse2013

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]