@naturalpay/sdk 1.6.53 → 1.6.54

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 (50) hide show
  1. package/dist/cjs/BaseClient.js +2 -2
  2. package/dist/cjs/api/resources/ach/client/requests/NewAchParams.d.ts +2 -4
  3. package/dist/cjs/api/resources/ach/types/NewAchParamsDirection.d.ts +1 -2
  4. package/dist/cjs/api/resources/ach/types/NewAchParamsDirection.js +1 -2
  5. package/dist/cjs/api/resources/paymentIntents/client/Client.d.ts +3 -3
  6. package/dist/cjs/api/resources/paymentIntents/client/Client.js +3 -3
  7. package/dist/cjs/api/resources/voiceSessions/client/requests/CreateVoiceSessionsRequest.d.ts +1 -1
  8. package/dist/cjs/api/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.d.ts +0 -1
  9. package/dist/cjs/api/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.js +0 -1
  10. package/dist/cjs/api/types/PaymentIntentRelationships.d.ts +1 -1
  11. package/dist/cjs/api/types/PaymentIntentRelationshipsCardPayment.d.ts +1 -1
  12. package/dist/cjs/api/types/VoiceSessionAttributes.d.ts +2 -2
  13. package/dist/cjs/api/types/VoiceSessionAttributesStatus.d.ts +0 -1
  14. package/dist/cjs/api/types/VoiceSessionAttributesStatus.js +0 -1
  15. package/dist/cjs/serialization/resources/ach/client/requests/NewAchParams.d.ts +0 -1
  16. package/dist/cjs/serialization/resources/ach/client/requests/NewAchParams.js +0 -1
  17. package/dist/cjs/serialization/resources/ach/types/NewAchParamsDirection.d.ts +1 -1
  18. package/dist/cjs/serialization/resources/ach/types/NewAchParamsDirection.js +1 -1
  19. package/dist/cjs/serialization/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.d.ts +1 -1
  20. package/dist/cjs/serialization/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.js +1 -1
  21. package/dist/cjs/serialization/types/VoiceSessionAttributesStatus.d.ts +1 -1
  22. package/dist/cjs/serialization/types/VoiceSessionAttributesStatus.js +1 -1
  23. package/dist/cjs/version.d.ts +1 -1
  24. package/dist/cjs/version.js +1 -1
  25. package/dist/esm/BaseClient.mjs +2 -2
  26. package/dist/esm/api/resources/ach/client/requests/NewAchParams.d.mts +2 -4
  27. package/dist/esm/api/resources/ach/types/NewAchParamsDirection.d.mts +1 -2
  28. package/dist/esm/api/resources/ach/types/NewAchParamsDirection.mjs +1 -2
  29. package/dist/esm/api/resources/paymentIntents/client/Client.d.mts +3 -3
  30. package/dist/esm/api/resources/paymentIntents/client/Client.mjs +3 -3
  31. package/dist/esm/api/resources/voiceSessions/client/requests/CreateVoiceSessionsRequest.d.mts +1 -1
  32. package/dist/esm/api/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.d.mts +0 -1
  33. package/dist/esm/api/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.mjs +0 -1
  34. package/dist/esm/api/types/PaymentIntentRelationships.d.mts +1 -1
  35. package/dist/esm/api/types/PaymentIntentRelationshipsCardPayment.d.mts +1 -1
  36. package/dist/esm/api/types/VoiceSessionAttributes.d.mts +2 -2
  37. package/dist/esm/api/types/VoiceSessionAttributesStatus.d.mts +0 -1
  38. package/dist/esm/api/types/VoiceSessionAttributesStatus.mjs +0 -1
  39. package/dist/esm/serialization/resources/ach/client/requests/NewAchParams.d.mts +0 -1
  40. package/dist/esm/serialization/resources/ach/client/requests/NewAchParams.mjs +0 -1
  41. package/dist/esm/serialization/resources/ach/types/NewAchParamsDirection.d.mts +1 -1
  42. package/dist/esm/serialization/resources/ach/types/NewAchParamsDirection.mjs +1 -1
  43. package/dist/esm/serialization/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.d.mts +1 -1
  44. package/dist/esm/serialization/resources/voiceSessions/types/ListVoiceSessionsRequestStatus.mjs +1 -1
  45. package/dist/esm/serialization/types/VoiceSessionAttributesStatus.d.mts +1 -1
  46. package/dist/esm/serialization/types/VoiceSessionAttributesStatus.mjs +1 -1
  47. package/dist/esm/version.d.mts +1 -1
  48. package/dist/esm/version.mjs +1 -1
  49. package/package.json +1 -1
  50. package/reference.md +2 -2
