Class: FriendlyShipping::Services::RL::BOLOptions
- Inherits:
-
FriendlyShipping::ShipmentOptions
- Object
- FriendlyShipping::ShipmentOptions
- FriendlyShipping::Services::RL::BOLOptions
- Defined in:
- lib/friendly_shipping/services/rl/bol_options.rb
Overview
Bill of Lading (BOL) options class. Used when serializing R+L API requests.
Constant Summary collapse
- ADDITIONAL_SERVICE_CODES =
Optional service codes that can be used for R+L shipments.
%w[ OriginLiftgate DestinationLiftgate InsidePickup InsideDelivery LimitedAccessPickup LimitedAccessDelivery Freezable DeliveryAppointment ].freeze
Instance Attribute Summary collapse
-
#additional_service_codes ⇒ Array<String>
readonly
Additional service codes.
-
#declared_value ⇒ Numeric
readonly
The declared value of this shipment.
-
#generate_universal_pro ⇒ Boolean
readonly
Whether to generate universal PRO number.
-
#packages_serializer ⇒ Callable
readonly
deprecated
Deprecated.
Use #structures_serializer instead.
-
#pickup_instructions ⇒ String
readonly
The pickup instructions.
-
#pickup_time_window ⇒ Range
readonly
The pickup time window.
-
#reference_numbers ⇒ Hash
readonly
Reference numbers for the shipment.
-
#special_instructions ⇒ String
readonly
Any special instructions.
-
#structures_serializer ⇒ Callable
readonly
The structures serializer.
Instance Method Summary collapse
-
#initialize(pickup_time_window:, pickup_instructions: nil, declared_value: nil, special_instructions: nil, reference_numbers: {}, additional_service_codes: [], structures_serializer: BOLStructuresSerializer, packages_serializer: BOLPackagesSerializer, generate_universal_pro: false, **kwargs) ⇒ BOLOptions
constructor
A new instance of BOLOptions.
Methods inherited from FriendlyShipping::ShipmentOptions
Constructor Details
#initialize(pickup_time_window:, pickup_instructions: nil, declared_value: nil, special_instructions: nil, reference_numbers: {}, additional_service_codes: [], structures_serializer: BOLStructuresSerializer, packages_serializer: BOLPackagesSerializer, generate_universal_pro: false, **kwargs) ⇒ BOLOptions
Returns a new instance of BOLOptions.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/friendly_shipping/services/rl/bol_options.rb', line 50 def initialize( pickup_time_window:, pickup_instructions: nil, declared_value: nil, special_instructions: nil, reference_numbers: {}, additional_service_codes: [], structures_serializer: BOLStructuresSerializer, packages_serializer: BOLPackagesSerializer, generate_universal_pro: false, **kwargs ) @pickup_time_window = pickup_time_window @pickup_instructions = pickup_instructions @declared_value = declared_value @special_instructions = special_instructions @reference_numbers = reference_numbers @additional_service_codes = additional_service_codes @structures_serializer = structures_serializer @packages_serializer = packages_serializer @generate_universal_pro = generate_universal_pro validate_additional_service_codes! super(**kwargs) end |
Instance Attribute Details
#additional_service_codes ⇒ Array<String> (readonly)
Returns additional service codes.
24 25 26 |
# File 'lib/friendly_shipping/services/rl/bol_options.rb', line 24 def additional_service_codes @additional_service_codes end |
#declared_value ⇒ Numeric (readonly)
Returns the declared value of this shipment.
15 16 17 |
# File 'lib/friendly_shipping/services/rl/bol_options.rb', line 15 def declared_value @declared_value end |
#generate_universal_pro ⇒ Boolean (readonly)
Returns whether to generate universal PRO number.
27 28 29 |
# File 'lib/friendly_shipping/services/rl/bol_options.rb', line 27 def generate_universal_pro @generate_universal_pro end |
#packages_serializer ⇒ Callable (readonly)
Use #structures_serializer instead.
34 35 36 |
# File 'lib/friendly_shipping/services/rl/bol_options.rb', line 34 def packages_serializer @packages_serializer end |
#pickup_instructions ⇒ String (readonly)
Returns the pickup instructions.
12 13 14 |
# File 'lib/friendly_shipping/services/rl/bol_options.rb', line 12 def pickup_instructions @pickup_instructions end |
#pickup_time_window ⇒ Range (readonly)
Returns the pickup time window.
9 10 11 |
# File 'lib/friendly_shipping/services/rl/bol_options.rb', line 9 def pickup_time_window @pickup_time_window end |
#reference_numbers ⇒ Hash (readonly)
Returns reference numbers for the shipment.
21 22 23 |
# File 'lib/friendly_shipping/services/rl/bol_options.rb', line 21 def reference_numbers @reference_numbers end |
#special_instructions ⇒ String (readonly)
Returns any special instructions.
18 19 20 |
# File 'lib/friendly_shipping/services/rl/bol_options.rb', line 18 def special_instructions @special_instructions end |
#structures_serializer ⇒ Callable (readonly)
Returns the structures serializer.
30 31 32 |
# File 'lib/friendly_shipping/services/rl/bol_options.rb', line 30 def structures_serializer @structures_serializer end |