@tec.pet/tecpet-sdk 0.0.132 → 0.0.134

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.
@@ -1,5 +1,9 @@
1
1
  export interface PaRegisterInvoiceReceivablePaymentRequest {
2
2
  amount: number;
3
+ discount?: number;
4
+ surcharge?: number;
5
+ settled?: boolean;
6
+ source?: string;
3
7
  }
4
8
  export interface PaRegisterInvoiceReceivablePaymentResponse {
5
9
  success: boolean;
@@ -0,0 +1,7 @@
1
+ export interface PaReverseInvoiceReceivablePaymentRequest {
2
+ currentAmount: number;
3
+ source?: string;
4
+ }
5
+ export interface PaReverseInvoiceReceivablePaymentResponse {
6
+ success: boolean;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,3 +2,4 @@ export * from './invoice.service';
2
2
  export * from './dto/pa.edit-invoice-extern-id.dto';
3
3
  export * from './dto/pa.register-invoice-pdv-payment.dto';
4
4
  export * from './dto/pa.register-invoice-receivable-payment.dto';
5
+ export * from './dto/pa.reverse-invoice-receivable-payment.dto';
@@ -18,3 +18,4 @@ __exportStar(require("./invoice.service"), exports);
18
18
  __exportStar(require("./dto/pa.edit-invoice-extern-id.dto"), exports);
19
19
  __exportStar(require("./dto/pa.register-invoice-pdv-payment.dto"), exports);
20
20
  __exportStar(require("./dto/pa.register-invoice-receivable-payment.dto"), exports);
21
+ __exportStar(require("./dto/pa.reverse-invoice-receivable-payment.dto"), exports);
@@ -2,10 +2,12 @@ import { HttpClient } from "../../infra/http/client.http";
2
2
  import { PaEditInvoiceExternIdRequest, PaEditInvoiceExternIdResponse } from "./dto/pa.edit-invoice-extern-id.dto";
3
3
  import { PaRegisterInvoicePdvPaymentResponse } from "./dto/pa.register-invoice-pdv-payment.dto";
4
4
  import { PaRegisterInvoiceReceivablePaymentRequest, PaRegisterInvoiceReceivablePaymentResponse } from "./dto/pa.register-invoice-receivable-payment.dto";
5
+ import { PaReverseInvoiceReceivablePaymentRequest, PaReverseInvoiceReceivablePaymentResponse } from "./dto/pa.reverse-invoice-receivable-payment.dto";
5
6
  export declare class InvoiceService {
6
7
  private readonly api;
7
8
  constructor(api: HttpClient);
8
9
  editExternId(invoiceId: string, body: PaEditInvoiceExternIdRequest, shopId: number): Promise<PaEditInvoiceExternIdResponse>;
9
10
  registerPdvPayment(invoiceId: string, fiscalInvoiceId: string): Promise<PaRegisterInvoicePdvPaymentResponse>;
10
11
  registerReceivablePayment(invoiceId: string, fiscalInvoiceId: string, body: PaRegisterInvoiceReceivablePaymentRequest): Promise<PaRegisterInvoiceReceivablePaymentResponse>;
12
+ reverseReceivablePayment(invoiceId: string, fiscalInvoiceId: string, body: PaReverseInvoiceReceivablePaymentRequest): Promise<PaReverseInvoiceReceivablePaymentResponse>;
11
13
  }
@@ -15,5 +15,8 @@ class InvoiceService {
15
15
  async registerReceivablePayment(invoiceId, fiscalInvoiceId, body) {
16
16
  return await this.api.post(`/invoice/${invoiceId}/receivablePay/${fiscalInvoiceId}`, body);
17
17
  }
18
+ async reverseReceivablePayment(invoiceId, fiscalInvoiceId, body) {
19
+ return await this.api.post(`/invoice/${invoiceId}/receivableReverse/${fiscalInvoiceId}`, body);
20
+ }
18
21
  }
19
22
  exports.InvoiceService = InvoiceService;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tec.pet/tecpet-sdk",
3
- "version": "0.0.132",
3
+ "version": "0.0.134",
4
4
  "description": "TecPet SDK for integration with TecPet services",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",