lib/pbshipping/shipment.rb
# 
# MANAGING RATES AND SHIPMENTS
# API: GET /shipments/{shipmentId}
# API signature: get/shipments/...
#
# Reprint a shipment label. 
# Note that the number of reprints of a shipment label will be scrutinized 
# and restricted.
#
# By default, the returned result would overwrite the current state 
# of the object. To avoid overwriting, set the input argument 
# overwrite to False and a copy of the result would be generated and
# returned instead      
#    
MANAGING RATES AND SHIPMENTS
API: GET /shipments/{shipmentId}
API signature: get/shipments/

Reprint a shipment label.
Note that the number of reprints of a shipment label will be scrutinized
and restricted.

By default, the returned result would overwrite the current state
of the object. To avoid overwriting, set the input argument
overwrite to False and a copy of the result would be generated and
returned instead
MANAGING RATES AND SHIPMENTS API : GET / shipments / { shipmentId } API signature : get / shipments / Reprint a shipment label . Note that the number of reprints of a shipment label will be scrutinized and restricted . By default the returned result would overwrite the current state of the object . To avoid overwriting set the input argument overwrite to False and a copy of the result would be generated and returned instead
def reprintLabel(auth_obj, overwrite=true)
      if self.key?(:shipmentId) == false
        raise MissingResourceAttribute.new(:shipmentId)      
      end
      api_sig = "get/shipments/..."
      api_version = PBShipping::get_api_version(api_sig)
      api_path = "/shipments/" + self[:shipmentId]
      json_resp = PBShipping::api_request(
        auth_obj, :get, api_version, api_path, {}, {}, {})
      if overwrite == true 
        self.update(json_resp)
        self
      else
        Shipment.new(json_resp) 
      end       
    end
def reprintLabel ( auth_obj , overwrite = true ) if self . key? ( :shipmentId ) == false raise MissingResourceAttribute . new ( :shipmentId ) end api_sig = "get/shipments/..." api_version = PBShipping :: get_api_version ( api_sig ) api_path = "/shipments/" + self [ :shipmentId ] json_resp = PBShipping :: api_request ( auth_obj , :get , api_version , api_path , { } , { } , { } ) if overwrite == true self . update ( json_resp ) self else Shipment . new ( json_resp ) end end
MANAGING RATES AND SHIPMENTS
API: GET /shipments/{shipmentId}
API signature: get/shipments/...
MANAGING RATES AND SHIPMENTS API : GET / shipments / { shipmentId } API signature : get / shipments / ...
auth_obj
<not_specific>
overwrite
<not_specific>