Class: AwesomeUsps::USPS
- Inherits:
-
Object
- Object
- AwesomeUsps::USPS
- Includes:
- AddressVerification, DeliveryAndSignatureConfirmation, ElectricMerchandisReturn, ExpressMail, Gateway, InternationalMailLabels, OpenDistrubutePriority, ServiceStandard, Shipping, Tracking
- Defined in:
- lib/awesome_usps.rb
Constant Summary
Constants included from Gateway
Gateway::LIVE_DOMAIN, Gateway::LIVE_RESOURCE, Gateway::MAX_RETRIES, Gateway::PARSE_METHOD, Gateway::RESPONSE, Gateway::SSL_DOMAIN, Gateway::SSL_RESOURCE, Gateway::TEST_DOMAIN, Gateway::TEST_RESOURCE
Constants included from Shipping
Shipping::CONTAINERS, Shipping::MAIL_TYPES, Shipping::PACKAGE_PROPERTIES, Shipping::POSTAGE_PROPERTIES, Shipping::US_SERVICES
Instance Method Summary collapse
-
#initialize(username) ⇒ USPS
constructor
A new instance of USPS.
- #validate(param) ⇒ Object
Methods included from Gateway
Methods included from InternationalMailLabels
#canned_express_mail_international_label_test, #canned_first_class_mail_international_label_test, #canned_priority_mail_international_label_test, #express_mail_international_label, #first_class_international_label, #priority_mail_international_label
Methods included from AddressVerification
#canned_city_state_lookup_test, #canned_verify_address_test, #canned_zip_lookup_test, #city_state_lookup, #parse_address_information, #veryify_address, #xml_for_address_information_api, #zip_lookup
Methods included from ExpressMail
#canned_express_mail_label_test, #express_mail_label
Methods included from ElectricMerchandisReturn
#canned_merch_return_test, #merch_return
Methods included from OpenDistrubutePriority
#canned_open_distrubute_priority_label_test, #open_distrubute_priority_label
Methods included from ServiceStandard
#canned_express_mail_commitment_test, #canned_priority_mail_estimated_time_test, #canned_standard_mail_estimated_time_test, #express_mail_commitment, #parse_express, #parse_service, #priority_mail_estimated_time, #standard_mail_estimated_time, #xml_for_estimated_time_for_delivery
Methods included from DeliveryAndSignatureConfirmation
#canned_delivery_confirmation_label_test, #canned_signature_confirmation_label_test, #delivery_confirmation_label, #signature_confirmation_label
Methods included from Shipping
#canned_domestic_rates_test, #canned_world_rates_test, #domestic_rates, #world_rates
Methods included from Tracking
#canned_tracking, #parse_tracking, #track, #xml_for_tracking
Constructor Details
#initialize(username) ⇒ USPS
Returns a new instance of USPS.
19 20 21 |
# File 'lib/awesome_usps.rb', line 19 def initialize(username) @username = validate(username) end |
Instance Method Details
#validate(param) ⇒ Object
23 24 25 26 |
# File 'lib/awesome_usps.rb', line 23 def validate(param) raise ERROR_MSG if param.blank? param end |