Class: UspsApi::DestinationEntryFacilityType5
- Inherits:
-
Object
- Object
- UspsApi::DestinationEntryFacilityType5
- Defined in:
- lib/usps_api/models/destination_entry_facility_type5.rb
Overview
Destination Entry Facility type for the provided rate, this value can be used in the labels API to ensure the provided rate is applied. * ‘NONE` - None, translates to PTR code `N` * `AREA_DISTRIBUTION_CENTER` - Area Distribution Center, translates to PTR code `A` * `AUXILIARY_SERVICE_FACILITY` - Auxiliary Service Facility, translates to PTR code `F` * `DESTINATION_DELIVERY_UNIT` - Destination Delivery Unit, translates to PTR code `D` * `DESTINATION_NETWORK_DISTRIBUTION_CENTER` - Destination Network Distribution Center, translates to PTR code `B` * `DESTINATION_SECTIONAL_CENTER_FACILITY` - Destination Sectional Center Facility, translates to PTR code `S` * `DESTINATION_SERVICE_HUB` - Destination Service Hub, translates to PTR code `H` * `INTERNATIONAL_SERVICE_CENTER` - International Service Center, translates to PTR code `I` * `DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER` - Destination Regional Processing Distribution Center, translates to PTR code `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_TYPE5 =
[ # TODO: Write general description for NONE NONE = 'NONE'.freeze, # TODO: Write general description for AREA_DISTRIBUTION_CENTER AREA_DISTRIBUTION_CENTER = 'AREA_DISTRIBUTION_CENTER'.freeze, # TODO: Write general description for AUXILIARY_SERVICE_FACILITY AUXILIARY_SERVICE_FACILITY = 'AUXILIARY_SERVICE_FACILITY'.freeze, # TODO: Write general description for DESTINATION_DELIVERY_UNIT DESTINATION_DELIVERY_UNIT = 'DESTINATION_DELIVERY_UNIT'.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_SERVICE_HUB DESTINATION_SERVICE_HUB = 'DESTINATION_SERVICE_HUB'.freeze, # TODO: Write general description for INTERNATIONAL_SERVICE_CENTER INTERNATIONAL_SERVICE_CENTER = 'INTERNATIONAL_SERVICE_CENTER'.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
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'lib/usps_api/models/destination_entry_facility_type5.rb', line 64 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 'area_distribution_center' then AREA_DISTRIBUTION_CENTER when 'auxiliary_service_facility' then AUXILIARY_SERVICE_FACILITY when 'destination_delivery_unit' then DESTINATION_DELIVERY_UNIT when 'destination_network_distribution_center' then DESTINATION_NETWORK_DISTRIBUTION_CENTER when 'destination_sectional_center_facility' then DESTINATION_SECTIONAL_CENTER_FACILITY when 'destination_service_hub' then DESTINATION_SERVICE_HUB when 'international_service_center' then INTERNATIONAL_SERVICE_CENTER when 'destination_regional_processing_distribution_center' then DESTINATION_REGIONAL_PROCESSING_DISTRIBUTION_CENTER else default_value end end |
.validate(value) ⇒ Object
58 59 60 61 62 |
# File 'lib/usps_api/models/destination_entry_facility_type5.rb', line 58 def self.validate(value) return false if value.nil? DESTINATION_ENTRY_FACILITY_TYPE5.include?(value) end |