Skip to content

Commit

Permalink
Merge pull request #7 from LucasRouckhout/improvement/allow_invoice_a…
Browse files Browse the repository at this point in the history
…ction_peppol

Allow the invoice action of sending to peppol
  • Loading branch information
koen-serry authored Aug 12, 2024
2 parents d4b05de + b0b02df commit a84ce52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const (
InvoiceAction_REMINDER // Send a reminder by email
InvoiceAction_LETTER // Send the invoice via postal letter
InvoiceAction_REOFFER // Reoffer (or try to collect the invoice via a recurring mechanism)
InvoiceAction_PEPPOL // Send the invoice via the Peppol network
)

// Invoice is the base object for sending and receiving invoices to Twikey
Expand Down Expand Up @@ -363,6 +364,8 @@ func (c *Client) InvoiceAction(ctx context.Context, invoiceIdOrNumber string, ac
params.Add("type", "reminder")
case InvoiceAction_REOFFER:
params.Add("type", "reoffer")
case InvoiceAction_PEPPOL:
params.Add("type", "peppol")
default:
return errors.New("invalid action")
}
Expand Down

0 comments on commit a84ce52

Please sign in to comment.