Module: Usps::Api::Endpoints::SundayHolidayAvailability
- Included in:
- Usps::Api::Endpoints
- Defined in:
- lib/usps/api/endpoints/sunday_holiday_availability.rb
Instance Method Summary collapse
-
#sunday_holiday_availability(options = {}) ⇒ Object
The Sunday Holiday API allows customers to request information on package availability for Sunday’s and/or Holidays for a given zip code pairing.
Instance Method Details
#sunday_holiday_availability(options = {}) ⇒ Object
The Sunday Holiday API allows customers to request information on package availability for Sunday’s and/or Holidays for a given zip code pairing. For information on USPS Holidays, please visit about.usps.com/newsroom/events/.
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/usps/api/endpoints/sunday_holiday_availability.rb', line 17 def sunday_holiday_availability( = {}) throw ArgumentError.new('Required arguments :sunday_holiday_request missing') if [:sunday_holiday_request].nil? throw ArgumentError.new('Required arguments :sunday_holiday_request, :sunday_holiday missing') if [:sunday_holiday_request][:sunday_holiday].nil? throw ArgumentError.new('Required arguments :sunday_holiday_request, :from_zip_code missing') if [:sunday_holiday_request][:from_zip_code].nil? throw ArgumentError.new('Required arguments :sunday_holiday_request, :to_zip_code missing') if [:sunday_holiday_request][:to_zip_code].nil? request = build_request(:sunday_holiday_availability, ) get('https://secure.shippingapis.com/shippingapi.dll', { API: 'SundayHolidayAvailability', XML: request, }) end |