Module: USPS::Test::DeliveryConfirmation
- Defined in:
- lib/usps/test/delivery_confirmation.rb
Overview
This module is here only for completeness. The USPS test server does not currently support the label printing APIs despite what the documentation says.
Instance Method Summary collapse
Instance Method Details
#test_delivery_confirmation_1 ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/usps/test/delivery_confirmation.rb', line 6 def test_delivery_confirmation_1 from = USPS::Address.new( :name => 'John Smith', :address => "475 L'Enfant Plaza, SW", :city => 'Washington', :state => 'DC', :zip => '20260' ) to = USPS::Address.new( :name => 'Joe Customer', :address => '6060 PRIMACY PKWY', :address2 => 'STE 201', :state => 'TN', :city => 'MEMPHIS' ) request = USPS::Request::DeliveryConfirmationCertify.new(to, from, 2) request.send! end |
#test_delivery_confirmation_2 ⇒ Object
27 28 29 30 31 32 33 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/test/delivery_confirmation.rb', line 27 def test_delivery_confirmation_2 from = USPS::Address.new( :name => 'John Smith', :company => 'U.S. Postal Headquarters', :address => "475 L'Enfant Plaza, SW", :city => 'Washington', :state => 'DC', :zip => '20260-0004' ) to = USPS::Address.new( :name => 'Joe Customer', :address => '6060 PRIMACY PKWY', :address2 => 'STE 201', :state => 'TN', :city => 'MEMPHIS', :zip => '38119-5718' ) = { :service_type => 'Priority', :po_zip_code => 20260, :format => 'tif', :label_date => '07/08/2004', :customer_reference => 'A45-3928', :address_service => true } request = USPS::Request::DeliveryConfirmationCertify.new(to, from, 2, ) request.send! end |