Sha256: b11aabe1b443f4a668fdc7a9ecf5754dd97d005f454250b784e440c3aed6ea87

Contents?: true

Size: 587 Bytes

Versions: 17

Compression:

Stored size: 587 Bytes

Contents

require 'fedex/request/base'
require 'fedex/label'
require 'fedex/request/shipment'
require 'fileutils'

module Fedex
  module Request
    class Label < Shipment
      def initialize(credentials, options={})
        super(credentials, options)
        @filename = options[:filename]
      end

      private

      def success_response(api_response, response)
        super

        label_details = response.merge!({
          :format => @label_specification[:image_type],
          :file_name => @filename
        })

        Fedex::Label.new label_details
      end

    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
fedex-3.10.11 lib/fedex/request/label.rb
fedex-3.10.1 lib/fedex/request/label.rb
fedex-3.10.0 lib/fedex/request/label.rb
fedex-3.9.1 lib/fedex/request/label.rb
fedex-3.9.0 lib/fedex/request/label.rb
fedex-3.8.0 lib/fedex/request/label.rb
fedex-3.6.1 lib/fedex/request/label.rb
fedex-3.6.0 lib/fedex/request/label.rb
fedex-3.4.0 lib/fedex/request/label.rb
fedex-3.3.1 lib/fedex/request/label.rb
fedex-3.3.0 lib/fedex/request/label.rb
fedex-3.1.0 lib/fedex/request/label.rb
fedex-3.0.0 lib/fedex/request/label.rb
fedex-2.2.2 lib/fedex/request/label.rb
ShippingInfo-2.0 lib/fedex/request/label.rb
fedex-2.2.1 lib/fedex/request/label.rb
fedex-2.2.0 lib/fedex/request/label.rb