Module: Usps::Api::Endpoints::PTSEmail
- Included in:
- Usps::Api::Endpoints
- Defined in:
- lib/usps/api/endpoints/pts_email.rb
Instance Method Summary collapse
-
#pts_email(options = {}) ⇒ Object
The Track and Confirm by Email API allows the customer to submit their email address to be notified of current or future tracking activity.
Instance Method Details
#pts_email(options = {}) ⇒ Object
The Track and Confirm by Email API allows the customer to submit their email address to be notified of current or future tracking activity. When you request access for this API, please identify your anticipated API volume, mailer ID and how you will be utilizing this API. A mailer identification number (MID) is a 6 or 9-digit number assigned to a customer through the USPS Business Customer Gateway (BCG). Please refer to the following links for help:
29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/usps/api/endpoints/pts_email.rb', line 29 def pts_email( = {}) throw ArgumentError.new('Required arguments :pts_email_request missing') if [:pts_email_request].nil? throw ArgumentError.new('Required arguments :pts_email_request, :track_id missing') if [:pts_email_request][:track_id].nil? throw ArgumentError.new('Required arguments :pts_email_request, :mp_suffix missing') if [:pts_email_request][:mp_suffix].nil? throw ArgumentError.new('Required arguments :pts_email_request, :mp_date missing') if [:pts_email_request][:mp_date].nil? throw ArgumentError.new('Required arguments :pts_email_request, :email1 missing') if [:pts_email_request][:email1].nil? request = build_request(:pts_email, ) get('https://secure.shippingapis.com/ShippingAPI.dll', { API: 'PTSEmail', XML: request, }) end |