Skip to content

Latest commit

 

History

History
324 lines (261 loc) · 11.9 KB

ShippingsApi.md

File metadata and controls

324 lines (261 loc) · 11.9 KB

Conekta.net.Api.ShippingsApi

All URIs are relative to https://api.conekta.io

Method HTTP request Description
OrdersCreateShipping POST /orders/{id}/shipping_lines Create Shipping
OrdersDeleteShipping DELETE /orders/{id}/shipping_lines/{shipping_id} Delete Shipping
OrdersUpdateShipping PUT /orders/{id}/shipping_lines/{shipping_id} Update Shipping

OrdersCreateShipping

ShippingOrderResponse OrdersCreateShipping (string id, ShippingRequest shippingRequest, string acceptLanguage = null, string xChildCompanyId = null)

Create Shipping

Create new shipping for an existing orden

Example

using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;

namespace Example
{
    public class OrdersCreateShippingExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.conekta.io";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new ShippingsApi(config);
            var id = 6307a60c41de27127515a575;  // string | Identifier of the resource
            var shippingRequest = new ShippingRequest(); // ShippingRequest | requested field for a shipping
            var acceptLanguage = es;  // string | Use for knowing which language to use (optional)  (default to es)
            var xChildCompanyId = 6441b6376b60c3a638da80af;  // string | In the case of a holding company, the company id of the child company to which will process the request. (optional) 

            try
            {
                // Create Shipping
                ShippingOrderResponse result = apiInstance.OrdersCreateShipping(id, shippingRequest, acceptLanguage, xChildCompanyId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ShippingsApi.OrdersCreateShipping: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the OrdersCreateShippingWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Create Shipping
    ApiResponse<ShippingOrderResponse> response = apiInstance.OrdersCreateShippingWithHttpInfo(id, shippingRequest, acceptLanguage, xChildCompanyId);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ShippingsApi.OrdersCreateShippingWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string Identifier of the resource
shippingRequest ShippingRequest requested field for a shipping
acceptLanguage string Use for knowing which language to use [optional] [default to es]
xChildCompanyId string In the case of a holding company, the company id of the child company to which will process the request. [optional]

Return type

ShippingOrderResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successful -
401 authentication error -
404 not found entity -
500 internal server error -

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

OrdersDeleteShipping

ShippingOrderResponse OrdersDeleteShipping (string id, string shippingId, string acceptLanguage = null, string xChildCompanyId = null)

Delete Shipping

Delete shipping

Example

using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;

namespace Example
{
    public class OrdersDeleteShippingExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.conekta.io";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new ShippingsApi(config);
            var id = 6307a60c41de27127515a575;  // string | Identifier of the resource
            var shippingId = ship_lin_2tQ974hSHcsdeSZHG;  // string | identifier
            var acceptLanguage = es;  // string | Use for knowing which language to use (optional)  (default to es)
            var xChildCompanyId = 6441b6376b60c3a638da80af;  // string | In the case of a holding company, the company id of the child company to which will process the request. (optional) 

            try
            {
                // Delete Shipping
                ShippingOrderResponse result = apiInstance.OrdersDeleteShipping(id, shippingId, acceptLanguage, xChildCompanyId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ShippingsApi.OrdersDeleteShipping: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the OrdersDeleteShippingWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Delete Shipping
    ApiResponse<ShippingOrderResponse> response = apiInstance.OrdersDeleteShippingWithHttpInfo(id, shippingId, acceptLanguage, xChildCompanyId);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ShippingsApi.OrdersDeleteShippingWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string Identifier of the resource
shippingId string identifier
acceptLanguage string Use for knowing which language to use [optional] [default to es]
xChildCompanyId string In the case of a holding company, the company id of the child company to which will process the request. [optional]

Return type

ShippingOrderResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successful -
401 authentication error -
404 not found entity -
422 parameter validation error -
428 Precondition Required -
500 internal server error -

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

OrdersUpdateShipping

ShippingOrderResponse OrdersUpdateShipping (string id, string shippingId, ShippingRequest shippingRequest, string acceptLanguage = null, string xChildCompanyId = null)

Update Shipping

Update existing shipping for an existing orden

Example

using System.Collections.Generic;
using System.Diagnostics;
using Conekta.net.Api;
using Conekta.net.Client;
using Conekta.net.Model;

namespace Example
{
    public class OrdersUpdateShippingExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.conekta.io";
            // Configure Bearer token for authorization: bearerAuth
            config.AccessToken = "YOUR_BEARER_TOKEN";

            var apiInstance = new ShippingsApi(config);
            var id = 6307a60c41de27127515a575;  // string | Identifier of the resource
            var shippingId = ship_lin_2tQ974hSHcsdeSZHG;  // string | identifier
            var shippingRequest = new ShippingRequest(); // ShippingRequest | requested field for a shipping
            var acceptLanguage = es;  // string | Use for knowing which language to use (optional)  (default to es)
            var xChildCompanyId = 6441b6376b60c3a638da80af;  // string | In the case of a holding company, the company id of the child company to which will process the request. (optional) 

            try
            {
                // Update Shipping
                ShippingOrderResponse result = apiInstance.OrdersUpdateShipping(id, shippingId, shippingRequest, acceptLanguage, xChildCompanyId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling ShippingsApi.OrdersUpdateShipping: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the OrdersUpdateShippingWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Update Shipping
    ApiResponse<ShippingOrderResponse> response = apiInstance.OrdersUpdateShippingWithHttpInfo(id, shippingId, shippingRequest, acceptLanguage, xChildCompanyId);
    Debug.Write("Status Code: " + response.StatusCode);
    Debug.Write("Response Headers: " + response.Headers);
    Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling ShippingsApi.OrdersUpdateShippingWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
id string Identifier of the resource
shippingId string identifier
shippingRequest ShippingRequest requested field for a shipping
acceptLanguage string Use for knowing which language to use [optional] [default to es]
xChildCompanyId string In the case of a holding company, the company id of the child company to which will process the request. [optional]

Return type

ShippingOrderResponse

Authorization

bearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/vnd.conekta-v2.1.0+json

HTTP response details

Status code Description Response headers
200 successful -
401 authentication error -
404 not found entity -
422 parameter validation error -
500 internal server error -

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