@naturalpay/sdk 1.6.44 → 1.6.46

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/agenticPayments/types/CardAgenticPaymentsResponseData.d.ts +2 -0
  3. package/dist/cjs/api/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.ts +1 -1
  4. package/dist/cjs/api/resources/cardSessions/types/CreateCardSessionsResponseAgentToken.d.ts +1 -1
  5. package/dist/cjs/api/resources/cardSessions/types/GetCardSessionsResponseAgentToken.d.ts +1 -1
  6. package/dist/cjs/api/resources/cardSessions/types/ListCardSessionsResponseDataItemAgentToken.d.ts +1 -1
  7. package/dist/cjs/api/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.d.ts +2 -0
  8. package/dist/cjs/api/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.d.ts +9 -0
  9. package/dist/cjs/api/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.js +3 -0
  10. package/dist/cjs/api/resources/externalAccounts/types/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/externalAccounts/types/index.js +1 -0
  12. package/dist/cjs/api/resources/payments/client/Client.d.ts +1 -1
  13. package/dist/cjs/api/resources/payments/client/Client.js +1 -1
  14. package/dist/cjs/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.d.ts +2 -0
  15. package/dist/cjs/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.js +2 -0
  16. package/dist/cjs/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.d.ts +14 -0
  17. package/dist/cjs/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.js +46 -0
  18. package/dist/cjs/serialization/resources/externalAccounts/types/index.d.ts +1 -0
  19. package/dist/cjs/serialization/resources/externalAccounts/types/index.js +1 -0
  20. package/dist/cjs/version.d.ts +1 -1
  21. package/dist/cjs/version.js +1 -1
  22. package/dist/esm/BaseClient.mjs +2 -2
  23. package/dist/esm/api/resources/agenticPayments/types/CardAgenticPaymentsResponseData.d.mts +2 -0
  24. package/dist/esm/api/resources/cardSessions/client/requests/CreateCardSessionsRequest.d.mts +1 -1
  25. package/dist/esm/api/resources/cardSessions/types/CreateCardSessionsResponseAgentToken.d.mts +1 -1
  26. package/dist/esm/api/resources/cardSessions/types/GetCardSessionsResponseAgentToken.d.mts +1 -1
  27. package/dist/esm/api/resources/cardSessions/types/ListCardSessionsResponseDataItemAgentToken.d.mts +1 -1
  28. package/dist/esm/api/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.d.mts +2 -0
  29. package/dist/esm/api/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.d.mts +9 -0
  30. package/dist/esm/api/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.mjs +2 -0
  31. package/dist/esm/api/resources/externalAccounts/types/index.d.mts +1 -0
  32. package/dist/esm/api/resources/externalAccounts/types/index.mjs +1 -0
  33. package/dist/esm/api/resources/payments/client/Client.d.mts +1 -1
  34. package/dist/esm/api/resources/payments/client/Client.mjs +1 -1
  35. package/dist/esm/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.d.mts +2 -0
  36. package/dist/esm/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributes.mjs +2 -0
  37. package/dist/esm/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.d.mts +14 -0
  38. package/dist/esm/serialization/resources/externalAccounts/types/ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.mjs +10 -0
  39. package/dist/esm/serialization/resources/externalAccounts/types/index.d.mts +1 -0
  40. package/dist/esm/serialization/resources/externalAccounts/types/index.mjs +1 -0
  41. package/dist/esm/version.d.mts +1 -1
  42. package/dist/esm/version.mjs +1 -1
  43. package/package.json +1 -1
  44. package/reference.md +1 -1
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "@naturalpay/sdk",
46
- "X-Fern-SDK-Version": "1.6.44",
47
- "User-Agent": "@naturalpay/sdk/1.6.44",
46
+ "X-Fern-SDK-Version": "1.6.46",
47
+ "User-Agent": "@naturalpay/sdk/1.6.46",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  "X-Instance-ID": options === null || options === void 0 ? void 0 : options.instanceId,
@@ -1,7 +1,9 @@
1
1
  import type * as Natural from "../../../index.js";
