Class: Mindee::Product::FR::Payslip::PayslipV2Employer
- Inherits:
-
Mindee::Parsing::Standard::FeatureField
- Object
- Mindee::Parsing::Standard::AbstractField
- Mindee::Parsing::Standard::FeatureField
- Mindee::Product::FR::Payslip::PayslipV2Employer
- Includes:
- Mindee::Parsing::Standard
- Defined in:
- lib/mindee/product/fr/payslip/payslip_v2_employer.rb
Overview
Information about the employer.
Instance Attribute Summary collapse
-
#address ⇒ String
readonly
The address of the employer.
-
#company_id ⇒ String
readonly
The company ID of the employer.
-
#company_site ⇒ String
readonly
The site of the company.
-
#naf_code ⇒ String
readonly
The NAF code of the employer.
-
#name ⇒ String
readonly
The name of the employer.
-
#phone_number ⇒ String
readonly
The phone number of the employer.
-
#urssaf_number ⇒ String
readonly
The URSSAF number of the employer.
Attributes inherited from Mindee::Parsing::Standard::AbstractField
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ PayslipV2Employer
constructor
A new instance of PayslipV2Employer.
- #printable_values ⇒ Hash
- #to_s ⇒ String
Methods inherited from Mindee::Parsing::Standard::FeatureField
Methods inherited from Mindee::Parsing::Standard::AbstractField
array_confidence, array_sum, float_to_string
Constructor Details
#initialize(prediction, page_id) ⇒ PayslipV2Employer
Returns a new instance of PayslipV2Employer.
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employer.rb', line 36 def initialize(prediction, page_id) super(prediction, page_id) @address = prediction['address'] @company_id = prediction['company_id'] @company_site = prediction['company_site'] @naf_code = prediction['naf_code'] @name = prediction['name'] @phone_number = prediction['phone_number'] @urssaf_number = prediction['urssaf_number'] @page_id = page_id end |
Instance Attribute Details
#address ⇒ String (readonly)
The address of the employer.
14 15 16 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employer.rb', line 14 def address @address end |
#company_id ⇒ String (readonly)
The company ID of the employer.
17 18 19 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employer.rb', line 17 def company_id @company_id end |
#company_site ⇒ String (readonly)
The site of the company.
20 21 22 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employer.rb', line 20 def company_site @company_site end |
#naf_code ⇒ String (readonly)
The NAF code of the employer.
23 24 25 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employer.rb', line 23 def naf_code @naf_code end |
#name ⇒ String (readonly)
The name of the employer.
26 27 28 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employer.rb', line 26 def name @name end |
#phone_number ⇒ String (readonly)
The phone number of the employer.
29 30 31 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employer.rb', line 29 def phone_number @phone_number end |
#urssaf_number ⇒ String (readonly)
The URSSAF number of the employer.
32 33 34 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employer.rb', line 32 def urssaf_number @urssaf_number end |
Instance Method Details
#printable_values ⇒ Hash
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employer.rb', line 49 def printable_values printable = {} printable[:address] = format_for_display(@address) printable[:company_id] = format_for_display(@company_id) printable[:company_site] = format_for_display(@company_site) printable[:naf_code] = format_for_display(@naf_code) printable[:name] = format_for_display(@name) printable[:phone_number] = format_for_display(@phone_number) printable[:urssaf_number] = format_for_display(@urssaf_number) printable end |
#to_s ⇒ String
62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/mindee/product/fr/payslip/payslip_v2_employer.rb', line 62 def to_s printable = printable_values out_str = String.new out_str << "\n :Address: #{printable[:address]}" out_str << "\n :Company ID: #{printable[:company_id]}" out_str << "\n :Company Site: #{printable[:company_site]}" out_str << "\n :NAF Code: #{printable[:naf_code]}" out_str << "\n :Name: #{printable[:name]}" out_str << "\n :Phone Number: #{printable[:phone_number]}" out_str << "\n :URSSAF Number: #{printable[:urssaf_number]}" out_str end |