@@ -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.53",
47
- "User-Agent": "@naturalpay/sdk/1.6.53",
46
+ "X-Fern-SDK-Version": "1.6.54",
47
+ "User-Agent": "@naturalpay/sdk/1.6.54",
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,
@@ -17,18 +17,16 @@ export interface NewAchParams {
17
17
  idempotencyKey: string;
18
18
  /** Customer party to act for (pty_*). Omit to act as your own party. To act for another party, pass the ID of a party that has authorized you to act on its behalf. */
19
19
  customerPartyId?: string;
20
- /** Direction of the payment. */
20
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
21
21
  direction: Natural.NewAchParamsDirection;
22
22
  /** Amount in cents. */
23
23
  amount: number;
24
24
  /** Currency code. Defaults to USD. */
25
25
  currency?: Natural.NewAchParamsCurrency;
26
- /** Wallet (wal_*) that funds an ACH credit or receives an ACH debit. Omit to use the party default for user or party API calls, or the agent default for the current customer connection when acting through a connected agent. Owned agents use their own agent default. */
26
+ /** Wallet (wal_*) that funds the ACH credit. Omit to use the party default for user or party API calls, or the agent default for the current customer connection when acting through a connected agent. Owned agents use their own agent default. */
27
27
  walletId?: string;
28
28
  /** External party account (epa_*) to pay. */
29
29
  externalPartyAccountId: string;
30
- /** Mandate (mdt_*) authorizing the debit. Required for debits; not allowed for credits. */
31
- mandateId?: string;
32
30
  /** ACH company entry description. Delivered to the receiving bank on the entry. Maximum 10 characters. */
33
31
  companyEntryDescription: string;
34
32
  /** Description for your internal reference. Never shared with the counterparty or the banking network. Maximum 255 characters. */
@@ -1,6 +1,5 @@
1
- /** Direction of the payment. */
1
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
2
2
  export declare const NewAchParamsDirection: {
3
- readonly Debit: "debit";
4
3
  readonly Credit: "credit";
5
4
  };
6
5
  export type NewAchParamsDirection = (typeof NewAchParamsDirection)[keyof typeof NewAchParamsDirection];
@@ -2,8 +2,7 @@
2
2
  // This file was auto-generated by Fern from our API Definition.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.NewAchParamsDirection = void 0;
5
- /** Direction of the payment. */
5
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
6
6
  exports.NewAchParamsDirection = {
7
- Debit: "debit",
8
7
  Credit: "credit",
9
8
  };
@@ -8,7 +8,7 @@ export declare namespace PaymentIntentsClient {
8
8
  }
9
9
  }
10
10
  /**
11
- * Accept card payments by link or voice
11
+ * Accept card payments by link or voice, or charge a saved card
12
12
  */
13
13
  export declare class PaymentIntentsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<PaymentIntentsClient.Options>;
