diff --git a/patch_api/__init__.py b/patch_api/__init__.py index cf3216b..d8e3b13 100644 --- a/patch_api/__init__.py +++ b/patch_api/__init__.py @@ -15,7 +15,7 @@ from __future__ import absolute_import -__version__ = "1.24.0" +__version__ = "1.24.1" # import ApiClient from patch_api.api_client import ApiClient diff --git a/patch_api/api_client.py b/patch_api/api_client.py index ef814f5..7e55e87 100644 --- a/patch_api/api_client.py +++ b/patch_api/api_client.py @@ -91,7 +91,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = "patch-python/1.24.0" + self.user_agent = "patch-python/1.24.1" def __del__(self): if self._pool: diff --git a/patch_api/configuration.py b/patch_api/configuration.py index 4fe00de..b5577cf 100644 --- a/patch_api/configuration.py +++ b/patch_api/configuration.py @@ -341,7 +341,7 @@ def to_debug_report(self): "OS: {env}\n" "Python Version: {pyversion}\n" "Version of the API: v1\n" - "SDK Package Version: 1.24.0".format( + "SDK Package Version: 1.24.1".format( env=sys.platform, pyversion=sys.version ) ) diff --git a/patch_api/models/__init__.py b/patch_api/models/__init__.py index 6b2134f..da4e6ce 100644 --- a/patch_api/models/__init__.py +++ b/patch_api/models/__init__.py @@ -51,11 +51,11 @@ from patch_api.models.estimate_response import EstimateResponse from patch_api.models.highlight import Highlight from patch_api.models.inventory import Inventory -from patch_api.models.issued_to import IssuedTo from patch_api.models.meta_index_object import MetaIndexObject from patch_api.models.order import Order from patch_api.models.order_inventory import OrderInventory from patch_api.models.order_inventory_project import OrderInventoryProject +from patch_api.models.order_issued_to import OrderIssuedTo from patch_api.models.order_list_response import OrderListResponse from patch_api.models.order_response import OrderResponse from patch_api.models.parent_technology_type import ParentTechnologyType @@ -68,4 +68,3 @@ from patch_api.models.standard import Standard from patch_api.models.technology_type import TechnologyType from patch_api.models.technology_type_list_response import TechnologyTypeListResponse -from patch_api.models.v1_orders_issued_to import V1OrdersIssuedTo diff --git a/patch_api/models/create_order_request.py b/patch_api/models/create_order_request.py index 6048b74..9203653 100644 --- a/patch_api/models/create_order_request.py +++ b/patch_api/models/create_order_request.py @@ -44,7 +44,7 @@ class CreateOrderRequest(object): "currency": "str", "amount": "int", "unit": "str", - "issued_to": "V1OrdersIssuedTo", + "issued_to": "OrderIssuedTo", } attribute_map = { @@ -104,7 +104,8 @@ def __init__( self.currency = currency self.amount = amount self.unit = unit - self.issued_to = issued_to + if issued_to is not None: + self.issued_to = issued_to @property def mass_g(self): @@ -406,7 +407,7 @@ def issued_to(self): :return: The issued_to of this CreateOrderRequest. # noqa: E501 - :rtype: V1OrdersIssuedTo + :rtype: OrderIssuedTo """ return self._issued_to @@ -416,7 +417,7 @@ def issued_to(self, issued_to): :param issued_to: The issued_to of this CreateOrderRequest. # noqa: E501 - :type: V1OrdersIssuedTo + :type: OrderIssuedTo """ self._issued_to = issued_to diff --git a/patch_api/models/order.py b/patch_api/models/order.py index b3acd1c..5bdad96 100644 --- a/patch_api/models/order.py +++ b/patch_api/models/order.py @@ -51,7 +51,7 @@ class Order(object): "registry_url": "str", "metadata": "object", "inventory": "list[OrderInventory]", - "issued_to": "IssuedTo", + "issued_to": "OrderIssuedTo", } attribute_map = { @@ -665,9 +665,10 @@ def inventory(self, inventory): def issued_to(self): """Gets the issued_to of this Order. # noqa: E501 + An object containing the name & email of the party the inventory will be issued to. # noqa: E501 :return: The issued_to of this Order. # noqa: E501 - :rtype: IssuedTo + :rtype: OrderIssuedTo """ return self._issued_to @@ -675,9 +676,10 @@ def issued_to(self): def issued_to(self, issued_to): """Sets the issued_to of this Order. + An object containing the name & email of the party the inventory will be issued to. # noqa: E501 :param issued_to: The issued_to of this Order. # noqa: E501 - :type: IssuedTo + :type: OrderIssuedTo """ self._issued_to = issued_to diff --git a/patch_api/models/issued_to.py b/patch_api/models/order_issued_to.py similarity index 77% rename from patch_api/models/issued_to.py rename to patch_api/models/order_issued_to.py index e338047..5683044 100644 --- a/patch_api/models/issued_to.py +++ b/patch_api/models/order_issued_to.py @@ -19,7 +19,7 @@ from patch_api.configuration import Configuration -class IssuedTo(object): +class OrderIssuedTo(object): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -40,7 +40,7 @@ class IssuedTo(object): def __init__( self, name=None, email=None, local_vars_configuration=None ): # noqa: E501 - """IssuedTo - a model defined in OpenAPI""" # noqa: E501 + """OrderIssuedTo - a model defined in OpenAPI""" # noqa: E501 if local_vars_configuration is None: local_vars_configuration = Configuration() self.local_vars_configuration = local_vars_configuration @@ -54,22 +54,22 @@ def __init__( @property def name(self): - """Gets the name of this IssuedTo. # noqa: E501 + """Gets the name of this OrderIssuedTo. # noqa: E501 - Name provided for the issuee # noqa: E501 + The name of the issuee # noqa: E501 - :return: The name of this IssuedTo. # noqa: E501 + :return: The name of this OrderIssuedTo. # noqa: E501 :rtype: str """ return self._name @name.setter def name(self, name): - """Sets the name of this IssuedTo. + """Sets the name of this OrderIssuedTo. - Name provided for the issuee # noqa: E501 + The name of the issuee # noqa: E501 - :param name: The name of this IssuedTo. # noqa: E501 + :param name: The name of this OrderIssuedTo. # noqa: E501 :type: str """ @@ -77,22 +77,22 @@ def name(self, name): @property def email(self): - """Gets the email of this IssuedTo. # noqa: E501 + """Gets the email of this OrderIssuedTo. # noqa: E501 - Email address provided for the issuee # noqa: E501 + The email address of the issuee # noqa: E501 - :return: The email of this IssuedTo. # noqa: E501 + :return: The email of this OrderIssuedTo. # noqa: E501 :rtype: str """ return self._email @email.setter def email(self, email): - """Sets the email of this IssuedTo. + """Sets the email of this OrderIssuedTo. - Email address provided for the issuee # noqa: E501 + The email address of the issuee # noqa: E501 - :param email: The email of this IssuedTo. # noqa: E501 + :param email: The email of this OrderIssuedTo. # noqa: E501 :type: str """ @@ -134,14 +134,14 @@ def __repr__(self): def __eq__(self, other): """Returns true if both objects are equal""" - if not isinstance(other, IssuedTo): + if not isinstance(other, OrderIssuedTo): return False return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - if not isinstance(other, IssuedTo): + if not isinstance(other, OrderIssuedTo): return True return self.to_dict() != other.to_dict() diff --git a/patch_api/models/place_order_request.py b/patch_api/models/place_order_request.py index 1e220cd..d6ab9f2 100644 --- a/patch_api/models/place_order_request.py +++ b/patch_api/models/place_order_request.py @@ -33,7 +33,7 @@ class PlaceOrderRequest(object): attribute_map (dict): The key is attribute name and the value is json key in definition. """ - openapi_types = {"issued_to": "V1OrdersIssuedTo"} + openapi_types = {"issued_to": "OrderIssuedTo"} attribute_map = {"issued_to": "issued_to"} @@ -46,7 +46,8 @@ def __init__(self, issued_to=None, local_vars_configuration=None): # noqa: E501 self._issued_to = None self.discriminator = None - self.issued_to = issued_to + if issued_to is not None: + self.issued_to = issued_to @property def issued_to(self): @@ -54,7 +55,7 @@ def issued_to(self): :return: The issued_to of this PlaceOrderRequest. # noqa: E501 - :rtype: V1OrdersIssuedTo + :rtype: OrderIssuedTo """ return self._issued_to @@ -64,7 +65,7 @@ def issued_to(self, issued_to): :param issued_to: The issued_to of this PlaceOrderRequest. # noqa: E501 - :type: V1OrdersIssuedTo + :type: OrderIssuedTo """ self._issued_to = issued_to diff --git a/patch_api/models/v1_orders_issued_to.py b/patch_api/models/v1_orders_issued_to.py deleted file mode 100644 index a17688c..0000000 --- a/patch_api/models/v1_orders_issued_to.py +++ /dev/null @@ -1,143 +0,0 @@ -# coding: utf-8 - -""" - Patch API V1 - - The core API used to integrate with Patch's service # noqa: E501 - - The version of the OpenAPI document: v1 - Contact: engineering@usepatch.com - Generated by: https://openapi-generator.tech -""" - - -import pprint -import re # noqa: F401 - -import six - -from patch_api.configuration import Configuration - - -class V1OrdersIssuedTo(object): - """NOTE: This class is auto generated by OpenAPI Generator. - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - """ - Attributes: - openapi_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. - """ - openapi_types = {"email": "str", "name": "str"} - - attribute_map = {"email": "email", "name": "name"} - - def __init__( - self, email=None, name=None, local_vars_configuration=None - ): # noqa: E501 - """V1OrdersIssuedTo - a model defined in OpenAPI""" # noqa: E501 - if local_vars_configuration is None: - local_vars_configuration = Configuration() - self.local_vars_configuration = local_vars_configuration - - self._email = None - self._name = None - self.discriminator = None - - self.email = email - self.name = name - - @property - def email(self): - """Gets the email of this V1OrdersIssuedTo. # noqa: E501 - - - :return: The email of this V1OrdersIssuedTo. # noqa: E501 - :rtype: str - """ - return self._email - - @email.setter - def email(self, email): - """Sets the email of this V1OrdersIssuedTo. - - - :param email: The email of this V1OrdersIssuedTo. # noqa: E501 - :type: str - """ - - self._email = email - - @property - def name(self): - """Gets the name of this V1OrdersIssuedTo. # noqa: E501 - - - :return: The name of this V1OrdersIssuedTo. # noqa: E501 - :rtype: str - """ - return self._name - - @name.setter - def name(self, name): - """Sets the name of this V1OrdersIssuedTo. - - - :param name: The name of this V1OrdersIssuedTo. # 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.openapi_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 - - 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, V1OrdersIssuedTo): - return False - - return self.to_dict() == other.to_dict() - - def __ne__(self, other): - """Returns true if both objects are not equal""" - if not isinstance(other, V1OrdersIssuedTo): - return True - - return self.to_dict() != other.to_dict() diff --git a/setup.py b/setup.py index c013449..d34d1bc 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "patch-api" -VERSION = "1.24.0" +VERSION = "1.24.1" # To install the library, run the following # # python setup.py install