|
3 | 3 | """ |
4 | 4 | DocuSign REST API |
5 | 5 |
|
6 | | - The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. |
| 6 | + The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 |
7 | 7 |
|
8 | 8 | OpenAPI spec version: v2.1 |
9 | 9 | |
@@ -244,6 +244,107 @@ def get_credit_card_info_with_http_info(self, account_id, **kwargs): |
244 | 244 | _request_timeout=params.get('_request_timeout'), |
245 | 245 | collection_formats=collection_formats) |
246 | 246 |
|
| 247 | + def get_downgrade_request_billing_info(self, account_id, **kwargs): |
| 248 | + """ |
| 249 | + Returns downgrade plan information for the specified account. |
| 250 | + This method makes a synchronous HTTP request by default. To make an |
| 251 | + asynchronous HTTP request, please define a `callback` function |
| 252 | + to be invoked when receiving the response. |
| 253 | + >>> def callback_function(response): |
| 254 | + >>> pprint(response) |
| 255 | + >>> |
| 256 | + >>> thread = api.get_downgrade_request_billing_info(account_id, callback=callback_function) |
| 257 | +
|
| 258 | + :param callback function: The callback function |
| 259 | + for asynchronous request. (optional) |
| 260 | + :param str account_id: The external account number (int) or account ID Guid. (required) |
| 261 | + :return: DowngradRequestBillingInfoResponse |
| 262 | + If the method is called asynchronously, |
| 263 | + returns the request thread. |
| 264 | + """ |
| 265 | + kwargs['_return_http_data_only'] = True |
| 266 | + if kwargs.get('callback'): |
| 267 | + return self.get_downgrade_request_billing_info_with_http_info(account_id, **kwargs) |
| 268 | + else: |
| 269 | + (data) = self.get_downgrade_request_billing_info_with_http_info(account_id, **kwargs) |
| 270 | + return data |
| 271 | + |
| 272 | + def get_downgrade_request_billing_info_with_http_info(self, account_id, **kwargs): |
| 273 | + """ |
| 274 | + Returns downgrade plan information for the specified account. |
| 275 | + This method makes a synchronous HTTP request by default. To make an |
| 276 | + asynchronous HTTP request, please define a `callback` function |
| 277 | + to be invoked when receiving the response. |
| 278 | + >>> def callback_function(response): |
| 279 | + >>> pprint(response) |
| 280 | + >>> |
| 281 | + >>> thread = api.get_downgrade_request_billing_info_with_http_info(account_id, callback=callback_function) |
| 282 | +
|
| 283 | + :param callback function: The callback function |
| 284 | + for asynchronous request. (optional) |
| 285 | + :param str account_id: The external account number (int) or account ID Guid. (required) |
| 286 | + :return: DowngradRequestBillingInfoResponse |
| 287 | + If the method is called asynchronously, |
| 288 | + returns the request thread. |
| 289 | + """ |
| 290 | + |
| 291 | + all_params = ['account_id'] |
| 292 | + all_params.append('callback') |
| 293 | + all_params.append('_return_http_data_only') |
| 294 | + all_params.append('_preload_content') |
| 295 | + all_params.append('_request_timeout') |
| 296 | + |
| 297 | + params = locals() |
| 298 | + for key, val in iteritems(params['kwargs']): |
| 299 | + if key not in all_params: |
| 300 | + raise TypeError( |
| 301 | + "Got an unexpected keyword argument '%s'" |
| 302 | + " to method get_downgrade_request_billing_info" % key |
| 303 | + ) |
| 304 | + params[key] = val |
| 305 | + del params['kwargs'] |
| 306 | + # verify the required parameter 'account_id' is set |
| 307 | + if ('account_id' not in params) or (params['account_id'] is None): |
| 308 | + raise ValueError("Missing the required parameter `account_id` when calling `get_downgrade_request_billing_info`") |
| 309 | + |
| 310 | + |
| 311 | + collection_formats = {} |
| 312 | + |
| 313 | + resource_path = '/v2.1/accounts/{accountId}/billing_plan/downgrade'.replace('{format}', 'json') |
| 314 | + path_params = {} |
| 315 | + if 'account_id' in params: |
| 316 | + path_params['accountId'] = params['account_id'] |
| 317 | + |
| 318 | + query_params = {} |
| 319 | + |
| 320 | + header_params = {} |
| 321 | + |
| 322 | + form_params = [] |
| 323 | + local_var_files = {} |
| 324 | + |
| 325 | + body_params = None |
| 326 | + # HTTP header `Accept` |
| 327 | + header_params['Accept'] = self.api_client.\ |
| 328 | + select_header_accept(['application/json']) |
| 329 | + |
| 330 | + # Authentication setting |
| 331 | + auth_settings = [] |
| 332 | + |
| 333 | + return self.api_client.call_api(resource_path, 'GET', |
| 334 | + path_params, |
| 335 | + query_params, |
| 336 | + header_params, |
| 337 | + body=body_params, |
| 338 | + post_params=form_params, |
| 339 | + files=local_var_files, |
| 340 | + response_type='DowngradRequestBillingInfoResponse', |
| 341 | + auth_settings=auth_settings, |
| 342 | + callback=params.get('callback'), |
| 343 | + _return_http_data_only=params.get('_return_http_data_only'), |
| 344 | + _preload_content=params.get('_preload_content', True), |
| 345 | + _request_timeout=params.get('_request_timeout'), |
| 346 | + collection_formats=collection_formats) |
| 347 | + |
247 | 348 | def get_invoice(self, account_id, invoice_id, **kwargs): |
248 | 349 | """ |
249 | 350 | Retrieves a billing invoice. |
|
0 commit comments