Sha256: 419a7e8391ee1a0258cc6f41f1c0648138c512364e4aabdedce27becd918fcd1

Contents?: true

Size: 634 Bytes

Versions: 29

Compression:

Stored size: 634 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Shipping
    
    class TrackingResponse < Response
      attr_reader :tracking_number # string
      attr_reader :shipment_events # array of ShipmentEvents in chronological order
      attr_reader :origin, :destination
      
      def initialize(success, message, params = {}, options = {})
        @tracking_number = options[:tracking_number]
        @shipment_events = Array(options[:shipment_events])
        @origin, @destination = options[:origin], options[:destination]
        super
      end
      
      def latest_event
        @shipment_events.last
      end
    end
    
  end
end

Version data entries

29 entries across 29 versions & 4 rubygems

Version Path
bcarpenter-active_shipping-0.0.2 lib/active_shipping/shipping/tracking_response.rb
bcarpenter-active_shipping-0.0.5 lib/active_shipping/shipping/tracking_response.rb
bcarpenter-active_shipping-0.0.6 lib/active_shipping/shipping/tracking_response.rb
bcarpenter-active_shipping-0.0.7 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.14 lib/active_shipping/shipping/tracking_response.rb
rclements_active_shipping-0.9.15 lib/active_shipping/shipping/tracking_response.rb
rclements_active_shipping-0.9.14 lib/active_shipping/shipping/tracking_response.rb
rclements_active_shipping-0.9.13 lib/active_shipping/shipping/tracking_response.rb
benhutton-active_shipping-0.9.13 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.13 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.12 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.11 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.10 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.9 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.8 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.7 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.6 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.5 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.4 lib/active_shipping/shipping/tracking_response.rb
active_shipping-0.9.3 lib/active_shipping/shipping/tracking_response.rb