tesla-api-sdk 1.0.0__py3-none-any.whl → 1.0.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/METADATA +40 -34
  2. {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/RECORD +34 -24
  3. {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/WHEEL +1 -1
  4. teslafleetmanagementapi/configuration.py +13 -11
  5. teslafleetmanagementapi/controllers/__init__.py +2 -1
  6. teslafleetmanagementapi/controllers/base_controller.py +1 -1
  7. teslafleetmanagementapi/controllers/charging_controller.py +6 -3
  8. teslafleetmanagementapi/controllers/energy_controller.py +14 -11
  9. teslafleetmanagementapi/controllers/{oauth_authorization_controller.py → o_auth_authorization_controller.py} +24 -24
  10. teslafleetmanagementapi/controllers/partner_controller.py +7 -4
  11. teslafleetmanagementapi/controllers/user_controller.py +7 -4
  12. teslafleetmanagementapi/controllers/vehicle_commands_controller.py +891 -0
  13. teslafleetmanagementapi/controllers/vehicles_controller.py +24 -21
  14. teslafleetmanagementapi/exceptions/__init__.py +1 -1
  15. teslafleetmanagementapi/exceptions/{oauth_provider_exception.py → o_auth_provider_exception.py} +3 -3
  16. teslafleetmanagementapi/http/auth/__init__.py +1 -1
  17. teslafleetmanagementapi/http/auth/{oauth_2.py → thirdpartytoken.py} +111 -82
  18. teslafleetmanagementapi/models/__init__.py +12 -3
  19. teslafleetmanagementapi/models/actuate_trunk_request.py +92 -0
  20. teslafleetmanagementapi/models/add_charge_schedule_request.py +272 -0
  21. teslafleetmanagementapi/models/add_precondition_schedule_request.py +203 -0
  22. teslafleetmanagementapi/models/adjust_volume_request.py +92 -0
  23. teslafleetmanagementapi/models/api_1_vehicles_response_get_vehicle.py +1 -1
  24. teslafleetmanagementapi/models/command_response.py +109 -0
  25. teslafleetmanagementapi/models/command_result.py +105 -0
  26. teslafleetmanagementapi/models/guest_mode_request.py +92 -0
  27. teslafleetmanagementapi/models/kind_get_wall_connector_charging_history.py +1 -1
  28. teslafleetmanagementapi/models/{oauth_provider_error.py → o_auth_provider_error.py} +1 -1
  29. teslafleetmanagementapi/models/o_auth_scope_thirdpartytoken.py +84 -0
  30. teslafleetmanagementapi/models/{oauth_token.py → o_auth_token.py} +2 -2
  31. teslafleetmanagementapi/models/which_trunk.py +45 -0
  32. teslafleetmanagementapi/teslafleetmanagementapi_client.py +23 -14
  33. {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/licenses/LICENSE +0 -0
  34. {tesla_api_sdk-1.0.0.dist-info → tesla_api_sdk-1.0.2.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: tesla-api-sdk
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: Tesla-API SDK
5
5
  Author-email: Muhammad Rafay <muhammad.rafay@apimatic.io>
6
6
  Project-URL: Documentation, https://developer.tesla.com/
@@ -28,15 +28,15 @@ The package is compatible with Python versions `3.7+`.
28
28
  Install the package from PyPi using the following pip command:
29
29
 
30
30
  ```bash
31
- pip install tesla-api-sdk==1.0.0
31
+ pip install tesla-api-sdk==1.0.2
32
32
  ```
33
33
 
34
34
  You can also view the package at:
35
- https://pypi.python.org/pypi/tesla-api-sdk/1.0.0
35
+ https://pypi.python.org/pypi/tesla-api-sdk/1.0.2
36
36
 
37
37
  ## Initialize the API Client
38
38
 
39
- **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/client.md)
39
+ **_Note:_** Documentation for the client can be found [here.](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/client.md)
40
40
 
41
41
  The following parameters are configurable for the API Client:
42
42
 
@@ -51,10 +51,10 @@ The following parameters are configurable for the API Client:
51
51
  | backoff_factor | `float` | A backoff factor to apply between attempts after the second try. <br> **Default: 2** |
52
52
  | retry_statuses | `Array of int` | The http statuses on which retry is to be done. <br> **Default: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524]** |
53
53
  | retry_methods | `Array of string` | The http methods on which retry is to be done. <br> **Default: ["GET", "PUT"]** |
54
- | proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
55
- | logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/logging-configuration.md) | The SDK logging configuration for API calls |
56
- | bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
57
- | oauth_2_credentials | [`Oauth2Credentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/auth/oauth-2-authorization-code-grant.md) | The credential object for OAuth 2 Authorization Code Grant |
54
+ | proxy_settings | [`ProxySettings`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/proxy-settings.md) | Optional proxy configuration to route HTTP requests through a proxy server. |
55
+ | logging_configuration | [`LoggingConfiguration`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/logging-configuration.md) | The SDK logging configuration for API calls |
56
+ | bearer_auth_credentials | [`BearerAuthCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md) | The credential object for OAuth 2 Bearer token |
57
+ | thirdpartytoken_credentials | [`ThirdpartytokenCredentials`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-authorization-code-grant.md) | The credential object for OAuth 2 Authorization Code Grant |
58
58
 
59
59
  The API client can be initialized as follows:
60
60
 
@@ -65,20 +65,25 @@ import logging
65
65
 
66
66
  from teslafleetmanagementapi.configuration import Environment
67
67
  from teslafleetmanagementapi.http.auth.bearer_auth import BearerAuthCredentials
68
- from teslafleetmanagementapi.http.auth.oauth_2 import Oauth2Credentials
68
+ from teslafleetmanagementapi.http.auth.thirdpartytoken import ThirdpartytokenCredentials
69
69
  from teslafleetmanagementapi.logging.configuration.api_logging_configuration import LoggingConfiguration
70
70
  from teslafleetmanagementapi.logging.configuration.api_logging_configuration import RequestLoggingConfiguration
71
71
  from teslafleetmanagementapi.logging.configuration.api_logging_configuration import ResponseLoggingConfiguration
72
+ from teslafleetmanagementapi.models.o_auth_scope_thirdpartytoken import OAuthScopeThirdpartytoken
72
73
  from teslafleetmanagementapi.teslafleetmanagementapi_client import TeslafleetmanagementapiClient
73
74
 
74
75
  client = TeslafleetmanagementapiClient(
75
76
  bearer_auth_credentials=BearerAuthCredentials(
76
77
  access_token='AccessToken'
77
78
  ),
78
- oauth_2_credentials=Oauth2Credentials(
79
- oauth_client_id='OAuthClientId',
80
- oauth_client_secret='OAuthClientSecret',
81
- oauth_redirect_uri='OAuthRedirectUri'
79
+ thirdpartytoken_credentials=ThirdpartytokenCredentials(
80
+ o_auth_client_id='OAuthClientId',
81
+ o_auth_client_secret='OAuthClientSecret',
82
+ o_auth_redirect_uri='OAuthRedirectUri',
83
+ o_auth_scopes=[
84
+ OAuthScopeThirdpartytoken.OPENID,
85
+ OAuthScopeThirdpartytoken.OFFLINE_ACCESS
86
+ ]
82
87
  ),
83
88
  environment=Environment.PRODUCTION,
84
89
  logging_configuration=LoggingConfiguration(
@@ -102,44 +107,45 @@ from teslafleetmanagementapi.teslafleetmanagementapi_client import Teslafleetman
102
107
  client = TeslafleetmanagementapiClient.from_environment(dotenv_path='/path/to/.env')
103
108
  ```
104
109
 
105
- See the [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/environment-based-client-initialization.md) section for details.
110
+ See the [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/environment-based-client-initialization.md) section for details.
106
111
 
107
112
  ## Authorization
108
113
 
109
114
  This API uses the following authentication schemes.
110
115
 
111
- * [`bearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/auth/oauth-2-bearer-token.md)
112
- * [`oauth2 (OAuth 2 Authorization Code Grant)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/auth/oauth-2-authorization-code-grant.md)
116
+ * [`bearerAuth (OAuth 2 Bearer token)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-bearer-token.md)
117
+ * [`thirdpartytoken (OAuth 2 Authorization Code Grant)`](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/auth/oauth-2-authorization-code-grant.md)
113
118
 
114
119
  ## List of APIs
115
120
 
116
- * [Charging](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/controllers/charging.md)
117
- * [Energy](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/controllers/energy.md)
118
- * [Partner](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/controllers/partner.md)
119
- * [User](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/controllers/user.md)
120
- * [Vehicles](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/controllers/vehicles.md)
121
+ * [Vehicle Commands](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/vehicle-commands.md)
122
+ * [Charging](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/charging.md)
123
+ * [Energy](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/energy.md)
124
+ * [Partner](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/partner.md)
125
+ * [User](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/user.md)
126
+ * [Vehicles](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/controllers/vehicles.md)
121
127
 
122
128
  ## SDK Infrastructure
123
129
 
124
130
  ### Configuration
125
131
 
126
- * [ProxySettings](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/proxy-settings.md)
127
- * [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/environment-based-client-initialization.md)
128
- * [AbstractLogger](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/abstract-logger.md)
129
- * [LoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/logging-configuration.md)
130
- * [RequestLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/request-logging-configuration.md)
131
- * [ResponseLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/response-logging-configuration.md)
132
+ * [ProxySettings](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/proxy-settings.md)
133
+ * [Environment-Based Client Initialization](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/environment-based-client-initialization.md)
134
+ * [AbstractLogger](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/abstract-logger.md)
135
+ * [LoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/logging-configuration.md)
136
+ * [RequestLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/request-logging-configuration.md)
137
+ * [ResponseLoggingConfiguration](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/response-logging-configuration.md)
132
138
 
133
139
  ### HTTP
134
140
 
135
- * [HttpResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/http-response.md)
136
- * [HttpRequest](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/http-request.md)
141
+ * [HttpResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-response.md)
142
+ * [HttpRequest](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-request.md)
137
143
 
138
144
  ### Utilities
139
145
 
140
- * [ApiResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/api-response.md)
141
- * [ApiHelper](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/api-helper.md)
142
- * [HttpDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/http-date-time.md)
143
- * [RFC3339DateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/rfc3339-date-time.md)
144
- * [UnixDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.0/doc/unix-date-time.md)
146
+ * [ApiResponse](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/api-response.md)
147
+ * [ApiHelper](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/api-helper.md)
148
+ * [HttpDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/http-date-time.md)
149
+ * [RFC3339DateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/rfc3339-date-time.md)
150
+ * [UnixDateTime](https://www.github.com/sdks-io/tesla-api-python-sdk/tree/1.0.2/doc/unix-date-time.md)
145
151
 
@@ -1,19 +1,20 @@
1
- tesla_api_sdk-1.0.0.dist-info/licenses/LICENSE,sha256=o5qrSek4x1g9YArvhgZmSORdSoQn7unl7I44zmz7iBc,1213
1
+ tesla_api_sdk-1.0.2.dist-info/licenses/LICENSE,sha256=o5qrSek4x1g9YArvhgZmSORdSoQn7unl7I44zmz7iBc,1213
2
2
  teslafleetmanagementapi/__init__.py,sha256=E7NIgboxbvRm8fOqogNH8Y2yjDuOiGW5FAfLtPqbW-A,301
3
3
  teslafleetmanagementapi/api_helper.py,sha256=oS6aPLpKimVdkHpVaoYwgutBH3gYAK01f76Edkxiwvg,551
4
- teslafleetmanagementapi/configuration.py,sha256=XZSTjcAjgEnO6FcofdNtEhuFhu4AZAMPiHUvTGqki2M,10305
5
- teslafleetmanagementapi/teslafleetmanagementapi_client.py,sha256=h2NIDoW0-IIkQnOA2TZj7Bk99BTcRxQmnMPITT-wgGI,4720
6
- teslafleetmanagementapi/controllers/__init__.py,sha256=fBFZ8O1rPh4MGG1XH2t6rmC1CGTgniRifCKvLqvaJ-I,316
7
- teslafleetmanagementapi/controllers/base_controller.py,sha256=bJerm3dBZtp1HqY1tW9RO5FV_-0zzBNNvHJt4WVw0Sw,2126
8
- teslafleetmanagementapi/controllers/charging_controller.py,sha256=WqfoBxz_kkFcPasI5bSdnVXFDm_jFJFg7tuA-DpKU6Q,5206
9
- teslafleetmanagementapi/controllers/energy_controller.py,sha256=yQElUTUIrTgteWqFNo1zpNcaPuWH7_0xNE8h-yqxZ28,23556
10
- teslafleetmanagementapi/controllers/oauth_authorization_controller.py,sha256=0fiZTTOns38P_F33dRuY7YLfk5W3WzmHavBwLkV2s4A,6462
11
- teslafleetmanagementapi/controllers/partner_controller.py,sha256=nWaBSoiBMC504O79m_7eC9KpWLxOUNZBteNuYkD47kw,6904
12
- teslafleetmanagementapi/controllers/user_controller.py,sha256=59W0vD9TIOEDqnNxQQ7gYHuoO3JaGzqPSYBSnQwXijk,5929
13
- teslafleetmanagementapi/controllers/vehicles_controller.py,sha256=KQitnQZNSU3ZLAV7pVwKeDu8-UtHOJ2v2cMDtjHNZEw,32860
14
- teslafleetmanagementapi/exceptions/__init__.py,sha256=MEYcF4k0hk9cOR4p5KUy3eLzt0MpnhmIPqG1J8Cx5YU,175
4
+ teslafleetmanagementapi/configuration.py,sha256=675WvUO1TGB7Pcx6bFqN-mK_Xy6QPfred1mb03S3rck,10464
5
+ teslafleetmanagementapi/teslafleetmanagementapi_client.py,sha256=u0gtwvb6hi_aManch1SW745hQ0_bsR57QwwvWk7idDw,5128
6
+ teslafleetmanagementapi/controllers/__init__.py,sha256=mkqIbaivL00VyN-OTregSFpS4z1ZcHsUqRxnVnU4vec,353
7
+ teslafleetmanagementapi/controllers/base_controller.py,sha256=IKmBrJPPNBwc711eZMH9YZbr_l2ZrWEyRcyLc_zlDHU,2126
8
+ teslafleetmanagementapi/controllers/charging_controller.py,sha256=2ctWtywf-qCjduWflK9udnZRSiYQLL2cUrdZPfAGMYU,5380
9
+ teslafleetmanagementapi/controllers/energy_controller.py,sha256=vy6HNtowryBzMS47KGBC_sDyhClgimpe8U4GnFxJLFA,23986
10
+ teslafleetmanagementapi/controllers/o_auth_authorization_controller.py,sha256=SDNgcUAHN11vJfg3qrtzJCN0sNiLMwY4vSzXz7yf68U,6544
11
+ teslafleetmanagementapi/controllers/partner_controller.py,sha256=oo50aN56rOOxQOJrdyEoJw5dJnEe6ifKMEsTSsLwHiM,7110
12
+ teslafleetmanagementapi/controllers/user_controller.py,sha256=JEOL20-aApYXd7j2EaEn6e6gaGxb-ZFEKlr6vd2U67M,6135
13
+ teslafleetmanagementapi/controllers/vehicle_commands_controller.py,sha256=fKAo4uoxEjfzrbskN5xIDXjXpd8efiSiPhTkDhAmwSc,36267
14
+ teslafleetmanagementapi/controllers/vehicles_controller.py,sha256=dxoFtVoOdUfJLpikSTQffStMg6ju5ObGPrwinYkTXgQ,33610
15
+ teslafleetmanagementapi/exceptions/__init__.py,sha256=LjTxubZQwse_ZeMvelEdRHUKQtmdZW68kMSVJZ_O7xw,176
15
16
  teslafleetmanagementapi/exceptions/api_exception.py,sha256=Rc05JwUFjiUadBv5xl37mEcXcFKjBLk37HCBIGshOmE,1102
16
- teslafleetmanagementapi/exceptions/oauth_provider_exception.py,sha256=WRJgm---3kaNcTTWHWUdIb3yaLXYN_JnJtwSb9omvGg,2399
17
+ teslafleetmanagementapi/exceptions/o_auth_provider_exception.py,sha256=zczgkfdqH4FgS2ckftkKEjV3stNkDmrFeNMjETwEiZk,2399
17
18
  teslafleetmanagementapi/http/__init__.py,sha256=0inmS5sUVyFFK7c7ivfex-inFU1efoAoOvqBEEhTLVo,276
18
19
  teslafleetmanagementapi/http/api_response.py,sha256=XXrIYwbUTthNZaPGHJS_y56iL-qPgxtvuWNQwfw_xsI,1985
19
20
  teslafleetmanagementapi/http/http_call_back.py,sha256=9WWjvAiCFKAf1TL3lz0dwySsgtLiZnFctnQ5LFHuf7M,477
@@ -22,20 +23,24 @@ teslafleetmanagementapi/http/http_method_enum.py,sha256=OrxdWAVCuUarb9b6BJ03n3lc
22
23
  teslafleetmanagementapi/http/http_request.py,sha256=3OoJDXjFp0zqXeX7-lCJQZE-a1Tgxz78Cac0gWpI4tQ,1892
23
24
  teslafleetmanagementapi/http/http_response.py,sha256=tWcc-lKAkqiEpcg_OGzhHx-ArUiOk4pRGvgKc23Pza8,1487
24
25
  teslafleetmanagementapi/http/proxy_settings.py,sha256=iOH0xt_BPsbv6AmRuQ0IJd2dYgGfxQwNiZJMj4gOthk,1466
25
- teslafleetmanagementapi/http/auth/__init__.py,sha256=VknVQfXv9tjwq8-puTp8mBF1jHPALWKPmJT6KIDEnqg,156
26
+ teslafleetmanagementapi/http/auth/__init__.py,sha256=T5vIcJzixkdICcatNBhm08rlxGIf6Yo5x4SH5vBuQsc,164
26
27
  teslafleetmanagementapi/http/auth/bearer_auth.py,sha256=ruiUc8_uHrJiGOJVUcnGkSsFOa2dMKEWwnjpQEInOZE,2769
27
- teslafleetmanagementapi/http/auth/oauth_2.py,sha256=PCzKKXbU55wFZ6dRxH1QLyZgtj1fwloTG9WUYi3eyoc,10386
28
+ teslafleetmanagementapi/http/auth/thirdpartytoken.py,sha256=OWpPPCl0VpA-rZ8NuT8dDyET0DG4po4Z08wLn2XxEVc,11729
28
29
  teslafleetmanagementapi/logging/__init__.py,sha256=1T_Geb9czAiw7EJDOWfKErjKAmWTkaWBEZBk54UU5bY,161
29
30
  teslafleetmanagementapi/logging/sdk_logger.py,sha256=JT1bAsa1zlMfc-EOhZI_ugcY8jgiaORqukxYf9_OuPs,685
30
31
  teslafleetmanagementapi/logging/configuration/__init__.py,sha256=HTzMD3CB83jTxGL56Xt5PCqAmFN9GWO6LxcdZ7tN-DA,154
31
32
  teslafleetmanagementapi/logging/configuration/api_logging_configuration.py,sha256=kWmsRvS2GbpNKk9QW1qslW4DPjCbg7DpabR3tQqam_E,15459
32
- teslafleetmanagementapi/models/__init__.py,sha256=goy1acpOwNbiebEHJ97wigYE7ib0RbNv3Xmrc_gbb-0,2509
33
+ teslafleetmanagementapi/models/__init__.py,sha256=M-FI5XVRpOy6WcZ9eduqtQY1hS2QUjzeOTLcYO_zqM8,2781
34
+ teslafleetmanagementapi/models/actuate_trunk_request.py,sha256=B0ihIVFtWu7jSoJr-y3FtvDWCratLVvRk9pzvzJTREk,2950
35
+ teslafleetmanagementapi/models/add_charge_schedule_request.py,sha256=71Q0MiVwFlKZfdPgBCFf5tmscWgBz0yn10XQy2MOiAo,8624
36
+ teslafleetmanagementapi/models/add_precondition_schedule_request.py,sha256=WACbHy1t4GnLzRhu-TGsCbxzRvK1VebeUPAgV-jlGeE,6455
37
+ teslafleetmanagementapi/models/adjust_volume_request.py,sha256=yRNfBSWxeYxxnGtgUkrOj_ghCQESNhkvAY-nW5XW2bA,2846
33
38
  teslafleetmanagementapi/models/api_1_dx_vehicles_options_response.py,sha256=vtWXQRcRBTxxewwE2AB3q6s0g_4Dv7CQ5yHvY4MU0eI,3500
34
39
  teslafleetmanagementapi/models/api_1_dx_warranty_details_response.py,sha256=QYodUxNHLP3Aoyp9b0e8fE-cGRGkI0umnW1Omzc-PjM,3500
35
40
  teslafleetmanagementapi/models/api_1_vehicles_mobile_enabled_response.py,sha256=ZAy-LjyfD8NnbURebB6UMNVFiuunvpcm0CXhI3F74Eg,3375
36
41
  teslafleetmanagementapi/models/api_1_vehicles_nearby_charging_sites_response.py,sha256=qtOzCuCuEtbb63AfckHLL-4AHr1WaosSihIGZYn7y3w,3374
37
42
  teslafleetmanagementapi/models/api_1_vehicles_response.py,sha256=K1cBhmPiaXQafq3QfbmOnea1uJh9e_18AK28RJH-f-s,4965
38
- teslafleetmanagementapi/models/api_1_vehicles_response_get_vehicle.py,sha256=Jt1CrZczh14jl5RLvr6eR_VMwQkPkS1S0oMtGoKZhFs,3356
43
+ teslafleetmanagementapi/models/api_1_vehicles_response_get_vehicle.py,sha256=Irgiku8FPjVqWf4rpCDPMiHdGXZ7OFPaxneShJkqx28,3355
39
44
  teslafleetmanagementapi/models/api_1_vehicles_wake_up_response.py,sha256=VXmuPKXV5IuZxjSVyJnXm3nnfOws--GGaNsrULyMVEw,3344
40
45
  teslafleetmanagementapi/models/backup_request.py,sha256=-YGN0GqPMTsTqruxHxGDnas7HNvOzDDrwqInXXbBwHk,3116
41
46
  teslafleetmanagementapi/models/backup_response.py,sha256=HWHBqKuwwaLvgBiVb29pI6yj3ew2-11azCV715RnGuU,2977
@@ -55,6 +60,8 @@ teslafleetmanagementapi/models/charging_period.py,sha256=w5BAkz8FG60t-JipL8TM1c9
55
60
  teslafleetmanagementapi/models/charging_session.py,sha256=VsiTncoCAP6ZInMxqWug1VAxDBZ7CxwKCTz6Zuikj-E,11319
56
61
  teslafleetmanagementapi/models/charging_sessions_data.py,sha256=pAADuNln6VjSbBLoKDGQUv4XDhysLeLmvS2FjanPL14,5737
57
62
  teslafleetmanagementapi/models/charging_sessions_response.py,sha256=lapakOI6BUeWg3PM1YvZREB7s_w7lyG-EI9LoyNa8AU,3081
63
+ teslafleetmanagementapi/models/command_response.py,sha256=KjBvn_eEXH3zhbfVkz1_NFVqgBqv0spq2hZe2vsKgbw,3316
64
+ teslafleetmanagementapi/models/command_result.py,sha256=yv_xPPD2KiDZ7i90i_UfTaWWDWZXzXUlDKlInUM6Gio,3253
58
65
  teslafleetmanagementapi/models/default_real_mode.py,sha256=E-qhyIPMB_XNMHCd9njtGo8xcG-EKg64FV_ei6dHUDI,1358
59
66
  teslafleetmanagementapi/models/driver.py,sha256=GJiOCmdm3GxLgcxmwpk_Szi-GENqBC5bI30xysNyfRo,9847
60
67
  teslafleetmanagementapi/models/drivers_response.py,sha256=kt94jsWJeVRlQ0K6gp21ioCkfYpvrY7B7cB89Fj3Ajc,4018
@@ -65,15 +72,17 @@ teslafleetmanagementapi/models/fleet_telemetry_error.py,sha256=aXM0BV9e5BG76ZcfH
65
72
  teslafleetmanagementapi/models/fleet_telemetry_errors_response.py,sha256=s07Vgc4hLAM_9lq2ChPTijpsJt04EwQ1uMPwFlSh8oQ,3175
66
73
  teslafleetmanagementapi/models/fleet_telemetry_jws_request.py,sha256=pSW-Cc7MIm4Ixjqi10EU_b6i3Wi0HU6VfEWmDpiZZLU,3760
67
74
  teslafleetmanagementapi/models/generic_update_response.py,sha256=eWY873cCRmOXs3YLDyLyJ2pfNPpoPTrATblEMoWImtI,2998
75
+ teslafleetmanagementapi/models/guest_mode_request.py,sha256=ogteLKzcozhR1UWgUDNLBeYCuxbp0fVGaoVC8aW4sbE,2840
68
76
  teslafleetmanagementapi/models/kind.py,sha256=cogxACF4RnI_suualfNZ6uiPwNuHa-1EYsWCZ8Wrdfg,1294
69
- teslafleetmanagementapi/models/kind_get_wall_connector_charging_history.py,sha256=9mQ8PMem8CbRBvxuSnzXtYrUmElVdrvn5gugSH6aCWk,1293
77
+ teslafleetmanagementapi/models/kind_get_wall_connector_charging_history.py,sha256=g5LO95fjB-anwX2C3XzN6hZTOQzsnwuOQUIPEZ23Pok,1289
70
78
  teslafleetmanagementapi/models/live_status_response.py,sha256=Xk29nmHEo1ovIbkROtVgXQY8GWqW8GgOI4krK_Wc-wk,3094
71
79
  teslafleetmanagementapi/models/location.py,sha256=2LvXA7K3pAfLx24ypq41w5sQq13Tw11qxOZFaaxToR8,3744
72
80
  teslafleetmanagementapi/models/location_1.py,sha256=HZtosA2yx2q0bQWule16BX6jKmevhNzeaCMptpkuG_8,3667
73
81
  teslafleetmanagementapi/models/me_response.py,sha256=tB0B25UXRzQ82qhm6nuJIc61yLT0Oy9GdToi354JJBQ,3017
74
82
  teslafleetmanagementapi/models/mobile_enabled.py,sha256=KnYNrLvfn3hVy1MF9ZGK0COdoftC7_ERLvP0fm0Xy1Y,3788
75
- teslafleetmanagementapi/models/oauth_provider_error.py,sha256=F5ebp4-TD9mcjXM5zxSQXdSrnCG_GpLx8ZgUUj47Fxs,2536
76
- teslafleetmanagementapi/models/oauth_token.py,sha256=2V8ylpLZDu5pmQRCHuqRk_gaZB3rMFmtV0NHd4YL7KY,3610
83
+ teslafleetmanagementapi/models/o_auth_provider_error.py,sha256=5FMCFT9_olDm8hCpuxaI0bJ5ZGH3h8skuAUr7M-tjOk,2536
84
+ teslafleetmanagementapi/models/o_auth_scope_thirdpartytoken.py,sha256=4TaM_QLszQ-KKhtCOlJqYICJhjN-_GXjVj7dgwrhLqA,3042
85
+ teslafleetmanagementapi/models/o_auth_token.py,sha256=ukMdwkVfuxMdZeeCD4kH1GjU_SaSxg6hmgO1EGqPjhE,3610
77
86
  teslafleetmanagementapi/models/off_grid_vehicle_charging_reserve_request.py,sha256=qhT_QjrTZD0zyAgPxaNrhQiZPtoTRYn0_3jeZ8t_7D4,3565
78
87
  teslafleetmanagementapi/models/operation_request.py,sha256=gl2GNqrT_nhtyecg1sjDTq39ZkuCsMnQh7Em1lkuClI,3071
79
88
  teslafleetmanagementapi/models/orders_response.py,sha256=bIjhRwGDSiobTg-YZUwj_jwkDkuXTo9HM0YIS34ZJaQ,3528
@@ -111,9 +120,10 @@ teslafleetmanagementapi/models/tou_settings.py,sha256=IN6Exg4vze10KG7L8TPit_UrM5
111
120
  teslafleetmanagementapi/models/vehicle_base.py,sha256=ez4I2WFDCNJtOw6RHt3YbT5CGetudsXylkVm_GrZ7Nc,8289
112
121
  teslafleetmanagementapi/models/vehicle_option.py,sha256=8oF-gSte7GeMmZRqM-B8_HbVzmvzxWU0nlw3gAPK_m0,5420
113
122
  teslafleetmanagementapi/models/warranty_item.py,sha256=cBa4FwySUhIO9AgxOSfvMYYJUZ0-g6lZvtu4WT2Amfs,9095
123
+ teslafleetmanagementapi/models/which_trunk.py,sha256=FrYSgT9Is0ftYjY55CEYUHn4PiFwwtkjzBT3b7mbKPI,1297
114
124
  teslafleetmanagementapi/utilities/__init__.py,sha256=pq3szt1E0U5M7qGCe9Vdl_jAM7wSgi8mj-UB-Flp6Ow,160
115
125
  teslafleetmanagementapi/utilities/file_wrapper.py,sha256=uyOflQkVT3YGWBy3oKE716gTwCqECcx67ilKbRWDAWQ,1438
116
- tesla_api_sdk-1.0.0.dist-info/METADATA,sha256=3s_0NqAjcnWO7ngiJlb8PI4QykUwnGj-dlPlxzE7A5o,7543
117
- tesla_api_sdk-1.0.0.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
118
- tesla_api_sdk-1.0.0.dist-info/top_level.txt,sha256=7DyijchnTRcw5IUZYf9ehvyCZApnY0d-PLaq6b3Le3g,24
119
- tesla_api_sdk-1.0.0.dist-info/RECORD,,
126
+ tesla_api_sdk-1.0.2.dist-info/METADATA,sha256=pGVThmVwD2oV8Fyh8tM0KqdrER0FCJ-tI68jRDg0RrI,7959
127
+ tesla_api_sdk-1.0.2.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
128
+ tesla_api_sdk-1.0.2.dist-info/top_level.txt,sha256=7DyijchnTRcw5IUZYf9ehvyCZApnY0d-PLaq6b3Le3g,24
129
+ tesla_api_sdk-1.0.2.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.10.1)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -107,16 +107,16 @@ class Configuration(HttpClientConfiguration):
107
107
  return self._bearer_auth_credentials
108
108
 
109
109
  @property
110
- def oauth_2_credentials(self):
111
- """Return current oauth_2_credentials."""
112
- return self._oauth_2_credentials
110
+ def thirdpartytoken_credentials(self):
111
+ """Return current thirdpartytoken_credentials."""
112
+ return self._thirdpartytoken_credentials
113
113
 
114
114
  def __init__(self, http_client_instance=None,
115
115
  override_http_client_configuration=False, http_call_back=None,
116
116
  timeout=60, max_retries=0, backoff_factor=2, retry_statuses=None,
117
117
  retry_methods=None, proxy_settings=None, logging_configuration=None,
118
118
  environment=Environment.PRODUCTION, bearer_auth_credentials=None,
119
- oauth_2_credentials=None):
119
+ thirdpartytoken_credentials=None):
120
120
  """Initialize Configuration object."""
121
121
  if retry_methods is None:
122
122
  retry_methods = ["GET", "PUT"]
@@ -142,7 +142,7 @@ class Configuration(HttpClientConfiguration):
142
142
  self._bearer_auth_credentials = bearer_auth_credentials
143
143
 
144
144
  # The object holding OAuth 2 Authorization Code Grant credentials
145
- self._oauth_2_credentials = oauth_2_credentials
145
+ self._thirdpartytoken_credentials = thirdpartytoken_credentials
146
146
 
147
147
  # The Http Client to use for making requests.
148
148
  self.set_http_client(self.create_http_client())
@@ -152,7 +152,7 @@ class Configuration(HttpClientConfiguration):
152
152
  timeout=None, max_retries=None, backoff_factor=None,
153
153
  retry_statuses=None, retry_methods=None, proxy_settings=None,
154
154
  logging_configuration=None, environment=None,
155
- bearer_auth_credentials=None, oauth_2_credentials=None):
155
+ bearer_auth_credentials=None, thirdpartytoken_credentials=None):
156
156
  """Clone configuration with overrides."""
