Module: Usps::Api::Endpoints::CarrierPickupSchedule
- Included in:
- Usps::Api::Endpoints
- Defined in:
- lib/usps/api/endpoints/carrier_pickup_schedule.rb
Instance Method Summary collapse
-
#carrier_pickup_schedule(options = {}) ⇒ Object
The Package Pickup Schedule API schedules a Package Pickup and provides the user a confirmation number for the scheduled pickup. Prior to making a Pickup Schedule call, it is recommended to use the Pickup Availability API to confirm that service is available.
Instance Method Details
#carrier_pickup_schedule(options = {}) ⇒ Object
The Package Pickup Schedule API schedules a Package Pickup and provides the user a confirmation number for the scheduled pickup. Prior to making a Pickup Schedule call, it is recommended to use the Pickup Availability API to confirm that service is available.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/usps/api/endpoints/carrier_pickup_schedule.rb', line 34 def carrier_pickup_schedule( = {}) throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request missing') if [:carrier_pickup_schedule_request].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :first_name missing') if [:carrier_pickup_schedule_request][:first_name].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :last_name missing') if [:carrier_pickup_schedule_request][:last_name].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :suite_or_apt missing') if [:carrier_pickup_schedule_request][:suite_or_apt].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :address2 missing') if [:carrier_pickup_schedule_request][:address2].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :urbanization missing') if [:carrier_pickup_schedule_request][:urbanization].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :city missing') if [:carrier_pickup_schedule_request][:city].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :state missing') if [:carrier_pickup_schedule_request][:state].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :zip5 missing') if [:carrier_pickup_schedule_request][:zip5].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :zip4 missing') if [:carrier_pickup_schedule_request][:zip4].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :phone missing') if [:carrier_pickup_schedule_request][:phone].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :package missing') if [:carrier_pickup_schedule_request][:package].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :package, :service_type missing') if [:carrier_pickup_schedule_request][:package][:service_type].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :package, :count missing') if [:carrier_pickup_schedule_request][:package][:count].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :package, :estimated_weight missing') if [:carrier_pickup_schedule_request][:package][:estimated_weight].nil? throw ArgumentError.new('Required arguments :carrier_pickup_schedule_request, :package, :package_location missing') if [:carrier_pickup_schedule_request][:package][:package_location].nil? request = build_request(:carrier_pickup_schedule, ) get('https://secure.shippingapis.com/ShippingAPI.dll', { API: 'CarrierPickupSchedule', XML: request, }) end |