Class: Shippinglogic::UPS::Cancel

Inherits:
Service show all
Defined in:
lib/shippinglogic/ups/cancel.rb

Overview

An interface to the shipment canceling service provided by UPS. Allows you to cancel a shipment

Accessor methods / options

  • tracking_number - the tracking number

Simple Example

ups = Shippinglogic::UPS.new(key, password, )
cancel = ups.cancel(:tracking_number => "my number")
cancel.perform
# => true

Instance Attribute Summary

Attributes inherited from Service

#base

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Service

#initialize

Methods included from Validation

#errors, #valid?

Methods included from Attributes

included

Methods inherited from Proxy

#initialize

Constructor Details

This class inherits a constructor from Shippinglogic::Service

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Shippinglogic::Proxy

Class Method Details

.pathObject



16
17
18
# File 'lib/shippinglogic/ups/cancel.rb', line 16

def self.path
  "/Void"
end

Instance Method Details

#performObject

Our services are set up as a proxy. We need to access the underlying object, to trigger the request to UPS. So calling this method is a way to do that since there really is no underlying object



24
25
26
# File 'lib/shippinglogic/ups/cancel.rb', line 24

def perform
  target && true
end