Skip to content

Latest commit

 

History

History
399 lines (286 loc) · 16.2 KB

ManufacturersApi.md

File metadata and controls

399 lines (286 loc) · 16.2 KB

sparkfly_client.ManufacturersApi

All URIs are relative to https://api.sparkfly.com

Method HTTP request Description
create_manufacturer POST /v1.0/manufacturers Create a manufacturer
delete_manufacturer DELETE /v1.0/manufacturers/{manufacturer_id} Delete manufacturer by ID
get_manufacturer GET /v1.0/manufacturers/{manufacturer_id} Get manufacturer by ID
get_manufacturers GET /v1.0/manufacturers Get all manufacturers
update_manufacturer PUT /v1.0/manufacturers/{manufacturer_id} Update manufacturer by ID

create_manufacturer

ManufacturerResponse create_manufacturer(manufacturer_input_request=manufacturer_input_request)

Create a manufacturer

Example

  • Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.manufacturer_input_request import ManufacturerInputRequest
from sparkfly_client.models.manufacturer_response import ManufacturerResponse
from sparkfly_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
    host = "https://api.sparkfly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sparkfly_client.ManufacturersApi(api_client)
    manufacturer_input_request = sparkfly_client.ManufacturerInputRequest() # ManufacturerInputRequest | Manufacturer to add to system (optional)

    try:
        # Create a manufacturer
        api_response = api_instance.create_manufacturer(manufacturer_input_request=manufacturer_input_request)
        print("The response of ManufacturersApi->create_manufacturer:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ManufacturersApi->create_manufacturer: %s\n" % e)

Parameters

Name Type Description Notes
manufacturer_input_request ManufacturerInputRequest Manufacturer to add to system [optional]

Return type

ManufacturerResponse

Authorization

X-Auth-Token

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Successful creation * Cache-Control -
* Content-Length -
* Content-Type -
* Date -
* Etag -
* Location -
* Server -
* Set-Cookie -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -
400 Error parsing request * Cache-Control -
* Content-Length -
* Content-Type -
* Date -
* Server -
* Set-Cookie -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -
401 Unauthorized * Cache-Control -
* Content-Length -
* Content-Type -
* Date -
* Server -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -

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

delete_manufacturer

delete_manufacturer(manufacturer_id)

Delete manufacturer by ID

Example

  • Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
    host = "https://api.sparkfly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sparkfly_client.ManufacturersApi(api_client)
    manufacturer_id = 56 # int | The id of the manufacturer

    try:
        # Delete manufacturer by ID
        api_instance.delete_manufacturer(manufacturer_id)
    except Exception as e:
        print("Exception when calling ManufacturersApi->delete_manufacturer: %s\n" % e)

Parameters

Name Type Description Notes
manufacturer_id int The id of the manufacturer

Return type

void (empty response body)

Authorization

X-Auth-Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Successful deletion * Cache-Control -
* Content-Length -
* Content-Type -
* Date -
* Etag -
* Server -
* Set-Cookie -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -
401 Unauthorized * Cache-Control -
* Content-Length -
* Content-Type -
* Date -
* Server -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -
404 Manufacturer was not found by id * Cache-Control -
* Content-Length -
* Content-Type -
* Date -
* Server -
* Set-Cookie -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -

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

get_manufacturer

ManufacturerResponse get_manufacturer(manufacturer_id)

Get manufacturer by ID

Example

  • Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.manufacturer_response import ManufacturerResponse
from sparkfly_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
    host = "https://api.sparkfly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sparkfly_client.ManufacturersApi(api_client)
    manufacturer_id = 56 # int | The id of the manufacturer

    try:
        # Get manufacturer by ID
        api_response = api_instance.get_manufacturer(manufacturer_id)
        print("The response of ManufacturersApi->get_manufacturer:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ManufacturersApi->get_manufacturer: %s\n" % e)

Parameters

Name Type Description Notes
manufacturer_id int The id of the manufacturer

Return type

ManufacturerResponse

Authorization

X-Auth-Token

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 manufacturer to be returned * Cache-Control -
* Content-Length -
* Date -
* Etag -
* Server -
* Set-Cookie -
* X-Auth-Token -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -
401 Unauthorized * Cache-Control -
* Content-Length -
* Content-Type -
* Date -
* Server -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -

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

get_manufacturers

ManufacturerList get_manufacturers()

Get all manufacturers

Example

  • Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.manufacturer_list import ManufacturerList
from sparkfly_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
    host = "https://api.sparkfly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sparkfly_client.ManufacturersApi(api_client)

    try:
        # Get all manufacturers
        api_response = api_instance.get_manufacturers()
        print("The response of ManufacturersApi->get_manufacturers:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ManufacturersApi->get_manufacturers: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

ManufacturerList

Authorization

X-Auth-Token

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 manufacturers to be returned * Cache-Control -
* Content-Length -
* Date -
* Etag -
* Server -
* Set-Cookie -
* X-Auth-Token -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -
401 Unauthorized * Cache-Control -
* Content-Length -
* Content-Type -
* Date -
* Server -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -

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

update_manufacturer

ManufacturerResponse update_manufacturer(manufacturer_id, manufacturer_input_request=manufacturer_input_request)

Update manufacturer by ID

Example

  • Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.manufacturer_input_request import ManufacturerInputRequest
from sparkfly_client.models.manufacturer_response import ManufacturerResponse
from sparkfly_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
    host = "https://api.sparkfly.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'

# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = sparkfly_client.ManufacturersApi(api_client)
    manufacturer_id = 56 # int | The id of the manufacturer
    manufacturer_input_request = sparkfly_client.ManufacturerInputRequest() # ManufacturerInputRequest | Manufacturer to update (optional)

    try:
        # Update manufacturer by ID
        api_response = api_instance.update_manufacturer(manufacturer_id, manufacturer_input_request=manufacturer_input_request)
        print("The response of ManufacturersApi->update_manufacturer:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling ManufacturersApi->update_manufacturer: %s\n" % e)

Parameters

Name Type Description Notes
manufacturer_id int The id of the manufacturer
manufacturer_input_request ManufacturerInputRequest Manufacturer to update [optional]

Return type

ManufacturerResponse

Authorization

X-Auth-Token

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 updated merchant * Cache-Control -
* Content-Length -
* Date -
* Etag -
* Server -
* Set-Cookie -
* X-Auth-Token -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -
400 Error parsing request * Cache-Control -
* Content-Length -
* Content-Type -
* Date -
* Server -
* Set-Cookie -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -
401 Unauthorized * Cache-Control -
* Content-Length -
* Content-Type -
* Date -
* Server -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -
404 Manufacturer was not found by id * Cache-Control -
* Content-Length -
* Content-Type -
* Date -
* Server -
* Set-Cookie -
* X-Request-Id -
* X-Runtime -
* X-Ua-Compatible -

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