Energy Bill V1

Sample Code:

class EnergyBillV1(raw_prediction)

Energy Bill API version 1 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] = 'energy_bill_fra'

Name of the endpoint.

endpoint_version: Optional[str] = '1'

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[EnergyBillV1Document]]

Page-level prediction(s).

prediction: EnergyBillV1Document

Document-level prediction.

product: Product

Name and version of a given product, as sent back by the API.

class EnergyBillV1Document(raw_prediction, page_id=None)

Energy Bill API version 1.0 document data.

Parameters:
  • raw_prediction (Dict[str, Any]) –

  • page_id (Optional[int]) –

contract_id: StringField

The unique identifier associated with a specific contract.

delivery_point: StringField

The unique identifier assigned to each electricity or gas consumption point. It specifies the exact location where the energy is delivered.

due_date: DateField

The date by which the payment for the energy invoice is due.

energy_consumer: EnergyBillV1EnergyConsumer

The entity that consumes the energy.

energy_supplier: EnergyBillV1EnergySupplier

The company that supplies the energy.

energy_usage: List[EnergyBillV1EnergyUsage]

Details of energy consumption.

invoice_date: DateField

The date when the energy invoice was issued.

invoice_number: StringField

The unique identifier of the energy invoice.

meter_details: EnergyBillV1MeterDetail

Information about the energy meter.

subscription: List[EnergyBillV1Subscription]

The subscription details fee for the energy service.

taxes_and_contributions: List[EnergyBillV1TaxesAndContribution]

Details of Taxes and Contributions.

total_amount: AmountField

The total amount to be paid for the energy invoice.

total_before_taxes: AmountField

The total amount to be paid for the energy invoice before taxes.

total_taxes: AmountField

Total of taxes applied to the invoice.

class EnergyBillV1EnergySupplier(raw_prediction, page_id=None)

The company that supplies the energy.

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 energy supplier.

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

confidence: float

The confidence score.

name: Optional[str]

The name of the energy supplier.

page_n: int

The document page on which the information was found.

polygon: Polygon

A polygon containing the word in the document.

class EnergyBillV1EnergyConsumer(raw_prediction, page_id=None)

The entity that consumes the energy.

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 energy consumer.

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

confidence: float

The confidence score.

name: Optional[str]

The name of the energy consumer.

page_n: int

The document page on which the information was found.

polygon: Polygon

A polygon containing the word in the document.

class EnergyBillV1Subscription(raw_prediction, page_id=None)

The subscription details fee for the energy service.

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

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

confidence: float

The confidence score.

description: Optional[str]

Description or details of the subscription.

end_date: Optional[str]

The end date of the subscription.

page_n: int

The document page on which the information was found.

polygon: Polygon

A polygon containing the word in the document.

start_date: Optional[str]

The start date of the subscription.

tax_rate: Optional[float]

The rate of tax applied to the total cost.

total: Optional[float]

The total cost of subscription.

unit_price: Optional[float]

The price per unit of subscription.

class EnergyBillV1EnergyUsage(raw_prediction, page_id=None)

Details of energy consumption.

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

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

confidence: float

The confidence score.

description: Optional[str]

Description or details of the energy usage.

end_date: Optional[str]

The end date of the energy usage.

page_n: int

The document page on which the information was found.

polygon: Polygon

A polygon containing the word in the document.

start_date: Optional[str]

The start date of the energy usage.

tax_rate: Optional[float]

The rate of tax applied to the total cost.

total: Optional[float]

The total cost of energy consumed.

unit_price: Optional[float]

The price per unit of energy consumed.

class EnergyBillV1TaxesAndContribution(raw_prediction, page_id=None)

Details of Taxes and Contributions.

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

bounding_box: Optional[Quadrilateral]

A right rectangle containing the word in the document.

confidence: float

The confidence score.

description: Optional[str]

Description or details of the Taxes and Contributions.

end_date: Optional[str]

The end date of the Taxes and Contributions.

page_n: int

The document page on which the information was found.

polygon: Polygon

A polygon containing the word in the document.

start_date: Optional[str]

The start date of the Taxes and Contributions.

tax_rate: Optional[float]

The rate of tax applied to the total cost.

total: Optional[float]

The total cost of Taxes and Contributions.

unit_price: Optional[float]

The price per unit of Taxes and Contributions.

class EnergyBillV1MeterDetail(raw_prediction, page_id=None)

Information about the energy meter.

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.

meter_number: Optional[str]

The unique identifier of the energy meter.

meter_type: Optional[str]

The type of energy meter.

page_n: int

The document page on which the information was found.

polygon: Polygon

A polygon containing the word in the document.

unit: Optional[str]

The unit of measurement for energy consumption, which can be kW, m³, or L.