Class: FriendlyShipping::Services::Usps::MachinablePackage
- Inherits:
-
Object
- Object
- FriendlyShipping::Services::Usps::MachinablePackage
- Defined in:
- lib/friendly_shipping/services/usps/machinable_package.rb
Overview
USPS has certain size and weight requirements for packages to be considered machinable. Machinable packages are generally less expensive to ship. For more information see: https://pe.usps.com/BusinessMail101?ViewName=Parcels
Constant Summary collapse
- MIN_LENGTH =
Measured::Length(6, :inches)
- MIN_WIDTH =
Measured::Length(3, :inches)
- MIN_HEIGHT =
Measured::Length(0.25, :inches)
- MAX_LENGTH =
Measured::Length(27, :inches)
- MAX_WIDTH =
Measured::Length(17, :inches)
- MAX_HEIGHT =
Measured::Length(17, :inches)
- MAX_WEIGHT =
Measured::Weight(25, :pounds)
Instance Attribute Summary collapse
-
#package ⇒ Object
readonly
Returns the value of attribute package.
Instance Method Summary collapse
-
#initialize(package) ⇒ MachinablePackage
constructor
A new instance of MachinablePackage.
- #machinable? ⇒ Boolean
Constructor Details
#initialize(package) ⇒ MachinablePackage
Returns a new instance of MachinablePackage.
25 26 27 |
# File 'lib/friendly_shipping/services/usps/machinable_package.rb', line 25 def initialize(package) @package = package end |
Instance Attribute Details
#package ⇒ Object (readonly)
Returns the value of attribute package.
12 13 14 |
# File 'lib/friendly_shipping/services/usps/machinable_package.rb', line 12 def package @package end |
Instance Method Details
#machinable? ⇒ Boolean
29 30 31 |
# File 'lib/friendly_shipping/services/usps/machinable_package.rb', line 29 def machinable? at_least_minimum && at_most_maximum end |