@hello-bill/node 2.2.0-beta.2 → 2.2.0-beta.3

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.
package/dist/index.mjs CHANGED
@@ -1025,6 +1025,12 @@ var HelloBillPartner = class {
1025
1025
  sessions;
1026
1026
  customers;
1027
1027
  bankDetails;
1028
+ /**
1029
+ * Creates a customer, then submits bank details for the same session.
1030
+ * Pass opts.idempotencyKey for stable, resumable retries across both POSTs.
1031
+ * Without one, each underlying POST uses the configured idempotency key factory.
1032
+ */
1033
+ createCustomerWithBankDetails;
1028
1034
  constructor(opts) {
1029
1035
  this.apiBaseUrl = (opts.apiBaseUrl ?? DEFAULT_API_BASE_URL).replace(/\/$/, "");
1030
1036
  this.fetchImpl = opts.fetch ?? globalThis.fetch;
@@ -1100,6 +1106,11 @@ var HelloBillPartner = class {
1100
1106
  path: `/partner/sessions/${encodeURIComponent(sessionId)}/bank-details`
1101
1107
  })
1102
1108
  };
1109
+ this.createCustomerWithBankDetails = async (sessionId, input, callOpts) => {
1110
+ const customer = await this.sessions.customers(sessionId, input.customer, callOpts);
1111
+ const bankDetails = await this.bankDetails.submit(sessionId, input.bankDetails, callOpts);
1112
+ return { customer, bankDetails };
1113
+ };
1103
1114
  }
1104
1115
  /**
1105
1116
  * Shared transport envelope: acquires a token, builds the request,