Class: UspsApi::DestinationEntryFacilityType1
- Inherits:
-
Object
- Object
- UspsApi::DestinationEntryFacilityType1
- Defined in:
- lib/usps_api/models/destination_entry_facility_type1.rb
Overview
Types of Facilities: * ‘NONE` - Translate to Destination Rate Indicator N * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Translate to Destination Rate Indicator S * `DESTINATION_DELIVERY_UNIT` - Translate to Destination Rate Indicator D * `DESTINATION_SERVICE_HUB` - Translate to Destination Rate Indicator H * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Translate to Destination Rate Indicator B Note: * Effective 01/18/2026: `DESTINATION_NETWORK_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is no longer eligible. * Effective 01/18/2026: (NSA Only) `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` with `PARCEL_SELECT` is available as an option.
Constant Summary collapse
- DESTINATION_ENTRY_FACILITY_TYPE1 =
[ # TODO: Write general description for NONE NONE = 'NONE'.freeze, # TODO: Write general description for # DESTINATION_NETWORK_DISTRIBUTION_CENTER DESTINATION_NETWORK_DISTRIBUTION_CENTER = 'DESTINATION_NETWORK_DISTRIBUTION_CENTER'.freeze, # TODO: Write general description for # DESTINATION_SECTIONAL_CENTER_FACILITY DESTINATION_SECTIONAL_CENTER_FACILITY = 'DESTINATION_SECTIONAL_CENTER_FACILITY'.freeze, # TODO: Write general description for DESTINATION_DELIVERY_UNIT DESTINATION_DELIVERY_UNIT = 'DESTINATION_DELIVERY_UNIT'.freeze, # TODO: Write general description for DESTINATION_SERVICE_HUB DESTINATION_SERVICE_HUB = 'DESTINATION_SERVICE_HUB'.freeze, # TODO: Write general description for # DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER = 'DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = NONE) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/usps_api/models/destination_entry_facility_type1.rb', line 49 def self.from_value(value, default_value = NONE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'none' then NONE when 'destination_network_distribution_center' then DESTINATION_NETWORK_DISTRIBUTION_CENTER when 'destination_sectional_center_facility' then DESTINATION_SECTIONAL_CENTER_FACILITY when 'destination_delivery_unit' then DESTINATION_DELIVERY_UNIT when 'destination_service_hub' then DESTINATION_SERVICE_HUB when 'destination_regional_processing_distribution_center' then DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER else default_value end end |
.validate(value) ⇒ Object
43 44 45 46 47 |
# File 'lib/usps_api/models/destination_entry_facility_type1.rb', line 43 def self.validate(value) return false if value.nil? DESTINATION_ENTRY_FACILITY_TYPE1.include?(value) end |