Module: Usps::Api::Endpoints::EVSICancel

Included in:
Usps::Api::Endpoints
Defined in:
lib/usps/api/endpoints/e_vsi_cancel.rb

Instance Method Summary collapse

Instance Method Details

#e_vsi_cancel(options = {}) ⇒ Object

The eVS International Cancel request allows an eVS label to be removed from processing if the request is made prior to 11:59 PM Central Time on the day of label creation.This functionality is available only if the eVS International label has been held for manifest (i.e. <HoldForManifest>=”Y” is included in eVS International label XML request) and the Shipping Services File v2.0 has not yet been created. Depending on customer profile setup, this transmission could occur for created labels every 15 minutes, at the end of the shipping day, or when a SCAN Form is manually triggered by the customer.

Parameters:

  • options (Hash) (defaults to: {})

Options Hash (options):

  • e_vsi_cancel_request (required, Hash)
    • :barcode_number (required, ) — BarcodeNumber of original label. Length of 22, 30 or 34 numbers.

    • :e_vsi_cancel_request (required, ) —



22
23
24
25
26
27
28
29
30
31
32
# File 'lib/usps/api/endpoints/e_vsi_cancel.rb', line 22

def e_vsi_cancel(options = {})
	throw ArgumentError.new('Required arguments :e_vsi_cancel_request missing') if options[:e_vsi_cancel_request].nil?
	throw ArgumentError.new('Required arguments :e_vsi_cancel_request, :barcode_number missing') if options[:e_vsi_cancel_request][:barcode_number].nil?
	throw ArgumentError.new('Required arguments :e_vsi_cancel_request, :e_vsi_cancel_request missing') if options[:e_vsi_cancel_request][:e_vsi_cancel_request].nil?

	request = build_request(:e_vsi_cancel, options)
	get('https://secure.shippingapis.com/ShippingAPI.dll', {
		API: 'eVSICancel',
		XML: request,
	})
end