Module: Endicia

Includes:
HTTParty
Defined in:
lib/endicia.rb

Defined Under Namespace

Classes: Label

Class Method Summary collapse

Class Method Details

.get_label(opts = {}) ⇒ Object

example XML 884 Railroad Street, Suite CYpsilantiMI48197YpsilantiMIVGKids481971237 Elbridge StYpsilantiMI12371212MediaMailYESpoopants792190whiplash110



28
29
30
31
32
# File 'lib/endicia.rb', line 28

def self.get_label(opts={})
  body = "labelRequestXML=" + @defaults.merge(opts).to_xml(:skip_instruct => true, :skip_types => true, :root => 'LabelRequest', :indent => 0)
  result = self.post("https://www.envmgr.com/LabelService/EwsLabelService.asmx/GetPostageLabelXML", :body => body)
  return Endicia::Label.new(result["LabelRequestResponse"])
end