@delopay/sdk 0.211.0 → 0.212.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.
@@ -5780,6 +5780,36 @@ var Invoices = class {
5780
5780
  ...options
5781
5781
  });
5782
5782
  }
5783
+ /**
5784
+ * Mail an issued invoice to the buyer address it carries, its PDF attached,
5785
+ * in the document's language. Each call is a new message (the next
5786
+ * `revision`) and resolves with what became of it: `sent`, or `failed` with
5787
+ * `error_code`. Refused (`IR_16`) with `not_an_invoice` (a credit note),
5788
+ * `not_issued`, `no_buyer_email`, `send_in_progress` (an earlier message is
5789
+ * queued or being sent) and `send_limit_reached` (5 sends by hand in 24
5790
+ * hours). Shops with the `email.invoice_auto_send` setting mail every
5791
+ * invoice they issue without this call.
5792
+ *
5793
+ * The merchant's daily sending limit is **not** a refusal: the call answers
5794
+ * with the message `failed` and `error_code: 'merchant_limit_reached'`.
5795
+ * Check `status` on the result, not only that the call succeeded.
5796
+ * `POST /invoices/{invoice_id}/email`
5797
+ */
5798
+ async sendEmail(invoiceId, options) {
5799
+ return this.request("POST", `/invoices/${encodeURIComponent(invoiceId)}/email`, {
5800
+ ...options
5801
+ });
5802
+ }
5803
+ /**
5804
+ * Every message about a document to its buyer, automatic and by hand,
5805
+ * newest first, with its delivery status. The recipient is masked.
5806
+ * `GET /invoices/{invoice_id}/emails`
5807
+ */
5808
+ async listEmails(invoiceId, options) {
5809
+ return this.request("GET", `/invoices/${encodeURIComponent(invoiceId)}/emails`, {
5810
+ ...options
5811
+ });
5812
+ }
5783
5813
  };
5784
5814
 
5785
5815
  // src/resources/invoiceSettings.ts
@@ -11662,4 +11692,4 @@ export {
11662
11692
  decodeNativePanes,
11663
11693
  encodeNativePanes
11664
11694
  };
11665
- //# sourceMappingURL=chunk-2OYT52HK.js.map
11695
+ //# sourceMappingURL=chunk-UKKUBVQJ.js.map