ReceiptV5Document
extends Prediction
in package
Receipt API version 5.3 document data.
Table of Contents
Properties
- $category : ClassificationField
- $date : DateField
- $documentType : ClassificationField
- $lineItems : ReceiptV5LineItems
- $locale : LocaleField
- $receiptNumber : StringField
- $subcategory : ClassificationField
- $supplierAddress : StringField
- $supplierCompanyRegistrations : array<string|int, CompanyRegistrationField>
- $supplierName : StringField
- $supplierPhoneNumber : StringField
- $taxes : Taxes
- $time : StringField
- $tip : AmountField
- $totalAmount : AmountField
- $totalNet : AmountField
- $totalTax : AmountField
Methods
- __construct() : mixed
- __toString() : string
Properties
$category
public
ClassificationField
$category
The purchase category among predefined classes.
$date
public
DateField
$date
The date the purchase was made.
$documentType
public
ClassificationField
$documentType
One of: 'CREDIT CARD RECEIPT', 'EXPENSE RECEIPT'.
$lineItems
public
ReceiptV5LineItems
$lineItems
List of line item details.
$locale
public
LocaleField
$locale
The locale detected on the document.
$receiptNumber
public
StringField
$receiptNumber
The receipt number or identifier.
$subcategory
public
ClassificationField
$subcategory
The purchase subcategory among predefined classes for transport and food.
$supplierAddress
public
StringField
$supplierAddress
The address of the supplier or merchant.
$supplierCompanyRegistrations
public
array<string|int, CompanyRegistrationField>
$supplierCompanyRegistrations
List of company registrations associated to the supplier.
$supplierName
public
StringField
$supplierName
The name of the supplier or merchant.
$supplierPhoneNumber
public
StringField
$supplierPhoneNumber
The phone number of the supplier or merchant.
$taxes
public
Taxes
$taxes
List of tax lines information.
$time
public
StringField
$time
The time the purchase was made.
$tip
public
AmountField
$tip
The total amount of tip and gratuity.
$totalAmount
public
AmountField
$totalAmount
The total amount paid: includes taxes, discounts, fees, tips, and gratuity.
$totalNet
public
AmountField
$totalNet
The net amount paid: does not include taxes, fees, and discounts.
$totalTax
public
AmountField
$totalTax
The total amount of taxes.
Methods
__construct()
public
__construct(array<string|int, mixed> $rawPrediction[, int|null $pageId = null ]) : mixed
Parameters
- $rawPrediction : array<string|int, mixed>
-
Raw prediction from HTTP response.
- $pageId : int|null = null
-
Page number for multi pages document.
Tags
__toString()
public
__toString() : string
Return values
string —String representation.