Class: FreightKit::CCYQ

Inherits:
Carrier show all
Includes:
Documentable, Pickupable, Rateable, Trackable
Defined in:
lib/freight_kit/carriers/ccyq.rb

Constant Summary collapse

REACTIVE_FREIGHT_CARRIER =
true
JSON_HEADERS =
{
  Accept: 'application/json',
  charset: 'utf-8',
  'Content-Type' => 'application/json'
}.freeze

Constants inherited from Carrier

FreightKit::Carrier::BOL_NUMBER_TRACKING_URL_TEMPLATE, FreightKit::Carrier::NUMBERS, FreightKit::Carrier::ORDER_NUMBER_TRACKING_URL_TEMPLATE, FreightKit::Carrier::PICKUP_NUMBER_TRACKING_URL_TEMPLATE, FreightKit::Carrier::PO_NUMBER_TRACKING_URL_TEMPLATE, FreightKit::Carrier::TRACKING_NUMBER_TRACKING_URL_TEMPLATE, FreightKit::Carrier::VALID_BOL_NUMBER_REGEX, FreightKit::Carrier::VALID_ORDER_NUMBER_REGEX, FreightKit::Carrier::VALID_PICKUP_NUMBER_REGEX, FreightKit::Carrier::VALID_PO_NUMBER_REGEX, FreightKit::Carrier::VALID_TRACKING_NUMBER_REGEX

Class Attribute Summary collapse

Attributes inherited from Carrier

#conf, #credentials, #customer_location, #last_request, #rates_with_excessive_length_fees, #tariff, #tmpdir

Class Method Summary collapse

Methods included from Pickupable

#create_pickup

Methods included from Documentable

#pod, #scanned_bol

Methods included from Trackable

#find_tracking_info

Methods included from Rateable

#find_rates

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, maximum_height, maximum_weight, #overlength_fee, pickup_number_is_tracking_number?, #pod, #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::Carrier

Class Attribute Details

.nameObject (readonly)

Returns the value of attribute name.



26
27
28
# File 'lib/freight_kit/carriers/ccyq.rb', line 26

def name
  @name
end

.scacObject (readonly)

Returns the value of attribute scac.



26
27
28
# File 'lib/freight_kit/carriers/ccyq.rb', line 26

def scac
  @scac
end

Class Method Details

.minimum_length_for_overlength_feesObject



6
7
8
# File 'lib/freight_kit/carriers/ccyq.rb', line 6

def minimum_length_for_overlength_fees
  Measured::Length.new(6, :feet)
end

.overlength_fees_require_tariff?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/freight_kit/carriers/ccyq.rb', line 10

def overlength_fees_require_tariff?
  false
end

.required_credential_typesObject



14
15
16
# File 'lib/freight_kit/carriers/ccyq.rb', line 14

def required_credential_types
  %i[api_key api_proxy]
end

.requirementsObject



18
19
20
# File 'lib/freight_kit/carriers/ccyq.rb', line 18

def requirements
  %i[credentials]
end