Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate issued_to to refactored swagger #68

Merged
merged 1 commit into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion patch_api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion patch_api/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion patch_api/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)
Expand Down
3 changes: 1 addition & 2 deletions patch_api/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
9 changes: 5 additions & 4 deletions patch_api/models/create_order_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class CreateOrderRequest(object):
"currency": "str",
"amount": "int",
"unit": "str",
"issued_to": "V1OrdersIssuedTo",
"issued_to": "OrderIssuedTo",
}

attribute_map = {
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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

Expand All @@ -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
Expand Down
8 changes: 5 additions & 3 deletions patch_api/models/order.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class Order(object):
"registry_url": "str",
"metadata": "object",
"inventory": "list[OrderInventory]",
"issued_to": "IssuedTo",
"issued_to": "OrderIssuedTo",
}

attribute_map = {
Expand Down Expand Up @@ -665,19 +665,21 @@ 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

@issued_to.setter
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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -54,45 +54,45 @@ 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
"""

self._name = 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
"""

Expand Down Expand Up @@ -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()
9 changes: 5 additions & 4 deletions patch_api/models/place_order_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}

Expand All @@ -46,15 +46,16 @@ 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):
"""Gets the issued_to of this PlaceOrderRequest. # noqa: E501


:return: The issued_to of this PlaceOrderRequest. # noqa: E501
:rtype: V1OrdersIssuedTo
:rtype: OrderIssuedTo
"""
return self._issued_to

Expand All @@ -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
Expand Down
143 changes: 0 additions & 143 deletions patch_api/models/v1_orders_issued_to.py

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down