157
157
  http_client_instance = http_client_instance or self.http_client_instance
158
158
  override_http_client_configuration =\
@@ -170,7 +170,9 @@ class Configuration(HttpClientConfiguration):
170
170
  bearer_auth_credentials =\
171
171
  (bearer_auth_credentials
172
172
  or self.bearer_auth_credentials)
173
- oauth_2_credentials = oauth_2_credentials or self.oauth_2_credentials
173
+ thirdpartytoken_credentials =\
174
+ (thirdpartytoken_credentials
175
+ or self.thirdpartytoken_credentials)
174
176
  return Configuration(
175
177
  http_client_instance=http_client_instance,
176
178
  override_http_client_configuration=override_http_client_configuration,
@@ -179,7 +181,7 @@ class Configuration(HttpClientConfiguration):
179
181
  retry_methods=retry_methods, proxy_settings=proxy_settings,
180
182
  logging_configuration=logging_configuration, environment=environment,
181
183
  bearer_auth_credentials=bearer_auth_credentials,
182
- oauth_2_credentials=oauth_2_credentials,
184
+ thirdpartytoken_credentials=thirdpartytoken_credentials,
183
185
  )
184
186
 
185
187
  def create_http_client(self):
@@ -248,8 +250,8 @@ class Configuration(HttpClientConfiguration):
248
250
  from teslafleetmanagementapi.http.auth.bearer_auth import (
249
251
  BearerAuthCredentials,
250
252
  )
