C# Class pcAmerica.DesktopPOS.API.Client.SalesAPI

Afficher le fichier Open project: pcAmerica/CRE-RPE-Client-API-Library Class Usage Examples

Méthodes publiques

Méthode Description
ApplyCardPayment ( Context context, long invoiceNumber, int splitCheckNumber, CreditCardPaymentProcessingResponse response, int paymentIndex ) : AppliedPaymentResponse

Applies a credit card payment to the specified invoice

ApplyCashPayment ( Context context, long invoiceNumber, int splitCheckNumber, decimal amount ) : AppliedPaymentResponse

Applies a cash payment to the specified invoice

CombineSplits ( Context context, long invoiceNumber ) : Invoice

Combines the unpaid split checks back into a single check.

EmailReceipt ( Context context, long invoiceNumber, int splitCheckNumber, string emailAddress ) : bool

Emails a receipt for the specified invoice or split check to the specified email address

EndInvoice ( Context context, long invoiceNumber ) : bool

Marks the specified invoice as complete, only if it's fully paid. Also sends the order to the kitchen if it has not been printed yet.

EndSubCheck ( Context context, long invoiceNumber, short subCheckNumber ) : bool

Marks the specified subcheck as complete, only if it's fully paid. Also sends the order to the kitchen if it has not been printed yet.

GetAllOnHoldInvoices ( Context context ) : List

Retrieves a list of Invoice Numbers, Grand Total, CashierId, OnHoldID for the whole store/restaurant

GetInvoice ( Context context, long invoiceNumber ) : Invoice

Retrieves the invoice header and line item details for a specified invoice number in context.

GetInvoiceHeader ( Context context, long invoiceNumber ) : Invoice

Retrieves only the invoice header for a specified invoice number in context.

GetItemsSold ( System.DateTime startDateTime, System.DateTime endDateTime ) : List

Retrieves a list of invoice number, item name, item number, cashier, date sold, price, quantity, and discount amounts for each item record

GetOnHoldInvoicesForCashier ( Context context ) : List

Retrieves a list of Invoice Numbers, Grand Total, CashierId, OnHoldID for a specified Cashier/Employee

GetTotals ( System.DateTime startDateTime, System.DateTime endDateTime ) : SalesTotals

Retrieves the summary of Net Sales, Total Tax, and Grand Total between date/times

LockInvoice ( Context context, long invoiceNumber ) : bool

Locks an invoice so no other devices will attempt to open or modify it.

ModifyItems ( Context context, long invoiceNumber, List items ) : Invoice

Modifies an invoice to change the line item details based on EntityState. Items can be added/deleted/modified/unchanged. The API matches the line item id with the ObjectID in the CRE/RPE invoice, and does the specified operation to it. Line items with a modified status can change quantity and price. Deleted line items will remove the item from the invoice. Deleting an item that has child details will also remove the children. When adding a new line item, assign your own GUID as an id, and associate it as the parent to modifier items.

PrintReceipt ( Context context, long invoiceNumber, int splitCheckNumber ) : bool

Prints a receipt for the specified invoice or split check to the configured printer for the store id, station id

SendToKitchen ( Context context, long invoiceNumber ) : bool

Directs the API to send the order to the kitchen at this time. Only the items that have not previously been printed in the kitchen are printed.

SetPartySizeForInvoice ( Context context, long invoiceNumber, int partySize ) : bool

Sets the party size for the invoice

SplitInvoice ( Context context, long invoiceNumber, int numberOfWays ) : Invoice

Splits the invoice evenly into the specified number of ways

SplitInvoiceByGuest ( Context context, long invoiceNumber ) : Invoice

Splits the invoice evenly among the assigned guests

StartNewInvoice ( Context context, String onHoldID, String sectionID ) : Invoice

Begins a new invoice, saving it with the specified onHoldID, and automatically "locks" it so other devices cannot modify it. Always unlock the invoice when you are finished working with/modifying it.

UnLockInvoice ( Context context, long invoiceNumber ) : bool

Unlocks an invoice to make it available for other devices to open and work on it. Unlock should always be called when done working on an invoice on your device.

VoidInvoice ( Context context, long invoiceNumber, bool SendVoidToKitchen ) : bool

Voids the invoice the including removing all associated payments

Method Details

ApplyCardPayment() public méthode

Applies a credit card payment to the specified invoice
public ApplyCardPayment ( Context context, long invoiceNumber, int splitCheckNumber, CreditCardPaymentProcessingResponse response, int paymentIndex ) : AppliedPaymentResponse
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be paid
splitCheckNumber int The split check number, 0-based. Provide -1 if there are no split checks.
response CreditCardPaymentProcessingResponse Provides the details of the card payment
paymentIndex int Index for a payment being updated(post authing Credit Cards). Provide -1 if not updating a payment
Résultat AppliedPaymentResponse

ApplyCashPayment() public méthode

Applies a cash payment to the specified invoice
public ApplyCashPayment ( Context context, long invoiceNumber, int splitCheckNumber, decimal amount ) : AppliedPaymentResponse
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be paid
splitCheckNumber int The split check number, 0-based. Provide -1 if there are no split checks.
amount decimal The cash amount being applied
Résultat AppliedPaymentResponse

CombineSplits() public méthode

