taxtank-core 2.1.4 → 2.1.6

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.
@@ -5484,7 +5484,7 @@ class SoleInvoice extends SoleInvoice$1 {
5484
5484
  }
5485
5485
  return 'N' + String(this.number).padStart(SoleInvoice.numberLength, '0');
5486
5486
  }
5487
- get name() {
5487
+ get filename() {
5488
5488
  return `invoice-${this.getNumber()}.pdf`;
5489
5489
  }
5490
5490
  /**
@@ -10691,7 +10691,7 @@ class BankConnection extends BankConnection$1 {
10691
10691
  return this.basiqJob?.step === BasiqJobStepEnum.FAILED;
10692
10692
  }
10693
10693
  isTemporaryUnavailable() {
10694
- return this.isJobFailed() && this.isActive();
10694
+ return !this.isExpired() && this.isActive() && this.isJobFailed();
10695
10695
  }
10696
10696
  isExpiring() {
10697
10697
  if (!this.expiryDate || this.isExpired()) {
@@ -16449,10 +16449,11 @@ class SoleInvoiceService extends RestService$1 {
16449
16449
  // @TODO use id only to avoid unexpected changes
16450
16450
  return this.put(Object.assign({}, invoice, { status }));
16451
16451
  }
16452
- send(invoice, file) {
16453
- const formData = new FormData();
16454
- formData.append('file', file);
16455
- return this.http.post(`${this.environment.apiV2}/${this.endpointUri}/${invoice.id}/send`, formData);
16452
+ send(invoice) {
16453
+ return this.put(invoice, `${this.apiUrl}/${invoice.id}/send`);
16454
+ }
16455
+ download(invoice) {
16456
+ return this.http.get(`${this.apiUrl}/${invoice.id}/download`, { responseType: 'blob' });
16456
16457
  }
16457
16458
  /**
16458
16459
  * Return the next number from the last invoice