Skip to content

Commit

Permalink
feat(api): updates
Browse files Browse the repository at this point in the history
feat(api): disputes & mark url as a required param in `lithic.events.subscriptions.update()`

- Add CLOSED enum member to account state
- Update docs
- Internally rename `event_types` param to `event_types[]`
  • Loading branch information
stainless-bot authored Mar 14, 2023
1 parent 8aca53b commit 1e256f1
Show file tree
Hide file tree
Showing 44 changed files with 1,648 additions and 295 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
configured_endpoints: 52
configured_endpoints: 61
22 changes: 21 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ from lithic.types import (
Methods:

- <code title="post /cards">client.cards.<a href="./src/lithic/resources/cards.py">create</a>(\*\*<a href="src/lithic/types/card_create_params.py">params</a>) -> <a href="./src/lithic/types/card.py">Card</a></code>
- <code title="get /cards/{card_token}">client.cards.<a href="./src/lithic/resources/cards.py">retrieve</a>(card_token, \*\*<a href="src/lithic/types/card_retrieve_params.py">params</a>) -> <a href="./src/lithic/types/card.py">Card</a></code>
- <code title="get /cards/{card_token}">client.cards.<a href="./src/lithic/resources/cards.py">retrieve</a>(card_token) -> <a href="./src/lithic/types/card.py">Card</a></code>
- <code title="patch /cards/{card_token}">client.cards.<a href="./src/lithic/resources/cards.py">update</a>(card_token, \*\*<a href="src/lithic/types/card_update_params.py">params</a>) -> <a href="./src/lithic/types/card.py">Card</a></code>
- <code title="get /cards">client.cards.<a href="./src/lithic/resources/cards.py">list</a>(\*\*<a href="src/lithic/types/card_list_params.py">params</a>) -> <a href="./src/lithic/types/card.py">SyncPage[Card]</a></code>
- <code title="get /embed/card">client.cards.<a href="./src/lithic/resources/cards.py">embed</a>(\*\*<a href="src/lithic/types/card_embed_params.py">params</a>) -> str</code>
Expand All @@ -122,6 +122,26 @@ Custom Methods:
- `get_embed_html`
- `get_embed_url`

# Disputes

Types:

```python
from lithic.types import Dispute, DisputeEvidence, DisputeInitiateEvidenceUploadResponse
```

Methods:

- <code title="post /disputes">client.disputes.<a href="./src/lithic/resources/disputes.py">create</a>(\*\*<a href="src/lithic/types/dispute_create_params.py">params</a>) -> <a href="./src/lithic/types/dispute.py">Dispute</a></code>
- <code title="get /disputes/{dispute_token}">client.disputes.<a href="./src/lithic/resources/disputes.py">retrieve</a>(dispute_token) -> <a href="./src/lithic/types/dispute.py">Dispute</a></code>
- <code title="patch /disputes/{dispute_token}">client.disputes.<a href="./src/lithic/resources/disputes.py">update</a>(dispute_token, \*\*<a href="src/lithic/types/dispute_update_params.py">params</a>) -> <a href="./src/lithic/types/dispute.py">Dispute</a></code>
- <code title="get /disputes">client.disputes.<a href="./src/lithic/resources/disputes.py">list</a>(\*\*<a href="src/lithic/types/dispute_list_params.py">params</a>) -> <a href="./src/lithic/types/dispute.py">SyncCursorPage[Dispute]</a></code>
- <code title="delete /disputes/{dispute_token}">client.disputes.<a href="./src/lithic/resources/disputes.py">delete</a>(dispute_token) -> <a href="./src/lithic/types/dispute.py">Dispute</a></code>
- <code title="delete /disputes/{dispute_token}/evidences/{evidence_token}">client.disputes.<a href="./src/lithic/resources/disputes.py">delete_evidence</a>(evidence_token, dispute_token) -> <a href="./src/lithic/types/dispute_evidence.py">DisputeEvidence</a></code>
- <code title="post /disputes/{dispute_token}/evidences">client.disputes.<a href="./src/lithic/resources/disputes.py">initiate_evidence_upload</a>(dispute_token) -> <a href="./src/lithic/types/dispute_initiate_evidence_upload_response.py">DisputeInitiateEvidenceUploadResponse</a></code>
- <code title="get /disputes/{dispute_token}/evidences">client.disputes.<a href="./src/lithic/resources/disputes.py">list_evidences</a>(dispute_token, \*\*<a href="src/lithic/types/dispute_list_evidences_params.py">params</a>) -> <a href="./src/lithic/types/dispute_evidence.py">SyncCursorPage[DisputeEvidence]</a></code>
- <code title="get /disputes/{dispute_token}/evidences/{evidence_token}">client.disputes.<a href="./src/lithic/resources/disputes.py">retrieve_evidence</a>(evidence_token, dispute_token) -> <a href="./src/lithic/types/dispute_evidence.py">DisputeEvidence</a></code>

# Events

Types:
Expand Down
4 changes: 4 additions & 0 deletions src/lithic/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class Lithic(SyncAPIClient):
auth_rules: resources.AuthRules
auth_stream_enrollment: resources.AuthStreamEnrollmentResource
cards: resources.Cards
disputes: resources.Disputes
events: resources.Events
funding_sources: resources.FundingSources
transactions: resources.Transactions
Expand Down Expand Up @@ -140,6 +141,7 @@ def __init__(
self.auth_rules = resources.AuthRules(self)
self.auth_stream_enrollment = resources.AuthStreamEnrollmentResource(self)
self.cards = resources.Cards(self)
self.disputes = resources.Disputes(self)
self.events = resources.Events(self)
self.funding_sources = resources.FundingSources(self)
self.transactions = resources.Transactions(self)
Expand Down Expand Up @@ -234,6 +236,7 @@ class AsyncLithic(AsyncAPIClient):
auth_rules: resources.AsyncAuthRules
auth_stream_enrollment: resources.AsyncAuthStreamEnrollmentResource
cards: resources.AsyncCards
disputes: resources.AsyncDisputes
events: resources.AsyncEvents
funding_sources: resources.AsyncFundingSources
transactions: resources.AsyncTransactions
Expand Down Expand Up @@ -317,6 +320,7 @@ def __init__(
self.auth_rules = resources.AsyncAuthRules(self)
self.auth_stream_enrollment = resources.AsyncAuthStreamEnrollmentResource(self)
self.cards = resources.AsyncCards(self)
self.disputes = resources.AsyncDisputes(self)
self.events = resources.AsyncEvents(self)
self.funding_sources = resources.AsyncFundingSources(self)
self.transactions = resources.AsyncTransactions(self)
Expand Down
3 changes: 3 additions & 0 deletions src/lithic/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from .cards import Cards, AsyncCards
from .events import Events, AsyncEvents
from .accounts import Accounts, AsyncAccounts
from .disputes import Disputes, AsyncDisputes
from .webhooks import Webhooks, AsyncWebhooks
from .auth_rules import AuthRules, AsyncAuthRules
from .transactions import Transactions, AsyncTransactions
Expand All @@ -24,6 +25,8 @@
"AsyncAuthStreamEnrollmentResource",
"Cards",
"AsyncCards",
"Disputes",
"AsyncDisputes",
"Events",
"AsyncEvents",
"FundingSources",
Expand Down
32 changes: 16 additions & 16 deletions src/lithic/resources/account_holders.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ def create(
nature_of_business: Short description of the company's line of business (i.e., what does the company
do?).
tos_timestamp: An ISO 8601 timestamp indicating when the account holder accepted the applicable
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
implementation with Lithic.
website_url: Company website URL.
workflow: Specifies the type of KYB workflow to run.
kyb_passed_timestamp: An ISO 8601 timestamp indicating when precomputed KYC was completed on the
kyb_passed_timestamp: An RFC 3339 timestamp indicating when precomputed KYC was completed on the
business with a pass result.
This field is required only if workflow type is `KYB_BYO`.
Expand Down Expand Up @@ -139,13 +139,13 @@ def create(
individual: Information on individual for whom the account is being opened and KYC is being
run.
tos_timestamp: An ISO 8601 timestamp indicating when the account holder accepted the applicable
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
implementation with Lithic.
workflow: Specifies the type of KYC workflow to run.
kyc_passed_timestamp: An ISO 8601 timestamp indicating when precomputed KYC was completed on the
kyc_passed_timestamp: An RFC 3339 timestamp indicating when precomputed KYC was completed on the
individual with a pass result.
This field is required only if workflow type is `KYC_BYO`.
Expand Down Expand Up @@ -306,14 +306,14 @@ def create(
individual: Information on individual for whom the account is being opened and KYC is being
run.
kyb_passed_timestamp: An ISO 8601 timestamp indicating when precomputed KYC was completed on the
kyb_passed_timestamp: An RFC 3339 timestamp indicating when precomputed KYC was completed on the
business with a pass result.
This field is required only if workflow type is `KYB_BYO`.
kyc_exemption_type: Specifies the type of KYC Exempt user
kyc_passed_timestamp: An ISO 8601 timestamp indicating when precomputed KYC was completed on the
kyc_passed_timestamp: An RFC 3339 timestamp indicating when precomputed KYC was completed on the
individual with a pass result.
This field is required only if workflow type is `KYC_BYO`.
Expand All @@ -325,7 +325,7 @@ def create(
phone_number: The KYC Exempt user's phone number
tos_timestamp: An ISO 8601 timestamp indicating when the account holder accepted the applicable
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
implementation with Lithic.
Expand Down Expand Up @@ -554,7 +554,7 @@ def resubmit(
individual: Information on individual for whom the account is being opened and KYC is being
re-run.
tos_timestamp: An ISO 8601 timestamp indicating when the account holder accepted the applicable
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
implementation with Lithic.
Expand Down Expand Up @@ -739,15 +739,15 @@ async def create(
nature_of_business: Short description of the company's line of business (i.e., what does the company
do?).
tos_timestamp: An ISO 8601 timestamp indicating when the account holder accepted the applicable
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
implementation with Lithic.
website_url: Company website URL.
workflow: Specifies the type of KYB workflow to run.
kyb_passed_timestamp: An ISO 8601 timestamp indicating when precomputed KYC was completed on the
kyb_passed_timestamp: An RFC 3339 timestamp indicating when precomputed KYC was completed on the
business with a pass result.
This field is required only if workflow type is `KYB_BYO`.
Expand Down Expand Up @@ -790,13 +790,13 @@ async def create(
individual: Information on individual for whom the account is being opened and KYC is being
run.
tos_timestamp: An ISO 8601 timestamp indicating when the account holder accepted the applicable
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
implementation with Lithic.
workflow: Specifies the type of KYC workflow to run.
kyc_passed_timestamp: An ISO 8601 timestamp indicating when precomputed KYC was completed on the
kyc_passed_timestamp: An RFC 3339 timestamp indicating when precomputed KYC was completed on the
individual with a pass result.
This field is required only if workflow type is `KYC_BYO`.
Expand Down Expand Up @@ -957,14 +957,14 @@ async def create(
individual: Information on individual for whom the account is being opened and KYC is being
run.
kyb_passed_timestamp: An ISO 8601 timestamp indicating when precomputed KYC was completed on the
kyb_passed_timestamp: An RFC 3339 timestamp indicating when precomputed KYC was completed on the
business with a pass result.
This field is required only if workflow type is `KYB_BYO`.
kyc_exemption_type: Specifies the type of KYC Exempt user
kyc_passed_timestamp: An ISO 8601 timestamp indicating when precomputed KYC was completed on the
kyc_passed_timestamp: An RFC 3339 timestamp indicating when precomputed KYC was completed on the
individual with a pass result.
This field is required only if workflow type is `KYC_BYO`.
Expand All @@ -976,7 +976,7 @@ async def create(
phone_number: The KYC Exempt user's phone number
tos_timestamp: An ISO 8601 timestamp indicating when the account holder accepted the applicable
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
implementation with Lithic.
Expand Down Expand Up @@ -1205,7 +1205,7 @@ async def resubmit(
individual: Information on individual for whom the account is being opened and KYC is being
re-run.
tos_timestamp: An ISO 8601 timestamp indicating when the account holder accepted the applicable
tos_timestamp: An RFC 3339 timestamp indicating when the account holder accepted the applicable
legal agreements (e.g., cardholder terms) as agreed upon during API customer's
implementation with Lithic.
Expand Down
20 changes: 10 additions & 10 deletions src/lithic/resources/accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ def list(
"""List account configurations.
Args:
begin: Date string in 8601 format.
begin: Date string in RFC 3339 format.
Only entries created after the specified date will
be included. UTC time zone.
Only entries created after the specified date
will be included. UTC time zone.
end: Date string in 8601 format. Only entries created before the specified date will
be included. UTC time zone.
end: Date string in RFC 3339 format. Only entries created before the specified date
will be included. UTC time zone.
page: Page (for pagination).
Expand Down Expand Up @@ -275,13 +275,13 @@ def list(
"""List account configurations.
Args:
begin: Date string in 8601 format.
begin: Date string in RFC 3339 format.
Only entries created after the specified date will
be included. UTC time zone.
Only entries created after the specified date
will be included. UTC time zone.
end: Date string in 8601 format. Only entries created before the specified date will
be included. UTC time zone.
end: Date string in RFC 3339 format. Only entries created before the specified date
will be included. UTC time zone.
page: Page (for pagination).
Expand Down
Loading

0 comments on commit 1e256f1

Please sign in to comment.