lib/pbshipping/shipment.rb
# 
# MANAGING RATES AND SHIPMENTS
# API: DELETE /shipment/{shipmentId}
# API signature: delete/shipments/...
#
# Cancel/void a shipment, and submit the shipment label for refund.
#       
MANAGING RATES AND SHIPMENTS
API: DELETE /shipment/{shipmentId}
API signature: delete/shipments/

Cancel/void a shipment, and submit the shipment label for refund.
MANAGING RATES AND SHIPMENTS API : DELETE / shipment / { shipmentId } API signature : delete / shipments / Cancel / void a shipment and submit the shipment label for refund .
def cancel(auth_obj, txid, carrier, cancelInitiator=nil)
      if self.key?(:shipmentId) == false
        raise MissingResourceAttribute.new(:shipmentId)
      end
      hdrs = { PBShipping::txid_attrname => txid }
      payload = { :carrier => carrier }
      if cancelInitiator != nil
        payload[:cancelInitiator] = cancelInitiator
      end
      api_sig = "delete/shipments/..."
      api_version = PBShipping::get_api_version(api_sig)
      api_path = "/shipments/" + self[:shipmentId]
      json_resp = PBShipping::api_request(
        auth_obj, :delete, api_version, api_path, hdrs, nil, payload) 
      ApiObject.new(json_resp)
    end
def cancel ( auth_obj , txid , carrier , cancelInitiator = nil ) if self . key? ( :shipmentId ) == false raise MissingResourceAttribute . new ( :shipmentId ) end hdrs = { PBShipping :: txid_attrname => txid } payload = { :carrier => carrier } if cancelInitiator != nil payload [ :cancelInitiator ] = cancelInitiator end api_sig = "delete/shipments/..." api_version = PBShipping :: get_api_version ( api_sig ) api_path = "/shipments/" + self [ :shipmentId ] json_resp = PBShipping :: api_request ( auth_obj , :delete , api_version , api_path , hdrs , nil , payload ) ApiObject . new ( json_resp ) end
MANAGING RATES AND SHIPMENTS
API: DELETE /shipment/{shipmentId}
API signature: delete/shipments/...
MANAGING RATES AND SHIPMENTS API : DELETE / shipment / { shipmentId } API signature : delete / shipments / ...
auth_obj
<not_specific>
txid
<not_specific>
carrier
<not_specific>
cancelInitiator
<not_specific>