Class: Iloxx::Shipping::NormalpaketService
- Inherits:
-
Service
- Object
- Service
- Iloxx::Shipping::NormalpaketService
show all
- Defined in:
- lib/iloxx_shipping/service/normalpaket.rb
Instance Attribute Summary collapse
Attributes inherited from Service
#cod_amount
Instance Method Summary
collapse
Methods inherited from Service
#cod?, #initialize
Instance Attribute Details
#flex ⇒ Object
Returns the value of attribute flex.
5
6
7
|
# File 'lib/iloxx_shipping/service/normalpaket.rb', line 5
def flex
@flex
end
|
Instance Method Details
#cod=(cod) ⇒ Object
7
8
9
10
|
# File 'lib/iloxx_shipping/service/normalpaket.rb', line 7
def cod=(cod)
raise "COD and Flex cannot be combined" if flex?
@cod_amount = cod
end
|
#flex? ⇒ Boolean
17
18
19
|
# File 'lib/iloxx_shipping/service/normalpaket.rb', line 17
def flex?
!!@flex
end
|
#service_type ⇒ Object
21
22
23
|
# File 'lib/iloxx_shipping/service/normalpaket.rb', line 21
def service_type
"dpdNormalpaket" + (cod? ? 'COD' : '') + (flex? ? 'Flex' : '')
end
|