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.



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

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.



236
237
238
# File 'lib/active_shipping/carriers/correios.rb', line 236

def params
  @params
end