Class: Iloxx::Shipping::Service
- Inherits:
-
Object
- Object
- Iloxx::Shipping::Service
- Defined in:
- lib/iloxx_shipping/service.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#cod_amount ⇒ Object
readonly
Returns the value of attribute cod_amount.
-
#service_type ⇒ Object
readonly
Returns the value of attribute service_type.
Instance Method Summary collapse
- #cod? ⇒ Boolean
-
#initialize(attributes = {}) ⇒ Service
constructor
A new instance of Service.
Constructor Details
#initialize(attributes = {}) ⇒ Service
Returns a new instance of Service.
6 7 8 9 10 11 12 13 |
# File 'lib/iloxx_shipping/service.rb', line 6 def initialize(attributes = {}) attributes.each do |key, value| setter = :"#{key.to_s}=" if self.respond_to?(setter) self.send(setter, value) end end end |
Instance Attribute Details
#cod_amount ⇒ Object (readonly)
Returns the value of attribute cod_amount.
4 5 6 |
# File 'lib/iloxx_shipping/service.rb', line 4 def cod_amount @cod_amount end |
#service_type ⇒ Object (readonly)
Returns the value of attribute service_type.
4 5 6 |
# File 'lib/iloxx_shipping/service.rb', line 4 def service_type @service_type end |
Instance Method Details
#cod? ⇒ Boolean
15 16 17 |
# File 'lib/iloxx_shipping/service.rb', line 15 def cod? !self.cod_amount.nil? && self.cod_amount > 0 end |