RequestMyExpenses.Request Method

Request - Get all Expenses Invoices
Public Sub Request( _ 
ByVal maxPages As Integer, _ 
Optional ByVal SearchParam As String() = Nothing, _ 
Optional ByVal GreekErrors As Boolean = False _ 
)
This language is not supported or no code example is available.
public void Request( 
int maxPages
string[] SearchParam = Nothing, 
bool GreekErrors = False 
)
This language is not supported or no code example is available.

Parameters

maxPages
int

Maximum myDATA pages to retrieve. Note: myDATA return maximum 1000 invoices per page. You cannot retrieve more than ten (10) pages at once!

SearchParam
string[]

Search Parameters.

GreekErrors
bool

Determines if the error will be returned in Greek or not.

Example
 
  // This code will retrieve ALL the invoices of year 2022.
  RequestMyxpenses rme = new RequestMyExpenses("AADEUserID", "OcpApimSubscriptionKey", "ExecuteEntityVatNumber", "Arbitrans User", "Arbitrans Key", false);
  //SearchParam = {dateFrom, dateTo, counterVatNumber, entityVatNumber, invType};
  string[] SearchParam = {"01/01/2022", "31/03/2022", "", "", ""};
  rme.Request(4, SearchParam; //Retrive 4 pages at once, in range of dates From 01/01/2022 To 31/03/2022
  if (IsNothing(rme.get_ErrorMessage))
     DataTable dt = rme.get_Invoices(); 'check below to see the Data Table Columns
     // Diplay DataTable code here
  else
     MessageBox.Show(rme.get_ErrorMessage);
  					
This language is not supported or no code example is available.
  ' This code will retrieve ALL the invoices of year 2022.
  Dim rme As RequestMyExpenses = New RequestMyExpenses("AADEUserID", "OcpApimSubscriptionKey", "ExecuteEntityVatNumber", "Arbitrans User", "Arbitrans Key", False)
  'SearchParam = {dateFrom, dateTo, counterVatNumber, entityVatNumber, invType}
  Dim SearchParam as String() = {"01/01/2022", "31/03/2022", "", "", ""}
  rme.Request(4, SearchParam) 'Retrive 4 pages at once, in range of dates From 01/01/2022 To 31/03/2022
  If IsNothing(rme.get_ErrorMessage) Then
      Dim dt As DataTable = rme.get_Invoices()
      ' Diplay DataTable code here
  Else
      MessageBox.Show(rme.get_ErrorMessage)
 End If
  					
This language is not supported or no code example is available.

.NET Framework

Supported in: 3.5 or newer

In this article

Definition