Class: Mindee::Product::BillOfLading::BillOfLadingV1NotifyParty
- Inherits:
-
Mindee::Parsing::Standard::FeatureField
- Object
- Mindee::Parsing::Standard::AbstractField
- Mindee::Parsing::Standard::FeatureField
- Mindee::Product::BillOfLading::BillOfLadingV1NotifyParty
- Includes:
- Mindee::Parsing::Standard
- Defined in:
- lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb
Overview
The party to be notified of the arrival of the goods.
Instance Attribute Summary collapse
-
#address ⇒ String
readonly
The address of the notify party.
-
#email ⇒ String
readonly
The email of the shipper.
-
#name ⇒ String
readonly
The name of the notify party.
-
#phone ⇒ String
readonly
The phone number of the notify party.
Attributes inherited from Mindee::Parsing::Standard::AbstractField
#bounding_box, #confidence, #page_id, #polygon
Instance Method Summary collapse
-
#initialize(prediction, page_id) ⇒ BillOfLadingV1NotifyParty
constructor
A new instance of BillOfLadingV1NotifyParty.
- #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) ⇒ BillOfLadingV1NotifyParty
Returns a new instance of BillOfLadingV1NotifyParty.
26 27 28 29 30 31 32 33 |
# File 'lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb', line 26 def initialize(prediction, page_id) super(prediction, page_id) @address = prediction['address'] @email = prediction['email'] @name = prediction['name'] @phone = prediction['phone'] @page_id = page_id end |
Instance Attribute Details
#address ⇒ String (readonly)
The address of the notify party.
13 14 15 |
# File 'lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb', line 13 def address @address end |
#email ⇒ String (readonly)
The email of the shipper.
16 17 18 |
# File 'lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb', line 16 def email @email end |
#name ⇒ String (readonly)
The name of the notify party.
19 20 21 |
# File 'lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb', line 19 def name @name end |
#phone ⇒ String (readonly)
The phone number of the notify party.
22 23 24 |
# File 'lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb', line 22 def phone @phone end |
Instance Method Details
#printable_values ⇒ Hash
36 37 38 39 40 41 42 43 |
# File 'lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb', line 36 def printable_values printable = {} printable[:address] = format_for_display(@address) printable[:email] = format_for_display(@email) printable[:name] = format_for_display(@name) printable[:phone] = format_for_display(@phone) printable end |
#to_s ⇒ String
46 47 48 49 50 51 52 53 54 |
# File 'lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb', line 46 def to_s printable = printable_values out_str = String.new out_str << "\n :Address: #{printable[:address]}" out_str << "\n :Email: #{printable[:email]}" out_str << "\n :Name: #{printable[:name]}" out_str << "\n :Phone: #{printable[:phone]}" out_str end |