Skip to content

Commit 00a8da4

Browse files
feat(api): api update (#1630)
Co-authored-by: increase-releases[bot] <285999079+increase-releases[bot]@users.noreply.github.com>
1 parent a671b30 commit 00a8da4

21 files changed

Lines changed: 369 additions & 47 deletions

‎.stats.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
configured_endpoints: 254
2-
openapi_spec_hash: 55fb271eb29805e8a49ed72fb5ed8843
3-
config_hash: f0e1844d06c76a9e145f7986d993dda6
1+
configured_endpoints: 255
2+
openapi_spec_hash: 0c2a6908b65af7107b19958604ff5cb8
3+
config_hash: de151ebd21a0bd391662389b310a8f49

‎api.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Methods:
6363
- <code title="post /cards/{card_id}/create_details_iframe">client.cards.<a href="./src/increase/resources/cards.py">create_details_iframe</a>(card_id, \*\*<a href="src/increase/types/card_create_details_iframe_params.py">params</a>) -> <a href="./src/increase/types/card_iframe_url.py">CardIframeURL</a></code>
6464
- <code title="post /cards/{card_id}/create_details_token">client.cards.<a href="./src/increase/resources/cards.py">create_details_token</a>(card_id) -> <a href="./src/increase/types/card_details_token.py">CardDetailsToken</a></code>
6565
- <code title="get /cards/{card_id}/details">client.cards.<a href="./src/increase/resources/cards.py">details</a>(card_id) -> <a href="./src/increase/types/card_details.py">CardDetails</a></code>
66+
- <code title="post /cards/{card_id}/renew">client.cards.<a href="./src/increase/resources/cards.py">renew</a>(card_id) -> <a href="./src/increase/types/card.py">Card</a></code>
6667
- <code title="post /cards/{card_id}/update_pin">client.cards.<a href="./src/increase/resources/cards.py">update_pin</a>(card_id, \*\*<a href="src/increase/types/card_update_pin_params.py">params</a>) -> <a href="./src/increase/types/card_details.py">CardDetails</a></code>
6768

6869
# CardPayments

‎scripts/mock‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

‎src/increase/resources/cards.py‎

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def create(
6363
description: str | Omit = omit,
6464
digital_wallet: card_create_params.DigitalWallet | Omit = omit,
6565
entity_id: str | Omit = omit,
66+
replacement_for: card_create_params.ReplacementFor | Omit = omit,
6667
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6768
# The extra values given here take precedence over values defined on the client or passed to this method.
6869
extra_headers: Headers | None = None,
@@ -95,6 +96,9 @@ def create(
9596
entity_id: The Entity the card belongs to. You only need to supply this in rare situations
9697
when the card is not for the Account holder.
9798
99+
replacement_for: Details about the Card this Card replaces. Supply this when issuing a new Card
100+
to take over from an existing one. The replaced Card is not canceled.
101+
98102
extra_headers: Send extra headers
99103
100104
extra_query: Add additional query parameters to the request
@@ -116,6 +120,7 @@ def create(
116120
"description": description,
117121
"digital_wallet": digital_wallet,
118122
"entity_id": entity_id,
123+
"replacement_for": replacement_for,
119124
},
120125
card_create_params.CardCreateParams,
121126
),
@@ -440,6 +445,53 @@ def details(
440445
cast_to=CardDetails,
441446
)
442447

448+
def renew(
449+
self,
450+
card_id: str,
451+
*,
452+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
453+
# The extra values given here take precedence over values defined on the client or passed to this method.
454+
extra_headers: Headers | None = None,
455+
extra_query: Query | None = None,
456+
extra_body: Body | None = None,
457+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
458+
idempotency_key: str | None = None,
459+
) -> Card:
460+
"""Renew a Card in place.
461+
462+
The Card keeps its identifier, card number, PIN, and
463+
Physical Cards, and receives a new expiration date in the current month four
464+
years from now along with a new verification code, which the Card's details will
465+
return afterwards. Physical Cards that have already shipped keep working until
466+
they are canceled.
467+
468+
Args:
469+
card_id: The identifier of the Card to renew.
470+
471+
extra_headers: Send extra headers
472+
473+
extra_query: Add additional query parameters to the request
474+
475+
extra_body: Add additional JSON properties to the request
476+
477+
timeout: Override the client-level default timeout for this request, in seconds
478+
479+
idempotency_key: Specify a custom idempotency key for this request
480+
"""
481+
if not card_id:
482+
raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
483+
return self._post(
484+
path_template("/cards/{card_id}/renew", card_id=card_id),
485+
options=make_request_options(
486+
extra_headers=extra_headers,
487+
extra_query=extra_query,
488+
extra_body=extra_body,
489+
timeout=timeout,
490+
idempotency_key=idempotency_key,
491+
),
492+
cast_to=Card,
493+
)
494+
443495
def update_pin(
444496
self,
445497
card_id: str,
@@ -517,6 +569,7 @@ async def create(
517569
description: str | Omit = omit,
518570
digital_wallet: card_create_params.DigitalWallet | Omit = omit,
519571
entity_id: str | Omit = omit,
572+
replacement_for: card_create_params.ReplacementFor | Omit = omit,
520573
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
521574
# The extra values given here take precedence over values defined on the client or passed to this method.
522575
extra_headers: Headers | None = None,
@@ -549,6 +602,9 @@ async def create(
549602
entity_id: The Entity the card belongs to. You only need to supply this in rare situations
550603
when the card is not for the Account holder.
551604
605+
replacement_for: Details about the Card this Card replaces. Supply this when issuing a new Card
606+
to take over from an existing one. The replaced Card is not canceled.
607+
552608
extra_headers: Send extra headers
553609
554610
extra_query: Add additional query parameters to the request
@@ -570,6 +626,7 @@ async def create(
570626
"description": description,
571627
"digital_wallet": digital_wallet,
572628
"entity_id": entity_id,
629+
"replacement_for": replacement_for,
573630
},
574631
card_create_params.CardCreateParams,
575632
),
@@ -894,6 +951,53 @@ async def details(
894951
cast_to=CardDetails,
895952
)
896953

954+
async def renew(
955+
self,
956+
card_id: str,
957+
*,
958+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
959+
# The extra values given here take precedence over values defined on the client or passed to this method.
960+
extra_headers: Headers | None = None,
961+
extra_query: Query | None = None,
962+
extra_body: Body | None = None,
963+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
964+
idempotency_key: str | None = None,
965+
) -> Card:
966+
"""Renew a Card in place.
967+
968+
The Card keeps its identifier, card number, PIN, and
969+
Physical Cards, and receives a new expiration date in the current month four
970+
years from now along with a new verification code, which the Card's details will
971+
return afterwards. Physical Cards that have already shipped keep working until
972+
they are canceled.
973+
974+
Args:
975+
card_id: The identifier of the Card to renew.
976+
977+
extra_headers: Send extra headers
978+
979+
extra_query: Add additional query parameters to the request
980+
981+
extra_body: Add additional JSON properties to the request
982+
983+
timeout: Override the client-level default timeout for this request, in seconds
984+
985+
idempotency_key: Specify a custom idempotency key for this request
986+
"""
987+
if not card_id:
988+
raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}")
989+
return await self._post(
990+
path_template("/cards/{card_id}/renew", card_id=card_id),
991+
options=make_request_options(
992+
extra_headers=extra_headers,
993+
extra_query=extra_query,
994+
extra_body=extra_body,
995+
timeout=timeout,
996+
idempotency_key=idempotency_key,
997+
),
998+
cast_to=Card,
999+
)
1000+
8971001
async def update_pin(
8981002
self,
8991003
card_id: str,
@@ -966,6 +1070,9 @@ def __init__(self, cards: CardsResource) -> None:
9661070
self.details = to_raw_response_wrapper(
9671071
cards.details,
9681072
)
1073+
self.renew = to_raw_response_wrapper(
1074+
cards.renew,
1075+
)
9691076
self.update_pin = to_raw_response_wrapper(
9701077
cards.update_pin,
9711078
)
@@ -996,6 +1103,9 @@ def __init__(self, cards: AsyncCardsResource) -> None:
9961103
self.details = async_to_raw_response_wrapper(
9971104
cards.details,
9981105
)
1106+
self.renew = async_to_raw_response_wrapper(
1107+
cards.renew,
1108+
)
9991109
self.update_pin = async_to_raw_response_wrapper(
10001110
cards.update_pin,
10011111
)
@@ -1026,6 +1136,9 @@ def __init__(self, cards: CardsResource) -> None:
10261136
self.details = to_streamed_response_wrapper(
10271137
cards.details,
10281138
)
1139+
self.renew = to_streamed_response_wrapper(
1140+
cards.renew,
1141+
)
10291142
self.update_pin = to_streamed_response_wrapper(
10301143
cards.update_pin,
10311144
)
@@ -1056,6 +1169,9 @@ def __init__(self, cards: AsyncCardsResource) -> None:
10561169
self.details = async_to_streamed_response_wrapper(
10571170
cards.details,
10581171
)
1172+
self.renew = async_to_streamed_response_wrapper(
1173+
cards.renew,
1174+
)
10591175
self.update_pin = async_to_streamed_response_wrapper(
10601176
cards.update_pin,
10611177
)

‎src/increase/resources/digital_card_profiles.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def list(
179179
timeout: float | httpx.Timeout | None | NotGiven = not_given,
180180
) -> SyncPage[DigitalCardProfile]:
181181
"""
182-
List Card Profiles
182+
List Digital Card Profiles
183183
184184
Args:
185185
cursor: Return the page of entries after this one.
@@ -292,7 +292,7 @@ def clone(
292292
idempotency_key: str | None = None,
293293
) -> DigitalCardProfile:
294294
"""
295-
Clones a Digital Card Profile
295+
Clone a Digital Card Profile
296296
297297
Args:
298298
digital_card_profile_id: The identifier of the Digital Card Profile to clone.
@@ -513,7 +513,7 @@ def list(
513513
timeout: float | httpx.Timeout | None | NotGiven = not_given,
514514
) -> AsyncPaginator[DigitalCardProfile, AsyncPage[DigitalCardProfile]]:
515515
"""
516-
List Card Profiles
516+
List Digital Card Profiles
517517
518518
Args:
519519
cursor: Return the page of entries after this one.
@@ -626,7 +626,7 @@ async def clone(
626626
idempotency_key: str | None = None,
627627
) -> DigitalCardProfile:
628628
"""
629-
Clones a Digital Card Profile
629+
Clone a Digital Card Profile
630630
631631
Args:
632632
digital_card_profile_id: The identifier of the Digital Card Profile to clone.

‎src/increase/resources/files.py‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,11 @@ def retrieve(
189189
extra_body: Body | None = None,
190190
timeout: float | httpx.Timeout | None | NotGiven = not_given,
191191
) -> File:
192-
"""
193-
Retrieve a File
192+
"""Fetch metadata about a File, like its `purpose` and MIME type.
193+
194+
To access the
195+
content, use the [Get File contents](/documentation/api/files#get-file-contents)
196+
API.
194197
195198
Args:
196199
file_id: The identifier of the File.
@@ -474,8 +477,11 @@ async def retrieve(
474477
extra_body: Body | None = None,
475478
timeout: float | httpx.Timeout | None | NotGiven = not_given,
476479
) -> File:
477-
"""
478-
Retrieve a File
480+
"""Fetch metadata about a File, like its `purpose` and MIME type.
481+
482+
To access the
483+
content, use the [Get File contents](/documentation/api/files#get-file-contents)
484+
API.
479485
480486
Args:
481487
file_id: The identifier of the File.

‎src/increase/resources/intrafi_account_enrollments.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create(
5656
idempotency_key: str | None = None,
5757
) -> IntrafiAccountEnrollment:
5858
"""
59-
Enroll an account in the IntraFi deposit sweep network
59+
Enroll an Account in the IntraFi deposit sweep network
6060
6161
Args:
6262
account_id: The identifier for the account to be added to IntraFi.
@@ -208,7 +208,7 @@ def unenroll(
208208
idempotency_key: str | None = None,
209209
) -> IntrafiAccountEnrollment:
210210
"""
211-
Unenroll an account from IntraFi
211+
Unenroll an Account from IntraFi
212212
213213
Args:
214214
intrafi_account_enrollment_id: The Identifier of the IntraFi Account Enrollment to remove from IntraFi.
@@ -277,7 +277,7 @@ async def create(
277277
idempotency_key: str | None = None,
278278
) -> IntrafiAccountEnrollment:
279279
"""
280-
Enroll an account in the IntraFi deposit sweep network
280+
Enroll an Account in the IntraFi deposit sweep network
281281
282282
Args:
283283
account_id: The identifier for the account to be added to IntraFi.
@@ -429,7 +429,7 @@ async def unenroll(
429429
idempotency_key: str | None = None,
430430
) -> IntrafiAccountEnrollment:
431431
"""
432-
Unenroll an account from IntraFi
432+
Unenroll an Account from IntraFi
433433
434434
Args:
435435
intrafi_account_enrollment_id: The Identifier of the IntraFi Account Enrollment to remove from IntraFi.

‎src/increase/resources/physical_card_profiles.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ def retrieve(
129129
timeout: float | httpx.Timeout | None | NotGiven = not_given,
130130
) -> PhysicalCardProfile:
131131
"""
132-
Retrieve a Card Profile
132+
Retrieve a Physical Card Profile
133133
134134
Args:
135135
physical_card_profile_id: The identifier of the Card Profile.
@@ -443,7 +443,7 @@ async def retrieve(
443443
timeout: float | httpx.Timeout | None | NotGiven = not_given,
444444
) -> PhysicalCardProfile:
445445
"""
446-
Retrieve a Card Profile
446+
Retrieve a Physical Card Profile
447447
448448
Args:
449449
physical_card_profile_id: The identifier of the Card Profile.

‎src/increase/resources/supplemental_documents.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create(
5656
idempotency_key: str | None = None,
5757
) -> EntitySupplementalDocument:
5858
"""
59-
Create a supplemental document for an Entity
59+
Create a Supplemental Document
6060
6161
Args:
6262
entity_id: The identifier of the Entity to associate with the supplemental document.
@@ -107,7 +107,7 @@ def list(
107107
timeout: float | httpx.Timeout | None | NotGiven = not_given,
108108
) -> SyncPage[EntitySupplementalDocument]:
109109
"""
110-
List Entity Supplemental Document Submissions
110+
List Supplemental Documents
111111
112112
Args:
113113
entity_id: The identifier of the Entity to list supplemental documents for.
@@ -188,7 +188,7 @@ async def create(
188188
idempotency_key: str | None = None,
189189
) -> EntitySupplementalDocument:
190190
"""
191-
Create a supplemental document for an Entity
191+
Create a Supplemental Document
192192
193193
Args:
194194
entity_id: The identifier of the Entity to associate with the supplemental document.
@@ -239,7 +239,7 @@ def list(
239239
timeout: float | httpx.Timeout | None | NotGiven = not_given,
240240
) -> AsyncPaginator[EntitySupplementalDocument, AsyncPage[EntitySupplementalDocument]]:
241241
"""
242-
List Entity Supplemental Document Submissions
242+
List Supplemental Documents
243243
244244
Args:
245245
entity_id: The identifier of the Entity to list supplemental documents for.

‎src/increase/types/account_statement.py‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,16 +59,18 @@ class AccountStatement(BaseModel):
5959
"""
6060
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the end
6161
of the period the Account Statement covers. The statement covers all
62-
transactions up to, but not including this timestamp. Usually, this is the
63-
beginning of the following month.
62+
transactions up to, but not including this timestamp. Statement periods are
63+
measured in UTC days, so this is usually midnight UTC on the first day of the
64+
following month.
6465
"""
6566

6667
statement_period_start: datetime
6768
"""
6869
The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time representing the
6970
start of the period the Account Statement covers. This is the first moment of
70-
the statement period and is inclusive. Usually, this is the beginning of the
71-
month this statement covers.
71+
the statement period and is inclusive. Statement periods are measured in UTC
72+
days, so this is usually midnight UTC on the first day of the month this
73+
statement covers.
7274
"""
7375

7476
type: Literal["account_statement"]

0 commit comments

Comments
 (0)