Sha256: d40ce0aa4bee64f83ded6038b094d59db70cf94aaf3cb83d62a1e57302f1c9e6
Contents?: true
Size: 528 Bytes
Versions: 62
Compression:
Stored size: 528 Bytes
Contents
module Workarea class BogusCarrier < ActiveShipping::Workarea MESSAGE = 'SUCCESS - 0000 Success' def create_shipment(origin, destination, packages, options = {}) labels = [ActiveShipping::Label.new(generate_tracking_number, image)] ActiveShipping::LabelResponse.new(true, MESSAGE, {}, labels: labels) end def generate_tracking_number "1ZX1A#{Array.new(13) { rand(0..9) }.join}" end def image IO.read(Core::Engine.root.join('test', 'fixtures', 'label.png')) end end end
Version data entries
62 entries across 62 versions & 1 rubygems