251
- from teslafleetmanagementapi.http.auth.oauth_2 import (
252
- Oauth2Credentials,
253
+ from teslafleetmanagementapi.http.auth.thirdpartytoken import (
254
+ ThirdpartytokenCredentials,
253
255
  )
254
256
 
255
257
  # Preparing default configuration
@@ -264,7 +266,7 @@ class Configuration(HttpClientConfiguration):
264
266
  proxy_settings=ProxySettings.from_environment(),
265
267
  logging_configuration=LoggingConfiguration.from_environment(),
266
268
  bearer_auth_credentials=BearerAuthCredentials.from_environment(),
267
- oauth_2_credentials=Oauth2Credentials.from_environment(),
269
+ thirdpartytoken_credentials=ThirdpartytokenCredentials.from_environment(),
268
270
  )
269
271
 
270
272
  return default_config.clone_with(**overrides)
@@ -4,8 +4,9 @@ __all__ = [
4
4
  "base_controller",
5
5
  "charging_controller",
6
6
  "energy_controller",
7
- "oauth_authorization_controller",
7
+ "o_auth_authorization_controller",
8
8
  "partner_controller",
9
9
  "user_controller",
10
+ "vehicle_commands_controller",
10
11
  "vehicles_controller",
11
12
  ]
@@ -30,7 +30,7 @@ class BaseController(object):
30
30
  @staticmethod
