Payslip V2
Sample Code:
- class PayslipV2(raw_prediction)
Payslip API version 2 inference prediction.
- static get_endpoint_info(klass)
Retrives the endpoint information for an Inference.
Should never retrieve info for CustomV1, as a custom endpoint should be created to use CustomV1.
- Parameters:
klass (
Type
[Inference
]) – product subclass to access endpoint information.- Return type:
Dict
[str
,str
]
- endpoint_name: Optional[str] = 'payslip_fra'
Name of the endpoint.
- endpoint_version: Optional[str] = '2'
Version of the endpoint.
- is_rotation_applied: Optional[bool]
Whether the document has had any rotation applied to it.
- page_id: Optional[int]
Optional page id for page-level predictions.
-
pages:
List
[Page
[PayslipV2Document
]] Page-level prediction(s).
-
prediction:
PayslipV2Document
Document-level prediction.
- product: Product
Name and version of a given product, as sent back by the API.
- class PayslipV2Document(raw_prediction, page_id=None)
Payslip API version 2.0 document data.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
-
bank_account_details:
PayslipV2BankAccountDetail
Information about the employee’s bank account.
-
employee:
PayslipV2Employee
Information about the employee.
-
employer:
PayslipV2Employer
Information about the employer.
-
employment:
PayslipV2Employment
Information about the employment.
-
pay_detail:
PayslipV2PayDetail
Detailed information about the pay.
-
pay_period:
PayslipV2PayPeriod
Information about the pay period.
-
pto:
PayslipV2Pto
Information about paid time off.
-
salary_details:
List
[PayslipV2SalaryDetail
] Detailed information about the earnings.
- class PayslipV2Employee(raw_prediction, page_id=None)
Information about the employee.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
- to_field_list()
Output the object in a format suitable for inclusion in an rST field list.
- Return type:
str
-
address:
Optional
[str
] The address of the employee.
- bounding_box: Optional[Quadrilateral]
A right rectangle containing the word in the document.
- confidence: float
The confidence score.
-
date_of_birth:
Optional
[str
] The date of birth of the employee.
-
first_name:
Optional
[str
] The first name of the employee.
-
last_name:
Optional
[str
] The last name of the employee.
-
page_n:
int
The document page on which the information was found.
-
phone_number:
Optional
[str
] The phone number of the employee.
- polygon: Polygon
A polygon containing the word in the document.
-
registration_number:
Optional
[str
] The registration number of the employee.
-
social_security_number:
Optional
[str
] The social security number of the employee.
- class PayslipV2Employer(raw_prediction, page_id=None)
Information about the employer.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
- to_field_list()
Output the object in a format suitable for inclusion in an rST field list.
- Return type:
str
-
address:
Optional
[str
] The address of the employer.
- bounding_box: Optional[Quadrilateral]
A right rectangle containing the word in the document.
-
company_id:
Optional
[str
] The company ID of the employer.
-
company_site:
Optional
[str
] The site of the company.
- confidence: float
The confidence score.
-
naf_code:
Optional
[str
] The NAF code of the employer.
-
name:
Optional
[str
] The name of the employer.
-
page_n:
int
The document page on which the information was found.
-
phone_number:
Optional
[str
] The phone number of the employer.
- polygon: Polygon
A polygon containing the word in the document.
-
urssaf_number:
Optional
[str
] The URSSAF number of the employer.
- class PayslipV2BankAccountDetail(raw_prediction, page_id=None)
Information about the employee’s bank account.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
- to_field_list()
Output the object in a format suitable for inclusion in an rST field list.
- Return type:
str
-
bank_name:
Optional
[str
] The name of the bank.
- bounding_box: Optional[Quadrilateral]
A right rectangle containing the word in the document.
- confidence: float
The confidence score.
-
iban:
Optional
[str
] The IBAN of the bank account.
-
page_n:
int
The document page on which the information was found.
- polygon: Polygon
A polygon containing the word in the document.
-
swift:
Optional
[str
] The SWIFT code of the bank.
- class PayslipV2Employment(raw_prediction, page_id=None)
Information about the employment.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
- to_field_list()
Output the object in a format suitable for inclusion in an rST field list.
- Return type:
str
- bounding_box: Optional[Quadrilateral]
A right rectangle containing the word in the document.
-
category:
Optional
[str
] The category of the employment.
-
coefficient:
Optional
[float
] The coefficient of the employment.
-
collective_agreement:
Optional
[str
] The collective agreement of the employment.
- confidence: float
The confidence score.
-
job_title:
Optional
[str
] The job title of the employee.
-
page_n:
int
The document page on which the information was found.
- polygon: Polygon
A polygon containing the word in the document.
-
position_level:
Optional
[str
] The position level of the employment.
-
start_date:
Optional
[str
] The start date of the employment.
- class PayslipV2SalaryDetail(raw_prediction, page_id=None)
Detailed information about the earnings.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
- to_table_line()
Output in a format suitable for inclusion in an rST table.
- Return type:
str
-
amount:
Optional
[float
] The amount of the earnings.
-
base:
Optional
[float
] The base value of the earnings.
- bounding_box: Optional[Quadrilateral]
A right rectangle containing the word in the document.
- confidence: float
The confidence score.
-
description:
Optional
[str
] The description of the earnings.
-
page_n:
int
The document page on which the information was found.
- polygon: Polygon
A polygon containing the word in the document.
-
rate:
Optional
[float
] The rate of the earnings.
- class PayslipV2PayDetail(raw_prediction, page_id=None)
Detailed information about the pay.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
- to_field_list()
Output the object in a format suitable for inclusion in an rST field list.
- Return type:
str
- bounding_box: Optional[Quadrilateral]
A right rectangle containing the word in the document.
- confidence: float
The confidence score.
-
gross_salary:
Optional
[float
] The gross salary of the employee.
-
gross_salary_ytd:
Optional
[float
] The year-to-date gross salary of the employee.
-
income_tax_rate:
Optional
[float
] The income tax rate of the employee.
-
income_tax_withheld:
Optional
[float
] The income tax withheld from the employee’s pay.
-
net_paid:
Optional
[float
] The net paid amount of the employee.
-
net_paid_before_tax:
Optional
[float
] The net paid amount before tax of the employee.
-
net_taxable:
Optional
[float
] The net taxable amount of the employee.
-
net_taxable_ytd:
Optional
[float
] The year-to-date net taxable amount of the employee.
-
page_n:
int
The document page on which the information was found.
- polygon: Polygon
A polygon containing the word in the document.
-
total_cost_employer:
Optional
[float
] The total cost to the employer.
-
total_taxes_and_deductions:
Optional
[float
] The total taxes and deductions of the employee.
- class PayslipV2Pto(raw_prediction, page_id=None)
Information about paid time off.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
- to_field_list()
Output the object in a format suitable for inclusion in an rST field list.
- Return type:
str
-
accrued_this_period:
Optional
[float
] The amount of paid time off accrued in this period.
-
balance_end_of_period:
Optional
[float
] The balance of paid time off at the end of the period.
- bounding_box: Optional[Quadrilateral]
A right rectangle containing the word in the document.
- confidence: float
The confidence score.
-
page_n:
int
The document page on which the information was found.
- polygon: Polygon
A polygon containing the word in the document.
-
used_this_period:
Optional
[float
] The amount of paid time off used in this period.
- class PayslipV2PayPeriod(raw_prediction, page_id=None)
Information about the pay period.
- Parameters:
raw_prediction (Dict[str, Any]) –
page_id (Optional[int]) –
- to_field_list()
Output the object in a format suitable for inclusion in an rST field list.
- Return type:
str
- bounding_box: Optional[Quadrilateral]
A right rectangle containing the word in the document.
- confidence: float
The confidence score.
-
end_date:
Optional
[str
] The end date of the pay period.
-
month:
Optional
[str
] The month of the pay period.
-
page_n:
int
The document page on which the information was found.
-
payment_date:
Optional
[str
] The date of payment for the pay period.
- polygon: Polygon
A polygon containing the word in the document.
-
start_date:
Optional
[str
] The start date of the pay period.
-
year:
Optional
[str
] The year of the pay period.