Class: SimpleShipping::Ups::ShipAcceptRequest

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

Overview

Shipping accept request.

Constant Summary

Constants inherited from Request

Request::REQUEST_OPTION

Instance Attribute Summary

Attributes inherited from Abstract::Request

#credentials, #type

Instance Method Summary collapse

Methods inherited from Request

#label_specification

Methods inherited from Abstract::Request

#response, #response_class

Constructor Details

#initialize(credentials, shipment_digest, options = {}) ⇒ ShipAcceptRequest

Returns a new instance of ShipAcceptRequest.



4
5
6
7
8
9
# File 'lib/simple_shipping/ups/ship_accept_request.rb', line 4

def initialize(credentials, shipment_digest, options = {})
  @credentials     = credentials
  @shipment_digest = shipment_digest
  @options         = options
  @type            = :prcoess_ship_accept
end

Instance Method Details

#bodyObject

:nodoc:



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

def body
  { 'common:Request' => {
      'common:RequestOption' => REQUEST_OPTION
    },
    'ShipmentDigest' => @shipment_digest,
    :order!          => ['common:Request', 'ShipmentDigest']
  }
end