31
31
  def user_agent():
32
32
  """Return UserAgent value."""
33
- return "Python SDK, Version: 1.0.0, on OS {os-info}"
33
+ return "Python SDK, Version: 1.0.2, on OS {os-info}"
34
34
 
35
35
  @staticmethod
36
36
  def user_agent_parameters():
@@ -4,6 +4,9 @@ This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io
4
4
  """
5
5
 
6
6
  # ruff: noqa: D410, E501, E101, D206
7
+ from apimatic_core.authentication.multiple.and_auth_group import (
8
+ And,
9
+ )
7
10
  from apimatic_core.authentication.multiple.single_auth import (
8
11
  Single,
9
12
  )
@@ -61,7 +64,7 @@ class ChargingController(BaseController):
61
64
  .header_param(Parameter()
62
65
  .key("accept")
63
66
  .value("application/json"))
64
- .auth(Single("bearerAuth")),
67
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
65
68
  ).response(
66
69
  ResponseHandler()
67
70
  .deserializer(APIHelper.json_deserialize)
@@ -100,7 +103,7 @@ class ChargingController(BaseController):
100
103
  .header_param(Parameter()
101
104
  .key("accept")
102
105
  .value("application/json"))
103
- .auth(Single("bearerAuth")),
106
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
104
107
  ).response(
105
108
  ResponseHandler()
106
109
  .deserializer(APIHelper.dynamic_deserialize)
@@ -131,7 +134,7 @@ class ChargingController(BaseController):
131
134
  .header_param(Parameter()
132
135
  .key("accept")
133
136
  .value("application/json"))
134
- .auth(Single("bearerAuth")),
137
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
135
138
  ).response(
136
139
  ResponseHandler()
137
140
  .deserializer(APIHelper.json_deserialize)
@@ -4,6 +4,9 @@ This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io
4
4
  """
