Class: OnlinePayments::SDK::Domain::ShippingMethod
- Inherits:
-
OnlinePayments::SDK::DataObject
- Object
- OnlinePayments::SDK::DataObject
- OnlinePayments::SDK::Domain::ShippingMethod
- Defined in:
- lib/onlinepayments/sdk/domain/shipping_method.rb
Instance Attribute Summary collapse
-
#details ⇒ String
The current value of details.
-
#name ⇒ String
The current value of name.
-
#speed ⇒ Integer
The current value of speed.
-
#type ⇒ String
The current value of type.
Instance Method Summary collapse
Methods inherited from OnlinePayments::SDK::DataObject
Instance Attribute Details
#details ⇒ String
Returns the current value of details.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/shipping_method.rb', line 13 def details @details end |
#name ⇒ String
Returns the current value of name.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/shipping_method.rb', line 13 def name @name end |
#speed ⇒ Integer
Returns the current value of speed.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/shipping_method.rb', line 13 def speed @speed end |
#type ⇒ String
Returns the current value of type.
13 14 15 |
# File 'lib/onlinepayments/sdk/domain/shipping_method.rb', line 13 def type @type end |
Instance Method Details
#from_hash(hash) ⇒ Object
29 30 31 32 33 34 35 |
# File 'lib/onlinepayments/sdk/domain/shipping_method.rb', line 29 def from_hash(hash) super @details = hash['details'] if hash.key? 'details' @name = hash['name'] if hash.key? 'name' @speed = hash['speed'] if hash.key? 'speed' @type = hash['type'] if hash.key? 'type' end |
#to_h ⇒ Hash
20 21 22 23 24 25 26 27 |
# File 'lib/onlinepayments/sdk/domain/shipping_method.rb', line 20 def to_h hash = super hash['details'] = @details unless @details.nil? hash['name'] = @name unless @name.nil? hash['speed'] = @speed unless @speed.nil? hash['type'] = @type unless @type.nil? hash end |