@justifi/webcomponents 4.13.0 → 4.15.0
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/cjs/{Api-ab34a402.js → Api-3bc6e43f.js} +7 -2
- package/dist/cjs/{Payment-eceed10f.js → Payment-24f22eca.js} +2 -1
- package/dist/cjs/{SubAccount-b3902202.js → SubAccount-f1eda5da.js} +1 -1
- package/dist/cjs/additional-questions-details_5.cjs.entry.js +1 -1
- package/dist/cjs/business-additional-questions-schema-e7dd7bc3.js +57 -0
- package/dist/cjs/gross-payment-chart-core.cjs.entry.js +1 -1
- package/dist/cjs/{index.esm-d25bd7bf.js → index.esm-a32e1831.js} +727 -0
- package/dist/cjs/justifi-additional-questions-form-step_5.cjs.entry.js +20 -17
- package/dist/cjs/justifi-additional-questions_4.cjs.entry.js +4 -1
- package/dist/cjs/justifi-billing-form_2.cjs.entry.js +1796 -0
- package/dist/cjs/justifi-business-details.cjs.entry.js +2 -2
- package/dist/cjs/justifi-business-form.cjs.entry.js +8 -8
- package/dist/cjs/justifi-business-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-checkout-core.cjs.entry.js +7 -3
- package/dist/cjs/justifi-checkout.cjs.entry.js +12 -6
- package/dist/cjs/justifi-gross-payment-chart.cjs.entry.js +2 -2
- package/dist/cjs/justifi-new-payment-method_4.cjs.entry.js +13 -11
- package/dist/cjs/justifi-owner-form.cjs.entry.js +12 -8
- package/dist/cjs/justifi-payment-balance-transactions.cjs.entry.js +4 -4
- package/dist/cjs/justifi-payment-details.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payment-form.cjs.entry.js +39 -5
- package/dist/cjs/justifi-payment-method-selector.cjs.entry.js +1 -1
- package/dist/cjs/justifi-payments-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payout-details.cjs.entry.js +3 -3
- package/dist/cjs/justifi-payouts-list.cjs.entry.js +3 -3
- package/dist/cjs/justifi-proceeds-list.cjs.entry.js +4 -4
- package/dist/cjs/justifi-refund-form.cjs.entry.js +5 -6
- package/dist/cjs/justifi-subaccount-details.cjs.entry.js +6 -6
- package/dist/cjs/justifi-subaccounts-list.cjs.entry.js +5 -5
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/payload-parsers-c2df4b29.js +95 -0
- package/dist/cjs/payment-details-core.cjs.entry.js +1 -1
- package/dist/cjs/{payment.service-336189d3.js → payment.service-35298e95.js} +4 -4
- package/dist/cjs/payments-list-core.cjs.entry.js +2 -2
- package/dist/cjs/payout-details-core.cjs.entry.js +1 -1
- package/dist/cjs/{payout.service-6012d576.js → payout.service-eec372aa.js} +4 -4
- package/dist/cjs/payouts-list-core.cjs.entry.js +2 -2
- package/dist/cjs/{payload-parsers-6c4b5323.js → schema-validations-3c70335c.js} +15 -89
- package/dist/cjs/select-input.cjs.entry.js +31 -0
- package/dist/cjs/subaccount-account-details_4.cjs.entry.js +1 -1
- package/dist/cjs/text-input.cjs.entry.js +30 -0
- package/dist/cjs/{utils-6f62f7a1.js → utils-e58fe016.js} +0 -2
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/api/Api.js +7 -2
- package/dist/collection/api/Payment.js +2 -1
- package/dist/collection/api/services/business.service.js +1 -1
- package/dist/collection/api/services/checkout.service.js +5 -3
- package/dist/collection/api/services/payment.service.js +2 -2
- package/dist/collection/api/services/payout.service.js +2 -2
- package/dist/collection/api/services/reports.service.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/billing-form/billing-form-schema.js +8 -8
- package/dist/collection/components/billing-form/billing-form.js +49 -89
- package/dist/collection/components/billing-form/test/billing-form.spec.js +2 -1
- package/dist/collection/components/business-forms/business-form/business-form.js +1 -1
- package/dist/collection/components/business-forms/business-form/business-representative/business-representative.js +4 -1
- package/dist/collection/components/business-forms/owner-form/owner-form.js +6 -2
- package/dist/collection/components/business-forms/payment-provisioning/additional-questions/business-additional-questions-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-core-info/business-core-info-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-owners/business-owners-form-step.js +1 -1
- package/dist/collection/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.js +5 -2
- package/dist/collection/components/business-forms/payment-provisioning/legal-address-form/legal-address-form-step.js +1 -1
- package/dist/collection/components/business-forms/schemas/business-identity-schema.js +4 -2
- package/dist/collection/components/business-forms/schemas/schema-validations.js +5 -0
- package/dist/collection/components/business-list/business-list.js +1 -1
- package/dist/collection/components/checkout/checkout-core.js +74 -2
- package/dist/collection/components/checkout/checkout.js +73 -1
- package/dist/collection/components/checkout/payment-method-options.css +6 -6
- package/dist/collection/components/checkout/payment-method-options.js +42 -6
- package/dist/collection/components/checkout/{sezzel-payment-method.js → sezzle-payment-method.js} +2 -2
- package/dist/collection/components/checkout/test/checkout-core.spec.js +1 -1
- package/dist/collection/components/payment-balance-transactions/payment-balance-transactions.js +1 -1
- package/dist/collection/components/payment-form/payment-form.js +56 -6
- package/dist/collection/components/payment-form/payment-method-selector.js +1 -1
- package/dist/collection/components/payment-form/test/payment-form.spec.js +18 -35
- package/dist/collection/components/payment-method-form/payment-method-form.js +1 -1
- package/dist/collection/components/proceeds-list/proceeds-list.js +1 -1
- package/dist/collection/components/refund-form/refund-form.js +1 -1
- package/dist/collection/components/subaccount-details/subaccount-details.js +2 -2
- package/dist/collection/components/subaccounts-list/subaccounts-list.js +1 -1
- package/dist/docs.json +287 -81
- package/dist/esm/{Api-e9d568c7.js → Api-b09a2f6a.js} +7 -2
- package/dist/esm/{Payment-ef9fc1ae.js → Payment-3e94da9c.js} +2 -1
- package/dist/esm/{SubAccount-f4ae9809.js → SubAccount-80d46814.js} +1 -1
- package/dist/esm/additional-questions-details_5.entry.js +1 -1
- package/dist/esm/{business-additional-questions-schema-e96b0509.js → business-additional-questions-schema-1fdc5c40.js} +2 -2
- package/dist/esm/gross-payment-chart-core.entry.js +1 -1
- package/dist/esm/{index.esm-22b47398.js → index.esm-d98bc080.js} +727 -1
- package/dist/esm/justifi-additional-questions-form-step_5.entry.js +16 -13
- package/dist/esm/justifi-additional-questions_4.entry.js +4 -1
- package/dist/esm/justifi-billing-form_2.entry.js +1791 -0
- package/dist/esm/justifi-business-details.entry.js +2 -2
- package/dist/esm/justifi-business-form.entry.js +7 -7
- package/dist/esm/justifi-business-list.entry.js +4 -4
- package/dist/esm/justifi-checkout-core.entry.js +7 -3
- package/dist/esm/justifi-checkout.entry.js +12 -6
- package/dist/esm/justifi-gross-payment-chart.entry.js +2 -2
- package/dist/esm/justifi-new-payment-method_4.entry.js +13 -11
- package/dist/esm/justifi-owner-form.entry.js +11 -7
- package/dist/esm/justifi-payment-balance-transactions.entry.js +4 -4
- package/dist/esm/justifi-payment-details.entry.js +3 -3
- package/dist/esm/justifi-payment-form.entry.js +39 -5
- package/dist/esm/justifi-payment-method-selector.entry.js +1 -1
- package/dist/esm/justifi-payments-list.entry.js +3 -3
- package/dist/esm/justifi-payout-details.entry.js +3 -3
- package/dist/esm/justifi-payouts-list.entry.js +3 -3
- package/dist/esm/justifi-proceeds-list.entry.js +4 -4
- package/dist/esm/justifi-refund-form.entry.js +4 -5
- package/dist/esm/justifi-subaccount-details.entry.js +6 -6
- package/dist/esm/justifi-subaccounts-list.entry.js +5 -5
- package/dist/esm/loader.js +1 -1
- package/dist/esm/payload-parsers-fd35eeca.js +88 -0
- package/dist/esm/payment-details-core.entry.js +1 -1
- package/dist/esm/{payment.service-2fdc5018.js → payment.service-c62d82d3.js} +4 -4
- package/dist/esm/payments-list-core.entry.js +2 -2
- package/dist/esm/payout-details-core.entry.js +1 -1
- package/dist/esm/{payout.service-15064bcc.js → payout.service-28b9594f.js} +4 -4
- package/dist/esm/payouts-list-core.entry.js +2 -2
- package/dist/esm/{payload-parsers-32028700.js → schema-validations-31feaa53.js} +7 -84
- package/dist/{module/select-input2.js → esm/select-input.entry.js} +7 -30
- package/dist/esm/subaccount-account-details_4.entry.js +1 -1
- package/dist/{module/text-input2.js → esm/text-input.entry.js} +7 -29
- package/dist/esm/{utils-243abdb4.js → utils-37533368.js} +1 -2
- package/dist/esm/webcomponents.js +1 -1
- package/dist/module/Api.js +7 -2
- package/dist/module/Payment.js +2 -1
- package/dist/module/billing-form.js +41 -62
- package/dist/module/business-additional-questions-form-step.js +2 -2
- package/dist/module/business-additional-questions-schema.js +1 -1
- package/dist/module/business-address-schema.js +1 -1
- package/dist/module/business-core-info-form-step.js +2 -2
- package/dist/module/business-core-info-schema.js +1 -1
- package/dist/module/business-form-types.js +1 -154
- package/dist/module/business-identity-schema.js +5 -3
- package/dist/module/business-owners-form-step.js +1 -1
- package/dist/module/business-representative-form-step.js +6 -3
- package/dist/module/business-representative.js +4 -1
- package/dist/module/checkout-core.js +27 -19
- package/dist/module/identity-address-form.js +1 -1
- package/dist/module/index.esm.js +727 -1
- package/dist/module/justifi-business-details.js +2 -2
- package/dist/module/justifi-business-form.js +4 -5
- package/dist/module/justifi-business-list.js +1 -1
- package/dist/module/justifi-checkout.js +34 -24
- package/dist/module/justifi-gross-payment-chart.js +2 -2
- package/dist/module/justifi-payment-balance-transactions.js +1 -1
- package/dist/module/justifi-payment-details.js +1 -1
- package/dist/module/justifi-payment-form.js +50 -15
- package/dist/module/justifi-payment-provisioning.js +2 -2
- package/dist/module/justifi-payments-list.js +1 -1
- package/dist/module/justifi-payout-details.js +1 -1
- package/dist/module/justifi-payouts-list.js +1 -1
- package/dist/module/justifi-proceeds-list.js +1 -1
- package/dist/module/justifi-refund-form.js +2 -3
- package/dist/module/justifi-sezzle-payment-method.d.ts +11 -0
- package/dist/module/justifi-sezzle-payment-method.js +6 -0
- package/dist/module/justifi-subaccount-details.js +2 -2
- package/dist/module/justifi-subaccounts-list.js +1 -1
- package/dist/module/legal-address-form-step.js +3 -3
- package/dist/module/legal-address-form.js +1 -1
- package/dist/module/new-payment-method.js +9 -9
- package/dist/module/owner-form.js +9 -5
- package/dist/module/payment-method-form.js +1 -1
- package/dist/module/payment-method-options.js +26 -22
- package/dist/module/payment.service.js +2 -2
- package/dist/module/payout.service.js +2 -2
- package/dist/module/schema-validations.js +159 -0
- package/dist/module/select-input.js +48 -1
- package/dist/module/{sezzel-payment-method.js → sezzle-payment-method.js} +6 -6
- package/dist/module/text-input.js +46 -1
- package/dist/module/utils2.js +1 -2
- package/dist/module/utils3.js +12 -21
- package/dist/module/utils4.js +21 -12
- package/dist/types/api/Api.d.ts +5 -1
- package/dist/types/api/Payment.d.ts +2 -1
- package/dist/types/components/billing-form/billing-form.d.ts +8 -15
- package/dist/types/components/business-forms/business-form/business-representative/business-representative.d.ts +1 -0
- package/dist/types/components/business-forms/owner-form/owner-form.d.ts +1 -0
- package/dist/types/components/business-forms/payment-provisioning/business-representative/business-representative-form-step.d.ts +1 -0
- package/dist/types/components/business-forms/schemas/business-form-schema.d.ts +3 -1
- package/dist/types/components/business-forms/schemas/business-identity-schema.d.ts +2 -0
- package/dist/types/components/checkout/checkout-core.d.ts +4 -0
- package/dist/types/components/checkout/checkout.d.ts +4 -0
- package/dist/types/components/checkout/payment-method-options.d.ts +2 -0
- package/dist/types/components/checkout/{sezzel-payment-method.d.ts → sezzle-payment-method.d.ts} +1 -1
- package/dist/types/components/payment-form/payment-form.d.ts +7 -1
- package/dist/types/components.d.ts +38 -29
- package/dist/webcomponents/p-0603a526.entry.js +1 -0
- package/dist/webcomponents/{p-3917edbf.entry.js → p-09a6df17.entry.js} +1 -1
- package/dist/webcomponents/{p-7da249b8.entry.js → p-1367c4c7.entry.js} +1 -1
- package/dist/webcomponents/p-1b959678.entry.js +1 -0
- package/dist/webcomponents/{p-a6f170ba.entry.js → p-1f23c9d5.entry.js} +1 -1
- package/dist/webcomponents/p-21f301a0.entry.js +1 -0
- package/dist/webcomponents/p-243caf7c.entry.js +1 -0
- package/dist/webcomponents/{p-c6e207f6.entry.js → p-27ea1f3f.entry.js} +1 -1
- package/dist/webcomponents/{p-13e2f667.js → p-29c0b182.js} +1 -1
- package/dist/webcomponents/{p-28b38699.js → p-3cd675e7.js} +1 -1
- package/dist/webcomponents/p-3d70b0f1.entry.js +1 -0
- package/dist/webcomponents/{p-41bdee27.entry.js → p-55d37253.entry.js} +1 -1
- package/dist/webcomponents/{p-02b18979.entry.js → p-60ea8fd1.entry.js} +1 -1
- package/dist/webcomponents/p-624ed594.entry.js +1 -0
- package/dist/webcomponents/p-62bbcdfb.entry.js +1 -0
- package/dist/webcomponents/p-76e74f01.js +1 -0
- package/dist/webcomponents/p-7ca334d6.entry.js +1 -0
- package/dist/webcomponents/p-7d6c67bb.js +1 -0
- package/dist/webcomponents/{p-78b32fb9.entry.js → p-7ea5b11c.entry.js} +1 -1
- package/dist/webcomponents/p-83ae34bf.js +1 -0
- package/dist/webcomponents/p-84aea66c.entry.js +1 -0
- package/dist/webcomponents/p-8960e936.entry.js +1 -0
- package/dist/webcomponents/p-8d53f1de.entry.js +1 -0
- package/dist/webcomponents/p-969572f2.entry.js +1 -0
- package/dist/webcomponents/{p-fce2b224.entry.js → p-9a36fca6.entry.js} +1 -1
- package/dist/webcomponents/p-a38fdda7.entry.js +1 -0
- package/dist/webcomponents/{p-1334f776.entry.js → p-adc9ae0f.entry.js} +1 -1
- package/dist/webcomponents/p-b53d7b7f.js +1 -0
- package/dist/webcomponents/p-b8d70349.entry.js +1 -0
- package/dist/webcomponents/p-b9db1c52.entry.js +1 -0
- package/dist/webcomponents/p-ca39c89f.js +1 -0
- package/dist/webcomponents/p-d6b980a3.entry.js +1 -0
- package/dist/webcomponents/p-dd609661.js +1 -0
- package/dist/webcomponents/{p-9ba31a6a.entry.js → p-de4ffaa1.entry.js} +1 -1
- package/dist/webcomponents/{p-9f529959.entry.js → p-e1a3a670.entry.js} +1 -1
- package/dist/webcomponents/p-e4be71ee.entry.js +1 -0
- package/dist/webcomponents/p-e8706cc4.js +1 -0
- package/dist/webcomponents/{p-65510838.js → p-f4dec164.js} +1 -1
- package/dist/webcomponents/p-f942f90b.entry.js +1 -0
- package/dist/webcomponents/p-fea93cb9.entry.js +1 -0
- package/dist/webcomponents/{p-f76283a5.entry.js → p-fee64d38.entry.js} +1 -1
- package/dist/webcomponents/webcomponents.css +1 -1
- package/dist/webcomponents/webcomponents.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/business-additional-questions-schema-0a35f597.js +0 -57
- package/dist/cjs/form-2ad3d374.js +0 -729
- package/dist/cjs/justifi-billing-form_4.cjs.entry.js +0 -1864
- package/dist/esm/form-5279c05a.js +0 -727
- package/dist/esm/justifi-billing-form_4.entry.js +0 -1857
- package/dist/module/form.js +0 -727
- package/dist/module/justifi-sezzel-payment-method.d.ts +0 -11
- package/dist/module/justifi-sezzel-payment-method.js +0 -6
- package/dist/webcomponents/p-02fa533c.js +0 -1
- package/dist/webcomponents/p-101b2648.entry.js +0 -1
- package/dist/webcomponents/p-132ba228.js +0 -1
- package/dist/webcomponents/p-1885c478.entry.js +0 -1
- package/dist/webcomponents/p-23099f1f.entry.js +0 -1
- package/dist/webcomponents/p-230b96df.entry.js +0 -1
- package/dist/webcomponents/p-3da23f21.js +0 -1
- package/dist/webcomponents/p-4c84952f.entry.js +0 -1
- package/dist/webcomponents/p-64710363.entry.js +0 -1
- package/dist/webcomponents/p-731085e3.js +0 -1
- package/dist/webcomponents/p-7e334dce.entry.js +0 -1
- package/dist/webcomponents/p-7faacb1e.entry.js +0 -1
- package/dist/webcomponents/p-9b4b91ba.js +0 -1
- package/dist/webcomponents/p-a9af8f40.entry.js +0 -1
- package/dist/webcomponents/p-ade12f56.js +0 -1
- package/dist/webcomponents/p-b81afd51.entry.js +0 -1
- package/dist/webcomponents/p-bb58e656.entry.js +0 -1
- package/dist/webcomponents/p-bc12b8b9.js +0 -1
- package/dist/webcomponents/p-bfe7c55c.entry.js +0 -1
- package/dist/webcomponents/p-c1be3378.entry.js +0 -1
- package/dist/webcomponents/p-cb31488b.entry.js +0 -1
- package/dist/webcomponents/p-d0a8c631.entry.js +0 -1
- package/dist/webcomponents/p-d7d40d26.entry.js +0 -1
- package/dist/webcomponents/p-efbc8ffc.entry.js +0 -1
|
@@ -2,11 +2,25 @@ import { h } from "@stencil/core";
|
|
|
2
2
|
import { newSpecPage } from "@stencil/core/testing";
|
|
3
3
|
import { PaymentForm } from "../payment-form";
|
|
4
4
|
import { PaymentMethodTypes } from "../../../api";
|
|
5
|
-
import { config } from "../../../../config";
|
|
6
5
|
import { PaymentMethodSelector } from "../payment-method-selector";
|
|
7
6
|
import { PaymentMethodForm } from "../../payment-method-form/payment-method-form";
|
|
8
7
|
import { BillingForm } from "../../billing-form/billing-form";
|
|
9
8
|
describe('justifi-payment-form', () => {
|
|
9
|
+
it('should throw error if both clientId and authToken are not provided', async () => {
|
|
10
|
+
const errorSpy = jest.fn();
|
|
11
|
+
const page = await newSpecPage({
|
|
12
|
+
components: [PaymentForm],
|
|
13
|
+
template: () => h("justifi-payment-form", { "onError-event": errorSpy }),
|
|
14
|
+
});
|
|
15
|
+
await page.waitForChanges();
|
|
16
|
+
expect(errorSpy).toHaveBeenCalledWith(expect.objectContaining({
|
|
17
|
+
detail: {
|
|
18
|
+
errorCode: 'missing-props',
|
|
19
|
+
message: 'clientId or authToken is required',
|
|
20
|
+
severity: 'error',
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
|
+
});
|
|
10
24
|
it('should update submitButtonEnabled state when enableSubmitButton method is called', async () => {
|
|
11
25
|
// Mock component
|
|
12
26
|
const mockComponent = new PaymentForm();
|
|
@@ -33,7 +47,7 @@ describe('justifi-payment-form', () => {
|
|
|
33
47
|
const paymentForm = new PaymentForm();
|
|
34
48
|
// Assert that the properties exist and have the expected default values
|
|
35
49
|
expect(paymentForm).toHaveProperty('bankAccount', undefined);
|
|
36
|
-
expect(paymentForm).toHaveProperty('card',
|
|
50
|
+
expect(paymentForm).toHaveProperty('card', undefined);
|
|
37
51
|
expect(paymentForm).toHaveProperty('email', undefined);
|
|
38
52
|
expect(paymentForm).toHaveProperty('clientId', undefined);
|
|
39
53
|
expect(paymentForm).toHaveProperty('accountId', undefined);
|
|
@@ -131,44 +145,13 @@ describe('justifi-payment-form', () => {
|
|
|
131
145
|
});
|
|
132
146
|
// Render Testing
|
|
133
147
|
it('should correctly render the child components based on the given props and state', async () => {
|
|
134
|
-
// Set up new PaymentForm with specific props and state
|
|
135
|
-
const component = new PaymentForm();
|
|
136
|
-
component.bankAccount = true;
|
|
137
|
-
component.card = true;
|
|
138
|
-
component.email = 'test@test.com';
|
|
139
|
-
component.clientId = 'abc123';
|
|
140
|
-
component.accountId = 'def456';
|
|
141
|
-
component.submitButtonText = 'Submit';
|
|
142
|
-
// Cast to any to bypass type checker and directly set private properties
|
|
143
|
-
component.submitButtonEnabled = true;
|
|
144
|
-
component.selectedPaymentMethodType = PaymentMethodTypes.card;
|
|
145
|
-
component.allowedPaymentMethodTypes = [PaymentMethodTypes.card, PaymentMethodTypes.bankAccount];
|
|
146
148
|
// Render the component
|
|
147
149
|
const { root } = await newSpecPage({
|
|
148
150
|
components: [PaymentForm],
|
|
149
|
-
|
|
151
|
+
template: () => (h("justifi-payment-form", { bankAccount: true, card: true, email: "test@test.com", clientId: "abc123", accountId: "def456", "submit-button-text": "Submit", "payment-method-form-type": "card" })),
|
|
150
152
|
});
|
|
151
153
|
// Assert that the rendered output is correct
|
|
152
|
-
expect(root).
|
|
153
|
-
<justifi-payment-form payment-method-form-type="card">
|
|
154
|
-
<mock:shadow-root>
|
|
155
|
-
<form class="gy-3 row">
|
|
156
|
-
<div class="col-12">
|
|
157
|
-
<justifi-payment-method-form payment-method-form-type="card" iframeorigin="${config.iframeOrigin}"></justifi-payment-method-form>
|
|
158
|
-
</div>
|
|
159
|
-
<div class="col-12">
|
|
160
|
-
<justifi-billing-form legend="Billing Info"></justifi-billing-form>
|
|
161
|
-
</div>
|
|
162
|
-
<slot name="insurance"></slot>
|
|
163
|
-
<div class="col-12">
|
|
164
|
-
<button class="btn btn-primary jfi-submit-button" data-testid="submit-button" type="submit">
|
|
165
|
-
Submit
|
|
166
|
-
</button>
|
|
167
|
-
</div>
|
|
168
|
-
</form>
|
|
169
|
-
</mock:shadow-root>
|
|
170
|
-
</justifi-payment-form>
|
|
171
|
-
`);
|
|
154
|
+
expect(root).toMatchSnapshot();
|
|
172
155
|
});
|
|
173
156
|
it('emits error event when submit fails', async () => {
|
|
174
157
|
const clientId = 'some-client';
|
|
@@ -98,7 +98,7 @@ export class PaymentMethodForm {
|
|
|
98
98
|
"mutable": false,
|
|
99
99
|
"complexType": {
|
|
100
100
|
"original": "PaymentMethodTypes",
|
|
101
|
-
"resolved": "PaymentMethodTypes.bankAccount | PaymentMethodTypes.card | PaymentMethodTypes.
|
|
101
|
+
"resolved": "PaymentMethodTypes.bankAccount | PaymentMethodTypes.card | PaymentMethodTypes.saved | PaymentMethodTypes.sezzle",
|
|
102
102
|
"references": {
|
|
103
103
|
"PaymentMethodTypes": {
|
|
104
104
|
"location": "import",
|
|
@@ -73,7 +73,7 @@ export class ProceedsList {
|
|
|
73
73
|
}
|
|
74
74
|
this.loading = true;
|
|
75
75
|
const endpoint = `account/${this.accountId}/proceeds`;
|
|
76
|
-
const response = await Api(this.authToken, config.privateApiOrigin)
|
|
76
|
+
const response = await Api({ authToken: this.authToken, apiOrigin: config.privateApiOrigin })
|
|
77
77
|
.get(endpoint, this.params);
|
|
78
78
|
if (!response.error) {
|
|
79
79
|
this.paging = Object.assign(Object.assign({}, this.paging), response.page_info);
|
|
@@ -70,7 +70,7 @@ export class RefundForm {
|
|
|
70
70
|
if (!this.authToken) {
|
|
71
71
|
console.warn('Warning: Missing auth-token.');
|
|
72
72
|
}
|
|
73
|
-
this.api = Api(this.authToken, config.proxyApiOrigin);
|
|
73
|
+
this.api = Api({ authToken: this.authToken, apiOrigin: config.proxyApiOrigin });
|
|
74
74
|
}
|
|
75
75
|
render() {
|
|
76
76
|
var _a;
|
|
@@ -21,7 +21,7 @@ export class SubaccountDetails {
|
|
|
21
21
|
this.fetchData();
|
|
22
22
|
}
|
|
23
23
|
async fetchOnboardingData() {
|
|
24
|
-
const api = Api(this.authToken, '');
|
|
24
|
+
const api = Api({ authToken: this.authToken, apiOrigin: '' });
|
|
25
25
|
const endpoint = `onboarding/${this.subaccountId}`;
|
|
26
26
|
const response = await api.get(endpoint);
|
|
27
27
|
if (!response.error) {
|
|
@@ -32,7 +32,7 @@ export class SubaccountDetails {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
async fetchSubAccountData() {
|
|
35
|
-
const api = Api(this.authToken, config.privateApiOrigin);
|
|
35
|
+
const api = Api({ authToken: this.authToken, apiOrigin: config.privateApiOrigin });
|
|
36
36
|
const endpoint = `account/${this.accountId}/seller_accounts/${this.subaccountId}`;
|
|
37
37
|
const response = await api.get(endpoint);
|
|
38
38
|
if (!response.error) {
|
|
@@ -36,7 +36,7 @@ export class SubaccountsList {
|
|
|
36
36
|
return;
|
|
37
37
|
}
|
|
38
38
|
this.loading = true;
|
|
39
|
-
const api = Api(this.authToken, config.privateApiOrigin);
|
|
39
|
+
const api = Api({ authToken: this.authToken, apiOrigin: config.privateApiOrigin });
|
|
40
40
|
const endpoint = `account/${this.accountId}/seller_accounts`;
|
|
41
41
|
const response = await api.get(endpoint, this.params);
|
|
42
42
|
if (!response.error) {
|