Skip to content

Commit 8c60fca

Browse files
8.9.0
2 parents 74756fd + 9786889 commit 8c60fca

File tree

58 files changed

+934
-201
lines changed

Some content is hidden

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

58 files changed

+934
-201
lines changed

.openapi-generator/FILES

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ plaid/model/bank_transfer_network.py
9898
plaid/model/bank_transfer_receiver_details.py
9999
plaid/model/bank_transfer_status.py
100100
plaid/model/bank_transfer_sweep.py
101-
plaid/model/bank_transfer_sweep_account.py
102101
plaid/model/bank_transfer_sweep_get_request.py
103102
plaid/model/bank_transfer_sweep_get_response.py
104103
plaid/model/bank_transfer_sweep_list_request.py
@@ -186,6 +185,7 @@ plaid/model/income_verification_paystubs_get_response.py
186185
plaid/model/income_verification_precheck_confidence.py
187186
plaid/model/income_verification_precheck_employer.py
188187
plaid/model/income_verification_precheck_employer_address.py
188+
plaid/model/income_verification_precheck_employer_address_data.py
189189
plaid/model/income_verification_precheck_military_info.py
190190
plaid/model/income_verification_precheck_request.py
191191
plaid/model/income_verification_precheck_response.py
@@ -329,6 +329,7 @@ plaid/model/payment_initiation_refund.py
329329
plaid/model/payment_initiation_standing_order_metadata.py
330330
plaid/model/payment_meta.py
331331
plaid/model/payment_schedule_interval.py
332+
plaid/model/payment_scheme.py
332333
plaid/model/payment_status_update_webhook.py
333334
plaid/model/paystub.py
334335
plaid/model/paystub_address.py
@@ -346,6 +347,7 @@ plaid/model/paystub_ytd_details.py
346347
plaid/model/pending_expiration_webhook.py
347348
plaid/model/personal_finance_category.py
348349
plaid/model/phone_number.py
350+
plaid/model/plaid_error.py
349351
plaid/model/platform_ids.py
350352
plaid/model/processor_apex_processor_token_create_request.py
351353
plaid/model/processor_auth_get_request.py
@@ -418,6 +420,7 @@ plaid/model/signal_return_report_response.py
418420
plaid/model/signal_score.py
419421
plaid/model/signal_scores.py
420422
plaid/model/signal_user.py
423+
plaid/model/simulated_transfer_sweep.py
421424
plaid/model/standalone_account_type.py
422425
plaid/model/standalone_currency_code_list.py
423426
plaid/model/standalone_investment_transaction_type.py

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
See full changelog for the OpenAPI Schema (OAS) [here](https://github.com/plaid/plaid-openapi/blob/master/CHANGELOG.md).
22

3+
## 8.9.0
4+
- Updating to OAS 2020-09-14_1.61.0
5+
36
## 8.8.0
47
- Updating to OAS 2020-09-14_1.58.1
58

README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,39 @@ except plaid.ApiException as e:
9393

9494
For more information on Plaid response codes, head to the [docs][3].
9595

96+
## Data type differences from API and from previous versions
97+
98+
### Converting the response to a JSON
99+
100+
As this is a common question, we've included this in the README. `plaid-python` uses models like `TransactionsGetResponse` to encapsulate API responses. If you want to convert this to a JSON, do something like this:
101+
102+
```python
103+
import json
104+
...
105+
response = ... # type TransactionsGetResponse
106+
# to_dict makes it first a python dictionary, and then we turn it into a string JSON.
107+
json_string = json.dumps(response.to_dict())
108+
```
109+
110+
### Dates
111+
112+
Dates and date times in requests and responses, which are represented as strings in the API and in previous client library versions, are represented in this version of the library as Python `datetime.date` or `datetime.datetime` objects. If you need to convert between dates and strings, you can use the `datetime.strptime` method. For an example, see the Retrieve Transactions sample code later in this Readme.
113+
114+
### Enums
115+
While the API and previous library versions represent enums using strings, this current library uses Python classes with restricted values.
116+
117+
Old:
118+
```
119+
'products': ['auth', 'transactions'],
120+
'country_codes': ['US'],
121+
```
122+
123+
Current:
124+
```
125+
products=[Products('auth'), Products('transactions')],
126+
country_codes=[CountryCode('US')],
127+
```
128+
96129
## Examples
97130

98131
### Create an Item using Link
@@ -186,16 +219,6 @@ FILE.write(pdf.read())
186219
FILE.close()
187220
```
188221

189-
### Retrieve Other Data
190-
Most other item data can be retrieved by following this pattern:
191-
```python
192-
import plaid
193-
from plaid.model.auth_get_request import AuthGetRequest
194-
195-
response = client.Auth.get(access_token)
196-
numbers = response['numbers']
197-
```
198-
199222
### Authentication
200223

201224
Public endpoints (category information) require no authentication and can be
@@ -207,6 +230,7 @@ categories = client.categories_get({})
207230

208231
Authenticated endpoints require a `(client_id, secret)` pair. You do not need to pass in authentication to individual endpoints once you have set it on the `plaid.Configuration` object.
209232

233+
210234
## Contributing
211235

212236
Please see [Contributing](CONTRIBUTING.md) for guidelines and instructions for local development.

plaid/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"""
99

1010

11-
__version__ = "8.8.0"
11+
__version__ = "8.9.0"
1212

1313
# import ApiClient
1414
from plaid.api_client import ApiClient

plaid/api/plaid_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def __accounts_get(
364364
):
365365
"""Retrieve accounts # noqa: E501
366366

367-
The `/accounts/get` endpoint can be used to retrieve information for any linked Item. Note that some information is nullable. Plaid will only return active bank accounts, i.e. accounts that are not closed and are capable of carrying a balance. This endpoint retrieves cached information, rather than extracting fresh information from the institution. As a result, balances returned may not be up-to-date; for realtime balance information, use `/accounts/balance/get` instead. # noqa: E501
367+
The `/accounts/get` endpoint can be used to retrieve a list of accounts associated with any linked Item. Plaid will only return active bank accounts — that is, accounts that are not closed and are capable of carrying a balance. This endpoint only returns accounts that were permissioned by the user when they initially created the Item. If a user creates a new account after the initial link, you can capture this event through the [`NEW_ACCOUNTS_AVAILABLE`](https://plaid.com/docs/api/webhooks/#item-new_accounts_available) webhook and then use Link's [update mode](https://plaid.com/docs/link/update-mode/) to request that the user share this new account with you. This endpoint retrieves cached information, rather than extracting fresh information from the institution. As a result, balances returned may not be up-to-date; for realtime balance information, use `/accounts/balance/get` instead. Note that some information is nullable. # noqa: E501
368368
This method makes a synchronous HTTP request by default. To make an
369369
asynchronous HTTP request, please pass async_req=True
370370

@@ -10116,9 +10116,9 @@ def __sandbox_transfer_sweep_simulate(
1011610116
sandbox_transfer_sweep_simulate_request,
1011710117
**kwargs
1011810118
):
10119-
"""Simulate creating a sweep for a set of transfers # noqa: E501
10119+
"""Simulate creating a sweep # noqa: E501
1012010120

10121-
Use the `/sandbox/transfer/sweep/simulate` endpoint to create a sweep and associated events in the Sandbox environment. # noqa: E501
10121+
Use the `/sandbox/transfer/sweep/simulate` endpoint to create a sweep and associated events in the Sandbox environment. - All `posted` or `pending` Transfers with sweep_status `unswept` will become `swept` - All `reversed` Transfers with sweep_status `swept` will become `reverse_swept` # noqa: E501
1012210122
This method makes a synchronous HTTP request by default. To make an
1012310123
asynchronous HTTP request, please pass async_req=True
1012410124

plaid/api_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7474
self.default_headers[header_name] = header_value
7575
self.cookie = cookie
7676
# Set default User-Agent.
77-
self.user_agent = 'Plaid Python v8.8.0'
77+
self.user_agent = 'Plaid Python v8.9.0'
7878

7979
def __enter__(self):
8080
return self

plaid/configuration.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -427,8 +427,8 @@ def to_debug_report(self):
427427
return "Python SDK Debug Report:\n"\
428428
"OS: {env}\n"\
429429
"Python Version: {pyversion}\n"\
430-
"Version of the API: 2020-09-14_1.58.1\n"\
431-
"SDK Package Version: 8.8.0".\
430+
"Version of the API: 2020-09-14_1.61.0\n"\
431+
"SDK Package Version: 8.9.0".\
432432
format(env=sys.platform, pyversion=sys.version)
433433

434434
def get_host_settings(self):

plaid/model/asset_report.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def openapi_types():
8585
lazy_import()
8686
return {
8787
'asset_report_id': (str,), # noqa: E501
88-
'client_report_id': (str,), # noqa: E501
88+
'client_report_id': (str, none_type,), # noqa: E501
8989
'date_generated': (datetime,), # noqa: E501
9090
'days_requested': (float,), # noqa: E501
9191
'user': (AssetReportUser,), # noqa: E501
@@ -123,7 +123,7 @@ def __init__(self, asset_report_id, client_report_id, date_generated, days_reque
123123
124124
Args:
125125
asset_report_id (str): A unique ID identifying an Asset Report. Like all Plaid identifiers, this ID is case sensitive.
126-
client_report_id (str): An identifier you determine and submit for the Asset Report.
126+
client_report_id (str, none_type): An identifier you determine and submit for the Asset Report.
127127
date_generated (datetime): The date and time when the Asset Report was created, in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format (e.g. \"2018-04-12T03:32:11Z\").
128128
days_requested (float): The duration of transaction history you requested
129129
user (AssetReportUser):

plaid/model/assets_error_webhook.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
)
2626

2727
def lazy_import():
28-
from plaid.model.error import Error
29-
globals()['Error'] = Error
28+
from plaid.model.plaid_error import PlaidError
29+
globals()['PlaidError'] = PlaidError
3030

3131

3232
class AssetsErrorWebhook(ModelNormal):
@@ -84,7 +84,7 @@ def openapi_types():
8484
return {
8585
'webhook_type': (str,), # noqa: E501
8686
'webhook_code': (str,), # noqa: E501
87-
'error': (Error,), # noqa: E501
87+
'error': (PlaidError,), # noqa: E501
8888
'asset_report_id': (str,), # noqa: E501
8989
}
9090

@@ -118,7 +118,7 @@ def __init__(self, webhook_type, webhook_code, error, asset_report_id, *args, **
118118
Args:
119119
webhook_type (str): `ASSETS`
120120
webhook_code (str): `ERROR`
121-
error (Error):
121+
error (PlaidError):
122122
asset_report_id (str): The ID associated with the Asset Report.
123123
124124
Keyword Args:

plaid/model/bank_transfer_create_request.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def __init__(self, idempotency_key, access_token, account_id, type, network, amo
193193
ach_class (ACHClass): [optional] # noqa: E501
194194
custom_tag (str, none_type): An arbitrary string provided by the client for storage with the bank transfer. May be up to 100 characters.. [optional] # noqa: E501
195195
metadata (BankTransferMetadata): [optional] # noqa: E501
196-
origination_account_id (str, none_type): Plaid’s unique identifier for the origination account for this transfer. If you have more than one origination account, this value must be specified.. [optional] # noqa: E501
196+
origination_account_id (str, none_type): Plaid’s unique identifier for the origination account for this transfer. If you have more than one origination account, this value must be specified. Otherwise, this field should be left blank.. [optional] # noqa: E501
197197
"""
198198

199199
_check_type = kwargs.pop('_check_type', True)

plaid/model/bank_transfer_sweep.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@
2424
validate_get_composed_info,
2525
)
2626

27-
def lazy_import():
28-
from plaid.model.bank_transfer_sweep_account import BankTransferSweepAccount
29-
globals()['BankTransferSweepAccount'] = BankTransferSweepAccount
30-
3127

3228
class BankTransferSweep(ModelNormal):
3329
"""NOTE: This class is auto generated by OpenAPI Generator.
@@ -65,7 +61,6 @@ def additional_properties_type():
6561
This must be a method because a model may have properties that are
6662
of type self, this must run after the class is loaded
6763
"""
68-
lazy_import()
6964
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
7065

7166
_nullable = False
@@ -80,14 +75,11 @@ def openapi_types():
8075
openapi_types (dict): The key is attribute name
8176
and the value is attribute type.
8277
"""
83-
lazy_import()
8478
return {
8579
'id': (str,), # noqa: E501
86-
'transfer_id': (str, none_type,), # noqa: E501
8780
'created_at': (datetime,), # noqa: E501
8881
'amount': (str,), # noqa: E501
8982
'iso_currency_code': (str,), # noqa: E501
90-
'sweep_account': (BankTransferSweepAccount,), # noqa: E501
9183
}
9284

9385
@cached_property
@@ -97,11 +89,9 @@ def discriminator():
9789

9890
attribute_map = {
9991
'id': 'id', # noqa: E501
100-
'transfer_id': 'transfer_id', # noqa: E501
10192
'created_at': 'created_at', # noqa: E501
10293
'amount': 'amount', # noqa: E501
10394
'iso_currency_code': 'iso_currency_code', # noqa: E501
104-
'sweep_account': 'sweep_account', # noqa: E501
10595
}
10696

10797
_composed_schemas = {}
@@ -116,16 +106,14 @@ def discriminator():
116106
])
117107

118108
@convert_js_args_to_python_args
119-
def __init__(self, id, transfer_id, created_at, amount, iso_currency_code, sweep_account, *args, **kwargs): # noqa: E501
109+
def __init__(self, id, created_at, amount, iso_currency_code, *args, **kwargs): # noqa: E501
120110
"""BankTransferSweep - a model defined in OpenAPI
121111
122112
Args:
123113
id (str): Identifier of the sweep.
124-
transfer_id (str, none_type): Identifier of the sweep transfer.
125114
created_at (datetime): The datetime when the sweep occurred, in RFC 3339 format.
126115
amount (str): The amount of the sweep.
127116
iso_currency_code (str): The currency of the sweep, e.g. \"USD\".
128-
sweep_account (BankTransferSweepAccount):
129117
130118
Keyword Args:
131119
_check_type (bool): if True, values for parameters in openapi_types
@@ -184,11 +172,9 @@ def __init__(self, id, transfer_id, created_at, amount, iso_currency_code, sweep
184172
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
185173

186174
self.id = id
187-
self.transfer_id = transfer_id
188175
self.created_at = created_at
189176
self.amount = amount
190177
self.iso_currency_code = iso_currency_code
191-
self.sweep_account = sweep_account
192178
for var_name, var_value in kwargs.items():
193179
if var_name not in self.attribute_map and \
194180
self._configuration is not None and \

plaid/model/bank_transfer_sweep_get_request.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ def openapi_types():
7373
'sweep_id': (str,), # noqa: E501
7474
'client_id': (str,), # noqa: E501
7575
'secret': (str,), # noqa: E501
76-
'origination_account_id': (str, none_type,), # noqa: E501
7776
}
7877

7978
@cached_property
@@ -85,7 +84,6 @@ def discriminator():
8584
'sweep_id': 'sweep_id', # noqa: E501
8685
'client_id': 'client_id', # noqa: E501
8786
'secret': 'secret', # noqa: E501
88-
'origination_account_id': 'origination_account_id', # noqa: E501
8987
}
9088

9189
_composed_schemas = {}
@@ -139,7 +137,6 @@ def __init__(self, sweep_id, *args, **kwargs): # noqa: E501
139137
_visited_composed_classes = (Animal,)
140138
client_id (str): Your Plaid API `client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.. [optional] # noqa: E501
141139
secret (str): Your Plaid API `secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.. [optional] # noqa: E501
142-
origination_account_id (str, none_type): If multiple origination accounts are available, `origination_account_id` must be used to specify the account that the sweep belongs to.. [optional] # noqa: E501
143140
"""
144141

145142
_check_type = kwargs.pop('_check_type', True)

plaid/model/cause.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
)
2626

2727
def lazy_import():
28-
from plaid.model.error import Error
29-
globals()['Error'] = Error
28+
from plaid.model.plaid_error import PlaidError
29+
globals()['PlaidError'] = PlaidError
3030

3131

3232
class Cause(ModelNormal):
@@ -83,7 +83,7 @@ def openapi_types():
8383
lazy_import()
8484
return {
8585
'item_id': (str,), # noqa: E501
86-
'error': (Error,), # noqa: E501
86+
'error': (PlaidError,), # noqa: E501
8787
}
8888

8989
@cached_property
@@ -113,7 +113,7 @@ def __init__(self, item_id, error, *args, **kwargs): # noqa: E501
113113
114114
Args:
115115
item_id (str): The `item_id` of the Item associated with this webhook, warning, or error
116-
error (Error):
116+
error (PlaidError):
117117
118118
Keyword Args:
119119
_check_type (bool): if True, values for parameters in openapi_types

plaid/model/credit_card_liability.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def openapi_types():
8686
'aprs': ([APR],), # noqa: E501
8787
'is_overdue': (bool, none_type,), # noqa: E501
8888
'last_payment_amount': (float,), # noqa: E501
89-
'last_payment_date': (date,), # noqa: E501
89+
'last_payment_date': (date, none_type,), # noqa: E501
9090
'last_statement_issue_date': (date,), # noqa: E501
9191
'last_statement_balance': (float,), # noqa: E501
9292
'minimum_payment_amount': (float,), # noqa: E501
@@ -130,7 +130,7 @@ def __init__(self, account_id, aprs, is_overdue, last_payment_amount, last_payme
130130
aprs ([APR]): The various interest rates that apply to the account.
131131
is_overdue (bool, none_type): true if a payment is currently overdue. Availability for this field is limited.
132132
last_payment_amount (float): The amount of the last payment.
133-
last_payment_date (date): The date of the last payment. Dates are returned in an [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD). Availability for this field is limited.
133+
last_payment_date (date, none_type): The date of the last payment. Dates are returned in an [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD). Availability for this field is limited.
134134
last_statement_issue_date (date): The date of the last statement. Dates are returned in an [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format (YYYY-MM-DD).
135135
last_statement_balance (float): The total amount owed as of the last statement issued
136136
minimum_payment_amount (float): The minimum payment due for the next billing cycle.

plaid/model/default_update_webhook.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
)
2626

2727
def lazy_import():
28-
from plaid.model.error import Error
29-
globals()['Error'] = Error
28+
from plaid.model.plaid_error import PlaidError
29+
globals()['PlaidError'] = PlaidError
3030

3131

3232
class DefaultUpdateWebhook(ModelNormal):
@@ -86,7 +86,7 @@ def openapi_types():
8686
'webhook_code': (str,), # noqa: E501
8787
'new_transactions': (float,), # noqa: E501
8888
'item_id': (str,), # noqa: E501
89-
'error': (Error,), # noqa: E501
89+
'error': (PlaidError,), # noqa: E501
9090
}
9191

9292
@cached_property
@@ -154,7 +154,7 @@ def __init__(self, webhook_type, webhook_code, new_transactions, item_id, *args,
154154
Animal class but this time we won't travel
155155
through its discriminator because we passed in
156156
_visited_composed_classes = (Animal,)
157-
error (Error): [optional] # noqa: E501
157+
error (PlaidError): [optional] # noqa: E501
158158
"""
159159

160160
_check_type = kwargs.pop('_check_type', True)

0 commit comments

Comments
 (0)