5
5
 
6
6
  # ruff: noqa: D410, E501, E101, D206
7
+ from apimatic_core.authentication.multiple.and_auth_group import (
8
+ And,
9
+ )
7
10
  from apimatic_core.authentication.multiple.single_auth import (
8
11
  Single,
9
12
  )
@@ -92,7 +95,7 @@ class EnergyController(BaseController):
92
95
  .key("accept")
93
96
  .value("application/json"))
94
97
  .body_serializer(APIHelper.json_serialize)
95
- .auth(Single("bearerAuth")),
98
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
96
99
  ).response(
97
100
  ResponseHandler()
98
101
  .deserializer(APIHelper.json_deserialize)
@@ -160,7 +163,7 @@ class EnergyController(BaseController):
160
163
  .header_param(Parameter()
161
164
  .key("accept")
162
165
  .value("application/json"))
163
- .auth(Single("bearerAuth")),
166
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
164
167
  ).response(
165
168
  ResponseHandler()
166
169
  .deserializer(APIHelper.json_deserialize)
@@ -224,7 +227,7 @@ class EnergyController(BaseController):
224
227
  .header_param(Parameter()
225
228
  .key("accept")
226
229
  .value("application/json"))
227
- .auth(Single("bearerAuth")),
230
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
228
231
  ).response(
229
232
  ResponseHandler()
230
233
  .deserializer(APIHelper.json_deserialize)
@@ -262,7 +265,7 @@ class EnergyController(BaseController):
262
265
  .header_param(Parameter()
263
266
  .key("accept")
264
267
  .value("application/json"))
265
- .auth(Single("bearerAuth")),
268
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
266
269
  ).response(
267
270
  ResponseHandler()
268
271
  .deserializer(APIHelper.json_deserialize)
@@ -309,7 +312,7 @@ class EnergyController(BaseController):
309
312
  .key("accept")
310
313
  .value("application/json"))
