Skip to content

Commit 3bd8370

Browse files
feat: chore(stlc): seal custom-code tracking files
Stainless-Generated-From: 57558c6c2331a7f4bf110793f5fa4bf1d8c954aa
1 parent f4cf217 commit 3bd8370

4 files changed

Lines changed: 56 additions & 20 deletions

File tree

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,38 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from typing import Optional
4+
35
from ..._models import BaseModel
46

57
__all__ = ["VgsCardInput"]
68

79

810
class VgsCardInput(BaseModel):
9-
"""The card's aliases in the customer's VGS vault, its expiry and last four digits.
11+
"""The card supplied to a purchase, as aliases in the customer's VGS vault.
1012
11-
Write-only: stored encrypted and never returned in the item, its events or logs. A repeated PUT with the same key must send the same card.
13+
With card_mode full it is a whole card: a persistent alias of its number, a freshly collected volatile alias of its security code, its expiry and its last four digits. With card_mode cvc_only it is a CVC alias alone, because the merchant holds the rest on file. pan_alias, exp_month, exp_year and last4 are required with card_mode full and rejected with card_mode cvc_only. Write-only: stored encrypted and never returned in the item, its events or logs. A repeated PUT with the same key must send the same card.
1214
"""
1315

1416
cvc_alias: str
1517
"""A volatile alias of a freshly collected security code in the customer's vault.
1618
17-
It must still exist when authorize runs.
19+
It must still exist when authorize runs. Required in both modes.
1820
"""
1921

20-
exp_month: int
22+
exp_month: Optional[int] = None
23+
"""Required with card_mode full, rejected with card_mode cvc_only."""
24+
25+
exp_year: Optional[int] = None
26+
"""Required with card_mode full, rejected with card_mode cvc_only."""
2127

22-
exp_year: int
28+
last4: Optional[str] = None
29+
"""The card number's last four digits, checked against the revealed alias.
2330
24-
last4: str
25-
"""The card number's last four digits, checked against the revealed alias."""
31+
Required with card_mode full, rejected with card_mode cvc_only.
32+
"""
2633

27-
pan_alias: str
28-
"""A persistent alias of the card number in the customer's vault."""
34+
pan_alias: Optional[str] = None
35+
"""A persistent alias of the card number in the customer's vault.
36+
37+
Required with card_mode full, rejected with card_mode cvc_only.
38+
"""

‎src/kernel/types/vaults/vgs_card_input_param.py‎

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,31 @@
88

99

