Class: SimpleShipping::Ups::Request

Inherits:
Abstract::Request show all
Defined in:
lib/simple_shipping/ups/request.rb

Overview

Builds complete request for UPS

Constant Summary collapse

REQUEST_OPTION =

Value for <common:RequestOption> XML element in request.

'nonvalidate'

Instance Attribute Summary

Attributes inherited from Abstract::Request

#credentials, #type

Instance Method Summary collapse

Methods inherited from Abstract::Request

#initialize, #response

Constructor Details

This class inherits a constructor from SimpleShipping::Abstract::Request

Instance Method Details

#label_specificationHash

Define label parameters according to UPS’s API.

Returns:

  • (Hash)


10
11
12
13
14
15
16
17
18
19
# File 'lib/simple_shipping/ups/request.rb', line 10

def label_specification
  { 'LabelImageFormat' => {'Code' => 'GIF'},
    'LabelStockSize'   => {
      'Height' => '6',
      'Width'  => '4',
      :order!  => ['Height', 'Width']
    },
    :order! => ['LabelImageFormat', 'LabelStockSize']
  }
end