class ReactiveShipping::ShippingResponse

Responce object class for calls to {ReactiveShipping::Carrier#create_shipment}.

@note Some carriers provide more information that others, so not all attributes

will be set, depending on what carrier you are using.

@!attribute shipping_id

The unique identifier of the shipment, which can be used to further interact
with the carrier's API.
@return [String]

@!attribute tracking_number

The tracking number of the shipments, which can be shared with the customer and
be used for {ReactiveShipping::Carrier#find_tracking_info}.
@return [String]

Attributes

shipping_id[R]
tracking_number[R]

Public Class Methods

new(success, message, params = {}, options = {}) click to toggle source

Initializes a new ShippingResponse instance.

@param success (see ReactiveShipping::Response#initialize) @param message (see ReactiveShipping::Response#initialize) @param params (see ReactiveShipping::Response#initialize) @option options (see ReactiveShipping::Response#initialize) @option options [String] :shipping_id Populates {#shipping_id}. @option options [String] :tracking_number Populates {#tracking_number}.

Calls superclass method ReactiveShipping::Response::new
# File lib/reactive_shipping/shipping_response.rb, line 28
def initialize(success, message, params = {}, options = {})
  @shipping_id = options[:shipping_id]
  @tracking_number = options[:tracking_number]
  super
end