Class: TNT::Label

Inherits:
Resource show all
Defined in:
lib/tnt.rb

Overview

Label endpoint resource

Constant Summary

Constants inherited from Resource

Resource::XML_HEADER, Resource::XML_RENDER_OPTIONS

Class Method Summary collapse

Methods inherited from Resource

credentials, error_response?, extract_error, parse_response, to_xml

Class Method Details

.find(ref) ⇒ TNT::Response

Handles the shipment label fetching request

Returns:

  • (TNT::Response)


105
106
107
# File 'lib/tnt.rb', line 105

def self.find(ref)
  new(request(:post, uri, form: { xml_in: 'GET_LABEL:' + ref.to_s }))
end