diff --git a/package-lock.json b/package-lock.json index 160d49d1..40977617 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "devDependencies": { "@seamapi/fake-seam-connect": "1.83.2", "@seamapi/nextlove-sdk-generator": "^1.19.0", - "@seamapi/types": "1.461.0", + "@seamapi/types": "1.462.0", "del": "^7.1.0", "prettier": "^3.2.5" } @@ -475,9 +475,9 @@ } }, "node_modules/@seamapi/types": { - "version": "1.461.0", - "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.461.0.tgz", - "integrity": "sha512-e077CCv/Uhp2XBxYNFHHwYVSpjPxKywl5a/0P3jQqGeSMj4Vix28JTFig3DaDxD0+HjcNuT1wS2HMu6yuluhgw==", + "version": "1.462.0", + "resolved": "https://registry.npmjs.org/@seamapi/types/-/types-1.462.0.tgz", + "integrity": "sha512-kKutohfn1Ju6qgV0zT0IVYf38o5V+qPA01YhQIEyfLT3rdGVdpQZgfOyYJHsNPRDRx4ioeNg9CjyKyFIIVKSAA==", "dev": true, "license": "MIT", "engines": { diff --git a/package.json b/package.json index 9fa418ac..3357a64d 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "devDependencies": { "@seamapi/fake-seam-connect": "1.83.2", "@seamapi/nextlove-sdk-generator": "^1.19.0", - "@seamapi/types": "1.461.0", + "@seamapi/types": "1.462.0", "del": "^7.1.0", "prettier": "^3.2.5" } diff --git a/seam/routes/instant_keys.py b/seam/routes/instant_keys.py index 7d122b19..5843b27f 100644 --- a/seam/routes/instant_keys.py +++ b/seam/routes/instant_keys.py @@ -8,6 +8,16 @@ def __init__(self, client: SeamHttpClient, defaults: Dict[str, Any]): self.client = client self.defaults = defaults + def get(self, *, instant_key_id: str) -> InstantKey: + json_payload = {} + + if instant_key_id is not None: + json_payload["instant_key_id"] = instant_key_id + + res = self.client.post("/instant_keys/get", json=json_payload) + + return InstantKey.from_dict(res["instant_key"]) + def list(self, *, user_identity_id: Optional[str] = None) -> List[InstantKey]: json_payload = {} diff --git a/seam/routes/models.py b/seam/routes/models.py index 1a8b738d..5438cc90 100644 --- a/seam/routes/models.py +++ b/seam/routes/models.py @@ -2354,6 +2354,10 @@ def list( class AbstractInstantKeys(abc.ABC): + @abc.abstractmethod + def get(self, *, instant_key_id: str) -> InstantKey: + raise NotImplementedError() + @abc.abstractmethod def list(self, *, user_identity_id: Optional[str] = None) -> List[InstantKey]: raise NotImplementedError()