class Fedex::GroundManifest
Attributes
filename[R]
manifest_data[R]
Public Class Methods
new(options = {})
click to toggle source
Initialize Fedex::GroundManifest
Object @param [Hash] options
# File lib/fedex/ground_manifest.rb, line 10 def initialize(options = {}) puts options @filename = options[:filename] @manifest_data = Base64.decode64(options[:manifest][:file]) save end
Public Instance Methods
save()
click to toggle source
# File lib/fedex/ground_manifest.rb, line 17 def save return if manifest_data.nil? || filename.nil? full_path = Pathname.new(filename) File.open(full_path, 'wb') do |f| f.write(manifest_data) end end