Class: PagSeguro::Shipping

Inherits:
Object
  • Object
show all
Includes:
Extensions::EnsureType, Extensions::MassAssignment
Defined in:
lib/pagseguro/shipping.rb

Constant Summary collapse

TYPE =

Set the available shipping type.

{
  pac: 1,
  sedex: 2,
  not_specified: 3
}
InvalidShippingTypeError =

Define the error class for invalid type assignment.

Class.new(StandardError)

Instance Attribute Summary collapse

Method Summary

Methods included from Extensions::EnsureType

#ensure_type

Methods included from Extensions::MassAssignment

#initialize

Instance Attribute Details

#addressObject

Get the address object.



23
24
25
# File 'lib/pagseguro/shipping.rb', line 23

def address
  @address
end

#costObject

Set the shipping cost.



26
27
28
# File 'lib/pagseguro/shipping.rb', line 26

def cost
  @cost
end

#type_idObject

Define the shipping type id.



17
18
19
# File 'lib/pagseguro/shipping.rb', line 17

def type_id
  @type_id
end

#type_nameObject

Get the shipping type name.



20
21
22
# File 'lib/pagseguro/shipping.rb', line 20

def type_name
  @type_name
end