UNPKG

vendure-plugin-payment-terms

Version:

This plugin allows certain customers to pay using Payment Terms. Payment Terms are when a customer is allowed to make a payment a certain number of days after an invoice is due.

101 lines (100 loc) 3.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.mockPaymentDueEvent = void 0; const core_1 = require("@vendure/core"); const payment_terms_event_1 = require("./payment-terms-event"); exports.mockPaymentDueEvent = new payment_terms_event_1.PaymentTermsDueEvent({}, new core_1.Customer({ id: '3', firstName: 'Test', lastName: 'Customer', emailAddress: 'test@test.com', customFields: { paymentLimit: 120000, paymentTermsInDays: 3 } }), new core_1.Order({ id: '6', currencyCode: core_1.CurrencyCode.USD, createdAt: '2018-10-31T11:18:29.261Z', updatedAt: '2018-10-31T15:24:17.000Z', orderPlacedAt: '2018-10-31T13:54:17.000Z', code: 'T3EPGJKTVZPBD6Z9', state: 'ArrangingPayment', active: true, customer: new core_1.Customer({ id: '3', firstName: 'Test', lastName: 'Customer', emailAddress: 'test@test.com', }), lines: [ new core_1.OrderLine({ id: '5', featuredAsset: { preview: '/mailbox/placeholder-image', }, productVariant: new core_1.ProductVariant({ id: '2', name: 'Curvy Monitor 24 inch', sku: 'C24F390', }), quantity: 1, listPrice: 14374, listPriceIncludesTax: true, adjustments: [ { adjustmentSource: 'Promotion:1', type: core_1.AdjustmentType.PROMOTION, amount: -1000, description: '$10 off computer equipment', }, ], taxLines: [], }), new core_1.OrderLine({ id: '6', featuredAsset: { preview: '/mailbox/placeholder-image', }, productVariant: new core_1.ProductVariant({ id: '4', name: 'Hard Drive 1TB', sku: 'IHD455T1', }), quantity: 1, listPrice: 3799, listPriceIncludesTax: true, adjustments: [], taxLines: [], }), ], subTotal: 15144, subTotalWithTax: 18173, shipping: 1000, shippingLines: [ new core_1.ShippingLine({ listPrice: 1000, listPriceIncludesTax: true, taxLines: [{ taxRate: 20, description: 'shipping tax' }], shippingMethod: { code: 'express-flat-rate', name: 'Express Shipping', description: 'Express Shipping', id: '2', }, }), ], surcharges: [], shippingAddress: { fullName: 'Test Customer', company: '', streetLine1: '6000 Pagac Land', streetLine2: '', city: 'Port Kirsten', province: 'Avon', postalCode: 'ZU32 9CP', country: 'Cabo Verde', phoneNumber: '', }, payments: [], }));