Sha256: 1c27979ee115bfb500435cf9773da2cb12db2ff58d6b4505441c0cfe1b5de80c

Contents?: true

Size: 718 Bytes

Versions: 42

Compression:

Stored size: 718 Bytes

Contents

module ActiveShipping #:nodoc:

  class ExternalReturnLabelResponse < Response
    attr_reader :carrier # symbol
    attr_reader :carrier_name # string
    attr_reader :tracking_number # string
    attr_reader :return_label # string
    attr_reader :postal_routing # string

    def initialize(success, message, params = {}, options = {})
      @carrier = options[:carrier].parameterize.to_sym
      @carrier_name = options[:carrier]
      @return_label = options[:return_label]
      @tracking_number = options[:tracking_number]
      @postal_routing = options[:postal_routing]
      super
    end

    def has_exception?
      @status == :exception
    end

    alias_method(:exception?, :has_exception?)
  end

end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
active_shipping-2.1.1 lib/active_shipping/external_return_label_response.rb
active_shipping-2.1.0 lib/active_shipping/external_return_label_response.rb
active_shipping-2.0.1 lib/active_shipping/external_return_label_response.rb
active_shipping-2.0.0 lib/active_shipping/external_return_label_response.rb
active_shipping-1.14.2 lib/active_shipping/external_return_label_response.rb
active_shipping-1.14.1 lib/active_shipping/external_return_label_response.rb
active_shipping-1.14.0 lib/active_shipping/external_return_label_response.rb
active_shipping-1.13.4 lib/active_shipping/external_return_label_response.rb
active_shipping-1.13.3 lib/active_shipping/external_return_label_response.rb
active_shipping-1.13.2 lib/active_shipping/external_return_label_response.rb
active_shipping-1.13.1 lib/active_shipping/external_return_label_response.rb
active_shipping-1.13.0 lib/active_shipping/external_return_label_response.rb
active_shipping-1.12.1 lib/active_shipping/external_return_label_response.rb
active_shipping-1.12.0 lib/active_shipping/external_return_label_response.rb
active_shipping-1.11.1 lib/active_shipping/external_return_label_response.rb
active_shipping-1.11.0 lib/active_shipping/external_return_label_response.rb
active_shipping-1.10.1 lib/active_shipping/external_return_label_response.rb
active_shipping-1.9.2 lib/active_shipping/external_return_label_response.rb
active_shipping-1.9.1 lib/active_shipping/external_return_label_response.rb
active_shipping-1.9.0 lib/active_shipping/external_return_label_response.rb