@@ -39,7 +39,7 @@ export declare class PaymentIntentsClient {
39
39
  */
40
40
  list(request?: Natural.ListPaymentIntentsRequest, requestOptions?: PaymentIntentsClient.RequestOptions): Promise<core.Page<Natural.PaymentIntent, Natural.ListPaymentIntentsResponse>>;
41
41
  /**
42
- * Create a payment intent with a hosted checkout link
42
+ * Create a payment intent to collect a payment
43
43
  *
44
44
  * @param {Natural.CreatePaymentIntentsRequest} request
45
45
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -150,7 +150,7 @@ export declare class PaymentIntentsClient {
150
150
  update(request: Natural.UpdatePaymentIntentsRequest, requestOptions?: PaymentIntentsClient.RequestOptions): core.HttpResponsePromise<Natural.UpdatePaymentIntentsResponse>;
151
151
  private __update;
152
152
  /**
153
- * Cancel an open payment intent
153
+ * Cancel a payment intent that isn't paid yet
154
154
  *
155
155
  * @param {Natural.CancelPaymentIntentsRequest} request
156
156
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -65,7 +65,7 @@ const errors = __importStar(require("../../../../errors/index.js"));
65
65
  const serializers = __importStar(require("../../../../serialization/index.js"));
66
66
  const Natural = __importStar(require("../../../index.js"));
67
67
  /**
68
- * Accept card payments by link or voice
68
+ * Accept card payments by link or voice, or charge a saved card
69
69
  */
70
70
  class PaymentIntentsClient {
71
71
  constructor(options = {}) {
@@ -195,7 +195,7 @@ class PaymentIntentsClient {
195
195
  });
196
196
  }
197
197
  /**
198
- * Create a payment intent with a hosted checkout link
198
+ * Create a payment intent to collect a payment
199
199
  *
200
200
  * @param {Natural.CreatePaymentIntentsRequest} request
201
201
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -532,7 +532,7 @@ class PaymentIntentsClient {
532
532
  });
533
533
  }
534
534
  /**
535
- * Cancel an open payment intent
535
+ * Cancel a payment intent that isn't paid yet
536
536
  *
537
537
  * @param {Natural.CancelPaymentIntentsRequest} request
538
538
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -23,6 +23,6 @@ export interface CreateVoiceSessionsRequest {
23
23
  callerPhone: string;
24
24
  /** Your reference for this voice session. */
25
25
  referenceId?: string;
26
- /** SIP URI to request a return transfer to when the payment call finishes. */
26
+ /** SIP URI with a public host to request a return transfer to when the payment call finishes. */
27
27
  returnTarget?: string;
28
28
  }
@@ -3,7 +3,6 @@ export declare const ListVoiceSessionsRequestStatus: {
3
3
  readonly AwaitingCall: "awaitingCall";
4
4
  readonly InProgress: "inProgress";
5
5
  readonly Ended: "ended";
6
- readonly Failed: "failed";
7
6
  readonly Canceled: "canceled";
8
7
  readonly Expired: "expired";
9
8
  };
@@ -7,7 +7,6 @@ exports.ListVoiceSessionsRequestStatus = {
7
7
  AwaitingCall: "awaitingCall",
8
8
  InProgress: "inProgress",
9
9
  Ended: "ended",
10
- Failed: "failed",
11
10
  Canceled: "canceled",
12
11
  Expired: "expired",
13
12
  };