2
2
  export interface CardAgenticPaymentsResponseData {
3
+ /** Whether agent tokens are available on this card for you. False when you can't use the card (check saved_cards.use and the customer connection, which the proxy needs too) or agent payments aren't available in this environment (pay through the proxy). The other fields are then empty. */
3
4
  enabled: boolean;
4
5
  simulated: boolean;
6
+ /** The card's agent payment setup. Null until the owner sets it up, which happens when they approve a card session with requestAgentToken. */
5
7
  paymentMethod: Natural.CardAgenticPaymentsResponseDataPaymentMethod | null;
6
8
  mandates: Natural.CardAgenticPaymentsResponseDataMandatesItem[];
7
9
  }
@@ -28,6 +28,6 @@ export interface CreateCardSessionsRequest {
28
28
  purchase?: Natural.CreateCardSessionsRequestPurchase;
29
29
  /** Your own reference for the session, such as your checkout or task ID. Not unique: filter GET /card-sessions by it to find the session again. */
30
30
  reference?: string;
31
- /** Cards the user added only, for a USD purchase of at most $999,999.99. Set it when the checkout won't take the card through the proxy, for example when it collects the card in its own payment iframe. While approving, the user is also asked to approve agent payments on the card; agentToken.mandateId then says whether you can pay with an agent token. Defaults to false. */
31
+ /** Cards the user added only, for a USD purchase of at most $999,999.99. A backup for checkouts that don't send the raw card number in the HTTP request, for example ones that encrypt it in the browser, so the proxy can't swap it in. Paying through the proxy stays the default. On approval, Natural also tries to set up agent payments on the card. Most cards don't support them yet, so agentToken.mandateId is often null: then claim this session and try the proxy. Defaults to false. */
32
32
  requestAgentToken?: boolean;
33
33
  }
@@ -4,6 +4,6 @@
4
4
  export interface CreateCardSessionsResponseAgentToken {
5
5
  /** You set requestAgentToken when creating the session. */
6
6
  requested: boolean;
7
- /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments, which is common: then claim this session and try the proxy. */
8
8
  mandateId: string | null;
9
9
  }
@@ -4,6 +4,6 @@
4
4
  export interface GetCardSessionsResponseAgentToken {
5
5
  /** You set requestAgentToken when creating the session. */
6
6
  requested: boolean;
7
- /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments, which is common: then claim this session and try the proxy. */
8
8
  mandateId: string | null;
9
9
  }
@@ -4,6 +4,6 @@
4
4
  export interface ListCardSessionsResponseDataItemAgentToken {
5
5
  /** You set requestAgentToken when creating the session. */
6
6
  requested: boolean;
7
- /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments, which is common: then claim this session and try the proxy. */
8
8
  mandateId: string | null;
9
9
  }
