lib/active_shipping/carriers/fedex.rb in active_shipping-1.8.1 vs lib/active_shipping/carriers/fedex.rb in active_shipping-1.8.2
- old
+ new
@@ -134,10 +134,13 @@
'TR' => :transfer
)
DEFAULT_LABEL_STOCK_TYPE = 'PAPER_7X4.75'
+ # Available return formats for image data when creating labels
+ LABEL_FORMATS = ['DPL', 'EPL2', 'PDF', 'ZPLII', 'PNG']
+
def self.service_name_for_code(service_code)
SERVICE_TYPES[service_code] || "FedEx #{service_code.titleize.sub(/Fedex /, '')}"
end
def requirements
@@ -217,10 +220,10 @@
end
end
xml.LabelSpecification do
xml.LabelFormatType('COMMON2D')
- xml.ImageType('PNG')
+ xml.ImageType(options[:label_format] || 'PNG')
xml.LabelStockType(options[:label_stock_type] || DEFAULT_LABEL_STOCK_TYPE)
end
xml.RateRequestTypes('ACCOUNT')