ReceiptsAPI
public enum ReceiptsAPI
Caseless enumeration with static methods to send Receipt Requests
-
Sends a request to get receipts from the API.
Declaration
Swift
public static func getReceipts(with parameters: Parameters? = nil, completion: ResponseCompletion<[Receipt]> = nil)
Parameters
parameters
The
Parameters
to apply. Commonly used parameter keys for this list is:completion
The closure to be executed once the request has finished.
-
Sends a request to get a specific receipt with ID and optional
Parameters
.Declaration
Swift
public static func getReceipt(id: String, with parameters: Parameters?, completion: ResponseCompletion<Receipt> = nil)
Parameters
id
ID of the receipt.
parameters
The
Parameters
to apply. Commonly used parameter keys for this list is:completion
The closure to be executed once the request has finished.
-
Sends a request to get a create a new receipt.
Declaration
Swift
public static func submitReceipt(image: UIImage, completion: ResponseCompletion<Receipt> = nil)
Parameters
image
The image of the receipt as
UIImage
.completion
The closure to be executed once the request has finished.