Class: FreightKit::FCSY
- Inherits:
-
CarrierLogistics
- Object
- Carrier
- Platform
- CarrierLogistics
- FreightKit::FCSY
- Defined in:
- lib/freight_kit/carriers/fcsy.rb
Constant Summary collapse
- REACTIVE_FREIGHT_CARRIER =
true
Constants inherited from CarrierLogistics
CarrierLogistics::EXPIRED_CREDENTIALS_MESSAGES, CarrierLogistics::INVALID_CREDENTIALS_MESSAGES, CarrierLogistics::REACTIVE_FREIGHT_PLATFORM
Constants inherited from Carrier
Carrier::BOL_NUMBER_TRACKING_URL_TEMPLATE, Carrier::NUMBERS, Carrier::ORDER_NUMBER_TRACKING_URL_TEMPLATE, Carrier::PICKUP_NUMBER_TRACKING_URL_TEMPLATE, Carrier::PO_NUMBER_TRACKING_URL_TEMPLATE, Carrier::TRACKING_NUMBER_TRACKING_URL_TEMPLATE, Carrier::VALID_BOL_NUMBER_REGEX, Carrier::VALID_ORDER_NUMBER_REGEX, Carrier::VALID_PICKUP_NUMBER_REGEX, Carrier::VALID_PO_NUMBER_REGEX, Carrier::VALID_TRACKING_NUMBER_REGEX
Class Attribute Summary collapse
-
.name ⇒ Object
readonly
Returns the value of attribute name.
-
.scac ⇒ Object
readonly
Returns the value of attribute scac.
Attributes inherited from Carrier
#conf, #credentials, #customer_location, #last_request, #rates_with_excessive_length_fees, #tariff, #tmpdir
Class Method Summary collapse
- .maximum_height ⇒ Object
- .maximum_weight ⇒ Object
- .minimum_length_for_overlength_fees ⇒ Object
- .overlength_fees_require_tariff? ⇒ Boolean
Instance Method Summary collapse
Methods inherited from CarrierLogistics
#build_rate_request, #build_tracking_request, #build_url, #commit, #map_response_errors, #parse_amount, #parse_api_city_state, #parse_api_city_state_zip, #parse_api_date, #parse_api_date_time, #parse_document_response, #parse_rate_response, #parse_tracking_response, #pod, #ratequote_line_description, required_credential_types, requirements, #scanned_bol
Methods included from Rateable
Methods included from Trackable
Methods inherited from Platform
Methods inherited from Carrier
#available_services, #bol, bol_requires_tracking_number?, #cancel_shipment, #create_pickup, default_location, #fetch_credential, #find_estimate, #find_locations, #find_rates, find_rates_with_declared_value?, #find_tracking_info, #find_tracking_number_from_pickup_number, implemented?, #initialize, maximum_address_field_length, #overlength_fee, pickup_number_is_tracking_number?, #pod, required_credential_types, requirements, #scanned_bol, #serviceable_accessorials?, tracking_url_template, #valid_credentials?, valid_number_regex, #valid_tracking_number?, #validate_packages
Constructor Details
This class inherits a constructor from FreightKit::Platform
Class Attribute Details
.name ⇒ Object (readonly)
Returns the value of attribute name.
26 27 28 |
# File 'lib/freight_kit/carriers/fcsy.rb', line 26 def name @name end |
.scac ⇒ Object (readonly)
Returns the value of attribute scac.
26 27 28 |
# File 'lib/freight_kit/carriers/fcsy.rb', line 26 def scac @scac end |
Class Method Details
.maximum_height ⇒ Object
6 7 8 |
# File 'lib/freight_kit/carriers/fcsy.rb', line 6 def maximum_height Measured::Length.new(105, :inches) end |
.maximum_weight ⇒ Object
10 11 12 |
# File 'lib/freight_kit/carriers/fcsy.rb', line 10 def maximum_weight Measured::Weight.new(10_000, :pounds) end |
.minimum_length_for_overlength_fees ⇒ Object
14 15 16 |
# File 'lib/freight_kit/carriers/fcsy.rb', line 14 def minimum_length_for_overlength_fees Measured::Length.new(12, :feet) end |
.overlength_fees_require_tariff? ⇒ Boolean
18 19 20 |
# File 'lib/freight_kit/carriers/fcsy.rb', line 18 def overlength_fees_require_tariff? false end |
Instance Method Details
#build_calculated_accessorials(shipment) ⇒ Object
Rates
35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/freight_kit/carriers/fcsy.rb', line 35 def build_calculated_accessorials(shipment) [].tap do |builder| longest_dimension = shipment.packages.map { |package| [package.length(:in), package.width(:in)].max }.max.ceil case longest_dimension when (96..143) then builder << 'XTRM8' when (144..191) then builder << 'XTRM12' when (192..239) then builder << 'XTRM16' when (240..311) then builder << 'XTRM20' when (312..) then builder << 'XTRM27' end end end |