@tec.pet/tecpet-sdk 0.0.214 → 0.0.215
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.
|
@@ -46,6 +46,7 @@ export interface PaEditIntegrationShopRequest {
|
|
|
46
46
|
configurableChoices?: any;
|
|
47
47
|
features?: PaIntegrationShopFeatures;
|
|
48
48
|
invoiceArchitecture?: IntegrationInvoiceArchitecture;
|
|
49
|
+
pdvPayment?: boolean;
|
|
49
50
|
}
|
|
50
51
|
export interface PaEditIntegrationShopResponse {
|
|
51
52
|
id: number;
|
|
@@ -60,6 +61,7 @@ export interface PaEditIntegrationShopResponse {
|
|
|
60
61
|
configurableChoices?: any;
|
|
61
62
|
features?: PaIntegrationShopFeatures;
|
|
62
63
|
invoiceArchitecture?: IntegrationInvoiceArchitecture;
|
|
64
|
+
pdvPayment?: boolean;
|
|
63
65
|
shop: {
|
|
64
66
|
id: number;
|
|
65
67
|
};
|
|
@@ -8,7 +8,7 @@ export declare class InvoiceService {
|
|
|
8
8
|
constructor(api: HttpClient);
|
|
9
9
|
editExternId(invoiceId: string, body: PaEditInvoiceExternIdRequest, shopId: number): Promise<PaEditInvoiceExternIdResponse>;
|
|
10
10
|
registerPdvPayment(invoiceId: string, fiscalInvoiceId: string): Promise<PaRegisterInvoicePdvPaymentResponse>;
|
|
11
|
-
registerPdvPartialPayment(invoiceId: string, fiscalInvoiceIds: string[], amount: number): Promise<PaRegisterInvoicePdvPaymentResponse>;
|
|
11
|
+
registerPdvPartialPayment(invoiceId: string, fiscalInvoiceIds: string[], amount: number, externalPaymentId?: string): Promise<PaRegisterInvoicePdvPaymentResponse>;
|
|
12
12
|
registerReceivablePayment(invoiceId: string, fiscalInvoiceId: string, body: PaRegisterInvoiceReceivablePaymentRequest): Promise<PaRegisterInvoiceReceivablePaymentResponse>;
|
|
13
13
|
reverseReceivablePayment(externalId: string, body: PaReverseInvoiceReceivablePaymentRequest): Promise<PaReverseInvoiceReceivablePaymentResponse>;
|
|
14
14
|
}
|
|
@@ -12,8 +12,9 @@ class InvoiceService {
|
|
|
12
12
|
async registerPdvPayment(invoiceId, fiscalInvoiceId) {
|
|
13
13
|
return await this.api.post(`/invoice/${invoiceId}/pdvPay/${fiscalInvoiceId}`, {});
|
|
14
14
|
}
|
|
15
|
-
async registerPdvPartialPayment(invoiceId, fiscalInvoiceIds, amount) {
|
|
16
|
-
|
|
15
|
+
async registerPdvPartialPayment(invoiceId, fiscalInvoiceIds, amount, externalPaymentId) {
|
|
16
|
+
const body = externalPaymentId ? { fiscalInvoiceIds, amount, externalPaymentId } : { fiscalInvoiceIds, amount };
|
|
17
|
+
return await this.api.post(`/invoice/${invoiceId}/pdvPayPartial`, body);
|
|
17
18
|
}
|
|
18
19
|
async registerReceivablePayment(invoiceId, fiscalInvoiceId, body) {
|
|
19
20
|
return await this.api.post(`/invoice/${invoiceId}/receivablePay/${fiscalInvoiceId}`, body);
|