Class: FriendlyShipping::Services::UpsFreight::LabelOptions
- Inherits:
-
RatesOptions
show all
- Defined in:
- lib/friendly_shipping/services/ups_freight/label_options.rb
Overview
Options for generating UPS Freight labels for a shipment.
Constant Summary
collapse
- REFERENCE_NUMBER_CODES =
Maps friendly names to reference number codes.
{
bill_of_lading_number: "57",
purchase_order_number: "28",
shipper_reference: "SH",
consignee_reference: "CO",
pm: "PM",
proj: "PROJ",
quote: "QUOTE",
sid: "SID",
task: "TASK",
vprc: "VPRC",
other: "OTHER"
}.freeze
Constants inherited
from RatesOptions
RatesOptions::BILLING_CODES
Instance Attribute Summary collapse
Attributes inherited from RatesOptions
#billing_address, #billing_code, #commodity_information_generator, #customer_context, #pickup_request_options, #shipper_number, #shipping_method
Instance Method Summary
collapse
#options_for_package
Constructor Details
#initialize(document_options: [], email_options: [], pickup_options: nil, delivery_options: nil, pickup_instructions: nil, delivery_instructions: nil, handling_instructions: nil, reference_numbers: [], **kwargs) ⇒ LabelOptions
Returns a new instance of LabelOptions.
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# File 'lib/friendly_shipping/services/ups_freight/label_options.rb', line 55
def initialize(
document_options: [],
email_options: [],
pickup_options: nil,
delivery_options: nil,
pickup_instructions: nil,
delivery_instructions: nil,
handling_instructions: nil,
reference_numbers: [],
**kwargs
)
@pickup_options = pickup_options
@delivery_options = delivery_options
@document_options = document_options
@email_options = email_options
@pickup_instructions = pickup_instructions
@delivery_instructions = delivery_instructions
@handling_instructions = handling_instructions
@reference_numbers = fill_codes(reference_numbers)
super(**kwargs.reverse_merge(package_options_class: LabelPackageOptions))
end
|
Instance Attribute Details
#delivery_instructions ⇒ String
39
40
41
|
# File 'lib/friendly_shipping/services/ups_freight/label_options.rb', line 39
def delivery_instructions
@delivery_instructions
end
|
33
34
35
|
# File 'lib/friendly_shipping/services/ups_freight/label_options.rb', line 33
def delivery_options
@delivery_options
end
|
24
25
26
|
# File 'lib/friendly_shipping/services/ups_freight/label_options.rb', line 24
def document_options
@document_options
end
|
27
28
29
|
# File 'lib/friendly_shipping/services/ups_freight/label_options.rb', line 27
def email_options
@email_options
end
|
#handling_instructions ⇒ String
42
43
44
|
# File 'lib/friendly_shipping/services/ups_freight/label_options.rb', line 42
def handling_instructions
@handling_instructions
end
|
#pickup_instructions ⇒ String
36
37
38
|
# File 'lib/friendly_shipping/services/ups_freight/label_options.rb', line 36
def pickup_instructions
@pickup_instructions
end
|
30
31
32
|
# File 'lib/friendly_shipping/services/ups_freight/label_options.rb', line 30
def pickup_options
@pickup_options
end
|
#reference_numbers ⇒ Array<Hash>
45
46
47
|
# File 'lib/friendly_shipping/services/ups_freight/label_options.rb', line 45
def reference_numbers
@reference_numbers
end
|