Skip to content

Commit ce6480f

Browse files
feat(api)!: updates book transfer status, updates to transactions, add currency model (#564)
- Breaking: Removed book transfer status `PENDING`. While technically a breaking change, that was a mistake and should not impact user code, the API never accepted `PENDING` as a status for book transfer. - Add book transfer status `REVERSED` - Add `updated` and `amounts` fields to transactions - Add shared model `Currency` # Migration The SDK previously stated that `PENDING` was an accepted value for book transfer status. That was a mistake, `PENDING` has never been accepted by the API for book transfers. While this is a breaking change we do not expect user code to be impacted.
1 parent 8386e81 commit ce6480f

18 files changed

+630
-293
lines changed

api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Shared Types
22

33
```python
4-
from lithic.types import Address, Carrier, Document, ShippingAddress
4+
from lithic.types import Address, Carrier, Currency, Document, ShippingAddress
55
```
66

77
# Lithic

src/lithic/resources/events/events.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ def list(
9999
"account_holder.created",
100100
"account_holder.updated",
101101
"account_holder.verification",
102+
"auth_rules.performance_report.created",
102103
"balance.updated",
103104
"book_transfer_transaction.created",
104105
"card.created",
@@ -116,6 +117,7 @@ def list(
116117
"external_bank_account.created",
117118
"external_bank_account.updated",
118119
"financial_account.created",
120+
"financial_account.updated",
119121
"payment_transaction.created",
120122
"payment_transaction.updated",
121123
"settlement_report.updated",
@@ -348,6 +350,7 @@ def list(
348350
"account_holder.created",
349351
"account_holder.updated",
350352
"account_holder.verification",
353+
"auth_rules.performance_report.created",
351354
"balance.updated",
352355
"book_transfer_transaction.created",
353356
"card.created",
@@ -365,6 +368,7 @@ def list(
365368
"external_bank_account.created",
366369
"external_bank_account.updated",
367370
"financial_account.created",
371+
"financial_account.updated",
368372
"payment_transaction.created",
369373
"payment_transaction.updated",
370374
"settlement_report.updated",

src/lithic/resources/events/subscriptions.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ def create(
6666
"account_holder.created",
6767
"account_holder.updated",
6868
"account_holder.verification",
69+
"auth_rules.performance_report.created",
6970
"balance.updated",
7071
"book_transfer_transaction.created",
7172
"card.created",
@@ -83,6 +84,7 @@ def create(
8384
"external_bank_account.created",
8485
"external_bank_account.updated",
8586
"financial_account.created",
87+
"financial_account.updated",
8688
"payment_transaction.created",
8789
"payment_transaction.updated",
8890
"settlement_report.updated",
@@ -189,6 +191,7 @@ def update(
189191
"account_holder.created",
190192
"account_holder.updated",
191193
"account_holder.verification",
194+
"auth_rules.performance_report.created",
192195
"balance.updated",
193196
"book_transfer_transaction.created",
194197
"card.created",
@@ -206,6 +209,7 @@ def update(
206209
"external_bank_account.created",
207210
"external_bank_account.updated",
208211
"financial_account.created",
212+
"financial_account.updated",
209213
"payment_transaction.created",
210214
"payment_transaction.updated",
211215
"settlement_report.updated",
@@ -618,6 +622,7 @@ def send_simulated_example(
618622
"account_holder.created",
619623
"account_holder.updated",
620624
"account_holder.verification",
625+
"auth_rules.performance_report.created",
621626
"balance.updated",
622627
"book_transfer_transaction.created",
623628
"card.created",
@@ -635,6 +640,7 @@ def send_simulated_example(
635640
"external_bank_account.created",
636641
"external_bank_account.updated",
637642
"financial_account.created",
643+
"financial_account.updated",
638644
"payment_transaction.created",
639645
"payment_transaction.updated",
640646
"settlement_report.updated",
@@ -717,6 +723,7 @@ async def create(
717723
"account_holder.created",
718724
"account_holder.updated",
719725
"account_holder.verification",
726+
"auth_rules.performance_report.created",
720727
"balance.updated",
721728
"book_transfer_transaction.created",
722729
"card.created",
@@ -734,6 +741,7 @@ async def create(
734741
"external_bank_account.created",
735742
"external_bank_account.updated",
736743
"financial_account.created",
744+
"financial_account.updated",
737745
"payment_transaction.created",
738746
"payment_transaction.updated",
739747
"settlement_report.updated",
@@ -840,6 +848,7 @@ async def update(
840848
"account_holder.created",
841849
"account_holder.updated",
842850
"account_holder.verification",
851+
"auth_rules.performance_report.created",
843852
"balance.updated",
844853
"book_transfer_transaction.created",
845854
"card.created",
@@ -857,6 +866,7 @@ async def update(
857866
"external_bank_account.created",
858867
"external_bank_account.updated",
859868
"financial_account.created",
869+
"financial_account.updated",
860870
"payment_transaction.created",
861871
"payment_transaction.updated",
862872
"settlement_report.updated",
@@ -1269,6 +1279,7 @@ async def send_simulated_example(
12691279
"account_holder.created",
12701280
"account_holder.updated",
12711281
"account_holder.verification",
1282+
"auth_rules.performance_report.created",
12721283
"balance.updated",
12731284
"book_transfer_transaction.created",
12741285
"card.created",
@@ -1286,6 +1297,7 @@ async def send_simulated_example(
12861297
"external_bank_account.created",
12871298
"external_bank_account.updated",
12881299
"financial_account.created",
1300+
"financial_account.updated",
12891301
"payment_transaction.created",
12901302
"payment_transaction.updated",
12911303
"settlement_report.updated",

src/lithic/types/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44

55
from .card import Card as Card
66
from .event import Event as Event
7-
from .shared import Address as Address, Carrier as Carrier, Document as Document, ShippingAddress as ShippingAddress
7+
from .shared import (
8+
Address as Address,
9+
Carrier as Carrier,
10+
Currency as Currency,
11+
Document as Document,
12+
ShippingAddress as ShippingAddress,
13+
)
814
from .account import Account as Account
915
from .balance import Balance as Balance
1016
from .dispute import Dispute as Dispute

src/lithic/types/book_transfer_response.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@ class BookTransferResponse(BaseModel):
8585
(e.g., cents).
8686
"""
8787

88-
status: Literal["DECLINED", "PENDING", "SETTLED"]
88+
status: Literal["DECLINED", "REVERSED", "SETTLED"]
8989
"""Status types: \\** `DECLINED` - The transfer was declined.
9090
91-
- `PENDING` - The transfer is pending release from a hold. \\** `SETTLED` - The
92-
transfer is completed.
91+
- `REVERSED` - The transfer was reversed \\** `SETTLED` - The transfer is
92+
completed.
9393
"""
9494

9595
to_financial_account_token: object

src/lithic/types/event.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class Event(BaseModel):
2323
"account_holder.created",
2424
"account_holder.updated",
2525
"account_holder.verification",
26+
"auth_rules.performance_report.created",
2627
"balance.updated",
2728
"book_transfer_transaction.created",
2829
"card.created",
@@ -40,6 +41,7 @@ class Event(BaseModel):
4041
"external_bank_account.created",
4142
"external_bank_account.updated",
4243
"financial_account.created",
44+
"financial_account.updated",
4345
"payment_transaction.created",
4446
"payment_transaction.updated",
4547
"settlement_report.updated",

src/lithic/types/event_list_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class EventListParams(TypedDict, total=False):
3535
"account_holder.created",
3636
"account_holder.updated",
3737
"account_holder.verification",
38+
"auth_rules.performance_report.created",
3839
"balance.updated",
3940
"book_transfer_transaction.created",
4041
"card.created",
@@ -52,6 +53,7 @@ class EventListParams(TypedDict, total=False):
5253
"external_bank_account.created",
5354
"external_bank_account.updated",
5455
"financial_account.created",
56+
"financial_account.updated",
5557
"payment_transaction.created",
5658
"payment_transaction.updated",
5759
"settlement_report.updated",

src/lithic/types/event_subscription.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class EventSubscription(BaseModel):
2626
"account_holder.created",
2727
"account_holder.updated",
2828
"account_holder.verification",
29+
"auth_rules.performance_report.created",
2930
"balance.updated",
3031
"book_transfer_transaction.created",
3132
"card.created",
@@ -43,6 +44,7 @@ class EventSubscription(BaseModel):
4344
"external_bank_account.created",
4445
"external_bank_account.updated",
4546
"financial_account.created",
47+
"financial_account.updated",
4648
"payment_transaction.created",
4749
"payment_transaction.updated",
4850
"settlement_report.updated",

src/lithic/types/events/subscription_create_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class SubscriptionCreateParams(TypedDict, total=False):
2323
"account_holder.created",
2424
"account_holder.updated",
2525
"account_holder.verification",
26+
"auth_rules.performance_report.created",
2627
"balance.updated",
2728
"book_transfer_transaction.created",
2829
"card.created",
@@ -40,6 +41,7 @@ class SubscriptionCreateParams(TypedDict, total=False):
4041
"external_bank_account.created",
4142
"external_bank_account.updated",
4243
"financial_account.created",
44+
"financial_account.updated",
4345
"payment_transaction.created",
4446
"payment_transaction.updated",
4547
"settlement_report.updated",

src/lithic/types/events/subscription_send_simulated_example_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ class SubscriptionSendSimulatedExampleParams(TypedDict, total=False):
1212
"account_holder.created",
1313
"account_holder.updated",
1414
"account_holder.verification",
15+
"auth_rules.performance_report.created",
1516
"balance.updated",
1617
"book_transfer_transaction.created",
1718
"card.created",
@@ -29,6 +30,7 @@ class SubscriptionSendSimulatedExampleParams(TypedDict, total=False):
2930
"external_bank_account.created",
3031
"external_bank_account.updated",
3132
"financial_account.created",
33+
"financial_account.updated",
3234
"payment_transaction.created",
3335
"payment_transaction.updated",
3436
"settlement_report.updated",

src/lithic/types/events/subscription_update_params.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class SubscriptionUpdateParams(TypedDict, total=False):
2323
"account_holder.created",
2424
"account_holder.updated",
2525
"account_holder.verification",
26+
"auth_rules.performance_report.created",
2627
"balance.updated",
2728
"book_transfer_transaction.created",
2829
"card.created",
@@ -40,6 +41,7 @@ class SubscriptionUpdateParams(TypedDict, total=False):
4041
"external_bank_account.created",
4142
"external_bank_account.updated",
4243
"financial_account.created",
44+
"financial_account.updated",
4345
"payment_transaction.created",
4446
"payment_transaction.updated",
4547
"settlement_report.updated",

src/lithic/types/shared/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
from .address import Address as Address
44
from .carrier import Carrier as Carrier
5+
from .currency import Currency as Currency
56
from .document import Document as Document
67
from .shipping_address import ShippingAddress as ShippingAddress

src/lithic/types/shared/address.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,15 @@ class Address(BaseModel):
1717
country: str
1818
"""Valid country code.
1919
20-
Only USA is currently supported, entered in uppercase ISO 3166-1 alpha-3
20+
USA and CAN are supported, entered in uppercase ISO 3166-1 alpha-3
2121
three-character format.
2222
"""
2323

2424
postal_code: str
25-
"""Valid postal code.
26-
27-
Only USA postal codes (ZIP codes) are currently supported, entered as a
28-
five-digit postal code or nine-digit postal code (ZIP+4) using the format
29-
12345-1234.
30-
"""
25+
"""Valid postal code."""
3126

3227
state: str
33-
"""Valid state code.
34-
35-
Only USA state codes are currently supported, entered in uppercase ISO 3166-2
36-
two-character format.
37-
"""
28+
"""Valid state code."""
3829

3930
address2: Optional[str] = None
4031
"""Unit or apartment number (if applicable)."""

0 commit comments

Comments
 (0)