311
314
  .body_serializer(APIHelper.json_serialize)
312
- .auth(Single("bearerAuth")),
315
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
313
316
  ).response(
314
317
  ResponseHandler()
315
318
  .deserializer(APIHelper.json_deserialize)
@@ -356,7 +359,7 @@ class EnergyController(BaseController):
356
359
  .key("accept")
357
360
  .value("application/json"))
358
361
  .body_serializer(APIHelper.json_serialize)
359
- .auth(Single("bearerAuth")),
362
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
360
363
  ).response(
361
364
  ResponseHandler()
362
365
  .deserializer(APIHelper.json_deserialize)
@@ -403,7 +406,7 @@ class EnergyController(BaseController):
403
406
  .key("accept")
404
407
  .value("application/json"))
405
408
  .body_serializer(APIHelper.json_serialize)
406
- .auth(Single("bearerAuth")),
409
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
407
410
  ).response(
408
411
  ResponseHandler()
409
412
  .deserializer(APIHelper.json_deserialize)
@@ -450,7 +453,7 @@ class EnergyController(BaseController):
450
453
  .key("accept")
451
454
  .value("application/json"))
452
455
  .body_serializer(APIHelper.json_serialize)
453
- .auth(Single("bearerAuth")),
456
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
454
457
  ).response(
455
458
  ResponseHandler()
456
459
  .deserializer(APIHelper.json_deserialize)
@@ -497,7 +500,7 @@ class EnergyController(BaseController):
497
500
  .key("accept")
498
501
  .value("application/json"))
