Module: AwesomeUsps::DeliveryAndSignatureConfirmation
- Included in:
- USPS
- Defined in:
- lib/awesome_usps/delivery_and_signature_confirmation.rb
Instance Method Summary collapse
- #canned_delivery_confirmation_label_test ⇒ Object
- #canned_signature_confirmation_label_test ⇒ Object
- #delivery_confirmation_label(origin, destination, service_type, image_type, label_type = 1, api_request = "DeliveryConfirmationV3.0Request", options = {}) ⇒ Object
- #signature_confirmation_label(origin, destination, service_type, image_type, label_type = 1, api_request = "SignatureConfirmationV3.0Request", options = {}) ⇒ Object
Instance Method Details
#canned_delivery_confirmation_label_test ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/awesome_usps/delivery_and_signature_confirmation.rb', line 17 def canned_delivery_confirmation_label_test origin = Location.new( :name=> "John Smith", :address2 => "6406 Ivy Lane", :state => 'MD', :city => 'Greenbelt', :zip5 => '20770') destination =Location.new( :name=> "Joe Customer", :address2 =>"136 Linwood Plz", :state => 'NJ', :city => 'Fort Lee', :zip5 => "07024") service_type = "Priority" image_type ="PDF" label_type = 1 = {:weight => 2} api_request = "DelivConfirmCertifyV3.0Request" request = confirmation_xml(api_request, origin, destination, service_type, image_type, label_type, ) gateway_commit(:delivery_confirmation_certify,'DelivConfirmCertifyV3', request, :ssl, image_type) end |
#canned_signature_confirmation_label_test ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/awesome_usps/delivery_and_signature_confirmation.rb', line 29 def canned_signature_confirmation_label_test origin = Location.new( :name=> "John Smith", :address2 => "6406 Ivy Lane", :state => 'MD', :city => 'Greenbelt', :zip5 => '20770') destination =Location.new( :name=> "Joe Customer", :address2 =>"136 Linwood Plz", :state => 'NJ', :city => 'Fort Lee', :zip5 => "07024") service_type = "Priority" image_type ="PDF" label_type = 1 = {:weight => 2} api_request = "SigConfirmCertifyV3.0Request" request = confirmation_xml(api_request, origin, destination, service_type, image_type, label_type, ) gateway_commit(:signature_confirmation_certify, 'SignatureConfirmationCertifyV3', request, :ssl, image_type) end |
#delivery_confirmation_label(origin, destination, service_type, image_type, label_type = 1, api_request = "DeliveryConfirmationV3.0Request", options = {}) ⇒ Object
3 4 5 6 7 |
# File 'lib/awesome_usps/delivery_and_signature_confirmation.rb', line 3 def delivery_confirmation_label(origin, destination, service_type, image_type, label_type=1, api_request = "DeliveryConfirmationV3.0Request", ={}) request = confirmation_xml(api_request, origin, destination, service_type, image_type, label_type, ) #YES THE API IS THAT STUPID THAT WE MUST PASS WHAT TYPE OF MIME TYPE! commit_confirmation_xml(:delivery, 'DeliveryConfirmationV3', request,:ssl, image_type) end |
#signature_confirmation_label(origin, destination, service_type, image_type, label_type = 1, api_request = "SignatureConfirmationV3.0Request", options = {}) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/awesome_usps/delivery_and_signature_confirmation.rb', line 9 def signature_confirmation_label(origin, destination, service_type, image_type, label_type=1, api_request = "SignatureConfirmationV3.0Request", ={}) request = confirmation_xml(api_request, origin, destination, service_type, image_type, label_type, ) #YES THE API IS THAT STUPID THAT WE MUST PASS WHAT TYPE OF MIME TYPE! commit_confirmation_xml(:signature, 'SignatureConfirmationV3', request, :ssl, image_type) end |