New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

patch-api

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

patch-api - pypi Package Compare versions

Comparing version
2.1.0
to
2.1.1
+252
patch_api/models/disclaimer.py
# coding: utf-8
"""
Patch API V2
The core API used to integrate with Patch's service # noqa: E501
The version of the OpenAPI document: 2
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 Disclaimer(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 = {
"body": "str",
"header": "str",
"severity": "str",
"link_text": "str",
"link_destination": "str",
}
attribute_map = {
"body": "body",
"header": "header",
"severity": "severity",
"link_text": "link_text",
"link_destination": "link_destination",
}
def __init__(
self,
body=None,
header=None,
severity=None,
link_text=None,
link_destination=None,
local_vars_configuration=None,
): # noqa: E501
"""Disclaimer - 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._body = None
self._header = None
self._severity = None
self._link_text = None
self._link_destination = None
self.discriminator = None
self.body = body
self.header = header
self.severity = severity
self.link_text = link_text
self.link_destination = link_destination
@property
def body(self):
"""Gets the body of this Disclaimer. # noqa: E501
The body of the disclaimer. # noqa: E501
:return: The body of this Disclaimer. # noqa: E501
:rtype: str
"""
return self._body
@body.setter
def body(self, body):
"""Sets the body of this Disclaimer.
The body of the disclaimer. # noqa: E501
:param body: The body of this Disclaimer. # noqa: E501
:type: str
"""
self._body = body
@property
def header(self):
"""Gets the header of this Disclaimer. # noqa: E501
The header for the disclaimer. # noqa: E501
:return: The header of this Disclaimer. # noqa: E501
:rtype: str
"""
return self._header
@header.setter
def header(self, header):
"""Sets the header of this Disclaimer.
The header for the disclaimer. # noqa: E501
:param header: The header of this Disclaimer. # noqa: E501
:type: str
"""
if (
self.local_vars_configuration.client_side_validation and header is None
): # noqa: E501
raise ValueError(
"Invalid value for `header`, must not be `None`"
) # noqa: E501
self._header = header
@property
def severity(self):
"""Gets the severity of this Disclaimer. # noqa: E501
The severity of the disclaimer. # noqa: E501
:return: The severity of this Disclaimer. # noqa: E501
:rtype: str
"""
return self._severity
@severity.setter
def severity(self, severity):
"""Sets the severity of this Disclaimer.
The severity of the disclaimer. # noqa: E501
:param severity: The severity of this Disclaimer. # noqa: E501
:type: str
"""
if (
self.local_vars_configuration.client_side_validation and severity is None
): # noqa: E501
raise ValueError(
"Invalid value for `severity`, must not be `None`"
) # noqa: E501
self._severity = severity
@property
def link_text(self):
"""Gets the link_text of this Disclaimer. # noqa: E501
The text for the provided link. # noqa: E501
:return: The link_text of this Disclaimer. # noqa: E501
:rtype: str
"""
return self._link_text
@link_text.setter
def link_text(self, link_text):
"""Sets the link_text of this Disclaimer.
The text for the provided link. # noqa: E501
:param link_text: The link_text of this Disclaimer. # noqa: E501
:type: str
"""
self._link_text = link_text
@property
def link_destination(self):
"""Gets the link_destination of this Disclaimer. # noqa: E501
The destination of the provided link. # noqa: E501
:return: The link_destination of this Disclaimer. # noqa: E501
:rtype: str
"""
return self._link_destination
@link_destination.setter
def link_destination(self, link_destination):
"""Sets the link_destination of this Disclaimer.
The destination of the provided link. # noqa: E501
:param link_destination: The link_destination of this Disclaimer. # noqa: E501
:type: str
"""
self._link_destination = link_destination
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, Disclaimer):
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, Disclaimer):
return True
return self.to_dict() != other.to_dict()
+1
-1
Metadata-Version: 2.1
Name: patch-api
Version: 2.1.0
Version: 2.1.1
Summary: Patch API V2

@@ -5,0 +5,0 @@ Home-page: UNKNOWN

@@ -37,2 +37,3 @@ README.md

patch_api/models/delete_order_response.py
patch_api/models/disclaimer.py
patch_api/models/error_response.py

@@ -39,0 +40,0 @@ patch_api/models/estimate.py

@@ -18,3 +18,3 @@ # coding: utf-8

__version__ = "2.1.0"
__version__ = "2.1.1"

@@ -21,0 +21,0 @@ # import ApiClient

@@ -95,3 +95,3 @@ # coding: utf-8

# Set default User-Agent.
self.user_agent = "patch-python/2.1.0"
self.user_agent = "patch-python/2.1.1"
# Set default Patch-Version

@@ -98,0 +98,0 @@ self.patch_version = 2

@@ -344,3 +344,3 @@ # coding: utf-8

"Version of the API: 2\n"
"SDK Package Version: 2.1.0".format(env=sys.platform, pyversion=sys.version)
"SDK Package Version: 2.1.1".format(env=sys.platform, pyversion=sys.version)
)

@@ -347,0 +347,0 @@

@@ -52,2 +52,3 @@ # coding: utf-8

from patch_api.models.delete_order_response import DeleteOrderResponse
from patch_api.models.disclaimer import Disclaimer
from patch_api.models.error_response import ErrorResponse

@@ -54,0 +55,0 @@ from patch_api.models.estimate import Estimate

@@ -186,3 +186,3 @@ # coding: utf-8