@@ -2,7 +2,7 @@ import type * as Natural from "../index.js";
2
2
  export interface PaymentIntentRelationships {
3
3
  /** The party being paid. */
4
4
  customerParty: Natural.PaymentIntentRelationshipsCustomerParty;
5
- /** Successful card payment. Null until a payment succeeds. */
5
+ /** The card payment the issuer approved. Null until one is approved. */
6
6
  cardPayment: Natural.PaymentIntentRelationshipsCardPayment;
7
7
  /** Latest voice session for this intent. Null when no session has been created. */
8
8
  voiceSession: Natural.PaymentIntentRelationshipsVoiceSession;
@@ -1,6 +1,6 @@
1
1
  import type * as Natural from "../index.js";
2
2
  /**
3
- * Successful card payment. Null until a payment succeeds.
3
+ * The card payment the issuer approved. Null until one is approved.
4
4
  */
5
5
  export interface PaymentIntentRelationshipsCardPayment {
6
6
  /** Related resource identifier. */
@@ -8,14 +8,14 @@ export interface VoiceSessionAttributes {
8
8
  referenceId: string | null;
9
9
  /** Supplied caller phone number, or null for a session without one. */
10
10
  callerPhone: string | null;
11
- /** Dial destination while the session accepts a call and you have permission to create payment voice sessions. Otherwise null. */
11
+ /** Dial destination while the session accepts a call and you have permission to create payment voice sessions. Otherwise null. Treat it as opaque: store it from the create response and never build it from the session ID. */
12
12
  dialUri: string | null;
13
13
  /** RFC 3339 deadline for starting the session's one permitted call. */
14
14
  dialExpiresAt: string;
15
15
  /** Requested return destination, or null. This does not confirm the destination answered. */
16
16
  returnTarget: string | null;
17
17
  call: Natural.VoiceSessionAttributesCall;
18
- /** RFC 3339 time the session completed, or null. Set once the call has ended and the kind's block holds its result. `voiceSession.completed` fires then. */
18
+ /** RFC 3339 time the session closed, or null. Set once the call has ended and its result is known, or the session expired or was canceled. `voiceSession.completed` fires once then. */
19
19
  completedAt: string | null;
20
20
  /** RFC 3339 time the session was created. */
21
21
  createdAt: string;
@@ -3,7 +3,6 @@ export declare const VoiceSessionAttributesStatus: {
3
3
  readonly AwaitingCall: "awaitingCall";
4
4
  readonly InProgress: "inProgress";
5
5
  readonly Ended: "ended";
6
- readonly Failed: "failed";
7
6
  readonly Canceled: "canceled";
8
7
  readonly Expired: "expired";
9
8
  };
@@ -7,7 +7,6 @@ exports.VoiceSessionAttributesStatus = {
7
7
  AwaitingCall: "awaitingCall",
8
8
  InProgress: "inProgress",
9
9
  Ended: "ended",
10
- Failed: "failed",
11
10
  Canceled: "canceled",
12
11
  Expired: "expired",
13
12
  };
@@ -12,7 +12,6 @@ export declare namespace NewAchParams {
12
12
  currency?: NewAchParamsCurrency.Raw | null;
13
13
  walletId?: string | null;
14
14
  externalPartyAccountId: string;
15
- mandateId?: string | null;
16
15
  companyEntryDescription: string;
17
16
  internalDescription?: string | null;
18
17
  addenda?: string | null;
@@ -45,7 +45,6 @@ exports.NewAchParams = core.serialization.object({
45
45
  currency: NewAchParamsCurrency_js_1.NewAchParamsCurrency.optional(),
46
46
  walletId: core.serialization.string().optional(),
47
47
  externalPartyAccountId: core.serialization.string(),
48
- mandateId: core.serialization.string().optional(),
49
48
  companyEntryDescription: core.serialization.string(),
50
49
  internalDescription: core.serialization.string().optional(),
51
50
  addenda: core.serialization.string().optional(),
@@ -3,5 +3,5 @@ import * as core from "../../../../core/index.js";
3
3
  import type * as serializers from "../../../index.js";
4
4
  export declare const NewAchParamsDirection: core.serialization.Schema<serializers.NewAchParamsDirection.Raw, Natural.NewAchParamsDirection>;
5
5
  export declare namespace NewAchParamsDirection {
6
- type Raw = "debit" | "credit";
6
+ type Raw = "credit";
7
7
  }
@@ -36,4 +36,4 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.NewAchParamsDirection = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
- exports.NewAchParamsDirection = core.serialization.enum_(["debit", "credit"]);
39
+ exports.NewAchParamsDirection = core.serialization.enum_(["credit"]);
@@ -3,5 +3,5 @@ import * as core from "../../../../core/index.js";
3
3
  import type * as serializers from "../../../index.js";
4
4
  export declare const ListVoiceSessionsRequestStatus: core.serialization.Schema<serializers.ListVoiceSessionsRequestStatus.Raw, Natural.ListVoiceSessionsRequestStatus>;
5
5
  export declare namespace ListVoiceSessionsRequestStatus {
6
- type Raw = "awaitingCall" | "inProgress" | "ended" | "failed" | "canceled" | "expired";
6
+ type Raw = "awaitingCall" | "inProgress" | "ended" | "canceled" | "expired";
7
7
  }
@@ -36,4 +36,4 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.ListVoiceSessionsRequestStatus = void 0;
38
38
  const core = __importStar(require("../../../../core/index.js"));
39
- exports.ListVoiceSessionsRequestStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "failed", "canceled", "expired"]);
39
+ exports.ListVoiceSessionsRequestStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "canceled", "expired"]);
@@ -3,5 +3,5 @@ import * as core from "../../core/index.js";
3
3
  import type * as serializers from "../index.js";
4
4
  export declare const VoiceSessionAttributesStatus: core.serialization.Schema<serializers.VoiceSessionAttributesStatus.Raw, Natural.VoiceSessionAttributesStatus>;
5
5
  export declare namespace VoiceSessionAttributesStatus {
6
- type Raw = "awaitingCall" | "inProgress" | "ended" | "failed" | "canceled" | "expired";
6
+ type Raw = "awaitingCall" | "inProgress" | "ended" | "canceled" | "expired";
7
7
  }
@@ -36,4 +36,4 @@ var __importStar = (this && this.__importStar) || (function () {
36
36
  Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.VoiceSessionAttributesStatus = void 0;
38
38
  const core = __importStar(require("../../core/index.js"));
39
- exports.VoiceSessionAttributesStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "failed", "canceled", "expired"]);
39
+ exports.VoiceSessionAttributesStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "canceled", "expired"]);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.6.53";
1
+ export declare const SDK_VERSION = "1.6.54";
@@ -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.53";
4
+ exports.SDK_VERSION = "1.6.54";
@@ -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.53",
10
- "User-Agent": "@naturalpay/sdk/1.6.53",
9
+ "X-Fern-SDK-Version": "1.6.54",
10
+ "User-Agent": "@naturalpay/sdk/1.6.54",
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,
@@ -17,18 +17,16 @@ export interface NewAchParams {
17
17
  idempotencyKey: string;
18
18
  /** Customer party to act for (pty_*). Omit to act as your own party. To act for another party, pass the ID of a party that has authorized you to act on its behalf. */
19
19
  customerPartyId?: string;
20
- /** Direction of the payment. */
20
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
21
21
  direction: Natural.NewAchParamsDirection;
22
22
  /** Amount in cents. */
23
23
  amount: number;
24
24
  /** Currency code. Defaults to USD. */
25
25
  currency?: Natural.NewAchParamsCurrency;
26
- /** Wallet (wal_*) that funds an ACH credit or receives an ACH debit. Omit to use the party default for user or party API calls, or the agent default for the current customer connection when acting through a connected agent. Owned agents use their own agent default. */
26
+ /** Wallet (wal_*) that funds the ACH credit. Omit to use the party default for user or party API calls, or the agent default for the current customer connection when acting through a connected agent. Owned agents use their own agent default. */
27
27
  walletId?: string;
28
28
  /** External party account (epa_*) to pay. */
29
29
  externalPartyAccountId: string;
30
- /** Mandate (mdt_*) authorizing the debit. Required for debits; not allowed for credits. */
31
- mandateId?: string;
32
30
  /** ACH company entry description. Delivered to the receiving bank on the entry. Maximum 10 characters. */
33
31
  companyEntryDescription: string;
34
32
  /** Description for your internal reference. Never shared with the counterparty or the banking network. Maximum 255 characters. */
@@ -1,6 +1,5 @@
1
- /** Direction of the payment. */
1
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
2
2
  export declare const NewAchParamsDirection: {
3
- readonly Debit: "debit";
4
3
  readonly Credit: "credit";
5
4
  };
6
5
  export type NewAchParamsDirection = (typeof NewAchParamsDirection)[keyof typeof NewAchParamsDirection];
@@ -1,6 +1,5 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
- /** Direction of the payment. */
2
+ /** Direction of the payment. Direct ACH only sends money, so this is always credit. */
3
3
  export const NewAchParamsDirection = {
4
- Debit: "debit",
5
4
  Credit: "credit",
6
5
  };
@@ -8,7 +8,7 @@ export declare namespace PaymentIntentsClient {
8
8
  }
9
9
  }
