Skip to content

Commit 2961b98

Browse files
authored
Remove the preferences endpoints (#48)
* Remove preferences * Update changelog * Update changelog * Update changelog * Remove model * Update readme
1 parent fd7d94e commit 2961b98

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+68
-730
lines changed

.flake8

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
# W504 is the "line break before binary operator" error and is disabled since we use
44
# the black code formatter.
55
# W503 is disabled by default, but must be disabled explicitly when using `ignore`.
6-
ignore = E501, W503, W504
6+
# F401 is "unused import", which is hard to fix without modifying the templates
7+
ignore = E501, W503, W504, F401

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [1.16.0] - 2021-12-07
9+
10+
### Removed
11+
12+
- Removes the `preferences` endpoints (deprecated)
13+
814
## [1.15.2] - 2021-11-08
915

1016
### Added

patch_api/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
The core API used to integrate with Patch's service # noqa: E501
99
1010
The version of the OpenAPI document: v1
11-
Contact: developers@usepatch.com
11+
Contact: engineering@usepatch.com
1212
Generated by: https://openapi-generator.tech
1313
"""
1414

1515

1616
from __future__ import absolute_import
1717

18-
__version__ = "1.15.2"
18+
__version__ = "1.16.0"
1919

2020
# import ApiClient
2121
from patch_api.api_client import ApiClient

patch_api/api/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@
55
# import apis into api package
66
from patch_api.api.estimates_api import EstimatesApi
77
from patch_api.api.orders_api import OrdersApi
8-
from patch_api.api.preferences_api import PreferencesApi
98
from patch_api.api.projects_api import ProjectsApi
109
from patch_api.api.technology_types_api import TechnologyTypesApi

patch_api/api/estimates_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/api/orders_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/api/projects_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/api/technology_types_api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/api_client.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The core API used to integrate with Patch's service # noqa: E501
66
77
The version of the OpenAPI document: v1
8-
Contact: developers@usepatch.com
8+
Contact: engineering@usepatch.com
99
Generated by: https://openapi-generator.tech
1010
"""
1111

@@ -27,7 +27,6 @@
2727
import patch_api.models
2828
from patch_api.api.estimates_api import EstimatesApi
2929
from patch_api.api.orders_api import OrdersApi
30-
from patch_api.api.preferences_api import PreferencesApi
3130
from patch_api.api.projects_api import ProjectsApi
3231
from patch_api.api.technology_types_api import TechnologyTypesApi
3332

@@ -92,7 +91,7 @@ def __init__(
9291
self.default_headers[header_name] = header_value
9392
self.cookie = cookie
9493
# Set default User-Agent.
95-
self.user_agent = "patch-python/1.15.2"
94+
self.user_agent = "patch-python/1.16.0"
9695

9796
def __del__(self):
9897
if self._pool:
@@ -104,7 +103,6 @@ def __getattr__(self, method):
104103
resource = {
105104
"projects": ProjectsApi,
106105
"orders": OrdersApi,
107-
"preferences": PreferencesApi,
108106
"estimates": EstimatesApi,
109107
"technology_types": TechnologyTypesApi,
110108
}[method]

patch_api/configuration.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

@@ -341,7 +341,7 @@ def to_debug_report(self):
341341
"OS: {env}\n"
342342
"Python Version: {pyversion}\n"
343343
"Version of the API: v1\n"
344-
"SDK Package Version: 1.15.2".format(
344+
"SDK Package Version: 1.16.0".format(
345345
env=sys.platform, pyversion=sys.version
346346
)
347347
)
@@ -353,12 +353,12 @@ def get_host_settings(self):
353353
"""
354354
return [
355355
{
356-
"url": "https://{defaultHost}",
356+
"url": "{defaultUrl}",
357357
"description": "No description provided",
358358
"variables": {
359-
"defaultHost": {
359+
"defaultUrl": {
360360
"description": "No description provided",
361-
"default_value": "api.patch.io",
361+
"default_value": "https://api.patch.io",
362362
}
363363
},
364364
}

patch_api/exceptions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/__init__.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
The core API used to integrate with Patch's service # noqa: E501
88
99
The version of the OpenAPI document: v1
10-
Contact: developers@usepatch.com
10+
Contact: engineering@usepatch.com
1111
Generated by: https://openapi-generator.tech
1212
"""
1313

@@ -25,7 +25,6 @@
2525
from patch_api.models.create_flight_estimate_request import CreateFlightEstimateRequest
2626
from patch_api.models.create_mass_estimate_request import CreateMassEstimateRequest
2727
from patch_api.models.create_order_request import CreateOrderRequest
28-
from patch_api.models.create_preference_request import CreatePreferenceRequest
2928
from patch_api.models.create_shipping_estimate_request import (
3029
CreateShippingEstimateRequest,
3130
)
@@ -44,9 +43,6 @@
4443
from patch_api.models.order_response import OrderResponse
4544
from patch_api.models.parent_technology_type import ParentTechnologyType
4645
from patch_api.models.photo import Photo
47-
from patch_api.models.preference import Preference
48-
from patch_api.models.preference_list_response import PreferenceListResponse
49-
from patch_api.models.preference_response import PreferenceResponse
5046
from patch_api.models.project import Project
5147
from patch_api.models.project_list_response import ProjectListResponse
5248
from patch_api.models.project_response import ProjectResponse

patch_api/models/allocation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/create_bitcoin_estimate_request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/create_ethereum_estimate_request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/create_flight_estimate_request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/create_mass_estimate_request.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

@@ -90,10 +90,10 @@ def mass_g(self, mass_g):
9090
if (
9191
self.local_vars_configuration.client_side_validation
9292
and mass_g is not None
93-
and mass_g > 2000000000
93+
and mass_g > 100000000000
9494
): # noqa: E501
9595
raise ValueError(
96-
"Invalid value for `mass_g`, must be a value less than or equal to `2000000000`"
96+
"Invalid value for `mass_g`, must be a value less than or equal to `100000000000`"
9797
) # noqa: E501
9898
if (
9999
self.local_vars_configuration.client_side_validation

patch_api/models/create_order_request.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

@@ -96,10 +96,10 @@ def mass_g(self, mass_g):
9696
if (
9797
self.local_vars_configuration.client_side_validation
9898
and mass_g is not None
99-
and mass_g > 2000000000
99+
and mass_g > 100000000000
100100
): # noqa: E501
101101
raise ValueError(
102-
"Invalid value for `mass_g`, must be a value less than or equal to `2000000000`"
102+
"Invalid value for `mass_g`, must be a value less than or equal to `100000000000`"
103103
) # noqa: E501
104104
if (
105105
self.local_vars_configuration.client_side_validation

patch_api/models/create_shipping_estimate_request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/create_success_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/create_vehicle_estimate_request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/error_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/estimate.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/estimate_list_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/estimate_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/highlight.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/meta_index_object.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/order.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

@@ -187,10 +187,10 @@ def mass_g(self, mass_g):
187187
if (
188188
self.local_vars_configuration.client_side_validation
189189
and mass_g is not None
190-
and mass_g > 2000000000
190+
and mass_g > 100000000000
191191
): # noqa: E501
192192
raise ValueError(
193-
"Invalid value for `mass_g`, must be a value less than or equal to `2000000000`"
193+
"Invalid value for `mass_g`, must be a value less than or equal to `100000000000`"
194194
) # noqa: E501
195195
if (
196196
self.local_vars_configuration.client_side_validation

patch_api/models/order_list_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/order_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

patch_api/models/parent_technology_type.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
The core API used to integrate with Patch's service # noqa: E501
77
88
The version of the OpenAPI document: v1
9-
Contact: developers@usepatch.com
9+
Contact: engineering@usepatch.com
1010
Generated by: https://openapi-generator.tech
1111
"""
1212

0 commit comments

Comments
 (0)