The starting_year in which the climate impacts of the project occurred, or will occur. # noqa: E501
The starting year in which the climate impacts of the project occurred, or will occur. # noqa: E501

@@ -198,3 +198,3 @@ :return: The vintage_start_year of this OrderLineItem. # noqa: E501

The starting_year in which the climate impacts of the project occurred, or will occur. # noqa: E501
The starting year in which the climate impacts of the project occurred, or will occur. # noqa: E501

@@ -201,0 +201,0 @@ :param vintage_start_year: The vintage_start_year of this OrderLineItem. # noqa: E501

@@ -413,3 +413,3 @@ # coding: utf-8

The url of this order in the public registry. # noqa: E501
The URL of this order in the public registry. Use this URL to access the order's accompanying certificate. # noqa: E501

@@ -425,3 +425,3 @@ :return: The registry_url of this Order. # noqa: E501

The url of this order in the public registry. # noqa: E501
The URL of this order in the public registry. Use this URL to access the order's accompanying certificate. # noqa: E501

@@ -428,0 +428,0 @@ :param registry_url: The registry_url of this Order. # noqa: E501

@@ -44,2 +44,3 @@ # coding: utf-8

"state": "str",
"issuance_type": "str",
"latitude": "float",

@@ -56,2 +57,3 @@ "longitude": "float",

"inventory": "list[Inventory]",
"disclaimers": "list[Disclaimer]",
}

@@ -67,2 +69,3 @@

"state": "state",
"issuance_type": "issuance_type",
"latitude": "latitude",

@@ -79,2 +82,3 @@ "longitude": "longitude",

"inventory": "inventory",
"disclaimers": "disclaimers",
}

@@ -91,2 +95,3 @@

state=None,
issuance_type=None,
latitude=None,

@@ -103,2 +108,3 @@ longitude=None,

inventory=None,
disclaimers=None,
local_vars_configuration=None,

@@ -118,2 +124,3 @@ ): # noqa: E501

self._state = None
self._issuance_type = None
self._latitude = None

@@ -130,2 +137,3 @@ self._longitude = None

self._inventory = None
self._disclaimers = None
self.discriminator = None

@@ -141,2 +149,4 @@

self.state = state
if issuance_type is not None:
self.issuance_type = issuance_type
self.latitude = latitude

@@ -155,2 +165,4 @@ self.longitude = longitude

self.inventory = inventory
if disclaimers is not None:
self.disclaimers = disclaimers

@@ -347,2 +359,35 @@ @property

@property
def issuance_type(self):
"""Gets the issuance_type of this Project. # noqa: E501
The issuance type of the project. One of: ex-ante, ex-post. # noqa: E501
:return: The issuance_type of this Project. # noqa: E501
:rtype: str
"""
return self._issuance_type
@issuance_type.setter
def issuance_type(self, issuance_type):
"""Sets the issuance_type of this Project.
The issuance type of the project. One of: ex-ante, ex-post. # noqa: E501
:param issuance_type: The issuance_type of this Project. # noqa: E501
:type: str
"""
allowed_values = ["ex-ante", "ex-post"] # noqa: E501
if (
self.local_vars_configuration.client_side_validation
and issuance_type not in allowed_values
): # noqa: E501
raise ValueError(
"Invalid value for `issuance_type` ({0}), must be one of {1}".format( # noqa: E501
issuance_type, allowed_values
)
)
self._issuance_type = issuance_type
@property
def latitude(self):

@@ -624,2 +669,25 @@ """Gets the latitude of this Project. # noqa: E501

@property
def disclaimers(self):
"""Gets the disclaimers of this Project. # noqa: E501
An array of objects containing disclaimers about the project. Information, warnings, and critical concerns may be present. # noqa: E501
:return: The disclaimers of this Project. # noqa: E501
:rtype: list[Disclaimer]
"""
return self._disclaimers
@disclaimers.setter
def disclaimers(self, disclaimers):
"""Sets the disclaimers of this Project.
An array of objects containing disclaimers about the project. Information, warnings, and critical concerns may be present. # noqa: E501
:param disclaimers: The disclaimers of this Project. # noqa: E501
:type: list[Disclaimer]
"""
self._disclaimers = disclaimers
def to_dict(self):

@@ -626,0 +694,0 @@ """Returns the model properties as a dict"""

Metadata-Version: 2.1
Name: patch-api
Version: 2.1.0
Version: 2.1.1
Summary: Patch API V2

@@ -5,0 +5,0 @@ Home-page: UNKNOWN

@@ -15,3 +15,3 @@ """

NAME = "patch-api"
VERSION = "2.1.0"
VERSION = "2.1.1"
# To install the library, run the following

@@ -18,0 +18,0 @@ #

@@ -69,2 +69,13 @@ # coding: utf-8

issuance_type = project.issuance_type
self.assertTrue(isinstance(issuance_type, str))
disclaimers = project.disclaimers
self.assertTrue(isinstance(disclaimers, list))
self.assertTrue(isinstance(disclaimers[0].header, str))
self.assertTrue(isinstance(disclaimers[0].body, str))
self.assertTrue(isinstance(disclaimers[0].severity, str))
self.assertTrue(isinstance(disclaimers[0].link_text, str))
self.assertTrue(isinstance(disclaimers[0].link_destination, str))
def test_retrieve_project_language(self):

@@ -71,0 +82,0 @@ """Test case for retrieve_project