patch-api
Advanced tools
| Metadata-Version: 2.1 | ||
| Name: patch-api | ||
| Version: 2.1.1 | ||
| Version: 2.3.0 | ||
| Summary: Patch API V2 | ||
@@ -5,0 +5,0 @@ Home-page: UNKNOWN |
@@ -24,3 +24,2 @@ README.md | ||
| patch_api/models/create_ecommerce_estimate_request.py | ||
| patch_api/models/create_ethereum_estimate_request.py | ||
| patch_api/models/create_flight_estimate_request.py | ||
@@ -34,5 +33,3 @@ patch_api/models/create_hotel_estimate_request.py | ||
| patch_api/models/create_sea_shipping_estimate_request.py | ||
| patch_api/models/create_shipping_estimate_request.py | ||
| patch_api/models/create_success_response.py | ||
| patch_api/models/create_vehicle_estimate_request.py | ||
| patch_api/models/delete_order_response.py | ||
@@ -39,0 +36,0 @@ patch_api/models/disclaimer.py |
@@ -18,3 +18,3 @@ # coding: utf-8 | ||
| __version__ = "2.1.1" | ||
| __version__ = "2.3.0" | ||
@@ -21,0 +21,0 @@ # import ApiClient |
@@ -95,3 +95,3 @@ # coding: utf-8 | ||
| # Set default User-Agent. | ||
| self.user_agent = "patch-python/2.1.1" | ||
| self.user_agent = "patch-python/2.3.0" | ||
| # Set default Patch-Version | ||
@@ -146,5 +146,2 @@ self.patch_version = 2 | ||
| def set_default_header(self, header_name, header_value): | ||
| self.default_headers[header_name] = header_value | ||
| def __call_api( | ||
@@ -168,2 +165,3 @@ self, | ||
| ): | ||
| config = self.configuration | ||
@@ -170,0 +168,0 @@ |
@@ -271,6 +271,6 @@ # coding: utf-8 | ||
| # HTTP header `Content-Type` | ||
| header_params[ | ||
| "Content-Type" | ||
| ] = self.api_client.select_header_content_type( # noqa: E501 | ||
| ["application/json"] | ||
| header_params["Content-Type"] = ( | ||
| self.api_client.select_header_content_type( # noqa: E501 | ||
| ["application/json"] | ||
| ) | ||
| ) # noqa: E501 | ||
@@ -700,6 +700,6 @@ | ||
| # HTTP header `Content-Type` | ||
| header_params[ | ||
| "Content-Type" | ||
| ] = self.api_client.select_header_content_type( # noqa: E501 | ||
| ["application/json"] | ||
| header_params["Content-Type"] = ( | ||
| self.api_client.select_header_content_type( # noqa: E501 | ||
| ["application/json"] | ||
| ) | ||
| ) # noqa: E501 | ||
@@ -706,0 +706,0 @@ |
@@ -436,6 +436,6 @@ # coding: utf-8 | ||
| # HTTP header `Content-Type` | ||
| header_params[ | ||
| "Content-Type" | ||
| ] = self.api_client.select_header_content_type( # noqa: E501 | ||
| ["application/json"] | ||
| header_params["Content-Type"] = ( | ||
| self.api_client.select_header_content_type( # noqa: E501 | ||
| ["application/json"] | ||
| ) | ||
| ) # noqa: E501 | ||
@@ -812,6 +812,6 @@ | ||
| # HTTP header `Content-Type` | ||
| header_params[ | ||
| "Content-Type" | ||
| ] = self.api_client.select_header_content_type( # noqa: E501 | ||
| ["application/json"] | ||
| header_params["Content-Type"] = ( | ||
| self.api_client.select_header_content_type( # noqa: E501 | ||
| ["application/json"] | ||
| ) | ||
| ) # noqa: E501 | ||
@@ -818,0 +818,0 @@ |
@@ -344,3 +344,3 @@ # coding: utf-8 | ||
| "Version of the API: 2\n" | ||
| "SDK Package Version: 2.1.1".format(env=sys.platform, pyversion=sys.version) | ||
| "SDK Package Version: 2.3.0".format(env=sys.platform, pyversion=sys.version) | ||
| ) | ||
@@ -347,0 +347,0 @@ |
@@ -27,5 +27,2 @@ # coding: utf-8 | ||
| ) | ||
| from patch_api.models.create_ethereum_estimate_request import ( | ||
| CreateEthereumEstimateRequest, | ||
| ) | ||
| from patch_api.models.create_flight_estimate_request import CreateFlightEstimateRequest | ||
@@ -45,9 +42,3 @@ from patch_api.models.create_hotel_estimate_request import CreateHotelEstimateRequest | ||
| ) | ||
| from patch_api.models.create_shipping_estimate_request import ( | ||
| CreateShippingEstimateRequest, | ||
| ) | ||
| from patch_api.models.create_success_response import CreateSuccessResponse | ||
| from patch_api.models.create_vehicle_estimate_request import ( | ||
| CreateVehicleEstimateRequest, | ||
| ) | ||
| from patch_api.models.delete_order_response import DeleteOrderResponse | ||
@@ -54,0 +45,0 @@ from patch_api.models.disclaimer import Disclaimer |
@@ -314,5 +314,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -319,0 +321,0 @@ ) |
@@ -199,5 +199,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -204,0 +206,0 @@ ) |
@@ -261,5 +261,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -266,0 +268,0 @@ ) |
@@ -293,5 +293,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -298,0 +300,0 @@ ) |
@@ -289,5 +289,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -294,0 +296,0 @@ ) |
@@ -166,5 +166,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -171,0 +173,0 @@ ) |
@@ -137,6 +137,6 @@ # coding: utf-8 | ||
| and vintage_year is not None | ||
| and vintage_year > 2100 | ||
| and vintage_year > 2225 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `vintage_year`, must be a value less than or equal to `2100`" | ||
| "Invalid value for `vintage_year`, must be a value less than or equal to `2225`" | ||
| ) # noqa: E501 | ||
@@ -175,6 +175,6 @@ if ( | ||
| and vintage_start_year is not None | ||
| and vintage_start_year > 2100 | ||
| and vintage_start_year > 2225 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `vintage_start_year`, must be a value less than or equal to `2100`" | ||
| "Invalid value for `vintage_start_year`, must be a value less than or equal to `2225`" | ||
| ) # noqa: E501 | ||
@@ -213,6 +213,6 @@ if ( | ||
| and vintage_end_year is not None | ||
| and vintage_end_year > 2100 | ||
| and vintage_end_year > 2225 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `vintage_end_year`, must be a value less than or equal to `2100`" | ||
| "Invalid value for `vintage_end_year`, must be a value less than or equal to `2225`" | ||
| ) # noqa: E501 | ||
@@ -335,3 +335,3 @@ if ( | ||
| """ | ||
| allowed_values = [None, "g", "Wh"] # noqa: E501 | ||
| allowed_values = [None, "g"] # noqa: E501 | ||
| if ( | ||
@@ -364,5 +364,7 @@ self.local_vars_configuration.client_side_validation | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -369,0 +371,0 @@ ) |
@@ -204,6 +204,6 @@ # coding: utf-8 | ||
| and vintage_year is not None | ||
| and vintage_year > 2100 | ||
| and vintage_year > 2225 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `vintage_year`, must be a value less than or equal to `2100`" | ||
| "Invalid value for `vintage_year`, must be a value less than or equal to `2225`" | ||
| ) # noqa: E501 | ||
@@ -242,6 +242,6 @@ if ( | ||
| and vintage_start_year is not None | ||
| and vintage_start_year > 2100 | ||
| and vintage_start_year > 2225 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `vintage_start_year`, must be a value less than or equal to `2100`" | ||
| "Invalid value for `vintage_start_year`, must be a value less than or equal to `2225`" | ||
| ) # noqa: E501 | ||
@@ -280,6 +280,6 @@ if ( | ||
| and vintage_end_year is not None | ||
| and vintage_end_year > 2100 | ||
| and vintage_end_year > 2225 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `vintage_end_year`, must be a value less than or equal to `2100`" | ||
| "Invalid value for `vintage_end_year`, must be a value less than or equal to `2225`" | ||
| ) # noqa: E501 | ||
@@ -402,3 +402,3 @@ if ( | ||
| """ | ||
| allowed_values = [None, "g", "Wh"] # noqa: E501 | ||
| allowed_values = [None, "g"] # noqa: E501 | ||
| if ( | ||
@@ -452,5 +452,7 @@ self.local_vars_configuration.client_side_validation | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -457,0 +459,0 @@ ) |
@@ -392,5 +392,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -397,0 +399,0 @@ ) |
@@ -568,5 +568,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -573,0 +575,0 @@ ) |
@@ -487,5 +487,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -492,0 +494,0 @@ ) |
@@ -124,5 +124,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -129,0 +131,0 @@ ) |
@@ -147,5 +147,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -152,0 +154,0 @@ ) |
@@ -221,5 +221,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -226,0 +228,0 @@ ) |
@@ -147,5 +147,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -152,0 +154,0 @@ ) |
@@ -191,5 +191,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -196,0 +198,0 @@ ) |
@@ -147,5 +147,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -152,0 +154,0 @@ ) |
@@ -140,3 +140,3 @@ # coding: utf-8 | ||
| The type of estimate. Available types are mass, flight, shipping, vehicle, and crypto. # noqa: E501 | ||
| The type of estimate. Available types are mass, flight, shipping, and crypto. # noqa: E501 | ||
@@ -152,3 +152,3 @@ :return: The type of this Estimate. # noqa: E501 | ||
| The type of estimate. Available types are mass, flight, shipping, vehicle, and crypto. # noqa: E501 | ||
| The type of estimate. Available types are mass, flight, shipping, and crypto. # noqa: E501 | ||
@@ -228,5 +228,7 @@ :param type: The type of this Estimate. # noqa: E501 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -233,0 +235,0 @@ ) |
@@ -159,5 +159,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -164,0 +166,0 @@ ) |
@@ -311,5 +311,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -316,0 +318,0 @@ ) |
@@ -112,5 +112,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -117,0 +119,0 @@ ) |
@@ -116,5 +116,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -121,0 +123,0 @@ ) |
@@ -124,5 +124,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -129,0 +131,0 @@ ) |
@@ -147,5 +147,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -152,0 +154,0 @@ ) |
@@ -373,5 +373,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -378,0 +380,0 @@ ) |
@@ -191,5 +191,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -196,0 +198,0 @@ ) |
@@ -147,5 +147,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -152,0 +154,0 @@ ) |
@@ -522,5 +522,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -527,0 +529,0 @@ ) |
@@ -118,5 +118,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -123,0 +125,0 @@ ) |
@@ -120,5 +120,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -125,0 +127,0 @@ ) |
@@ -88,5 +88,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -93,0 +95,0 @@ ) |
@@ -191,5 +191,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -196,0 +198,0 @@ ) |
@@ -147,5 +147,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -152,0 +154,0 @@ ) |
@@ -604,3 +604,3 @@ # coding: utf-8 | ||
| An array of objects containing the highlight's slug, title, and a URL for the corresponding icon. A highlight's title is a short string that spotlights a characteristic about the project. # noqa: E501 | ||
| DEPRECATED. An array of objects containing the highlight's slug, title, and a URL for the corresponding icon. A highlight's title is a short string that spotlights a characteristic about the project. Highlights are deprecated and not populated for recent projects. # noqa: E501 | ||
@@ -616,3 +616,3 @@ :return: The highlights of this Project. # noqa: E501 | ||
| An array of objects containing the highlight's slug, title, and a URL for the corresponding icon. A highlight's title is a short string that spotlights a characteristic about the project. # noqa: E501 | ||
| DEPRECATED. An array of objects containing the highlight's slug, title, and a URL for the corresponding icon. A highlight's title is a short string that spotlights a characteristic about the project. Highlights are deprecated and not populated for recent projects. # noqa: E501 | ||
@@ -698,5 +698,7 @@ :param highlights: The highlights of this Project. # noqa: E501 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -703,0 +705,0 @@ ) |
@@ -205,5 +205,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -210,0 +212,0 @@ ) |
@@ -159,5 +159,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -164,0 +166,0 @@ ) |
@@ -151,5 +151,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -156,0 +158,0 @@ ) |
@@ -164,5 +164,7 @@ # coding: utf-8 | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -169,0 +171,0 @@ ) |
@@ -110,6 +110,6 @@ # coding: utf-8 | ||
| and vintage_year is not None | ||
| and vintage_year > 2100 | ||
| and vintage_year > 2225 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `vintage_year`, must be a value less than or equal to `2100`" | ||
| "Invalid value for `vintage_year`, must be a value less than or equal to `2225`" | ||
| ) # noqa: E501 | ||
@@ -148,6 +148,6 @@ if ( | ||
| and vintage_start_year is not None | ||
| and vintage_start_year > 2100 | ||
| and vintage_start_year > 2225 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `vintage_start_year`, must be a value less than or equal to `2100`" | ||
| "Invalid value for `vintage_start_year`, must be a value less than or equal to `2225`" | ||
| ) # noqa: E501 | ||
@@ -186,6 +186,6 @@ if ( | ||
| and vintage_end_year is not None | ||
| and vintage_end_year > 2100 | ||
| and vintage_end_year > 2225 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `vintage_end_year`, must be a value less than or equal to `2100`" | ||
| "Invalid value for `vintage_end_year`, must be a value less than or equal to `2225`" | ||
| ) # noqa: E501 | ||
@@ -308,3 +308,3 @@ if ( | ||
| """ | ||
| allowed_values = [None, "g", "Wh"] # noqa: E501 | ||
| allowed_values = [None, "g"] # noqa: E501 | ||
| if ( | ||
@@ -337,5 +337,7 @@ self.local_vars_configuration.client_side_validation | ||
| map( | ||
| lambda item: (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item, | ||
| lambda item: ( | ||
| (item[0], item[1].to_dict()) | ||
| if hasattr(item[1], "to_dict") | ||
| else item | ||
| ), | ||
| value.items(), | ||
@@ -342,0 +344,0 @@ ) |
@@ -77,5 +77,5 @@ # coding: utf-8 | ||
| if configuration.assert_hostname is not None: | ||
| addition_pool_args[ | ||
| "assert_hostname" | ||
| ] = configuration.assert_hostname # noqa: E501 | ||
| addition_pool_args["assert_hostname"] = ( | ||
| configuration.assert_hostname | ||
| ) # noqa: E501 | ||
@@ -82,0 +82,0 @@ if configuration.retries is not None: |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: patch-api | ||
| Version: 2.1.1 | ||
| Version: 2.3.0 | ||
| Summary: Patch API V2 | ||
@@ -5,0 +5,0 @@ Home-page: UNKNOWN |
+1
-2
@@ -11,7 +11,6 @@ """ | ||
| from setuptools import setup, find_packages # noqa: H301 | ||
| NAME = "patch-api" | ||
| VERSION = "2.1.1" | ||
| VERSION = "2.3.0" | ||
| # To install the library, run the following | ||
@@ -18,0 +17,0 @@ # |
@@ -77,58 +77,2 @@ # coding: utf-8 | ||
| def test_create_and_retrieve_shipping_estimate(self): | ||
| """Test case for create_shipping_estimate | ||
| Create an estimate based on the shipping distance, transportation method, and package mass # noqa: E501 | ||
| """ | ||
| distance_m = 10000000 | ||
| package_mass_g = 1000 | ||
| transportation_method = "sea" | ||
| estimate = self.api.create_shipping_estimate( | ||
| distance_m=distance_m, | ||
| package_mass_g=package_mass_g, | ||
| transportation_method=transportation_method, | ||
| create_order=False, | ||
| ) | ||
| self.assertEqual(estimate.data.order, None) | ||
| self.assertEqual(estimate.data.type, "ecommerce") | ||
| self.assertGreater(estimate.data.mass_g, 200) | ||
| retrieved_estimate = self.api.retrieve_estimate(id=estimate.data.id) | ||
| self.assertTrue(retrieved_estimate) | ||
| def test_create_and_retrieve_vehicle_estimate(self): | ||
| """Test case for create_vehicle_estimate | ||
| Create an estimate based on the vehicle distance, transportation method, and package mass # noqa: E501 | ||
| """ | ||
| distance_m = 1000000 | ||
| make = "Toyota" | ||
| model = "Corolla" | ||
| year = 1995 | ||
| estimate = self.api.create_vehicle_estimate( | ||
| distance_m=distance_m, model=model, make=make, year=year | ||
| ) | ||
| self.assertEqual(estimate.data.type, "vehicle") | ||
| self.assertGreater(estimate.data.mass_g, 50000) | ||
| retrieved_estimate = self.api.retrieve_estimate(id=estimate.data.id) | ||
| self.assertTrue(retrieved_estimate) | ||
| def test_create_and_retrieve_vehicle_estimate_best_match(self): | ||
| """Test case for create_vehicle_estimate | ||
| Create an estimate based on the vehicle with partial information # noqa: E501 | ||
| """ | ||
| distance_m = 1000000 | ||
| make = "Toyota" | ||
| model = "Corolla" | ||
| estimate = self.api.create_vehicle_estimate( | ||
| distance_m=distance_m, model=model, make=make | ||
| ) | ||
| self.assertEqual(estimate.data.type, "vehicle") | ||
| self.assertGreater(estimate.data.mass_g, 50000) | ||
| retrieved_estimate = self.api.retrieve_estimate(id=estimate.data.id) | ||
| self.assertTrue(retrieved_estimate) | ||
| def test_create_bitcoin_estimate_no_params(self): | ||
@@ -161,28 +105,2 @@ """Test case for create_bitcoin_estimate | ||
| def test_create_bitcoin_estimate_transaction_value(self): | ||
| """Test case for create_bitcoin_estimate | ||
| Create an estimate based on an average daily balance # noqa: E501 | ||
| """ | ||
| estimate1 = self.api.create_bitcoin_estimate( | ||
| average_daily_balance_btc_sats=100000 | ||
| ) | ||
| estimate2 = self.api.create_bitcoin_estimate( | ||
| average_daily_balance_btc_sats=1000000 | ||
| ) | ||
| self.assertEqual(estimate1.data.type, "bitcoin") | ||
| self.assertGreater(estimate2.data.mass_g, estimate1.data.mass_g) | ||
| def test_create_ethereum_estimate_transaction_value(self): | ||
| """Test case for create_ethereum_estimate | ||
| Create an estimate based on a transaction amount # noqa: E501 | ||
| """ | ||
| estimate = self.api.create_ethereum_estimate(gas_used=1000) | ||
| self.assertEqual(estimate.data.type, "ethereum") | ||
| self.assertGreater( | ||
| estimate.data.mass_g, 1 | ||
| ) # not setting an exact value since this is changing daily | ||
| def test_create_hotel_estimate(self): | ||
@@ -189,0 +107,0 @@ """Test case for create_hotel_estimate |
| # 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 CreateEthereumEstimateRequest(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 = { | ||
| "timestamp": "str", | ||
| "gas_used": "int", | ||
| "transaction_value_eth_gwei": "int", | ||
| "average_daily_balance_eth_gwei": "int", | ||
| "project_id": "str", | ||
| "create_order": "bool", | ||
| } | ||
| attribute_map = { | ||
| "timestamp": "timestamp", | ||
| "gas_used": "gas_used", | ||
| "transaction_value_eth_gwei": "transaction_value_eth_gwei", | ||
| "average_daily_balance_eth_gwei": "average_daily_balance_eth_gwei", | ||
| "project_id": "project_id", | ||
| "create_order": "create_order", | ||
| } | ||
| def __init__( | ||
| self, | ||
| timestamp=None, | ||
| gas_used=None, | ||
| transaction_value_eth_gwei=None, | ||
| average_daily_balance_eth_gwei=None, | ||
| project_id=None, | ||
| create_order=False, | ||
| local_vars_configuration=None, | ||
| ): # noqa: E501 | ||
| """CreateEthereumEstimateRequest - 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._timestamp = None | ||
| self._gas_used = None | ||
| self._transaction_value_eth_gwei = None | ||
| self._average_daily_balance_eth_gwei = None | ||
| self._project_id = None | ||
| self._create_order = None | ||
| self.discriminator = None | ||
| self.timestamp = timestamp | ||
| self.gas_used = gas_used | ||
| self.transaction_value_eth_gwei = transaction_value_eth_gwei | ||
| self.average_daily_balance_eth_gwei = average_daily_balance_eth_gwei | ||
| self.project_id = project_id | ||
| self.create_order = create_order | ||
| @property | ||
| def timestamp(self): | ||
| """Gets the timestamp of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :return: The timestamp of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :rtype: str | ||
| """ | ||
| return self._timestamp | ||
| @timestamp.setter | ||
| def timestamp(self, timestamp): | ||
| """Sets the timestamp of this CreateEthereumEstimateRequest. | ||
| :param timestamp: The timestamp of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :type: str | ||
| """ | ||
| self._timestamp = timestamp | ||
| @property | ||
| def gas_used(self): | ||
| """Gets the gas_used of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :return: The gas_used of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :rtype: int | ||
| """ | ||
| return self._gas_used | ||
| @gas_used.setter | ||
| def gas_used(self, gas_used): | ||
| """Sets the gas_used of this CreateEthereumEstimateRequest. | ||
| :param gas_used: The gas_used of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :type: int | ||
| """ | ||
| self._gas_used = gas_used | ||
| @property | ||
| def transaction_value_eth_gwei(self): | ||
| """Gets the transaction_value_eth_gwei of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :return: The transaction_value_eth_gwei of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :rtype: int | ||
| """ | ||
| return self._transaction_value_eth_gwei | ||
| @transaction_value_eth_gwei.setter | ||
| def transaction_value_eth_gwei(self, transaction_value_eth_gwei): | ||
| """Sets the transaction_value_eth_gwei of this CreateEthereumEstimateRequest. | ||
| :param transaction_value_eth_gwei: The transaction_value_eth_gwei of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :type: int | ||
| """ | ||
| self._transaction_value_eth_gwei = transaction_value_eth_gwei | ||
| @property | ||
| def average_daily_balance_eth_gwei(self): | ||
| """Gets the average_daily_balance_eth_gwei of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :return: The average_daily_balance_eth_gwei of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :rtype: int | ||
| """ | ||
| return self._average_daily_balance_eth_gwei | ||
| @average_daily_balance_eth_gwei.setter | ||
| def average_daily_balance_eth_gwei(self, average_daily_balance_eth_gwei): | ||
| """Sets the average_daily_balance_eth_gwei of this CreateEthereumEstimateRequest. | ||
| :param average_daily_balance_eth_gwei: The average_daily_balance_eth_gwei of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :type: int | ||
| """ | ||
| self._average_daily_balance_eth_gwei = average_daily_balance_eth_gwei | ||
| @property | ||
| def project_id(self): | ||
| """Gets the project_id of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :return: The project_id of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :rtype: str | ||
| """ | ||
| return self._project_id | ||
| @project_id.setter | ||
| def project_id(self, project_id): | ||
| """Sets the project_id of this CreateEthereumEstimateRequest. | ||
| :param project_id: The project_id of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :type: str | ||
| """ | ||
| self._project_id = project_id | ||
| @property | ||
| def create_order(self): | ||
| """Gets the create_order of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :return: The create_order of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :rtype: bool | ||
| """ | ||
| return self._create_order | ||
| @create_order.setter | ||
| def create_order(self, create_order): | ||
| """Sets the create_order of this CreateEthereumEstimateRequest. | ||
| :param create_order: The create_order of this CreateEthereumEstimateRequest. # noqa: E501 | ||
| :type: bool | ||
| """ | ||
| self._create_order = create_order | ||
| 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, CreateEthereumEstimateRequest): | ||
| 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, CreateEthereumEstimateRequest): | ||
| return True | ||
| return self.to_dict() != other.to_dict() |
| # 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 CreateShippingEstimateRequest(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 = { | ||
| "distance_m": "int", | ||
| "package_mass_g": "int", | ||
| "transportation_method": "str", | ||
| "project_id": "str", | ||
| "create_order": "bool", | ||
| } | ||
| attribute_map = { | ||
| "distance_m": "distance_m", | ||
| "package_mass_g": "package_mass_g", | ||
| "transportation_method": "transportation_method", | ||
| "project_id": "project_id", | ||
| "create_order": "create_order", | ||
| } | ||
| def __init__( | ||
| self, | ||
| distance_m=None, | ||
| package_mass_g=None, | ||
| transportation_method=None, | ||
| project_id=None, | ||
| create_order=False, | ||
| local_vars_configuration=None, | ||
| ): # noqa: E501 | ||
| """CreateShippingEstimateRequest - 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._distance_m = None | ||
| self._package_mass_g = None | ||
| self._transportation_method = None | ||
| self._project_id = None | ||
| self._create_order = None | ||
| self.discriminator = None | ||
| self.distance_m = distance_m | ||
| self.package_mass_g = package_mass_g | ||
| self.transportation_method = transportation_method | ||
| self.project_id = project_id | ||
| self.create_order = create_order | ||
| @property | ||
| def distance_m(self): | ||
| """Gets the distance_m of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :return: The distance_m of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :rtype: int | ||
| """ | ||
| return self._distance_m | ||
| @distance_m.setter | ||
| def distance_m(self, distance_m): | ||
| """Sets the distance_m of this CreateShippingEstimateRequest. | ||
| :param distance_m: The distance_m of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :type: int | ||
| """ | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation and distance_m is None | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `distance_m`, must not be `None`" | ||
| ) # noqa: E501 | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation | ||
| and distance_m is not None | ||
| and distance_m > 400000000 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `distance_m`, must be a value less than or equal to `400000000`" | ||
| ) # noqa: E501 | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation | ||
| and distance_m is not None | ||
| and distance_m < 0 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `distance_m`, must be a value greater than or equal to `0`" | ||
| ) # noqa: E501 | ||
| self._distance_m = distance_m | ||
| @property | ||
| def package_mass_g(self): | ||
| """Gets the package_mass_g of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :return: The package_mass_g of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :rtype: int | ||
| """ | ||
| return self._package_mass_g | ||
| @package_mass_g.setter | ||
| def package_mass_g(self, package_mass_g): | ||
| """Sets the package_mass_g of this CreateShippingEstimateRequest. | ||
| :param package_mass_g: The package_mass_g of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :type: int | ||
| """ | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation | ||
| and package_mass_g is None | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `package_mass_g`, must not be `None`" | ||
| ) # noqa: E501 | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation | ||
| and package_mass_g is not None | ||
| and package_mass_g > 2000000000 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `package_mass_g`, must be a value less than or equal to `2000000000`" | ||
| ) # noqa: E501 | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation | ||
| and package_mass_g is not None | ||
| and package_mass_g < 0 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `package_mass_g`, must be a value greater than or equal to `0`" | ||
| ) # noqa: E501 | ||
| self._package_mass_g = package_mass_g | ||
| @property | ||
| def transportation_method(self): | ||
| """Gets the transportation_method of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :return: The transportation_method of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :rtype: str | ||
| """ | ||
| return self._transportation_method | ||
| @transportation_method.setter | ||
| def transportation_method(self, transportation_method): | ||
| """Sets the transportation_method of this CreateShippingEstimateRequest. | ||
| :param transportation_method: The transportation_method of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :type: str | ||
| """ | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation | ||
| and transportation_method is None | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `transportation_method`, must not be `None`" | ||
| ) # noqa: E501 | ||
| allowed_values = ["air", "rail", "road", "sea"] # noqa: E501 | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation | ||
| and transportation_method not in allowed_values | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `transportation_method` ({0}), must be one of {1}".format( # noqa: E501 | ||
| transportation_method, allowed_values | ||
| ) | ||
| ) | ||
| self._transportation_method = transportation_method | ||
| @property | ||
| def project_id(self): | ||
| """Gets the project_id of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :return: The project_id of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :rtype: str | ||
| """ | ||
| return self._project_id | ||
| @project_id.setter | ||
| def project_id(self, project_id): | ||
| """Sets the project_id of this CreateShippingEstimateRequest. | ||
| :param project_id: The project_id of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :type: str | ||
| """ | ||
| self._project_id = project_id | ||
| @property | ||
| def create_order(self): | ||
| """Gets the create_order of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :return: The create_order of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :rtype: bool | ||
| """ | ||
| return self._create_order | ||
| @create_order.setter | ||
| def create_order(self, create_order): | ||
| """Sets the create_order of this CreateShippingEstimateRequest. | ||
| :param create_order: The create_order of this CreateShippingEstimateRequest. # noqa: E501 | ||
| :type: bool | ||
| """ | ||
| self._create_order = create_order | ||
| 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, CreateShippingEstimateRequest): | ||
| 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, CreateShippingEstimateRequest): | ||
| return True | ||
| return self.to_dict() != other.to_dict() |
| # 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 CreateVehicleEstimateRequest(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 = { | ||
| "distance_m": "int", | ||
| "make": "str", | ||
| "model": "str", | ||
| "year": "int", | ||
| "project_id": "str", | ||
| "create_order": "bool", | ||
| } | ||
| attribute_map = { | ||
| "distance_m": "distance_m", | ||
| "make": "make", | ||
| "model": "model", | ||
| "year": "year", | ||
| "project_id": "project_id", | ||
| "create_order": "create_order", | ||
| } | ||
| def __init__( | ||
| self, | ||
| distance_m=None, | ||
| make=None, | ||
| model=None, | ||
| year=None, | ||
| project_id=None, | ||
| create_order=False, | ||
| local_vars_configuration=None, | ||
| ): # noqa: E501 | ||
| """CreateVehicleEstimateRequest - 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._distance_m = None | ||
| self._make = None | ||
| self._model = None | ||
| self._year = None | ||
| self._project_id = None | ||
| self._create_order = None | ||
| self.discriminator = None | ||
| self.distance_m = distance_m | ||
| self.make = make | ||
| self.model = model | ||
| self.year = year | ||
| self.project_id = project_id | ||
| self.create_order = create_order | ||
| @property | ||
| def distance_m(self): | ||
| """Gets the distance_m of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :return: The distance_m of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :rtype: int | ||
| """ | ||
| return self._distance_m | ||
| @distance_m.setter | ||
| def distance_m(self, distance_m): | ||
| """Sets the distance_m of this CreateVehicleEstimateRequest. | ||
| :param distance_m: The distance_m of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :type: int | ||
| """ | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation and distance_m is None | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `distance_m`, must not be `None`" | ||
| ) # noqa: E501 | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation | ||
| and distance_m is not None | ||
| and distance_m > 400000000 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `distance_m`, must be a value less than or equal to `400000000`" | ||
| ) # noqa: E501 | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation | ||
| and distance_m is not None | ||
| and distance_m < 0 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `distance_m`, must be a value greater than or equal to `0`" | ||
| ) # noqa: E501 | ||
| self._distance_m = distance_m | ||
| @property | ||
| def make(self): | ||
| """Gets the make of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :return: The make of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :rtype: str | ||
| """ | ||
| return self._make | ||
| @make.setter | ||
| def make(self, make): | ||
| """Sets the make of this CreateVehicleEstimateRequest. | ||
| :param make: The make of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :type: str | ||
| """ | ||
| self._make = make | ||
| @property | ||
| def model(self): | ||
| """Gets the model of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :return: The model of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :rtype: str | ||
| """ | ||
| return self._model | ||
| @model.setter | ||
| def model(self, model): | ||
| """Sets the model of this CreateVehicleEstimateRequest. | ||
| :param model: The model of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :type: str | ||
| """ | ||
| self._model = model | ||
| @property | ||
| def year(self): | ||
| """Gets the year of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :return: The year of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :rtype: int | ||
| """ | ||
| return self._year | ||
| @year.setter | ||
| def year(self, year): | ||
| """Sets the year of this CreateVehicleEstimateRequest. | ||
| :param year: The year of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :type: int | ||
| """ | ||
| if ( | ||
| self.local_vars_configuration.client_side_validation | ||
| and year is not None | ||
| and year < 1900 | ||
| ): # noqa: E501 | ||
| raise ValueError( | ||
| "Invalid value for `year`, must be a value greater than or equal to `1900`" | ||
| ) # noqa: E501 | ||
| self._year = year | ||
| @property | ||
| def project_id(self): | ||
| """Gets the project_id of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :return: The project_id of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :rtype: str | ||
| """ | ||
| return self._project_id | ||
| @project_id.setter | ||
| def project_id(self, project_id): | ||
| """Sets the project_id of this CreateVehicleEstimateRequest. | ||
| :param project_id: The project_id of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :type: str | ||
| """ | ||
| self._project_id = project_id | ||
| @property | ||
| def create_order(self): | ||
| """Gets the create_order of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :return: The create_order of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :rtype: bool | ||
| """ | ||
| return self._create_order | ||
| @create_order.setter | ||
| def create_order(self, create_order): | ||
| """Sets the create_order of this CreateVehicleEstimateRequest. | ||
| :param create_order: The create_order of this CreateVehicleEstimateRequest. # noqa: E501 | ||
| :type: bool | ||
| """ | ||
| self._create_order = create_order | ||
| 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, CreateVehicleEstimateRequest): | ||
| 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, CreateVehicleEstimateRequest): | ||
| return True | ||
| return self.to_dict() != other.to_dict() |
Sorry, the diff of this file is too big to display
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
637366
-7.71%64
-4.48%15007
-7.28%