10
10
  /**
11
- * Accept card payments by link or voice
11
+ * Accept card payments by link or voice, or charge a saved card
12
12
  */
13
13
  export declare class PaymentIntentsClient {
14
14
  protected readonly _options: NormalizedClientOptionsWithAuth<PaymentIntentsClient.Options>;
@@ -39,7 +39,7 @@ export declare class PaymentIntentsClient {
39
39
  */
40
40
  list(request?: Natural.ListPaymentIntentsRequest, requestOptions?: PaymentIntentsClient.RequestOptions): Promise<core.Page<Natural.PaymentIntent, Natural.ListPaymentIntentsResponse>>;
41
41
  /**
42
- * Create a payment intent with a hosted checkout link
42
+ * Create a payment intent to collect a payment
43
43
  *
44
44
  * @param {Natural.CreatePaymentIntentsRequest} request
45
45
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -150,7 +150,7 @@ export declare class PaymentIntentsClient {
150
150
  update(request: Natural.UpdatePaymentIntentsRequest, requestOptions?: PaymentIntentsClient.RequestOptions): core.HttpResponsePromise<Natural.UpdatePaymentIntentsResponse>;
151
151
  private __update;
152
152
  /**
153
- * Cancel an open payment intent
153
+ * Cancel a payment intent that isn't paid yet
154
154
  *
155
155
  * @param {Natural.CancelPaymentIntentsRequest} request
156
156
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -29,7 +29,7 @@ import * as errors from "../../../../errors/index.mjs";
29
29
  import * as serializers from "../../../../serialization/index.mjs";
30
30
  import * as Natural from "../../../index.mjs";
31
31
  /**
32
- * Accept card payments by link or voice
32
+ * Accept card payments by link or voice, or charge a saved card
33
33
  */
34
34
  export class PaymentIntentsClient {
35
35
  constructor(options = {}) {
@@ -159,7 +159,7 @@ export class PaymentIntentsClient {
159
159
  });
160
160
  }
161
161
  /**
162
- * Create a payment intent with a hosted checkout link
162
+ * Create a payment intent to collect a payment
163
163
  *
164
164
  * @param {Natural.CreatePaymentIntentsRequest} request
165
165
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -496,7 +496,7 @@ export class PaymentIntentsClient {
496
496
  });
497
497
  }
498
498
  /**
499
- * Cancel an open payment intent
499
+ * Cancel a payment intent that isn't paid yet
500
500
  *
501
501
  * @param {Natural.CancelPaymentIntentsRequest} request
502
502
  * @param {PaymentIntentsClient.RequestOptions} requestOptions - Request-specific configuration.
@@ -23,6 +23,6 @@ export interface CreateVoiceSessionsRequest {
23
23
  callerPhone: string;
24
24
  /** Your reference for this voice session. */
25
25
  referenceId?: string;
26
- /** SIP URI to request a return transfer to when the payment call finishes. */
26
+ /** SIP URI with a public host to request a return transfer to when the payment call finishes. */
27
27
  returnTarget?: string;
28
28
  }
@@ -3,7 +3,6 @@ export declare const ListVoiceSessionsRequestStatus: {
3
3
  readonly AwaitingCall: "awaitingCall";
4
4
  readonly InProgress: "inProgress";
5
5
  readonly Ended: "ended";
6
- readonly Failed: "failed";
7
6
  readonly Canceled: "canceled";
8
7
  readonly Expired: "expired";
9
8
  };
@@ -4,7 +4,6 @@ export const ListVoiceSessionsRequestStatus = {
4
4
  AwaitingCall: "awaitingCall",
5
5
  InProgress: "inProgress",
6
6
  Ended: "ended",
7
- Failed: "failed",
8
7
  Canceled: "canceled",
9
8
  Expired: "expired",
10
9
  };
@@ -2,7 +2,7 @@ import type * as Natural from "../index.mjs";
2
2
  export interface PaymentIntentRelationships {
3
3
  /** The party being paid. */
4
4
  customerParty: Natural.PaymentIntentRelationshipsCustomerParty;
5
- /** Successful card payment. Null until a payment succeeds. */
5
+ /** The card payment the issuer approved. Null until one is approved. */
6
6
  cardPayment: Natural.PaymentIntentRelationshipsCardPayment;
7
7
  /** Latest voice session for this intent. Null when no session has been created. */
8
8
  voiceSession: Natural.PaymentIntentRelationshipsVoiceSession;
@@ -1,6 +1,6 @@
1
1
  import type * as Natural from "../index.mjs";
2
2
  /**
3
- * Successful card payment. Null until a payment succeeds.
3
+ * The card payment the issuer approved. Null until one is approved.
4
4
  */
5
5
  export interface PaymentIntentRelationshipsCardPayment {
6
6
  /** Related resource identifier. */
@@ -8,14 +8,14 @@ export interface VoiceSessionAttributes {
8
8
  referenceId: string | null;
9
9
  /** Supplied caller phone number, or null for a session without one. */
10
10
  callerPhone: string | null;
11
- /** Dial destination while the session accepts a call and you have permission to create payment voice sessions. Otherwise null. */
11
+ /** Dial destination while the session accepts a call and you have permission to create payment voice sessions. Otherwise null. Treat it as opaque: store it from the create response and never build it from the session ID. */
12
12
  dialUri: string | null;
13
13
  /** RFC 3339 deadline for starting the session's one permitted call. */
14
14
  dialExpiresAt: string;
15
15
  /** Requested return destination, or null. This does not confirm the destination answered. */
16
16
  returnTarget: string | null;
17
17
  call: Natural.VoiceSessionAttributesCall;
18
- /** RFC 3339 time the session completed, or null. Set once the call has ended and the kind's block holds its result. `voiceSession.completed` fires then. */
18
+ /** RFC 3339 time the session closed, or null. Set once the call has ended and its result is known, or the session expired or was canceled. `voiceSession.completed` fires once then. */
19
19
  completedAt: string | null;
20
20
  /** RFC 3339 time the session was created. */
21
21
  createdAt: string;
@@ -3,7 +3,6 @@ export declare const VoiceSessionAttributesStatus: {
3
3
  readonly AwaitingCall: "awaitingCall";
4
4
  readonly InProgress: "inProgress";
5
5
  readonly Ended: "ended";
6
- readonly Failed: "failed";
7
6
  readonly Canceled: "canceled";
8
7
  readonly Expired: "expired";
9
8
  };
@@ -4,7 +4,6 @@ export const VoiceSessionAttributesStatus = {
4
4
  AwaitingCall: "awaitingCall",
5
5
  InProgress: "inProgress",
6
6
  Ended: "ended",
7
- Failed: "failed",
8
7
  Canceled: "canceled",
9
8
  Expired: "expired",
10
9
  };
@@ -12,7 +12,6 @@ export declare namespace NewAchParams {
12
12
  currency?: NewAchParamsCurrency.Raw | null;
13
13
  walletId?: string | null;
14
14
  externalPartyAccountId: string;
15
- mandateId?: string | null;
16
15
  companyEntryDescription: string;
17
16
  internalDescription?: string | null;
18
17
  addenda?: string | null;
@@ -9,7 +9,6 @@ export const NewAchParams = core.serialization.object({
9
9
  currency: NewAchParamsCurrency.optional(),
10
10
  walletId: core.serialization.string().optional(),
11
11
  externalPartyAccountId: core.serialization.string(),
12
- mandateId: core.serialization.string().optional(),
13
12
  companyEntryDescription: core.serialization.string(),
14
13
  internalDescription: core.serialization.string().optional(),
15
14
  addenda: core.serialization.string().optional(),
@@ -3,5 +3,5 @@ import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  export declare const NewAchParamsDirection: core.serialization.Schema<serializers.NewAchParamsDirection.Raw, Natural.NewAchParamsDirection>;
5
5
  export declare namespace NewAchParamsDirection {
6
- type Raw = "debit" | "credit";
6
+ type Raw = "credit";
7
7
  }
@@ -1,3 +1,3 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
- export const NewAchParamsDirection = core.serialization.enum_(["debit", "credit"]);
3
+ export const NewAchParamsDirection = core.serialization.enum_(["credit"]);
@@ -3,5 +3,5 @@ import * as core from "../../../../core/index.mjs";
3
3
  import type * as serializers from "../../../index.mjs";
4
4
  export declare const ListVoiceSessionsRequestStatus: core.serialization.Schema<serializers.ListVoiceSessionsRequestStatus.Raw, Natural.ListVoiceSessionsRequestStatus>;
5
5
  export declare namespace ListVoiceSessionsRequestStatus {
6
- type Raw = "awaitingCall" | "inProgress" | "ended" | "failed" | "canceled" | "expired";
6
+ type Raw = "awaitingCall" | "inProgress" | "ended" | "canceled" | "expired";
7
7
  }
@@ -1,3 +1,3 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../../../core/index.mjs";
3
- export const ListVoiceSessionsRequestStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "failed", "canceled", "expired"]);
3
+ export const ListVoiceSessionsRequestStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "canceled", "expired"]);
@@ -3,5 +3,5 @@ import * as core from "../../core/index.mjs";
3
3
  import type * as serializers from "../index.mjs";
4
4
  export declare const VoiceSessionAttributesStatus: core.serialization.Schema<serializers.VoiceSessionAttributesStatus.Raw, Natural.VoiceSessionAttributesStatus>;
5
5
  export declare namespace VoiceSessionAttributesStatus {
6
- type Raw = "awaitingCall" | "inProgress" | "ended" | "failed" | "canceled" | "expired";
6
+ type Raw = "awaitingCall" | "inProgress" | "ended" | "canceled" | "expired";
7
7
  }
@@ -1,3 +1,3 @@
1
1
  // This file was auto-generated by Fern from our API Definition.
2
2
  import * as core from "../../core/index.mjs";
3
- export const VoiceSessionAttributesStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "failed", "canceled", "expired"]);
3
+ export const VoiceSessionAttributesStatus = core.serialization.enum_(["awaitingCall", "inProgress", "ended", "canceled", "expired"]);
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.6.53";
1
+ export declare const SDK_VERSION = "1.6.54";
@@ -1 +1 @@
1
- export const SDK_VERSION = "1.6.53";
1
+ export const SDK_VERSION = "1.6.54";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalpay/sdk",
3
- "version": "1.6.53",
3
+ "version": "1.6.54",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
package/reference.md CHANGED
@@ -3405,7 +3405,7 @@ const response = page.response;
3405
3405
  <dl>
3406
3406
  <dd>
3407
3407
 
3408
- Create a payment intent with a hosted checkout link
3408
+ Create a payment intent to collect a payment
3409
3409
  </dd>
3410
3410
  </dl>
3411
3411
  </dd>
@@ -3627,7 +3627,7 @@ await client.paymentIntents.update({
3627
3627
  <dl>
3628
3628
  <dd>
3629
3629
 
3630
- Cancel an open payment intent
3630
+ Cancel a payment intent that isn't paid yet
3631
3631
  </dd>
3632
3632
  </dl>
3633
3633
  </dd>