Sha256: 0ba03f808e011d329d11bcac8a72894e85351d656092e0d0c79c60323c3b0546

Contents?: true

Size: 476 Bytes

Versions: 2

Compression:

Stored size: 476 Bytes

Contents

module SimpleShipping::Fedex
  # A wrapper for UPS ShipmentResponse.
  class ShipmentResponse < Response
    # Get the label as abstract64 encoded data
    #   response.label_image_base64 # => "odGqk/KmgLaawV..."
    # This can be used directly in an HTML image tag with
    #   src="data:image/gif;base64,..."
    def label_image_base64
      value_of(:process_shipment_reply, :completed_shipment_detail, :completed_package_details, :label, :parts, :image)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
simple_shipping-0.4.7 lib/simple_shipping/fedex/shipment_response.rb
simple_shipping-0.4.6 lib/simple_shipping/fedex/shipment_response.rb