Class: KiriminAja::Types::RequestPickupItem
- Inherits:
-
Object
- Object
- KiriminAja::Types::RequestPickupItem
- Defined in:
- lib/kiriminaja/types/order.rb
Instance Attribute Summary collapse
-
#height ⇒ Object
Returns the value of attribute height.
-
#length ⇒ Object
Returns the value of attribute length.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
-
#name ⇒ Object
Returns the value of attribute name.
-
#price ⇒ Object
Returns the value of attribute price.
-
#qty ⇒ Object
Returns the value of attribute qty.
-
#weight ⇒ Object
Returns the value of attribute weight.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(name:, price:, qty:, weight:, width: nil, length: nil, height: nil, metadata: nil) ⇒ RequestPickupItem
constructor
A new instance of RequestPickupItem.
- #to_h ⇒ Object
Constructor Details
#initialize(name:, price:, qty:, weight:, width: nil, length: nil, height: nil, metadata: nil) ⇒ RequestPickupItem
Returns a new instance of RequestPickupItem.
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/kiriminaja/types/order.rb', line 24 def initialize(name:, price:, qty:, weight:, width: nil, length: nil, height: nil, metadata: nil) @name = name @price = price @qty = qty @weight = weight @width = width @length = length @height = height @metadata = end |
Instance Attribute Details
#height ⇒ Object
Returns the value of attribute height.
22 23 24 |
# File 'lib/kiriminaja/types/order.rb', line 22 def height @height end |
#length ⇒ Object
Returns the value of attribute length.
22 23 24 |
# File 'lib/kiriminaja/types/order.rb', line 22 def length @length end |
#metadata ⇒ Object
Returns the value of attribute metadata.
22 23 24 |
# File 'lib/kiriminaja/types/order.rb', line 22 def @metadata end |
#name ⇒ Object
Returns the value of attribute name.
22 23 24 |
# File 'lib/kiriminaja/types/order.rb', line 22 def name @name end |
#price ⇒ Object
Returns the value of attribute price.
22 23 24 |
# File 'lib/kiriminaja/types/order.rb', line 22 def price @price end |
#qty ⇒ Object
Returns the value of attribute qty.
22 23 24 |
# File 'lib/kiriminaja/types/order.rb', line 22 def qty @qty end |
#weight ⇒ Object
Returns the value of attribute weight.
22 23 24 |
# File 'lib/kiriminaja/types/order.rb', line 22 def weight @weight end |
#width ⇒ Object
Returns the value of attribute width.
22 23 24 |
# File 'lib/kiriminaja/types/order.rb', line 22 def width @width end |
Instance Method Details
#to_h ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/kiriminaja/types/order.rb', line 36 def to_h d = { name: @name, price: @price, qty: @qty, weight: @weight, } d[:width] = @width unless @width.nil? d[:length] = @length unless @length.nil? d[:height] = @height unless @height.nil? d[:metadata] = @metadata.to_h unless @metadata.nil? d end |