Combines the unpaid split checks back into a single check.
public CombineSplits ( Context context, long invoiceNumber ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be combined
Résultat Invoice

EmailReceipt() public méthode

Emails a receipt for the specified invoice or split check to the specified email address
public EmailReceipt ( Context context, long invoiceNumber, int splitCheckNumber, string emailAddress ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be emailed
splitCheckNumber int The split check number, 0-based. Provide -1 if there are no split checks.
emailAddress string The email address to send the receipt to
Résultat bool

EndInvoice() public méthode

Marks the specified invoice as complete, only if it's fully paid. Also sends the order to the kitchen if it has not been printed yet.
public EndInvoice ( Context context, long invoiceNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be ended
Résultat bool

EndSubCheck() public méthode

Marks the specified subcheck as complete, only if it's fully paid. Also sends the order to the kitchen if it has not been printed yet.
public EndSubCheck ( Context context, long invoiceNumber, short subCheckNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be ended
subCheckNumber short The number for the subcheck to be ended
Résultat bool

GetAllOnHoldInvoices() public méthode

Retrieves a list of Invoice Numbers, Grand Total, CashierId, OnHoldID for the whole store/restaurant
public GetAllOnHoldInvoices ( Context context ) : List
context Context The store id, station id, and cashier id the information should be restricted to.
Résultat List

GetInvoice() public méthode

Retrieves the invoice header and line item details for a specified invoice number in context.
public GetInvoice ( Context context, long invoiceNumber ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be returned
Résultat Invoice

GetInvoiceHeader() public méthode

Retrieves only the invoice header for a specified invoice number in context.
public GetInvoiceHeader ( Context context, long invoiceNumber ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be returned
Résultat Invoice

GetItemsSold() public méthode

Retrieves a list of invoice number, item name, item number, cashier, date sold, price, quantity, and discount amounts for each item record
public GetItemsSold ( System.DateTime startDateTime, System.DateTime endDateTime ) : List
startDateTime System.DateTime The period start date/time
endDateTime System.DateTime The period end date/time
Résultat List

GetOnHoldInvoicesForCashier() public méthode

Retrieves a list of Invoice Numbers, Grand Total, CashierId, OnHoldID for a specified Cashier/Employee
public GetOnHoldInvoicesForCashier ( Context context ) : List
context Context The store id, station id, and cashier id the information should be restricted to.
Résultat List

GetTotals() public méthode

Retrieves the summary of Net Sales, Total Tax, and Grand Total between date/times
public GetTotals ( System.DateTime startDateTime, System.DateTime endDateTime ) : SalesTotals
startDateTime System.DateTime The period start date/time
endDateTime System.DateTime The period end date/time
Résultat SalesTotals

LockInvoice() public méthode

Locks an invoice so no other devices will attempt to open or modify it.
public LockInvoice ( Context context, long invoiceNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be locked
Résultat bool

ModifyItems() public méthode

Modifies an invoice to change the line item details based on EntityState. Items can be added/deleted/modified/unchanged. The API matches the line item id with the ObjectID in the CRE/RPE invoice, and does the specified operation to it. Line items with a modified status can change quantity and price. Deleted line items will remove the item from the invoice. Deleting an item that has child details will also remove the children. When adding a new line item, assign your own GUID as an id, and associate it as the parent to modifier items.
public ModifyItems ( Context context, long invoiceNumber, List items ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be modified
items List The list of modified items
Résultat Invoice

PrintReceipt() public méthode

Prints a receipt for the specified invoice or split check to the configured printer for the store id, station id
public PrintReceipt ( Context context, long invoiceNumber, int splitCheckNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be printed
splitCheckNumber int The split check number, 0-based. Provide -1 if there are no split checks.
Résultat bool

SendToKitchen() public méthode

Directs the API to send the order to the kitchen at this time. Only the items that have not previously been printed in the kitchen are printed.
public SendToKitchen ( Context context, long invoiceNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be sent the kitchen
Résultat bool

SetPartySizeForInvoice() public méthode

Sets the party size for the invoice
public SetPartySizeForInvoice ( Context context, long invoiceNumber, int partySize ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be returned
partySize int The new number of guests in the party
Résultat bool

SplitInvoice() public méthode

Splits the invoice evenly into the specified number of ways
public SplitInvoice ( Context context, long invoiceNumber, int numberOfWays ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be split
numberOfWays int The number of ways to split the check. E.g. Provide 2 to split the check 2 ways.
Résultat Invoice

SplitInvoiceByGuest() public méthode

Splits the invoice evenly among the assigned guests
public SplitInvoiceByGuest ( Context context, long invoiceNumber ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be split
Résultat Invoice

StartNewInvoice() public méthode

Begins a new invoice, saving it with the specified onHoldID, and automatically "locks" it so other devices cannot modify it. Always unlock the invoice when you are finished working with/modifying it.
public StartNewInvoice ( Context context, String onHoldID, String sectionID ) : Invoice
context Context The store id, station id, and cashier id the information should be restricted to.
onHoldID String The ID that should represent an invoice. If the ID matches a Table Number, the table will become reserved.
sectionID String The section for the invoice to be put into see TableAPI for section info
Résultat Invoice

UnLockInvoice() public méthode

Unlocks an invoice to make it available for other devices to open and work on it. Unlock should always be called when done working on an invoice on your device.
public UnLockInvoice ( Context context, long invoiceNumber ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that should be unlocked
Résultat bool

VoidInvoice() public méthode

Voids the invoice the including removing all associated payments
public VoidInvoice ( Context context, long invoiceNumber, bool SendVoidToKitchen ) : bool
context Context The store id, station id, and cashier id the information should be restricted to.
invoiceNumber long The number of the invoice that is to be voided
SendVoidToKitchen bool
Résultat bool