Class: UspsApi::ShipperVisibilityMethod1
- Inherits:
-
Object
- Object
- UspsApi::ShipperVisibilityMethod1
- Defined in:
- lib/usps_api/models/shipper_visibility_method1.rb
Overview
When generating labels for a third party shipper the label provider must capture and provide contact details of the individual or entity to whom they provide the label. For return labels, there is one method for reporting shipper information to USPS: 1. An alternative method allows for the label provider to assign a unique alphanumeric value known as a ‘platformUserId` to each shipper and to report the `platformUserId` together with the required shipper contact details. When using this method the shipper contact details are required in the `senderAddress` object (including `streetAddress`, `city`, `state`, `ZIPCode`, `phone`, `email`, `platformUserId` & `firstName`/`lastName` or `firm`) and this field should be populated with ’SENDER_INFORMATION’.
Constant Summary collapse
- SHIPPER_VISIBILITY_METHOD1 =
[ # TODO: Write general description for SENDER_INFORMATION SENDER_INFORMATION = 'SENDER_INFORMATION'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = SENDER_INFORMATION) ⇒ Object
30 31 32 33 34 |
# File 'lib/usps_api/models/shipper_visibility_method1.rb', line 30 def self.from_value(value, default_value = SENDER_INFORMATION) return default_value if value.nil? default_value end |
.validate(value) ⇒ Object
24 25 26 27 28 |
# File 'lib/usps_api/models/shipper_visibility_method1.rb', line 24 def self.validate(value) return false if value.nil? SHIPPER_VISIBILITY_METHOD1.include?(value) end |