Class: ActiveMerchant::Shipping::ShipmentPackage

Inherits:
Object
  • Object
show all
Defined in:
lib/active_shipping/shipping/shipment_package.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(tracking_number, label_image_format, graphic_image, html_image, options = {}) ⇒ ShipmentPackage

Returns a new instance of ShipmentPackage.



11
12
13
14
15
16
17
18
# File 'lib/active_shipping/shipping/shipment_package.rb', line 11

def initialize(tracking_number, label_image_format, graphic_image, html_image, options = {})
  @tracking_number = tracking_number
  @label_image_format = label_image_format
  @graphic_image = graphic_image
  @html_image = html_image
  @service_option_charges = options[:service_option_charges] unless options[:service_option_charges].blank?
  @currency_code = options[:currency_code] unless options[:currency_code]
end

Instance Attribute Details

#currency_codeObject (readonly)

Returns the value of attribute currency_code.



7
8
9
# File 'lib/active_shipping/shipping/shipment_package.rb', line 7

def currency_code
  @currency_code
end

#graphic_imageObject (readonly)

Returns the value of attribute graphic_image.



8
9
10
# File 'lib/active_shipping/shipping/shipment_package.rb', line 8

def graphic_image
  @graphic_image
end

#html_imageObject (readonly)

Returns the value of attribute html_image.



9
10
11
# File 'lib/active_shipping/shipping/shipment_package.rb', line 9

def html_image
  @html_image
end

#label_image_formatObject (readonly)

Returns the value of attribute label_image_format.



5
6
7
# File 'lib/active_shipping/shipping/shipment_package.rb', line 5

def label_image_format
  @label_image_format
end

#service_option_chargesObject (readonly)

Returns the value of attribute service_option_charges.



6
7
8
# File 'lib/active_shipping/shipping/shipment_package.rb', line 6

def service_option_charges
  @service_option_charges
end

#tracking_numberObject (readonly)

Returns the value of attribute tracking_number.



4
5
6
# File 'lib/active_shipping/shipping/shipment_package.rb', line 4

def tracking_number
  @tracking_number
end