Send Invoice Template

Template code for sending invoices. The code below is applicable to all SendInvoices cases.

// Initialize myDATATools in case you'll need them. 
 var mdt = new myDATATools("Arbitrans User", "Arbitrans Key");
 
 // Initialize the Constructor of SendInvoices. 
 var sni = new SendInvoices("AADEUserID", "OcpApimSubscriptionKey", "Arbitrans User", "Arbitrans Key", false);
 
 invoice invoice = sni.newInvoice; // Initialize a new invoice 
  
 invoiceLine ln = sni.newLine;     // Create a new Invoice Line
 //invoice.lines.Add(ln) // by this line, you add the line into the invoice lines list.
  
 paymentMethod payment = sni.newPaymentMethod; // Create a new payment
 //invoice.payments.add(payment); // by this line, you add the payment into the payments list.
  
 string result = sni.SendInvoice(invoice); // send the invoice					
This language is not supported or no code example is available.
' Initialize myDATATools in case you'll need them. 
 Dim mdt as New myDATATools("Arbitrans User", "Arbitrans Key")
 
 ' Initialize the Constructor of SendInvoices. 
 Dim sni As New SendInvoices("AADEUserID", "OcpApimSubscriptionKey", "Arbitrans User", "Arbitrans Key", False)
 
 Dim invoice As invoice = sni.newInvoice 'Initialize a new invoice
  
 Dim ln as invoiceLine = sni.newLine     'Create a new Invoice Line
 'invoice.lines.Add(ln) ' by this line, you add the line into the invoice lines list.
  
 Dim payment As paymentMethod = sni.newPaymentMethod 'Create a new payment
 'invoice.payments.Add(payment) ' by this line, you add the payment into the payments list.
   
 Dim result As String = sni.SendInvoice(invoice) 'send the invoice					
This language is not supported or no code example is available.

In this article

Definition