Module: Usps::Api

Defined in:
lib/usps/api/xml.rb,
lib/usps/api/error.rb,
lib/usps/api/endpoints.rb,
lib/usps/api/endpoints/scan.rb,
lib/usps/api/endpoints/verify.rb,
lib/usps/api/endpoints/pts_pod.rb,
lib/usps/api/endpoints/pts_rre.rb,
lib/usps/api/endpoints/rate_v4.rb,
lib/usps/api/errors/usps_error.rb,
lib/usps/api/endpoints/ptst_pod.rb,
lib/usps/api/endpoints/track_v2.rb,
lib/usps/api/endpoints/pts_email.rb,
lib/usps/api/endpoints/e_vsi_cancel.rb,
lib/usps/api/endpoints/intl_rate_v2.rb,
lib/usps/api/endpoints/zip_code_lookup.rb,
lib/usps/api/endpoints/city_state_lookup.rb,
lib/usps/api/endpoints/e_vsgxg_get_label.rb,
lib/usps/api/endpoints/hfp_facility_info.rb,
lib/usps/api/endpoints/usps_returns_label.rb,
lib/usps/api/errors/too_many_requests_error.rb,
lib/usps/api/endpoints/e_vs_express_mail_intl.rb,
lib/usps/api/endpoints/carrier_pickup_schedule.rb,
lib/usps/api/endpoints/e_vs_priority_mail_intl.rb,
lib/usps/api/endpoints/e_vs_first_class_mail_intl.rb,
lib/usps/api/endpoints/sunday_holiday_availability.rb

Defined Under Namespace

Modules: Endpoints, Errors

Constant Summary collapse

Error =
Errors::UspsError

Instance Method Summary collapse

Instance Method Details

#tag_unless_blank(xml, tag_name, data) ⇒ Object



4
5
6
# File 'lib/usps/api/xml.rb', line 4

def tag_unless_blank(xml, tag_name, data)
  xml.tag!(tag_name, data) unless data.blank? || data.nil?
end