@@ -4,6 +4,8 @@ export interface ListCardsExternalAccountsResponseDataItemAttributes {
4
4
  brand: Natural.ListCardsExternalAccountsResponseDataItemAttributesBrand;
5
5
  /** Last four digits of the card number. */
6
6
  lastFour: string;
7
+ /** The card's billing address on file, for filling a merchant's checkout (the ZIP drives the bank's AVS check). */
8
+ billingAddress: Natural.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress | null;
7
9
  /** Lifecycle status of the external account. */
8
10
  status: Natural.ListCardsExternalAccountsResponseDataItemAttributesStatus;
9
11
  /** Time when the card was linked. */
@@ -0,0 +1,9 @@
1
+ export interface ListCardsExternalAccountsResponseDataItemAttributesBillingAddress {
2
+ line1: string | null;
3
+ line2: string | null;
4
+ city: string | null;
5
+ state: string | null;
6
+ /** ZIP/postal code the bank's AVS check validates at checkout. */
7
+ postalCode: string | null;
8
+ country: string | null;
9
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -49,6 +49,7 @@ export * from "./GetExternalAccountsResponseDataType.js";
49
49
  export * from "./ListCardsExternalAccountsResponse.js";
50
50
  export * from "./ListCardsExternalAccountsResponseDataItem.js";
51
51
  export * from "./ListCardsExternalAccountsResponseDataItemAttributes.js";
52
+ export * from "./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.js";
52
53
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesBrand.js";
53
54
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesStatus.js";
54
55
  export * from "./ListCardsExternalAccountsResponseDataItemRelationships.js";
@@ -65,6 +65,7 @@ __exportStar(require("./GetExternalAccountsResponseDataType.js"), exports);
65
65
  __exportStar(require("./ListCardsExternalAccountsResponse.js"), exports);
66
66
  __exportStar(require("./ListCardsExternalAccountsResponseDataItem.js"), exports);
67
67
  __exportStar(require("./ListCardsExternalAccountsResponseDataItemAttributes.js"), exports);
68
+ __exportStar(require("./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.js"), exports);
68
69
  __exportStar(require("./ListCardsExternalAccountsResponseDataItemAttributesBrand.js"), exports);
69
70
  __exportStar(require("./ListCardsExternalAccountsResponseDataItemAttributesStatus.js"), exports);
70
71
  __exportStar(require("./ListCardsExternalAccountsResponseDataItemRelationships.js"), exports);
@@ -105,7 +105,7 @@ export declare class PaymentsClient {
105
105
  get(request: Natural.GetPaymentsRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<Natural.PaymentDetail>;
106
106
  private __get;
107
107
  /**
108
- * Cancel a payment before the recipient begins claiming it
108
+ * Cancel a pending payment claim before the recipient claims it
109
109
  *
110
110
  * @param {Natural.CancelPaymentsRequest} request
111
111
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -403,7 +403,7 @@ class PaymentsClient {
403
403
  });
404
404
  }
405
405
  /**
406
- * Cancel a payment before the recipient begins claiming it
406
+ * Cancel a pending payment claim before the recipient claims it
407
407
  *
408
408
  * @param {Natural.CancelPaymentsRequest} request
409
409
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1,6 +1,7 @@
1
1
  import type * as Natural from "../../../../api/index.js";
2
2
  import * as core from "../../../../core/index.js";
3
3
  import type * as serializers from "../../../index.js";
4
+ import { ListCardsExternalAccountsResponseDataItemAttributesBillingAddress } from "./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.js";
4
5
  import { ListCardsExternalAccountsResponseDataItemAttributesBrand } from "./ListCardsExternalAccountsResponseDataItemAttributesBrand.js";
5
6
  import { ListCardsExternalAccountsResponseDataItemAttributesStatus } from "./ListCardsExternalAccountsResponseDataItemAttributesStatus.js";
6
7
  export declare const ListCardsExternalAccountsResponseDataItemAttributes: core.serialization.ObjectSchema<serializers.ListCardsExternalAccountsResponseDataItemAttributes.Raw, Natural.ListCardsExternalAccountsResponseDataItemAttributes>;
@@ -8,6 +9,7 @@ export declare namespace ListCardsExternalAccountsResponseDataItemAttributes {
8
9
  interface Raw {
9
10
  brand: ListCardsExternalAccountsResponseDataItemAttributesBrand.Raw;
10
11
  lastFour: string;
12
+ billingAddress?: ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.Raw | null;
11
13
  status: ListCardsExternalAccountsResponseDataItemAttributesStatus.Raw;
12
14
  createdAt: string;
13
15
  }
@@ -36,11 +36,13 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.ListCardsExternalAccountsResponseDataItemAttributes = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
+ const ListCardsExternalAccountsResponseDataItemAttributesBillingAddress_js_1 = require("./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.js");
39
40
  const ListCardsExternalAccountsResponseDataItemAttributesBrand_js_1 = require("./ListCardsExternalAccountsResponseDataItemAttributesBrand.js");
40
41
  const ListCardsExternalAccountsResponseDataItemAttributesStatus_js_1 = require("./ListCardsExternalAccountsResponseDataItemAttributesStatus.js");
41
42
  exports.ListCardsExternalAccountsResponseDataItemAttributes = core.serialization.object({
42
43
  brand: ListCardsExternalAccountsResponseDataItemAttributesBrand_js_1.ListCardsExternalAccountsResponseDataItemAttributesBrand,
43
44
  lastFour: core.serialization.string(),
45
+ billingAddress: ListCardsExternalAccountsResponseDataItemAttributesBillingAddress_js_1.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.nullable(),
44
46
  status: ListCardsExternalAccountsResponseDataItemAttributesStatus_js_1.ListCardsExternalAccountsResponseDataItemAttributesStatus,
45
47
  createdAt: core.serialization.date(),
46
48
  });
@@ -0,0 +1,14 @@
1
+ import type * as Natural from "../../../../api/index.js";
2
+ import * as core from "../../../../core/index.js";
3
+ import type * as serializers from "../../../index.js";
4
+ export declare const ListCardsExternalAccountsResponseDataItemAttributesBillingAddress: core.serialization.ObjectSchema<serializers.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.Raw, Natural.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress>;
5
+ export declare namespace ListCardsExternalAccountsResponseDataItemAttributesBillingAddress {
6
+ interface Raw {
7
+ line1?: string | null;
8
+ line2?: string | null;
9
+ city?: string | null;
10
+ state?: string | null;
11
+ postalCode?: string | null;
12
+ country?: string | null;
13
+ }
14
+ }
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress = void 0;
38
+ const core = __importStar(require("../../../../core/index.js"));
39
+ exports.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress = core.serialization.object({
40
+ line1: core.serialization.string().nullable(),
41
+ line2: core.serialization.string().nullable(),
42
+ city: core.serialization.string().nullable(),
43
+ state: core.serialization.string().nullable(),
44
+ postalCode: core.serialization.string().nullable(),
45
+ country: core.serialization.string().nullable(),
46
+ });
@@ -49,6 +49,7 @@ export * from "./GetExternalAccountsResponseDataType.js";
49
49
  export * from "./ListCardsExternalAccountsResponse.js";
50
50
  export * from "./ListCardsExternalAccountsResponseDataItem.js";
51
51
  export * from "./ListCardsExternalAccountsResponseDataItemAttributes.js";
52
+ export * from "./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.js";
52
53
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesBrand.js";
53
54
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesStatus.js";
54
55
  export * from "./ListCardsExternalAccountsResponseDataItemRelationships.js";
@@ -65,6 +65,7 @@ __exportStar(require("./GetExternalAccountsResponseDataType.js"), exports);
65
65
  __exportStar(require("./ListCardsExternalAccountsResponse.js"), exports);
66
66
  __exportStar(require("./ListCardsExternalAccountsResponseDataItem.js"), exports);
67
67
  __exportStar(require("./ListCardsExternalAccountsResponseDataItemAttributes.js"), exports);
68
+ __exportStar(require("./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.js"), exports);
68
69
  __exportStar(require("./ListCardsExternalAccountsResponseDataItemAttributesBrand.js"), exports);
69
70
  __exportStar(require("./ListCardsExternalAccountsResponseDataItemAttributesStatus.js"), exports);
70
71
  __exportStar(require("./ListCardsExternalAccountsResponseDataItemRelationships.js"), exports);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.6.44";
1
+ export declare const SDK_VERSION = "1.6.46";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.6.44";
4
+ exports.SDK_VERSION = "1.6.46";
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
6
6
  const headers = mergeHeaders({
7
7
  "X-Fern-Language": "JavaScript",
8
8
  "X-Fern-SDK-Name": "@naturalpay/sdk",
9
- "X-Fern-SDK-Version": "1.6.44",
10
- "User-Agent": "@naturalpay/sdk/1.6.44",
9
+ "X-Fern-SDK-Version": "1.6.46",
10
+ "User-Agent": "@naturalpay/sdk/1.6.46",
11
11
  "X-Fern-Runtime": core.RUNTIME.type,
12
12
  "X-Fern-Runtime-Version": core.RUNTIME.version,
13
13
  "X-Instance-ID": options === null || options === void 0 ? void 0 : options.instanceId,
@@ -1,7 +1,9 @@
1
1
  import type * as Natural from "../../../index.mjs";
2
2
  export interface CardAgenticPaymentsResponseData {
3
+ /** Whether agent tokens are available on this card for you. False when you can't use the card (check saved_cards.use and the customer connection, which the proxy needs too) or agent payments aren't available in this environment (pay through the proxy). The other fields are then empty. */
3
4
  enabled: boolean;
4
5
  simulated: boolean;
6
+ /** The card's agent payment setup. Null until the owner sets it up, which happens when they approve a card session with requestAgentToken. */
5
7
  paymentMethod: Natural.CardAgenticPaymentsResponseDataPaymentMethod | null;
6
8
  mandates: Natural.CardAgenticPaymentsResponseDataMandatesItem[];
7
9
  }
@@ -28,6 +28,6 @@ export interface CreateCardSessionsRequest {
28
28
  purchase?: Natural.CreateCardSessionsRequestPurchase;
29
29
  /** Your own reference for the session, such as your checkout or task ID. Not unique: filter GET /card-sessions by it to find the session again. */
30
30
  reference?: string;
31
- /** Cards the user added only, for a USD purchase of at most $999,999.99. Set it when the checkout won't take the card through the proxy, for example when it collects the card in its own payment iframe. While approving, the user is also asked to approve agent payments on the card; agentToken.mandateId then says whether you can pay with an agent token. Defaults to false. */
31
+ /** Cards the user added only, for a USD purchase of at most $999,999.99. A backup for checkouts that don't send the raw card number in the HTTP request, for example ones that encrypt it in the browser, so the proxy can't swap it in. Paying through the proxy stays the default. On approval, Natural also tries to set up agent payments on the card. Most cards don't support them yet, so agentToken.mandateId is often null: then claim this session and try the proxy. Defaults to false. */
32
32
  requestAgentToken?: boolean;
33
33
  }
@@ -4,6 +4,6 @@
4
4
  export interface CreateCardSessionsResponseAgentToken {
5
5
  /** You set requestAgentToken when creating the session. */
6
6
  requested: boolean;
7
- /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments, which is common: then claim this session and try the proxy. */
8
8
  mandateId: string | null;
9
9
  }
@@ -4,6 +4,6 @@
4
4
  export interface GetCardSessionsResponseAgentToken {
5
5
  /** You set requestAgentToken when creating the session. */
6
6
  requested: boolean;
7
- /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments, which is common: then claim this session and try the proxy. */
8
8
  mandateId: string | null;
9
9
  }
@@ -4,6 +4,6 @@
4
4
  export interface ListCardSessionsResponseDataItemAgentToken {
5
5
  /** You set requestAgentToken when creating the session. */
6
6
  requested: boolean;
7
- /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments: then pay through the proxy (claim this session). */
7
+ /** Once the session is approved: the mandate (amd_) to pay with. Create an agentic purchase with it (POST /agentic-payments/purchases) and claim that purchase's credential. Null when you didn't ask, while the session waits for approval, and when the card couldn't take agent payments, which is common: then claim this session and try the proxy. */
8
8
  mandateId: string | null;
9
9
  }
@@ -4,6 +4,8 @@ export interface ListCardsExternalAccountsResponseDataItemAttributes {
4
4
  brand: Natural.ListCardsExternalAccountsResponseDataItemAttributesBrand;
5
5
  /** Last four digits of the card number. */
6
6
  lastFour: string;
7
+ /** The card's billing address on file, for filling a merchant's checkout (the ZIP drives the bank's AVS check). */
8
+ billingAddress: Natural.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress | null;
7
9
  /** Lifecycle status of the external account. */
8
10
  status: Natural.ListCardsExternalAccountsResponseDataItemAttributesStatus;
9
11
  /** Time when the card was linked. */
@@ -0,0 +1,9 @@
1
+ export interface ListCardsExternalAccountsResponseDataItemAttributesBillingAddress {
2
+ line1: string | null;
3
+ line2: string | null;
4
+ city: string | null;
5
+ state: string | null;
6
+ /** ZIP/postal code the bank's AVS check validates at checkout. */
7
+ postalCode: string | null;
8
+ country: string | null;
9
+ }
@@ -0,0 +1,2 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ export {};
@@ -49,6 +49,7 @@ export * from "./GetExternalAccountsResponseDataType.mjs";
49
49
  export * from "./ListCardsExternalAccountsResponse.mjs";
50
50
  export * from "./ListCardsExternalAccountsResponseDataItem.mjs";
51
51
  export * from "./ListCardsExternalAccountsResponseDataItemAttributes.mjs";
52
+ export * from "./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.mjs";
52
53
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesBrand.mjs";
53
54
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesStatus.mjs";
54
55
  export * from "./ListCardsExternalAccountsResponseDataItemRelationships.mjs";
@@ -49,6 +49,7 @@ export * from "./GetExternalAccountsResponseDataType.mjs";
49
49
  export * from "./ListCardsExternalAccountsResponse.mjs";
50
50
  export * from "./ListCardsExternalAccountsResponseDataItem.mjs";
51
51
  export * from "./ListCardsExternalAccountsResponseDataItemAttributes.mjs";
52
+ export * from "./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.mjs";
52
53
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesBrand.mjs";
53
54
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesStatus.mjs";
54
55
  export * from "./ListCardsExternalAccountsResponseDataItemRelationships.mjs";
@@ -105,7 +105,7 @@ export declare class PaymentsClient {
105
105
  get(request: Natural.GetPaymentsRequest, requestOptions?: PaymentsClient.RequestOptions): core.HttpResponsePromise<Natural.PaymentDetail>;
106
106
  private __get;
107
107
  /**
108
- * Cancel a payment before the recipient begins claiming it
108
+ * Cancel a pending payment claim before the recipient claims it
109
109
  *
110
110
  * @param {Natural.CancelPaymentsRequest} request
111
111
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -367,7 +367,7 @@ export class PaymentsClient {
367
367
  });
368
368
  }
369
369
  /**
370
- * Cancel a payment before the recipient begins claiming it
370
+ * Cancel a pending payment claim before the recipient claims it
371
371
  *
372
372
  * @param {Natural.CancelPaymentsRequest} request
373
373
  * @param {PaymentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -1,6 +1,7 @@
1
1
  import type * as Natural from "../../../../api/index.mjs";
2
2
  import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
+ import { ListCardsExternalAccountsResponseDataItemAttributesBillingAddress } from "./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.mjs";
4
5
  import { ListCardsExternalAccountsResponseDataItemAttributesBrand } from "./ListCardsExternalAccountsResponseDataItemAttributesBrand.mjs";
5
6
  import { ListCardsExternalAccountsResponseDataItemAttributesStatus } from "./ListCardsExternalAccountsResponseDataItemAttributesStatus.mjs";
6
7
  export declare const ListCardsExternalAccountsResponseDataItemAttributes: core.serialization.ObjectSchema<serializers.ListCardsExternalAccountsResponseDataItemAttributes.Raw, Natural.ListCardsExternalAccountsResponseDataItemAttributes>;
@@ -8,6 +9,7 @@ export declare namespace ListCardsExternalAccountsResponseDataItemAttributes {
8
9
  interface Raw {
9
10
  brand: ListCardsExternalAccountsResponseDataItemAttributesBrand.Raw;
10
11
  lastFour: string;
12
+ billingAddress?: ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.Raw | null;
11
13
  status: ListCardsExternalAccountsResponseDataItemAttributesStatus.Raw;
12
14
  createdAt: string;
13
15
  }
@@ -1,10 +1,12 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
+ import { ListCardsExternalAccountsResponseDataItemAttributesBillingAddress } from "./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.mjs";
3
4
  import { ListCardsExternalAccountsResponseDataItemAttributesBrand } from "./ListCardsExternalAccountsResponseDataItemAttributesBrand.mjs";
4
5
  import { ListCardsExternalAccountsResponseDataItemAttributesStatus } from "./ListCardsExternalAccountsResponseDataItemAttributesStatus.mjs";
5
6
  export const ListCardsExternalAccountsResponseDataItemAttributes = core.serialization.object({
6
7
  brand: ListCardsExternalAccountsResponseDataItemAttributesBrand,
7
8
  lastFour: core.serialization.string(),
9
+ billingAddress: ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.nullable(),
8
10
  status: ListCardsExternalAccountsResponseDataItemAttributesStatus,
9
11
  createdAt: core.serialization.date(),
10
12
  });
@@ -0,0 +1,14 @@
1
+ import type * as Natural from "../../../../api/index.mjs";
2
+ import * as core from "../../../../core/index.mjs";
3
+ import type * as serializers from "../../../index.mjs";
4
+ export declare const ListCardsExternalAccountsResponseDataItemAttributesBillingAddress: core.serialization.ObjectSchema<serializers.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.Raw, Natural.ListCardsExternalAccountsResponseDataItemAttributesBillingAddress>;
5
+ export declare namespace ListCardsExternalAccountsResponseDataItemAttributesBillingAddress {
6
+ interface Raw {
7
+ line1?: string | null;
8
+ line2?: string | null;
9
+ city?: string | null;
10
+ state?: string | null;
11
+ postalCode?: string | null;
12
+ country?: string | null;
13
+ }
14
+ }
@@ -0,0 +1,10 @@
1
+ // This file was auto-generated by Fern from our API Definition.
2
+ import * as core from "../../../../core/index.mjs";
3
+ export const ListCardsExternalAccountsResponseDataItemAttributesBillingAddress = core.serialization.object({
4
+ line1: core.serialization.string().nullable(),
5
+ line2: core.serialization.string().nullable(),
6
+ city: core.serialization.string().nullable(),
7
+ state: core.serialization.string().nullable(),
8
+ postalCode: core.serialization.string().nullable(),
9
+ country: core.serialization.string().nullable(),
10
+ });
@@ -49,6 +49,7 @@ export * from "./GetExternalAccountsResponseDataType.mjs";
49
49
  export * from "./ListCardsExternalAccountsResponse.mjs";
50
50
  export * from "./ListCardsExternalAccountsResponseDataItem.mjs";
51
51
  export * from "./ListCardsExternalAccountsResponseDataItemAttributes.mjs";
52
+ export * from "./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.mjs";
52
53
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesBrand.mjs";
53
54
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesStatus.mjs";
54
55
  export * from "./ListCardsExternalAccountsResponseDataItemRelationships.mjs";
@@ -49,6 +49,7 @@ export * from "./GetExternalAccountsResponseDataType.mjs";
49
49
  export * from "./ListCardsExternalAccountsResponse.mjs";
50
50
  export * from "./ListCardsExternalAccountsResponseDataItem.mjs";
51
51
  export * from "./ListCardsExternalAccountsResponseDataItemAttributes.mjs";
52
+ export * from "./ListCardsExternalAccountsResponseDataItemAttributesBillingAddress.mjs";
52
53
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesBrand.mjs";
53
54
  export * from "./ListCardsExternalAccountsResponseDataItemAttributesStatus.mjs";
54
55
  export * from "./ListCardsExternalAccountsResponseDataItemRelationships.mjs";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.6.44";
1
+ export declare const SDK_VERSION = "1.6.46";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.6.44";
1
+ export const SDK_VERSION = "1.6.46";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalpay/sdk",
3
- "version": "1.6.44",
3
+ "version": "1.6.46",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -1662,7 +1662,7 @@ await client.payments.get({
1662
1662
  <dl>
1663
1663
  <dd>
1664
1664
 
1665
- Cancel a payment before the recipient begins claiming it
1665
+ Cancel a pending payment claim before the recipient claims it
1666
1666
  </dd>
1667
1667
  </dl>
1668
1668
  </dd>