Xero Service
CreateXeroContact
Create Contact in Xero
- Parameters:
officeId(int): The ID of the officeAlpClient(ClientDto): The client data
- Return:
Task<string>
CreateXeroContactbyClientId
Create Xero Contact by Client ID
- Parameters:
clientId(int): The ID of the client
- Return:
Task<string>
UpdateXeroContactbyClientId
Update Xero Contact by Client ID
- Parameters:
clientId(int): The ID of the client
- Return:
Task<string>
CreateInvoiceInXero
This method is used to create an invoice in Xero.
Parameters:
invoice: An object of typeData.Models.Invoices.Invoicethat represents the invoice to be created in Xero.
Return:
Task<string>- ATaskobject that returns a string representing the latest invoice information.
SyncXeroPaymentbyInvoiceId
This method is used to sync Xero payment by invoice ID.
- Parameters:
invoiceId: An integer representing the ID of the invoice for which the payment needs to be synced.
- Return:
Task<string>- ATaskobject that returns a string representing the result of the synchronization process.
GetOutstandingAmount
Calculates the outstanding amount for a given invoice.
- Parameters:
invoiceId(type:int) - The ID of the invoice for which the outstanding amount is calculated.
- Return:
Task<decimal>- ATaskobject representing the asynchronous operation that returns the outstanding amount as a decimal value.
GetTotalInvoiceValueInclGst
Calculates the total invoice value including GST for a given invoice.
- Parameters:
invoiceId(type:int) - The ID of the invoice for which the total value is calculated.
- Return:
Task<decimal>- ATaskobject representing the asynchronous operation that returns the total invoice value as a decimal value.
GetReceivedPayments
Retrieves the total received payments for a given invoice.
- Parameters:
invoiceId(type:int) - The ID of the invoice for which the received payments are retrieved.
- Return:
decimal- The total received payments as a decimal value.
FetchXeroPaymentbyXeroId
Retrieves Xero payments based on the Xero ID.
- Parameters:
officeId(type:int) - The ID of the office.XeroId(type:string) - The Xero ID used to fetch payments.
- Return:
Task<List<Xero.NetStandard.OAuth2.Model.Accounting.Payment>>- ATaskobject representing the asynchronous operation that returns a list of Xero payments.
FetchXeroInvoicebyXeroInvoiceId
Retrieves Xero invoices based on the Xero invoice ID.
- Parameters:
officeId(type:int) - The ID of the office.XeroInvoiceId(type:string) - The Xero invoice ID used to fetch invoices.
- Return:
Task<List<Xero.NetStandard.OAuth2.Model.Accounting.Invoice>>- ATaskobject representing the asynchronous operation that returns a list of Xero invoices.
SyncAllXeroPayment
Synchronizes all Xero payments using a cron job.
- Parameters: None.
- Return:
Task- ATaskobject representing the asynchronous operation.
ReSyncInvoiceToXero
Re-syncs an invoice to Xero.
- Parameters:
invoiceId(type:int) - The ID of the invoice to re-sync.
- Return:
Task<string>- ATaskobject representing the asynchronous operation that returns a success message as a string.
UpdateInvoices
Updates the invoices in the system based on Xero data.
- Parameters: None.
- Return:
Task<string>- ATaskobject representing the asynchronous operation that returns a success message as a string.
getXeroToken
Retrieves the Xero token for authentication.
- Parameters:
officeId(type:int) - The ID of the office for which the Xero token is fetched.
- Return:
Task<IXeroToken>- ATaskobject representing the asynchronous operation that returns the Xero token.
