@outseta/api-client 0.4.13 → 0.4.14
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.js +11 -0
- package/package.json +1 -1
- package/src/generated/billing-v2/billing-v2.ts +67 -0
package/dist/index.js
CHANGED
|
@@ -196,6 +196,15 @@ var transactionsAddPaymentTransaction = async (transactionsAddPaymentTransaction
|
|
|
196
196
|
body: JSON.stringify(transactionsAddPaymentTransactionBody)
|
|
197
197
|
});
|
|
198
198
|
};
|
|
199
|
+
var getPaymentProcessOutstandingInvoiceUrl = (invoiceUid) => {
|
|
200
|
+
return `/api/v1/billing/payments/${invoiceUid}/processpayment`;
|
|
201
|
+
};
|
|
202
|
+
var paymentProcessOutstandingInvoice = async (invoiceUid, options) => {
|
|
203
|
+
return customFetch(getPaymentProcessOutstandingInvoiceUrl(invoiceUid), {
|
|
204
|
+
...options,
|
|
205
|
+
method: "POST"
|
|
206
|
+
});
|
|
207
|
+
};
|
|
199
208
|
var getPaymentInformationSavePaymentInformationUrl = () => {
|
|
200
209
|
return `/api/v1/billing/paymentinformation`;
|
|
201
210
|
};
|
|
@@ -2955,6 +2964,7 @@ export {
|
|
|
2955
2964
|
getInvoiceSendInvoicePaidEmailUrl,
|
|
2956
2965
|
getInvoiceUpdateInvoiceUrl,
|
|
2957
2966
|
getPaymentInformationSavePaymentInformationUrl,
|
|
2967
|
+
getPaymentProcessOutstandingInvoiceUrl,
|
|
2958
2968
|
getPersonAddPersonUrl,
|
|
2959
2969
|
getPersonDeletePersonUrl,
|
|
2960
2970
|
getPersonForgotPasswordUrl,
|
|
@@ -3058,6 +3068,7 @@ export {
|
|
|
3058
3068
|
invoiceSendInvoicePaidEmail,
|
|
3059
3069
|
invoiceUpdateInvoice,
|
|
3060
3070
|
paymentInformationSavePaymentInformation,
|
|
3071
|
+
paymentProcessOutstandingInvoice,
|
|
3061
3072
|
personAddPerson,
|
|
3062
3073
|
personDeletePerson,
|
|
3063
3074
|
personForgotPassword,
|
package/package.json
CHANGED
|
@@ -607,6 +607,73 @@ export const transactionsAddPaymentTransaction = async (transactionsAddPaymentTr
|
|
|
607
607
|
);}
|
|
608
608
|
|
|
609
609
|
|
|
610
|
+
/**
|
|
611
|
+
* Applies to Outseta billing (v2) only. With Stripe Billing (v3) the request is rejected.
|
|
612
|
+
|
|
613
|
+
Charges the outstanding amount of the invoice to the payment method on file for the
|
|
614
|
+
account. Without this call, the scheduled payment job charges an unpaid invoice no
|
|
615
|
+
sooner than 6 hours after its invoice date.
|
|
616
|
+
|
|
617
|
+
When the payment succeeds, the invoice status changes to Paid. For a payment method
|
|
618
|
+
that settles later, such as a bank debit, the status changes to Processing.
|
|
619
|
+
|
|
620
|
+
The request is rejected when the invoice is not unpaid, has no outstanding amount,
|
|
621
|
+
is already being processed, or the account has no payment method or is Expired.
|
|
622
|
+
|
|
623
|
+
When the payment is declined, the request returns a validation error. The decline
|
|
624
|
+
counts as a failed payment attempt for the account, the same as a failed renewal.
|
|
625
|
+
After the third failed attempt, the account moves to Past Due.
|
|
626
|
+
* @summary Charge an unpaid invoice now.
|
|
627
|
+
*/
|
|
628
|
+
export type paymentProcessOutstandingInvoiceResponse200 = {
|
|
629
|
+
data: Blob
|
|
630
|
+
status: 200
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
export type paymentProcessOutstandingInvoiceResponse400 = {
|
|
634
|
+
data: void
|
|
635
|
+
status: 400
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
export type paymentProcessOutstandingInvoiceResponse401 = {
|
|
639
|
+
data: void
|
|
640
|
+
status: 401
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
export type paymentProcessOutstandingInvoiceResponse404 = {
|
|
644
|
+
data: void
|
|
645
|
+
status: 404
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
export type paymentProcessOutstandingInvoiceResponseSuccess = (paymentProcessOutstandingInvoiceResponse200) & {
|
|
649
|
+
headers: Headers;
|
|
650
|
+
};
|
|
651
|
+
export type paymentProcessOutstandingInvoiceResponseError = (paymentProcessOutstandingInvoiceResponse400 | paymentProcessOutstandingInvoiceResponse401 | paymentProcessOutstandingInvoiceResponse404) & {
|
|
652
|
+
headers: Headers;
|
|
653
|
+
};
|
|
654
|
+
|
|
655
|
+
export type paymentProcessOutstandingInvoiceResponse = (paymentProcessOutstandingInvoiceResponseSuccess | paymentProcessOutstandingInvoiceResponseError)
|
|
656
|
+
|
|
657
|
+
export const getPaymentProcessOutstandingInvoiceUrl = (invoiceUid: string | null,) => {
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
|
|
662
|
+
return `/api/v1/billing/payments/${invoiceUid}/processpayment`
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
export const paymentProcessOutstandingInvoice = async (invoiceUid: string | null, options?: RequestInit): Promise<paymentProcessOutstandingInvoiceResponse> => {
|
|
666
|
+
|
|
667
|
+
return customFetch<paymentProcessOutstandingInvoiceResponse>(getPaymentProcessOutstandingInvoiceUrl(invoiceUid),
|
|
668
|
+
{
|
|
669
|
+
...options,
|
|
670
|
+
method: 'POST'
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
}
|
|
674
|
+
);}
|
|
675
|
+
|
|
676
|
+
|
|
610
677
|
/**
|
|
611
678
|
* @summary Update payment information for an account.
|
|
612
679
|
*/
|