Sha256: a0301b4ba0ef3f5b1632cbe25695ba9078ded0918635ac01cb3c53fccbaf0961

Contents?: true

Size: 1.33 KB

Versions: 62

Compression:

Stored size: 1.33 KB

Contents

module ActiveShipping
  # Responce object class for calls to {ActiveShipping::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 {ActiveShipping::Carrier#find_tracking_info}.
  #   @return [String]
  class ShippingResponse < Response
    attr_reader :shipping_id, :tracking_number

    # Initializes a new ShippingResponse instance.
    #
    # @param success (see ActiveShipping::Response#initialize)
    # @param message (see ActiveShipping::Response#initialize)
    # @param params (see ActiveShipping::Response#initialize)
    # @option options (see ActiveShipping::Response#initialize)
    # @option options [String] :shipping_id Populates {#shipping_id}.
    # @option options [String] :tracking_number Populates {#tracking_number}.
    def initialize(success, message, params = {}, options = {})
      @shipping_id = options[:shipping_id]
      @tracking_number = options[:tracking_number]
      super
    end
  end
end

Version data entries

62 entries across 62 versions & 1 rubygems

Version Path
workarea-core-3.5.27 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.5.26 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.4.45 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.5.25 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.5.23 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.4.44 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.5.22 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.4.43 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.5.21 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.4.42 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.5.20 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.4.41 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.5.19 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.4.40 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.5.18 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.4.39 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.5.17 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.4.38 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.5.16 vendor/active_shipping/lib/active_shipping/shipping_response.rb
workarea-core-3.4.37 vendor/active_shipping/lib/active_shipping/shipping_response.rb