Class: FriendlyShipping::Services::TForceFreight::ShipmentInformation
- Inherits:
-
Object
- Object
- FriendlyShipping::Services::TForceFreight::ShipmentInformation
- Defined in:
- lib/friendly_shipping/services/tforce_freight/shipment_information.rb
Overview
Information for a specific shipment returned by the API.
Instance Attribute Summary collapse
-
#billable_weight ⇒ Measured::Weight
readonly
The billable weight for this shipment.
-
#bol_id ⇒ String
readonly
The shipment's BOL ID number.
-
#data ⇒ Hash
readonly
Any additional data.
-
#days_in_transit ⇒ Integer
readonly
The number of days in transit.
-
#destination_is_rural ⇒ Boolean
readonly
Whether or not the destination is rural.
-
#documents ⇒ Array<ShipmentDocument>
readonly
The shipment's documents (BOL, labels, etc).
-
#email_sent ⇒ Boolean
readonly
Whether or not the email was sent.
-
#origin_is_rural ⇒ Boolean
readonly
Whether or not the origin is rural.
-
#origin_service_center ⇒ String
readonly
The origin service center.
-
#pickup_confirmation_number ⇒ String
readonly
The shipment's pickup confirmation number.
-
#pro_number ⇒ String
readonly
The shipment's PRO number.
-
#rates ⇒ Array<Hash>
readonly
The rates.
-
#shipping_method ⇒ ShippingMethod
readonly
The shipping method.
-
#total_charges ⇒ Money
readonly
The total charges for this shipment.
-
#warnings ⇒ Array<String>
readonly
Any warnings.
Instance Method Summary collapse
-
#initialize(bol_id:, pro_number: nil, pickup_confirmation_number: nil, origin_service_center: nil, email_sent: nil, origin_is_rural: nil, destination_is_rural: nil, rates: [], total_charges: nil, billable_weight: nil, days_in_transit: nil, documents: [], shipping_method: nil, warnings: nil, data: {}) ⇒ ShipmentInformation
constructor
A new instance of ShipmentInformation.
Constructor Details
#initialize(bol_id:, pro_number: nil, pickup_confirmation_number: nil, origin_service_center: nil, email_sent: nil, origin_is_rural: nil, destination_is_rural: nil, rates: [], total_charges: nil, billable_weight: nil, days_in_transit: nil, documents: [], shipping_method: nil, warnings: nil, data: {}) ⇒ ShipmentInformation
Returns a new instance of ShipmentInformation.
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 68 def initialize( bol_id:, pro_number: nil, pickup_confirmation_number: nil, origin_service_center: nil, email_sent: nil, origin_is_rural: nil, destination_is_rural: nil, rates: [], total_charges: nil, billable_weight: nil, days_in_transit: nil, documents: [], shipping_method: nil, warnings: nil, data: {} ) @bol_id = bol_id @pro_number = pro_number @pickup_confirmation_number = pickup_confirmation_number @origin_service_center = origin_service_center @email_sent = email_sent @origin_is_rural = origin_is_rural @destination_is_rural = destination_is_rural @rates = rates @total_charges = total_charges @billable_weight = billable_weight @days_in_transit = days_in_transit @documents = documents @shipping_method = shipping_method @warnings = warnings @data = data end |
Instance Attribute Details
#billable_weight ⇒ Measured::Weight (readonly)
Returns the billable weight for this shipment.
36 37 38 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 36 def billable_weight @billable_weight end |
#bol_id ⇒ String (readonly)
Returns the shipment's BOL ID number.
9 10 11 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 9 def bol_id @bol_id end |
#data ⇒ Hash (readonly)
Returns any additional data.
51 52 53 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 51 def data @data end |
#days_in_transit ⇒ Integer (readonly)
Returns the number of days in transit.
39 40 41 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 39 def days_in_transit @days_in_transit end |
#destination_is_rural ⇒ Boolean (readonly)
Returns whether or not the destination is rural.
27 28 29 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 27 def destination_is_rural @destination_is_rural end |
#documents ⇒ Array<ShipmentDocument> (readonly)
Returns the shipment's documents (BOL, labels, etc).
42 43 44 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 42 def documents @documents end |
#email_sent ⇒ Boolean (readonly)
Returns whether or not the email was sent.
21 22 23 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 21 def email_sent @email_sent end |
#origin_is_rural ⇒ Boolean (readonly)
Returns whether or not the origin is rural.
24 25 26 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 24 def origin_is_rural @origin_is_rural end |
#origin_service_center ⇒ String (readonly)
Returns the origin service center.
18 19 20 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 18 def origin_service_center @origin_service_center end |
#pickup_confirmation_number ⇒ String (readonly)
Returns the shipment's pickup confirmation number.
15 16 17 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 15 def pickup_confirmation_number @pickup_confirmation_number end |
#pro_number ⇒ String (readonly)
Returns the shipment's PRO number.
12 13 14 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 12 def pro_number @pro_number end |
#rates ⇒ Array<Hash> (readonly)
Returns the rates.
30 31 32 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 30 def rates @rates end |
#shipping_method ⇒ ShippingMethod (readonly)
Returns the shipping method.
45 46 47 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 45 def shipping_method @shipping_method end |
#total_charges ⇒ Money (readonly)
Returns the total charges for this shipment.
33 34 35 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 33 def total_charges @total_charges end |
#warnings ⇒ Array<String> (readonly)
Returns any warnings.
48 49 50 |
# File 'lib/friendly_shipping/services/tforce_freight/shipment_information.rb', line 48 def warnings @warnings end |