1010
class VgsCardInputParam(TypedDict, total=False):
11-
"""The card's aliases in the customer's VGS vault, its expiry and last four digits.
11+
"""The card supplied to a purchase, as aliases in the customer's VGS vault.
1212
13-
Write-only: stored encrypted and never returned in the item, its events or logs. A repeated PUT with the same key must send the same card.
13+
With card_mode full it is a whole card: a persistent alias of its number, a freshly collected volatile alias of its security code, its expiry and its last four digits. With card_mode cvc_only it is a CVC alias alone, because the merchant holds the rest on file. pan_alias, exp_month, exp_year and last4 are required with card_mode full and rejected with card_mode cvc_only. Write-only: stored encrypted and never returned in the item, its events or logs. A repeated PUT with the same key must send the same card.
1414
"""
1515

1616
cvc_alias: Required[str]
1717
"""A volatile alias of a freshly collected security code in the customer's vault.
1818
19-
It must still exist when authorize runs.
19+
It must still exist when authorize runs. Required in both modes.
2020
"""
2121

22-
exp_month: Required[int]
22+
exp_month: int
23+
"""Required with card_mode full, rejected with card_mode cvc_only."""
2324

24-
exp_year: Required[int]
25+
exp_year: int
26+
"""Required with card_mode full, rejected with card_mode cvc_only."""
2527

26-
last4: Required[str]
27-
"""The card number's last four digits, checked against the revealed alias."""
28+
last4: str
29+
"""The card number's last four digits, checked against the revealed alias.
2830
29-
pan_alias: Required[str]
30-
"""A persistent alias of the card number in the customer's vault."""
31+
Required with card_mode full, rejected with card_mode cvc_only.
32+
"""
33+
34+
pan_alias: str
35+
"""A persistent alias of the card number in the customer's vault.
36+
37+
Required with card_mode full, rejected with card_mode cvc_only.
38+
"""

‎src/kernel/types/vaults/vgs_card_vault_item_spec.py‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class VgsCardVaultItemSpec(BaseModel):
1313
"""One live purchase with a card in the customer's VGS vault.
1414
15-
authorize reveals card.pan_alias and card.cvc_alias through Kernel's VGS outbound proxy, which replaces both with aliases in Kernel's vault before they reach Kernel; Kernel never receives the card number or security code. The card is then ready with no further approval, until expires_at, by default five minutes after authorize. fill types Kernel's aliases on merchant_url's origin, and Kernel's VGS proxy replaces them with the card's details when the browser submits checkout. An expired card requires a new purchase with a freshly collected CVC alias. The amount and merchant are recorded but do not restrict payment requests sent by the browser. Card updates are not supported; delete and create a new item instead.
15+
With card_mode full, authorize reveals card.pan_alias and card.cvc_alias through Kernel's VGS outbound proxy; with card_mode cvc_only, for a card the merchant already holds on file whose checkout page asks only for the security code, it reveals card.cvc_alias alone. The proxy replaces each revealed value with an alias in Kernel's vault before it reaches Kernel; Kernel never receives the card number or security code. The card is then ready with no further approval, until expires_at, by default five minutes after authorize. fill types Kernel's aliases on merchant_url's origin, and Kernel's VGS proxy replaces them with the card's details when the browser submits checkout; a cvc_only card fills only the cvc field, and reports no masks because it has no last4 to verify. A cvc_only card's payment window routes all of the browser's egress through Kernel's VGS outbound proxy, exactly as widely as a full card's: while it is open the proxy reveals the card's aliases to any destination the browser sends them to, not only the security code. An expired card requires a new purchase with a freshly collected CVC alias. The amount and merchant are recorded but do not restrict payment requests sent by the browser. Card updates are not supported; delete and create a new item instead.
1616
"""
1717

1818
amount: int
@@ -37,3 +37,12 @@ class VgsCardVaultItemSpec(BaseModel):
3737

3838
card: Optional[VgsCardInput] = None
3939
"""Required when creating the card. Never returned."""
40+
41+
card_mode: Optional[Literal["full", "cvc_only"]] = None
42+
"""Which card this purchase supplies, and the only part of it a read returns.
43+
44+
full is a whole card from the customer's vault. cvc_only is a card the merchant
45+
already holds on file, whose checkout page asks for nothing but the security
46+
code. It must match spec.card: a full card that is missing pan_alias is rejected
47+
rather than treated as cvc_only. Omit it for full, which a read also omits.
48+
"""

‎src/kernel/types/vaults/vgs_card_vault_item_spec_param.py‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
class VgsCardVaultItemSpecParam(TypedDict, total=False):
1313
"""One live purchase with a card in the customer's VGS vault.
1414
15-
authorize reveals card.pan_alias and card.cvc_alias through Kernel's VGS outbound proxy, which replaces both with aliases in Kernel's vault before they reach Kernel; Kernel never receives the card number or security code. The card is then ready with no further approval, until expires_at, by default five minutes after authorize. fill types Kernel's aliases on merchant_url's origin, and Kernel's VGS proxy replaces them with the card's details when the browser submits checkout. An expired card requires a new purchase with a freshly collected CVC alias. The amount and merchant are recorded but do not restrict payment requests sent by the browser. Card updates are not supported; delete and create a new item instead.
15+
With card_mode full, authorize reveals card.pan_alias and card.cvc_alias through Kernel's VGS outbound proxy; with card_mode cvc_only, for a card the merchant already holds on file whose checkout page asks only for the security code, it reveals card.cvc_alias alone. The proxy replaces each revealed value with an alias in Kernel's vault before it reaches Kernel; Kernel never receives the card number or security code. The card is then ready with no further approval, until expires_at, by default five minutes after authorize. fill types Kernel's aliases on merchant_url's origin, and Kernel's VGS proxy replaces them with the card's details when the browser submits checkout; a cvc_only card fills only the cvc field, and reports no masks because it has no last4 to verify. A cvc_only card's payment window routes all of the browser's egress through Kernel's VGS outbound proxy, exactly as widely as a full card's: while it is open the proxy reveals the card's aliases to any destination the browser sends them to, not only the security code. An expired card requires a new purchase with a freshly collected CVC alias. The amount and merchant are recorded but do not restrict payment requests sent by the browser. Card updates are not supported; delete and create a new item instead.
1616
"""
1717

1818
amount: Required[int]
@@ -37,3 +37,12 @@ class VgsCardVaultItemSpecParam(TypedDict, total=False):
3737

3838
card: VgsCardInputParam
3939
"""Required when creating the card. Never returned."""
40+
41+
card_mode: Literal["full", "cvc_only"]
42+
"""Which card this purchase supplies, and the only part of it a read returns.
43+
44+
full is a whole card from the customer's vault. cvc_only is a card the merchant
45+
already holds on file, whose checkout page asks for nothing but the security
46+
code. It must match spec.card: a full card that is missing pan_alias is rejected
47+
rather than treated as cvc_only. Omit it for full, which a read also omits.
48+
"""

0 commit comments

Comments
 (0)