499
502
  .body_serializer(APIHelper.json_serialize)
500
- .auth(Single("bearerAuth")),
503
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
501
504
  ).response(
502
505
  ResponseHandler()
503
506
  .deserializer(APIHelper.json_deserialize)
@@ -525,7 +528,7 @@ class EnergyController(BaseController):
525
528
  .header_param(Parameter()
526
529
  .key("accept")
527
530
  .value("application/json"))
528
- .auth(Single("bearerAuth")),
531
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
529
532
  ).response(
530
533
  ResponseHandler()
531
534
  .deserializer(APIHelper.json_deserialize)
@@ -563,7 +566,7 @@ class EnergyController(BaseController):
563
566
  .header_param(Parameter()
564
567
  .key("accept")
565
568
  .value("application/json"))
566
- .auth(Single("bearerAuth")),
569
+ .auth(And(Single("bearerAuth"), Single("thirdpartytoken"))),
567
570
  ).response(
568
571
  ResponseHandler()
569
572
  .deserializer(APIHelper.json_deserialize)
@@ -17,29 +17,29 @@ from teslafleetmanagementapi.configuration import (
17
17
  from teslafleetmanagementapi.controllers.base_controller import (
18
18
  BaseController,
19
19
  )
20
- from teslafleetmanagementapi.exceptions.oauth_provider_exception import (
21
- OauthProviderException,
20
+ from teslafleetmanagementapi.exceptions.o_auth_provider_exception import (
21
+ OAuthProviderException,
22
22
  )
23
23
  from teslafleetmanagementapi.http.http_method_enum import (
24
24
  HttpMethodEnum,
25
25
  )
26
- from teslafleetmanagementapi.models.oauth_token import (
27
- OauthToken,
26
+ from teslafleetmanagementapi.models.o_auth_token import (
27
+ OAuthToken,
28
28
  )
29
29
 
30
30
 
31
- class OauthAuthorizationController(BaseController):
31
+ class OAuthAuthorizationController(BaseController):
32
32
  """A Controller to access Endpoints in the teslafleetmanagementapi API."""
33
33
 
34
34
  def __init__(self, config):
35
- """Initialize OauthAuthorizationController object."""
36
- super(OauthAuthorizationController, self).__init__(config)
37
-
38
- def request_token_oauth_2(self,
39
- authorization,
40
- code,
41
- redirect_uri,
42
- _optional_form_parameters=None):
35
+ """Initialize OAuthAuthorizationController object."""
36
+ super(OAuthAuthorizationController, self).__init__(config)
37
+
38
+ def request_token_thirdpartytoken(self,
39
+ authorization,
40
+ code,
41
+ redirect_uri,
42
+ _optional_form_parameters=None):
43
43
  """Perform a POST request to /token.
44
44
 
45
45
  Create a new OAuth 2 token.
@@ -90,21 +90,21 @@ class OauthAuthorizationController(BaseController):
90
90
  ).response(
91
91
  ResponseHandler()
92
92
  .deserializer(APIHelper.json_deserialize)
93
- .deserialize_into(OauthToken.from_dictionary)
93
+ .deserialize_into(OAuthToken.from_dictionary)
94
94
  .is_api_response(True)
95
95
  .local_error("400",
96
96
  "OAuth 2 provider returned an error.",
97
- OauthProviderException)
97
+ OAuthProviderException)
98
98
  .local_error("401",
99
99
  "OAuth 2 provider says client authentication failed.",
100
- OauthProviderException),
100
+ OAuthProviderException),
101
101
  ).execute()
102
102
 
103
- def refresh_token_oauth_2(self,
104
- authorization,
105
- refresh_token,
106
- scope=None,
107
- _optional_form_parameters=None):
103
+ def refresh_token_thirdpartytoken(self,
104
+ authorization,
105
+ refresh_token,
106
+ scope=None,
107
+ _optional_form_parameters=None):
108
108
  """Perform a POST request to /token.
109
109
 
110
110
  Obtain a new access token using a refresh token
@@ -154,12 +154,12 @@ class OauthAuthorizationController(BaseController):
154
154
  ).response(
155
155
  ResponseHandler()
156
156
  .deserializer(APIHelper.json_deserialize)
157
- .deserialize_into(OauthToken.from_dictionary)
157
+ .deserialize_into(OAuthToken.from_dictionary)
158
158
  .is_api_response(True)
159
159
  .local_error("400",
160
160
  "OAuth 2 provider returned an error.",
161
- OauthProviderException)
161
+ OAuthProviderException)
162
162
  .local_error("401",
163
163
  "OAuth 2 provider says client authentication failed.",
164
- OauthProviderException),
164
+ OAuthProviderException),
165
165
  ).execute()