diff --git a/digikey/__init__.py b/digikey/__init__.py
index 566f840..a0fbbc0 100644
--- a/digikey/__init__.py
+++ b/digikey/__init__.py
@@ -2,5 +2,6 @@
manufacturer_product_details)
from digikey.v3.api import (status_salesorder_id, salesorder_history)
from digikey.v3.api import (batch_product_details)
+from digikey.v3.api import (get_orders, accept_order_lines_by_order_id, ship_order, update_supplier_invoice_number)
name = 'digikey'
diff --git a/digikey/v3/api.py b/digikey/v3/api.py
index 188da7a..794cc89 100644
--- a/digikey/v3/api.py
+++ b/digikey/v3/api.py
@@ -3,11 +3,12 @@
from distutils.util import strtobool
import digikey.oauth.oauth2
from digikey.exceptions import DigikeyError
-from digikey.v3.productinformation import (KeywordSearchRequest, KeywordSearchResponse, ProductDetails, DigiReelPricing,
+from digikey.v3.productinformation import (KeywordSearchRequest, KeywordSearchResponse, ProductDetails, DigiReelPricingDto,
ManufacturerProductDetailsRequest)
from digikey.v3.productinformation.rest import ApiException
from digikey.v3.ordersupport import (OrderStatusResponse, SalesOrderHistoryItem)
from digikey.v3.batchproductdetails import (BatchProductDetailsRequest, BatchProductDetailsResponse)
+from digikey.v3.marketplace import (GetOrdersPage,Order,AcceptOrderDetailErrorsPage,AcceptOrderDetailsCommandBody,ShipOrderModel)
logger = logging.getLogger(__name__)
@@ -17,15 +18,17 @@ def __init__(self, wrapped_function, module):
self.sandbox = False
apinames = {
- digikey.v3.productinformation: 'Search',
- digikey.v3.ordersupport: 'OrderDetails',
- digikey.v3.batchproductdetails: 'BatchSearch'
+ digikey.v3.productinformation: 'Search/v3',
+ digikey.v3.ordersupport: 'OrderDetails/v3',
+ digikey.v3.batchproductdetails: 'BatchSearch/v3',
+ digikey.v3.marketplace: 'Sales/Marketplace2/Orders/v1'
}
apiclasses = {
digikey.v3.productinformation: digikey.v3.productinformation.PartSearchApi,
digikey.v3.ordersupport: digikey.v3.ordersupport.OrderDetailsApi,
- digikey.v3.batchproductdetails: digikey.v3.batchproductdetails.BatchSearchApi
+ digikey.v3.batchproductdetails: digikey.v3.batchproductdetails.BatchSearchApi,
+ digikey.v3.marketplace: digikey.v3.marketplace.OrdersApi
}
apiname = apinames[module]
@@ -40,10 +43,10 @@ def __init__(self, wrapped_function, module):
raise DigikeyError('Please provide a valid DIGIKEY_CLIENT_ID and DIGIKEY_CLIENT_SECRET in your env setup')
# Use normal API by default, if DIGIKEY_CLIENT_SANDBOX is True use sandbox API
- configuration.host = 'https://api.digikey.com/' + apiname + '/v3'
+ configuration.host = 'https://api.digikey.com/' + apiname
try:
if bool(strtobool(os.getenv('DIGIKEY_CLIENT_SANDBOX'))):
- configuration.host = 'https://sandbox-api.digikey.com/' + apiname + '/v3'
+ configuration.host = 'https://sandbox-api.digikey.com/' + apiname
self.sandbox = True
except (ValueError, AttributeError):
pass
@@ -125,7 +128,7 @@ def product_details(*args, **kwargs) -> ProductDetails:
return client.call_api_function(*args, **kwargs)
-def digi_reel_pricing(*args, **kwargs) -> DigiReelPricing:
+def digi_reel_pricing(*args, **kwargs) -> DigiReelPricingDto:
client = DigikeyApiWrapper('digi_reel_pricing_with_http_info', digikey.v3.productinformation)
if len(args):
@@ -179,3 +182,40 @@ def batch_product_details(*args, **kwargs) -> BatchProductDetailsResponse:
return client.call_api_function(*args, **kwargs)
else:
raise DigikeyError('Please provide a valid BatchProductDetailsRequest argument')
+
+
+def get_orders(*args, **kwargs) -> GetOrdersPage:
+ client = DigikeyApiWrapper('get_orders_with_http_info', digikey.v3.marketplace)
+
+ if len(args) == 0:
+ logger.debug('CALL -> get_orders')
+ return client.call_api_function(*args, **kwargs)
+
+
+def accept_order_lines_by_order_id(*args, **kwargs) -> AcceptOrderDetailErrorsPage:
+ client = DigikeyApiWrapper('accept_order_lines_by_order_id_with_http_info', digikey.v3.marketplace)
+
+ if 'body' in kwargs and type(kwargs['body']) == AcceptOrderDetailsCommandBody:
+ logger.debug('CALL -> accept_order_lines_by_order_id')
+ return client.call_api_function(*args, **kwargs)
+ else:
+ raise DigikeyError('Please provide a valid AcceptOrderDetailsCommandBody argument')
+
+
+def ship_order(*args, **kwargs) -> Order:
+ client = DigikeyApiWrapper('ship_order_with_http_info', digikey.v3.marketplace)
+
+ if 'body' in kwargs and type(kwargs['body']) == ShipOrderModel:
+ logger.debug('CALL -> ship_order')
+ return client.call_api_function(*args, **kwargs)
+ else:
+ raise DigikeyError('Please provide a valid ShipOrderModel argument')
+
+
+def update_supplier_invoice_number(*args, **kwargs) -> Order:
+ client = DigikeyApiWrapper('update_supplier_invoice_number_with_http_info', digikey.v3.marketplace)
+
+ if len(args):
+ logger.info(f'Get order for ID: {args[0]}')
+ return client.call_api_function(*args, **kwargs)
+
diff --git a/digikey/v3/marketplace/__init__.py b/digikey/v3/marketplace/__init__.py
new file mode 100644
index 0000000..0911e47
--- /dev/null
+++ b/digikey/v3/marketplace/__init__.py
@@ -0,0 +1,52 @@
+# coding: utf-8
+
+# flake8: noqa
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+from __future__ import absolute_import
+
+# import apis into sdk package
+from digikey.v3.marketplace.api.health_check_api import HealthCheckApi
+from digikey.v3.marketplace.api.orders_api import OrdersApi
+
+# import ApiClient
+from digikey.v3.marketplace.api_client import ApiClient
+from digikey.v3.marketplace.configuration import Configuration
+# import models into sdk package
+from digikey.v3.marketplace.models.accept_order_detail_error_result import AcceptOrderDetailErrorResult
+from digikey.v3.marketplace.models.accept_order_detail_errors_page import AcceptOrderDetailErrorsPage
+from digikey.v3.marketplace.models.accept_order_detail_model import AcceptOrderDetailModel
+from digikey.v3.marketplace.models.accept_order_details_command_body import AcceptOrderDetailsCommandBody
+from digikey.v3.marketplace.models.additional_field import AdditionalField
+from digikey.v3.marketplace.models.cancel_order_detail_error_result import CancelOrderDetailErrorResult
+from digikey.v3.marketplace.models.cancel_order_detail_errors_page import CancelOrderDetailErrorsPage
+from digikey.v3.marketplace.models.cancel_order_detail_model import CancelOrderDetailModel
+from digikey.v3.marketplace.models.cancel_order_details_command_body import CancelOrderDetailsCommandBody
+from digikey.v3.marketplace.models.contact_info import ContactInfo
+from digikey.v3.marketplace.models.customer import Customer
+from digikey.v3.marketplace.models.get_orders_page import GetOrdersPage
+from digikey.v3.marketplace.models.health_check_response import HealthCheckResponse
+from digikey.v3.marketplace.models.order import Order
+from digikey.v3.marketplace.models.order_cancellation import OrderCancellation
+from digikey.v3.marketplace.models.order_detail import OrderDetail
+from digikey.v3.marketplace.models.order_expanded import OrderExpanded
+from digikey.v3.marketplace.models.order_incident import OrderIncident
+from digikey.v3.marketplace.models.order_refund import OrderRefund
+from digikey.v3.marketplace.models.order_refund_item import OrderRefundItem
+from digikey.v3.marketplace.models.problem_details import ProblemDetails
+from digikey.v3.marketplace.models.ship_order_model import ShipOrderModel
+from digikey.v3.marketplace.models.shipping_tracking_info import ShippingTrackingInfo
+from digikey.v3.marketplace.models.shipping_tracking_information_model import ShippingTrackingInformationModel
+from digikey.v3.marketplace.models.update_order_additional_fields_command_body import UpdateOrderAdditionalFieldsCommandBody
+from digikey.v3.marketplace.models.update_order_additional_fields_error_result import UpdateOrderAdditionalFieldsErrorResult
+from digikey.v3.marketplace.models.update_order_additional_fields_errors_page import UpdateOrderAdditionalFieldsErrorsPage
diff --git a/digikey/v3/marketplace/api/__init__.py b/digikey/v3/marketplace/api/__init__.py
new file mode 100644
index 0000000..abfc5df
--- /dev/null
+++ b/digikey/v3/marketplace/api/__init__.py
@@ -0,0 +1,7 @@
+from __future__ import absolute_import
+
+# flake8: noqa
+
+# import apis into api package
+from digikey.v3.marketplace.api.health_check_api import HealthCheckApi
+from digikey.v3.marketplace.api.orders_api import OrdersApi
diff --git a/digikey/v3/marketplace/api/health_check_api.py b/digikey/v3/marketplace/api/health_check_api.py
new file mode 100644
index 0000000..ae249c1
--- /dev/null
+++ b/digikey/v3/marketplace/api/health_check_api.py
@@ -0,0 +1,119 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from digikey.v3.marketplace.api_client import ApiClient
+
+
+class HealthCheckApi(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ Ref: https://github.com/swagger-api/swagger-codegen
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def get_health_check(self, **kwargs): # noqa: E501
+ """Get health status of the API # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_health_check(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :return: HealthCheckResponse
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.get_health_check_with_http_info(**kwargs) # noqa: E501
+ else:
+ (data) = self.get_health_check_with_http_info(**kwargs) # noqa: E501
+ return data
+
+ def get_health_check_with_http_info(self, **kwargs): # noqa: E501
+ """Get health status of the API # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_health_check_with_http_info(async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :return: HealthCheckResponse
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = [] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_health_check" % key
+ )
+ params[key] = val
+ del params['kwargs']
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/healthcheck', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='HealthCheckResponse', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=params.get('async_req'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/digikey/v3/marketplace/api/orders_api.py b/digikey/v3/marketplace/api/orders_api.py
new file mode 100644
index 0000000..616768d
--- /dev/null
+++ b/digikey/v3/marketplace/api/orders_api.py
@@ -0,0 +1,880 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+from __future__ import absolute_import
+
+import re # noqa: F401
+
+# python 2 and python 3 compatibility library
+import six
+
+from digikey.v3.marketplace.api_client import ApiClient
+
+
+class OrdersApi(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ Ref: https://github.com/swagger-api/swagger-codegen
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def accept_order_lines_by_order_id(self, order_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Accepts or rejects order details # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.accept_order_lines_by_order_id(order_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: Id of the order (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :param AcceptOrderDetailsCommandBody body: Request model containing the order acceptance details
+ :return: AcceptOrderDetailErrorsPage
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.accept_order_lines_by_order_id_with_http_info(order_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.accept_order_lines_by_order_id_with_http_info(order_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ return data
+
+ def accept_order_lines_by_order_id_with_http_info(self, order_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Accepts or rejects order details # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.accept_order_lines_by_order_id_with_http_info(order_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: Id of the order (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :param AcceptOrderDetailsCommandBody body: Request model containing the order acceptance details
+ :return: AcceptOrderDetailErrorsPage
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['order_id', 'authorization', 'x_digikey_client_id', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id', 'body'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method accept_order_lines_by_order_id" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'order_id' is set
+ if ('order_id' not in params or
+ params['order_id'] is None):
+ raise ValueError("Missing the required parameter `order_id` when calling `accept_order_lines_by_order_id`") # noqa: E501
+ # verify the required parameter 'authorization' is set
+ if ('authorization' not in params or
+ params['authorization'] is None):
+ raise ValueError("Missing the required parameter `authorization` when calling `accept_order_lines_by_order_id`") # noqa: E501
+ # verify the required parameter 'x_digikey_client_id' is set
+ if ('x_digikey_client_id' not in params or
+ params['x_digikey_client_id'] is None):
+ raise ValueError("Missing the required parameter `x_digikey_client_id` when calling `accept_order_lines_by_order_id`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'order_id' in params:
+ path_params['orderId'] = params['order_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+ if 'authorization' in params:
+ header_params['Authorization'] = params['authorization'] # noqa: E501
+ if 'x_digikey_client_id' in params:
+ header_params['X-DIGIKEY-Client-Id'] = params['x_digikey_client_id'] # noqa: E501
+ if 'x_digikey_locale_site' in params:
+ header_params['X-DIGIKEY-Locale-Site'] = params['x_digikey_locale_site'] # noqa: E501
+ if 'x_digikey_locale_language' in params:
+ header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
+ if 'x_digikey_locale_currency' in params:
+ header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
+ if 'x_digikey_customer_id' in params:
+ header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in params:
+ body_params = params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/orders/{orderId}/accept', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='AcceptOrderDetailErrorsPage', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=params.get('async_req'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def cancel_order_lines_by_order_id(self, order_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Cancels order details # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.cancel_order_lines_by_order_id(order_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: Id of the order (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :param CancelOrderDetailsCommandBody body: Request model containing the calcelation details
+ :return: CancelOrderDetailErrorsPage
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.cancel_order_lines_by_order_id_with_http_info(order_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.cancel_order_lines_by_order_id_with_http_info(order_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ return data
+
+ def cancel_order_lines_by_order_id_with_http_info(self, order_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Cancels order details # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.cancel_order_lines_by_order_id_with_http_info(order_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: Id of the order (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :param CancelOrderDetailsCommandBody body: Request model containing the calcelation details
+ :return: CancelOrderDetailErrorsPage
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['order_id', 'authorization', 'x_digikey_client_id', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id', 'body'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method cancel_order_lines_by_order_id" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'order_id' is set
+ if ('order_id' not in params or
+ params['order_id'] is None):
+ raise ValueError("Missing the required parameter `order_id` when calling `cancel_order_lines_by_order_id`") # noqa: E501
+ # verify the required parameter 'authorization' is set
+ if ('authorization' not in params or
+ params['authorization'] is None):
+ raise ValueError("Missing the required parameter `authorization` when calling `cancel_order_lines_by_order_id`") # noqa: E501
+ # verify the required parameter 'x_digikey_client_id' is set
+ if ('x_digikey_client_id' not in params or
+ params['x_digikey_client_id'] is None):
+ raise ValueError("Missing the required parameter `x_digikey_client_id` when calling `cancel_order_lines_by_order_id`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'order_id' in params:
+ path_params['orderId'] = params['order_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+ if 'authorization' in params:
+ header_params['Authorization'] = params['authorization'] # noqa: E501
+ if 'x_digikey_client_id' in params:
+ header_params['X-DIGIKEY-Client-Id'] = params['x_digikey_client_id'] # noqa: E501
+ if 'x_digikey_locale_site' in params:
+ header_params['X-DIGIKEY-Locale-Site'] = params['x_digikey_locale_site'] # noqa: E501
+ if 'x_digikey_locale_language' in params:
+ header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
+ if 'x_digikey_locale_currency' in params:
+ header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
+ if 'x_digikey_customer_id' in params:
+ header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in params:
+ body_params = params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/orders/{orderId}/cancel', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='CancelOrderDetailErrorsPage', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=params.get('async_req'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def get_orders(self, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Gets orders. Sortable fields are id, businessId, createDateUtc, shippingDeadlineUtc. Sorting format is \"field|direction\". Direction values: asc or desc. # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_orders(authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str business_ids:
+ :param str customer_ids:
+ :param str product_part_numbers:
+ :param str supplier_ids:
+ :param datetime created_from:
+ :param datetime created_to:
+ :param datetime updated_from:
+ :param datetime updated_to:
+ :param datetime shipping_deadline_from:
+ :param datetime shipping_deadline_to:
+ :param str order_detail_id:
+ :param str order_state:
+ :param bool has_open_incidents:
+ :param str supplier_invoice_number:
+ :param int offset:
+ :param int max:
+ :param str sort:
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :return: GetOrdersPage
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.get_orders_with_http_info(authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.get_orders_with_http_info(authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ return data
+
+ def get_orders_with_http_info(self, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Gets orders. Sortable fields are id, businessId, createDateUtc, shippingDeadlineUtc. Sorting format is \"field|direction\". Direction values: asc or desc. # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.get_orders_with_http_info(authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str business_ids:
+ :param str customer_ids:
+ :param str product_part_numbers:
+ :param str supplier_ids:
+ :param datetime created_from:
+ :param datetime created_to:
+ :param datetime updated_from:
+ :param datetime updated_to:
+ :param datetime shipping_deadline_from:
+ :param datetime shipping_deadline_to:
+ :param str order_detail_id:
+ :param str order_state:
+ :param bool has_open_incidents:
+ :param str supplier_invoice_number:
+ :param int offset:
+ :param int max:
+ :param str sort:
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :return: GetOrdersPage
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['authorization', 'x_digikey_client_id', 'business_ids', 'customer_ids', 'product_part_numbers', 'supplier_ids', 'created_from', 'created_to', 'updated_from', 'updated_to', 'shipping_deadline_from', 'shipping_deadline_to', 'order_detail_id', 'order_state', 'has_open_incidents', 'supplier_invoice_number', 'offset', 'max', 'sort', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method get_orders" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'authorization' is set
+ if ('authorization' not in params or
+ params['authorization'] is None):
+ raise ValueError("Missing the required parameter `authorization` when calling `get_orders`") # noqa: E501
+ # verify the required parameter 'x_digikey_client_id' is set
+ if ('x_digikey_client_id' not in params or
+ params['x_digikey_client_id'] is None):
+ raise ValueError("Missing the required parameter `x_digikey_client_id` when calling `get_orders`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+ if 'business_ids' in params:
+ query_params.append(('BusinessIds', params['business_ids'])) # noqa: E501
+ if 'customer_ids' in params:
+ query_params.append(('CustomerIds', params['customer_ids'])) # noqa: E501
+ if 'product_part_numbers' in params:
+ query_params.append(('ProductPartNumbers', params['product_part_numbers'])) # noqa: E501
+ if 'supplier_ids' in params:
+ query_params.append(('SupplierIds', params['supplier_ids'])) # noqa: E501
+ if 'created_from' in params:
+ query_params.append(('CreatedFrom', params['created_from'])) # noqa: E501
+ if 'created_to' in params:
+ query_params.append(('CreatedTo', params['created_to'])) # noqa: E501
+ if 'updated_from' in params:
+ query_params.append(('UpdatedFrom', params['updated_from'])) # noqa: E501
+ if 'updated_to' in params:
+ query_params.append(('UpdatedTo', params['updated_to'])) # noqa: E501
+ if 'shipping_deadline_from' in params:
+ query_params.append(('ShippingDeadlineFrom', params['shipping_deadline_from'])) # noqa: E501
+ if 'shipping_deadline_to' in params:
+ query_params.append(('ShippingDeadlineTo', params['shipping_deadline_to'])) # noqa: E501
+ if 'order_detail_id' in params:
+ query_params.append(('OrderDetailId', params['order_detail_id'])) # noqa: E501
+ if 'order_state' in params:
+ query_params.append(('OrderState', params['order_state'])) # noqa: E501
+ if 'has_open_incidents' in params:
+ query_params.append(('HasOpenIncidents', params['has_open_incidents'])) # noqa: E501
+ if 'supplier_invoice_number' in params:
+ query_params.append(('SupplierInvoiceNumber', params['supplier_invoice_number'])) # noqa: E501
+ if 'offset' in params:
+ query_params.append(('Offset', params['offset'])) # noqa: E501
+ if 'max' in params:
+ query_params.append(('Max', params['max'])) # noqa: E501
+ if 'sort' in params:
+ query_params.append(('Sort', params['sort'])) # noqa: E501
+
+ header_params = {}
+ if 'authorization' in params:
+ header_params['Authorization'] = params['authorization'] # noqa: E501
+ if 'x_digikey_client_id' in params:
+ header_params['X-DIGIKEY-Client-Id'] = params['x_digikey_client_id'] # noqa: E501
+ if 'x_digikey_locale_site' in params:
+ header_params['X-DIGIKEY-Locale-Site'] = params['x_digikey_locale_site'] # noqa: E501
+ if 'x_digikey_locale_language' in params:
+ header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
+ if 'x_digikey_locale_currency' in params:
+ header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
+ if 'x_digikey_customer_id' in params:
+ header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/orders', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='GetOrdersPage', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=params.get('async_req'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def ship_order(self, order_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Ships order # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.ship_order(order_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: Id of the order (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :param ShipOrderModel body: Request model containing the order shipment details
+ :return: Order
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.ship_order_with_http_info(order_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.ship_order_with_http_info(order_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ return data
+
+ def ship_order_with_http_info(self, order_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Ships order # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.ship_order_with_http_info(order_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: Id of the order (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :param ShipOrderModel body: Request model containing the order shipment details
+ :return: Order
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['order_id', 'authorization', 'x_digikey_client_id', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id', 'body'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method ship_order" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'order_id' is set
+ if ('order_id' not in params or
+ params['order_id'] is None):
+ raise ValueError("Missing the required parameter `order_id` when calling `ship_order`") # noqa: E501
+ # verify the required parameter 'authorization' is set
+ if ('authorization' not in params or
+ params['authorization'] is None):
+ raise ValueError("Missing the required parameter `authorization` when calling `ship_order`") # noqa: E501
+ # verify the required parameter 'x_digikey_client_id' is set
+ if ('x_digikey_client_id' not in params or
+ params['x_digikey_client_id'] is None):
+ raise ValueError("Missing the required parameter `x_digikey_client_id` when calling `ship_order`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'order_id' in params:
+ path_params['orderId'] = params['order_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+ if 'authorization' in params:
+ header_params['Authorization'] = params['authorization'] # noqa: E501
+ if 'x_digikey_client_id' in params:
+ header_params['X-DIGIKEY-Client-Id'] = params['x_digikey_client_id'] # noqa: E501
+ if 'x_digikey_locale_site' in params:
+ header_params['X-DIGIKEY-Locale-Site'] = params['x_digikey_locale_site'] # noqa: E501
+ if 'x_digikey_locale_language' in params:
+ header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
+ if 'x_digikey_locale_currency' in params:
+ header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
+ if 'x_digikey_customer_id' in params:
+ header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in params:
+ body_params = params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/orders/{orderId}/ship', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='Order', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=params.get('async_req'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def update_additional_fields(self, order_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Updates additional fields on an order # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.update_additional_fields(order_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: Id of the order (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :param UpdateOrderAdditionalFieldsCommandBody body: Request model containing the additional fields
+ :return: UpdateOrderAdditionalFieldsErrorsPage
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.update_additional_fields_with_http_info(order_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_additional_fields_with_http_info(order_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ return data
+
+ def update_additional_fields_with_http_info(self, order_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Updates additional fields on an order # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.update_additional_fields_with_http_info(order_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: Id of the order (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :param UpdateOrderAdditionalFieldsCommandBody body: Request model containing the additional fields
+ :return: UpdateOrderAdditionalFieldsErrorsPage
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['order_id', 'authorization', 'x_digikey_client_id', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id', 'body'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_additional_fields" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'order_id' is set
+ if ('order_id' not in params or
+ params['order_id'] is None):
+ raise ValueError("Missing the required parameter `order_id` when calling `update_additional_fields`") # noqa: E501
+ # verify the required parameter 'authorization' is set
+ if ('authorization' not in params or
+ params['authorization'] is None):
+ raise ValueError("Missing the required parameter `authorization` when calling `update_additional_fields`") # noqa: E501
+ # verify the required parameter 'x_digikey_client_id' is set
+ if ('x_digikey_client_id' not in params or
+ params['x_digikey_client_id'] is None):
+ raise ValueError("Missing the required parameter `x_digikey_client_id` when calling `update_additional_fields`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'order_id' in params:
+ path_params['orderId'] = params['order_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+ if 'authorization' in params:
+ header_params['Authorization'] = params['authorization'] # noqa: E501
+ if 'x_digikey_client_id' in params:
+ header_params['X-DIGIKEY-Client-Id'] = params['x_digikey_client_id'] # noqa: E501
+ if 'x_digikey_locale_site' in params:
+ header_params['X-DIGIKEY-Locale-Site'] = params['x_digikey_locale_site'] # noqa: E501
+ if 'x_digikey_locale_language' in params:
+ header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
+ if 'x_digikey_locale_currency' in params:
+ header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
+ if 'x_digikey_customer_id' in params:
+ header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ if 'body' in params:
+ body_params = params['body']
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # HTTP header `Content-Type`
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
+ ['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/orders/{orderId}/additionalFields', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='UpdateOrderAdditionalFieldsErrorsPage', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=params.get('async_req'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def update_supplier_invoice_number(self, order_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Update Supplier Invoice Number # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.update_supplier_invoice_number(order_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str supplier_invoice_number:
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :return: Order
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.update_supplier_invoice_number_with_http_info(order_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.update_supplier_invoice_number_with_http_info(order_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ return data
+
+ def update_supplier_invoice_number_with_http_info(self, order_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Update Supplier Invoice Number # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.update_supplier_invoice_number_with_http_info(order_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str order_id: (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str supplier_invoice_number:
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :return: Order
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['order_id', 'authorization', 'x_digikey_client_id', 'supplier_invoice_number', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method update_supplier_invoice_number" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'order_id' is set
+ if ('order_id' not in params or
+ params['order_id'] is None):
+ raise ValueError("Missing the required parameter `order_id` when calling `update_supplier_invoice_number`") # noqa: E501
+ # verify the required parameter 'authorization' is set
+ if ('authorization' not in params or
+ params['authorization'] is None):
+ raise ValueError("Missing the required parameter `authorization` when calling `update_supplier_invoice_number`") # noqa: E501
+ # verify the required parameter 'x_digikey_client_id' is set
+ if ('x_digikey_client_id' not in params or
+ params['x_digikey_client_id'] is None):
+ raise ValueError("Missing the required parameter `x_digikey_client_id` when calling `update_supplier_invoice_number`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'order_id' in params:
+ path_params['orderId'] = params['order_id'] # noqa: E501
+
+ query_params = []
+ if 'supplier_invoice_number' in params:
+ query_params.append(('supplierInvoiceNumber', params['supplier_invoice_number'])) # noqa: E501
+
+ header_params = {}
+ if 'authorization' in params:
+ header_params['Authorization'] = params['authorization'] # noqa: E501
+ if 'x_digikey_client_id' in params:
+ header_params['X-DIGIKEY-Client-Id'] = params['x_digikey_client_id'] # noqa: E501
+ if 'x_digikey_locale_site' in params:
+ header_params['X-DIGIKEY-Locale-Site'] = params['x_digikey_locale_site'] # noqa: E501
+ if 'x_digikey_locale_language' in params:
+ header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
+ if 'x_digikey_locale_currency' in params:
+ header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
+ if 'x_digikey_customer_id' in params:
+ header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+
+ return self.api_client.call_api(
+ '/orders/{orderId}/supplierInvoiceNumber', 'PUT',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='Order', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=params.get('async_req'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
diff --git a/digikey/v3/marketplace/api_client.py b/digikey/v3/marketplace/api_client.py
new file mode 100644
index 0000000..2dff51f
--- /dev/null
+++ b/digikey/v3/marketplace/api_client.py
@@ -0,0 +1,638 @@
+# coding: utf-8
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+from __future__ import absolute_import
+
+import datetime
+import json
+import mimetypes
+from multiprocessing.pool import ThreadPool
+import os
+import re
+import tempfile
+
+# python 2 and python 3 compatibility library
+import six
+from six.moves.urllib.parse import quote
+
+from digikey.v3.marketplace.configuration import Configuration
+import digikey.v3.marketplace.models
+from digikey.v3.marketplace import rest
+
+
+class ApiClient(object):
+ """Generic API client for Swagger client library builds.
+
+ Swagger generic API client. This client handles the client-
+ server communication, and is invariant across implementations. Specifics of
+ the methods and models for each application are generated from the Swagger
+ templates.
+
+ NOTE: This class is auto generated by the swagger code generator program.
+ Ref: https://github.com/swagger-api/swagger-codegen
+ Do not edit the class manually.
+
+ :param configuration: .Configuration object for this client
+ :param header_name: a header to pass when making calls to the API.
+ :param header_value: a header value to pass when making calls to
+ the API.
+ :param cookie: a cookie to include in the header when making calls
+ to the API
+ """
+
+ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
+ NATIVE_TYPES_MAPPING = {
+ 'int': int,
+ 'long': int if six.PY3 else long, # noqa: F821
+ 'float': float,
+ 'str': str,
+ 'bool': bool,
+ 'date': datetime.date,
+ 'datetime': datetime.datetime,
+ 'object': object,
+ }
+
+ def __init__(self, configuration=None, header_name=None, header_value=None,
+ cookie=None):
+ if configuration is None:
+ configuration = Configuration()
+ self.configuration = configuration
+
+ # Use the pool property to lazily initialize the ThreadPool.
+ self._pool = None
+ self.rest_client = rest.RESTClientObject(configuration)
+ self.default_headers = {}
+ if header_name is not None:
+ self.default_headers[header_name] = header_value
+ self.cookie = cookie
+ # Set default User-Agent.
+ self.user_agent = 'Swagger-Codegen/0.1.0/python'
+
+ def __del__(self):
+ if self._pool is not None:
+ self._pool.close()
+ self._pool.join()
+
+ @property
+ def pool(self):
+ if self._pool is None:
+ self._pool = ThreadPool()
+ return self._pool
+
+ @property
+ def user_agent(self):
+ """User agent for this API client"""
+ return self.default_headers['User-Agent']
+
+ @user_agent.setter
+ def user_agent(self, value):
+ self.default_headers['User-Agent'] = value
+
+ def set_default_header(self, header_name, header_value):
+ self.default_headers[header_name] = header_value
+
+ def __call_api(
+ self, resource_path, method, path_params=None,
+ query_params=None, header_params=None, body=None, post_params=None,
+ files=None, response_type=None, auth_settings=None,
+ _return_http_data_only=None, collection_formats=None,
+ _preload_content=True, _request_timeout=None):
+
+ config = self.configuration
+
+ # header parameters
+ header_params = header_params or {}
+ header_params.update(self.default_headers)
+ if self.cookie:
+ header_params['Cookie'] = self.cookie
+ if header_params:
+ header_params = self.sanitize_for_serialization(header_params)
+ header_params = dict(self.parameters_to_tuples(header_params,
+ collection_formats))
+
+ # path parameters
+ if path_params:
+ path_params = self.sanitize_for_serialization(path_params)
+ path_params = self.parameters_to_tuples(path_params,
+ collection_formats)
+ for k, v in path_params:
+ # specified safe chars, encode everything
+ resource_path = resource_path.replace(
+ '{%s}' % k,
+ quote(str(v), safe=config.safe_chars_for_path_param)
+ )
+
+ # query parameters
+ if query_params:
+ query_params = self.sanitize_for_serialization(query_params)
+ query_params = self.parameters_to_tuples(query_params,
+ collection_formats)
+
+ # post parameters
+ if post_params or files:
+ post_params = self.prepare_post_parameters(post_params, files)
+ post_params = self.sanitize_for_serialization(post_params)
+ post_params = self.parameters_to_tuples(post_params,
+ collection_formats)
+
+ # auth setting
+ self.update_params_for_auth(header_params, query_params, auth_settings)
+
+ # body
+ if body:
+ body = self.sanitize_for_serialization(body)
+
+ # request url
+ url = self.configuration.host + resource_path
+
+ # perform request and return response
+ response_data = self.request(
+ method, url, query_params=query_params, headers=header_params,
+ post_params=post_params, body=body,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout)
+
+ self.last_response = response_data
+
+ return_data = response_data
+ if _preload_content:
+ # deserialize response data
+ if response_type:
+ return_data = self.deserialize(response_data, response_type)
+ else:
+ return_data = None
+
+ if _return_http_data_only:
+ return (return_data)
+ else:
+ return (return_data, response_data.status,
+ response_data.getheaders())
+
+ def sanitize_for_serialization(self, obj):
+ """Builds a JSON POST object.
+
+ If obj is None, return None.
+ If obj is str, int, long, float, bool, return directly.
+ If obj is datetime.datetime, datetime.date
+ convert to string in iso8601 format.
+ If obj is list, sanitize each element in the list.
+ If obj is dict, return the dict.
+ If obj is swagger model, return the properties dict.
+
+ :param obj: The data to serialize.
+ :return: The serialized form of data.
+ """
+ if obj is None:
+ return None
+ elif isinstance(obj, self.PRIMITIVE_TYPES):
+ return obj
+ elif isinstance(obj, list):
+ return [self.sanitize_for_serialization(sub_obj)
+ for sub_obj in obj]
+ elif isinstance(obj, tuple):
+ return tuple(self.sanitize_for_serialization(sub_obj)
+ for sub_obj in obj)
+ elif isinstance(obj, (datetime.datetime, datetime.date)):
+ return obj.isoformat()
+
+ if isinstance(obj, dict):
+ obj_dict = obj
+ else:
+ # Convert model obj to dict except
+ # attributes `swagger_types`, `attribute_map`
+ # and attributes which value is not None.
+ # Convert attribute name to json key in
+ # model definition for request.
+ obj_dict = {obj.attribute_map[attr]: getattr(obj, attr)
+ for attr, _ in six.iteritems(obj.swagger_types)
+ if getattr(obj, attr) is not None}
+
+ return {key: self.sanitize_for_serialization(val)
+ for key, val in six.iteritems(obj_dict)}
+
+ def deserialize(self, response, response_type):
+ """Deserializes response into an object.
+
+ :param response: RESTResponse object to be deserialized.
+ :param response_type: class literal for
+ deserialized object, or string of class name.
+
+ :return: deserialized object.
+ """
+ # handle file downloading
+ # save response body into a tmp file and return the instance
+ if response_type == "file":
+ return self.__deserialize_file(response)
+
+ # fetch data from response object
+ try:
+ data = json.loads(response.data)
+ except ValueError:
+ data = response.data
+
+ return self.__deserialize(data, response_type)
+
+ def __deserialize(self, data, klass):
+ """Deserializes dict, list, str into an object.
+
+ :param data: dict, list or str.
+ :param klass: class literal, or string of class name.
+
+ :return: object.
+ """
+ if data is None:
+ return None
+
+ if type(klass) == str:
+ if klass.startswith('list['):
+ sub_kls = re.match(r'list\[(.*)\]', klass).group(1)
+ return [self.__deserialize(sub_data, sub_kls)
+ for sub_data in data]
+
+ if klass.startswith('dict('):
+ sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2)
+ return {k: self.__deserialize(v, sub_kls)
+ for k, v in six.iteritems(data)}
+
+ # convert str to class
+ if klass in self.NATIVE_TYPES_MAPPING:
+ klass = self.NATIVE_TYPES_MAPPING[klass]
+ else:
+ klass = getattr(digikey.v3.marketplace.models, klass)
+
+ if klass in self.PRIMITIVE_TYPES:
+ return self.__deserialize_primitive(data, klass)
+ elif klass == object:
+ return self.__deserialize_object(data)
+ elif klass == datetime.date:
+ return self.__deserialize_date(data)
+ elif klass == datetime.datetime:
+ return self.__deserialize_datatime(data)
+ else:
+ return self.__deserialize_model(data, klass)
+
+ def call_api(self, resource_path, method,
+ path_params=None, query_params=None, header_params=None,
+ body=None, post_params=None, files=None,
+ response_type=None, auth_settings=None, async_req=None,
+ _return_http_data_only=None, collection_formats=None,
+ _preload_content=True, _request_timeout=None):
+ """Makes the HTTP request (synchronous) and returns deserialized data.
+
+ To make an async request, set the async_req parameter.
+
+ :param resource_path: Path to method endpoint.
+ :param method: Method to call.
+ :param path_params: Path parameters in the url.
+ :param query_params: Query parameters in the url.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param auth_settings list: Auth Settings names for the request.
+ :param response: Response data type.
+ :param files dict: key -> filename, value -> filepath,
+ for `multipart/form-data`.
+ :param async_req bool: execute request asynchronously
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :param collection_formats: dict of collection formats for path, query,
+ header, and post parameters.
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :return:
+ If async_req parameter is True,
+ the request will be called asynchronously.
+ The method will return the request thread.
+ If parameter async_req is False or missing,
+ then the method will return the response directly.
+ """
+ if not async_req:
+ return self.__call_api(resource_path, method,
+ path_params, query_params, header_params,
+ body, post_params, files,
+ response_type, auth_settings,
+ _return_http_data_only, collection_formats,
+ _preload_content, _request_timeout)
+ else:
+ thread = self.pool.apply_async(self.__call_api, (resource_path,
+ method, path_params, query_params,
+ header_params, body,
+ post_params, files,
+ response_type, auth_settings,
+ _return_http_data_only,
+ collection_formats,
+ _preload_content, _request_timeout))
+ return thread
+
+ def request(self, method, url, query_params=None, headers=None,
+ post_params=None, body=None, _preload_content=True,
+ _request_timeout=None):
+ """Makes the HTTP request using RESTClient."""
+ if method == "GET":
+ return self.rest_client.GET(url,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ headers=headers)
+ elif method == "HEAD":
+ return self.rest_client.HEAD(url,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ headers=headers)
+ elif method == "OPTIONS":
+ return self.rest_client.OPTIONS(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "POST":
+ return self.rest_client.POST(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "PUT":
+ return self.rest_client.PUT(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "PATCH":
+ return self.rest_client.PATCH(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "DELETE":
+ return self.rest_client.DELETE(url,
+ query_params=query_params,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ else:
+ raise ValueError(
+ "http method must be `GET`, `HEAD`, `OPTIONS`,"
+ " `POST`, `PATCH`, `PUT` or `DELETE`."
+ )
+
+ def parameters_to_tuples(self, params, collection_formats):
+ """Get parameters as list of tuples, formatting collections.
+
+ :param params: Parameters as dict or list of two-tuples
+ :param dict collection_formats: Parameter collection formats
+ :return: Parameters as list of tuples, collections formatted
+ """
+ new_params = []
+ if collection_formats is None:
+ collection_formats = {}
+ for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501
+ if k in collection_formats:
+ collection_format = collection_formats[k]
+ if collection_format == 'multi':
+ new_params.extend((k, value) for value in v)
+ else:
+ if collection_format == 'ssv':
+ delimiter = ' '
+ elif collection_format == 'tsv':
+ delimiter = '\t'
+ elif collection_format == 'pipes':
+ delimiter = '|'
+ else: # csv is the default
+ delimiter = ','
+ new_params.append(
+ (k, delimiter.join(str(value) for value in v)))
+ else:
+ new_params.append((k, v))
+ return new_params
+
+ def prepare_post_parameters(self, post_params=None, files=None):
+ """Builds form parameters.
+
+ :param post_params: Normal form parameters.
+ :param files: File parameters.
+ :return: Form parameters with files.
+ """
+ params = []
+
+ if post_params:
+ params = post_params
+
+ if files:
+ for k, v in six.iteritems(files):
+ if not v:
+ continue
+ file_names = v if type(v) is list else [v]
+ for n in file_names:
+ with open(n, 'rb') as f:
+ filename = os.path.basename(f.name)
+ filedata = f.read()
+ mimetype = (mimetypes.guess_type(filename)[0] or
+ 'application/octet-stream')
+ params.append(
+ tuple([k, tuple([filename, filedata, mimetype])]))
+
+ return params
+
+ def select_header_accept(self, accepts):
+ """Returns `Accept` based on an array of accepts provided.
+
+ :param accepts: List of headers.
+ :return: Accept (e.g. application/json).
+ """
+ if not accepts:
+ return
+
+ accepts = [x.lower() for x in accepts]
+
+ if 'application/json' in accepts:
+ return 'application/json'
+ else:
+ return ', '.join(accepts)
+
+ def select_header_content_type(self, content_types):
+ """Returns `Content-Type` based on an array of content_types provided.
+
+ :param content_types: List of content-types.
+ :return: Content-Type (e.g. application/json).
+ """
+ if not content_types:
+ return 'application/json'
+
+ content_types = [x.lower() for x in content_types]
+
+ if 'application/json' in content_types or '*/*' in content_types:
+ return 'application/json'
+ else:
+ return content_types[0]
+
+ def update_params_for_auth(self, headers, querys, auth_settings):
+ """Updates header and query params based on authentication setting.
+
+ :param headers: Header parameters dict to be updated.
+ :param querys: Query parameters tuple list to be updated.
+ :param auth_settings: Authentication setting identifiers list.
+ """
+ if not auth_settings:
+ return
+
+ for auth in auth_settings:
+ auth_setting = self.configuration.auth_settings().get(auth)
+ if auth_setting:
+ if not auth_setting['value']:
+ continue
+ elif auth_setting['in'] == 'header':
+ headers[auth_setting['key']] = auth_setting['value']
+ elif auth_setting['in'] == 'query':
+ querys.append((auth_setting['key'], auth_setting['value']))
+ else:
+ raise ValueError(
+ 'Authentication token must be in `query` or `header`'
+ )
+
+ def __deserialize_file(self, response):
+ """Deserializes body to file
+
+ Saves response body into a file in a temporary folder,
+ using the filename from the `Content-Disposition` header if provided.
+
+ :param response: RESTResponse.
+ :return: file path.
+ """
+ fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
+ os.close(fd)
+ os.remove(path)
+
+ content_disposition = response.getheader("Content-Disposition")
+ if content_disposition:
+ filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
+ content_disposition).group(1)
+ path = os.path.join(os.path.dirname(path), filename)
+
+ with open(path, "wb") as f:
+ f.write(response.data)
+
+ return path
+
+ def __deserialize_primitive(self, data, klass):
+ """Deserializes string to primitive type.
+
+ :param data: str.
+ :param klass: class literal.
+
+ :return: int, long, float, str, bool.
+ """
+ try:
+ return klass(data)
+ except UnicodeEncodeError:
+ return six.text_type(data)
+ except TypeError:
+ return data
+
+ def __deserialize_object(self, value):
+ """Return a original value.
+
+ :return: object.
+ """
+ return value
+
+ def __deserialize_date(self, string):
+ """Deserializes string to date.
+
+ :param string: str.
+ :return: date.
+ """
+ try:
+ from dateutil.parser import parse
+ return parse(string).date()
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason="Failed to parse `{0}` as date object".format(string)
+ )
+
+ def __deserialize_datatime(self, string):
+ """Deserializes string to datetime.
+
+ The string should be in iso8601 datetime format.
+
+ :param string: str.
+ :return: datetime.
+ """
+ try:
+ from dateutil.parser import parse
+ return parse(string)
+ except ImportError:
+ return string
+ except ValueError:
+ raise rest.ApiException(
+ status=0,
+ reason=(
+ "Failed to parse `{0}` as datetime object"
+ .format(string)
+ )
+ )
+
+ def __hasattr(self, object, name):
+ return name in object.__class__.__dict__
+
+ def __deserialize_model(self, data, klass):
+ """Deserializes list or dict to model.
+
+ :param data: dict, list.
+ :param klass: class literal.
+ :return: model object.
+ """
+
+ if (not klass.swagger_types and
+ not self.__hasattr(klass, 'get_real_child_model')):
+ return data
+
+ kwargs = {}
+ if klass.swagger_types is not None:
+ for attr, attr_type in six.iteritems(klass.swagger_types):
+ if (data is not None and
+ klass.attribute_map[attr] in data and
+ isinstance(data, (list, dict))):
+ value = data[klass.attribute_map[attr]]
+ kwargs[attr] = self.__deserialize(value, attr_type)
+
+ instance = klass(**kwargs)
+
+ if (isinstance(instance, dict) and
+ klass.swagger_types is not None and
+ isinstance(data, dict)):
+ for key, value in data.items():
+ if key not in klass.swagger_types:
+ instance[key] = value
+ if self.__hasattr(instance, 'get_real_child_model'):
+ klass_name = instance.get_real_child_model(data)
+ if klass_name:
+ instance = self.__deserialize(data, klass_name)
+ return instance
diff --git a/digikey/v3/marketplace/configuration.py b/digikey/v3/marketplace/configuration.py
new file mode 100644
index 0000000..b752ffd
--- /dev/null
+++ b/digikey/v3/marketplace/configuration.py
@@ -0,0 +1,255 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+from __future__ import absolute_import
+
+import copy
+import logging
+import multiprocessing
+import sys
+import urllib3
+
+import six
+from six.moves import http_client as httplib
+
+
+class Configuration(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Ref: https://github.com/swagger-api/swagger-codegen
+ Do not edit the class manually.
+ """
+
+ _default = None
+
+ def __init__(self):
+ """Constructor"""
+ if self._default:
+ for key in self._default.__dict__.keys():
+ self.__dict__[key] = copy.copy(self._default.__dict__[key])
+ return
+
+ # Default Base url
+ self.host = "https://api.digikey.com/Sales/Marketplace2/Orders/v1"
+ # Temp file folder for downloading files
+ self.temp_folder_path = None
+
+ # Authentication Settings
+ # dict to store API key(s)
+ self.api_key = {}
+ # dict to store API prefix (e.g. Bearer)
+ self.api_key_prefix = {}
+ # Username for HTTP basic authentication
+ self.username = ""
+ # Password for HTTP basic authentication
+ self.password = ""
+
+ # access token for OAuth
+ self.access_token = ""
+
+ # Logging Settings
+ self.logger = {}
+ self.logger["package_logger"] = logging.getLogger("digikey.v3.marketplace")
+ self.logger["urllib3_logger"] = logging.getLogger("urllib3")
+ # Log format
+ self.logger_format = '%(asctime)s %(levelname)s %(message)s'
+ # Log stream handler
+ self.logger_stream_handler = None
+ # Log file handler
+ self.logger_file_handler = None
+ # Debug file location
+ self.logger_file = None
+ # Debug switch
+ self.debug = False
+
+ # SSL/TLS verification
+ # Set this to false to skip verifying SSL certificate when calling API
+ # from https server.
+ self.verify_ssl = True
+ # Set this to customize the certificate file to verify the peer.
+ self.ssl_ca_cert = None
+ # client certificate file
+ self.cert_file = None
+ # client key file
+ self.key_file = None
+ # Set this to True/False to enable/disable SSL hostname verification.
+ self.assert_hostname = None
+
+ # urllib3 connection pool's maximum number of connections saved
+ # per pool. urllib3 uses 1 connection as default value, but this is
+ # not the best value when you are making a lot of possibly parallel
+ # requests to the same host, which is often the case here.
+ # cpu_count * 5 is used as default value to increase performance.
+ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
+
+ # Proxy URL
+ self.proxy = None
+ # Safe chars for path_param
+ self.safe_chars_for_path_param = ''
+
+ @classmethod
+ def set_default(cls, default):
+ cls._default = default
+
+ @property
+ def logger_file(self):
+ """The logger file.
+
+ If the logger_file is None, then add stream handler and remove file
+ handler. Otherwise, add file handler and remove stream handler.
+
+ :param value: The logger_file path.
+ :type: str
+ """
+ return self.__logger_file
+
+ @logger_file.setter
+ def logger_file(self, value):
+ """The logger file.
+
+ If the logger_file is None, then add stream handler and remove file
+ handler. Otherwise, add file handler and remove stream handler.
+
+ :param value: The logger_file path.
+ :type: str
+ """
+ self.__logger_file = value
+ if self.__logger_file:
+ # If set logging file,
+ # then add file handler and remove stream handler.
+ self.logger_file_handler = logging.FileHandler(self.__logger_file)
+ self.logger_file_handler.setFormatter(self.logger_formatter)
+ for _, logger in six.iteritems(self.logger):
+ logger.addHandler(self.logger_file_handler)
+ if self.logger_stream_handler:
+ logger.removeHandler(self.logger_stream_handler)
+ else:
+ # If not set logging file,
+ # then add stream handler and remove file handler.
+ self.logger_stream_handler = logging.StreamHandler()
+ self.logger_stream_handler.setFormatter(self.logger_formatter)
+ for _, logger in six.iteritems(self.logger):
+ logger.addHandler(self.logger_stream_handler)
+ if self.logger_file_handler:
+ logger.removeHandler(self.logger_file_handler)
+
+ @property
+ def debug(self):
+ """Debug status
+
+ :param value: The debug status, True or False.
+ :type: bool
+ """
+ return self.__debug
+
+ @debug.setter
+ def debug(self, value):
+ """Debug status
+
+ :param value: The debug status, True or False.
+ :type: bool
+ """
+ self.__debug = value
+ if self.__debug:
+ # if debug status is True, turn on debug logging
+ for _, logger in six.iteritems(self.logger):
+ logger.setLevel(logging.DEBUG)
+ # turn on httplib debug
+ httplib.HTTPConnection.debuglevel = 1
+ else:
+ # if debug status is False, turn off debug logging,
+ # setting log level to default `logging.WARNING`
+ for _, logger in six.iteritems(self.logger):
+ logger.setLevel(logging.WARNING)
+ # turn off httplib debug
+ httplib.HTTPConnection.debuglevel = 0
+
+ @property
+ def logger_format(self):
+ """The logger format.
+
+ The logger_formatter will be updated when sets logger_format.
+
+ :param value: The format string.
+ :type: str
+ """
+ return self.__logger_format
+
+ @logger_format.setter
+ def logger_format(self, value):
+ """The logger format.
+
+ The logger_formatter will be updated when sets logger_format.
+
+ :param value: The format string.
+ :type: str
+ """
+ self.__logger_format = value
+ self.logger_formatter = logging.Formatter(self.__logger_format)
+
+ def get_api_key_with_prefix(self, identifier):
+ """Gets API key (with prefix if set).
+
+ :param identifier: The identifier of apiKey.
+ :return: The token for api key authentication.
+ """
+ if (self.api_key.get(identifier) and
+ self.api_key_prefix.get(identifier)):
+ return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501
+ elif self.api_key.get(identifier):
+ return self.api_key[identifier]
+
+ def get_basic_auth_token(self):
+ """Gets HTTP basic authentication header (string).
+
+ :return: The token for basic HTTP authentication.
+ """
+ return urllib3.util.make_headers(
+ basic_auth=self.username + ':' + self.password
+ ).get('authorization')
+
+ def auth_settings(self):
+ """Gets Auth Settings dict for api client.
+
+ :return: The Auth Settings information dict.
+ """
+ return {
+ 'apiKeySecurity':
+ {
+ 'type': 'api_key',
+ 'in': 'header',
+ 'key': 'X-DIGIKEY-Client-Id',
+ 'value': self.get_api_key_with_prefix('X-DIGIKEY-Client-Id')
+ },
+
+ 'oauth2AccessCodeSecurity':
+ {
+ 'type': 'oauth2',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': 'Bearer ' + self.access_token
+ },
+
+ }
+
+ def to_debug_report(self):
+ """Gets the essential information for debugging.
+
+ :return: The report for debugging.
+ """
+ return "Python SDK Debug Report:\n"\
+ "OS: {env}\n"\
+ "Python Version: {pyversion}\n"\
+ "Version of the API: suppliers-v1\n"\
+ "SDK Package Version: 0.1.0".\
+ format(env=sys.platform, pyversion=sys.version)
diff --git a/digikey/v3/marketplace/models/__init__.py b/digikey/v3/marketplace/models/__init__.py
new file mode 100644
index 0000000..0213f49
--- /dev/null
+++ b/digikey/v3/marketplace/models/__init__.py
@@ -0,0 +1,44 @@
+# coding: utf-8
+
+# flake8: noqa
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+from __future__ import absolute_import
+
+# import models into model package
+from digikey.v3.marketplace.models.accept_order_detail_error_result import AcceptOrderDetailErrorResult
+from digikey.v3.marketplace.models.accept_order_detail_errors_page import AcceptOrderDetailErrorsPage
+from digikey.v3.marketplace.models.accept_order_detail_model import AcceptOrderDetailModel
+from digikey.v3.marketplace.models.accept_order_details_command_body import AcceptOrderDetailsCommandBody
+from digikey.v3.marketplace.models.additional_field import AdditionalField
+from digikey.v3.marketplace.models.cancel_order_detail_error_result import CancelOrderDetailErrorResult
+from digikey.v3.marketplace.models.cancel_order_detail_errors_page import CancelOrderDetailErrorsPage
+from digikey.v3.marketplace.models.cancel_order_detail_model import CancelOrderDetailModel
+from digikey.v3.marketplace.models.cancel_order_details_command_body import CancelOrderDetailsCommandBody
+from digikey.v3.marketplace.models.contact_info import ContactInfo
+from digikey.v3.marketplace.models.customer import Customer
+from digikey.v3.marketplace.models.get_orders_page import GetOrdersPage
+from digikey.v3.marketplace.models.health_check_response import HealthCheckResponse
+from digikey.v3.marketplace.models.order import Order
+from digikey.v3.marketplace.models.order_cancellation import OrderCancellation
+from digikey.v3.marketplace.models.order_detail import OrderDetail
+from digikey.v3.marketplace.models.order_expanded import OrderExpanded
+from digikey.v3.marketplace.models.order_incident import OrderIncident
+from digikey.v3.marketplace.models.order_refund import OrderRefund
+from digikey.v3.marketplace.models.order_refund_item import OrderRefundItem
+from digikey.v3.marketplace.models.problem_details import ProblemDetails
+from digikey.v3.marketplace.models.ship_order_model import ShipOrderModel
+from digikey.v3.marketplace.models.shipping_tracking_info import ShippingTrackingInfo
+from digikey.v3.marketplace.models.shipping_tracking_information_model import ShippingTrackingInformationModel
+from digikey.v3.marketplace.models.update_order_additional_fields_command_body import UpdateOrderAdditionalFieldsCommandBody
+from digikey.v3.marketplace.models.update_order_additional_fields_error_result import UpdateOrderAdditionalFieldsErrorResult
+from digikey.v3.marketplace.models.update_order_additional_fields_errors_page import UpdateOrderAdditionalFieldsErrorsPage
diff --git a/digikey/v3/marketplace/models/accept_order_detail_error_result.py b/digikey/v3/marketplace/models/accept_order_detail_error_result.py
new file mode 100644
index 0000000..e757157
--- /dev/null
+++ b/digikey/v3/marketplace/models/accept_order_detail_error_result.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class AcceptOrderDetailErrorResult(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'error_message': 'str',
+ 'item': 'AcceptOrderDetailModel'
+ }
+
+ attribute_map = {
+ 'error_message': 'errorMessage',
+ 'item': 'item'
+ }
+
+ def __init__(self, error_message=None, item=None): # noqa: E501
+ """AcceptOrderDetailErrorResult - a model defined in Swagger""" # noqa: E501
+
+ self._error_message = None
+ self._item = None
+ self.discriminator = None
+
+ if error_message is not None:
+ self.error_message = error_message
+ if item is not None:
+ self.item = item
+
+ @property
+ def error_message(self):
+ """Gets the error_message of this AcceptOrderDetailErrorResult. # noqa: E501
+
+
+ :return: The error_message of this AcceptOrderDetailErrorResult. # noqa: E501
+ :rtype: str
+ """
+ return self._error_message
+
+ @error_message.setter
+ def error_message(self, error_message):
+ """Sets the error_message of this AcceptOrderDetailErrorResult.
+
+
+ :param error_message: The error_message of this AcceptOrderDetailErrorResult. # noqa: E501
+ :type: str
+ """
+
+ self._error_message = error_message
+
+ @property
+ def item(self):
+ """Gets the item of this AcceptOrderDetailErrorResult. # noqa: E501
+
+
+ :return: The item of this AcceptOrderDetailErrorResult. # noqa: E501
+ :rtype: AcceptOrderDetailModel
+ """
+ return self._item
+
+ @item.setter
+ def item(self, item):
+ """Sets the item of this AcceptOrderDetailErrorResult.
+
+
+ :param item: The item of this AcceptOrderDetailErrorResult. # noqa: E501
+ :type: AcceptOrderDetailModel
+ """
+
+ self._item = item
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(AcceptOrderDetailErrorResult, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, AcceptOrderDetailErrorResult):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/accept_order_detail_errors_page.py b/digikey/v3/marketplace/models/accept_order_detail_errors_page.py
new file mode 100644
index 0000000..7dd8385
--- /dev/null
+++ b/digikey/v3/marketplace/models/accept_order_detail_errors_page.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class AcceptOrderDetailErrorsPage(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'errors': 'list[AcceptOrderDetailErrorResult]',
+ 'error_count': 'int'
+ }
+
+ attribute_map = {
+ 'errors': 'errors',
+ 'error_count': 'errorCount'
+ }
+
+ def __init__(self, errors=None, error_count=None): # noqa: E501
+ """AcceptOrderDetailErrorsPage - a model defined in Swagger""" # noqa: E501
+
+ self._errors = None
+ self._error_count = None
+ self.discriminator = None
+
+ if errors is not None:
+ self.errors = errors
+ if error_count is not None:
+ self.error_count = error_count
+
+ @property
+ def errors(self):
+ """Gets the errors of this AcceptOrderDetailErrorsPage. # noqa: E501
+
+
+ :return: The errors of this AcceptOrderDetailErrorsPage. # noqa: E501
+ :rtype: list[AcceptOrderDetailErrorResult]
+ """
+ return self._errors
+
+ @errors.setter
+ def errors(self, errors):
+ """Sets the errors of this AcceptOrderDetailErrorsPage.
+
+
+ :param errors: The errors of this AcceptOrderDetailErrorsPage. # noqa: E501
+ :type: list[AcceptOrderDetailErrorResult]
+ """
+
+ self._errors = errors
+
+ @property
+ def error_count(self):
+ """Gets the error_count of this AcceptOrderDetailErrorsPage. # noqa: E501
+
+
+ :return: The error_count of this AcceptOrderDetailErrorsPage. # noqa: E501
+ :rtype: int
+ """
+ return self._error_count
+
+ @error_count.setter
+ def error_count(self, error_count):
+ """Sets the error_count of this AcceptOrderDetailErrorsPage.
+
+
+ :param error_count: The error_count of this AcceptOrderDetailErrorsPage. # noqa: E501
+ :type: int
+ """
+
+ self._error_count = error_count
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(AcceptOrderDetailErrorsPage, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, AcceptOrderDetailErrorsPage):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/accept_order_detail_model.py b/digikey/v3/marketplace/models/accept_order_detail_model.py
new file mode 100644
index 0000000..9d23dab
--- /dev/null
+++ b/digikey/v3/marketplace/models/accept_order_detail_model.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class AcceptOrderDetailModel(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'order_detail_id': 'str',
+ 'accepted': 'bool'
+ }
+
+ attribute_map = {
+ 'order_detail_id': 'orderDetailId',
+ 'accepted': 'accepted'
+ }
+
+ def __init__(self, order_detail_id=None, accepted=None): # noqa: E501
+ """AcceptOrderDetailModel - a model defined in Swagger""" # noqa: E501
+
+ self._order_detail_id = None
+ self._accepted = None
+ self.discriminator = None
+
+ if order_detail_id is not None:
+ self.order_detail_id = order_detail_id
+ if accepted is not None:
+ self.accepted = accepted
+
+ @property
+ def order_detail_id(self):
+ """Gets the order_detail_id of this AcceptOrderDetailModel. # noqa: E501
+
+
+ :return: The order_detail_id of this AcceptOrderDetailModel. # noqa: E501
+ :rtype: str
+ """
+ return self._order_detail_id
+
+ @order_detail_id.setter
+ def order_detail_id(self, order_detail_id):
+ """Sets the order_detail_id of this AcceptOrderDetailModel.
+
+
+ :param order_detail_id: The order_detail_id of this AcceptOrderDetailModel. # noqa: E501
+ :type: str
+ """
+
+ self._order_detail_id = order_detail_id
+
+ @property
+ def accepted(self):
+ """Gets the accepted of this AcceptOrderDetailModel. # noqa: E501
+
+
+ :return: The accepted of this AcceptOrderDetailModel. # noqa: E501
+ :rtype: bool
+ """
+ return self._accepted
+
+ @accepted.setter
+ def accepted(self, accepted):
+ """Sets the accepted of this AcceptOrderDetailModel.
+
+
+ :param accepted: The accepted of this AcceptOrderDetailModel. # noqa: E501
+ :type: bool
+ """
+
+ self._accepted = accepted
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(AcceptOrderDetailModel, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, AcceptOrderDetailModel):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/accept_order_details_command_body.py b/digikey/v3/marketplace/models/accept_order_details_command_body.py
new file mode 100644
index 0000000..46041e1
--- /dev/null
+++ b/digikey/v3/marketplace/models/accept_order_details_command_body.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class AcceptOrderDetailsCommandBody(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'accept_order_details': 'list[AcceptOrderDetailModel]'
+ }
+
+ attribute_map = {
+ 'accept_order_details': 'acceptOrderDetails'
+ }
+
+ def __init__(self, accept_order_details=None): # noqa: E501
+ """AcceptOrderDetailsCommandBody - a model defined in Swagger""" # noqa: E501
+
+ self._accept_order_details = None
+ self.discriminator = None
+
+ self.accept_order_details = accept_order_details
+
+ @property
+ def accept_order_details(self):
+ """Gets the accept_order_details of this AcceptOrderDetailsCommandBody. # noqa: E501
+
+
+ :return: The accept_order_details of this AcceptOrderDetailsCommandBody. # noqa: E501
+ :rtype: list[AcceptOrderDetailModel]
+ """
+ return self._accept_order_details
+
+ @accept_order_details.setter
+ def accept_order_details(self, accept_order_details):
+ """Sets the accept_order_details of this AcceptOrderDetailsCommandBody.
+
+
+ :param accept_order_details: The accept_order_details of this AcceptOrderDetailsCommandBody. # noqa: E501
+ :type: list[AcceptOrderDetailModel]
+ """
+ if accept_order_details is None:
+ raise ValueError("Invalid value for `accept_order_details`, must not be `None`") # noqa: E501
+
+ self._accept_order_details = accept_order_details
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(AcceptOrderDetailsCommandBody, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, AcceptOrderDetailsCommandBody):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/additional_field.py b/digikey/v3/marketplace/models/additional_field.py
new file mode 100644
index 0000000..6bab6da
--- /dev/null
+++ b/digikey/v3/marketplace/models/additional_field.py
@@ -0,0 +1,176 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class AdditionalField(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'type': 'str',
+ 'value': 'object',
+ 'code': 'str'
+ }
+
+ attribute_map = {
+ 'type': 'type',
+ 'value': 'value',
+ 'code': 'code'
+ }
+
+ def __init__(self, type=None, value=None, code=None): # noqa: E501
+ """AdditionalField - a model defined in Swagger""" # noqa: E501
+
+ self._type = None
+ self._value = None
+ self._code = None
+ self.discriminator = None
+
+ self.type = type
+ self.value = value
+ self.code = code
+
+ @property
+ def type(self):
+ """Gets the type of this AdditionalField. # noqa: E501
+
+
+ :return: The type of this AdditionalField. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this AdditionalField.
+
+
+ :param type: The type of this AdditionalField. # noqa: E501
+ :type: str
+ """
+ if type is None:
+ raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
+ allowed_values = ["String", "Int", "Long", "Double", "Decimal", "Bool", "Date"] # noqa: E501
+ if type not in allowed_values:
+ raise ValueError(
+ "Invalid value for `type` ({0}), must be one of {1}" # noqa: E501
+ .format(type, allowed_values)
+ )
+
+ self._type = type
+
+ @property
+ def value(self):
+ """Gets the value of this AdditionalField. # noqa: E501
+
+
+ :return: The value of this AdditionalField. # noqa: E501
+ :rtype: object
+ """
+ return self._value
+
+ @value.setter
+ def value(self, value):
+ """Sets the value of this AdditionalField.
+
+
+ :param value: The value of this AdditionalField. # noqa: E501
+ :type: object
+ """
+ if value is None:
+ raise ValueError("Invalid value for `value`, must not be `None`") # noqa: E501
+
+ self._value = value
+
+ @property
+ def code(self):
+ """Gets the code of this AdditionalField. # noqa: E501
+
+
+ :return: The code of this AdditionalField. # noqa: E501
+ :rtype: str
+ """
+ return self._code
+
+ @code.setter
+ def code(self, code):
+ """Sets the code of this AdditionalField.
+
+
+ :param code: The code of this AdditionalField. # noqa: E501
+ :type: str
+ """
+ if code is None:
+ raise ValueError("Invalid value for `code`, must not be `None`") # noqa: E501
+
+ self._code = code
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(AdditionalField, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, AdditionalField):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/cancel_order_detail_error_result.py b/digikey/v3/marketplace/models/cancel_order_detail_error_result.py
new file mode 100644
index 0000000..b8b3831
--- /dev/null
+++ b/digikey/v3/marketplace/models/cancel_order_detail_error_result.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class CancelOrderDetailErrorResult(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'error_message': 'str',
+ 'item': 'CancelOrderDetailModel'
+ }
+
+ attribute_map = {
+ 'error_message': 'errorMessage',
+ 'item': 'item'
+ }
+
+ def __init__(self, error_message=None, item=None): # noqa: E501
+ """CancelOrderDetailErrorResult - a model defined in Swagger""" # noqa: E501
+
+ self._error_message = None
+ self._item = None
+ self.discriminator = None
+
+ if error_message is not None:
+ self.error_message = error_message
+ if item is not None:
+ self.item = item
+
+ @property
+ def error_message(self):
+ """Gets the error_message of this CancelOrderDetailErrorResult. # noqa: E501
+
+
+ :return: The error_message of this CancelOrderDetailErrorResult. # noqa: E501
+ :rtype: str
+ """
+ return self._error_message
+
+ @error_message.setter
+ def error_message(self, error_message):
+ """Sets the error_message of this CancelOrderDetailErrorResult.
+
+
+ :param error_message: The error_message of this CancelOrderDetailErrorResult. # noqa: E501
+ :type: str
+ """
+
+ self._error_message = error_message
+
+ @property
+ def item(self):
+ """Gets the item of this CancelOrderDetailErrorResult. # noqa: E501
+
+
+ :return: The item of this CancelOrderDetailErrorResult. # noqa: E501
+ :rtype: CancelOrderDetailModel
+ """
+ return self._item
+
+ @item.setter
+ def item(self, item):
+ """Sets the item of this CancelOrderDetailErrorResult.
+
+
+ :param item: The item of this CancelOrderDetailErrorResult. # noqa: E501
+ :type: CancelOrderDetailModel
+ """
+
+ self._item = item
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(CancelOrderDetailErrorResult, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CancelOrderDetailErrorResult):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/cancel_order_detail_errors_page.py b/digikey/v3/marketplace/models/cancel_order_detail_errors_page.py
new file mode 100644
index 0000000..2247967
--- /dev/null
+++ b/digikey/v3/marketplace/models/cancel_order_detail_errors_page.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class CancelOrderDetailErrorsPage(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'errors': 'list[CancelOrderDetailErrorResult]',
+ 'error_count': 'int'
+ }
+
+ attribute_map = {
+ 'errors': 'errors',
+ 'error_count': 'errorCount'
+ }
+
+ def __init__(self, errors=None, error_count=None): # noqa: E501
+ """CancelOrderDetailErrorsPage - a model defined in Swagger""" # noqa: E501
+
+ self._errors = None
+ self._error_count = None
+ self.discriminator = None
+
+ if errors is not None:
+ self.errors = errors
+ if error_count is not None:
+ self.error_count = error_count
+
+ @property
+ def errors(self):
+ """Gets the errors of this CancelOrderDetailErrorsPage. # noqa: E501
+
+
+ :return: The errors of this CancelOrderDetailErrorsPage. # noqa: E501
+ :rtype: list[CancelOrderDetailErrorResult]
+ """
+ return self._errors
+
+ @errors.setter
+ def errors(self, errors):
+ """Sets the errors of this CancelOrderDetailErrorsPage.
+
+
+ :param errors: The errors of this CancelOrderDetailErrorsPage. # noqa: E501
+ :type: list[CancelOrderDetailErrorResult]
+ """
+
+ self._errors = errors
+
+ @property
+ def error_count(self):
+ """Gets the error_count of this CancelOrderDetailErrorsPage. # noqa: E501
+
+
+ :return: The error_count of this CancelOrderDetailErrorsPage. # noqa: E501
+ :rtype: int
+ """
+ return self._error_count
+
+ @error_count.setter
+ def error_count(self, error_count):
+ """Sets the error_count of this CancelOrderDetailErrorsPage.
+
+
+ :param error_count: The error_count of this CancelOrderDetailErrorsPage. # noqa: E501
+ :type: int
+ """
+
+ self._error_count = error_count
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(CancelOrderDetailErrorsPage, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CancelOrderDetailErrorsPage):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/cancel_order_detail_model.py b/digikey/v3/marketplace/models/cancel_order_detail_model.py
new file mode 100644
index 0000000..14f6c91
--- /dev/null
+++ b/digikey/v3/marketplace/models/cancel_order_detail_model.py
@@ -0,0 +1,167 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class CancelOrderDetailModel(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'order_detail_id': 'str',
+ 'cancellation_reason_code': 'str',
+ 'quantity': 'int'
+ }
+
+ attribute_map = {
+ 'order_detail_id': 'orderDetailId',
+ 'cancellation_reason_code': 'cancellationReasonCode',
+ 'quantity': 'quantity'
+ }
+
+ def __init__(self, order_detail_id=None, cancellation_reason_code=None, quantity=None): # noqa: E501
+ """CancelOrderDetailModel - a model defined in Swagger""" # noqa: E501
+
+ self._order_detail_id = None
+ self._cancellation_reason_code = None
+ self._quantity = None
+ self.discriminator = None
+
+ if order_detail_id is not None:
+ self.order_detail_id = order_detail_id
+ if cancellation_reason_code is not None:
+ self.cancellation_reason_code = cancellation_reason_code
+ if quantity is not None:
+ self.quantity = quantity
+
+ @property
+ def order_detail_id(self):
+ """Gets the order_detail_id of this CancelOrderDetailModel. # noqa: E501
+
+
+ :return: The order_detail_id of this CancelOrderDetailModel. # noqa: E501
+ :rtype: str
+ """
+ return self._order_detail_id
+
+ @order_detail_id.setter
+ def order_detail_id(self, order_detail_id):
+ """Sets the order_detail_id of this CancelOrderDetailModel.
+
+
+ :param order_detail_id: The order_detail_id of this CancelOrderDetailModel. # noqa: E501
+ :type: str
+ """
+
+ self._order_detail_id = order_detail_id
+
+ @property
+ def cancellation_reason_code(self):
+ """Gets the cancellation_reason_code of this CancelOrderDetailModel. # noqa: E501
+
+
+ :return: The cancellation_reason_code of this CancelOrderDetailModel. # noqa: E501
+ :rtype: str
+ """
+ return self._cancellation_reason_code
+
+ @cancellation_reason_code.setter
+ def cancellation_reason_code(self, cancellation_reason_code):
+ """Sets the cancellation_reason_code of this CancelOrderDetailModel.
+
+
+ :param cancellation_reason_code: The cancellation_reason_code of this CancelOrderDetailModel. # noqa: E501
+ :type: str
+ """
+
+ self._cancellation_reason_code = cancellation_reason_code
+
+ @property
+ def quantity(self):
+ """Gets the quantity of this CancelOrderDetailModel. # noqa: E501
+
+
+ :return: The quantity of this CancelOrderDetailModel. # noqa: E501
+ :rtype: int
+ """
+ return self._quantity
+
+ @quantity.setter
+ def quantity(self, quantity):
+ """Sets the quantity of this CancelOrderDetailModel.
+
+
+ :param quantity: The quantity of this CancelOrderDetailModel. # noqa: E501
+ :type: int
+ """
+
+ self._quantity = quantity
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(CancelOrderDetailModel, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CancelOrderDetailModel):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/cancel_order_details_command_body.py b/digikey/v3/marketplace/models/cancel_order_details_command_body.py
new file mode 100644
index 0000000..d39de81
--- /dev/null
+++ b/digikey/v3/marketplace/models/cancel_order_details_command_body.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class CancelOrderDetailsCommandBody(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'cancel_order_details': 'list[CancelOrderDetailModel]'
+ }
+
+ attribute_map = {
+ 'cancel_order_details': 'cancelOrderDetails'
+ }
+
+ def __init__(self, cancel_order_details=None): # noqa: E501
+ """CancelOrderDetailsCommandBody - a model defined in Swagger""" # noqa: E501
+
+ self._cancel_order_details = None
+ self.discriminator = None
+
+ self.cancel_order_details = cancel_order_details
+
+ @property
+ def cancel_order_details(self):
+ """Gets the cancel_order_details of this CancelOrderDetailsCommandBody. # noqa: E501
+
+
+ :return: The cancel_order_details of this CancelOrderDetailsCommandBody. # noqa: E501
+ :rtype: list[CancelOrderDetailModel]
+ """
+ return self._cancel_order_details
+
+ @cancel_order_details.setter
+ def cancel_order_details(self, cancel_order_details):
+ """Sets the cancel_order_details of this CancelOrderDetailsCommandBody.
+
+
+ :param cancel_order_details: The cancel_order_details of this CancelOrderDetailsCommandBody. # noqa: E501
+ :type: list[CancelOrderDetailModel]
+ """
+ if cancel_order_details is None:
+ raise ValueError("Invalid value for `cancel_order_details`, must not be `None`") # noqa: E501
+
+ self._cancel_order_details = cancel_order_details
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(CancelOrderDetailsCommandBody, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CancelOrderDetailsCommandBody):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/contact_info.py b/digikey/v3/marketplace/models/contact_info.py
new file mode 100644
index 0000000..bcd5890
--- /dev/null
+++ b/digikey/v3/marketplace/models/contact_info.py
@@ -0,0 +1,527 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ContactInfo(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'name': 'str',
+ 'phone_number': 'str',
+ 'alternate_phone_number': 'str',
+ 'email_address': 'str',
+ 'fax_number': 'str',
+ 'street1': 'str',
+ 'street2': 'str',
+ 'street3': 'str',
+ 'city': 'str',
+ 'state': 'str',
+ 'country_code': 'str',
+ 'postal_code': 'str',
+ 'first_name': 'str',
+ 'last_name': 'str',
+ 'company_name': 'str',
+ 'title': 'str'
+ }
+
+ attribute_map = {
+ 'name': 'name',
+ 'phone_number': 'phoneNumber',
+ 'alternate_phone_number': 'alternatePhoneNumber',
+ 'email_address': 'emailAddress',
+ 'fax_number': 'faxNumber',
+ 'street1': 'street1',
+ 'street2': 'street2',
+ 'street3': 'street3',
+ 'city': 'city',
+ 'state': 'state',
+ 'country_code': 'countryCode',
+ 'postal_code': 'postalCode',
+ 'first_name': 'firstName',
+ 'last_name': 'lastName',
+ 'company_name': 'companyName',
+ 'title': 'title'
+ }
+
+ def __init__(self, name=None, phone_number=None, alternate_phone_number=None, email_address=None, fax_number=None, street1=None, street2=None, street3=None, city=None, state=None, country_code=None, postal_code=None, first_name=None, last_name=None, company_name=None, title=None): # noqa: E501
+ """ContactInfo - a model defined in Swagger""" # noqa: E501
+
+ self._name = None
+ self._phone_number = None
+ self._alternate_phone_number = None
+ self._email_address = None
+ self._fax_number = None
+ self._street1 = None
+ self._street2 = None
+ self._street3 = None
+ self._city = None
+ self._state = None
+ self._country_code = None
+ self._postal_code = None
+ self._first_name = None
+ self._last_name = None
+ self._company_name = None
+ self._title = None
+ self.discriminator = None
+
+ if name is not None:
+ self.name = name
+ if phone_number is not None:
+ self.phone_number = phone_number
+ if alternate_phone_number is not None:
+ self.alternate_phone_number = alternate_phone_number
+ if email_address is not None:
+ self.email_address = email_address
+ if fax_number is not None:
+ self.fax_number = fax_number
+ if street1 is not None:
+ self.street1 = street1
+ if street2 is not None:
+ self.street2 = street2
+ if street3 is not None:
+ self.street3 = street3
+ if city is not None:
+ self.city = city
+ if state is not None:
+ self.state = state
+ if country_code is not None:
+ self.country_code = country_code
+ if postal_code is not None:
+ self.postal_code = postal_code
+ if first_name is not None:
+ self.first_name = first_name
+ if last_name is not None:
+ self.last_name = last_name
+ if company_name is not None:
+ self.company_name = company_name
+ if title is not None:
+ self.title = title
+
+ @property
+ def name(self):
+ """Gets the name of this ContactInfo. # noqa: E501
+
+
+ :return: The name of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this ContactInfo.
+
+
+ :param name: The name of this ContactInfo. # noqa: E501
+ :type: str
+ """
+
+ self._name = name
+
+ @property
+ def phone_number(self):
+ """Gets the phone_number of this ContactInfo. # noqa: E501
+
+
+ :return: The phone_number of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._phone_number
+
+ @phone_number.setter
+ def phone_number(self, phone_number):
+ """Sets the phone_number of this ContactInfo.
+
+
+ :param phone_number: The phone_number of this ContactInfo. # noqa: E501
+ :type: str
+ """
+ if phone_number is not None and len(phone_number) > 20:
+ raise ValueError("Invalid value for `phone_number`, length must be less than or equal to `20`") # noqa: E501
+
+ self._phone_number = phone_number
+
+ @property
+ def alternate_phone_number(self):
+ """Gets the alternate_phone_number of this ContactInfo. # noqa: E501
+
+
+ :return: The alternate_phone_number of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._alternate_phone_number
+
+ @alternate_phone_number.setter
+ def alternate_phone_number(self, alternate_phone_number):
+ """Sets the alternate_phone_number of this ContactInfo.
+
+
+ :param alternate_phone_number: The alternate_phone_number of this ContactInfo. # noqa: E501
+ :type: str
+ """
+ if alternate_phone_number is not None and len(alternate_phone_number) > 20:
+ raise ValueError("Invalid value for `alternate_phone_number`, length must be less than or equal to `20`") # noqa: E501
+
+ self._alternate_phone_number = alternate_phone_number
+
+ @property
+ def email_address(self):
+ """Gets the email_address of this ContactInfo. # noqa: E501
+
+
+ :return: The email_address of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._email_address
+
+ @email_address.setter
+ def email_address(self, email_address):
+ """Sets the email_address of this ContactInfo.
+
+
+ :param email_address: The email_address of this ContactInfo. # noqa: E501
+ :type: str
+ """
+ if email_address is not None and len(email_address) > 150:
+ raise ValueError("Invalid value for `email_address`, length must be less than or equal to `150`") # noqa: E501
+
+ self._email_address = email_address
+
+ @property
+ def fax_number(self):
+ """Gets the fax_number of this ContactInfo. # noqa: E501
+
+
+ :return: The fax_number of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._fax_number
+
+ @fax_number.setter
+ def fax_number(self, fax_number):
+ """Sets the fax_number of this ContactInfo.
+
+
+ :param fax_number: The fax_number of this ContactInfo. # noqa: E501
+ :type: str
+ """
+ if fax_number is not None and len(fax_number) > 20:
+ raise ValueError("Invalid value for `fax_number`, length must be less than or equal to `20`") # noqa: E501
+
+ self._fax_number = fax_number
+
+ @property
+ def street1(self):
+ """Gets the street1 of this ContactInfo. # noqa: E501
+
+
+ :return: The street1 of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._street1
+
+ @street1.setter
+ def street1(self, street1):
+ """Sets the street1 of this ContactInfo.
+
+
+ :param street1: The street1 of this ContactInfo. # noqa: E501
+ :type: str
+ """
+ if street1 is not None and len(street1) > 50:
+ raise ValueError("Invalid value for `street1`, length must be less than or equal to `50`") # noqa: E501
+
+ self._street1 = street1
+
+ @property
+ def street2(self):
+ """Gets the street2 of this ContactInfo. # noqa: E501
+
+
+ :return: The street2 of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._street2
+
+ @street2.setter
+ def street2(self, street2):
+ """Sets the street2 of this ContactInfo.
+
+
+ :param street2: The street2 of this ContactInfo. # noqa: E501
+ :type: str
+ """
+ if street2 is not None and len(street2) > 80:
+ raise ValueError("Invalid value for `street2`, length must be less than or equal to `80`") # noqa: E501
+
+ self._street2 = street2
+
+ @property
+ def street3(self):
+ """Gets the street3 of this ContactInfo. # noqa: E501
+
+
+ :return: The street3 of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._street3
+
+ @street3.setter
+ def street3(self, street3):
+ """Sets the street3 of this ContactInfo.
+
+
+ :param street3: The street3 of this ContactInfo. # noqa: E501
+ :type: str
+ """
+ if street3 is not None and len(street3) > 50:
+ raise ValueError("Invalid value for `street3`, length must be less than or equal to `50`") # noqa: E501
+
+ self._street3 = street3
+
+ @property
+ def city(self):
+ """Gets the city of this ContactInfo. # noqa: E501
+
+
+ :return: The city of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._city
+
+ @city.setter
+ def city(self, city):
+ """Sets the city of this ContactInfo.
+
+
+ :param city: The city of this ContactInfo. # noqa: E501
+ :type: str
+ """
+ if city is not None and len(city) > 50:
+ raise ValueError("Invalid value for `city`, length must be less than or equal to `50`") # noqa: E501
+
+ self._city = city
+
+ @property
+ def state(self):
+ """Gets the state of this ContactInfo. # noqa: E501
+
+
+ :return: The state of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._state
+
+ @state.setter
+ def state(self, state):
+ """Sets the state of this ContactInfo.
+
+
+ :param state: The state of this ContactInfo. # noqa: E501
+ :type: str
+ """
+
+ self._state = state
+
+ @property
+ def country_code(self):
+ """Gets the country_code of this ContactInfo. # noqa: E501
+
+
+ :return: The country_code of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._country_code
+
+ @country_code.setter
+ def country_code(self, country_code):
+ """Sets the country_code of this ContactInfo.
+
+
+ :param country_code: The country_code of this ContactInfo. # noqa: E501
+ :type: str
+ """
+ if country_code is not None and len(country_code) > 3:
+ raise ValueError("Invalid value for `country_code`, length must be less than or equal to `3`") # noqa: E501
+
+ self._country_code = country_code
+
+ @property
+ def postal_code(self):
+ """Gets the postal_code of this ContactInfo. # noqa: E501
+
+
+ :return: The postal_code of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._postal_code
+
+ @postal_code.setter
+ def postal_code(self, postal_code):
+ """Sets the postal_code of this ContactInfo.
+
+
+ :param postal_code: The postal_code of this ContactInfo. # noqa: E501
+ :type: str
+ """
+ if postal_code is not None and len(postal_code) > 12:
+ raise ValueError("Invalid value for `postal_code`, length must be less than or equal to `12`") # noqa: E501
+
+ self._postal_code = postal_code
+
+ @property
+ def first_name(self):
+ """Gets the first_name of this ContactInfo. # noqa: E501
+
+
+ :return: The first_name of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._first_name
+
+ @first_name.setter
+ def first_name(self, first_name):
+ """Sets the first_name of this ContactInfo.
+
+
+ :param first_name: The first_name of this ContactInfo. # noqa: E501
+ :type: str
+ """
+
+ self._first_name = first_name
+
+ @property
+ def last_name(self):
+ """Gets the last_name of this ContactInfo. # noqa: E501
+
+
+ :return: The last_name of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._last_name
+
+ @last_name.setter
+ def last_name(self, last_name):
+ """Sets the last_name of this ContactInfo.
+
+
+ :param last_name: The last_name of this ContactInfo. # noqa: E501
+ :type: str
+ """
+
+ self._last_name = last_name
+
+ @property
+ def company_name(self):
+ """Gets the company_name of this ContactInfo. # noqa: E501
+
+
+ :return: The company_name of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._company_name
+
+ @company_name.setter
+ def company_name(self, company_name):
+ """Sets the company_name of this ContactInfo.
+
+
+ :param company_name: The company_name of this ContactInfo. # noqa: E501
+ :type: str
+ """
+ if company_name is not None and len(company_name) > 50:
+ raise ValueError("Invalid value for `company_name`, length must be less than or equal to `50`") # noqa: E501
+
+ self._company_name = company_name
+
+ @property
+ def title(self):
+ """Gets the title of this ContactInfo. # noqa: E501
+
+
+ :return: The title of this ContactInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._title
+
+ @title.setter
+ def title(self, title):
+ """Sets the title of this ContactInfo.
+
+
+ :param title: The title of this ContactInfo. # noqa: E501
+ :type: str
+ """
+
+ self._title = title
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(ContactInfo, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ContactInfo):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/customer.py b/digikey/v3/marketplace/models/customer.py
new file mode 100644
index 0000000..018aea6
--- /dev/null
+++ b/digikey/v3/marketplace/models/customer.py
@@ -0,0 +1,245 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Customer(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'customer_id': 'str',
+ 'first_name': 'str',
+ 'last_name': 'str',
+ 'customer_email': 'str',
+ 'billing_address': 'ContactInfo',
+ 'shipping_address': 'ContactInfo'
+ }
+
+ attribute_map = {
+ 'customer_id': 'customerId',
+ 'first_name': 'firstName',
+ 'last_name': 'lastName',
+ 'customer_email': 'customerEmail',
+ 'billing_address': 'billingAddress',
+ 'shipping_address': 'shippingAddress'
+ }
+
+ def __init__(self, customer_id=None, first_name=None, last_name=None, customer_email=None, billing_address=None, shipping_address=None): # noqa: E501
+ """Customer - a model defined in Swagger""" # noqa: E501
+
+ self._customer_id = None
+ self._first_name = None
+ self._last_name = None
+ self._customer_email = None
+ self._billing_address = None
+ self._shipping_address = None
+ self.discriminator = None
+
+ if customer_id is not None:
+ self.customer_id = customer_id
+ if first_name is not None:
+ self.first_name = first_name
+ if last_name is not None:
+ self.last_name = last_name
+ if customer_email is not None:
+ self.customer_email = customer_email
+ if billing_address is not None:
+ self.billing_address = billing_address
+ if shipping_address is not None:
+ self.shipping_address = shipping_address
+
+ @property
+ def customer_id(self):
+ """Gets the customer_id of this Customer. # noqa: E501
+
+
+ :return: The customer_id of this Customer. # noqa: E501
+ :rtype: str
+ """
+ return self._customer_id
+
+ @customer_id.setter
+ def customer_id(self, customer_id):
+ """Sets the customer_id of this Customer.
+
+
+ :param customer_id: The customer_id of this Customer. # noqa: E501
+ :type: str
+ """
+
+ self._customer_id = customer_id
+
+ @property
+ def first_name(self):
+ """Gets the first_name of this Customer. # noqa: E501
+
+
+ :return: The first_name of this Customer. # noqa: E501
+ :rtype: str
+ """
+ return self._first_name
+
+ @first_name.setter
+ def first_name(self, first_name):
+ """Sets the first_name of this Customer.
+
+
+ :param first_name: The first_name of this Customer. # noqa: E501
+ :type: str
+ """
+
+ self._first_name = first_name
+
+ @property
+ def last_name(self):
+ """Gets the last_name of this Customer. # noqa: E501
+
+
+ :return: The last_name of this Customer. # noqa: E501
+ :rtype: str
+ """
+ return self._last_name
+
+ @last_name.setter
+ def last_name(self, last_name):
+ """Sets the last_name of this Customer.
+
+
+ :param last_name: The last_name of this Customer. # noqa: E501
+ :type: str
+ """
+
+ self._last_name = last_name
+
+ @property
+ def customer_email(self):
+ """Gets the customer_email of this Customer. # noqa: E501
+
+
+ :return: The customer_email of this Customer. # noqa: E501
+ :rtype: str
+ """
+ return self._customer_email
+
+ @customer_email.setter
+ def customer_email(self, customer_email):
+ """Sets the customer_email of this Customer.
+
+
+ :param customer_email: The customer_email of this Customer. # noqa: E501
+ :type: str
+ """
+
+ self._customer_email = customer_email
+
+ @property
+ def billing_address(self):
+ """Gets the billing_address of this Customer. # noqa: E501
+
+
+ :return: The billing_address of this Customer. # noqa: E501
+ :rtype: ContactInfo
+ """
+ return self._billing_address
+
+ @billing_address.setter
+ def billing_address(self, billing_address):
+ """Sets the billing_address of this Customer.
+
+
+ :param billing_address: The billing_address of this Customer. # noqa: E501
+ :type: ContactInfo
+ """
+
+ self._billing_address = billing_address
+
+ @property
+ def shipping_address(self):
+ """Gets the shipping_address of this Customer. # noqa: E501
+
+
+ :return: The shipping_address of this Customer. # noqa: E501
+ :rtype: ContactInfo
+ """
+ return self._shipping_address
+
+ @shipping_address.setter
+ def shipping_address(self, shipping_address):
+ """Sets the shipping_address of this Customer.
+
+
+ :param shipping_address: The shipping_address of this Customer. # noqa: E501
+ :type: ContactInfo
+ """
+
+ self._shipping_address = shipping_address
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(Customer, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Customer):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/get_orders_page.py b/digikey/v3/marketplace/models/get_orders_page.py
new file mode 100644
index 0000000..9cb9ffc
--- /dev/null
+++ b/digikey/v3/marketplace/models/get_orders_page.py
@@ -0,0 +1,167 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class GetOrdersPage(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'orders': 'list[OrderExpanded]',
+ 'total_count': 'int',
+ 'total_sales': 'float'
+ }
+
+ attribute_map = {
+ 'orders': 'orders',
+ 'total_count': 'totalCount',
+ 'total_sales': 'totalSales'
+ }
+
+ def __init__(self, orders=None, total_count=None, total_sales=None): # noqa: E501
+ """GetOrdersPage - a model defined in Swagger""" # noqa: E501
+
+ self._orders = None
+ self._total_count = None
+ self._total_sales = None
+ self.discriminator = None
+
+ if orders is not None:
+ self.orders = orders
+ if total_count is not None:
+ self.total_count = total_count
+ if total_sales is not None:
+ self.total_sales = total_sales
+
+ @property
+ def orders(self):
+ """Gets the orders of this GetOrdersPage. # noqa: E501
+
+
+ :return: The orders of this GetOrdersPage. # noqa: E501
+ :rtype: list[OrderExpanded]
+ """
+ return self._orders
+
+ @orders.setter
+ def orders(self, orders):
+ """Sets the orders of this GetOrdersPage.
+
+
+ :param orders: The orders of this GetOrdersPage. # noqa: E501
+ :type: list[OrderExpanded]
+ """
+
+ self._orders = orders
+
+ @property
+ def total_count(self):
+ """Gets the total_count of this GetOrdersPage. # noqa: E501
+
+
+ :return: The total_count of this GetOrdersPage. # noqa: E501
+ :rtype: int
+ """
+ return self._total_count
+
+ @total_count.setter
+ def total_count(self, total_count):
+ """Sets the total_count of this GetOrdersPage.
+
+
+ :param total_count: The total_count of this GetOrdersPage. # noqa: E501
+ :type: int
+ """
+
+ self._total_count = total_count
+
+ @property
+ def total_sales(self):
+ """Gets the total_sales of this GetOrdersPage. # noqa: E501
+
+
+ :return: The total_sales of this GetOrdersPage. # noqa: E501
+ :rtype: float
+ """
+ return self._total_sales
+
+ @total_sales.setter
+ def total_sales(self, total_sales):
+ """Sets the total_sales of this GetOrdersPage.
+
+
+ :param total_sales: The total_sales of this GetOrdersPage. # noqa: E501
+ :type: float
+ """
+
+ self._total_sales = total_sales
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(GetOrdersPage, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, GetOrdersPage):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/health_check_response.py b/digikey/v3/marketplace/models/health_check_response.py
new file mode 100644
index 0000000..a754564
--- /dev/null
+++ b/digikey/v3/marketplace/models/health_check_response.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class HealthCheckResponse(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'healthy': 'bool',
+ 'timestamp_utc': 'datetime'
+ }
+
+ attribute_map = {
+ 'healthy': 'healthy',
+ 'timestamp_utc': 'timestampUtc'
+ }
+
+ def __init__(self, healthy=None, timestamp_utc=None): # noqa: E501
+ """HealthCheckResponse - a model defined in Swagger""" # noqa: E501
+
+ self._healthy = None
+ self._timestamp_utc = None
+ self.discriminator = None
+
+ if healthy is not None:
+ self.healthy = healthy
+ if timestamp_utc is not None:
+ self.timestamp_utc = timestamp_utc
+
+ @property
+ def healthy(self):
+ """Gets the healthy of this HealthCheckResponse. # noqa: E501
+
+
+ :return: The healthy of this HealthCheckResponse. # noqa: E501
+ :rtype: bool
+ """
+ return self._healthy
+
+ @healthy.setter
+ def healthy(self, healthy):
+ """Sets the healthy of this HealthCheckResponse.
+
+
+ :param healthy: The healthy of this HealthCheckResponse. # noqa: E501
+ :type: bool
+ """
+
+ self._healthy = healthy
+
+ @property
+ def timestamp_utc(self):
+ """Gets the timestamp_utc of this HealthCheckResponse. # noqa: E501
+
+
+ :return: The timestamp_utc of this HealthCheckResponse. # noqa: E501
+ :rtype: datetime
+ """
+ return self._timestamp_utc
+
+ @timestamp_utc.setter
+ def timestamp_utc(self, timestamp_utc):
+ """Sets the timestamp_utc of this HealthCheckResponse.
+
+
+ :param timestamp_utc: The timestamp_utc of this HealthCheckResponse. # noqa: E501
+ :type: datetime
+ """
+
+ self._timestamp_utc = timestamp_utc
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(HealthCheckResponse, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, HealthCheckResponse):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/order.py b/digikey/v3/marketplace/models/order.py
new file mode 100644
index 0000000..65cba20
--- /dev/null
+++ b/digikey/v3/marketplace/models/order.py
@@ -0,0 +1,1011 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Order(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'id': 'str',
+ 'business_id': 'str',
+ 'accounting_document_id': 'str',
+ 'accounting_document_number': 'str',
+ 'payment_status': 'str',
+ 'create_date_utc': 'datetime',
+ 'last_update_date_utc': 'datetime',
+ 'customer_debited_date_utc': 'datetime',
+ 'acceptance_rejection_date_utc': 'datetime',
+ 'received_date_utc': 'datetime',
+ 'shipped_date_utc': 'datetime',
+ 'cancellation_date_utc': 'datetime',
+ 'shipping_deadline_utc': 'datetime',
+ 'lead_time_to_ship': 'int',
+ 'order_state': 'str',
+ 'customer': 'Customer',
+ 'supplier_id': 'str',
+ 'supplier_legacy_id': 'int',
+ 'supplier_business_id': 'str',
+ 'order_details': 'list[OrderDetail]',
+ 'additional_fields': 'list[AdditionalField]',
+ 'subtotal_price': 'float',
+ 'total_price': 'float',
+ 'total_discount_fee': 'float',
+ 'adjusted_subtotal_price': 'float',
+ 'adjusted_total_price': 'float',
+ 'adjusted_total_discount_fee': 'float',
+ 'shipping_price': 'float',
+ 'adjusted_shipping_price': 'float',
+ 'shipping_tracking_info_list': 'list[ShippingTrackingInfo]',
+ 'shipping_method_code': 'str',
+ 'shipping_region_code': 'str',
+ 'tracking_required': 'bool',
+ 'refunds': 'list[OrderRefund]',
+ 'supplier_invoice_number': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'business_id': 'businessId',
+ 'accounting_document_id': 'accountingDocumentId',
+ 'accounting_document_number': 'accountingDocumentNumber',
+ 'payment_status': 'paymentStatus',
+ 'create_date_utc': 'createDateUtc',
+ 'last_update_date_utc': 'lastUpdateDateUtc',
+ 'customer_debited_date_utc': 'customerDebitedDateUtc',
+ 'acceptance_rejection_date_utc': 'acceptanceRejectionDateUtc',
+ 'received_date_utc': 'receivedDateUtc',
+ 'shipped_date_utc': 'shippedDateUtc',
+ 'cancellation_date_utc': 'cancellationDateUtc',
+ 'shipping_deadline_utc': 'shippingDeadlineUtc',
+ 'lead_time_to_ship': 'leadTimeToShip',
+ 'order_state': 'orderState',
+ 'customer': 'customer',
+ 'supplier_id': 'supplierId',
+ 'supplier_legacy_id': 'supplierLegacyId',
+ 'supplier_business_id': 'supplierBusinessId',
+ 'order_details': 'orderDetails',
+ 'additional_fields': 'additionalFields',
+ 'subtotal_price': 'subtotalPrice',
+ 'total_price': 'totalPrice',
+ 'total_discount_fee': 'totalDiscountFee',
+ 'adjusted_subtotal_price': 'adjustedSubtotalPrice',
+ 'adjusted_total_price': 'adjustedTotalPrice',
+ 'adjusted_total_discount_fee': 'adjustedTotalDiscountFee',
+ 'shipping_price': 'shippingPrice',
+ 'adjusted_shipping_price': 'adjustedShippingPrice',
+ 'shipping_tracking_info_list': 'shippingTrackingInfoList',
+ 'shipping_method_code': 'shippingMethodCode',
+ 'shipping_region_code': 'shippingRegionCode',
+ 'tracking_required': 'trackingRequired',
+ 'refunds': 'refunds',
+ 'supplier_invoice_number': 'supplierInvoiceNumber'
+ }
+
+ def __init__(self, id=None, business_id=None, accounting_document_id=None, accounting_document_number=None, payment_status=None, create_date_utc=None, last_update_date_utc=None, customer_debited_date_utc=None, acceptance_rejection_date_utc=None, received_date_utc=None, shipped_date_utc=None, cancellation_date_utc=None, shipping_deadline_utc=None, lead_time_to_ship=None, order_state=None, customer=None, supplier_id=None, supplier_legacy_id=None, supplier_business_id=None, order_details=None, additional_fields=None, subtotal_price=None, total_price=None, total_discount_fee=None, adjusted_subtotal_price=None, adjusted_total_price=None, adjusted_total_discount_fee=None, shipping_price=None, adjusted_shipping_price=None, shipping_tracking_info_list=None, shipping_method_code=None, shipping_region_code=None, tracking_required=None, refunds=None, supplier_invoice_number=None): # noqa: E501
+ """Order - a model defined in Swagger""" # noqa: E501
+
+ self._id = None
+ self._business_id = None
+ self._accounting_document_id = None
+ self._accounting_document_number = None
+ self._payment_status = None
+ self._create_date_utc = None
+ self._last_update_date_utc = None
+ self._customer_debited_date_utc = None
+ self._acceptance_rejection_date_utc = None
+ self._received_date_utc = None
+ self._shipped_date_utc = None
+ self._cancellation_date_utc = None
+ self._shipping_deadline_utc = None
+ self._lead_time_to_ship = None
+ self._order_state = None
+ self._customer = None
+ self._supplier_id = None
+ self._supplier_legacy_id = None
+ self._supplier_business_id = None
+ self._order_details = None
+ self._additional_fields = None
+ self._subtotal_price = None
+ self._total_price = None
+ self._total_discount_fee = None
+ self._adjusted_subtotal_price = None
+ self._adjusted_total_price = None
+ self._adjusted_total_discount_fee = None
+ self._shipping_price = None
+ self._adjusted_shipping_price = None
+ self._shipping_tracking_info_list = None
+ self._shipping_method_code = None
+ self._shipping_region_code = None
+ self._tracking_required = None
+ self._refunds = None
+ self._supplier_invoice_number = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if business_id is not None:
+ self.business_id = business_id
+ if accounting_document_id is not None:
+ self.accounting_document_id = accounting_document_id
+ if accounting_document_number is not None:
+ self.accounting_document_number = accounting_document_number
+ if payment_status is not None:
+ self.payment_status = payment_status
+ if create_date_utc is not None:
+ self.create_date_utc = create_date_utc
+ if last_update_date_utc is not None:
+ self.last_update_date_utc = last_update_date_utc
+ if customer_debited_date_utc is not None:
+ self.customer_debited_date_utc = customer_debited_date_utc
+ if acceptance_rejection_date_utc is not None:
+ self.acceptance_rejection_date_utc = acceptance_rejection_date_utc
+ if received_date_utc is not None:
+ self.received_date_utc = received_date_utc
+ if shipped_date_utc is not None:
+ self.shipped_date_utc = shipped_date_utc
+ if cancellation_date_utc is not None:
+ self.cancellation_date_utc = cancellation_date_utc
+ if shipping_deadline_utc is not None:
+ self.shipping_deadline_utc = shipping_deadline_utc
+ if lead_time_to_ship is not None:
+ self.lead_time_to_ship = lead_time_to_ship
+ if order_state is not None:
+ self.order_state = order_state
+ if customer is not None:
+ self.customer = customer
+ if supplier_id is not None:
+ self.supplier_id = supplier_id
+ if supplier_legacy_id is not None:
+ self.supplier_legacy_id = supplier_legacy_id
+ if supplier_business_id is not None:
+ self.supplier_business_id = supplier_business_id
+ if order_details is not None:
+ self.order_details = order_details
+ if additional_fields is not None:
+ self.additional_fields = additional_fields
+ if subtotal_price is not None:
+ self.subtotal_price = subtotal_price
+ if total_price is not None:
+ self.total_price = total_price
+ if total_discount_fee is not None:
+ self.total_discount_fee = total_discount_fee
+ if adjusted_subtotal_price is not None:
+ self.adjusted_subtotal_price = adjusted_subtotal_price
+ if adjusted_total_price is not None:
+ self.adjusted_total_price = adjusted_total_price
+ if adjusted_total_discount_fee is not None:
+ self.adjusted_total_discount_fee = adjusted_total_discount_fee
+ if shipping_price is not None:
+ self.shipping_price = shipping_price
+ if adjusted_shipping_price is not None:
+ self.adjusted_shipping_price = adjusted_shipping_price
+ if shipping_tracking_info_list is not None:
+ self.shipping_tracking_info_list = shipping_tracking_info_list
+ if shipping_method_code is not None:
+ self.shipping_method_code = shipping_method_code
+ if shipping_region_code is not None:
+ self.shipping_region_code = shipping_region_code
+ if tracking_required is not None:
+ self.tracking_required = tracking_required
+ if refunds is not None:
+ self.refunds = refunds
+ if supplier_invoice_number is not None:
+ self.supplier_invoice_number = supplier_invoice_number
+
+ @property
+ def id(self):
+ """Gets the id of this Order. # noqa: E501
+
+
+ :return: The id of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this Order.
+
+
+ :param id: The id of this Order. # noqa: E501
+ :type: str
+ """
+
+ self._id = id
+
+ @property
+ def business_id(self):
+ """Gets the business_id of this Order. # noqa: E501
+
+
+ :return: The business_id of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._business_id
+
+ @business_id.setter
+ def business_id(self, business_id):
+ """Sets the business_id of this Order.
+
+
+ :param business_id: The business_id of this Order. # noqa: E501
+ :type: str
+ """
+
+ self._business_id = business_id
+
+ @property
+ def accounting_document_id(self):
+ """Gets the accounting_document_id of this Order. # noqa: E501
+
+
+ :return: The accounting_document_id of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._accounting_document_id
+
+ @accounting_document_id.setter
+ def accounting_document_id(self, accounting_document_id):
+ """Sets the accounting_document_id of this Order.
+
+
+ :param accounting_document_id: The accounting_document_id of this Order. # noqa: E501
+ :type: str
+ """
+
+ self._accounting_document_id = accounting_document_id
+
+ @property
+ def accounting_document_number(self):
+ """Gets the accounting_document_number of this Order. # noqa: E501
+
+
+ :return: The accounting_document_number of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._accounting_document_number
+
+ @accounting_document_number.setter
+ def accounting_document_number(self, accounting_document_number):
+ """Sets the accounting_document_number of this Order.
+
+
+ :param accounting_document_number: The accounting_document_number of this Order. # noqa: E501
+ :type: str
+ """
+
+ self._accounting_document_number = accounting_document_number
+
+ @property
+ def payment_status(self):
+ """Gets the payment_status of this Order. # noqa: E501
+
+
+ :return: The payment_status of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._payment_status
+
+ @payment_status.setter
+ def payment_status(self, payment_status):
+ """Sets the payment_status of this Order.
+
+
+ :param payment_status: The payment_status of this Order. # noqa: E501
+ :type: str
+ """
+ allowed_values = ["Pending", "Payable", "Paid", "Invoiced"] # noqa: E501
+ if payment_status not in allowed_values:
+ raise ValueError(
+ "Invalid value for `payment_status` ({0}), must be one of {1}" # noqa: E501
+ .format(payment_status, allowed_values)
+ )
+
+ self._payment_status = payment_status
+
+ @property
+ def create_date_utc(self):
+ """Gets the create_date_utc of this Order. # noqa: E501
+
+
+ :return: The create_date_utc of this Order. # noqa: E501
+ :rtype: datetime
+ """
+ return self._create_date_utc
+
+ @create_date_utc.setter
+ def create_date_utc(self, create_date_utc):
+ """Sets the create_date_utc of this Order.
+
+
+ :param create_date_utc: The create_date_utc of this Order. # noqa: E501
+ :type: datetime
+ """
+
+ self._create_date_utc = create_date_utc
+
+ @property
+ def last_update_date_utc(self):
+ """Gets the last_update_date_utc of this Order. # noqa: E501
+
+
+ :return: The last_update_date_utc of this Order. # noqa: E501
+ :rtype: datetime
+ """
+ return self._last_update_date_utc
+
+ @last_update_date_utc.setter
+ def last_update_date_utc(self, last_update_date_utc):
+ """Sets the last_update_date_utc of this Order.
+
+
+ :param last_update_date_utc: The last_update_date_utc of this Order. # noqa: E501
+ :type: datetime
+ """
+
+ self._last_update_date_utc = last_update_date_utc
+
+ @property
+ def customer_debited_date_utc(self):
+ """Gets the customer_debited_date_utc of this Order. # noqa: E501
+
+
+ :return: The customer_debited_date_utc of this Order. # noqa: E501
+ :rtype: datetime
+ """
+ return self._customer_debited_date_utc
+
+ @customer_debited_date_utc.setter
+ def customer_debited_date_utc(self, customer_debited_date_utc):
+ """Sets the customer_debited_date_utc of this Order.
+
+
+ :param customer_debited_date_utc: The customer_debited_date_utc of this Order. # noqa: E501
+ :type: datetime
+ """
+
+ self._customer_debited_date_utc = customer_debited_date_utc
+
+ @property
+ def acceptance_rejection_date_utc(self):
+ """Gets the acceptance_rejection_date_utc of this Order. # noqa: E501
+
+
+ :return: The acceptance_rejection_date_utc of this Order. # noqa: E501
+ :rtype: datetime
+ """
+ return self._acceptance_rejection_date_utc
+
+ @acceptance_rejection_date_utc.setter
+ def acceptance_rejection_date_utc(self, acceptance_rejection_date_utc):
+ """Sets the acceptance_rejection_date_utc of this Order.
+
+
+ :param acceptance_rejection_date_utc: The acceptance_rejection_date_utc of this Order. # noqa: E501
+ :type: datetime
+ """
+
+ self._acceptance_rejection_date_utc = acceptance_rejection_date_utc
+
+ @property
+ def received_date_utc(self):
+ """Gets the received_date_utc of this Order. # noqa: E501
+
+
+ :return: The received_date_utc of this Order. # noqa: E501
+ :rtype: datetime
+ """
+ return self._received_date_utc
+
+ @received_date_utc.setter
+ def received_date_utc(self, received_date_utc):
+ """Sets the received_date_utc of this Order.
+
+
+ :param received_date_utc: The received_date_utc of this Order. # noqa: E501
+ :type: datetime
+ """
+
+ self._received_date_utc = received_date_utc
+
+ @property
+ def shipped_date_utc(self):
+ """Gets the shipped_date_utc of this Order. # noqa: E501
+
+
+ :return: The shipped_date_utc of this Order. # noqa: E501
+ :rtype: datetime
+ """
+ return self._shipped_date_utc
+
+ @shipped_date_utc.setter
+ def shipped_date_utc(self, shipped_date_utc):
+ """Sets the shipped_date_utc of this Order.
+
+
+ :param shipped_date_utc: The shipped_date_utc of this Order. # noqa: E501
+ :type: datetime
+ """
+
+ self._shipped_date_utc = shipped_date_utc
+
+ @property
+ def cancellation_date_utc(self):
+ """Gets the cancellation_date_utc of this Order. # noqa: E501
+
+
+ :return: The cancellation_date_utc of this Order. # noqa: E501
+ :rtype: datetime
+ """
+ return self._cancellation_date_utc
+
+ @cancellation_date_utc.setter
+ def cancellation_date_utc(self, cancellation_date_utc):
+ """Sets the cancellation_date_utc of this Order.
+
+
+ :param cancellation_date_utc: The cancellation_date_utc of this Order. # noqa: E501
+ :type: datetime
+ """
+
+ self._cancellation_date_utc = cancellation_date_utc
+
+ @property
+ def shipping_deadline_utc(self):
+ """Gets the shipping_deadline_utc of this Order. # noqa: E501
+
+
+ :return: The shipping_deadline_utc of this Order. # noqa: E501
+ :rtype: datetime
+ """
+ return self._shipping_deadline_utc
+
+ @shipping_deadline_utc.setter
+ def shipping_deadline_utc(self, shipping_deadline_utc):
+ """Sets the shipping_deadline_utc of this Order.
+
+
+ :param shipping_deadline_utc: The shipping_deadline_utc of this Order. # noqa: E501
+ :type: datetime
+ """
+
+ self._shipping_deadline_utc = shipping_deadline_utc
+
+ @property
+ def lead_time_to_ship(self):
+ """Gets the lead_time_to_ship of this Order. # noqa: E501
+
+
+ :return: The lead_time_to_ship of this Order. # noqa: E501
+ :rtype: int
+ """
+ return self._lead_time_to_ship
+
+ @lead_time_to_ship.setter
+ def lead_time_to_ship(self, lead_time_to_ship):
+ """Sets the lead_time_to_ship of this Order.
+
+
+ :param lead_time_to_ship: The lead_time_to_ship of this Order. # noqa: E501
+ :type: int
+ """
+
+ self._lead_time_to_ship = lead_time_to_ship
+
+ @property
+ def order_state(self):
+ """Gets the order_state of this Order. # noqa: E501
+
+
+ :return: The order_state of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._order_state
+
+ @order_state.setter
+ def order_state(self, order_state):
+ """Sets the order_state of this Order.
+
+
+ :param order_state: The order_state of this Order. # noqa: E501
+ :type: str
+ """
+ allowed_values = ["WaitingAcceptance", "Accepted", "ShippingInProgress", "Shipped", "Received", "IncidentOpen", "Refunded", "Closed", "Cancelled", "Rejected"] # noqa: E501
+ if order_state not in allowed_values:
+ raise ValueError(
+ "Invalid value for `order_state` ({0}), must be one of {1}" # noqa: E501
+ .format(order_state, allowed_values)
+ )
+
+ self._order_state = order_state
+
+ @property
+ def customer(self):
+ """Gets the customer of this Order. # noqa: E501
+
+
+ :return: The customer of this Order. # noqa: E501
+ :rtype: Customer
+ """
+ return self._customer
+
+ @customer.setter
+ def customer(self, customer):
+ """Sets the customer of this Order.
+
+
+ :param customer: The customer of this Order. # noqa: E501
+ :type: Customer
+ """
+
+ self._customer = customer
+
+ @property
+ def supplier_id(self):
+ """Gets the supplier_id of this Order. # noqa: E501
+
+
+ :return: The supplier_id of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier_id
+
+ @supplier_id.setter
+ def supplier_id(self, supplier_id):
+ """Sets the supplier_id of this Order.
+
+
+ :param supplier_id: The supplier_id of this Order. # noqa: E501
+ :type: str
+ """
+
+ self._supplier_id = supplier_id
+
+ @property
+ def supplier_legacy_id(self):
+ """Gets the supplier_legacy_id of this Order. # noqa: E501
+
+
+ :return: The supplier_legacy_id of this Order. # noqa: E501
+ :rtype: int
+ """
+ return self._supplier_legacy_id
+
+ @supplier_legacy_id.setter
+ def supplier_legacy_id(self, supplier_legacy_id):
+ """Sets the supplier_legacy_id of this Order.
+
+
+ :param supplier_legacy_id: The supplier_legacy_id of this Order. # noqa: E501
+ :type: int
+ """
+
+ self._supplier_legacy_id = supplier_legacy_id
+
+ @property
+ def supplier_business_id(self):
+ """Gets the supplier_business_id of this Order. # noqa: E501
+
+
+ :return: The supplier_business_id of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier_business_id
+
+ @supplier_business_id.setter
+ def supplier_business_id(self, supplier_business_id):
+ """Sets the supplier_business_id of this Order.
+
+
+ :param supplier_business_id: The supplier_business_id of this Order. # noqa: E501
+ :type: str
+ """
+
+ self._supplier_business_id = supplier_business_id
+
+ @property
+ def order_details(self):
+ """Gets the order_details of this Order. # noqa: E501
+
+
+ :return: The order_details of this Order. # noqa: E501
+ :rtype: list[OrderDetail]
+ """
+ return self._order_details
+
+ @order_details.setter
+ def order_details(self, order_details):
+ """Sets the order_details of this Order.
+
+
+ :param order_details: The order_details of this Order. # noqa: E501
+ :type: list[OrderDetail]
+ """
+
+ self._order_details = order_details
+
+ @property
+ def additional_fields(self):
+ """Gets the additional_fields of this Order. # noqa: E501
+
+
+ :return: The additional_fields of this Order. # noqa: E501
+ :rtype: list[AdditionalField]
+ """
+ return self._additional_fields
+
+ @additional_fields.setter
+ def additional_fields(self, additional_fields):
+ """Sets the additional_fields of this Order.
+
+
+ :param additional_fields: The additional_fields of this Order. # noqa: E501
+ :type: list[AdditionalField]
+ """
+
+ self._additional_fields = additional_fields
+
+ @property
+ def subtotal_price(self):
+ """Gets the subtotal_price of this Order. # noqa: E501
+
+
+ :return: The subtotal_price of this Order. # noqa: E501
+ :rtype: float
+ """
+ return self._subtotal_price
+
+ @subtotal_price.setter
+ def subtotal_price(self, subtotal_price):
+ """Sets the subtotal_price of this Order.
+
+
+ :param subtotal_price: The subtotal_price of this Order. # noqa: E501
+ :type: float
+ """
+
+ self._subtotal_price = subtotal_price
+
+ @property
+ def total_price(self):
+ """Gets the total_price of this Order. # noqa: E501
+
+
+ :return: The total_price of this Order. # noqa: E501
+ :rtype: float
+ """
+ return self._total_price
+
+ @total_price.setter
+ def total_price(self, total_price):
+ """Sets the total_price of this Order.
+
+
+ :param total_price: The total_price of this Order. # noqa: E501
+ :type: float
+ """
+
+ self._total_price = total_price
+
+ @property
+ def total_discount_fee(self):
+ """Gets the total_discount_fee of this Order. # noqa: E501
+
+
+ :return: The total_discount_fee of this Order. # noqa: E501
+ :rtype: float
+ """
+ return self._total_discount_fee
+
+ @total_discount_fee.setter
+ def total_discount_fee(self, total_discount_fee):
+ """Sets the total_discount_fee of this Order.
+
+
+ :param total_discount_fee: The total_discount_fee of this Order. # noqa: E501
+ :type: float
+ """
+
+ self._total_discount_fee = total_discount_fee
+
+ @property
+ def adjusted_subtotal_price(self):
+ """Gets the adjusted_subtotal_price of this Order. # noqa: E501
+
+
+ :return: The adjusted_subtotal_price of this Order. # noqa: E501
+ :rtype: float
+ """
+ return self._adjusted_subtotal_price
+
+ @adjusted_subtotal_price.setter
+ def adjusted_subtotal_price(self, adjusted_subtotal_price):
+ """Sets the adjusted_subtotal_price of this Order.
+
+
+ :param adjusted_subtotal_price: The adjusted_subtotal_price of this Order. # noqa: E501
+ :type: float
+ """
+
+ self._adjusted_subtotal_price = adjusted_subtotal_price
+
+ @property
+ def adjusted_total_price(self):
+ """Gets the adjusted_total_price of this Order. # noqa: E501
+
+
+ :return: The adjusted_total_price of this Order. # noqa: E501
+ :rtype: float
+ """
+ return self._adjusted_total_price
+
+ @adjusted_total_price.setter
+ def adjusted_total_price(self, adjusted_total_price):
+ """Sets the adjusted_total_price of this Order.
+
+
+ :param adjusted_total_price: The adjusted_total_price of this Order. # noqa: E501
+ :type: float
+ """
+
+ self._adjusted_total_price = adjusted_total_price
+
+ @property
+ def adjusted_total_discount_fee(self):
+ """Gets the adjusted_total_discount_fee of this Order. # noqa: E501
+
+
+ :return: The adjusted_total_discount_fee of this Order. # noqa: E501
+ :rtype: float
+ """
+ return self._adjusted_total_discount_fee
+
+ @adjusted_total_discount_fee.setter
+ def adjusted_total_discount_fee(self, adjusted_total_discount_fee):
+ """Sets the adjusted_total_discount_fee of this Order.
+
+
+ :param adjusted_total_discount_fee: The adjusted_total_discount_fee of this Order. # noqa: E501
+ :type: float
+ """
+
+ self._adjusted_total_discount_fee = adjusted_total_discount_fee
+
+ @property
+ def shipping_price(self):
+ """Gets the shipping_price of this Order. # noqa: E501
+
+
+ :return: The shipping_price of this Order. # noqa: E501
+ :rtype: float
+ """
+ return self._shipping_price
+
+ @shipping_price.setter
+ def shipping_price(self, shipping_price):
+ """Sets the shipping_price of this Order.
+
+
+ :param shipping_price: The shipping_price of this Order. # noqa: E501
+ :type: float
+ """
+
+ self._shipping_price = shipping_price
+
+ @property
+ def adjusted_shipping_price(self):
+ """Gets the adjusted_shipping_price of this Order. # noqa: E501
+
+
+ :return: The adjusted_shipping_price of this Order. # noqa: E501
+ :rtype: float
+ """
+ return self._adjusted_shipping_price
+
+ @adjusted_shipping_price.setter
+ def adjusted_shipping_price(self, adjusted_shipping_price):
+ """Sets the adjusted_shipping_price of this Order.
+
+
+ :param adjusted_shipping_price: The adjusted_shipping_price of this Order. # noqa: E501
+ :type: float
+ """
+
+ self._adjusted_shipping_price = adjusted_shipping_price
+
+ @property
+ def shipping_tracking_info_list(self):
+ """Gets the shipping_tracking_info_list of this Order. # noqa: E501
+
+
+ :return: The shipping_tracking_info_list of this Order. # noqa: E501
+ :rtype: list[ShippingTrackingInfo]
+ """
+ return self._shipping_tracking_info_list
+
+ @shipping_tracking_info_list.setter
+ def shipping_tracking_info_list(self, shipping_tracking_info_list):
+ """Sets the shipping_tracking_info_list of this Order.
+
+
+ :param shipping_tracking_info_list: The shipping_tracking_info_list of this Order. # noqa: E501
+ :type: list[ShippingTrackingInfo]
+ """
+
+ self._shipping_tracking_info_list = shipping_tracking_info_list
+
+ @property
+ def shipping_method_code(self):
+ """Gets the shipping_method_code of this Order. # noqa: E501
+
+
+ :return: The shipping_method_code of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_method_code
+
+ @shipping_method_code.setter
+ def shipping_method_code(self, shipping_method_code):
+ """Sets the shipping_method_code of this Order.
+
+
+ :param shipping_method_code: The shipping_method_code of this Order. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_method_code = shipping_method_code
+
+ @property
+ def shipping_region_code(self):
+ """Gets the shipping_region_code of this Order. # noqa: E501
+
+
+ :return: The shipping_region_code of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_region_code
+
+ @shipping_region_code.setter
+ def shipping_region_code(self, shipping_region_code):
+ """Sets the shipping_region_code of this Order.
+
+
+ :param shipping_region_code: The shipping_region_code of this Order. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_region_code = shipping_region_code
+
+ @property
+ def tracking_required(self):
+ """Gets the tracking_required of this Order. # noqa: E501
+
+
+ :return: The tracking_required of this Order. # noqa: E501
+ :rtype: bool
+ """
+ return self._tracking_required
+
+ @tracking_required.setter
+ def tracking_required(self, tracking_required):
+ """Sets the tracking_required of this Order.
+
+
+ :param tracking_required: The tracking_required of this Order. # noqa: E501
+ :type: bool
+ """
+
+ self._tracking_required = tracking_required
+
+ @property
+ def refunds(self):
+ """Gets the refunds of this Order. # noqa: E501
+
+
+ :return: The refunds of this Order. # noqa: E501
+ :rtype: list[OrderRefund]
+ """
+ return self._refunds
+
+ @refunds.setter
+ def refunds(self, refunds):
+ """Sets the refunds of this Order.
+
+
+ :param refunds: The refunds of this Order. # noqa: E501
+ :type: list[OrderRefund]
+ """
+
+ self._refunds = refunds
+
+ @property
+ def supplier_invoice_number(self):
+ """Gets the supplier_invoice_number of this Order. # noqa: E501
+
+
+ :return: The supplier_invoice_number of this Order. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier_invoice_number
+
+ @supplier_invoice_number.setter
+ def supplier_invoice_number(self, supplier_invoice_number):
+ """Sets the supplier_invoice_number of this Order.
+
+
+ :param supplier_invoice_number: The supplier_invoice_number of this Order. # noqa: E501
+ :type: str
+ """
+
+ self._supplier_invoice_number = supplier_invoice_number
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(Order, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Order):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/order_cancellation.py b/digikey/v3/marketplace/models/order_cancellation.py
new file mode 100644
index 0000000..cd78dd7
--- /dev/null
+++ b/digikey/v3/marketplace/models/order_cancellation.py
@@ -0,0 +1,245 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class OrderCancellation(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'amount': 'float',
+ 'currency_iso_code': 'str',
+ 'quantity': 'int',
+ 'reason_code': 'str',
+ 'reason_label': 'str',
+ 'create_date_utc': 'datetime'
+ }
+
+ attribute_map = {
+ 'amount': 'amount',
+ 'currency_iso_code': 'currencyISOCode',
+ 'quantity': 'quantity',
+ 'reason_code': 'reasonCode',
+ 'reason_label': 'reasonLabel',
+ 'create_date_utc': 'createDateUtc'
+ }
+
+ def __init__(self, amount=None, currency_iso_code=None, quantity=None, reason_code=None, reason_label=None, create_date_utc=None): # noqa: E501
+ """OrderCancellation - a model defined in Swagger""" # noqa: E501
+
+ self._amount = None
+ self._currency_iso_code = None
+ self._quantity = None
+ self._reason_code = None
+ self._reason_label = None
+ self._create_date_utc = None
+ self.discriminator = None
+
+ if amount is not None:
+ self.amount = amount
+ if currency_iso_code is not None:
+ self.currency_iso_code = currency_iso_code
+ if quantity is not None:
+ self.quantity = quantity
+ if reason_code is not None:
+ self.reason_code = reason_code
+ if reason_label is not None:
+ self.reason_label = reason_label
+ if create_date_utc is not None:
+ self.create_date_utc = create_date_utc
+
+ @property
+ def amount(self):
+ """Gets the amount of this OrderCancellation. # noqa: E501
+
+
+ :return: The amount of this OrderCancellation. # noqa: E501
+ :rtype: float
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this OrderCancellation.
+
+
+ :param amount: The amount of this OrderCancellation. # noqa: E501
+ :type: float
+ """
+
+ self._amount = amount
+
+ @property
+ def currency_iso_code(self):
+ """Gets the currency_iso_code of this OrderCancellation. # noqa: E501
+
+
+ :return: The currency_iso_code of this OrderCancellation. # noqa: E501
+ :rtype: str
+ """
+ return self._currency_iso_code
+
+ @currency_iso_code.setter
+ def currency_iso_code(self, currency_iso_code):
+ """Sets the currency_iso_code of this OrderCancellation.
+
+
+ :param currency_iso_code: The currency_iso_code of this OrderCancellation. # noqa: E501
+ :type: str
+ """
+
+ self._currency_iso_code = currency_iso_code
+
+ @property
+ def quantity(self):
+ """Gets the quantity of this OrderCancellation. # noqa: E501
+
+
+ :return: The quantity of this OrderCancellation. # noqa: E501
+ :rtype: int
+ """
+ return self._quantity
+
+ @quantity.setter
+ def quantity(self, quantity):
+ """Sets the quantity of this OrderCancellation.
+
+
+ :param quantity: The quantity of this OrderCancellation. # noqa: E501
+ :type: int
+ """
+
+ self._quantity = quantity
+
+ @property
+ def reason_code(self):
+ """Gets the reason_code of this OrderCancellation. # noqa: E501
+
+
+ :return: The reason_code of this OrderCancellation. # noqa: E501
+ :rtype: str
+ """
+ return self._reason_code
+
+ @reason_code.setter
+ def reason_code(self, reason_code):
+ """Sets the reason_code of this OrderCancellation.
+
+
+ :param reason_code: The reason_code of this OrderCancellation. # noqa: E501
+ :type: str
+ """
+
+ self._reason_code = reason_code
+
+ @property
+ def reason_label(self):
+ """Gets the reason_label of this OrderCancellation. # noqa: E501
+
+
+ :return: The reason_label of this OrderCancellation. # noqa: E501
+ :rtype: str
+ """
+ return self._reason_label
+
+ @reason_label.setter
+ def reason_label(self, reason_label):
+ """Sets the reason_label of this OrderCancellation.
+
+
+ :param reason_label: The reason_label of this OrderCancellation. # noqa: E501
+ :type: str
+ """
+
+ self._reason_label = reason_label
+
+ @property
+ def create_date_utc(self):
+ """Gets the create_date_utc of this OrderCancellation. # noqa: E501
+
+
+ :return: The create_date_utc of this OrderCancellation. # noqa: E501
+ :rtype: datetime
+ """
+ return self._create_date_utc
+
+ @create_date_utc.setter
+ def create_date_utc(self, create_date_utc):
+ """Sets the create_date_utc of this OrderCancellation.
+
+
+ :param create_date_utc: The create_date_utc of this OrderCancellation. # noqa: E501
+ :type: datetime
+ """
+
+ self._create_date_utc = create_date_utc
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(OrderCancellation, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, OrderCancellation):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/order_detail.py b/digikey/v3/marketplace/models/order_detail.py
new file mode 100644
index 0000000..a5bd2da
--- /dev/null
+++ b/digikey/v3/marketplace/models/order_detail.py
@@ -0,0 +1,771 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class OrderDetail(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'order_detail_id': 'str',
+ 'create_date_utc': 'datetime',
+ 'last_update_date_utc': 'datetime',
+ 'acceptance_rejection_date_utc': 'datetime',
+ 'cancellation_date_utc': 'datetime',
+ 'order_detail_state': 'str',
+ 'offer_id': 'str',
+ 'offer_legacy_id': 'int',
+ 'offer_lead_time': 'int',
+ 'discount_fee': 'float',
+ 'discount_rate': 'float',
+ 'total_price': 'float',
+ 'unit_price': 'float',
+ 'quantity': 'int',
+ 'product_part_number': 'str',
+ 'supplier_sku': 'str',
+ 'product_business_id': 'str',
+ 'adjusted_discount_fee': 'float',
+ 'adjusted_total_price': 'float',
+ 'adjusted_quantity': 'int',
+ 'cancellations': 'list[OrderCancellation]',
+ 'incidents': 'list[OrderIncident]',
+ 'additional_fields': 'list[AdditionalField]',
+ 'product_image_url': 'str',
+ 'product_category_name': 'str',
+ 'offer_description': 'str'
+ }
+
+ attribute_map = {
+ 'order_detail_id': 'orderDetailId',
+ 'create_date_utc': 'createDateUtc',
+ 'last_update_date_utc': 'lastUpdateDateUtc',
+ 'acceptance_rejection_date_utc': 'acceptanceRejectionDateUtc',
+ 'cancellation_date_utc': 'cancellationDateUtc',
+ 'order_detail_state': 'orderDetailState',
+ 'offer_id': 'offerId',
+ 'offer_legacy_id': 'offerLegacyId',
+ 'offer_lead_time': 'offerLeadTime',
+ 'discount_fee': 'discountFee',
+ 'discount_rate': 'discountRate',
+ 'total_price': 'totalPrice',
+ 'unit_price': 'unitPrice',
+ 'quantity': 'quantity',
+ 'product_part_number': 'productPartNumber',
+ 'supplier_sku': 'supplierSku',
+ 'product_business_id': 'productBusinessId',
+ 'adjusted_discount_fee': 'adjustedDiscountFee',
+ 'adjusted_total_price': 'adjustedTotalPrice',
+ 'adjusted_quantity': 'adjustedQuantity',
+ 'cancellations': 'cancellations',
+ 'incidents': 'incidents',
+ 'additional_fields': 'additionalFields',
+ 'product_image_url': 'productImageUrl',
+ 'product_category_name': 'productCategoryName',
+ 'offer_description': 'offerDescription'
+ }
+
+ def __init__(self, order_detail_id=None, create_date_utc=None, last_update_date_utc=None, acceptance_rejection_date_utc=None, cancellation_date_utc=None, order_detail_state=None, offer_id=None, offer_legacy_id=None, offer_lead_time=None, discount_fee=None, discount_rate=None, total_price=None, unit_price=None, quantity=None, product_part_number=None, supplier_sku=None, product_business_id=None, adjusted_discount_fee=None, adjusted_total_price=None, adjusted_quantity=None, cancellations=None, incidents=None, additional_fields=None, product_image_url=None, product_category_name=None, offer_description=None): # noqa: E501
+ """OrderDetail - a model defined in Swagger""" # noqa: E501
+
+ self._order_detail_id = None
+ self._create_date_utc = None
+ self._last_update_date_utc = None
+ self._acceptance_rejection_date_utc = None
+ self._cancellation_date_utc = None
+ self._order_detail_state = None
+ self._offer_id = None
+ self._offer_legacy_id = None
+ self._offer_lead_time = None
+ self._discount_fee = None
+ self._discount_rate = None
+ self._total_price = None
+ self._unit_price = None
+ self._quantity = None
+ self._product_part_number = None
+ self._supplier_sku = None
+ self._product_business_id = None
+ self._adjusted_discount_fee = None
+ self._adjusted_total_price = None
+ self._adjusted_quantity = None
+ self._cancellations = None
+ self._incidents = None
+ self._additional_fields = None
+ self._product_image_url = None
+ self._product_category_name = None
+ self._offer_description = None
+ self.discriminator = None
+
+ if order_detail_id is not None:
+ self.order_detail_id = order_detail_id
+ if create_date_utc is not None:
+ self.create_date_utc = create_date_utc
+ if last_update_date_utc is not None:
+ self.last_update_date_utc = last_update_date_utc
+ if acceptance_rejection_date_utc is not None:
+ self.acceptance_rejection_date_utc = acceptance_rejection_date_utc
+ if cancellation_date_utc is not None:
+ self.cancellation_date_utc = cancellation_date_utc
+ if order_detail_state is not None:
+ self.order_detail_state = order_detail_state
+ if offer_id is not None:
+ self.offer_id = offer_id
+ if offer_legacy_id is not None:
+ self.offer_legacy_id = offer_legacy_id
+ if offer_lead_time is not None:
+ self.offer_lead_time = offer_lead_time
+ if discount_fee is not None:
+ self.discount_fee = discount_fee
+ if discount_rate is not None:
+ self.discount_rate = discount_rate
+ if total_price is not None:
+ self.total_price = total_price
+ if unit_price is not None:
+ self.unit_price = unit_price
+ if quantity is not None:
+ self.quantity = quantity
+ if product_part_number is not None:
+ self.product_part_number = product_part_number
+ if supplier_sku is not None:
+ self.supplier_sku = supplier_sku
+ if product_business_id is not None:
+ self.product_business_id = product_business_id
+ if adjusted_discount_fee is not None:
+ self.adjusted_discount_fee = adjusted_discount_fee
+ if adjusted_total_price is not None:
+ self.adjusted_total_price = adjusted_total_price
+ if adjusted_quantity is not None:
+ self.adjusted_quantity = adjusted_quantity
+ if cancellations is not None:
+ self.cancellations = cancellations
+ if incidents is not None:
+ self.incidents = incidents
+ if additional_fields is not None:
+ self.additional_fields = additional_fields
+ if product_image_url is not None:
+ self.product_image_url = product_image_url
+ if product_category_name is not None:
+ self.product_category_name = product_category_name
+ if offer_description is not None:
+ self.offer_description = offer_description
+
+ @property
+ def order_detail_id(self):
+ """Gets the order_detail_id of this OrderDetail. # noqa: E501
+
+
+ :return: The order_detail_id of this OrderDetail. # noqa: E501
+ :rtype: str
+ """
+ return self._order_detail_id
+
+ @order_detail_id.setter
+ def order_detail_id(self, order_detail_id):
+ """Sets the order_detail_id of this OrderDetail.
+
+
+ :param order_detail_id: The order_detail_id of this OrderDetail. # noqa: E501
+ :type: str
+ """
+
+ self._order_detail_id = order_detail_id
+
+ @property
+ def create_date_utc(self):
+ """Gets the create_date_utc of this OrderDetail. # noqa: E501
+
+
+ :return: The create_date_utc of this OrderDetail. # noqa: E501
+ :rtype: datetime
+ """
+ return self._create_date_utc
+
+ @create_date_utc.setter
+ def create_date_utc(self, create_date_utc):
+ """Sets the create_date_utc of this OrderDetail.
+
+
+ :param create_date_utc: The create_date_utc of this OrderDetail. # noqa: E501
+ :type: datetime
+ """
+
+ self._create_date_utc = create_date_utc
+
+ @property
+ def last_update_date_utc(self):
+ """Gets the last_update_date_utc of this OrderDetail. # noqa: E501
+
+
+ :return: The last_update_date_utc of this OrderDetail. # noqa: E501
+ :rtype: datetime
+ """
+ return self._last_update_date_utc
+
+ @last_update_date_utc.setter
+ def last_update_date_utc(self, last_update_date_utc):
+ """Sets the last_update_date_utc of this OrderDetail.
+
+
+ :param last_update_date_utc: The last_update_date_utc of this OrderDetail. # noqa: E501
+ :type: datetime
+ """
+
+ self._last_update_date_utc = last_update_date_utc
+
+ @property
+ def acceptance_rejection_date_utc(self):
+ """Gets the acceptance_rejection_date_utc of this OrderDetail. # noqa: E501
+
+
+ :return: The acceptance_rejection_date_utc of this OrderDetail. # noqa: E501
+ :rtype: datetime
+ """
+ return self._acceptance_rejection_date_utc
+
+ @acceptance_rejection_date_utc.setter
+ def acceptance_rejection_date_utc(self, acceptance_rejection_date_utc):
+ """Sets the acceptance_rejection_date_utc of this OrderDetail.
+
+
+ :param acceptance_rejection_date_utc: The acceptance_rejection_date_utc of this OrderDetail. # noqa: E501
+ :type: datetime
+ """
+
+ self._acceptance_rejection_date_utc = acceptance_rejection_date_utc
+
+ @property
+ def cancellation_date_utc(self):
+ """Gets the cancellation_date_utc of this OrderDetail. # noqa: E501
+
+
+ :return: The cancellation_date_utc of this OrderDetail. # noqa: E501
+ :rtype: datetime
+ """
+ return self._cancellation_date_utc
+
+ @cancellation_date_utc.setter
+ def cancellation_date_utc(self, cancellation_date_utc):
+ """Sets the cancellation_date_utc of this OrderDetail.
+
+
+ :param cancellation_date_utc: The cancellation_date_utc of this OrderDetail. # noqa: E501
+ :type: datetime
+ """
+
+ self._cancellation_date_utc = cancellation_date_utc
+
+ @property
+ def order_detail_state(self):
+ """Gets the order_detail_state of this OrderDetail. # noqa: E501
+
+
+ :return: The order_detail_state of this OrderDetail. # noqa: E501
+ :rtype: str
+ """
+ return self._order_detail_state
+
+ @order_detail_state.setter
+ def order_detail_state(self, order_detail_state):
+ """Sets the order_detail_state of this OrderDetail.
+
+
+ :param order_detail_state: The order_detail_state of this OrderDetail. # noqa: E501
+ :type: str
+ """
+ allowed_values = ["WaitingAcceptance", "Accepted", "ShippingInProgress", "Shipped", "Received", "IncidentOpen", "Refunded", "Closed", "Cancelled", "Rejected"] # noqa: E501
+ if order_detail_state not in allowed_values:
+ raise ValueError(
+ "Invalid value for `order_detail_state` ({0}), must be one of {1}" # noqa: E501
+ .format(order_detail_state, allowed_values)
+ )
+
+ self._order_detail_state = order_detail_state
+
+ @property
+ def offer_id(self):
+ """Gets the offer_id of this OrderDetail. # noqa: E501
+
+
+ :return: The offer_id of this OrderDetail. # noqa: E501
+ :rtype: str
+ """
+ return self._offer_id
+
+ @offer_id.setter
+ def offer_id(self, offer_id):
+ """Sets the offer_id of this OrderDetail.
+
+
+ :param offer_id: The offer_id of this OrderDetail. # noqa: E501
+ :type: str
+ """
+
+ self._offer_id = offer_id
+
+ @property
+ def offer_legacy_id(self):
+ """Gets the offer_legacy_id of this OrderDetail. # noqa: E501
+
+
+ :return: The offer_legacy_id of this OrderDetail. # noqa: E501
+ :rtype: int
+ """
+ return self._offer_legacy_id
+
+ @offer_legacy_id.setter
+ def offer_legacy_id(self, offer_legacy_id):
+ """Sets the offer_legacy_id of this OrderDetail.
+
+
+ :param offer_legacy_id: The offer_legacy_id of this OrderDetail. # noqa: E501
+ :type: int
+ """
+
+ self._offer_legacy_id = offer_legacy_id
+
+ @property
+ def offer_lead_time(self):
+ """Gets the offer_lead_time of this OrderDetail. # noqa: E501
+
+
+ :return: The offer_lead_time of this OrderDetail. # noqa: E501
+ :rtype: int
+ """
+ return self._offer_lead_time
+
+ @offer_lead_time.setter
+ def offer_lead_time(self, offer_lead_time):
+ """Sets the offer_lead_time of this OrderDetail.
+
+
+ :param offer_lead_time: The offer_lead_time of this OrderDetail. # noqa: E501
+ :type: int
+ """
+
+ self._offer_lead_time = offer_lead_time
+
+ @property
+ def discount_fee(self):
+ """Gets the discount_fee of this OrderDetail. # noqa: E501
+
+
+ :return: The discount_fee of this OrderDetail. # noqa: E501
+ :rtype: float
+ """
+ return self._discount_fee
+
+ @discount_fee.setter
+ def discount_fee(self, discount_fee):
+ """Sets the discount_fee of this OrderDetail.
+
+
+ :param discount_fee: The discount_fee of this OrderDetail. # noqa: E501
+ :type: float
+ """
+
+ self._discount_fee = discount_fee
+
+ @property
+ def discount_rate(self):
+ """Gets the discount_rate of this OrderDetail. # noqa: E501
+
+
+ :return: The discount_rate of this OrderDetail. # noqa: E501
+ :rtype: float
+ """
+ return self._discount_rate
+
+ @discount_rate.setter
+ def discount_rate(self, discount_rate):
+ """Sets the discount_rate of this OrderDetail.
+
+
+ :param discount_rate: The discount_rate of this OrderDetail. # noqa: E501
+ :type: float
+ """
+
+ self._discount_rate = discount_rate
+
+ @property
+ def total_price(self):
+ """Gets the total_price of this OrderDetail. # noqa: E501
+
+
+ :return: The total_price of this OrderDetail. # noqa: E501
+ :rtype: float
+ """
+ return self._total_price
+
+ @total_price.setter
+ def total_price(self, total_price):
+ """Sets the total_price of this OrderDetail.
+
+
+ :param total_price: The total_price of this OrderDetail. # noqa: E501
+ :type: float
+ """
+
+ self._total_price = total_price
+
+ @property
+ def unit_price(self):
+ """Gets the unit_price of this OrderDetail. # noqa: E501
+
+
+ :return: The unit_price of this OrderDetail. # noqa: E501
+ :rtype: float
+ """
+ return self._unit_price
+
+ @unit_price.setter
+ def unit_price(self, unit_price):
+ """Sets the unit_price of this OrderDetail.
+
+
+ :param unit_price: The unit_price of this OrderDetail. # noqa: E501
+ :type: float
+ """
+
+ self._unit_price = unit_price
+
+ @property
+ def quantity(self):
+ """Gets the quantity of this OrderDetail. # noqa: E501
+
+
+ :return: The quantity of this OrderDetail. # noqa: E501
+ :rtype: int
+ """
+ return self._quantity
+
+ @quantity.setter
+ def quantity(self, quantity):
+ """Sets the quantity of this OrderDetail.
+
+
+ :param quantity: The quantity of this OrderDetail. # noqa: E501
+ :type: int
+ """
+
+ self._quantity = quantity
+
+ @property
+ def product_part_number(self):
+ """Gets the product_part_number of this OrderDetail. # noqa: E501
+
+
+ :return: The product_part_number of this OrderDetail. # noqa: E501
+ :rtype: str
+ """
+ return self._product_part_number
+
+ @product_part_number.setter
+ def product_part_number(self, product_part_number):
+ """Sets the product_part_number of this OrderDetail.
+
+
+ :param product_part_number: The product_part_number of this OrderDetail. # noqa: E501
+ :type: str
+ """
+
+ self._product_part_number = product_part_number
+
+ @property
+ def supplier_sku(self):
+ """Gets the supplier_sku of this OrderDetail. # noqa: E501
+
+
+ :return: The supplier_sku of this OrderDetail. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier_sku
+
+ @supplier_sku.setter
+ def supplier_sku(self, supplier_sku):
+ """Sets the supplier_sku of this OrderDetail.
+
+
+ :param supplier_sku: The supplier_sku of this OrderDetail. # noqa: E501
+ :type: str
+ """
+
+ self._supplier_sku = supplier_sku
+
+ @property
+ def product_business_id(self):
+ """Gets the product_business_id of this OrderDetail. # noqa: E501
+
+
+ :return: The product_business_id of this OrderDetail. # noqa: E501
+ :rtype: str
+ """
+ return self._product_business_id
+
+ @product_business_id.setter
+ def product_business_id(self, product_business_id):
+ """Sets the product_business_id of this OrderDetail.
+
+
+ :param product_business_id: The product_business_id of this OrderDetail. # noqa: E501
+ :type: str
+ """
+
+ self._product_business_id = product_business_id
+
+ @property
+ def adjusted_discount_fee(self):
+ """Gets the adjusted_discount_fee of this OrderDetail. # noqa: E501
+
+
+ :return: The adjusted_discount_fee of this OrderDetail. # noqa: E501
+ :rtype: float
+ """
+ return self._adjusted_discount_fee
+
+ @adjusted_discount_fee.setter
+ def adjusted_discount_fee(self, adjusted_discount_fee):
+ """Sets the adjusted_discount_fee of this OrderDetail.
+
+
+ :param adjusted_discount_fee: The adjusted_discount_fee of this OrderDetail. # noqa: E501
+ :type: float
+ """
+
+ self._adjusted_discount_fee = adjusted_discount_fee
+
+ @property
+ def adjusted_total_price(self):
+ """Gets the adjusted_total_price of this OrderDetail. # noqa: E501
+
+
+ :return: The adjusted_total_price of this OrderDetail. # noqa: E501
+ :rtype: float
+ """
+ return self._adjusted_total_price
+
+ @adjusted_total_price.setter
+ def adjusted_total_price(self, adjusted_total_price):
+ """Sets the adjusted_total_price of this OrderDetail.
+
+
+ :param adjusted_total_price: The adjusted_total_price of this OrderDetail. # noqa: E501
+ :type: float
+ """
+
+ self._adjusted_total_price = adjusted_total_price
+
+ @property
+ def adjusted_quantity(self):
+ """Gets the adjusted_quantity of this OrderDetail. # noqa: E501
+
+
+ :return: The adjusted_quantity of this OrderDetail. # noqa: E501
+ :rtype: int
+ """
+ return self._adjusted_quantity
+
+ @adjusted_quantity.setter
+ def adjusted_quantity(self, adjusted_quantity):
+ """Sets the adjusted_quantity of this OrderDetail.
+
+
+ :param adjusted_quantity: The adjusted_quantity of this OrderDetail. # noqa: E501
+ :type: int
+ """
+
+ self._adjusted_quantity = adjusted_quantity
+
+ @property
+ def cancellations(self):
+ """Gets the cancellations of this OrderDetail. # noqa: E501
+
+
+ :return: The cancellations of this OrderDetail. # noqa: E501
+ :rtype: list[OrderCancellation]
+ """
+ return self._cancellations
+
+ @cancellations.setter
+ def cancellations(self, cancellations):
+ """Sets the cancellations of this OrderDetail.
+
+
+ :param cancellations: The cancellations of this OrderDetail. # noqa: E501
+ :type: list[OrderCancellation]
+ """
+
+ self._cancellations = cancellations
+
+ @property
+ def incidents(self):
+ """Gets the incidents of this OrderDetail. # noqa: E501
+
+
+ :return: The incidents of this OrderDetail. # noqa: E501
+ :rtype: list[OrderIncident]
+ """
+ return self._incidents
+
+ @incidents.setter
+ def incidents(self, incidents):
+ """Sets the incidents of this OrderDetail.
+
+
+ :param incidents: The incidents of this OrderDetail. # noqa: E501
+ :type: list[OrderIncident]
+ """
+
+ self._incidents = incidents
+
+ @property
+ def additional_fields(self):
+ """Gets the additional_fields of this OrderDetail. # noqa: E501
+
+
+ :return: The additional_fields of this OrderDetail. # noqa: E501
+ :rtype: list[AdditionalField]
+ """
+ return self._additional_fields
+
+ @additional_fields.setter
+ def additional_fields(self, additional_fields):
+ """Sets the additional_fields of this OrderDetail.
+
+
+ :param additional_fields: The additional_fields of this OrderDetail. # noqa: E501
+ :type: list[AdditionalField]
+ """
+
+ self._additional_fields = additional_fields
+
+ @property
+ def product_image_url(self):
+ """Gets the product_image_url of this OrderDetail. # noqa: E501
+
+
+ :return: The product_image_url of this OrderDetail. # noqa: E501
+ :rtype: str
+ """
+ return self._product_image_url
+
+ @product_image_url.setter
+ def product_image_url(self, product_image_url):
+ """Sets the product_image_url of this OrderDetail.
+
+
+ :param product_image_url: The product_image_url of this OrderDetail. # noqa: E501
+ :type: str
+ """
+
+ self._product_image_url = product_image_url
+
+ @property
+ def product_category_name(self):
+ """Gets the product_category_name of this OrderDetail. # noqa: E501
+
+
+ :return: The product_category_name of this OrderDetail. # noqa: E501
+ :rtype: str
+ """
+ return self._product_category_name
+
+ @product_category_name.setter
+ def product_category_name(self, product_category_name):
+ """Sets the product_category_name of this OrderDetail.
+
+
+ :param product_category_name: The product_category_name of this OrderDetail. # noqa: E501
+ :type: str
+ """
+
+ self._product_category_name = product_category_name
+
+ @property
+ def offer_description(self):
+ """Gets the offer_description of this OrderDetail. # noqa: E501
+
+
+ :return: The offer_description of this OrderDetail. # noqa: E501
+ :rtype: str
+ """
+ return self._offer_description
+
+ @offer_description.setter
+ def offer_description(self, offer_description):
+ """Sets the offer_description of this OrderDetail.
+
+
+ :param offer_description: The offer_description of this OrderDetail. # noqa: E501
+ :type: str
+ """
+
+ self._offer_description = offer_description
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(OrderDetail, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, OrderDetail):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/order_expanded.py b/digikey/v3/marketplace/models/order_expanded.py
new file mode 100644
index 0000000..d745848
--- /dev/null
+++ b/digikey/v3/marketplace/models/order_expanded.py
@@ -0,0 +1,1089 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class OrderExpanded(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'supplier_name': 'str',
+ 'shipping_method_label': 'str',
+ 'shipping_region_label': 'str',
+ 'id': 'str',
+ 'business_id': 'str',
+ 'accounting_document_id': 'str',
+ 'accounting_document_number': 'str',
+ 'payment_status': 'str',
+ 'create_date_utc': 'datetime',
+ 'last_update_date_utc': 'datetime',
+ 'customer_debited_date_utc': 'datetime',
+ 'acceptance_rejection_date_utc': 'datetime',
+ 'received_date_utc': 'datetime',
+ 'shipped_date_utc': 'datetime',
+ 'cancellation_date_utc': 'datetime',
+ 'shipping_deadline_utc': 'datetime',
+ 'lead_time_to_ship': 'int',
+ 'order_state': 'str',
+ 'customer': 'Customer',
+ 'supplier_id': 'str',
+ 'supplier_legacy_id': 'int',
+ 'supplier_business_id': 'str',
+ 'order_details': 'list[OrderDetail]',
+ 'additional_fields': 'list[AdditionalField]',
+ 'subtotal_price': 'float',
+ 'total_price': 'float',
+ 'total_discount_fee': 'float',
+ 'adjusted_subtotal_price': 'float',
+ 'adjusted_total_price': 'float',
+ 'adjusted_total_discount_fee': 'float',
+ 'shipping_price': 'float',
+ 'adjusted_shipping_price': 'float',
+ 'shipping_tracking_info_list': 'list[ShippingTrackingInfo]',
+ 'shipping_method_code': 'str',
+ 'shipping_region_code': 'str',
+ 'tracking_required': 'bool',
+ 'refunds': 'list[OrderRefund]',
+ 'supplier_invoice_number': 'str'
+ }
+
+ attribute_map = {
+ 'supplier_name': 'supplierName',
+ 'shipping_method_label': 'shippingMethodLabel',
+ 'shipping_region_label': 'shippingRegionLabel',
+ 'id': 'id',
+ 'business_id': 'businessId',
+ 'accounting_document_id': 'accountingDocumentId',
+ 'accounting_document_number': 'accountingDocumentNumber',
+ 'payment_status': 'paymentStatus',
+ 'create_date_utc': 'createDateUtc',
+ 'last_update_date_utc': 'lastUpdateDateUtc',
+ 'customer_debited_date_utc': 'customerDebitedDateUtc',
+ 'acceptance_rejection_date_utc': 'acceptanceRejectionDateUtc',
+ 'received_date_utc': 'receivedDateUtc',
+ 'shipped_date_utc': 'shippedDateUtc',
+ 'cancellation_date_utc': 'cancellationDateUtc',
+ 'shipping_deadline_utc': 'shippingDeadlineUtc',
+ 'lead_time_to_ship': 'leadTimeToShip',
+ 'order_state': 'orderState',
+ 'customer': 'customer',
+ 'supplier_id': 'supplierId',
+ 'supplier_legacy_id': 'supplierLegacyId',
+ 'supplier_business_id': 'supplierBusinessId',
+ 'order_details': 'orderDetails',
+ 'additional_fields': 'additionalFields',
+ 'subtotal_price': 'subtotalPrice',
+ 'total_price': 'totalPrice',
+ 'total_discount_fee': 'totalDiscountFee',
+ 'adjusted_subtotal_price': 'adjustedSubtotalPrice',
+ 'adjusted_total_price': 'adjustedTotalPrice',
+ 'adjusted_total_discount_fee': 'adjustedTotalDiscountFee',
+ 'shipping_price': 'shippingPrice',
+ 'adjusted_shipping_price': 'adjustedShippingPrice',
+ 'shipping_tracking_info_list': 'shippingTrackingInfoList',
+ 'shipping_method_code': 'shippingMethodCode',
+ 'shipping_region_code': 'shippingRegionCode',
+ 'tracking_required': 'trackingRequired',
+ 'refunds': 'refunds',
+ 'supplier_invoice_number': 'supplierInvoiceNumber'
+ }
+
+ def __init__(self, supplier_name=None, shipping_method_label=None, shipping_region_label=None, id=None, business_id=None, accounting_document_id=None, accounting_document_number=None, payment_status=None, create_date_utc=None, last_update_date_utc=None, customer_debited_date_utc=None, acceptance_rejection_date_utc=None, received_date_utc=None, shipped_date_utc=None, cancellation_date_utc=None, shipping_deadline_utc=None, lead_time_to_ship=None, order_state=None, customer=None, supplier_id=None, supplier_legacy_id=None, supplier_business_id=None, order_details=None, additional_fields=None, subtotal_price=None, total_price=None, total_discount_fee=None, adjusted_subtotal_price=None, adjusted_total_price=None, adjusted_total_discount_fee=None, shipping_price=None, adjusted_shipping_price=None, shipping_tracking_info_list=None, shipping_method_code=None, shipping_region_code=None, tracking_required=None, refunds=None, supplier_invoice_number=None): # noqa: E501
+ """OrderExpanded - a model defined in Swagger""" # noqa: E501
+
+ self._supplier_name = None
+ self._shipping_method_label = None
+ self._shipping_region_label = None
+ self._id = None
+ self._business_id = None
+ self._accounting_document_id = None
+ self._accounting_document_number = None
+ self._payment_status = None
+ self._create_date_utc = None
+ self._last_update_date_utc = None
+ self._customer_debited_date_utc = None
+ self._acceptance_rejection_date_utc = None
+ self._received_date_utc = None
+ self._shipped_date_utc = None
+ self._cancellation_date_utc = None
+ self._shipping_deadline_utc = None
+ self._lead_time_to_ship = None
+ self._order_state = None
+ self._customer = None
+ self._supplier_id = None
+ self._supplier_legacy_id = None
+ self._supplier_business_id = None
+ self._order_details = None
+ self._additional_fields = None
+ self._subtotal_price = None
+ self._total_price = None
+ self._total_discount_fee = None
+ self._adjusted_subtotal_price = None
+ self._adjusted_total_price = None
+ self._adjusted_total_discount_fee = None
+ self._shipping_price = None
+ self._adjusted_shipping_price = None
+ self._shipping_tracking_info_list = None
+ self._shipping_method_code = None
+ self._shipping_region_code = None
+ self._tracking_required = None
+ self._refunds = None
+ self._supplier_invoice_number = None
+ self.discriminator = None
+
+ if supplier_name is not None:
+ self.supplier_name = supplier_name
+ if shipping_method_label is not None:
+ self.shipping_method_label = shipping_method_label
+ if shipping_region_label is not None:
+ self.shipping_region_label = shipping_region_label
+ if id is not None:
+ self.id = id
+ if business_id is not None:
+ self.business_id = business_id
+ if accounting_document_id is not None:
+ self.accounting_document_id = accounting_document_id
+ if accounting_document_number is not None:
+ self.accounting_document_number = accounting_document_number
+ if payment_status is not None:
+ self.payment_status = payment_status
+ if create_date_utc is not None:
+ self.create_date_utc = create_date_utc
+ if last_update_date_utc is not None:
+ self.last_update_date_utc = last_update_date_utc
+ if customer_debited_date_utc is not None:
+ self.customer_debited_date_utc = customer_debited_date_utc
+ if acceptance_rejection_date_utc is not None:
+ self.acceptance_rejection_date_utc = acceptance_rejection_date_utc
+ if received_date_utc is not None:
+ self.received_date_utc = received_date_utc
+ if shipped_date_utc is not None:
+ self.shipped_date_utc = shipped_date_utc
+ if cancellation_date_utc is not None:
+ self.cancellation_date_utc = cancellation_date_utc
+ if shipping_deadline_utc is not None:
+ self.shipping_deadline_utc = shipping_deadline_utc
+ if lead_time_to_ship is not None:
+ self.lead_time_to_ship = lead_time_to_ship
+ if order_state is not None:
+ self.order_state = order_state
+ if customer is not None:
+ self.customer = customer
+ if supplier_id is not None:
+ self.supplier_id = supplier_id
+ if supplier_legacy_id is not None:
+ self.supplier_legacy_id = supplier_legacy_id
+ if supplier_business_id is not None:
+ self.supplier_business_id = supplier_business_id
+ if order_details is not None:
+ self.order_details = order_details
+ if additional_fields is not None:
+ self.additional_fields = additional_fields
+ if subtotal_price is not None:
+ self.subtotal_price = subtotal_price
+ if total_price is not None:
+ self.total_price = total_price
+ if total_discount_fee is not None:
+ self.total_discount_fee = total_discount_fee
+ if adjusted_subtotal_price is not None:
+ self.adjusted_subtotal_price = adjusted_subtotal_price
+ if adjusted_total_price is not None:
+ self.adjusted_total_price = adjusted_total_price
+ if adjusted_total_discount_fee is not None:
+ self.adjusted_total_discount_fee = adjusted_total_discount_fee
+ if shipping_price is not None:
+ self.shipping_price = shipping_price
+ if adjusted_shipping_price is not None:
+ self.adjusted_shipping_price = adjusted_shipping_price
+ if shipping_tracking_info_list is not None:
+ self.shipping_tracking_info_list = shipping_tracking_info_list
+ if shipping_method_code is not None:
+ self.shipping_method_code = shipping_method_code
+ if shipping_region_code is not None:
+ self.shipping_region_code = shipping_region_code
+ if tracking_required is not None:
+ self.tracking_required = tracking_required
+ if refunds is not None:
+ self.refunds = refunds
+ if supplier_invoice_number is not None:
+ self.supplier_invoice_number = supplier_invoice_number
+
+ @property
+ def supplier_name(self):
+ """Gets the supplier_name of this OrderExpanded. # noqa: E501
+
+
+ :return: The supplier_name of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier_name
+
+ @supplier_name.setter
+ def supplier_name(self, supplier_name):
+ """Sets the supplier_name of this OrderExpanded.
+
+
+ :param supplier_name: The supplier_name of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._supplier_name = supplier_name
+
+ @property
+ def shipping_method_label(self):
+ """Gets the shipping_method_label of this OrderExpanded. # noqa: E501
+
+
+ :return: The shipping_method_label of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_method_label
+
+ @shipping_method_label.setter
+ def shipping_method_label(self, shipping_method_label):
+ """Sets the shipping_method_label of this OrderExpanded.
+
+
+ :param shipping_method_label: The shipping_method_label of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_method_label = shipping_method_label
+
+ @property
+ def shipping_region_label(self):
+ """Gets the shipping_region_label of this OrderExpanded. # noqa: E501
+
+
+ :return: The shipping_region_label of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_region_label
+
+ @shipping_region_label.setter
+ def shipping_region_label(self, shipping_region_label):
+ """Sets the shipping_region_label of this OrderExpanded.
+
+
+ :param shipping_region_label: The shipping_region_label of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_region_label = shipping_region_label
+
+ @property
+ def id(self):
+ """Gets the id of this OrderExpanded. # noqa: E501
+
+
+ :return: The id of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this OrderExpanded.
+
+
+ :param id: The id of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._id = id
+
+ @property
+ def business_id(self):
+ """Gets the business_id of this OrderExpanded. # noqa: E501
+
+
+ :return: The business_id of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._business_id
+
+ @business_id.setter
+ def business_id(self, business_id):
+ """Sets the business_id of this OrderExpanded.
+
+
+ :param business_id: The business_id of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._business_id = business_id
+
+ @property
+ def accounting_document_id(self):
+ """Gets the accounting_document_id of this OrderExpanded. # noqa: E501
+
+
+ :return: The accounting_document_id of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._accounting_document_id
+
+ @accounting_document_id.setter
+ def accounting_document_id(self, accounting_document_id):
+ """Sets the accounting_document_id of this OrderExpanded.
+
+
+ :param accounting_document_id: The accounting_document_id of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._accounting_document_id = accounting_document_id
+
+ @property
+ def accounting_document_number(self):
+ """Gets the accounting_document_number of this OrderExpanded. # noqa: E501
+
+
+ :return: The accounting_document_number of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._accounting_document_number
+
+ @accounting_document_number.setter
+ def accounting_document_number(self, accounting_document_number):
+ """Sets the accounting_document_number of this OrderExpanded.
+
+
+ :param accounting_document_number: The accounting_document_number of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._accounting_document_number = accounting_document_number
+
+ @property
+ def payment_status(self):
+ """Gets the payment_status of this OrderExpanded. # noqa: E501
+
+
+ :return: The payment_status of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._payment_status
+
+ @payment_status.setter
+ def payment_status(self, payment_status):
+ """Sets the payment_status of this OrderExpanded.
+
+
+ :param payment_status: The payment_status of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+ allowed_values = ["Pending", "Payable", "Paid", "Invoiced"] # noqa: E501
+ if payment_status not in allowed_values:
+ raise ValueError(
+ "Invalid value for `payment_status` ({0}), must be one of {1}" # noqa: E501
+ .format(payment_status, allowed_values)
+ )
+
+ self._payment_status = payment_status
+
+ @property
+ def create_date_utc(self):
+ """Gets the create_date_utc of this OrderExpanded. # noqa: E501
+
+
+ :return: The create_date_utc of this OrderExpanded. # noqa: E501
+ :rtype: datetime
+ """
+ return self._create_date_utc
+
+ @create_date_utc.setter
+ def create_date_utc(self, create_date_utc):
+ """Sets the create_date_utc of this OrderExpanded.
+
+
+ :param create_date_utc: The create_date_utc of this OrderExpanded. # noqa: E501
+ :type: datetime
+ """
+
+ self._create_date_utc = create_date_utc
+
+ @property
+ def last_update_date_utc(self):
+ """Gets the last_update_date_utc of this OrderExpanded. # noqa: E501
+
+
+ :return: The last_update_date_utc of this OrderExpanded. # noqa: E501
+ :rtype: datetime
+ """
+ return self._last_update_date_utc
+
+ @last_update_date_utc.setter
+ def last_update_date_utc(self, last_update_date_utc):
+ """Sets the last_update_date_utc of this OrderExpanded.
+
+
+ :param last_update_date_utc: The last_update_date_utc of this OrderExpanded. # noqa: E501
+ :type: datetime
+ """
+
+ self._last_update_date_utc = last_update_date_utc
+
+ @property
+ def customer_debited_date_utc(self):
+ """Gets the customer_debited_date_utc of this OrderExpanded. # noqa: E501
+
+
+ :return: The customer_debited_date_utc of this OrderExpanded. # noqa: E501
+ :rtype: datetime
+ """
+ return self._customer_debited_date_utc
+
+ @customer_debited_date_utc.setter
+ def customer_debited_date_utc(self, customer_debited_date_utc):
+ """Sets the customer_debited_date_utc of this OrderExpanded.
+
+
+ :param customer_debited_date_utc: The customer_debited_date_utc of this OrderExpanded. # noqa: E501
+ :type: datetime
+ """
+
+ self._customer_debited_date_utc = customer_debited_date_utc
+
+ @property
+ def acceptance_rejection_date_utc(self):
+ """Gets the acceptance_rejection_date_utc of this OrderExpanded. # noqa: E501
+
+
+ :return: The acceptance_rejection_date_utc of this OrderExpanded. # noqa: E501
+ :rtype: datetime
+ """
+ return self._acceptance_rejection_date_utc
+
+ @acceptance_rejection_date_utc.setter
+ def acceptance_rejection_date_utc(self, acceptance_rejection_date_utc):
+ """Sets the acceptance_rejection_date_utc of this OrderExpanded.
+
+
+ :param acceptance_rejection_date_utc: The acceptance_rejection_date_utc of this OrderExpanded. # noqa: E501
+ :type: datetime
+ """
+
+ self._acceptance_rejection_date_utc = acceptance_rejection_date_utc
+
+ @property
+ def received_date_utc(self):
+ """Gets the received_date_utc of this OrderExpanded. # noqa: E501
+
+
+ :return: The received_date_utc of this OrderExpanded. # noqa: E501
+ :rtype: datetime
+ """
+ return self._received_date_utc
+
+ @received_date_utc.setter
+ def received_date_utc(self, received_date_utc):
+ """Sets the received_date_utc of this OrderExpanded.
+
+
+ :param received_date_utc: The received_date_utc of this OrderExpanded. # noqa: E501
+ :type: datetime
+ """
+
+ self._received_date_utc = received_date_utc
+
+ @property
+ def shipped_date_utc(self):
+ """Gets the shipped_date_utc of this OrderExpanded. # noqa: E501
+
+
+ :return: The shipped_date_utc of this OrderExpanded. # noqa: E501
+ :rtype: datetime
+ """
+ return self._shipped_date_utc
+
+ @shipped_date_utc.setter
+ def shipped_date_utc(self, shipped_date_utc):
+ """Sets the shipped_date_utc of this OrderExpanded.
+
+
+ :param shipped_date_utc: The shipped_date_utc of this OrderExpanded. # noqa: E501
+ :type: datetime
+ """
+
+ self._shipped_date_utc = shipped_date_utc
+
+ @property
+ def cancellation_date_utc(self):
+ """Gets the cancellation_date_utc of this OrderExpanded. # noqa: E501
+
+
+ :return: The cancellation_date_utc of this OrderExpanded. # noqa: E501
+ :rtype: datetime
+ """
+ return self._cancellation_date_utc
+
+ @cancellation_date_utc.setter
+ def cancellation_date_utc(self, cancellation_date_utc):
+ """Sets the cancellation_date_utc of this OrderExpanded.
+
+
+ :param cancellation_date_utc: The cancellation_date_utc of this OrderExpanded. # noqa: E501
+ :type: datetime
+ """
+
+ self._cancellation_date_utc = cancellation_date_utc
+
+ @property
+ def shipping_deadline_utc(self):
+ """Gets the shipping_deadline_utc of this OrderExpanded. # noqa: E501
+
+
+ :return: The shipping_deadline_utc of this OrderExpanded. # noqa: E501
+ :rtype: datetime
+ """
+ return self._shipping_deadline_utc
+
+ @shipping_deadline_utc.setter
+ def shipping_deadline_utc(self, shipping_deadline_utc):
+ """Sets the shipping_deadline_utc of this OrderExpanded.
+
+
+ :param shipping_deadline_utc: The shipping_deadline_utc of this OrderExpanded. # noqa: E501
+ :type: datetime
+ """
+
+ self._shipping_deadline_utc = shipping_deadline_utc
+
+ @property
+ def lead_time_to_ship(self):
+ """Gets the lead_time_to_ship of this OrderExpanded. # noqa: E501
+
+
+ :return: The lead_time_to_ship of this OrderExpanded. # noqa: E501
+ :rtype: int
+ """
+ return self._lead_time_to_ship
+
+ @lead_time_to_ship.setter
+ def lead_time_to_ship(self, lead_time_to_ship):
+ """Sets the lead_time_to_ship of this OrderExpanded.
+
+
+ :param lead_time_to_ship: The lead_time_to_ship of this OrderExpanded. # noqa: E501
+ :type: int
+ """
+
+ self._lead_time_to_ship = lead_time_to_ship
+
+ @property
+ def order_state(self):
+ """Gets the order_state of this OrderExpanded. # noqa: E501
+
+
+ :return: The order_state of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._order_state
+
+ @order_state.setter
+ def order_state(self, order_state):
+ """Sets the order_state of this OrderExpanded.
+
+
+ :param order_state: The order_state of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+ allowed_values = ["WaitingAcceptance", "Accepted", "ShippingInProgress", "Shipped", "Received", "IncidentOpen", "Refunded", "Closed", "Cancelled", "Rejected"] # noqa: E501
+ if order_state not in allowed_values:
+ raise ValueError(
+ "Invalid value for `order_state` ({0}), must be one of {1}" # noqa: E501
+ .format(order_state, allowed_values)
+ )
+
+ self._order_state = order_state
+
+ @property
+ def customer(self):
+ """Gets the customer of this OrderExpanded. # noqa: E501
+
+
+ :return: The customer of this OrderExpanded. # noqa: E501
+ :rtype: Customer
+ """
+ return self._customer
+
+ @customer.setter
+ def customer(self, customer):
+ """Sets the customer of this OrderExpanded.
+
+
+ :param customer: The customer of this OrderExpanded. # noqa: E501
+ :type: Customer
+ """
+
+ self._customer = customer
+
+ @property
+ def supplier_id(self):
+ """Gets the supplier_id of this OrderExpanded. # noqa: E501
+
+
+ :return: The supplier_id of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier_id
+
+ @supplier_id.setter
+ def supplier_id(self, supplier_id):
+ """Sets the supplier_id of this OrderExpanded.
+
+
+ :param supplier_id: The supplier_id of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._supplier_id = supplier_id
+
+ @property
+ def supplier_legacy_id(self):
+ """Gets the supplier_legacy_id of this OrderExpanded. # noqa: E501
+
+
+ :return: The supplier_legacy_id of this OrderExpanded. # noqa: E501
+ :rtype: int
+ """
+ return self._supplier_legacy_id
+
+ @supplier_legacy_id.setter
+ def supplier_legacy_id(self, supplier_legacy_id):
+ """Sets the supplier_legacy_id of this OrderExpanded.
+
+
+ :param supplier_legacy_id: The supplier_legacy_id of this OrderExpanded. # noqa: E501
+ :type: int
+ """
+
+ self._supplier_legacy_id = supplier_legacy_id
+
+ @property
+ def supplier_business_id(self):
+ """Gets the supplier_business_id of this OrderExpanded. # noqa: E501
+
+
+ :return: The supplier_business_id of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier_business_id
+
+ @supplier_business_id.setter
+ def supplier_business_id(self, supplier_business_id):
+ """Sets the supplier_business_id of this OrderExpanded.
+
+
+ :param supplier_business_id: The supplier_business_id of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._supplier_business_id = supplier_business_id
+
+ @property
+ def order_details(self):
+ """Gets the order_details of this OrderExpanded. # noqa: E501
+
+
+ :return: The order_details of this OrderExpanded. # noqa: E501
+ :rtype: list[OrderDetail]
+ """
+ return self._order_details
+
+ @order_details.setter
+ def order_details(self, order_details):
+ """Sets the order_details of this OrderExpanded.
+
+
+ :param order_details: The order_details of this OrderExpanded. # noqa: E501
+ :type: list[OrderDetail]
+ """
+
+ self._order_details = order_details
+
+ @property
+ def additional_fields(self):
+ """Gets the additional_fields of this OrderExpanded. # noqa: E501
+
+
+ :return: The additional_fields of this OrderExpanded. # noqa: E501
+ :rtype: list[AdditionalField]
+ """
+ return self._additional_fields
+
+ @additional_fields.setter
+ def additional_fields(self, additional_fields):
+ """Sets the additional_fields of this OrderExpanded.
+
+
+ :param additional_fields: The additional_fields of this OrderExpanded. # noqa: E501
+ :type: list[AdditionalField]
+ """
+
+ self._additional_fields = additional_fields
+
+ @property
+ def subtotal_price(self):
+ """Gets the subtotal_price of this OrderExpanded. # noqa: E501
+
+
+ :return: The subtotal_price of this OrderExpanded. # noqa: E501
+ :rtype: float
+ """
+ return self._subtotal_price
+
+ @subtotal_price.setter
+ def subtotal_price(self, subtotal_price):
+ """Sets the subtotal_price of this OrderExpanded.
+
+
+ :param subtotal_price: The subtotal_price of this OrderExpanded. # noqa: E501
+ :type: float
+ """
+
+ self._subtotal_price = subtotal_price
+
+ @property
+ def total_price(self):
+ """Gets the total_price of this OrderExpanded. # noqa: E501
+
+
+ :return: The total_price of this OrderExpanded. # noqa: E501
+ :rtype: float
+ """
+ return self._total_price
+
+ @total_price.setter
+ def total_price(self, total_price):
+ """Sets the total_price of this OrderExpanded.
+
+
+ :param total_price: The total_price of this OrderExpanded. # noqa: E501
+ :type: float
+ """
+
+ self._total_price = total_price
+
+ @property
+ def total_discount_fee(self):
+ """Gets the total_discount_fee of this OrderExpanded. # noqa: E501
+
+
+ :return: The total_discount_fee of this OrderExpanded. # noqa: E501
+ :rtype: float
+ """
+ return self._total_discount_fee
+
+ @total_discount_fee.setter
+ def total_discount_fee(self, total_discount_fee):
+ """Sets the total_discount_fee of this OrderExpanded.
+
+
+ :param total_discount_fee: The total_discount_fee of this OrderExpanded. # noqa: E501
+ :type: float
+ """
+
+ self._total_discount_fee = total_discount_fee
+
+ @property
+ def adjusted_subtotal_price(self):
+ """Gets the adjusted_subtotal_price of this OrderExpanded. # noqa: E501
+
+
+ :return: The adjusted_subtotal_price of this OrderExpanded. # noqa: E501
+ :rtype: float
+ """
+ return self._adjusted_subtotal_price
+
+ @adjusted_subtotal_price.setter
+ def adjusted_subtotal_price(self, adjusted_subtotal_price):
+ """Sets the adjusted_subtotal_price of this OrderExpanded.
+
+
+ :param adjusted_subtotal_price: The adjusted_subtotal_price of this OrderExpanded. # noqa: E501
+ :type: float
+ """
+
+ self._adjusted_subtotal_price = adjusted_subtotal_price
+
+ @property
+ def adjusted_total_price(self):
+ """Gets the adjusted_total_price of this OrderExpanded. # noqa: E501
+
+
+ :return: The adjusted_total_price of this OrderExpanded. # noqa: E501
+ :rtype: float
+ """
+ return self._adjusted_total_price
+
+ @adjusted_total_price.setter
+ def adjusted_total_price(self, adjusted_total_price):
+ """Sets the adjusted_total_price of this OrderExpanded.
+
+
+ :param adjusted_total_price: The adjusted_total_price of this OrderExpanded. # noqa: E501
+ :type: float
+ """
+
+ self._adjusted_total_price = adjusted_total_price
+
+ @property
+ def adjusted_total_discount_fee(self):
+ """Gets the adjusted_total_discount_fee of this OrderExpanded. # noqa: E501
+
+
+ :return: The adjusted_total_discount_fee of this OrderExpanded. # noqa: E501
+ :rtype: float
+ """
+ return self._adjusted_total_discount_fee
+
+ @adjusted_total_discount_fee.setter
+ def adjusted_total_discount_fee(self, adjusted_total_discount_fee):
+ """Sets the adjusted_total_discount_fee of this OrderExpanded.
+
+
+ :param adjusted_total_discount_fee: The adjusted_total_discount_fee of this OrderExpanded. # noqa: E501
+ :type: float
+ """
+
+ self._adjusted_total_discount_fee = adjusted_total_discount_fee
+
+ @property
+ def shipping_price(self):
+ """Gets the shipping_price of this OrderExpanded. # noqa: E501
+
+
+ :return: The shipping_price of this OrderExpanded. # noqa: E501
+ :rtype: float
+ """
+ return self._shipping_price
+
+ @shipping_price.setter
+ def shipping_price(self, shipping_price):
+ """Sets the shipping_price of this OrderExpanded.
+
+
+ :param shipping_price: The shipping_price of this OrderExpanded. # noqa: E501
+ :type: float
+ """
+
+ self._shipping_price = shipping_price
+
+ @property
+ def adjusted_shipping_price(self):
+ """Gets the adjusted_shipping_price of this OrderExpanded. # noqa: E501
+
+
+ :return: The adjusted_shipping_price of this OrderExpanded. # noqa: E501
+ :rtype: float
+ """
+ return self._adjusted_shipping_price
+
+ @adjusted_shipping_price.setter
+ def adjusted_shipping_price(self, adjusted_shipping_price):
+ """Sets the adjusted_shipping_price of this OrderExpanded.
+
+
+ :param adjusted_shipping_price: The adjusted_shipping_price of this OrderExpanded. # noqa: E501
+ :type: float
+ """
+
+ self._adjusted_shipping_price = adjusted_shipping_price
+
+ @property
+ def shipping_tracking_info_list(self):
+ """Gets the shipping_tracking_info_list of this OrderExpanded. # noqa: E501
+
+
+ :return: The shipping_tracking_info_list of this OrderExpanded. # noqa: E501
+ :rtype: list[ShippingTrackingInfo]
+ """
+ return self._shipping_tracking_info_list
+
+ @shipping_tracking_info_list.setter
+ def shipping_tracking_info_list(self, shipping_tracking_info_list):
+ """Sets the shipping_tracking_info_list of this OrderExpanded.
+
+
+ :param shipping_tracking_info_list: The shipping_tracking_info_list of this OrderExpanded. # noqa: E501
+ :type: list[ShippingTrackingInfo]
+ """
+
+ self._shipping_tracking_info_list = shipping_tracking_info_list
+
+ @property
+ def shipping_method_code(self):
+ """Gets the shipping_method_code of this OrderExpanded. # noqa: E501
+
+
+ :return: The shipping_method_code of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_method_code
+
+ @shipping_method_code.setter
+ def shipping_method_code(self, shipping_method_code):
+ """Sets the shipping_method_code of this OrderExpanded.
+
+
+ :param shipping_method_code: The shipping_method_code of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_method_code = shipping_method_code
+
+ @property
+ def shipping_region_code(self):
+ """Gets the shipping_region_code of this OrderExpanded. # noqa: E501
+
+
+ :return: The shipping_region_code of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_region_code
+
+ @shipping_region_code.setter
+ def shipping_region_code(self, shipping_region_code):
+ """Sets the shipping_region_code of this OrderExpanded.
+
+
+ :param shipping_region_code: The shipping_region_code of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_region_code = shipping_region_code
+
+ @property
+ def tracking_required(self):
+ """Gets the tracking_required of this OrderExpanded. # noqa: E501
+
+
+ :return: The tracking_required of this OrderExpanded. # noqa: E501
+ :rtype: bool
+ """
+ return self._tracking_required
+
+ @tracking_required.setter
+ def tracking_required(self, tracking_required):
+ """Sets the tracking_required of this OrderExpanded.
+
+
+ :param tracking_required: The tracking_required of this OrderExpanded. # noqa: E501
+ :type: bool
+ """
+
+ self._tracking_required = tracking_required
+
+ @property
+ def refunds(self):
+ """Gets the refunds of this OrderExpanded. # noqa: E501
+
+
+ :return: The refunds of this OrderExpanded. # noqa: E501
+ :rtype: list[OrderRefund]
+ """
+ return self._refunds
+
+ @refunds.setter
+ def refunds(self, refunds):
+ """Sets the refunds of this OrderExpanded.
+
+
+ :param refunds: The refunds of this OrderExpanded. # noqa: E501
+ :type: list[OrderRefund]
+ """
+
+ self._refunds = refunds
+
+ @property
+ def supplier_invoice_number(self):
+ """Gets the supplier_invoice_number of this OrderExpanded. # noqa: E501
+
+
+ :return: The supplier_invoice_number of this OrderExpanded. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier_invoice_number
+
+ @supplier_invoice_number.setter
+ def supplier_invoice_number(self, supplier_invoice_number):
+ """Sets the supplier_invoice_number of this OrderExpanded.
+
+
+ :param supplier_invoice_number: The supplier_invoice_number of this OrderExpanded. # noqa: E501
+ :type: str
+ """
+
+ self._supplier_invoice_number = supplier_invoice_number
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(OrderExpanded, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, OrderExpanded):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/order_incident.py b/digikey/v3/marketplace/models/order_incident.py
new file mode 100644
index 0000000..bb02b2f
--- /dev/null
+++ b/digikey/v3/marketplace/models/order_incident.py
@@ -0,0 +1,329 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class OrderIncident(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'id': 'str',
+ 'reason_open_code': 'str',
+ 'reason_close_code': 'str',
+ 'reason_open_label': 'str',
+ 'reason_close_label': 'str',
+ 'incident_state': 'str',
+ 'incident_opened_date': 'datetime',
+ 'incident_closed_date': 'datetime',
+ 'incident_disputed_date': 'datetime'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'reason_open_code': 'reasonOpenCode',
+ 'reason_close_code': 'reasonCloseCode',
+ 'reason_open_label': 'reasonOpenLabel',
+ 'reason_close_label': 'reasonCloseLabel',
+ 'incident_state': 'incidentState',
+ 'incident_opened_date': 'incidentOpenedDate',
+ 'incident_closed_date': 'incidentClosedDate',
+ 'incident_disputed_date': 'incidentDisputedDate'
+ }
+
+ def __init__(self, id=None, reason_open_code=None, reason_close_code=None, reason_open_label=None, reason_close_label=None, incident_state=None, incident_opened_date=None, incident_closed_date=None, incident_disputed_date=None): # noqa: E501
+ """OrderIncident - a model defined in Swagger""" # noqa: E501
+
+ self._id = None
+ self._reason_open_code = None
+ self._reason_close_code = None
+ self._reason_open_label = None
+ self._reason_close_label = None
+ self._incident_state = None
+ self._incident_opened_date = None
+ self._incident_closed_date = None
+ self._incident_disputed_date = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if reason_open_code is not None:
+ self.reason_open_code = reason_open_code
+ if reason_close_code is not None:
+ self.reason_close_code = reason_close_code
+ if reason_open_label is not None:
+ self.reason_open_label = reason_open_label
+ if reason_close_label is not None:
+ self.reason_close_label = reason_close_label
+ if incident_state is not None:
+ self.incident_state = incident_state
+ if incident_opened_date is not None:
+ self.incident_opened_date = incident_opened_date
+ if incident_closed_date is not None:
+ self.incident_closed_date = incident_closed_date
+ if incident_disputed_date is not None:
+ self.incident_disputed_date = incident_disputed_date
+
+ @property
+ def id(self):
+ """Gets the id of this OrderIncident. # noqa: E501
+
+
+ :return: The id of this OrderIncident. # noqa: E501
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this OrderIncident.
+
+
+ :param id: The id of this OrderIncident. # noqa: E501
+ :type: str
+ """
+
+ self._id = id
+
+ @property
+ def reason_open_code(self):
+ """Gets the reason_open_code of this OrderIncident. # noqa: E501
+
+
+ :return: The reason_open_code of this OrderIncident. # noqa: E501
+ :rtype: str
+ """
+ return self._reason_open_code
+
+ @reason_open_code.setter
+ def reason_open_code(self, reason_open_code):
+ """Sets the reason_open_code of this OrderIncident.
+
+
+ :param reason_open_code: The reason_open_code of this OrderIncident. # noqa: E501
+ :type: str
+ """
+
+ self._reason_open_code = reason_open_code
+
+ @property
+ def reason_close_code(self):
+ """Gets the reason_close_code of this OrderIncident. # noqa: E501
+
+
+ :return: The reason_close_code of this OrderIncident. # noqa: E501
+ :rtype: str
+ """
+ return self._reason_close_code
+
+ @reason_close_code.setter
+ def reason_close_code(self, reason_close_code):
+ """Sets the reason_close_code of this OrderIncident.
+
+
+ :param reason_close_code: The reason_close_code of this OrderIncident. # noqa: E501
+ :type: str
+ """
+
+ self._reason_close_code = reason_close_code
+
+ @property
+ def reason_open_label(self):
+ """Gets the reason_open_label of this OrderIncident. # noqa: E501
+
+
+ :return: The reason_open_label of this OrderIncident. # noqa: E501
+ :rtype: str
+ """
+ return self._reason_open_label
+
+ @reason_open_label.setter
+ def reason_open_label(self, reason_open_label):
+ """Sets the reason_open_label of this OrderIncident.
+
+
+ :param reason_open_label: The reason_open_label of this OrderIncident. # noqa: E501
+ :type: str
+ """
+
+ self._reason_open_label = reason_open_label
+
+ @property
+ def reason_close_label(self):
+ """Gets the reason_close_label of this OrderIncident. # noqa: E501
+
+
+ :return: The reason_close_label of this OrderIncident. # noqa: E501
+ :rtype: str
+ """
+ return self._reason_close_label
+
+ @reason_close_label.setter
+ def reason_close_label(self, reason_close_label):
+ """Sets the reason_close_label of this OrderIncident.
+
+
+ :param reason_close_label: The reason_close_label of this OrderIncident. # noqa: E501
+ :type: str
+ """
+
+ self._reason_close_label = reason_close_label
+
+ @property
+ def incident_state(self):
+ """Gets the incident_state of this OrderIncident. # noqa: E501
+
+
+ :return: The incident_state of this OrderIncident. # noqa: E501
+ :rtype: str
+ """
+ return self._incident_state
+
+ @incident_state.setter
+ def incident_state(self, incident_state):
+ """Sets the incident_state of this OrderIncident.
+
+
+ :param incident_state: The incident_state of this OrderIncident. # noqa: E501
+ :type: str
+ """
+ allowed_values = ["IncidentOpen", "IncidentClosed", "IncidentDisputed"] # noqa: E501
+ if incident_state not in allowed_values:
+ raise ValueError(
+ "Invalid value for `incident_state` ({0}), must be one of {1}" # noqa: E501
+ .format(incident_state, allowed_values)
+ )
+
+ self._incident_state = incident_state
+
+ @property
+ def incident_opened_date(self):
+ """Gets the incident_opened_date of this OrderIncident. # noqa: E501
+
+
+ :return: The incident_opened_date of this OrderIncident. # noqa: E501
+ :rtype: datetime
+ """
+ return self._incident_opened_date
+
+ @incident_opened_date.setter
+ def incident_opened_date(self, incident_opened_date):
+ """Sets the incident_opened_date of this OrderIncident.
+
+
+ :param incident_opened_date: The incident_opened_date of this OrderIncident. # noqa: E501
+ :type: datetime
+ """
+
+ self._incident_opened_date = incident_opened_date
+
+ @property
+ def incident_closed_date(self):
+ """Gets the incident_closed_date of this OrderIncident. # noqa: E501
+
+
+ :return: The incident_closed_date of this OrderIncident. # noqa: E501
+ :rtype: datetime
+ """
+ return self._incident_closed_date
+
+ @incident_closed_date.setter
+ def incident_closed_date(self, incident_closed_date):
+ """Sets the incident_closed_date of this OrderIncident.
+
+
+ :param incident_closed_date: The incident_closed_date of this OrderIncident. # noqa: E501
+ :type: datetime
+ """
+
+ self._incident_closed_date = incident_closed_date
+
+ @property
+ def incident_disputed_date(self):
+ """Gets the incident_disputed_date of this OrderIncident. # noqa: E501
+
+
+ :return: The incident_disputed_date of this OrderIncident. # noqa: E501
+ :rtype: datetime
+ """
+ return self._incident_disputed_date
+
+ @incident_disputed_date.setter
+ def incident_disputed_date(self, incident_disputed_date):
+ """Sets the incident_disputed_date of this OrderIncident.
+
+
+ :param incident_disputed_date: The incident_disputed_date of this OrderIncident. # noqa: E501
+ :type: datetime
+ """
+
+ self._incident_disputed_date = incident_disputed_date
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(OrderIncident, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, OrderIncident):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/order_refund.py b/digikey/v3/marketplace/models/order_refund.py
new file mode 100644
index 0000000..3228e7f
--- /dev/null
+++ b/digikey/v3/marketplace/models/order_refund.py
@@ -0,0 +1,407 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class OrderRefund(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'id': 'str',
+ 'legacy_id': 'int',
+ 'business_order_id': 'str',
+ 'order_id': 'str',
+ 'shipping_amount': 'float',
+ 'refund_state': 'str',
+ 'transaction_number': 'str',
+ 'create_date_utc': 'datetime',
+ 'transaction_date_utc': 'datetime',
+ 'refund_items': 'list[OrderRefundItem]',
+ 'shipping_reason_code': 'str',
+ 'shipping_reason_label': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'id',
+ 'legacy_id': 'legacyId',
+ 'business_order_id': 'businessOrderId',
+ 'order_id': 'orderId',
+ 'shipping_amount': 'shippingAmount',
+ 'refund_state': 'refundState',
+ 'transaction_number': 'transactionNumber',
+ 'create_date_utc': 'createDateUtc',
+ 'transaction_date_utc': 'transactionDateUtc',
+ 'refund_items': 'refundItems',
+ 'shipping_reason_code': 'shippingReasonCode',
+ 'shipping_reason_label': 'shippingReasonLabel'
+ }
+
+ def __init__(self, id=None, legacy_id=None, business_order_id=None, order_id=None, shipping_amount=None, refund_state=None, transaction_number=None, create_date_utc=None, transaction_date_utc=None, refund_items=None, shipping_reason_code=None, shipping_reason_label=None): # noqa: E501
+ """OrderRefund - a model defined in Swagger""" # noqa: E501
+
+ self._id = None
+ self._legacy_id = None
+ self._business_order_id = None
+ self._order_id = None
+ self._shipping_amount = None
+ self._refund_state = None
+ self._transaction_number = None
+ self._create_date_utc = None
+ self._transaction_date_utc = None
+ self._refund_items = None
+ self._shipping_reason_code = None
+ self._shipping_reason_label = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if legacy_id is not None:
+ self.legacy_id = legacy_id
+ if business_order_id is not None:
+ self.business_order_id = business_order_id
+ if order_id is not None:
+ self.order_id = order_id
+ if shipping_amount is not None:
+ self.shipping_amount = shipping_amount
+ if refund_state is not None:
+ self.refund_state = refund_state
+ if transaction_number is not None:
+ self.transaction_number = transaction_number
+ if create_date_utc is not None:
+ self.create_date_utc = create_date_utc
+ if transaction_date_utc is not None:
+ self.transaction_date_utc = transaction_date_utc
+ if refund_items is not None:
+ self.refund_items = refund_items
+ if shipping_reason_code is not None:
+ self.shipping_reason_code = shipping_reason_code
+ if shipping_reason_label is not None:
+ self.shipping_reason_label = shipping_reason_label
+
+ @property
+ def id(self):
+ """Gets the id of this OrderRefund. # noqa: E501
+
+
+ :return: The id of this OrderRefund. # noqa: E501
+ :rtype: str
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this OrderRefund.
+
+
+ :param id: The id of this OrderRefund. # noqa: E501
+ :type: str
+ """
+
+ self._id = id
+
+ @property
+ def legacy_id(self):
+ """Gets the legacy_id of this OrderRefund. # noqa: E501
+
+
+ :return: The legacy_id of this OrderRefund. # noqa: E501
+ :rtype: int
+ """
+ return self._legacy_id
+
+ @legacy_id.setter
+ def legacy_id(self, legacy_id):
+ """Sets the legacy_id of this OrderRefund.
+
+
+ :param legacy_id: The legacy_id of this OrderRefund. # noqa: E501
+ :type: int
+ """
+
+ self._legacy_id = legacy_id
+
+ @property
+ def business_order_id(self):
+ """Gets the business_order_id of this OrderRefund. # noqa: E501
+
+
+ :return: The business_order_id of this OrderRefund. # noqa: E501
+ :rtype: str
+ """
+ return self._business_order_id
+
+ @business_order_id.setter
+ def business_order_id(self, business_order_id):
+ """Sets the business_order_id of this OrderRefund.
+
+
+ :param business_order_id: The business_order_id of this OrderRefund. # noqa: E501
+ :type: str
+ """
+
+ self._business_order_id = business_order_id
+
+ @property
+ def order_id(self):
+ """Gets the order_id of this OrderRefund. # noqa: E501
+
+
+ :return: The order_id of this OrderRefund. # noqa: E501
+ :rtype: str
+ """
+ return self._order_id
+
+ @order_id.setter
+ def order_id(self, order_id):
+ """Sets the order_id of this OrderRefund.
+
+
+ :param order_id: The order_id of this OrderRefund. # noqa: E501
+ :type: str
+ """
+
+ self._order_id = order_id
+
+ @property
+ def shipping_amount(self):
+ """Gets the shipping_amount of this OrderRefund. # noqa: E501
+
+
+ :return: The shipping_amount of this OrderRefund. # noqa: E501
+ :rtype: float
+ """
+ return self._shipping_amount
+
+ @shipping_amount.setter
+ def shipping_amount(self, shipping_amount):
+ """Sets the shipping_amount of this OrderRefund.
+
+
+ :param shipping_amount: The shipping_amount of this OrderRefund. # noqa: E501
+ :type: float
+ """
+
+ self._shipping_amount = shipping_amount
+
+ @property
+ def refund_state(self):
+ """Gets the refund_state of this OrderRefund. # noqa: E501
+
+
+ :return: The refund_state of this OrderRefund. # noqa: E501
+ :rtype: str
+ """
+ return self._refund_state
+
+ @refund_state.setter
+ def refund_state(self, refund_state):
+ """Sets the refund_state of this OrderRefund.
+
+
+ :param refund_state: The refund_state of this OrderRefund. # noqa: E501
+ :type: str
+ """
+ allowed_values = ["WaitingRefund", "Refunded", "Refused"] # noqa: E501
+ if refund_state not in allowed_values:
+ raise ValueError(
+ "Invalid value for `refund_state` ({0}), must be one of {1}" # noqa: E501
+ .format(refund_state, allowed_values)
+ )
+
+ self._refund_state = refund_state
+
+ @property
+ def transaction_number(self):
+ """Gets the transaction_number of this OrderRefund. # noqa: E501
+
+
+ :return: The transaction_number of this OrderRefund. # noqa: E501
+ :rtype: str
+ """
+ return self._transaction_number
+
+ @transaction_number.setter
+ def transaction_number(self, transaction_number):
+ """Sets the transaction_number of this OrderRefund.
+
+
+ :param transaction_number: The transaction_number of this OrderRefund. # noqa: E501
+ :type: str
+ """
+
+ self._transaction_number = transaction_number
+
+ @property
+ def create_date_utc(self):
+ """Gets the create_date_utc of this OrderRefund. # noqa: E501
+
+
+ :return: The create_date_utc of this OrderRefund. # noqa: E501
+ :rtype: datetime
+ """
+ return self._create_date_utc
+
+ @create_date_utc.setter
+ def create_date_utc(self, create_date_utc):
+ """Sets the create_date_utc of this OrderRefund.
+
+
+ :param create_date_utc: The create_date_utc of this OrderRefund. # noqa: E501
+ :type: datetime
+ """
+
+ self._create_date_utc = create_date_utc
+
+ @property
+ def transaction_date_utc(self):
+ """Gets the transaction_date_utc of this OrderRefund. # noqa: E501
+
+
+ :return: The transaction_date_utc of this OrderRefund. # noqa: E501
+ :rtype: datetime
+ """
+ return self._transaction_date_utc
+
+ @transaction_date_utc.setter
+ def transaction_date_utc(self, transaction_date_utc):
+ """Sets the transaction_date_utc of this OrderRefund.
+
+
+ :param transaction_date_utc: The transaction_date_utc of this OrderRefund. # noqa: E501
+ :type: datetime
+ """
+
+ self._transaction_date_utc = transaction_date_utc
+
+ @property
+ def refund_items(self):
+ """Gets the refund_items of this OrderRefund. # noqa: E501
+
+
+ :return: The refund_items of this OrderRefund. # noqa: E501
+ :rtype: list[OrderRefundItem]
+ """
+ return self._refund_items
+
+ @refund_items.setter
+ def refund_items(self, refund_items):
+ """Sets the refund_items of this OrderRefund.
+
+
+ :param refund_items: The refund_items of this OrderRefund. # noqa: E501
+ :type: list[OrderRefundItem]
+ """
+
+ self._refund_items = refund_items
+
+ @property
+ def shipping_reason_code(self):
+ """Gets the shipping_reason_code of this OrderRefund. # noqa: E501
+
+
+ :return: The shipping_reason_code of this OrderRefund. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_reason_code
+
+ @shipping_reason_code.setter
+ def shipping_reason_code(self, shipping_reason_code):
+ """Sets the shipping_reason_code of this OrderRefund.
+
+
+ :param shipping_reason_code: The shipping_reason_code of this OrderRefund. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_reason_code = shipping_reason_code
+
+ @property
+ def shipping_reason_label(self):
+ """Gets the shipping_reason_label of this OrderRefund. # noqa: E501
+
+
+ :return: The shipping_reason_label of this OrderRefund. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_reason_label
+
+ @shipping_reason_label.setter
+ def shipping_reason_label(self, shipping_reason_label):
+ """Sets the shipping_reason_label of this OrderRefund.
+
+
+ :param shipping_reason_label: The shipping_reason_label of this OrderRefund. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_reason_label = shipping_reason_label
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(OrderRefund, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, OrderRefund):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/order_refund_item.py b/digikey/v3/marketplace/models/order_refund_item.py
new file mode 100644
index 0000000..08ebd5d
--- /dev/null
+++ b/digikey/v3/marketplace/models/order_refund_item.py
@@ -0,0 +1,245 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class OrderRefundItem(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'order_detail_id': 'str',
+ 'amount': 'float',
+ 'quantity': 'int',
+ 'reason_code': 'str',
+ 'reason_label': 'str',
+ 'discount_amount': 'float'
+ }
+
+ attribute_map = {
+ 'order_detail_id': 'orderDetailId',
+ 'amount': 'amount',
+ 'quantity': 'quantity',
+ 'reason_code': 'reasonCode',
+ 'reason_label': 'reasonLabel',
+ 'discount_amount': 'discountAmount'
+ }
+
+ def __init__(self, order_detail_id=None, amount=None, quantity=None, reason_code=None, reason_label=None, discount_amount=None): # noqa: E501
+ """OrderRefundItem - a model defined in Swagger""" # noqa: E501
+
+ self._order_detail_id = None
+ self._amount = None
+ self._quantity = None
+ self._reason_code = None
+ self._reason_label = None
+ self._discount_amount = None
+ self.discriminator = None
+
+ if order_detail_id is not None:
+ self.order_detail_id = order_detail_id
+ if amount is not None:
+ self.amount = amount
+ if quantity is not None:
+ self.quantity = quantity
+ if reason_code is not None:
+ self.reason_code = reason_code
+ if reason_label is not None:
+ self.reason_label = reason_label
+ if discount_amount is not None:
+ self.discount_amount = discount_amount
+
+ @property
+ def order_detail_id(self):
+ """Gets the order_detail_id of this OrderRefundItem. # noqa: E501
+
+
+ :return: The order_detail_id of this OrderRefundItem. # noqa: E501
+ :rtype: str
+ """
+ return self._order_detail_id
+
+ @order_detail_id.setter
+ def order_detail_id(self, order_detail_id):
+ """Sets the order_detail_id of this OrderRefundItem.
+
+
+ :param order_detail_id: The order_detail_id of this OrderRefundItem. # noqa: E501
+ :type: str
+ """
+
+ self._order_detail_id = order_detail_id
+
+ @property
+ def amount(self):
+ """Gets the amount of this OrderRefundItem. # noqa: E501
+
+
+ :return: The amount of this OrderRefundItem. # noqa: E501
+ :rtype: float
+ """
+ return self._amount
+
+ @amount.setter
+ def amount(self, amount):
+ """Sets the amount of this OrderRefundItem.
+
+
+ :param amount: The amount of this OrderRefundItem. # noqa: E501
+ :type: float
+ """
+
+ self._amount = amount
+
+ @property
+ def quantity(self):
+ """Gets the quantity of this OrderRefundItem. # noqa: E501
+
+
+ :return: The quantity of this OrderRefundItem. # noqa: E501
+ :rtype: int
+ """
+ return self._quantity
+
+ @quantity.setter
+ def quantity(self, quantity):
+ """Sets the quantity of this OrderRefundItem.
+
+
+ :param quantity: The quantity of this OrderRefundItem. # noqa: E501
+ :type: int
+ """
+
+ self._quantity = quantity
+
+ @property
+ def reason_code(self):
+ """Gets the reason_code of this OrderRefundItem. # noqa: E501
+
+
+ :return: The reason_code of this OrderRefundItem. # noqa: E501
+ :rtype: str
+ """
+ return self._reason_code
+
+ @reason_code.setter
+ def reason_code(self, reason_code):
+ """Sets the reason_code of this OrderRefundItem.
+
+
+ :param reason_code: The reason_code of this OrderRefundItem. # noqa: E501
+ :type: str
+ """
+
+ self._reason_code = reason_code
+
+ @property
+ def reason_label(self):
+ """Gets the reason_label of this OrderRefundItem. # noqa: E501
+
+
+ :return: The reason_label of this OrderRefundItem. # noqa: E501
+ :rtype: str
+ """
+ return self._reason_label
+
+ @reason_label.setter
+ def reason_label(self, reason_label):
+ """Sets the reason_label of this OrderRefundItem.
+
+
+ :param reason_label: The reason_label of this OrderRefundItem. # noqa: E501
+ :type: str
+ """
+
+ self._reason_label = reason_label
+
+ @property
+ def discount_amount(self):
+ """Gets the discount_amount of this OrderRefundItem. # noqa: E501
+
+
+ :return: The discount_amount of this OrderRefundItem. # noqa: E501
+ :rtype: float
+ """
+ return self._discount_amount
+
+ @discount_amount.setter
+ def discount_amount(self, discount_amount):
+ """Sets the discount_amount of this OrderRefundItem.
+
+
+ :param discount_amount: The discount_amount of this OrderRefundItem. # noqa: E501
+ :type: float
+ """
+
+ self._discount_amount = discount_amount
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(OrderRefundItem, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, OrderRefundItem):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/problem_details.py b/digikey/v3/marketplace/models/problem_details.py
new file mode 100644
index 0000000..a75ca5c
--- /dev/null
+++ b/digikey/v3/marketplace/models/problem_details.py
@@ -0,0 +1,278 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ProblemDetails(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'detail': 'str',
+ 'instance': 'str',
+ 'status': 'int',
+ 'title': 'str',
+ 'type': 'str',
+ 'errors': 'dict(str, list[str])',
+ 'correlation_id': 'str'
+ }
+
+ attribute_map = {
+ 'detail': 'detail',
+ 'instance': 'instance',
+ 'status': 'status',
+ 'title': 'title',
+ 'type': 'type',
+ 'errors': 'errors',
+ 'correlation_id': 'correlationId'
+ }
+
+ def __init__(self, detail=None, instance=None, status=None, title=None, type=None, errors=None, correlation_id=None): # noqa: E501
+ """ProblemDetails - a model defined in Swagger""" # noqa: E501
+
+ self._detail = None
+ self._instance = None
+ self._status = None
+ self._title = None
+ self._type = None
+ self._errors = None
+ self._correlation_id = None
+ self.discriminator = None
+
+ self.detail = detail
+ self.instance = instance
+ self.status = status
+ self.title = title
+ self.type = type
+ self.errors = errors
+ self.correlation_id = correlation_id
+
+ @property
+ def detail(self):
+ """Gets the detail of this ProblemDetails. # noqa: E501
+
+
+ :return: The detail of this ProblemDetails. # noqa: E501
+ :rtype: str
+ """
+ return self._detail
+
+ @detail.setter
+ def detail(self, detail):
+ """Sets the detail of this ProblemDetails.
+
+
+ :param detail: The detail of this ProblemDetails. # noqa: E501
+ :type: str
+ """
+ if detail is None:
+ raise ValueError("Invalid value for `detail`, must not be `None`") # noqa: E501
+
+ self._detail = detail
+
+ @property
+ def instance(self):
+ """Gets the instance of this ProblemDetails. # noqa: E501
+
+
+ :return: The instance of this ProblemDetails. # noqa: E501
+ :rtype: str
+ """
+ return self._instance
+
+ @instance.setter
+ def instance(self, instance):
+ """Sets the instance of this ProblemDetails.
+
+
+ :param instance: The instance of this ProblemDetails. # noqa: E501
+ :type: str
+ """
+ if instance is None:
+ raise ValueError("Invalid value for `instance`, must not be `None`") # noqa: E501
+
+ self._instance = instance
+
+ @property
+ def status(self):
+ """Gets the status of this ProblemDetails. # noqa: E501
+
+
+ :return: The status of this ProblemDetails. # noqa: E501
+ :rtype: int
+ """
+ return self._status
+
+ @status.setter
+ def status(self, status):
+ """Sets the status of this ProblemDetails.
+
+
+ :param status: The status of this ProblemDetails. # noqa: E501
+ :type: int
+ """
+ if status is None:
+ raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501
+
+ self._status = status
+
+ @property
+ def title(self):
+ """Gets the title of this ProblemDetails. # noqa: E501
+
+
+ :return: The title of this ProblemDetails. # noqa: E501
+ :rtype: str
+ """
+ return self._title
+
+ @title.setter
+ def title(self, title):
+ """Sets the title of this ProblemDetails.
+
+
+ :param title: The title of this ProblemDetails. # noqa: E501
+ :type: str
+ """
+ if title is None:
+ raise ValueError("Invalid value for `title`, must not be `None`") # noqa: E501
+
+ self._title = title
+
+ @property
+ def type(self):
+ """Gets the type of this ProblemDetails. # noqa: E501
+
+
+ :return: The type of this ProblemDetails. # noqa: E501
+ :rtype: str
+ """
+ return self._type
+
+ @type.setter
+ def type(self, type):
+ """Sets the type of this ProblemDetails.
+
+
+ :param type: The type of this ProblemDetails. # noqa: E501
+ :type: str
+ """
+ if type is None:
+ raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501
+
+ self._type = type
+
+ @property
+ def errors(self):
+ """Gets the errors of this ProblemDetails. # noqa: E501
+
+
+ :return: The errors of this ProblemDetails. # noqa: E501
+ :rtype: dict(str, list[str])
+ """
+ return self._errors
+
+ @errors.setter
+ def errors(self, errors):
+ """Sets the errors of this ProblemDetails.
+
+
+ :param errors: The errors of this ProblemDetails. # noqa: E501
+ :type: dict(str, list[str])
+ """
+ if errors is None:
+ raise ValueError("Invalid value for `errors`, must not be `None`") # noqa: E501
+
+ self._errors = errors
+
+ @property
+ def correlation_id(self):
+ """Gets the correlation_id of this ProblemDetails. # noqa: E501
+
+
+ :return: The correlation_id of this ProblemDetails. # noqa: E501
+ :rtype: str
+ """
+ return self._correlation_id
+
+ @correlation_id.setter
+ def correlation_id(self, correlation_id):
+ """Sets the correlation_id of this ProblemDetails.
+
+
+ :param correlation_id: The correlation_id of this ProblemDetails. # noqa: E501
+ :type: str
+ """
+ if correlation_id is None:
+ raise ValueError("Invalid value for `correlation_id`, must not be `None`") # noqa: E501
+
+ self._correlation_id = correlation_id
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(ProblemDetails, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ProblemDetails):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/ship_order_model.py b/digikey/v3/marketplace/models/ship_order_model.py
new file mode 100644
index 0000000..301f949
--- /dev/null
+++ b/digikey/v3/marketplace/models/ship_order_model.py
@@ -0,0 +1,115 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ShipOrderModel(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'shipping_tracking': 'list[ShippingTrackingInformationModel]'
+ }
+
+ attribute_map = {
+ 'shipping_tracking': 'shippingTracking'
+ }
+
+ def __init__(self, shipping_tracking=None): # noqa: E501
+ """ShipOrderModel - a model defined in Swagger""" # noqa: E501
+
+ self._shipping_tracking = None
+ self.discriminator = None
+
+ if shipping_tracking is not None:
+ self.shipping_tracking = shipping_tracking
+
+ @property
+ def shipping_tracking(self):
+ """Gets the shipping_tracking of this ShipOrderModel. # noqa: E501
+
+
+ :return: The shipping_tracking of this ShipOrderModel. # noqa: E501
+ :rtype: list[ShippingTrackingInformationModel]
+ """
+ return self._shipping_tracking
+
+ @shipping_tracking.setter
+ def shipping_tracking(self, shipping_tracking):
+ """Sets the shipping_tracking of this ShipOrderModel.
+
+
+ :param shipping_tracking: The shipping_tracking of this ShipOrderModel. # noqa: E501
+ :type: list[ShippingTrackingInformationModel]
+ """
+
+ self._shipping_tracking = shipping_tracking
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(ShipOrderModel, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ShipOrderModel):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/shipping_tracking_info.py b/digikey/v3/marketplace/models/shipping_tracking_info.py
new file mode 100644
index 0000000..5276691
--- /dev/null
+++ b/digikey/v3/marketplace/models/shipping_tracking_info.py
@@ -0,0 +1,193 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ShippingTrackingInfo(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'shipping_carrier_id': 'str',
+ 'shipping_tracking_number': 'str',
+ 'shipping_tracking_url': 'str',
+ 'shipping_carrier_name': 'str'
+ }
+
+ attribute_map = {
+ 'shipping_carrier_id': 'shippingCarrierId',
+ 'shipping_tracking_number': 'shippingTrackingNumber',
+ 'shipping_tracking_url': 'shippingTrackingURL',
+ 'shipping_carrier_name': 'shippingCarrierName'
+ }
+
+ def __init__(self, shipping_carrier_id=None, shipping_tracking_number=None, shipping_tracking_url=None, shipping_carrier_name=None): # noqa: E501
+ """ShippingTrackingInfo - a model defined in Swagger""" # noqa: E501
+
+ self._shipping_carrier_id = None
+ self._shipping_tracking_number = None
+ self._shipping_tracking_url = None
+ self._shipping_carrier_name = None
+ self.discriminator = None
+
+ if shipping_carrier_id is not None:
+ self.shipping_carrier_id = shipping_carrier_id
+ if shipping_tracking_number is not None:
+ self.shipping_tracking_number = shipping_tracking_number
+ if shipping_tracking_url is not None:
+ self.shipping_tracking_url = shipping_tracking_url
+ if shipping_carrier_name is not None:
+ self.shipping_carrier_name = shipping_carrier_name
+
+ @property
+ def shipping_carrier_id(self):
+ """Gets the shipping_carrier_id of this ShippingTrackingInfo. # noqa: E501
+
+
+ :return: The shipping_carrier_id of this ShippingTrackingInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_carrier_id
+
+ @shipping_carrier_id.setter
+ def shipping_carrier_id(self, shipping_carrier_id):
+ """Sets the shipping_carrier_id of this ShippingTrackingInfo.
+
+
+ :param shipping_carrier_id: The shipping_carrier_id of this ShippingTrackingInfo. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_carrier_id = shipping_carrier_id
+
+ @property
+ def shipping_tracking_number(self):
+ """Gets the shipping_tracking_number of this ShippingTrackingInfo. # noqa: E501
+
+
+ :return: The shipping_tracking_number of this ShippingTrackingInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_tracking_number
+
+ @shipping_tracking_number.setter
+ def shipping_tracking_number(self, shipping_tracking_number):
+ """Sets the shipping_tracking_number of this ShippingTrackingInfo.
+
+
+ :param shipping_tracking_number: The shipping_tracking_number of this ShippingTrackingInfo. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_tracking_number = shipping_tracking_number
+
+ @property
+ def shipping_tracking_url(self):
+ """Gets the shipping_tracking_url of this ShippingTrackingInfo. # noqa: E501
+
+
+ :return: The shipping_tracking_url of this ShippingTrackingInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_tracking_url
+
+ @shipping_tracking_url.setter
+ def shipping_tracking_url(self, shipping_tracking_url):
+ """Sets the shipping_tracking_url of this ShippingTrackingInfo.
+
+
+ :param shipping_tracking_url: The shipping_tracking_url of this ShippingTrackingInfo. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_tracking_url = shipping_tracking_url
+
+ @property
+ def shipping_carrier_name(self):
+ """Gets the shipping_carrier_name of this ShippingTrackingInfo. # noqa: E501
+
+
+ :return: The shipping_carrier_name of this ShippingTrackingInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_carrier_name
+
+ @shipping_carrier_name.setter
+ def shipping_carrier_name(self, shipping_carrier_name):
+ """Sets the shipping_carrier_name of this ShippingTrackingInfo.
+
+
+ :param shipping_carrier_name: The shipping_carrier_name of this ShippingTrackingInfo. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_carrier_name = shipping_carrier_name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(ShippingTrackingInfo, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ShippingTrackingInfo):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/shipping_tracking_information_model.py b/digikey/v3/marketplace/models/shipping_tracking_information_model.py
new file mode 100644
index 0000000..86e6a59
--- /dev/null
+++ b/digikey/v3/marketplace/models/shipping_tracking_information_model.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ShippingTrackingInformationModel(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'shipping_carrier_id': 'str',
+ 'shipping_tracking_number': 'str'
+ }
+
+ attribute_map = {
+ 'shipping_carrier_id': 'shippingCarrierId',
+ 'shipping_tracking_number': 'shippingTrackingNumber'
+ }
+
+ def __init__(self, shipping_carrier_id=None, shipping_tracking_number=None): # noqa: E501
+ """ShippingTrackingInformationModel - a model defined in Swagger""" # noqa: E501
+
+ self._shipping_carrier_id = None
+ self._shipping_tracking_number = None
+ self.discriminator = None
+
+ if shipping_carrier_id is not None:
+ self.shipping_carrier_id = shipping_carrier_id
+ if shipping_tracking_number is not None:
+ self.shipping_tracking_number = shipping_tracking_number
+
+ @property
+ def shipping_carrier_id(self):
+ """Gets the shipping_carrier_id of this ShippingTrackingInformationModel. # noqa: E501
+
+
+ :return: The shipping_carrier_id of this ShippingTrackingInformationModel. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_carrier_id
+
+ @shipping_carrier_id.setter
+ def shipping_carrier_id(self, shipping_carrier_id):
+ """Sets the shipping_carrier_id of this ShippingTrackingInformationModel.
+
+
+ :param shipping_carrier_id: The shipping_carrier_id of this ShippingTrackingInformationModel. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_carrier_id = shipping_carrier_id
+
+ @property
+ def shipping_tracking_number(self):
+ """Gets the shipping_tracking_number of this ShippingTrackingInformationModel. # noqa: E501
+
+
+ :return: The shipping_tracking_number of this ShippingTrackingInformationModel. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_tracking_number
+
+ @shipping_tracking_number.setter
+ def shipping_tracking_number(self, shipping_tracking_number):
+ """Sets the shipping_tracking_number of this ShippingTrackingInformationModel.
+
+
+ :param shipping_tracking_number: The shipping_tracking_number of this ShippingTrackingInformationModel. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_tracking_number = shipping_tracking_number
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(ShippingTrackingInformationModel, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ShippingTrackingInformationModel):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/update_order_additional_fields_command_body.py b/digikey/v3/marketplace/models/update_order_additional_fields_command_body.py
new file mode 100644
index 0000000..4b71756
--- /dev/null
+++ b/digikey/v3/marketplace/models/update_order_additional_fields_command_body.py
@@ -0,0 +1,116 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class UpdateOrderAdditionalFieldsCommandBody(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'additional_fields': 'list[AdditionalField]'
+ }
+
+ attribute_map = {
+ 'additional_fields': 'additionalFields'
+ }
+
+ def __init__(self, additional_fields=None): # noqa: E501
+ """UpdateOrderAdditionalFieldsCommandBody - a model defined in Swagger""" # noqa: E501
+
+ self._additional_fields = None
+ self.discriminator = None
+
+ self.additional_fields = additional_fields
+
+ @property
+ def additional_fields(self):
+ """Gets the additional_fields of this UpdateOrderAdditionalFieldsCommandBody. # noqa: E501
+
+
+ :return: The additional_fields of this UpdateOrderAdditionalFieldsCommandBody. # noqa: E501
+ :rtype: list[AdditionalField]
+ """
+ return self._additional_fields
+
+ @additional_fields.setter
+ def additional_fields(self, additional_fields):
+ """Sets the additional_fields of this UpdateOrderAdditionalFieldsCommandBody.
+
+
+ :param additional_fields: The additional_fields of this UpdateOrderAdditionalFieldsCommandBody. # noqa: E501
+ :type: list[AdditionalField]
+ """
+ if additional_fields is None:
+ raise ValueError("Invalid value for `additional_fields`, must not be `None`") # noqa: E501
+
+ self._additional_fields = additional_fields
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(UpdateOrderAdditionalFieldsCommandBody, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UpdateOrderAdditionalFieldsCommandBody):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/update_order_additional_fields_error_result.py b/digikey/v3/marketplace/models/update_order_additional_fields_error_result.py
new file mode 100644
index 0000000..1ada60d
--- /dev/null
+++ b/digikey/v3/marketplace/models/update_order_additional_fields_error_result.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class UpdateOrderAdditionalFieldsErrorResult(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'error_message': 'str',
+ 'item': 'AdditionalField'
+ }
+
+ attribute_map = {
+ 'error_message': 'errorMessage',
+ 'item': 'item'
+ }
+
+ def __init__(self, error_message=None, item=None): # noqa: E501
+ """UpdateOrderAdditionalFieldsErrorResult - a model defined in Swagger""" # noqa: E501
+
+ self._error_message = None
+ self._item = None
+ self.discriminator = None
+
+ if error_message is not None:
+ self.error_message = error_message
+ if item is not None:
+ self.item = item
+
+ @property
+ def error_message(self):
+ """Gets the error_message of this UpdateOrderAdditionalFieldsErrorResult. # noqa: E501
+
+
+ :return: The error_message of this UpdateOrderAdditionalFieldsErrorResult. # noqa: E501
+ :rtype: str
+ """
+ return self._error_message
+
+ @error_message.setter
+ def error_message(self, error_message):
+ """Sets the error_message of this UpdateOrderAdditionalFieldsErrorResult.
+
+
+ :param error_message: The error_message of this UpdateOrderAdditionalFieldsErrorResult. # noqa: E501
+ :type: str
+ """
+
+ self._error_message = error_message
+
+ @property
+ def item(self):
+ """Gets the item of this UpdateOrderAdditionalFieldsErrorResult. # noqa: E501
+
+
+ :return: The item of this UpdateOrderAdditionalFieldsErrorResult. # noqa: E501
+ :rtype: AdditionalField
+ """
+ return self._item
+
+ @item.setter
+ def item(self, item):
+ """Sets the item of this UpdateOrderAdditionalFieldsErrorResult.
+
+
+ :param item: The item of this UpdateOrderAdditionalFieldsErrorResult. # noqa: E501
+ :type: AdditionalField
+ """
+
+ self._item = item
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(UpdateOrderAdditionalFieldsErrorResult, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UpdateOrderAdditionalFieldsErrorResult):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/models/update_order_additional_fields_errors_page.py b/digikey/v3/marketplace/models/update_order_additional_fields_errors_page.py
new file mode 100644
index 0000000..b80047a
--- /dev/null
+++ b/digikey/v3/marketplace/models/update_order_additional_fields_errors_page.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class UpdateOrderAdditionalFieldsErrorsPage(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'errors': 'list[UpdateOrderAdditionalFieldsErrorResult]',
+ 'error_count': 'int'
+ }
+
+ attribute_map = {
+ 'errors': 'errors',
+ 'error_count': 'errorCount'
+ }
+
+ def __init__(self, errors=None, error_count=None): # noqa: E501
+ """UpdateOrderAdditionalFieldsErrorsPage - a model defined in Swagger""" # noqa: E501
+
+ self._errors = None
+ self._error_count = None
+ self.discriminator = None
+
+ if errors is not None:
+ self.errors = errors
+ if error_count is not None:
+ self.error_count = error_count
+
+ @property
+ def errors(self):
+ """Gets the errors of this UpdateOrderAdditionalFieldsErrorsPage. # noqa: E501
+
+
+ :return: The errors of this UpdateOrderAdditionalFieldsErrorsPage. # noqa: E501
+ :rtype: list[UpdateOrderAdditionalFieldsErrorResult]
+ """
+ return self._errors
+
+ @errors.setter
+ def errors(self, errors):
+ """Sets the errors of this UpdateOrderAdditionalFieldsErrorsPage.
+
+
+ :param errors: The errors of this UpdateOrderAdditionalFieldsErrorsPage. # noqa: E501
+ :type: list[UpdateOrderAdditionalFieldsErrorResult]
+ """
+
+ self._errors = errors
+
+ @property
+ def error_count(self):
+ """Gets the error_count of this UpdateOrderAdditionalFieldsErrorsPage. # noqa: E501
+
+
+ :return: The error_count of this UpdateOrderAdditionalFieldsErrorsPage. # noqa: E501
+ :rtype: int
+ """
+ return self._error_count
+
+ @error_count.setter
+ def error_count(self, error_count):
+ """Sets the error_count of this UpdateOrderAdditionalFieldsErrorsPage.
+
+
+ :param error_count: The error_count of this UpdateOrderAdditionalFieldsErrorsPage. # noqa: E501
+ :type: int
+ """
+
+ self._error_count = error_count
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(UpdateOrderAdditionalFieldsErrorsPage, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, UpdateOrderAdditionalFieldsErrorsPage):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/marketplace/rest.py b/digikey/v3/marketplace/rest.py
new file mode 100644
index 0000000..f58c980
--- /dev/null
+++ b/digikey/v3/marketplace/rest.py
@@ -0,0 +1,323 @@
+# coding: utf-8
+
+"""
+ Orders
+
+ API operations for managing orders as well as refunds and incidents as they relate to the order # noqa: E501
+
+ OpenAPI spec version: suppliers-v1
+ Contact: MarketplaceAPISupport@digikey.com
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+from __future__ import absolute_import
+
+import io
+import json
+import logging
+import re
+import ssl
+
+import certifi
+# python 2 and python 3 compatibility library
+import six
+from six.moves.urllib.parse import urlencode
+
+try:
+ import urllib3
+except ImportError:
+ raise ImportError('Swagger python client requires urllib3.')
+
+
+logger = logging.getLogger(__name__)
+
+
+class RESTResponse(io.IOBase):
+
+ def __init__(self, resp):
+ self.urllib3_response = resp
+ self.status = resp.status
+ self.reason = resp.reason
+ self.data = resp.data
+
+ def getheaders(self):
+ """Returns a dictionary of the response headers."""
+ return self.urllib3_response.getheaders()
+
+ def getheader(self, name, default=None):
+ """Returns a given response header."""
+ return self.urllib3_response.getheader(name, default)
+
+
+class RESTClientObject(object):
+
+ def __init__(self, configuration, pools_size=4, maxsize=None):
+ # urllib3.PoolManager will pass all kw parameters to connectionpool
+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
+ # maxsize is the number of requests to host that are allowed in parallel # noqa: E501
+ # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
+
+ # cert_reqs
+ if configuration.verify_ssl:
+ cert_reqs = ssl.CERT_REQUIRED
+ else:
+ cert_reqs = ssl.CERT_NONE
+
+ # ca_certs
+ if configuration.ssl_ca_cert:
+ ca_certs = configuration.ssl_ca_cert
+ else:
+ # if not set certificate file, use Mozilla's root certificates.
+ ca_certs = certifi.where()
+
+ addition_pool_args = {}
+ if configuration.assert_hostname is not None:
+ addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
+
+ if maxsize is None:
+ if configuration.connection_pool_maxsize is not None:
+ maxsize = configuration.connection_pool_maxsize
+ else:
+ maxsize = 4
+
+ # https pool manager
+ if configuration.proxy:
+ self.pool_manager = urllib3.ProxyManager(
+ num_pools=pools_size,
+ maxsize=maxsize,
+ cert_reqs=cert_reqs,
+ ca_certs=ca_certs,
+ cert_file=configuration.cert_file,
+ key_file=configuration.key_file,
+ proxy_url=configuration.proxy,
+ **addition_pool_args
+ )
+ else:
+ self.pool_manager = urllib3.PoolManager(
+ num_pools=pools_size,
+ maxsize=maxsize,
+ cert_reqs=cert_reqs,
+ ca_certs=ca_certs,
+ cert_file=configuration.cert_file,
+ key_file=configuration.key_file,
+ **addition_pool_args
+ )
+
+ def request(self, method, url, query_params=None, headers=None,
+ body=None, post_params=None, _preload_content=True,
+ _request_timeout=None):
+ """Perform requests.
+
+ :param method: http request method
+ :param url: http request url
+ :param query_params: query parameters in the url
+ :param headers: http request headers
+ :param body: request json body, for `application/json`
+ :param post_params: request post parameters,
+ `application/x-www-form-urlencoded`
+ and `multipart/form-data`
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ """
+ method = method.upper()
+ assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT',
+ 'PATCH', 'OPTIONS']
+
+ if post_params and body:
+ raise ValueError(
+ "body parameter cannot be used with post_params parameter."
+ )
+
+ post_params = post_params or {}
+ headers = headers or {}
+
+ timeout = None
+ if _request_timeout:
+ if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821
+ timeout = urllib3.Timeout(total=_request_timeout)
+ elif (isinstance(_request_timeout, tuple) and
+ len(_request_timeout) == 2):
+ timeout = urllib3.Timeout(
+ connect=_request_timeout[0], read=_request_timeout[1])
+
+ if 'Content-Type' not in headers:
+ headers['Content-Type'] = 'application/json'
+
+ try:
+ # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
+ if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
+ if query_params:
+ url += '?' + urlencode(query_params)
+ if re.search('json', headers['Content-Type'], re.IGNORECASE):
+ request_body = None
+ if body is not None:
+ request_body = json.dumps(body)
+ r = self.pool_manager.request(
+ method, url,
+ body=request_body,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
+ r = self.pool_manager.request(
+ method, url,
+ fields=post_params,
+ encode_multipart=False,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ elif headers['Content-Type'] == 'multipart/form-data':
+ # must del headers['Content-Type'], or the correct
+ # Content-Type which generated by urllib3 will be
+ # overwritten.
+ del headers['Content-Type']
+ r = self.pool_manager.request(
+ method, url,
+ fields=post_params,
+ encode_multipart=True,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ # Pass a `string` parameter directly in the body to support
+ # other content types than Json when `body` argument is
+ # provided in serialized form
+ elif isinstance(body, str):
+ request_body = body
+ r = self.pool_manager.request(
+ method, url,
+ body=request_body,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ else:
+ # Cannot generate the request from given parameters
+ msg = """Cannot prepare a request message for provided
+ arguments. Please check that your arguments match
+ declared content type."""
+ raise ApiException(status=0, reason=msg)
+ # For `GET`, `HEAD`
+ else:
+ r = self.pool_manager.request(method, url,
+ fields=query_params,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ except urllib3.exceptions.SSLError as e:
+ msg = "{0}\n{1}".format(type(e).__name__, str(e))
+ raise ApiException(status=0, reason=msg)
+
+ if _preload_content:
+ r = RESTResponse(r)
+
+ # In the python 3, the response.data is bytes.
+ # we need to decode it to string.
+ if six.PY3:
+ r.data = r.data.decode('utf8')
+
+ # log response body
+ logger.debug("response body: %s", r.data)
+
+ if not 200 <= r.status <= 299:
+ raise ApiException(http_resp=r)
+
+ return r
+
+ def GET(self, url, headers=None, query_params=None, _preload_content=True,
+ _request_timeout=None):
+ return self.request("GET", url,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ query_params=query_params)
+
+ def HEAD(self, url, headers=None, query_params=None, _preload_content=True,
+ _request_timeout=None):
+ return self.request("HEAD", url,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ query_params=query_params)
+
+ def OPTIONS(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("OPTIONS", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def DELETE(self, url, headers=None, query_params=None, body=None,
+ _preload_content=True, _request_timeout=None):
+ return self.request("DELETE", url,
+ headers=headers,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def POST(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("POST", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def PUT(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("PUT", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def PATCH(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("PATCH", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+
+class ApiException(Exception):
+
+ def __init__(self, status=None, reason=None, http_resp=None):
+ if http_resp:
+ self.status = http_resp.status
+ self.reason = http_resp.reason
+ self.body = http_resp.data
+ self.headers = http_resp.getheaders()
+ else:
+ self.status = status
+ self.reason = reason
+ self.body = None
+ self.headers = None
+
+ def __str__(self):
+ """Custom error messages for exception"""
+ error_message = "({0})\n"\
+ "Reason: {1}\n".format(self.status, self.reason)
+ if self.headers:
+ error_message += "HTTP response headers: {0}\n".format(
+ self.headers)
+
+ if self.body:
+ error_message += "HTTP response body: {0}\n".format(self.body)
+
+ return error_message
diff --git a/digikey/v3/productinformation/__init__.py b/digikey/v3/productinformation/__init__.py
index f1c8187..72047e6 100644
--- a/digikey/v3/productinformation/__init__.py
+++ b/digikey/v3/productinformation/__init__.py
@@ -7,7 +7,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -26,7 +26,9 @@
from digikey.v3.productinformation.models.api_validation_error import ApiValidationError
from digikey.v3.productinformation.models.associated_product import AssociatedProduct
from digikey.v3.productinformation.models.basic_product import BasicProduct
-from digikey.v3.productinformation.models.digi_reel_pricing import DigiReelPricing
+from digikey.v3.productinformation.models.categories_response import CategoriesResponse
+from digikey.v3.productinformation.models.category import Category
+from digikey.v3.productinformation.models.digi_reel_pricing_dto import DigiReelPricingDto
from digikey.v3.productinformation.models.filters import Filters
from digikey.v3.productinformation.models.iso_search_locale import IsoSearchLocale
from digikey.v3.productinformation.models.keyword_search_request import KeywordSearchRequest
@@ -34,7 +36,9 @@
from digikey.v3.productinformation.models.kit_part import KitPart
from digikey.v3.productinformation.models.limited_parameter import LimitedParameter
from digikey.v3.productinformation.models.limited_taxonomy import LimitedTaxonomy
+from digikey.v3.productinformation.models.manufacturer_info import ManufacturerInfo
from digikey.v3.productinformation.models.manufacturer_product_details_request import ManufacturerProductDetailsRequest
+from digikey.v3.productinformation.models.manufacturers_response import ManufacturersResponse
from digikey.v3.productinformation.models.media_links import MediaLinks
from digikey.v3.productinformation.models.parametric_filter import ParametricFilter
from digikey.v3.productinformation.models.pid_vid import PidVid
@@ -42,6 +46,7 @@
from digikey.v3.productinformation.models.product import Product
from digikey.v3.productinformation.models.product_details import ProductDetails
from digikey.v3.productinformation.models.product_details_response import ProductDetailsResponse
+from digikey.v3.productinformation.models.product_with_suggestions import ProductWithSuggestions
from digikey.v3.productinformation.models.search_option import SearchOption
from digikey.v3.productinformation.models.sort_direction import SortDirection
from digikey.v3.productinformation.models.sort_option import SortOption
diff --git a/digikey/v3/productinformation/api/part_search_api.py b/digikey/v3/productinformation/api/part_search_api.py
index b64bf6e..7531573 100644
--- a/digikey/v3/productinformation/api/part_search_api.py
+++ b/digikey/v3/productinformation/api/part_search_api.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -33,6 +33,248 @@ def __init__(self, api_client=None):
api_client = ApiClient()
self.api_client = api_client
+ def categories(self, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Returns all Product Categories. Category Id can be used in KeywordSearchRequest.Filters.TaxonomyIds to restrict a keyword search to a given category # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.categories(authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :return: CategoriesResponse
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.categories_with_http_info(authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.categories_with_http_info(authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ return data
+
+ def categories_with_http_info(self, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Returns all Product Categories. Category Id can be used in KeywordSearchRequest.Filters.TaxonomyIds to restrict a keyword search to a given category # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.categories_with_http_info(authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :return: CategoriesResponse
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['authorization', 'x_digikey_client_id', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method categories" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'authorization' is set
+ if ('authorization' not in params or
+ params['authorization'] is None):
+ raise ValueError("Missing the required parameter `authorization` when calling `categories`") # noqa: E501
+ # verify the required parameter 'x_digikey_client_id' is set
+ if ('x_digikey_client_id' not in params or
+ params['x_digikey_client_id'] is None):
+ raise ValueError("Missing the required parameter `x_digikey_client_id` when calling `categories`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+ if 'authorization' in params:
+ header_params['Authorization'] = params['authorization'] # noqa: E501
+ if 'x_digikey_client_id' in params:
+ header_params['X-DIGIKEY-Client-Id'] = params['x_digikey_client_id'] # noqa: E501
+ if 'x_digikey_locale_site' in params:
+ header_params['X-DIGIKEY-Locale-Site'] = params['x_digikey_locale_site'] # noqa: E501
+ if 'x_digikey_locale_language' in params:
+ header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
+ if 'x_digikey_locale_currency' in params:
+ header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
+ if 'x_digikey_customer_id' in params:
+ header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/Categories', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='CategoriesResponse', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=params.get('async_req'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
+ def categories_by_id(self, category_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Returns Category for given Id. Category Id can be used in KeywordSearchRequest.Filters.TaxonomyIds to restrict a keyword search to a given category # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.categories_by_id(category_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int category_id: (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :return: Category
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.categories_by_id_with_http_info(category_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.categories_by_id_with_http_info(category_id, authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ return data
+
+ def categories_by_id_with_http_info(self, category_id, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Returns Category for given Id. Category Id can be used in KeywordSearchRequest.Filters.TaxonomyIds to restrict a keyword search to a given category # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.categories_by_id_with_http_info(category_id, authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param int category_id: (required)
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :return: Category
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['category_id', 'authorization', 'x_digikey_client_id', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method categories_by_id" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'category_id' is set
+ if ('category_id' not in params or
+ params['category_id'] is None):
+ raise ValueError("Missing the required parameter `category_id` when calling `categories_by_id`") # noqa: E501
+ # verify the required parameter 'authorization' is set
+ if ('authorization' not in params or
+ params['authorization'] is None):
+ raise ValueError("Missing the required parameter `authorization` when calling `categories_by_id`") # noqa: E501
+ # verify the required parameter 'x_digikey_client_id' is set
+ if ('x_digikey_client_id' not in params or
+ params['x_digikey_client_id'] is None):
+ raise ValueError("Missing the required parameter `x_digikey_client_id` when calling `categories_by_id`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+ if 'category_id' in params:
+ path_params['categoryId'] = params['category_id'] # noqa: E501
+
+ query_params = []
+
+ header_params = {}
+ if 'authorization' in params:
+ header_params['Authorization'] = params['authorization'] # noqa: E501
+ if 'x_digikey_client_id' in params:
+ header_params['X-DIGIKEY-Client-Id'] = params['x_digikey_client_id'] # noqa: E501
+ if 'x_digikey_locale_site' in params:
+ header_params['X-DIGIKEY-Locale-Site'] = params['x_digikey_locale_site'] # noqa: E501
+ if 'x_digikey_locale_language' in params:
+ header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
+ if 'x_digikey_locale_currency' in params:
+ header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
+ if 'x_digikey_customer_id' in params:
+ header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/Categories/{categoryId}', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='Category', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=params.get('async_req'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def digi_reel_pricing(self, digi_key_part_number, requested_quantity, authorization, x_digikey_client_id, **kwargs): # noqa: E501
"""Calculate the DigiReel pricing for the given DigiKeyPartNumber and RequestedQuantity # noqa: E501
@@ -48,11 +290,10 @@ def digi_reel_pricing(self, digi_key_part_number, requested_quantity, authorizat
:param str x_digikey_client_id: The Client Id for your App. (required)
:param str includes: Comma separated list of fields to return. Used to customize response to reduce bandwidth by selecting fields that you wish to receive. For example: \"ExtendedPrice,ReelingFee\"
:param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
- :param str x_digikey_locale_language: Two letter code for language to search on. Langauge must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: en, ja, de, fr, ko, zhs, zht, it, es, he, nl, sv, pl, fi, da, no.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
:param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
- :param str x_digikey_locale_ship_to_country: ISO code for country to ship to.
:param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
- :return: DigiReelPricing
+ :return: DigiReelPricingDto
If the method is called asynchronously,
returns the request thread.
"""
@@ -78,16 +319,15 @@ def digi_reel_pricing_with_http_info(self, digi_key_part_number, requested_quant
:param str x_digikey_client_id: The Client Id for your App. (required)
:param str includes: Comma separated list of fields to return. Used to customize response to reduce bandwidth by selecting fields that you wish to receive. For example: \"ExtendedPrice,ReelingFee\"
:param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
- :param str x_digikey_locale_language: Two letter code for language to search on. Langauge must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: en, ja, de, fr, ko, zhs, zht, it, es, he, nl, sv, pl, fi, da, no.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
:param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
- :param str x_digikey_locale_ship_to_country: ISO code for country to ship to.
:param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
- :return: DigiReelPricing
+ :return: DigiReelPricingDto
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['digi_key_part_number', 'requested_quantity', 'authorization', 'x_digikey_client_id', 'includes', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_locale_ship_to_country', 'x_digikey_customer_id'] # noqa: E501
+ all_params = ['digi_key_part_number', 'requested_quantity', 'authorization', 'x_digikey_client_id', 'includes', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -142,8 +382,6 @@ def digi_reel_pricing_with_http_info(self, digi_key_part_number, requested_quant
header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
if 'x_digikey_locale_currency' in params:
header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
- if 'x_digikey_locale_ship_to_country' in params:
- header_params['X-DIGIKEY-Locale-ShipToCountry'] = params['x_digikey_locale_ship_to_country'] # noqa: E501
if 'x_digikey_customer_id' in params:
header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
@@ -156,7 +394,7 @@ def digi_reel_pricing_with_http_info(self, digi_key_part_number, requested_quant
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+ auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/Products/{digiKeyPartNumber}/DigiReelPricing', 'GET',
@@ -166,7 +404,7 @@ def digi_reel_pricing_with_http_info(self, digi_key_part_number, requested_quant
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='DigiReelPricing', # noqa: E501
+ response_type='DigiReelPricingDto', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
@@ -177,7 +415,6 @@ def digi_reel_pricing_with_http_info(self, digi_key_part_number, requested_quant
def keyword_search(self, authorization, x_digikey_client_id, **kwargs): # noqa: E501
"""KeywordSearch can search for any product in the Digi-Key catalog. # noqa: E501
- Search by keyword, then narrow down the search using available filters and search options.
Locale information is required in the headers for accurate pricing and currencies. Locale defaults to United States.
Note that KeywordSearch results have cached pricing and availability. If real time pricing and availability is needed, make a ProductDetails call.
# noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.keyword_search(authorization, x_digikey_client_id, async_req=True)
@@ -186,13 +423,12 @@ def keyword_search(self, authorization, x_digikey_client_id, **kwargs): # noqa:
:param async_req bool
:param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
:param str x_digikey_client_id: The Client Id for your App. (required)
- :param str includes: Comma separated list of fields to return. Used to customize response to reduce bandwidth by selecting fields that you wish to receive. For example: \"Products(DigiKeyPartNumber,QuantityAvailable)\"
+ :param str includes:
:param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
- :param str x_digikey_locale_language: Two letter code for language to search on. Langauge must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: en, ja, de, fr, ko, zhs, zht, it, es, he, nl, sv, pl, fi, da, no.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
:param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
- :param str x_digikey_locale_ship_to_country: ISO code for country to ship to.
:param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
- :param KeywordSearchRequest body: KeywordSearchRequest
+ :param KeywordSearchRequest body:
:return: KeywordSearchResponse
If the method is called asynchronously,
returns the request thread.
@@ -207,7 +443,6 @@ def keyword_search(self, authorization, x_digikey_client_id, **kwargs): # noqa:
def keyword_search_with_http_info(self, authorization, x_digikey_client_id, **kwargs): # noqa: E501
"""KeywordSearch can search for any product in the Digi-Key catalog. # noqa: E501
- Search by keyword, then narrow down the search using available filters and search options.
Locale information is required in the headers for accurate pricing and currencies. Locale defaults to United States.
Note that KeywordSearch results have cached pricing and availability. If real time pricing and availability is needed, make a ProductDetails call.
# noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.keyword_search_with_http_info(authorization, x_digikey_client_id, async_req=True)
@@ -216,19 +451,18 @@ def keyword_search_with_http_info(self, authorization, x_digikey_client_id, **kw
:param async_req bool
:param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
:param str x_digikey_client_id: The Client Id for your App. (required)
- :param str includes: Comma separated list of fields to return. Used to customize response to reduce bandwidth by selecting fields that you wish to receive. For example: \"Products(DigiKeyPartNumber,QuantityAvailable)\"
+ :param str includes:
:param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
- :param str x_digikey_locale_language: Two letter code for language to search on. Langauge must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: en, ja, de, fr, ko, zhs, zht, it, es, he, nl, sv, pl, fi, da, no.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
:param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
- :param str x_digikey_locale_ship_to_country: ISO code for country to ship to.
:param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
- :param KeywordSearchRequest body: KeywordSearchRequest
+ :param KeywordSearchRequest body:
:return: KeywordSearchResponse
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['authorization', 'x_digikey_client_id', 'includes', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_locale_ship_to_country', 'x_digikey_customer_id', 'body'] # noqa: E501
+ all_params = ['authorization', 'x_digikey_client_id', 'includes', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -271,8 +505,6 @@ def keyword_search_with_http_info(self, authorization, x_digikey_client_id, **kw
header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
if 'x_digikey_locale_currency' in params:
header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
- if 'x_digikey_locale_ship_to_country' in params:
- header_params['X-DIGIKEY-Locale-ShipToCountry'] = params['x_digikey_locale_ship_to_country'] # noqa: E501
if 'x_digikey_customer_id' in params:
header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
@@ -291,7 +523,7 @@ def keyword_search_with_http_info(self, authorization, x_digikey_client_id, **kw
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+ auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/Products/Keyword', 'POST',
@@ -322,9 +554,8 @@ def manufacturer_product_details(self, authorization, x_digikey_client_id, **kwa
:param str x_digikey_client_id: The Client Id for your App. (required)
:param str includes: Comma separated list of fields to return. Used to customize response to reduce bandwidth by selecting fields that you wish to receive. For example: \"Products(DigiKeyPartNumber,QuantityAvailable)\"
:param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
- :param str x_digikey_locale_language: Two letter code for language to search on. Langauge must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: en, ja, de, fr, ko, zhs, zht, it, es, he, nl, sv, pl, fi, da, no.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
:param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
- :param str x_digikey_locale_ship_to_country: ISO code for country to ship to.
:param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
:param ManufacturerProductDetailsRequest body: ManufacturerProductDetailsRequest
:return: ProductDetailsResponse
@@ -351,9 +582,8 @@ def manufacturer_product_details_with_http_info(self, authorization, x_digikey_c
:param str x_digikey_client_id: The Client Id for your App. (required)
:param str includes: Comma separated list of fields to return. Used to customize response to reduce bandwidth by selecting fields that you wish to receive. For example: \"Products(DigiKeyPartNumber,QuantityAvailable)\"
:param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
- :param str x_digikey_locale_language: Two letter code for language to search on. Langauge must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: en, ja, de, fr, ko, zhs, zht, it, es, he, nl, sv, pl, fi, da, no.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
:param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
- :param str x_digikey_locale_ship_to_country: ISO code for country to ship to.
:param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
:param ManufacturerProductDetailsRequest body: ManufacturerProductDetailsRequest
:return: ProductDetailsResponse
@@ -361,7 +591,7 @@ def manufacturer_product_details_with_http_info(self, authorization, x_digikey_c
returns the request thread.
"""
- all_params = ['authorization', 'x_digikey_client_id', 'includes', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_locale_ship_to_country', 'x_digikey_customer_id', 'body'] # noqa: E501
+ all_params = ['authorization', 'x_digikey_client_id', 'includes', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id', 'body'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -404,8 +634,6 @@ def manufacturer_product_details_with_http_info(self, authorization, x_digikey_c
header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
if 'x_digikey_locale_currency' in params:
header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
- if 'x_digikey_locale_ship_to_country' in params:
- header_params['X-DIGIKEY-Locale-ShipToCountry'] = params['x_digikey_locale_ship_to_country'] # noqa: E501
if 'x_digikey_customer_id' in params:
header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
@@ -424,7 +652,7 @@ def manufacturer_product_details_with_http_info(self, authorization, x_digikey_c
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+ auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/Products/ManufacturerProductDetails', 'POST',
@@ -442,6 +670,123 @@ def manufacturer_product_details_with_http_info(self, authorization, x_digikey_c
_request_timeout=params.get('_request_timeout'),
collection_formats=collection_formats)
+ def manufacturers(self, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Returns all Product Manufacturers. ManufacturersId can be used in KeywordSearchRequest.Filters.ManufacturerIds to restrict a keyword search to a given Manufacturer # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.manufacturers(authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :return: ManufacturersResponse
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+ kwargs['_return_http_data_only'] = True
+ if kwargs.get('async_req'):
+ return self.manufacturers_with_http_info(authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ else:
+ (data) = self.manufacturers_with_http_info(authorization, x_digikey_client_id, **kwargs) # noqa: E501
+ return data
+
+ def manufacturers_with_http_info(self, authorization, x_digikey_client_id, **kwargs): # noqa: E501
+ """Returns all Product Manufacturers. ManufacturersId can be used in KeywordSearchRequest.Filters.ManufacturerIds to restrict a keyword search to a given Manufacturer # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+ >>> thread = api.manufacturers_with_http_info(authorization, x_digikey_client_id, async_req=True)
+ >>> result = thread.get()
+
+ :param async_req bool
+ :param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
+ :param str x_digikey_client_id: The Client Id for your App. (required)
+ :param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
+ :param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
+ :param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
+ :return: ManufacturersResponse
+ If the method is called asynchronously,
+ returns the request thread.
+ """
+
+ all_params = ['authorization', 'x_digikey_client_id', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id'] # noqa: E501
+ all_params.append('async_req')
+ all_params.append('_return_http_data_only')
+ all_params.append('_preload_content')
+ all_params.append('_request_timeout')
+
+ params = locals()
+ for key, val in six.iteritems(params['kwargs']):
+ if key not in all_params:
+ raise TypeError(
+ "Got an unexpected keyword argument '%s'"
+ " to method manufacturers" % key
+ )
+ params[key] = val
+ del params['kwargs']
+ # verify the required parameter 'authorization' is set
+ if ('authorization' not in params or
+ params['authorization'] is None):
+ raise ValueError("Missing the required parameter `authorization` when calling `manufacturers`") # noqa: E501
+ # verify the required parameter 'x_digikey_client_id' is set
+ if ('x_digikey_client_id' not in params or
+ params['x_digikey_client_id'] is None):
+ raise ValueError("Missing the required parameter `x_digikey_client_id` when calling `manufacturers`") # noqa: E501
+
+ collection_formats = {}
+
+ path_params = {}
+
+ query_params = []
+
+ header_params = {}
+ if 'authorization' in params:
+ header_params['Authorization'] = params['authorization'] # noqa: E501
+ if 'x_digikey_client_id' in params:
+ header_params['X-DIGIKEY-Client-Id'] = params['x_digikey_client_id'] # noqa: E501
+ if 'x_digikey_locale_site' in params:
+ header_params['X-DIGIKEY-Locale-Site'] = params['x_digikey_locale_site'] # noqa: E501
+ if 'x_digikey_locale_language' in params:
+ header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
+ if 'x_digikey_locale_currency' in params:
+ header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
+ if 'x_digikey_customer_id' in params:
+ header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
+
+ form_params = []
+ local_var_files = {}
+
+ body_params = None
+ # HTTP header `Accept`
+ header_params['Accept'] = self.api_client.select_header_accept(
+ ['application/json']) # noqa: E501
+
+ # Authentication setting
+ auth_settings = [] # noqa: E501
+
+ return self.api_client.call_api(
+ '/Manufacturers', 'GET',
+ path_params,
+ query_params,
+ header_params,
+ body=body_params,
+ post_params=form_params,
+ files=local_var_files,
+ response_type='ManufacturersResponse', # noqa: E501
+ auth_settings=auth_settings,
+ async_req=params.get('async_req'),
+ _return_http_data_only=params.get('_return_http_data_only'),
+ _preload_content=params.get('_preload_content', True),
+ _request_timeout=params.get('_request_timeout'),
+ collection_formats=collection_formats)
+
def product_details(self, digi_key_part_number, authorization, x_digikey_client_id, **kwargs): # noqa: E501
"""Retrieve detailed product information including real time pricing and availability. # noqa: E501
@@ -457,9 +802,8 @@ def product_details(self, digi_key_part_number, authorization, x_digikey_client_
:param str x_digikey_client_id: The Client Id for your App. (required)
:param str includes: Comma separated list of fields to return. Used to customize response to reduce bandwidth by selecting fields that you wish to receive. For example: \"DigiKeyPartNumber,QuantityAvailable,AssociatedProducts[2]\"
:param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
- :param str x_digikey_locale_language: Two letter code for language to search on. Langauge must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: en, ja, de, fr, ko, zhs, zht, it, es, he, nl, sv, pl, fi, da, no.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
:param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
- :param str x_digikey_locale_ship_to_country: ISO code for country to ship to.
:param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
:return: ProductDetails
If the method is called asynchronously,
@@ -487,16 +831,15 @@ def product_details_with_http_info(self, digi_key_part_number, authorization, x_
:param str x_digikey_client_id: The Client Id for your App. (required)
:param str includes: Comma separated list of fields to return. Used to customize response to reduce bandwidth by selecting fields that you wish to receive. For example: \"DigiKeyPartNumber,QuantityAvailable,AssociatedProducts[2]\"
:param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
- :param str x_digikey_locale_language: Two letter code for language to search on. Langauge must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: en, ja, de, fr, ko, zhs, zht, it, es, he, nl, sv, pl, fi, da, no.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
:param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
- :param str x_digikey_locale_ship_to_country: ISO code for country to ship to.
:param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
:return: ProductDetails
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['digi_key_part_number', 'authorization', 'x_digikey_client_id', 'includes', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_locale_ship_to_country', 'x_digikey_customer_id'] # noqa: E501
+ all_params = ['digi_key_part_number', 'authorization', 'x_digikey_client_id', 'includes', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -545,8 +888,6 @@ def product_details_with_http_info(self, digi_key_part_number, authorization, x_
header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
if 'x_digikey_locale_currency' in params:
header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
- if 'x_digikey_locale_ship_to_country' in params:
- header_params['X-DIGIKEY-Locale-ShipToCountry'] = params['x_digikey_locale_ship_to_country'] # noqa: E501
if 'x_digikey_customer_id' in params:
header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
@@ -559,7 +900,7 @@ def product_details_with_http_info(self, digi_key_part_number, authorization, x_
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+ auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/Products/{digiKeyPartNumber}', 'GET',
@@ -591,11 +932,10 @@ def suggested_parts(self, part_number, authorization, x_digikey_client_id, **kwa
:param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
:param str x_digikey_client_id: The Client Id for your App. (required)
:param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
- :param str x_digikey_locale_language: Two letter code for language to search on. Langauge must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: en, ja, de, fr, ko, zhs, zht, it, es, he, nl, sv, pl, fi, da, no.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
:param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
- :param str x_digikey_locale_ship_to_country: ISO code for country to ship to.
:param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
- :return: ProductDetails
+ :return: ProductWithSuggestions
If the method is called asynchronously,
returns the request thread.
"""
@@ -620,16 +960,15 @@ def suggested_parts_with_http_info(self, part_number, authorization, x_digikey_c
:param str authorization: OAuth Bearer Token. Please see OAuth 2.0 Documentation page for more info. (required)
:param str x_digikey_client_id: The Client Id for your App. (required)
:param str x_digikey_locale_site: Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.
- :param str x_digikey_locale_language: Two letter code for language to search on. Langauge must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: en, ja, de, fr, ko, zhs, zht, it, es, he, nl, sv, pl, fi, da, no.
+ :param str x_digikey_locale_language: Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht
:param str x_digikey_locale_currency: Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.
- :param str x_digikey_locale_ship_to_country: ISO code for country to ship to.
:param str x_digikey_customer_id: Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.
- :return: ProductDetails
+ :return: ProductWithSuggestions
If the method is called asynchronously,
returns the request thread.
"""
- all_params = ['part_number', 'authorization', 'x_digikey_client_id', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_locale_ship_to_country', 'x_digikey_customer_id'] # noqa: E501
+ all_params = ['part_number', 'authorization', 'x_digikey_client_id', 'x_digikey_locale_site', 'x_digikey_locale_language', 'x_digikey_locale_currency', 'x_digikey_customer_id'] # noqa: E501
all_params.append('async_req')
all_params.append('_return_http_data_only')
all_params.append('_preload_content')
@@ -676,8 +1015,6 @@ def suggested_parts_with_http_info(self, part_number, authorization, x_digikey_c
header_params['X-DIGIKEY-Locale-Language'] = params['x_digikey_locale_language'] # noqa: E501
if 'x_digikey_locale_currency' in params:
header_params['X-DIGIKEY-Locale-Currency'] = params['x_digikey_locale_currency'] # noqa: E501
- if 'x_digikey_locale_ship_to_country' in params:
- header_params['X-DIGIKEY-Locale-ShipToCountry'] = params['x_digikey_locale_ship_to_country'] # noqa: E501
if 'x_digikey_customer_id' in params:
header_params['X-DIGIKEY-Customer-Id'] = params['x_digikey_customer_id'] # noqa: E501
@@ -690,7 +1027,7 @@ def suggested_parts_with_http_info(self, part_number, authorization, x_digikey_c
['application/json']) # noqa: E501
# Authentication setting
- auth_settings = ['apiKeySecurity', 'oauth2AccessCodeSecurity'] # noqa: E501
+ auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/Products/{partNumber}/WithSuggestedProducts', 'GET',
@@ -700,7 +1037,7 @@ def suggested_parts_with_http_info(self, part_number, authorization, x_digikey_c
body=body_params,
post_params=form_params,
files=local_var_files,
- response_type='ProductDetails', # noqa: E501
+ response_type='ProductWithSuggestions', # noqa: E501
auth_settings=auth_settings,
async_req=params.get('async_req'),
_return_http_data_only=params.get('_return_http_data_only'),
diff --git a/digikey/v3/productinformation/api_client.py b/digikey/v3/productinformation/api_client.py
index 80f296e..65751fd 100644
--- a/digikey/v3/productinformation/api_client.py
+++ b/digikey/v3/productinformation/api_client.py
@@ -4,7 +4,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/configuration.py b/digikey/v3/productinformation/configuration.py
index 2428a87..8a01ec6 100644
--- a/digikey/v3/productinformation/configuration.py
+++ b/digikey/v3/productinformation/configuration.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -250,6 +250,6 @@ def to_debug_report(self):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
- "Version of the API: v3\n"\
+ "Version of the API: Ps2\n"\
"SDK Package Version: 0.1.0".\
format(env=sys.platform, pyversion=sys.version)
diff --git a/digikey/v3/productinformation/models/__init__.py b/digikey/v3/productinformation/models/__init__.py
index 11a381d..5a73428 100644
--- a/digikey/v3/productinformation/models/__init__.py
+++ b/digikey/v3/productinformation/models/__init__.py
@@ -6,7 +6,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -19,7 +19,9 @@
from digikey.v3.productinformation.models.api_validation_error import ApiValidationError
from digikey.v3.productinformation.models.associated_product import AssociatedProduct
from digikey.v3.productinformation.models.basic_product import BasicProduct
-from digikey.v3.productinformation.models.digi_reel_pricing import DigiReelPricing
+from digikey.v3.productinformation.models.categories_response import CategoriesResponse
+from digikey.v3.productinformation.models.category import Category
+from digikey.v3.productinformation.models.digi_reel_pricing_dto import DigiReelPricingDto
from digikey.v3.productinformation.models.filters import Filters
from digikey.v3.productinformation.models.iso_search_locale import IsoSearchLocale
from digikey.v3.productinformation.models.keyword_search_request import KeywordSearchRequest
@@ -27,7 +29,9 @@
from digikey.v3.productinformation.models.kit_part import KitPart
from digikey.v3.productinformation.models.limited_parameter import LimitedParameter
from digikey.v3.productinformation.models.limited_taxonomy import LimitedTaxonomy
+from digikey.v3.productinformation.models.manufacturer_info import ManufacturerInfo
from digikey.v3.productinformation.models.manufacturer_product_details_request import ManufacturerProductDetailsRequest
+from digikey.v3.productinformation.models.manufacturers_response import ManufacturersResponse
from digikey.v3.productinformation.models.media_links import MediaLinks
from digikey.v3.productinformation.models.parametric_filter import ParametricFilter
from digikey.v3.productinformation.models.pid_vid import PidVid
@@ -35,6 +39,7 @@
from digikey.v3.productinformation.models.product import Product
from digikey.v3.productinformation.models.product_details import ProductDetails
from digikey.v3.productinformation.models.product_details_response import ProductDetailsResponse
+from digikey.v3.productinformation.models.product_with_suggestions import ProductWithSuggestions
from digikey.v3.productinformation.models.search_option import SearchOption
from digikey.v3.productinformation.models.sort_direction import SortDirection
from digikey.v3.productinformation.models.sort_option import SortOption
diff --git a/digikey/v3/productinformation/models/api_error_response.py b/digikey/v3/productinformation/models/api_error_response.py
index 43afc9f..190885d 100644
--- a/digikey/v3/productinformation/models/api_error_response.py
+++ b/digikey/v3/productinformation/models/api_error_response.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -76,6 +76,7 @@ def __init__(self, error_response_version=None, status_code=None, error_message=
def error_response_version(self):
"""Gets the error_response_version of this ApiErrorResponse. # noqa: E501
+ The version of the error handler. # noqa: E501
:return: The error_response_version of this ApiErrorResponse. # noqa: E501
:rtype: str
@@ -86,6 +87,7 @@ def error_response_version(self):
def error_response_version(self, error_response_version):
"""Sets the error_response_version of this ApiErrorResponse.
+ The version of the error handler. # noqa: E501
:param error_response_version: The error_response_version of this ApiErrorResponse. # noqa: E501
:type: str
@@ -97,6 +99,7 @@ def error_response_version(self, error_response_version):
def status_code(self):
"""Gets the status_code of this ApiErrorResponse. # noqa: E501
+ The HttpStatusCode of the error. # noqa: E501
:return: The status_code of this ApiErrorResponse. # noqa: E501
:rtype: int
@@ -107,6 +110,7 @@ def status_code(self):
def status_code(self, status_code):
"""Sets the status_code of this ApiErrorResponse.
+ The HttpStatusCode of the error. # noqa: E501
:param status_code: The status_code of this ApiErrorResponse. # noqa: E501
:type: int
@@ -118,6 +122,7 @@ def status_code(self, status_code):
def error_message(self):
"""Gets the error_message of this ApiErrorResponse. # noqa: E501
+ The message provided by the error handler. # noqa: E501
:return: The error_message of this ApiErrorResponse. # noqa: E501
:rtype: str
@@ -128,6 +133,7 @@ def error_message(self):
def error_message(self, error_message):
"""Sets the error_message of this ApiErrorResponse.
+ The message provided by the error handler. # noqa: E501
:param error_message: The error_message of this ApiErrorResponse. # noqa: E501
:type: str
@@ -139,6 +145,7 @@ def error_message(self, error_message):
def error_details(self):
"""Gets the error_details of this ApiErrorResponse. # noqa: E501
+ The details of the error. # noqa: E501
:return: The error_details of this ApiErrorResponse. # noqa: E501
:rtype: str
@@ -149,6 +156,7 @@ def error_details(self):
def error_details(self, error_details):
"""Sets the error_details of this ApiErrorResponse.
+ The details of the error. # noqa: E501
:param error_details: The error_details of this ApiErrorResponse. # noqa: E501
:type: str
@@ -160,6 +168,7 @@ def error_details(self, error_details):
def request_id(self):
"""Gets the request_id of this ApiErrorResponse. # noqa: E501
+ The Id of the request that triggered the error. If contacting API Support, please include the RequestId. # noqa: E501
:return: The request_id of this ApiErrorResponse. # noqa: E501
:rtype: str
@@ -170,6 +179,7 @@ def request_id(self):
def request_id(self, request_id):
"""Sets the request_id of this ApiErrorResponse.
+ The Id of the request that triggered the error. If contacting API Support, please include the RequestId. # noqa: E501
:param request_id: The request_id of this ApiErrorResponse. # noqa: E501
:type: str
@@ -181,6 +191,7 @@ def request_id(self, request_id):
def validation_errors(self):
"""Gets the validation_errors of this ApiErrorResponse. # noqa: E501
+ The list of validation errors (if applicable). # noqa: E501
:return: The validation_errors of this ApiErrorResponse. # noqa: E501
:rtype: list[ApiValidationError]
@@ -191,6 +202,7 @@ def validation_errors(self):
def validation_errors(self, validation_errors):
"""Sets the validation_errors of this ApiErrorResponse.
+ The list of validation errors (if applicable). # noqa: E501
:param validation_errors: The validation_errors of this ApiErrorResponse. # noqa: E501
:type: list[ApiValidationError]
diff --git a/digikey/v3/productinformation/models/api_validation_error.py b/digikey/v3/productinformation/models/api_validation_error.py
index 91f6e62..03a6d0e 100644
--- a/digikey/v3/productinformation/models/api_validation_error.py
+++ b/digikey/v3/productinformation/models/api_validation_error.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -56,6 +56,7 @@ def __init__(self, field=None, message=None): # noqa: E501
def field(self):
"""Gets the field of this ApiValidationError. # noqa: E501
+ The field that generated the error. # noqa: E501
:return: The field of this ApiValidationError. # noqa: E501
:rtype: str
@@ -66,6 +67,7 @@ def field(self):
def field(self, field):
"""Sets the field of this ApiValidationError.
+ The field that generated the error. # noqa: E501
:param field: The field of this ApiValidationError. # noqa: E501
:type: str
@@ -77,6 +79,7 @@ def field(self, field):
def message(self):
"""Gets the message of this ApiValidationError. # noqa: E501
+ The error message that was generated. This often explains how to fix your API input to be valid. # noqa: E501
:return: The message of this ApiValidationError. # noqa: E501
:rtype: str
@@ -87,6 +90,7 @@ def message(self):
def message(self, message):
"""Sets the message of this ApiValidationError.
+ The error message that was generated. This often explains how to fix your API input to be valid. # noqa: E501
:param message: The message of this ApiValidationError. # noqa: E501
:type: str
diff --git a/digikey/v3/productinformation/models/associated_product.py b/digikey/v3/productinformation/models/associated_product.py
index 42bf947..2fa8454 100644
--- a/digikey/v3/productinformation/models/associated_product.py
+++ b/digikey/v3/productinformation/models/associated_product.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -43,9 +43,15 @@ class AssociatedProduct(object):
'manufacturer': 'PidVid',
'manufacturer_public_quantity': 'int',
'quantity_on_order': 'int',
+ 'max_quantity_for_distribution': 'int',
+ 'back_order_not_allowed': 'bool',
'dk_plus_restriction': 'bool',
'marketplace': 'bool',
- 'supplier_direct_ship': 'bool'
+ 'supplier_direct_ship': 'bool',
+ 'pim_product_name': 'str',
+ 'supplier': 'str',
+ 'supplier_id': 'int',
+ 'is_ncnr': 'bool'
}
attribute_map = {
@@ -61,12 +67,18 @@ class AssociatedProduct(object):
'manufacturer': 'Manufacturer',
'manufacturer_public_quantity': 'ManufacturerPublicQuantity',
'quantity_on_order': 'QuantityOnOrder',
+ 'max_quantity_for_distribution': 'MaxQuantityForDistribution',
+ 'back_order_not_allowed': 'BackOrderNotAllowed',
'dk_plus_restriction': 'DKPlusRestriction',
'marketplace': 'Marketplace',
- 'supplier_direct_ship': 'SupplierDirectShip'
+ 'supplier_direct_ship': 'SupplierDirectShip',
+ 'pim_product_name': 'PimProductName',
+ 'supplier': 'Supplier',
+ 'supplier_id': 'SupplierId',
+ 'is_ncnr': 'IsNcnr'
}
- def __init__(self, product_url=None, manufacturer_part_number=None, minimum_order_quantity=None, non_stock=None, packaging=None, quantity_available=None, digi_key_part_number=None, product_description=None, unit_price=None, manufacturer=None, manufacturer_public_quantity=None, quantity_on_order=None, dk_plus_restriction=None, marketplace=None, supplier_direct_ship=None): # noqa: E501
+ def __init__(self, product_url=None, manufacturer_part_number=None, minimum_order_quantity=None, non_stock=None, packaging=None, quantity_available=None, digi_key_part_number=None, product_description=None, unit_price=None, manufacturer=None, manufacturer_public_quantity=None, quantity_on_order=None, max_quantity_for_distribution=None, back_order_not_allowed=None, dk_plus_restriction=None, marketplace=None, supplier_direct_ship=None, pim_product_name=None, supplier=None, supplier_id=None, is_ncnr=None): # noqa: E501
"""AssociatedProduct - a model defined in Swagger""" # noqa: E501
self._product_url = None
@@ -81,9 +93,15 @@ def __init__(self, product_url=None, manufacturer_part_number=None, minimum_orde
self._manufacturer = None
self._manufacturer_public_quantity = None
self._quantity_on_order = None
+ self._max_quantity_for_distribution = None
+ self._back_order_not_allowed = None
self._dk_plus_restriction = None
self._marketplace = None
self._supplier_direct_ship = None
+ self._pim_product_name = None
+ self._supplier = None
+ self._supplier_id = None
+ self._is_ncnr = None
self.discriminator = None
if product_url is not None:
@@ -110,12 +128,24 @@ def __init__(self, product_url=None, manufacturer_part_number=None, minimum_orde
self.manufacturer_public_quantity = manufacturer_public_quantity
if quantity_on_order is not None:
self.quantity_on_order = quantity_on_order
+ if max_quantity_for_distribution is not None:
+ self.max_quantity_for_distribution = max_quantity_for_distribution
+ if back_order_not_allowed is not None:
+ self.back_order_not_allowed = back_order_not_allowed
if dk_plus_restriction is not None:
self.dk_plus_restriction = dk_plus_restriction
if marketplace is not None:
self.marketplace = marketplace
if supplier_direct_ship is not None:
self.supplier_direct_ship = supplier_direct_ship
+ if pim_product_name is not None:
+ self.pim_product_name = pim_product_name
+ if supplier is not None:
+ self.supplier = supplier
+ if supplier_id is not None:
+ self.supplier_id = supplier_id
+ if is_ncnr is not None:
+ self.is_ncnr = is_ncnr
@property
def product_url(self):
@@ -389,11 +419,57 @@ def quantity_on_order(self, quantity_on_order):
self._quantity_on_order = quantity_on_order
+ @property
+ def max_quantity_for_distribution(self):
+ """Gets the max_quantity_for_distribution of this AssociatedProduct. # noqa: E501
+
+ Maximum order quantity for Distribution # noqa: E501
+
+ :return: The max_quantity_for_distribution of this AssociatedProduct. # noqa: E501
+ :rtype: int
+ """
+ return self._max_quantity_for_distribution
+
+ @max_quantity_for_distribution.setter
+ def max_quantity_for_distribution(self, max_quantity_for_distribution):
+ """Sets the max_quantity_for_distribution of this AssociatedProduct.
+
+ Maximum order quantity for Distribution # noqa: E501
+
+ :param max_quantity_for_distribution: The max_quantity_for_distribution of this AssociatedProduct. # noqa: E501
+ :type: int
+ """
+
+ self._max_quantity_for_distribution = max_quantity_for_distribution
+
+ @property
+ def back_order_not_allowed(self):
+ """Gets the back_order_not_allowed of this AssociatedProduct. # noqa: E501
+
+ True if back order is not allowed for this product # noqa: E501
+
+ :return: The back_order_not_allowed of this AssociatedProduct. # noqa: E501
+ :rtype: bool
+ """
+ return self._back_order_not_allowed
+
+ @back_order_not_allowed.setter
+ def back_order_not_allowed(self, back_order_not_allowed):
+ """Sets the back_order_not_allowed of this AssociatedProduct.
+
+ True if back order is not allowed for this product # noqa: E501
+
+ :param back_order_not_allowed: The back_order_not_allowed of this AssociatedProduct. # noqa: E501
+ :type: bool
+ """
+
+ self._back_order_not_allowed = back_order_not_allowed
+
@property
def dk_plus_restriction(self):
"""Gets the dk_plus_restriction of this AssociatedProduct. # noqa: E501
- Deprecated property - see Marketplace # noqa: E501
+ If true- this product is not available for purchase through the Ordering API - it must be purchased through the Digi-Key web site # noqa: E501
:return: The dk_plus_restriction of this AssociatedProduct. # noqa: E501
:rtype: bool
@@ -404,7 +480,7 @@ def dk_plus_restriction(self):
def dk_plus_restriction(self, dk_plus_restriction):
"""Sets the dk_plus_restriction of this AssociatedProduct.
- Deprecated property - see Marketplace # noqa: E501
+ If true- this product is not available for purchase through the Ordering API - it must be purchased through the Digi-Key web site # noqa: E501
:param dk_plus_restriction: The dk_plus_restriction of this AssociatedProduct. # noqa: E501
:type: bool
@@ -458,6 +534,98 @@ def supplier_direct_ship(self, supplier_direct_ship):
self._supplier_direct_ship = supplier_direct_ship
+ @property
+ def pim_product_name(self):
+ """Gets the pim_product_name of this AssociatedProduct. # noqa: E501
+
+ Pim name for the product # noqa: E501
+
+ :return: The pim_product_name of this AssociatedProduct. # noqa: E501
+ :rtype: str
+ """
+ return self._pim_product_name
+
+ @pim_product_name.setter
+ def pim_product_name(self, pim_product_name):
+ """Sets the pim_product_name of this AssociatedProduct.
+
+ Pim name for the product # noqa: E501
+
+ :param pim_product_name: The pim_product_name of this AssociatedProduct. # noqa: E501
+ :type: str
+ """
+
+ self._pim_product_name = pim_product_name
+
+ @property
+ def supplier(self):
+ """Gets the supplier of this AssociatedProduct. # noqa: E501
+
+ The Supplier is the provider of the products to Digi-Key and some cases the customer directly. # noqa: E501
+
+ :return: The supplier of this AssociatedProduct. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier
+
+ @supplier.setter
+ def supplier(self, supplier):
+ """Sets the supplier of this AssociatedProduct.
+
+ The Supplier is the provider of the products to Digi-Key and some cases the customer directly. # noqa: E501
+
+ :param supplier: The supplier of this AssociatedProduct. # noqa: E501
+ :type: str
+ """
+
+ self._supplier = supplier
+
+ @property
+ def supplier_id(self):
+ """Gets the supplier_id of this AssociatedProduct. # noqa: E501
+
+ Id for Supplier # noqa: E501
+
+ :return: The supplier_id of this AssociatedProduct. # noqa: E501
+ :rtype: int
+ """
+ return self._supplier_id
+
+ @supplier_id.setter
+ def supplier_id(self, supplier_id):
+ """Sets the supplier_id of this AssociatedProduct.
+
+ Id for Supplier # noqa: E501
+
+ :param supplier_id: The supplier_id of this AssociatedProduct. # noqa: E501
+ :type: int
+ """
+
+ self._supplier_id = supplier_id
+
+ @property
+ def is_ncnr(self):
+ """Gets the is_ncnr of this AssociatedProduct. # noqa: E501
+
+ Is product non-cancellable and non-returnable # noqa: E501
+
+ :return: The is_ncnr of this AssociatedProduct. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_ncnr
+
+ @is_ncnr.setter
+ def is_ncnr(self, is_ncnr):
+ """Sets the is_ncnr of this AssociatedProduct.
+
+ Is product non-cancellable and non-returnable # noqa: E501
+
+ :param is_ncnr: The is_ncnr of this AssociatedProduct. # noqa: E501
+ :type: bool
+ """
+
+ self._is_ncnr = is_ncnr
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
diff --git a/digikey/v3/productinformation/models/basic_product.py b/digikey/v3/productinformation/models/basic_product.py
index 80b1e18..2bbccfc 100644
--- a/digikey/v3/productinformation/models/basic_product.py
+++ b/digikey/v3/productinformation/models/basic_product.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -42,9 +42,15 @@ class BasicProduct(object):
'manufacturer': 'PidVid',
'manufacturer_public_quantity': 'int',
'quantity_on_order': 'int',
+ 'max_quantity_for_distribution': 'int',
+ 'back_order_not_allowed': 'bool',
'dk_plus_restriction': 'bool',
'marketplace': 'bool',
- 'supplier_direct_ship': 'bool'
+ 'supplier_direct_ship': 'bool',
+ 'pim_product_name': 'str',
+ 'supplier': 'str',
+ 'supplier_id': 'int',
+ 'is_ncnr': 'bool'
}
attribute_map = {
@@ -59,12 +65,18 @@ class BasicProduct(object):
'manufacturer': 'Manufacturer',
'manufacturer_public_quantity': 'ManufacturerPublicQuantity',
'quantity_on_order': 'QuantityOnOrder',
+ 'max_quantity_for_distribution': 'MaxQuantityForDistribution',
+ 'back_order_not_allowed': 'BackOrderNotAllowed',
'dk_plus_restriction': 'DKPlusRestriction',
'marketplace': 'Marketplace',
- 'supplier_direct_ship': 'SupplierDirectShip'
+ 'supplier_direct_ship': 'SupplierDirectShip',
+ 'pim_product_name': 'PimProductName',
+ 'supplier': 'Supplier',
+ 'supplier_id': 'SupplierId',
+ 'is_ncnr': 'IsNcnr'
}
- def __init__(self, manufacturer_part_number=None, minimum_order_quantity=None, non_stock=None, packaging=None, quantity_available=None, digi_key_part_number=None, product_description=None, unit_price=None, manufacturer=None, manufacturer_public_quantity=None, quantity_on_order=None, dk_plus_restriction=None, marketplace=None, supplier_direct_ship=None): # noqa: E501
+ def __init__(self, manufacturer_part_number=None, minimum_order_quantity=None, non_stock=None, packaging=None, quantity_available=None, digi_key_part_number=None, product_description=None, unit_price=None, manufacturer=None, manufacturer_public_quantity=None, quantity_on_order=None, max_quantity_for_distribution=None, back_order_not_allowed=None, dk_plus_restriction=None, marketplace=None, supplier_direct_ship=None, pim_product_name=None, supplier=None, supplier_id=None, is_ncnr=None): # noqa: E501
"""BasicProduct - a model defined in Swagger""" # noqa: E501
self._manufacturer_part_number = None
@@ -78,9 +90,15 @@ def __init__(self, manufacturer_part_number=None, minimum_order_quantity=None, n
self._manufacturer = None
self._manufacturer_public_quantity = None
self._quantity_on_order = None
+ self._max_quantity_for_distribution = None
+ self._back_order_not_allowed = None
self._dk_plus_restriction = None
self._marketplace = None
self._supplier_direct_ship = None
+ self._pim_product_name = None
+ self._supplier = None
+ self._supplier_id = None
+ self._is_ncnr = None
self.discriminator = None
if manufacturer_part_number is not None:
@@ -105,12 +123,24 @@ def __init__(self, manufacturer_part_number=None, minimum_order_quantity=None, n
self.manufacturer_public_quantity = manufacturer_public_quantity
if quantity_on_order is not None:
self.quantity_on_order = quantity_on_order
+ if max_quantity_for_distribution is not None:
+ self.max_quantity_for_distribution = max_quantity_for_distribution
+ if back_order_not_allowed is not None:
+ self.back_order_not_allowed = back_order_not_allowed
if dk_plus_restriction is not None:
self.dk_plus_restriction = dk_plus_restriction
if marketplace is not None:
self.marketplace = marketplace
if supplier_direct_ship is not None:
self.supplier_direct_ship = supplier_direct_ship
+ if pim_product_name is not None:
+ self.pim_product_name = pim_product_name
+ if supplier is not None:
+ self.supplier = supplier
+ if supplier_id is not None:
+ self.supplier_id = supplier_id
+ if is_ncnr is not None:
+ self.is_ncnr = is_ncnr
@property
def manufacturer_part_number(self):
@@ -361,11 +391,57 @@ def quantity_on_order(self, quantity_on_order):
self._quantity_on_order = quantity_on_order
+ @property
+ def max_quantity_for_distribution(self):
+ """Gets the max_quantity_for_distribution of this BasicProduct. # noqa: E501
+
+ Maximum order quantity for Distribution # noqa: E501
+
+ :return: The max_quantity_for_distribution of this BasicProduct. # noqa: E501
+ :rtype: int
+ """
+ return self._max_quantity_for_distribution
+
+ @max_quantity_for_distribution.setter
+ def max_quantity_for_distribution(self, max_quantity_for_distribution):
+ """Sets the max_quantity_for_distribution of this BasicProduct.
+
+ Maximum order quantity for Distribution # noqa: E501
+
+ :param max_quantity_for_distribution: The max_quantity_for_distribution of this BasicProduct. # noqa: E501
+ :type: int
+ """
+
+ self._max_quantity_for_distribution = max_quantity_for_distribution
+
+ @property
+ def back_order_not_allowed(self):
+ """Gets the back_order_not_allowed of this BasicProduct. # noqa: E501
+
+ True if back order is not allowed for this product # noqa: E501
+
+ :return: The back_order_not_allowed of this BasicProduct. # noqa: E501
+ :rtype: bool
+ """
+ return self._back_order_not_allowed
+
+ @back_order_not_allowed.setter
+ def back_order_not_allowed(self, back_order_not_allowed):
+ """Sets the back_order_not_allowed of this BasicProduct.
+
+ True if back order is not allowed for this product # noqa: E501
+
+ :param back_order_not_allowed: The back_order_not_allowed of this BasicProduct. # noqa: E501
+ :type: bool
+ """
+
+ self._back_order_not_allowed = back_order_not_allowed
+
@property
def dk_plus_restriction(self):
"""Gets the dk_plus_restriction of this BasicProduct. # noqa: E501
- Deprecated property - see Marketplace # noqa: E501
+ If true- this product is not available for purchase through the Ordering API - it must be purchased through the Digi-Key web site # noqa: E501
:return: The dk_plus_restriction of this BasicProduct. # noqa: E501
:rtype: bool
@@ -376,7 +452,7 @@ def dk_plus_restriction(self):
def dk_plus_restriction(self, dk_plus_restriction):
"""Sets the dk_plus_restriction of this BasicProduct.
- Deprecated property - see Marketplace # noqa: E501
+ If true- this product is not available for purchase through the Ordering API - it must be purchased through the Digi-Key web site # noqa: E501
:param dk_plus_restriction: The dk_plus_restriction of this BasicProduct. # noqa: E501
:type: bool
@@ -430,6 +506,98 @@ def supplier_direct_ship(self, supplier_direct_ship):
self._supplier_direct_ship = supplier_direct_ship
+ @property
+ def pim_product_name(self):
+ """Gets the pim_product_name of this BasicProduct. # noqa: E501
+
+ Pim name for the product # noqa: E501
+
+ :return: The pim_product_name of this BasicProduct. # noqa: E501
+ :rtype: str
+ """
+ return self._pim_product_name
+
+ @pim_product_name.setter
+ def pim_product_name(self, pim_product_name):
+ """Sets the pim_product_name of this BasicProduct.
+
+ Pim name for the product # noqa: E501
+
+ :param pim_product_name: The pim_product_name of this BasicProduct. # noqa: E501
+ :type: str
+ """
+
+ self._pim_product_name = pim_product_name
+
+ @property
+ def supplier(self):
+ """Gets the supplier of this BasicProduct. # noqa: E501
+
+ The Supplier is the provider of the products to Digi-Key and some cases the customer directly. # noqa: E501
+
+ :return: The supplier of this BasicProduct. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier
+
+ @supplier.setter
+ def supplier(self, supplier):
+ """Sets the supplier of this BasicProduct.
+
+ The Supplier is the provider of the products to Digi-Key and some cases the customer directly. # noqa: E501
+
+ :param supplier: The supplier of this BasicProduct. # noqa: E501
+ :type: str
+ """
+
+ self._supplier = supplier
+
+ @property
+ def supplier_id(self):
+ """Gets the supplier_id of this BasicProduct. # noqa: E501
+
+ Id for Supplier # noqa: E501
+
+ :return: The supplier_id of this BasicProduct. # noqa: E501
+ :rtype: int
+ """
+ return self._supplier_id
+
+ @supplier_id.setter
+ def supplier_id(self, supplier_id):
+ """Sets the supplier_id of this BasicProduct.
+
+ Id for Supplier # noqa: E501
+
+ :param supplier_id: The supplier_id of this BasicProduct. # noqa: E501
+ :type: int
+ """
+
+ self._supplier_id = supplier_id
+
+ @property
+ def is_ncnr(self):
+ """Gets the is_ncnr of this BasicProduct. # noqa: E501
+
+ Is product non-cancellable and non-returnable # noqa: E501
+
+ :return: The is_ncnr of this BasicProduct. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_ncnr
+
+ @is_ncnr.setter
+ def is_ncnr(self, is_ncnr):
+ """Sets the is_ncnr of this BasicProduct.
+
+ Is product non-cancellable and non-returnable # noqa: E501
+
+ :param is_ncnr: The is_ncnr of this BasicProduct. # noqa: E501
+ :type: bool
+ """
+
+ self._is_ncnr = is_ncnr
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
diff --git a/digikey/v3/productinformation/models/categories_response.py b/digikey/v3/productinformation/models/categories_response.py
new file mode 100644
index 0000000..1db4d0a
--- /dev/null
+++ b/digikey/v3/productinformation/models/categories_response.py
@@ -0,0 +1,145 @@
+# coding: utf-8
+
+"""
+ PartSearch Api
+
+ Search for products and retrieve details and pricing. # noqa: E501
+
+ OpenAPI spec version: Ps2
+
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class CategoriesResponse(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'product_count': 'int',
+ 'categories': 'list[Category]'
+ }
+
+ attribute_map = {
+ 'product_count': 'ProductCount',
+ 'categories': 'Categories'
+ }
+
+ def __init__(self, product_count=None, categories=None): # noqa: E501
+ """CategoriesResponse - a model defined in Swagger""" # noqa: E501
+
+ self._product_count = None
+ self._categories = None
+ self.discriminator = None
+
+ if product_count is not None:
+ self.product_count = product_count
+ if categories is not None:
+ self.categories = categories
+
+ @property
+ def product_count(self):
+ """Gets the product_count of this CategoriesResponse. # noqa: E501
+
+ Count of Products # noqa: E501
+
+ :return: The product_count of this CategoriesResponse. # noqa: E501
+ :rtype: int
+ """
+ return self._product_count
+
+ @product_count.setter
+ def product_count(self, product_count):
+ """Sets the product_count of this CategoriesResponse.
+
+ Count of Products # noqa: E501
+
+ :param product_count: The product_count of this CategoriesResponse. # noqa: E501
+ :type: int
+ """
+
+ self._product_count = product_count
+
+ @property
+ def categories(self):
+ """Gets the categories of this CategoriesResponse. # noqa: E501
+
+ List of Categories # noqa: E501
+
+ :return: The categories of this CategoriesResponse. # noqa: E501
+ :rtype: list[Category]
+ """
+ return self._categories
+
+ @categories.setter
+ def categories(self, categories):
+ """Sets the categories of this CategoriesResponse.
+
+ List of Categories # noqa: E501
+
+ :param categories: The categories of this CategoriesResponse. # noqa: E501
+ :type: list[Category]
+ """
+
+ self._categories = categories
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(CategoriesResponse, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, CategoriesResponse):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/productinformation/models/category.py b/digikey/v3/productinformation/models/category.py
new file mode 100644
index 0000000..426bb24
--- /dev/null
+++ b/digikey/v3/productinformation/models/category.py
@@ -0,0 +1,229 @@
+# coding: utf-8
+
+"""
+ PartSearch Api
+
+ Search for products and retrieve details and pricing. # noqa: E501
+
+ OpenAPI spec version: Ps2
+
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class Category(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'category_id': 'int',
+ 'parent_id': 'int',
+ 'name': 'str',
+ 'product_count': 'int',
+ 'children': 'list[Category]'
+ }
+
+ attribute_map = {
+ 'category_id': 'CategoryId',
+ 'parent_id': 'ParentId',
+ 'name': 'Name',
+ 'product_count': 'ProductCount',
+ 'children': 'Children'
+ }
+
+ def __init__(self, category_id=None, parent_id=None, name=None, product_count=None, children=None): # noqa: E501
+ """Category - a model defined in Swagger""" # noqa: E501
+
+ self._category_id = None
+ self._parent_id = None
+ self._name = None
+ self._product_count = None
+ self._children = None
+ self.discriminator = None
+
+ if category_id is not None:
+ self.category_id = category_id
+ if parent_id is not None:
+ self.parent_id = parent_id
+ if name is not None:
+ self.name = name
+ if product_count is not None:
+ self.product_count = product_count
+ if children is not None:
+ self.children = children
+
+ @property
+ def category_id(self):
+ """Gets the category_id of this Category. # noqa: E501
+
+ Gets or Sets CategoryId # noqa: E501
+
+ :return: The category_id of this Category. # noqa: E501
+ :rtype: int
+ """
+ return self._category_id
+
+ @category_id.setter
+ def category_id(self, category_id):
+ """Sets the category_id of this Category.
+
+ Gets or Sets CategoryId # noqa: E501
+
+ :param category_id: The category_id of this Category. # noqa: E501
+ :type: int
+ """
+
+ self._category_id = category_id
+
+ @property
+ def parent_id(self):
+ """Gets the parent_id of this Category. # noqa: E501
+
+ The Id of the Partent Category if the given category is a child of another category # noqa: E501
+
+ :return: The parent_id of this Category. # noqa: E501
+ :rtype: int
+ """
+ return self._parent_id
+
+ @parent_id.setter
+ def parent_id(self, parent_id):
+ """Sets the parent_id of this Category.
+
+ The Id of the Partent Category if the given category is a child of another category # noqa: E501
+
+ :param parent_id: The parent_id of this Category. # noqa: E501
+ :type: int
+ """
+
+ self._parent_id = parent_id
+
+ @property
+ def name(self):
+ """Gets the name of this Category. # noqa: E501
+
+ Gets or Sets Name # noqa: E501
+
+ :return: The name of this Category. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this Category.
+
+ Gets or Sets Name # noqa: E501
+
+ :param name: The name of this Category. # noqa: E501
+ :type: str
+ """
+
+ self._name = name
+
+ @property
+ def product_count(self):
+ """Gets the product_count of this Category. # noqa: E501
+
+ Gets or Sets ProductCount # noqa: E501
+
+ :return: The product_count of this Category. # noqa: E501
+ :rtype: int
+ """
+ return self._product_count
+
+ @product_count.setter
+ def product_count(self, product_count):
+ """Sets the product_count of this Category.
+
+ Gets or Sets ProductCount # noqa: E501
+
+ :param product_count: The product_count of this Category. # noqa: E501
+ :type: int
+ """
+
+ self._product_count = product_count
+
+ @property
+ def children(self):
+ """Gets the children of this Category. # noqa: E501
+
+ List of Child Categories # noqa: E501
+
+ :return: The children of this Category. # noqa: E501
+ :rtype: list[Category]
+ """
+ return self._children
+
+ @children.setter
+ def children(self, children):
+ """Sets the children of this Category.
+
+ List of Child Categories # noqa: E501
+
+ :param children: The children of this Category. # noqa: E501
+ :type: list[Category]
+ """
+
+ self._children = children
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(Category, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, Category):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/productinformation/models/digi_reel_pricing_dto.py b/digikey/v3/productinformation/models/digi_reel_pricing_dto.py
new file mode 100644
index 0000000..5e85ef2
--- /dev/null
+++ b/digikey/v3/productinformation/models/digi_reel_pricing_dto.py
@@ -0,0 +1,227 @@
+# coding: utf-8
+
+"""
+ PartSearch Api
+
+ Search for products and retrieve details and pricing. # noqa: E501
+
+ OpenAPI spec version: Ps2
+
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class DigiReelPricingDto(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'reeling_fee': 'float',
+ 'unit_price': 'float',
+ 'extended_price': 'float',
+ 'requested_quantity': 'int',
+ 'search_locale_used': 'IsoSearchLocale'
+ }
+
+ attribute_map = {
+ 'reeling_fee': 'ReelingFee',
+ 'unit_price': 'UnitPrice',
+ 'extended_price': 'ExtendedPrice',
+ 'requested_quantity': 'RequestedQuantity',
+ 'search_locale_used': 'SearchLocaleUsed'
+ }
+
+ def __init__(self, reeling_fee=None, unit_price=None, extended_price=None, requested_quantity=None, search_locale_used=None): # noqa: E501
+ """DigiReelPricingDto - a model defined in Swagger""" # noqa: E501
+
+ self._reeling_fee = None
+ self._unit_price = None
+ self._extended_price = None
+ self._requested_quantity = None
+ self._search_locale_used = None
+ self.discriminator = None
+
+ if reeling_fee is not None:
+ self.reeling_fee = reeling_fee
+ if unit_price is not None:
+ self.unit_price = unit_price
+ if extended_price is not None:
+ self.extended_price = extended_price
+ if requested_quantity is not None:
+ self.requested_quantity = requested_quantity
+ if search_locale_used is not None:
+ self.search_locale_used = search_locale_used
+
+ @property
+ def reeling_fee(self):
+ """Gets the reeling_fee of this DigiReelPricingDto. # noqa: E501
+
+ Fee per reel ordered. # noqa: E501
+
+ :return: The reeling_fee of this DigiReelPricingDto. # noqa: E501
+ :rtype: float
+ """
+ return self._reeling_fee
+
+ @reeling_fee.setter
+ def reeling_fee(self, reeling_fee):
+ """Sets the reeling_fee of this DigiReelPricingDto.
+
+ Fee per reel ordered. # noqa: E501
+
+ :param reeling_fee: The reeling_fee of this DigiReelPricingDto. # noqa: E501
+ :type: float
+ """
+
+ self._reeling_fee = reeling_fee
+
+ @property
+ def unit_price(self):
+ """Gets the unit_price of this DigiReelPricingDto. # noqa: E501
+
+ Price of a single unit of the product. # noqa: E501
+
+ :return: The unit_price of this DigiReelPricingDto. # noqa: E501
+ :rtype: float
+ """
+ return self._unit_price
+
+ @unit_price.setter
+ def unit_price(self, unit_price):
+ """Sets the unit_price of this DigiReelPricingDto.
+
+ Price of a single unit of the product. # noqa: E501
+
+ :param unit_price: The unit_price of this DigiReelPricingDto. # noqa: E501
+ :type: float
+ """
+
+ self._unit_price = unit_price
+
+ @property
+ def extended_price(self):
+ """Gets the extended_price of this DigiReelPricingDto. # noqa: E501
+
+ The total price of the requested reels and the reeling fee. # noqa: E501
+
+ :return: The extended_price of this DigiReelPricingDto. # noqa: E501
+ :rtype: float
+ """
+ return self._extended_price
+
+ @extended_price.setter
+ def extended_price(self, extended_price):
+ """Sets the extended_price of this DigiReelPricingDto.
+
+ The total price of the requested reels and the reeling fee. # noqa: E501
+
+ :param extended_price: The extended_price of this DigiReelPricingDto. # noqa: E501
+ :type: float
+ """
+
+ self._extended_price = extended_price
+
+ @property
+ def requested_quantity(self):
+ """Gets the requested_quantity of this DigiReelPricingDto. # noqa: E501
+
+ The passed in quantity of the product you are looking to create a Digi-Reel with. # noqa: E501
+
+ :return: The requested_quantity of this DigiReelPricingDto. # noqa: E501
+ :rtype: int
+ """
+ return self._requested_quantity
+
+ @requested_quantity.setter
+ def requested_quantity(self, requested_quantity):
+ """Sets the requested_quantity of this DigiReelPricingDto.
+
+ The passed in quantity of the product you are looking to create a Digi-Reel with. # noqa: E501
+
+ :param requested_quantity: The requested_quantity of this DigiReelPricingDto. # noqa: E501
+ :type: int
+ """
+
+ self._requested_quantity = requested_quantity
+
+ @property
+ def search_locale_used(self):
+ """Gets the search_locale_used of this DigiReelPricingDto. # noqa: E501
+
+
+ :return: The search_locale_used of this DigiReelPricingDto. # noqa: E501
+ :rtype: IsoSearchLocale
+ """
+ return self._search_locale_used
+
+ @search_locale_used.setter
+ def search_locale_used(self, search_locale_used):
+ """Sets the search_locale_used of this DigiReelPricingDto.
+
+
+ :param search_locale_used: The search_locale_used of this DigiReelPricingDto. # noqa: E501
+ :type: IsoSearchLocale
+ """
+
+ self._search_locale_used = search_locale_used
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(DigiReelPricingDto, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, DigiReelPricingDto):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/productinformation/models/filters.py b/digikey/v3/productinformation/models/filters.py
index 2598422..1afc886 100644
--- a/digikey/v3/productinformation/models/filters.py
+++ b/digikey/v3/productinformation/models/filters.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -61,7 +61,7 @@ def __init__(self, taxonomy_ids=None, manufacturer_ids=None, parametric_filters=
def taxonomy_ids(self):
"""Gets the taxonomy_ids of this Filters. # noqa: E501
- A collection of Taxonomy Ids to filter on. Ids can be found in the initial search response. # noqa: E501
+ A collection of Taxonomy Ids to filter on. Ids can be found in the initial search response. A a full list ids can be found from the Search Categories endpoint # noqa: E501
:return: The taxonomy_ids of this Filters. # noqa: E501
:rtype: list[int]
@@ -72,7 +72,7 @@ def taxonomy_ids(self):
def taxonomy_ids(self, taxonomy_ids):
"""Sets the taxonomy_ids of this Filters.
- A collection of Taxonomy Ids to filter on. Ids can be found in the initial search response. # noqa: E501
+ A collection of Taxonomy Ids to filter on. Ids can be found in the initial search response. A a full list ids can be found from the Search Categories endpoint # noqa: E501
:param taxonomy_ids: The taxonomy_ids of this Filters. # noqa: E501
:type: list[int]
@@ -84,7 +84,7 @@ def taxonomy_ids(self, taxonomy_ids):
def manufacturer_ids(self):
"""Gets the manufacturer_ids of this Filters. # noqa: E501
- A collection of Manufacturer Ids to filter on. Ids can be found in the initial search response. # noqa: E501
+ A collection of Manufacturer Ids to filter on. Ids can be found in the initial search response. A a full list ids can be found from the Search Manufactures endpoint # noqa: E501
:return: The manufacturer_ids of this Filters. # noqa: E501
:rtype: list[int]
@@ -95,7 +95,7 @@ def manufacturer_ids(self):
def manufacturer_ids(self, manufacturer_ids):
"""Sets the manufacturer_ids of this Filters.
- A collection of Manufacturer Ids to filter on. Ids can be found in the initial search response. # noqa: E501
+ A collection of Manufacturer Ids to filter on. Ids can be found in the initial search response. A a full list ids can be found from the Search Manufactures endpoint # noqa: E501
:param manufacturer_ids: The manufacturer_ids of this Filters. # noqa: E501
:type: list[int]
diff --git a/digikey/v3/productinformation/models/iso_search_locale.py b/digikey/v3/productinformation/models/iso_search_locale.py
index 94d5b55..7cd870e 100644
--- a/digikey/v3/productinformation/models/iso_search_locale.py
+++ b/digikey/v3/productinformation/models/iso_search_locale.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/keyword_search_request.py b/digikey/v3/productinformation/models/keyword_search_request.py
index 550196c..b69d1ea 100644
--- a/digikey/v3/productinformation/models/keyword_search_request.py
+++ b/digikey/v3/productinformation/models/keyword_search_request.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -65,7 +65,8 @@ def __init__(self, keywords=None, record_count=None, record_start_position=None,
self._exclude_market_place_products = None
self.discriminator = None
- self.keywords = keywords
+ if keywords is not None:
+ self.keywords = keywords
if record_count is not None:
self.record_count = record_count
if record_start_position is not None:
@@ -85,7 +86,7 @@ def __init__(self, keywords=None, record_count=None, record_start_position=None,
def keywords(self):
"""Gets the keywords of this KeywordSearchRequest. # noqa: E501
- Keywords to search on. Can be a description, partial part number, manufacturer part number, or a Digi-Key part number. # noqa: E501
+ Keywords to search on. Can be a description, partial part number, manufacturer part number, or a Digi-Key part number. Keywords are required unless the Filters.TaxonomyIds is populated. An Empty string can be used when searching with Filters.TaxonomyIds # noqa: E501
:return: The keywords of this KeywordSearchRequest. # noqa: E501
:rtype: str
@@ -96,17 +97,11 @@ def keywords(self):
def keywords(self, keywords):
"""Sets the keywords of this KeywordSearchRequest.
- Keywords to search on. Can be a description, partial part number, manufacturer part number, or a Digi-Key part number. # noqa: E501
+ Keywords to search on. Can be a description, partial part number, manufacturer part number, or a Digi-Key part number. Keywords are required unless the Filters.TaxonomyIds is populated. An Empty string can be used when searching with Filters.TaxonomyIds # noqa: E501
:param keywords: The keywords of this KeywordSearchRequest. # noqa: E501
:type: str
"""
- if keywords is None:
- raise ValueError("Invalid value for `keywords`, must not be `None`") # noqa: E501
- if keywords is not None and len(keywords) > 250:
- raise ValueError("Invalid value for `keywords`, length must be less than or equal to `250`") # noqa: E501
- if keywords is not None and len(keywords) < 1:
- raise ValueError("Invalid value for `keywords`, length must be greater than or equal to `1`") # noqa: E501
self._keywords = keywords
@@ -130,10 +125,6 @@ def record_count(self, record_count):
:param record_count: The record_count of this KeywordSearchRequest. # noqa: E501
:type: int
"""
- if record_count is not None and record_count > 50: # noqa: E501
- raise ValueError("Invalid value for `record_count`, must be a value less than or equal to `50`") # noqa: E501
- if record_count is not None and record_count < 1: # noqa: E501
- raise ValueError("Invalid value for `record_count`, must be a value greater than or equal to `1`") # noqa: E501
self._record_count = record_count
@@ -206,7 +197,7 @@ def sort(self, sort):
def requested_quantity(self):
"""Gets the requested_quantity of this KeywordSearchRequest. # noqa: E501
- The quantity of the product you are looking to purchase. This is used with the SortByUnitPrice SortOption as price varies at differing quantities. # noqa: E501
+ The quantity of the product you are looking to purchase. This is used with the SortByUnitPrice SortOption as price varies at differing quantities. # noqa: E501
:return: The requested_quantity of this KeywordSearchRequest. # noqa: E501
:rtype: int
@@ -217,7 +208,7 @@ def requested_quantity(self):
def requested_quantity(self, requested_quantity):
"""Sets the requested_quantity of this KeywordSearchRequest.
- The quantity of the product you are looking to purchase. This is used with the SortByUnitPrice SortOption as price varies at differing quantities. # noqa: E501
+ The quantity of the product you are looking to purchase. This is used with the SortByUnitPrice SortOption as price varies at differing quantities. # noqa: E501
:param requested_quantity: The requested_quantity of this KeywordSearchRequest. # noqa: E501
:type: int
diff --git a/digikey/v3/productinformation/models/keyword_search_response.py b/digikey/v3/productinformation/models/keyword_search_response.py
index 917156f..fcab6d7 100644
--- a/digikey/v3/productinformation/models/keyword_search_response.py
+++ b/digikey/v3/productinformation/models/keyword_search_response.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/kit_part.py b/digikey/v3/productinformation/models/kit_part.py
index 8f4f9ce..fd6ff1e 100644
--- a/digikey/v3/productinformation/models/kit_part.py
+++ b/digikey/v3/productinformation/models/kit_part.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/limited_parameter.py b/digikey/v3/productinformation/models/limited_parameter.py
index 3956a37..a05fbd8 100644
--- a/digikey/v3/productinformation/models/limited_parameter.py
+++ b/digikey/v3/productinformation/models/limited_parameter.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/limited_taxonomy.py b/digikey/v3/productinformation/models/limited_taxonomy.py
index 69a8979..7745c0d 100644
--- a/digikey/v3/productinformation/models/limited_taxonomy.py
+++ b/digikey/v3/productinformation/models/limited_taxonomy.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/manufacturer_info.py b/digikey/v3/productinformation/models/manufacturer_info.py
new file mode 100644
index 0000000..e8c7277
--- /dev/null
+++ b/digikey/v3/productinformation/models/manufacturer_info.py
@@ -0,0 +1,145 @@
+# coding: utf-8
+
+"""
+ PartSearch Api
+
+ Search for products and retrieve details and pricing. # noqa: E501
+
+ OpenAPI spec version: Ps2
+
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ManufacturerInfo(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'id': 'int',
+ 'name': 'str'
+ }
+
+ attribute_map = {
+ 'id': 'Id',
+ 'name': 'Name'
+ }
+
+ def __init__(self, id=None, name=None): # noqa: E501
+ """ManufacturerInfo - a model defined in Swagger""" # noqa: E501
+
+ self._id = None
+ self._name = None
+ self.discriminator = None
+
+ if id is not None:
+ self.id = id
+ if name is not None:
+ self.name = name
+
+ @property
+ def id(self):
+ """Gets the id of this ManufacturerInfo. # noqa: E501
+
+ Internal Id for the manufacturer # noqa: E501
+
+ :return: The id of this ManufacturerInfo. # noqa: E501
+ :rtype: int
+ """
+ return self._id
+
+ @id.setter
+ def id(self, id):
+ """Sets the id of this ManufacturerInfo.
+
+ Internal Id for the manufacturer # noqa: E501
+
+ :param id: The id of this ManufacturerInfo. # noqa: E501
+ :type: int
+ """
+
+ self._id = id
+
+ @property
+ def name(self):
+ """Gets the name of this ManufacturerInfo. # noqa: E501
+
+ Name of the manufacturer # noqa: E501
+
+ :return: The name of this ManufacturerInfo. # noqa: E501
+ :rtype: str
+ """
+ return self._name
+
+ @name.setter
+ def name(self, name):
+ """Sets the name of this ManufacturerInfo.
+
+ Name of the manufacturer # noqa: E501
+
+ :param name: The name of this ManufacturerInfo. # noqa: E501
+ :type: str
+ """
+
+ self._name = name
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(ManufacturerInfo, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ManufacturerInfo):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/productinformation/models/manufacturer_product_details_request.py b/digikey/v3/productinformation/models/manufacturer_product_details_request.py
index d82d939..0eb5d14 100644
--- a/digikey/v3/productinformation/models/manufacturer_product_details_request.py
+++ b/digikey/v3/productinformation/models/manufacturer_product_details_request.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/manufacturers_response.py b/digikey/v3/productinformation/models/manufacturers_response.py
new file mode 100644
index 0000000..a3fee59
--- /dev/null
+++ b/digikey/v3/productinformation/models/manufacturers_response.py
@@ -0,0 +1,117 @@
+# coding: utf-8
+
+"""
+ PartSearch Api
+
+ Search for products and retrieve details and pricing. # noqa: E501
+
+ OpenAPI spec version: Ps2
+
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ManufacturersResponse(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'manufacturers': 'list[ManufacturerInfo]'
+ }
+
+ attribute_map = {
+ 'manufacturers': 'Manufacturers'
+ }
+
+ def __init__(self, manufacturers=None): # noqa: E501
+ """ManufacturersResponse - a model defined in Swagger""" # noqa: E501
+
+ self._manufacturers = None
+ self.discriminator = None
+
+ if manufacturers is not None:
+ self.manufacturers = manufacturers
+
+ @property
+ def manufacturers(self):
+ """Gets the manufacturers of this ManufacturersResponse. # noqa: E501
+
+ List of Manufacturer Information # noqa: E501
+
+ :return: The manufacturers of this ManufacturersResponse. # noqa: E501
+ :rtype: list[ManufacturerInfo]
+ """
+ return self._manufacturers
+
+ @manufacturers.setter
+ def manufacturers(self, manufacturers):
+ """Sets the manufacturers of this ManufacturersResponse.
+
+ List of Manufacturer Information # noqa: E501
+
+ :param manufacturers: The manufacturers of this ManufacturersResponse. # noqa: E501
+ :type: list[ManufacturerInfo]
+ """
+
+ self._manufacturers = manufacturers
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(ManufacturersResponse, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ManufacturersResponse):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/productinformation/models/media_links.py b/digikey/v3/productinformation/models/media_links.py
index 8b3a425..faa457e 100644
--- a/digikey/v3/productinformation/models/media_links.py
+++ b/digikey/v3/productinformation/models/media_links.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/parametric_filter.py b/digikey/v3/productinformation/models/parametric_filter.py
index e36c7ee..93080b0 100644
--- a/digikey/v3/productinformation/models/parametric_filter.py
+++ b/digikey/v3/productinformation/models/parametric_filter.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/pid_vid.py b/digikey/v3/productinformation/models/pid_vid.py
index 04c0a48..15e62d7 100644
--- a/digikey/v3/productinformation/models/pid_vid.py
+++ b/digikey/v3/productinformation/models/pid_vid.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/price_break.py b/digikey/v3/productinformation/models/price_break.py
index c5d863a..e57d433 100644
--- a/digikey/v3/productinformation/models/price_break.py
+++ b/digikey/v3/productinformation/models/price_break.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/product.py b/digikey/v3/productinformation/models/product.py
index 0e5b4f2..1fbbcdb 100644
--- a/digikey/v3/productinformation/models/product.py
+++ b/digikey/v3/productinformation/models/product.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -64,9 +64,15 @@ class Product(object):
'manufacturer': 'PidVid',
'manufacturer_public_quantity': 'int',
'quantity_on_order': 'int',
+ 'max_quantity_for_distribution': 'int',
+ 'back_order_not_allowed': 'bool',
'dk_plus_restriction': 'bool',
'marketplace': 'bool',
- 'supplier_direct_ship': 'bool'
+ 'supplier_direct_ship': 'bool',
+ 'pim_product_name': 'str',
+ 'supplier': 'str',
+ 'supplier_id': 'int',
+ 'is_ncnr': 'bool'
}
attribute_map = {
@@ -103,12 +109,18 @@ class Product(object):
'manufacturer': 'Manufacturer',
'manufacturer_public_quantity': 'ManufacturerPublicQuantity',
'quantity_on_order': 'QuantityOnOrder',
+ 'max_quantity_for_distribution': 'MaxQuantityForDistribution',
+ 'back_order_not_allowed': 'BackOrderNotAllowed',
'dk_plus_restriction': 'DKPlusRestriction',
'marketplace': 'Marketplace',
- 'supplier_direct_ship': 'SupplierDirectShip'
+ 'supplier_direct_ship': 'SupplierDirectShip',
+ 'pim_product_name': 'PimProductName',
+ 'supplier': 'Supplier',
+ 'supplier_id': 'SupplierId',
+ 'is_ncnr': 'IsNcnr'
}
- def __init__(self, standard_pricing=None, ro_hs_status=None, lead_status=None, parameters=None, product_url=None, primary_datasheet=None, primary_photo=None, primary_video=None, series=None, manufacturer_lead_weeks=None, manufacturer_page_url=None, product_status=None, date_last_buy_chance=None, alternate_packaging=None, detailed_description=None, reach_status=None, export_control_class_number=None, htsus_code=None, tariff_description=None, moisture_sensitivity_level=None, family=None, category=None, manufacturer_part_number=None, minimum_order_quantity=None, non_stock=None, packaging=None, quantity_available=None, digi_key_part_number=None, product_description=None, unit_price=None, manufacturer=None, manufacturer_public_quantity=None, quantity_on_order=None, dk_plus_restriction=None, marketplace=None, supplier_direct_ship=None): # noqa: E501
+ def __init__(self, standard_pricing=None, ro_hs_status=None, lead_status=None, parameters=None, product_url=None, primary_datasheet=None, primary_photo=None, primary_video=None, series=None, manufacturer_lead_weeks=None, manufacturer_page_url=None, product_status=None, date_last_buy_chance=None, alternate_packaging=None, detailed_description=None, reach_status=None, export_control_class_number=None, htsus_code=None, tariff_description=None, moisture_sensitivity_level=None, family=None, category=None, manufacturer_part_number=None, minimum_order_quantity=None, non_stock=None, packaging=None, quantity_available=None, digi_key_part_number=None, product_description=None, unit_price=None, manufacturer=None, manufacturer_public_quantity=None, quantity_on_order=None, max_quantity_for_distribution=None, back_order_not_allowed=None, dk_plus_restriction=None, marketplace=None, supplier_direct_ship=None, pim_product_name=None, supplier=None, supplier_id=None, is_ncnr=None): # noqa: E501
"""Product - a model defined in Swagger""" # noqa: E501
self._standard_pricing = None
@@ -144,9 +156,15 @@ def __init__(self, standard_pricing=None, ro_hs_status=None, lead_status=None, p
self._manufacturer = None
self._manufacturer_public_quantity = None
self._quantity_on_order = None
+ self._max_quantity_for_distribution = None
+ self._back_order_not_allowed = None
self._dk_plus_restriction = None
self._marketplace = None
self._supplier_direct_ship = None
+ self._pim_product_name = None
+ self._supplier = None
+ self._supplier_id = None
+ self._is_ncnr = None
self.discriminator = None
if standard_pricing is not None:
@@ -215,12 +233,24 @@ def __init__(self, standard_pricing=None, ro_hs_status=None, lead_status=None, p
self.manufacturer_public_quantity = manufacturer_public_quantity
if quantity_on_order is not None:
self.quantity_on_order = quantity_on_order
+ if max_quantity_for_distribution is not None:
+ self.max_quantity_for_distribution = max_quantity_for_distribution
+ if back_order_not_allowed is not None:
+ self.back_order_not_allowed = back_order_not_allowed
if dk_plus_restriction is not None:
self.dk_plus_restriction = dk_plus_restriction
if marketplace is not None:
self.marketplace = marketplace
if supplier_direct_ship is not None:
self.supplier_direct_ship = supplier_direct_ship
+ if pim_product_name is not None:
+ self.pim_product_name = pim_product_name
+ if supplier is not None:
+ self.supplier = supplier
+ if supplier_id is not None:
+ self.supplier_id = supplier_id
+ if is_ncnr is not None:
+ self.is_ncnr = is_ncnr
@property
def standard_pricing(self):
@@ -971,11 +1001,57 @@ def quantity_on_order(self, quantity_on_order):
self._quantity_on_order = quantity_on_order
+ @property
+ def max_quantity_for_distribution(self):
+ """Gets the max_quantity_for_distribution of this Product. # noqa: E501
+
+ Maximum order quantity for Distribution # noqa: E501
+
+ :return: The max_quantity_for_distribution of this Product. # noqa: E501
+ :rtype: int
+ """
+ return self._max_quantity_for_distribution
+
+ @max_quantity_for_distribution.setter
+ def max_quantity_for_distribution(self, max_quantity_for_distribution):
+ """Sets the max_quantity_for_distribution of this Product.
+
+ Maximum order quantity for Distribution # noqa: E501
+
+ :param max_quantity_for_distribution: The max_quantity_for_distribution of this Product. # noqa: E501
+ :type: int
+ """
+
+ self._max_quantity_for_distribution = max_quantity_for_distribution
+
+ @property
+ def back_order_not_allowed(self):
+ """Gets the back_order_not_allowed of this Product. # noqa: E501
+
+ True if back order is not allowed for this product # noqa: E501
+
+ :return: The back_order_not_allowed of this Product. # noqa: E501
+ :rtype: bool
+ """
+ return self._back_order_not_allowed
+
+ @back_order_not_allowed.setter
+ def back_order_not_allowed(self, back_order_not_allowed):
+ """Sets the back_order_not_allowed of this Product.
+
+ True if back order is not allowed for this product # noqa: E501
+
+ :param back_order_not_allowed: The back_order_not_allowed of this Product. # noqa: E501
+ :type: bool
+ """
+
+ self._back_order_not_allowed = back_order_not_allowed
+
@property
def dk_plus_restriction(self):
"""Gets the dk_plus_restriction of this Product. # noqa: E501
- Deprecated property - see Marketplace # noqa: E501
+ If true- this product is not available for purchase through the Ordering API - it must be purchased through the Digi-Key web site # noqa: E501
:return: The dk_plus_restriction of this Product. # noqa: E501
:rtype: bool
@@ -986,7 +1062,7 @@ def dk_plus_restriction(self):
def dk_plus_restriction(self, dk_plus_restriction):
"""Sets the dk_plus_restriction of this Product.
- Deprecated property - see Marketplace # noqa: E501
+ If true- this product is not available for purchase through the Ordering API - it must be purchased through the Digi-Key web site # noqa: E501
:param dk_plus_restriction: The dk_plus_restriction of this Product. # noqa: E501
:type: bool
@@ -1040,6 +1116,98 @@ def supplier_direct_ship(self, supplier_direct_ship):
self._supplier_direct_ship = supplier_direct_ship
+ @property
+ def pim_product_name(self):
+ """Gets the pim_product_name of this Product. # noqa: E501
+
+ Pim name for the product # noqa: E501
+
+ :return: The pim_product_name of this Product. # noqa: E501
+ :rtype: str
+ """
+ return self._pim_product_name
+
+ @pim_product_name.setter
+ def pim_product_name(self, pim_product_name):
+ """Sets the pim_product_name of this Product.
+
+ Pim name for the product # noqa: E501
+
+ :param pim_product_name: The pim_product_name of this Product. # noqa: E501
+ :type: str
+ """
+
+ self._pim_product_name = pim_product_name
+
+ @property
+ def supplier(self):
+ """Gets the supplier of this Product. # noqa: E501
+
+ The Supplier is the provider of the products to Digi-Key and some cases the customer directly. # noqa: E501
+
+ :return: The supplier of this Product. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier
+
+ @supplier.setter
+ def supplier(self, supplier):
+ """Sets the supplier of this Product.
+
+ The Supplier is the provider of the products to Digi-Key and some cases the customer directly. # noqa: E501
+
+ :param supplier: The supplier of this Product. # noqa: E501
+ :type: str
+ """
+
+ self._supplier = supplier
+
+ @property
+ def supplier_id(self):
+ """Gets the supplier_id of this Product. # noqa: E501
+
+ Id for Supplier # noqa: E501
+
+ :return: The supplier_id of this Product. # noqa: E501
+ :rtype: int
+ """
+ return self._supplier_id
+
+ @supplier_id.setter
+ def supplier_id(self, supplier_id):
+ """Sets the supplier_id of this Product.
+
+ Id for Supplier # noqa: E501
+
+ :param supplier_id: The supplier_id of this Product. # noqa: E501
+ :type: int
+ """
+
+ self._supplier_id = supplier_id
+
+ @property
+ def is_ncnr(self):
+ """Gets the is_ncnr of this Product. # noqa: E501
+
+ Is product non-cancellable and non-returnable # noqa: E501
+
+ :return: The is_ncnr of this Product. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_ncnr
+
+ @is_ncnr.setter
+ def is_ncnr(self, is_ncnr):
+ """Sets the is_ncnr of this Product.
+
+ Is product non-cancellable and non-returnable # noqa: E501
+
+ :param is_ncnr: The is_ncnr of this Product. # noqa: E501
+ :type: bool
+ """
+
+ self._is_ncnr = is_ncnr
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
diff --git a/digikey/v3/productinformation/models/product_details.py b/digikey/v3/productinformation/models/product_details.py
index 3eed6bc..6ab9ecc 100644
--- a/digikey/v3/productinformation/models/product_details.py
+++ b/digikey/v3/productinformation/models/product_details.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
@@ -46,6 +46,7 @@ class ProductDetails(object):
'suggested_subs': 'list[AssociatedProduct]',
'additional_value_fee': 'float',
'reach_effective_date': 'str',
+ 'shipping_info': 'str',
'standard_pricing': 'list[PriceBreak]',
'ro_hs_status': 'str',
'lead_status': 'str',
@@ -79,9 +80,15 @@ class ProductDetails(object):
'manufacturer': 'PidVid',
'manufacturer_public_quantity': 'int',
'quantity_on_order': 'int',
+ 'max_quantity_for_distribution': 'int',
+ 'back_order_not_allowed': 'bool',
'dk_plus_restriction': 'bool',
'marketplace': 'bool',
- 'supplier_direct_ship': 'bool'
+ 'supplier_direct_ship': 'bool',
+ 'pim_product_name': 'str',
+ 'supplier': 'str',
+ 'supplier_id': 'int',
+ 'is_ncnr': 'bool'
}
attribute_map = {
@@ -100,6 +107,7 @@ class ProductDetails(object):
'suggested_subs': 'SuggestedSubs',
'additional_value_fee': 'AdditionalValueFee',
'reach_effective_date': 'ReachEffectiveDate',
+ 'shipping_info': 'ShippingInfo',
'standard_pricing': 'StandardPricing',
'ro_hs_status': 'RoHSStatus',
'lead_status': 'LeadStatus',
@@ -133,12 +141,18 @@ class ProductDetails(object):
'manufacturer': 'Manufacturer',
'manufacturer_public_quantity': 'ManufacturerPublicQuantity',
'quantity_on_order': 'QuantityOnOrder',
+ 'max_quantity_for_distribution': 'MaxQuantityForDistribution',
+ 'back_order_not_allowed': 'BackOrderNotAllowed',
'dk_plus_restriction': 'DKPlusRestriction',
'marketplace': 'Marketplace',
- 'supplier_direct_ship': 'SupplierDirectShip'
+ 'supplier_direct_ship': 'SupplierDirectShip',
+ 'pim_product_name': 'PimProductName',
+ 'supplier': 'Supplier',
+ 'supplier_id': 'SupplierId',
+ 'is_ncnr': 'IsNcnr'
}
- def __init__(self, my_pricing=None, obsolete=None, media_links=None, standard_package=None, limited_taxonomy=None, kits=None, kit_contents=None, mating_products=None, search_locale_used=None, associated_products=None, for_use_with_products=None, rohs_subs=None, suggested_subs=None, additional_value_fee=None, reach_effective_date=None, standard_pricing=None, ro_hs_status=None, lead_status=None, parameters=None, product_url=None, primary_datasheet=None, primary_photo=None, primary_video=None, series=None, manufacturer_lead_weeks=None, manufacturer_page_url=None, product_status=None, date_last_buy_chance=None, alternate_packaging=None, detailed_description=None, reach_status=None, export_control_class_number=None, htsus_code=None, tariff_description=None, moisture_sensitivity_level=None, family=None, category=None, manufacturer_part_number=None, minimum_order_quantity=None, non_stock=None, packaging=None, quantity_available=None, digi_key_part_number=None, product_description=None, unit_price=None, manufacturer=None, manufacturer_public_quantity=None, quantity_on_order=None, dk_plus_restriction=None, marketplace=None, supplier_direct_ship=None): # noqa: E501
+ def __init__(self, my_pricing=None, obsolete=None, media_links=None, standard_package=None, limited_taxonomy=None, kits=None, kit_contents=None, mating_products=None, search_locale_used=None, associated_products=None, for_use_with_products=None, rohs_subs=None, suggested_subs=None, additional_value_fee=None, reach_effective_date=None, shipping_info=None, standard_pricing=None, ro_hs_status=None, lead_status=None, parameters=None, product_url=None, primary_datasheet=None, primary_photo=None, primary_video=None, series=None, manufacturer_lead_weeks=None, manufacturer_page_url=None, product_status=None, date_last_buy_chance=None, alternate_packaging=None, detailed_description=None, reach_status=None, export_control_class_number=None, htsus_code=None, tariff_description=None, moisture_sensitivity_level=None, family=None, category=None, manufacturer_part_number=None, minimum_order_quantity=None, non_stock=None, packaging=None, quantity_available=None, digi_key_part_number=None, product_description=None, unit_price=None, manufacturer=None, manufacturer_public_quantity=None, quantity_on_order=None, max_quantity_for_distribution=None, back_order_not_allowed=None, dk_plus_restriction=None, marketplace=None, supplier_direct_ship=None, pim_product_name=None, supplier=None, supplier_id=None, is_ncnr=None): # noqa: E501
"""ProductDetails - a model defined in Swagger""" # noqa: E501
self._my_pricing = None
@@ -156,6 +170,7 @@ def __init__(self, my_pricing=None, obsolete=None, media_links=None, standard_pa
self._suggested_subs = None
self._additional_value_fee = None
self._reach_effective_date = None
+ self._shipping_info = None
self._standard_pricing = None
self._ro_hs_status = None
self._lead_status = None
@@ -189,9 +204,15 @@ def __init__(self, my_pricing=None, obsolete=None, media_links=None, standard_pa
self._manufacturer = None
self._manufacturer_public_quantity = None
self._quantity_on_order = None
+ self._max_quantity_for_distribution = None
+ self._back_order_not_allowed = None
self._dk_plus_restriction = None
self._marketplace = None
self._supplier_direct_ship = None
+ self._pim_product_name = None
+ self._supplier = None
+ self._supplier_id = None
+ self._is_ncnr = None
self.discriminator = None
if my_pricing is not None:
@@ -224,6 +245,8 @@ def __init__(self, my_pricing=None, obsolete=None, media_links=None, standard_pa
self.additional_value_fee = additional_value_fee
if reach_effective_date is not None:
self.reach_effective_date = reach_effective_date
+ if shipping_info is not None:
+ self.shipping_info = shipping_info
if standard_pricing is not None:
self.standard_pricing = standard_pricing
if ro_hs_status is not None:
@@ -290,12 +313,24 @@ def __init__(self, my_pricing=None, obsolete=None, media_links=None, standard_pa
self.manufacturer_public_quantity = manufacturer_public_quantity
if quantity_on_order is not None:
self.quantity_on_order = quantity_on_order
+ if max_quantity_for_distribution is not None:
+ self.max_quantity_for_distribution = max_quantity_for_distribution
+ if back_order_not_allowed is not None:
+ self.back_order_not_allowed = back_order_not_allowed
if dk_plus_restriction is not None:
self.dk_plus_restriction = dk_plus_restriction
if marketplace is not None:
self.marketplace = marketplace
if supplier_direct_ship is not None:
self.supplier_direct_ship = supplier_direct_ship
+ if pim_product_name is not None:
+ self.pim_product_name = pim_product_name
+ if supplier is not None:
+ self.supplier = supplier
+ if supplier_id is not None:
+ self.supplier_id = supplier_id
+ if is_ncnr is not None:
+ self.is_ncnr = is_ncnr
@property
def my_pricing(self):
@@ -550,7 +585,7 @@ def for_use_with_products(self, for_use_with_products):
def rohs_subs(self):
"""Gets the rohs_subs of this ProductDetails. # noqa: E501
- Rohs substitutions # noqa: E501
+ Rohs substitutions Note: This is now only available in a details call from partsearch. # noqa: E501
:return: The rohs_subs of this ProductDetails. # noqa: E501
:rtype: list[AssociatedProduct]
@@ -561,7 +596,7 @@ def rohs_subs(self):
def rohs_subs(self, rohs_subs):
"""Sets the rohs_subs of this ProductDetails.
- Rohs substitutions # noqa: E501
+ Rohs substitutions Note: This is now only available in a details call from partsearch. # noqa: E501
:param rohs_subs: The rohs_subs of this ProductDetails. # noqa: E501
:type: list[AssociatedProduct]
@@ -573,7 +608,7 @@ def rohs_subs(self, rohs_subs):
def suggested_subs(self):
"""Gets the suggested_subs of this ProductDetails. # noqa: E501
- Suggested substitutions for when the product is obsolete. # noqa: E501
+ Suggested substitutions for when the product is obsolete. Note: Only available in details calls # noqa: E501
:return: The suggested_subs of this ProductDetails. # noqa: E501
:rtype: list[AssociatedProduct]
@@ -584,7 +619,7 @@ def suggested_subs(self):
def suggested_subs(self, suggested_subs):
"""Sets the suggested_subs of this ProductDetails.
- Suggested substitutions for when the product is obsolete. # noqa: E501
+ Suggested substitutions for when the product is obsolete. Note: Only available in details calls # noqa: E501
:param suggested_subs: The suggested_subs of this ProductDetails. # noqa: E501
:type: list[AssociatedProduct]
@@ -638,6 +673,29 @@ def reach_effective_date(self, reach_effective_date):
self._reach_effective_date = reach_effective_date
+ @property
+ def shipping_info(self):
+ """Gets the shipping_info of this ProductDetails. # noqa: E501
+
+ Filled with shipping information, restrictions, or empty REACH is a regulation of the European Union. See documentation from the European Chemicals Agency. # noqa: E501
+
+ :return: The shipping_info of this ProductDetails. # noqa: E501
+ :rtype: str
+ """
+ return self._shipping_info
+
+ @shipping_info.setter
+ def shipping_info(self, shipping_info):
+ """Sets the shipping_info of this ProductDetails.
+
+ Filled with shipping information, restrictions, or empty REACH is a regulation of the European Union. See documentation from the European Chemicals Agency. # noqa: E501
+
+ :param shipping_info: The shipping_info of this ProductDetails. # noqa: E501
+ :type: str
+ """
+
+ self._shipping_info = shipping_info
+
@property
def standard_pricing(self):
"""Gets the standard_pricing of this ProductDetails. # noqa: E501
@@ -1387,11 +1445,57 @@ def quantity_on_order(self, quantity_on_order):
self._quantity_on_order = quantity_on_order
+ @property
+ def max_quantity_for_distribution(self):
+ """Gets the max_quantity_for_distribution of this ProductDetails. # noqa: E501
+
+ Maximum order quantity for Distribution # noqa: E501
+
+ :return: The max_quantity_for_distribution of this ProductDetails. # noqa: E501
+ :rtype: int
+ """
+ return self._max_quantity_for_distribution
+
+ @max_quantity_for_distribution.setter
+ def max_quantity_for_distribution(self, max_quantity_for_distribution):
+ """Sets the max_quantity_for_distribution of this ProductDetails.
+
+ Maximum order quantity for Distribution # noqa: E501
+
+ :param max_quantity_for_distribution: The max_quantity_for_distribution of this ProductDetails. # noqa: E501
+ :type: int
+ """
+
+ self._max_quantity_for_distribution = max_quantity_for_distribution
+
+ @property
+ def back_order_not_allowed(self):
+ """Gets the back_order_not_allowed of this ProductDetails. # noqa: E501
+
+ True if back order is not allowed for this product # noqa: E501
+
+ :return: The back_order_not_allowed of this ProductDetails. # noqa: E501
+ :rtype: bool
+ """
+ return self._back_order_not_allowed
+
+ @back_order_not_allowed.setter
+ def back_order_not_allowed(self, back_order_not_allowed):
+ """Sets the back_order_not_allowed of this ProductDetails.
+
+ True if back order is not allowed for this product # noqa: E501
+
+ :param back_order_not_allowed: The back_order_not_allowed of this ProductDetails. # noqa: E501
+ :type: bool
+ """
+
+ self._back_order_not_allowed = back_order_not_allowed
+
@property
def dk_plus_restriction(self):
"""Gets the dk_plus_restriction of this ProductDetails. # noqa: E501
- Deprecated property - see Marketplace # noqa: E501
+ If true- this product is not available for purchase through the Ordering API - it must be purchased through the Digi-Key web site # noqa: E501
:return: The dk_plus_restriction of this ProductDetails. # noqa: E501
:rtype: bool
@@ -1402,7 +1506,7 @@ def dk_plus_restriction(self):
def dk_plus_restriction(self, dk_plus_restriction):
"""Sets the dk_plus_restriction of this ProductDetails.
- Deprecated property - see Marketplace # noqa: E501
+ If true- this product is not available for purchase through the Ordering API - it must be purchased through the Digi-Key web site # noqa: E501
:param dk_plus_restriction: The dk_plus_restriction of this ProductDetails. # noqa: E501
:type: bool
@@ -1456,6 +1560,98 @@ def supplier_direct_ship(self, supplier_direct_ship):
self._supplier_direct_ship = supplier_direct_ship
+ @property
+ def pim_product_name(self):
+ """Gets the pim_product_name of this ProductDetails. # noqa: E501
+
+ Pim name for the product # noqa: E501
+
+ :return: The pim_product_name of this ProductDetails. # noqa: E501
+ :rtype: str
+ """
+ return self._pim_product_name
+
+ @pim_product_name.setter
+ def pim_product_name(self, pim_product_name):
+ """Sets the pim_product_name of this ProductDetails.
+
+ Pim name for the product # noqa: E501
+
+ :param pim_product_name: The pim_product_name of this ProductDetails. # noqa: E501
+ :type: str
+ """
+
+ self._pim_product_name = pim_product_name
+
+ @property
+ def supplier(self):
+ """Gets the supplier of this ProductDetails. # noqa: E501
+
+ The Supplier is the provider of the products to Digi-Key and some cases the customer directly. # noqa: E501
+
+ :return: The supplier of this ProductDetails. # noqa: E501
+ :rtype: str
+ """
+ return self._supplier
+
+ @supplier.setter
+ def supplier(self, supplier):
+ """Sets the supplier of this ProductDetails.
+
+ The Supplier is the provider of the products to Digi-Key and some cases the customer directly. # noqa: E501
+
+ :param supplier: The supplier of this ProductDetails. # noqa: E501
+ :type: str
+ """
+
+ self._supplier = supplier
+
+ @property
+ def supplier_id(self):
+ """Gets the supplier_id of this ProductDetails. # noqa: E501
+
+ Id for Supplier # noqa: E501
+
+ :return: The supplier_id of this ProductDetails. # noqa: E501
+ :rtype: int
+ """
+ return self._supplier_id
+
+ @supplier_id.setter
+ def supplier_id(self, supplier_id):
+ """Sets the supplier_id of this ProductDetails.
+
+ Id for Supplier # noqa: E501
+
+ :param supplier_id: The supplier_id of this ProductDetails. # noqa: E501
+ :type: int
+ """
+
+ self._supplier_id = supplier_id
+
+ @property
+ def is_ncnr(self):
+ """Gets the is_ncnr of this ProductDetails. # noqa: E501
+
+ Is product non-cancellable and non-returnable # noqa: E501
+
+ :return: The is_ncnr of this ProductDetails. # noqa: E501
+ :rtype: bool
+ """
+ return self._is_ncnr
+
+ @is_ncnr.setter
+ def is_ncnr(self, is_ncnr):
+ """Sets the is_ncnr of this ProductDetails.
+
+ Is product non-cancellable and non-returnable # noqa: E501
+
+ :param is_ncnr: The is_ncnr of this ProductDetails. # noqa: E501
+ :type: bool
+ """
+
+ self._is_ncnr = is_ncnr
+
def to_dict(self):
"""Returns the model properties as a dict"""
result = {}
diff --git a/digikey/v3/productinformation/models/product_details_response.py b/digikey/v3/productinformation/models/product_details_response.py
index 26022b0..9a4395a 100644
--- a/digikey/v3/productinformation/models/product_details_response.py
+++ b/digikey/v3/productinformation/models/product_details_response.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/product_with_suggestions.py b/digikey/v3/productinformation/models/product_with_suggestions.py
new file mode 100644
index 0000000..abca7ba
--- /dev/null
+++ b/digikey/v3/productinformation/models/product_with_suggestions.py
@@ -0,0 +1,141 @@
+# coding: utf-8
+
+"""
+ PartSearch Api
+
+ Search for products and retrieve details and pricing. # noqa: E501
+
+ OpenAPI spec version: Ps2
+
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
+"""
+
+
+import pprint
+import re # noqa: F401
+
+import six
+
+
+class ProductWithSuggestions(object):
+ """NOTE: This class is auto generated by the swagger code generator program.
+
+ Do not edit the class manually.
+ """
+
+ """
+ Attributes:
+ swagger_types (dict): The key is attribute name
+ and the value is attribute type.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ """
+ swagger_types = {
+ 'product': 'ProductDetails',
+ 'suggested_products': 'list[Product]'
+ }
+
+ attribute_map = {
+ 'product': 'Product',
+ 'suggested_products': 'SuggestedProducts'
+ }
+
+ def __init__(self, product=None, suggested_products=None): # noqa: E501
+ """ProductWithSuggestions - a model defined in Swagger""" # noqa: E501
+
+ self._product = None
+ self._suggested_products = None
+ self.discriminator = None
+
+ if product is not None:
+ self.product = product
+ if suggested_products is not None:
+ self.suggested_products = suggested_products
+
+ @property
+ def product(self):
+ """Gets the product of this ProductWithSuggestions. # noqa: E501
+
+
+ :return: The product of this ProductWithSuggestions. # noqa: E501
+ :rtype: ProductDetails
+ """
+ return self._product
+
+ @product.setter
+ def product(self, product):
+ """Sets the product of this ProductWithSuggestions.
+
+
+ :param product: The product of this ProductWithSuggestions. # noqa: E501
+ :type: ProductDetails
+ """
+
+ self._product = product
+
+ @property
+ def suggested_products(self):
+ """Gets the suggested_products of this ProductWithSuggestions. # noqa: E501
+
+
+ :return: The suggested_products of this ProductWithSuggestions. # noqa: E501
+ :rtype: list[Product]
+ """
+ return self._suggested_products
+
+ @suggested_products.setter
+ def suggested_products(self, suggested_products):
+ """Sets the suggested_products of this ProductWithSuggestions.
+
+
+ :param suggested_products: The suggested_products of this ProductWithSuggestions. # noqa: E501
+ :type: list[Product]
+ """
+
+ self._suggested_products = suggested_products
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ result = {}
+
+ for attr, _ in six.iteritems(self.swagger_types):
+ value = getattr(self, attr)
+ if isinstance(value, list):
+ result[attr] = list(map(
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
+ value
+ ))
+ elif hasattr(value, "to_dict"):
+ result[attr] = value.to_dict()
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0], item[1].to_dict())
+ if hasattr(item[1], "to_dict") else item,
+ value.items()
+ ))
+ else:
+ result[attr] = value
+ if issubclass(ProductWithSuggestions, dict):
+ for key, value in self.items():
+ result[key] = value
+
+ return result
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, ProductWithSuggestions):
+ return False
+
+ return self.__dict__ == other.__dict__
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
diff --git a/digikey/v3/productinformation/models/search_option.py b/digikey/v3/productinformation/models/search_option.py
index f2af825..5be0511 100644
--- a/digikey/v3/productinformation/models/search_option.py
+++ b/digikey/v3/productinformation/models/search_option.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/sort_direction.py b/digikey/v3/productinformation/models/sort_direction.py
index 8ad00a4..b962942 100644
--- a/digikey/v3/productinformation/models/sort_direction.py
+++ b/digikey/v3/productinformation/models/sort_direction.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/sort_option.py b/digikey/v3/productinformation/models/sort_option.py
index 38233e9..1fb77d3 100644
--- a/digikey/v3/productinformation/models/sort_option.py
+++ b/digikey/v3/productinformation/models/sort_option.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/sort_parameters.py b/digikey/v3/productinformation/models/sort_parameters.py
index 9052055..8c71d2b 100644
--- a/digikey/v3/productinformation/models/sort_parameters.py
+++ b/digikey/v3/productinformation/models/sort_parameters.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/models/value_pair.py b/digikey/v3/productinformation/models/value_pair.py
index 12f2e96..e95c380 100644
--- a/digikey/v3/productinformation/models/value_pair.py
+++ b/digikey/v3/productinformation/models/value_pair.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/digikey/v3/productinformation/rest.py b/digikey/v3/productinformation/rest.py
index 468cd38..8f531b6 100644
--- a/digikey/v3/productinformation/rest.py
+++ b/digikey/v3/productinformation/rest.py
@@ -5,7 +5,7 @@
Search for products and retrieve details and pricing. # noqa: E501
- OpenAPI spec version: v3
+ OpenAPI spec version: Ps2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
diff --git a/generate-v3-api/generage_client_swagger.py b/generate-v3-api/generage_client_swagger.py
index 6aa2669..c67ef8f 100644
--- a/generate-v3-api/generage_client_swagger.py
+++ b/generate-v3-api/generage_client_swagger.py
@@ -37,6 +37,12 @@
, 'TMP_PATH': os.path.realpath(os.path.expanduser(
os.path.join(os.path.dirname(__file__), '..', '.tmp'))
)
+ , 'API_PATH': os.path.realpath(os.path.expanduser(
+ os.path.join(os.path.dirname(__file__), '..', 'digikey', 'v3'))
+ )
+ , 'SWG_PATH': os.path.realpath(os.path.expanduser(
+ os.path.join(os.path.dirname(__file__), '..', 'swagger'))
+ )
}
if not os.path.exists(".env/config.ini"):
if not os.path.exists(".env"):
@@ -48,9 +54,11 @@
DEST_PATH = config['custom']['DEST_PATH']
TMP_PATH = config['custom']['TMP_PATH']
API_PATH = config['custom']['API_PATH']
+SWG_PATH = config['custom']['SWG_PATH']
logging.debug("config.ini - DEST_PATH:{}".format(DEST_PATH))
logging.debug("config.ini - TMP_PATH:{}".format(TMP_PATH))
logging.debug("config.ini - API_PATH:{}".format(API_PATH))
+logging.debug("config.ini - SWG_PATH:{}".format(SWG_PATH))
logging.debug("CodeGen Digikey API Clients: module: tools.py is loading ......")
logging.debug("CodeGen Directory for Digikey API's: {tmpDir}".format(tmpDir=TMP_PATH))
@@ -76,6 +84,11 @@
"projectName": "community-digikey-api-batchproductdetails",
"packageVersion": "0.1.0",
}
+ , 'marketplace': {
+ "packageName": "digikey.v3.marketplace",
+ "projectName": "community-digikey-api-marketplace",
+ "packageVersion": "0.1.0",
+ }
}
digikeyAPIdef_all = {
@@ -84,18 +97,28 @@
, apiSubGroup='partsearch'
, apiQuery='productdetails'
, urlNode='432'
+ , filename='PartSearch.json'
)
, 'order-support':
dict(apiGroup='order-support'
, apiSubGroup='orderdetails'
, apiQuery='orderhistory'
, urlNode='883'
+ , filename='OrderDetails.json'
)
, 'batch-product-details':
dict(apiGroup='batch-productdetails'
, apiSubGroup='batchproductdetailsapi'
, apiQuery='batchproductdetails'
, urlNode='682'
+ , filename='BatchProductDetailsAPI.json'
+ )
+ , 'marketplace':
+ dict(apiGroup='marketplace'
+ , apiSubGroup='orders'
+ , apiQuery='getorders'
+ , urlNode='2393'
+ , filename='Orders.json'
)
}
@@ -104,6 +127,13 @@ def getDigikeyAPIswaggerSpecJSON(destPath, **kwargs):
# refererURL='https://developer.digikey.com/products/product-information/partsearch/productdetails?prod=true'
refererURL = 'https://developer.digikey.com/products/{apiGroup}/{apiSubGroup}/{apiQuery}?prod=true'.format(**kwargs)
url = 'https://developer.digikey.com/node/{urlNode}/oas-download'.format(**kwargs)
+ # if the local file exists, then use it
+ if os.path.exists(os.path.join(SWG_PATH,'{filename}'.format(**kwargs))):
+ import shutil
+ swaggerSpecFile = "digikeyAPI-{apiGroup}-swagger-spec.json".format(**kwargs)
+ shutil.copyfile(os.path.join(SWG_PATH,'{filename}'.format(**kwargs)),os.path.join(destPath, swaggerSpecFile))
+ return (os.path.join(destPath, swaggerSpecFile))
+ # otherwise download the swagger file
r = requests.get(url, headers={
'referer': refererURL
,
@@ -276,9 +306,17 @@ def copy_generated_files():
Path(DEST_PATH).joinpath('community-digikey-api-batchproductdetails/digikey.v3.batchproductdetails'),
Path(API_PATH).joinpath('batchproductdetails'), dirs_exist_ok=True)
+ logging.info('Copy generated marketplace files to api destination')
+ shutil.copytree(
+ Path(DEST_PATH).joinpath('community-digikey-api-marketplace/digikey/v3/marketplace'),
+ Path(API_PATH).joinpath('marketplace'), dirs_exist_ok=True)
+ shutil.copytree(
+ Path(DEST_PATH).joinpath('community-digikey-api-marketplace/digikey.v3.marketplace'),
+ Path(API_PATH).joinpath('marketplace'), dirs_exist_ok=True)
+
# Currently supported API's
-apiGenerateList = ['product-information', 'order-support', 'batch-product-details']
+apiGenerateList = ['product-information', 'order-support', 'batch-product-details', 'marketplace']
# Generate Digikey API python clients
generated = [
diff --git a/swagger/Orders.json b/swagger/Orders.json
new file mode 100644
index 0000000..cf3d007
--- /dev/null
+++ b/swagger/Orders.json
@@ -0,0 +1,1685 @@
+{
+ "swagger": "2.0",
+ "info": {
+ "title": "Orders",
+ "description": "API operations for managing orders as well as refunds and incidents as they relate to the order",
+ "contact": {
+ "name": "Marketplace Support",
+ "url": "https:\/\/www.digikey.com",
+ "email": "MarketplaceAPISupport@digikey.com"
+ },
+ "version": "suppliers-v1",
+ "x-technical-domain": "Sales"
+ },
+ "schemes": [
+ "https"
+ ],
+ "paths": {
+ "\/orders": {
+ "get": {
+ "tags": [
+ "Orders"
+ ],
+ "summary": "Gets orders. Sortable fields are id, businessId, createDateUtc, shippingDeadlineUtc. Sorting format is \"field|direction\". Direction values: asc or desc.",
+ "operationId": "GetOrders",
+ "produces": [
+ "application\/json"
+ ],
+ "parameters": [
+ {
+ "in": "query",
+ "name": "BusinessIds",
+ "type": "string"
+ },
+ {
+ "in": "query",
+ "name": "CustomerIds",
+ "type": "string"
+ },
+ {
+ "in": "query",
+ "name": "ProductPartNumbers",
+ "type": "string"
+ },
+ {
+ "in": "query",
+ "name": "SupplierIds",
+ "type": "string"
+ },
+ {
+ "in": "query",
+ "name": "CreatedFrom",
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "in": "query",
+ "name": "CreatedTo",
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "in": "query",
+ "name": "UpdatedFrom",
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "in": "query",
+ "name": "UpdatedTo",
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "in": "query",
+ "name": "ShippingDeadlineFrom",
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "in": "query",
+ "name": "ShippingDeadlineTo",
+ "type": "string",
+ "format": "date-time"
+ },
+ {
+ "in": "query",
+ "name": "OrderDetailId",
+ "type": "string"
+ },
+ {
+ "in": "query",
+ "name": "OrderState",
+ "type": "string"
+ },
+ {
+ "in": "query",
+ "name": "HasOpenIncidents",
+ "type": "boolean"
+ },
+ {
+ "in": "query",
+ "name": "SupplierInvoiceNumber",
+ "type": "string"
+ },
+ {
+ "in": "query",
+ "name": "Offset",
+ "type": "integer",
+ "format": "int32",
+ "default": 0
+ },
+ {
+ "in": "query",
+ "name": "Max",
+ "type": "integer",
+ "format": "int32",
+ "default": 20
+ },
+ {
+ "in": "query",
+ "name": "Sort",
+ "type": "string",
+ "format": "field1|ASC,field2|DESC"
+ },
+ {
+ "in": "header",
+ "name": "Authorization",
+ "description": "OAuth Bearer Token. Please see OAuth 2.0 Documentation <\/a > page for more info.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Client-Id",
+ "description": "The Client Id for your App.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Site",
+ "description": "Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Language",
+ "description": "Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Currency",
+ "description": "Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Customer-Id",
+ "description": "Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.",
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#\/definitions\/GetOrdersPage"
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ }
+ }
+ }
+ },
+ "\/orders\/{orderId}\/accept": {
+ "put": {
+ "tags": [
+ "Orders"
+ ],
+ "summary": "Accepts or rejects order details",
+ "operationId": "AcceptOrderLinesByOrderId",
+ "consumes": [
+ "application\/json-patch+json",
+ "application\/json",
+ "text\/json",
+ "application\/*+json"
+ ],
+ "produces": [
+ "application\/json"
+ ],
+ "parameters": [
+ {
+ "in": "path",
+ "name": "orderId",
+ "description": "Id of the order",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "Authorization",
+ "description": "OAuth Bearer Token. Please see OAuth 2.0 Documentation <\/a > page for more info.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Client-Id",
+ "description": "The Client Id for your App.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Site",
+ "description": "Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Language",
+ "description": "Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Currency",
+ "description": "Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Customer-Id",
+ "description": "Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.",
+ "type": "string"
+ },
+ {
+ "in": "body",
+ "name": "body",
+ "description": "Request model containing the order acceptance details",
+ "schema": {
+ "$ref": "#\/definitions\/AcceptOrderDetailsCommandBody"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#\/definitions\/AcceptOrderDetailErrorsPage"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ },
+ "404": {
+ "description": "Not Found",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ }
+ }
+ }
+ },
+ "\/orders\/{orderId}\/ship": {
+ "put": {
+ "tags": [
+ "Orders"
+ ],
+ "summary": "Ships order",
+ "operationId": "ShipOrder",
+ "consumes": [
+ "application\/json-patch+json",
+ "application\/json",
+ "text\/json",
+ "application\/*+json"
+ ],
+ "produces": [
+ "application\/json"
+ ],
+ "parameters": [
+ {
+ "in": "path",
+ "name": "orderId",
+ "description": "Id of the order",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "Authorization",
+ "description": "OAuth Bearer Token. Please see OAuth 2.0 Documentation <\/a > page for more info.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Client-Id",
+ "description": "The Client Id for your App.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Site",
+ "description": "Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Language",
+ "description": "Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Currency",
+ "description": "Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Customer-Id",
+ "description": "Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.",
+ "type": "string"
+ },
+ {
+ "in": "body",
+ "name": "body",
+ "description": "Request model containing the order shipment details",
+ "schema": {
+ "$ref": "#\/definitions\/ShipOrderModel"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#\/definitions\/Order"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ },
+ "404": {
+ "description": "Not Found",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ }
+ }
+ }
+ },
+ "\/orders\/{orderId}\/cancel": {
+ "put": {
+ "tags": [
+ "Orders"
+ ],
+ "summary": "Cancels order details",
+ "operationId": "CancelOrderLinesByOrderId",
+ "consumes": [
+ "application\/json-patch+json",
+ "application\/json",
+ "text\/json",
+ "application\/*+json"
+ ],
+ "produces": [
+ "application\/json"
+ ],
+ "parameters": [
+ {
+ "in": "path",
+ "name": "orderId",
+ "description": "Id of the order",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "Authorization",
+ "description": "OAuth Bearer Token. Please see OAuth 2.0 Documentation <\/a > page for more info.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Client-Id",
+ "description": "The Client Id for your App.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Site",
+ "description": "Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Language",
+ "description": "Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Currency",
+ "description": "Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Customer-Id",
+ "description": "Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.",
+ "type": "string"
+ },
+ {
+ "in": "body",
+ "name": "body",
+ "description": "Request model containing the calcelation details",
+ "schema": {
+ "$ref": "#\/definitions\/CancelOrderDetailsCommandBody"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#\/definitions\/CancelOrderDetailErrorsPage"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ },
+ "404": {
+ "description": "Not Found",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ }
+ }
+ }
+ },
+ "\/orders\/{orderId}\/additionalFields": {
+ "put": {
+ "tags": [
+ "Orders"
+ ],
+ "summary": "Updates additional fields on an order",
+ "operationId": "UpdateAdditionalFields",
+ "consumes": [
+ "application\/json-patch+json",
+ "application\/json",
+ "text\/json",
+ "application\/*+json"
+ ],
+ "produces": [
+ "application\/json"
+ ],
+ "parameters": [
+ {
+ "in": "path",
+ "name": "orderId",
+ "description": "Id of the order",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "Authorization",
+ "description": "OAuth Bearer Token. Please see OAuth 2.0 Documentation <\/a > page for more info.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Client-Id",
+ "description": "The Client Id for your App.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Site",
+ "description": "Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Language",
+ "description": "Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Currency",
+ "description": "Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Customer-Id",
+ "description": "Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.",
+ "type": "string"
+ },
+ {
+ "in": "body",
+ "name": "body",
+ "description": "Request model containing the additional fields",
+ "schema": {
+ "$ref": "#\/definitions\/UpdateOrderAdditionalFieldsCommandBody"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#\/definitions\/UpdateOrderAdditionalFieldsErrorsPage"
+ }
+ },
+ "400": {
+ "description": "Bad Request",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ },
+ "404": {
+ "description": "Not Found",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ }
+ }
+ }
+ },
+ "\/healthcheck": {
+ "get": {
+ "tags": [
+ "HealthCheck"
+ ],
+ "summary": "Get health status of the API",
+ "operationId": "GetHealthCheck",
+ "produces": [
+ "application\/json"
+ ],
+ "responses": {
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#\/definitions\/HealthCheckResponse"
+ }
+ }
+ }
+ }
+ },
+ "\/orders\/{orderId}\/supplierInvoiceNumber": {
+ "put": {
+ "tags": [
+ "Orders"
+ ],
+ "summary": "Update Supplier Invoice Number",
+ "operationId": "UpdateSupplierInvoiceNumber",
+ "produces": [
+ "application\/json"
+ ],
+ "parameters": [
+ {
+ "in": "path",
+ "name": "orderId",
+ "description": "",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "query",
+ "name": "supplierInvoiceNumber",
+ "description": "",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "Authorization",
+ "description": "OAuth Bearer Token. Please see OAuth 2.0 Documentation <\/a > page for more info.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Client-Id",
+ "description": "The Client Id for your App.",
+ "required": true,
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Site",
+ "description": "Two letter code for Digi-Key product website to search on. Different countries sites have different part restrictions, supported languages, and currencies. Acceptable values include: US, CA, JP, UK, DE, AT, BE, DK, FI, GR, IE, IT, LU, NL, NO, PT, ES, KR, HK, SG, CN, TW, AU, FR, IN, NZ, SE, MX, CH, IL, PL, SK, SI, LV, LT, EE, CZ, HU, BG, MY, ZA, RO, TH, PH.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Language",
+ "description": "Two letter code for language to search on. Language must be supported by the selected site. If searching on keyword, this language is used to find matches. Acceptable values include: br, cs, da, de, en, es, fi, fr, he, hu, it, ja, ko, nl, no, pl, pt, ro, sv, th, zhs, zht",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Locale-Currency",
+ "description": "Three letter code for Currency to return part pricing for. Currency must be supported by the selected site. Acceptable values include: USD, CAD, JPY, GBP, EUR, HKD, SGD, TWD, KRW, AUD, NZD, INR, DKK, NOK, SEK, ILS, CNY, PLN, CHF, CZK, HUF, RON, ZAR, MYR, THB, PHP.",
+ "type": "string"
+ },
+ {
+ "in": "header",
+ "name": "X-DIGIKEY-Customer-Id",
+ "description": "Your Digi-Key Customer id. If your account has multiple Customer Ids for different regions, this allows you to select one of them.",
+ "type": "string"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Success",
+ "schema": {
+ "$ref": "#\/definitions\/Order"
+ }
+ },
+ "401": {
+ "description": "Unauthorized",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ },
+ "404": {
+ "description": "Not Found",
+ "schema": {
+ "$ref": "#\/definitions\/ProblemDetails"
+ }
+ }
+ }
+ }
+ }
+ },
+ "definitions": {
+ "HealthCheckResponse": {
+ "type": "object",
+ "properties": {
+ "healthy": {
+ "type": "boolean"
+ },
+ "timestampUtc": {
+ "format": "date-time",
+ "type": "string"
+ }
+ }
+ },
+ "ContactInfo": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "phoneNumber": {
+ "maxLength": 20,
+ "type": "string"
+ },
+ "alternatePhoneNumber": {
+ "maxLength": 20,
+ "type": "string"
+ },
+ "emailAddress": {
+ "format": "email",
+ "maxLength": 150,
+ "type": "string"
+ },
+ "faxNumber": {
+ "maxLength": 20,
+ "type": "string"
+ },
+ "street1": {
+ "maxLength": 50,
+ "type": "string"
+ },
+ "street2": {
+ "maxLength": 80,
+ "type": "string"
+ },
+ "street3": {
+ "maxLength": 50,
+ "type": "string"
+ },
+ "city": {
+ "maxLength": 50,
+ "type": "string"
+ },
+ "state": {
+ "type": "string"
+ },
+ "countryCode": {
+ "maxLength": 3,
+ "type": "string"
+ },
+ "postalCode": {
+ "maxLength": 12,
+ "type": "string"
+ },
+ "firstName": {
+ "type": "string"
+ },
+ "lastName": {
+ "type": "string"
+ },
+ "companyName": {
+ "maxLength": 50,
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ }
+ }
+ },
+ "Customer": {
+ "type": "object",
+ "properties": {
+ "customerId": {
+ "type": "string"
+ },
+ "firstName": {
+ "type": "string"
+ },
+ "lastName": {
+ "type": "string"
+ },
+ "customerEmail": {
+ "type": "string"
+ },
+ "billingAddress": {
+ "$ref": "#\/definitions\/ContactInfo"
+ },
+ "shippingAddress": {
+ "$ref": "#\/definitions\/ContactInfo"
+ }
+ }
+ },
+ "OrderCancellation": {
+ "type": "object",
+ "properties": {
+ "amount": {
+ "format": "double",
+ "type": "number"
+ },
+ "currencyISOCode": {
+ "type": "string"
+ },
+ "quantity": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "reasonCode": {
+ "type": "string"
+ },
+ "reasonLabel": {
+ "type": "string"
+ },
+ "createDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ }
+ }
+ },
+ "OrderIncident": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "reasonOpenCode": {
+ "type": "string"
+ },
+ "reasonCloseCode": {
+ "type": "string"
+ },
+ "reasonOpenLabel": {
+ "type": "string"
+ },
+ "reasonCloseLabel": {
+ "type": "string"
+ },
+ "incidentState": {
+ "enum": [
+ "IncidentOpen",
+ "IncidentClosed",
+ "IncidentDisputed"
+ ],
+ "type": "string"
+ },
+ "incidentOpenedDate": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "incidentClosedDate": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "incidentDisputedDate": {
+ "format": "date-time",
+ "type": "string"
+ }
+ }
+ },
+ "ProblemDetails": {
+ "required": [
+ "correlationId",
+ "detail",
+ "errors",
+ "instance",
+ "status",
+ "title",
+ "type"
+ ],
+ "type": "object",
+ "properties": {
+ "detail": {
+ "type": "string"
+ },
+ "instance": {
+ "type": "string"
+ },
+ "status": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "title": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "errors": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "correlationId": {
+ "format": "uuid",
+ "type": "string"
+ }
+ }
+ },
+ "GetOrdersPage": {
+ "type": "object",
+ "properties": {
+ "orders": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/OrderExpanded"
+ }
+ },
+ "totalCount": {
+ "format": "int64",
+ "type": "integer"
+ },
+ "totalSales": {
+ "format": "double",
+ "type": "number"
+ }
+ }
+ },
+ "OrderExpanded": {
+ "type": "object",
+ "properties": {
+ "supplierName": {
+ "type": "string"
+ },
+ "shippingMethodLabel": {
+ "type": "string"
+ },
+ "shippingRegionLabel": {
+ "type": "string"
+ },
+ "id": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "businessId": {
+ "type": "string"
+ },
+ "accountingDocumentId": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "accountingDocumentNumber": {
+ "type": "string"
+ },
+ "paymentStatus": {
+ "enum": [
+ "Pending",
+ "Payable",
+ "Paid",
+ "Invoiced"
+ ],
+ "type": "string"
+ },
+ "createDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "lastUpdateDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "customerDebitedDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "acceptanceRejectionDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "receivedDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "shippedDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "cancellationDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "shippingDeadlineUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "leadTimeToShip": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "orderState": {
+ "enum": [
+ "WaitingAcceptance",
+ "Accepted",
+ "ShippingInProgress",
+ "Shipped",
+ "Received",
+ "IncidentOpen",
+ "Refunded",
+ "Closed",
+ "Cancelled",
+ "Rejected"
+ ],
+ "type": "string"
+ },
+ "customer": {
+ "$ref": "#\/definitions\/Customer"
+ },
+ "supplierId": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "supplierLegacyId": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "supplierBusinessId": {
+ "type": "string"
+ },
+ "orderDetails": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/OrderDetail"
+ }
+ },
+ "additionalFields": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/AdditionalField"
+ }
+ },
+ "subtotalPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "totalPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "totalDiscountFee": {
+ "format": "double",
+ "type": "number"
+ },
+ "adjustedSubtotalPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "adjustedTotalPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "adjustedTotalDiscountFee": {
+ "format": "double",
+ "type": "number"
+ },
+ "shippingPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "adjustedShippingPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "shippingTrackingInfoList": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/ShippingTrackingInfo"
+ }
+ },
+ "shippingMethodCode": {
+ "type": "string"
+ },
+ "shippingRegionCode": {
+ "type": "string"
+ },
+ "trackingRequired": {
+ "type": "boolean"
+ },
+ "refunds": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/OrderRefund"
+ }
+ },
+ "supplierInvoiceNumber": {
+ "type": "string"
+ }
+ }
+ },
+ "OrderRefund": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "legacyId": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "businessOrderId": {
+ "type": "string"
+ },
+ "orderId": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "shippingAmount": {
+ "format": "double",
+ "type": "number"
+ },
+ "refundState": {
+ "enum": [
+ "WaitingRefund",
+ "Refunded",
+ "Refused"
+ ],
+ "type": "string"
+ },
+ "transactionNumber": {
+ "type": "string"
+ },
+ "createDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "transactionDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "refundItems": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/OrderRefundItem"
+ }
+ },
+ "shippingReasonCode": {
+ "type": "string"
+ },
+ "shippingReasonLabel": {
+ "type": "string"
+ }
+ }
+ },
+ "OrderRefundItem": {
+ "type": "object",
+ "properties": {
+ "orderDetailId": {
+ "type": "string"
+ },
+ "amount": {
+ "format": "double",
+ "type": "number"
+ },
+ "quantity": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "reasonCode": {
+ "type": "string"
+ },
+ "reasonLabel": {
+ "type": "string"
+ },
+ "discountAmount": {
+ "format": "double",
+ "type": "number"
+ }
+ }
+ },
+ "ShippingTrackingInfo": {
+ "type": "object",
+ "properties": {
+ "shippingCarrierId": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "shippingTrackingNumber": {
+ "type": "string"
+ },
+ "shippingTrackingURL": {
+ "type": "string"
+ },
+ "shippingCarrierName": {
+ "type": "string"
+ }
+ }
+ },
+ "OrderDetail": {
+ "type": "object",
+ "properties": {
+ "orderDetailId": {
+ "type": "string"
+ },
+ "createDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "lastUpdateDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "acceptanceRejectionDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "cancellationDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "orderDetailState": {
+ "enum": [
+ "WaitingAcceptance",
+ "Accepted",
+ "ShippingInProgress",
+ "Shipped",
+ "Received",
+ "IncidentOpen",
+ "Refunded",
+ "Closed",
+ "Cancelled",
+ "Rejected"
+ ],
+ "type": "string"
+ },
+ "offerId": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "offerLegacyId": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "offerLeadTime": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "discountFee": {
+ "format": "double",
+ "type": "number"
+ },
+ "discountRate": {
+ "format": "double",
+ "type": "number"
+ },
+ "totalPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "unitPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "quantity": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "productPartNumber": {
+ "type": "string"
+ },
+ "supplierSku": {
+ "type": "string"
+ },
+ "productBusinessId": {
+ "type": "string"
+ },
+ "adjustedDiscountFee": {
+ "format": "double",
+ "type": "number"
+ },
+ "adjustedTotalPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "adjustedQuantity": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "cancellations": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/OrderCancellation"
+ }
+ },
+ "incidents": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/OrderIncident"
+ }
+ },
+ "additionalFields": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/AdditionalField"
+ }
+ },
+ "productImageUrl": {
+ "type": "string"
+ },
+ "productCategoryName": {
+ "type": "string"
+ },
+ "offerDescription": {
+ "type": "string"
+ }
+ }
+ },
+ "AdditionalField": {
+ "required": [
+ "code",
+ "type",
+ "value"
+ ],
+ "properties": {
+ "type": {
+ "enum": [
+ "String",
+ "Int",
+ "Long",
+ "Double",
+ "Decimal",
+ "Bool",
+ "Date"
+ ],
+ "type": "string"
+ },
+ "value": {
+ "type": "object"
+ },
+ "code": {
+ "type": "string"
+ }
+ }
+ },
+ "AcceptOrderDetailModel": {
+ "type": "object",
+ "properties": {
+ "orderDetailId": {
+ "type": "string"
+ },
+ "accepted": {
+ "type": "boolean"
+ }
+ }
+ },
+ "AcceptOrderDetailsCommandBody": {
+ "required": [
+ "acceptOrderDetails"
+ ],
+ "type": "object",
+ "properties": {
+ "acceptOrderDetails": {
+ "minLength": 1,
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/AcceptOrderDetailModel"
+ }
+ }
+ }
+ },
+ "AcceptOrderDetailErrorResult": {
+ "type": "object",
+ "properties": {
+ "errorMessage": {
+ "type": "string"
+ },
+ "item": {
+ "$ref": "#\/definitions\/AcceptOrderDetailModel"
+ }
+ }
+ },
+ "AcceptOrderDetailErrorsPage": {
+ "type": "object",
+ "properties": {
+ "errors": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/AcceptOrderDetailErrorResult"
+ }
+ },
+ "errorCount": {
+ "format": "int32",
+ "type": "integer"
+ }
+ }
+ },
+ "ShippingTrackingInformationModel": {
+ "type": "object",
+ "properties": {
+ "shippingCarrierId": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "shippingTrackingNumber": {
+ "type": "string"
+ }
+ }
+ },
+ "ShipOrderModel": {
+ "type": "object",
+ "properties": {
+ "shippingTracking": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/ShippingTrackingInformationModel"
+ }
+ }
+ }
+ },
+ "Order": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "businessId": {
+ "type": "string"
+ },
+ "accountingDocumentId": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "accountingDocumentNumber": {
+ "type": "string"
+ },
+ "paymentStatus": {
+ "enum": [
+ "Pending",
+ "Payable",
+ "Paid",
+ "Invoiced"
+ ],
+ "type": "string"
+ },
+ "createDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "lastUpdateDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "customerDebitedDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "acceptanceRejectionDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "receivedDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "shippedDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "cancellationDateUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "shippingDeadlineUtc": {
+ "format": "date-time",
+ "type": "string"
+ },
+ "leadTimeToShip": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "orderState": {
+ "enum": [
+ "WaitingAcceptance",
+ "Accepted",
+ "ShippingInProgress",
+ "Shipped",
+ "Received",
+ "IncidentOpen",
+ "Refunded",
+ "Closed",
+ "Cancelled",
+ "Rejected"
+ ],
+ "type": "string"
+ },
+ "customer": {
+ "$ref": "#\/definitions\/Customer"
+ },
+ "supplierId": {
+ "format": "uuid",
+ "type": "string"
+ },
+ "supplierLegacyId": {
+ "format": "int32",
+ "type": "integer"
+ },
+ "supplierBusinessId": {
+ "type": "string"
+ },
+ "orderDetails": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/OrderDetail"
+ }
+ },
+ "additionalFields": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/AdditionalField"
+ }
+ },
+ "subtotalPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "totalPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "totalDiscountFee": {
+ "format": "double",
+ "type": "number"
+ },
+ "adjustedSubtotalPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "adjustedTotalPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "adjustedTotalDiscountFee": {
+ "format": "double",
+ "type": "number"
+ },
+ "shippingPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "adjustedShippingPrice": {
+ "format": "double",
+ "type": "number"
+ },
+ "shippingTrackingInfoList": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/ShippingTrackingInfo"
+ }
+ },
+ "shippingMethodCode": {
+ "type": "string"
+ },
+ "shippingRegionCode": {
+ "type": "string"
+ },
+ "trackingRequired": {
+ "type": "boolean"
+ },
+ "refunds": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/OrderRefund"
+ }
+ },
+ "supplierInvoiceNumber": {
+ "type": "string"
+ }
+ }
+ },
+ "CancelOrderDetailModel": {
+ "type": "object",
+ "properties": {
+ "orderDetailId": {
+ "type": "string"
+ },
+ "cancellationReasonCode": {
+ "type": "string"
+ },
+ "quantity": {
+ "format": "int32",
+ "type": "integer"
+ }
+ }
+ },
+ "CancelOrderDetailsCommandBody": {
+ "required": [
+ "cancelOrderDetails"
+ ],
+ "type": "object",
+ "properties": {
+ "cancelOrderDetails": {
+ "minLength": 1,
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/CancelOrderDetailModel"
+ }
+ }
+ }
+ },
+ "CancelOrderDetailErrorResult": {
+ "type": "object",
+ "properties": {
+ "errorMessage": {
+ "type": "string"
+ },
+ "item": {
+ "$ref": "#\/definitions\/CancelOrderDetailModel"
+ }
+ }
+ },
+ "CancelOrderDetailErrorsPage": {
+ "type": "object",
+ "properties": {
+ "errors": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/CancelOrderDetailErrorResult"
+ }
+ },
+ "errorCount": {
+ "format": "int32",
+ "type": "integer"
+ }
+ }
+ },
+ "UpdateOrderAdditionalFieldsCommandBody": {
+ "required": [
+ "additionalFields"
+ ],
+ "type": "object",
+ "properties": {
+ "additionalFields": {
+ "minLength": 1,
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/AdditionalField"
+ }
+ }
+ }
+ },
+ "UpdateOrderAdditionalFieldsErrorResult": {
+ "type": "object",
+ "properties": {
+ "errorMessage": {
+ "type": "string"
+ },
+ "item": {
+ "$ref": "#\/definitions\/AdditionalField"
+ }
+ }
+ },
+ "UpdateOrderAdditionalFieldsErrorsPage": {
+ "type": "object",
+ "properties": {
+ "errors": {
+ "type": "array",
+ "items": {
+ "$ref": "#\/definitions\/UpdateOrderAdditionalFieldsErrorResult"
+ }
+ },
+ "errorCount": {
+ "format": "int32",
+ "type": "integer"
+ }
+ }
+ }
+ },
+ "basePath": "\/Sales\/Marketplace2\/Orders\/v1",
+ "host": "api.digikey.com",
+ "x-host-sandbox": "sandbox-api.digikey.com",
+ "x-host-production": "api.digikey.com",
+ "securityDefinitions": {
+ "apiKeySecurity": {
+ "type": "apiKey",
+ "name": "X-DIGIKEY-Client-Id",
+ "in": "header"
+ },
+ "oauth2AccessCodeSecurity": {
+ "type": "oauth2",
+ "flow": "accessCode",
+ "authorizationUrl": "https:\/\/api.digikey.com\/v1\/oauth2\/authorize",
+ "tokenUrl": "https:\/\/api.digikey.com\/v1\/oauth2\/token"
+ }
+ },
+ "security": [
+ {
+ "apiKeySecurity": [],
+ "oauth2AccessCodeSecurity": []
+ }
+ ],
+ "tags": []
+}
diff --git a/swagger/README.md b/swagger/README.md
new file mode 100644
index 0000000..8a8b5ea
--- /dev/null
+++ b/swagger/README.md
@@ -0,0 +1,21 @@
+# Modified swagger files
+
+This folder contains modified swagger files for the Digikey API. Only swagger files
+that require modifications should be placed in here.
+
+## Explanation
+
+When using the API generator `generate-v3-api/generate_client_swagger.py`, by default
+it will download the swagger API definitions from Digikey. This is useful because the
+API should be generated from the latest swagger files. However, we found that the
+swagger file for the Marketplace Orders API (Orders.json) was not in fact up-to-date
+(as of 2022-09-20) and was missing authentication parameters from all operations.
+For this reason, we have added a `swagger` folder to the repo and added the
+`Orders.json` file to it, with the modifications that were necessary for it to generate
+a functional API.
+
+The API generator was modified such that it would now check to see if a swagger file
+exists in the `swagger` folder, before downloading it from Digikey. If the swagger
+file exists in the `swagger` folder, the API generator will use it instead. All other
+swagger files are downloaded from Digikey.
+