Class: ActiveShipping::Correios::CorreiosPackage

Inherits:
Object
  • Object
show all
Defined in:
lib/active_shipping/carriers/correios.rb

Constant Summary collapse

FORMAT =
{
  :package => 1,
  :roll => 2,
  :envelope => 3
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(package, format) ⇒ CorreiosPackage

Returns a new instance of CorreiosPackage.



246
247
248
249
250
251
252
253
254
255
256
257
# File 'lib/active_shipping/carriers/correios.rb', line 246

def initialize(package, format)
  @package = package

  @params = {
    :format => format,
    :weight => weight,
    :width => width,
    :length => length,
    :height => height(format),
    :diameter => diameter
  }
end

Instance Attribute Details

#paramsObject (readonly)

Returns the value of attribute params.



238
239
240
# File 'lib/active_shipping/carriers/correios.rb', line 238

def params
  @params
end