Class: KiriminAja::Types::RequestPickupPackage
- Inherits:
-
Object
- Object
- KiriminAja::Types::RequestPickupPackage
- Defined in:
- lib/kiriminaja/types/order.rb
Instance Attribute Summary collapse
-
#cod ⇒ Object
Returns the value of attribute cod.
-
#destination_address ⇒ Object
Returns the value of attribute destination_address.
-
#destination_kecamatan_id ⇒ Object
Returns the value of attribute destination_kecamatan_id.
-
#destination_kelurahan_id ⇒ Object
Returns the value of attribute destination_kelurahan_id.
-
#destination_name ⇒ Object
Returns the value of attribute destination_name.
-
#destination_phone ⇒ Object
Returns the value of attribute destination_phone.
-
#destination_zipcode ⇒ Object
Returns the value of attribute destination_zipcode.
-
#drop ⇒ Object
Returns the value of attribute drop.
-
#height ⇒ Object
Returns the value of attribute height.
-
#insurance_amount ⇒ Object
Returns the value of attribute insurance_amount.
-
#item_name ⇒ Object
Returns the value of attribute item_name.
-
#item_value ⇒ Object
Returns the value of attribute item_value.
-
#length ⇒ Object
Returns the value of attribute length.
-
#note ⇒ Object
Returns the value of attribute note.
-
#order_id ⇒ Object
Returns the value of attribute order_id.
-
#package_type_id ⇒ Object
Returns the value of attribute package_type_id.
-
#qty ⇒ Object
Returns the value of attribute qty.
-
#service ⇒ Object
Returns the value of attribute service.
-
#service_type ⇒ Object
Returns the value of attribute service_type.
-
#shipping_cost ⇒ Object
Returns the value of attribute shipping_cost.
-
#weight ⇒ Object
Returns the value of attribute weight.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(order_id:, destination_name:, destination_phone:, destination_address:, destination_kecamatan_id:, weight:, width:, length:, height:, item_value:, shipping_cost:, service:, service_type:, cod:, package_type_id:, item_name:, destination_kelurahan_id: nil, destination_zipcode: nil, qty: nil, insurance_amount: nil, drop: nil, note: nil) ⇒ RequestPickupPackage
constructor
A new instance of RequestPickupPackage.
- #to_h ⇒ Object
Constructor Details
#initialize(order_id:, destination_name:, destination_phone:, destination_address:, destination_kecamatan_id:, weight:, width:, length:, height:, item_value:, shipping_cost:, service:, service_type:, cod:, package_type_id:, item_name:, destination_kelurahan_id: nil, destination_zipcode: nil, qty: nil, insurance_amount: nil, drop: nil, note: nil) ⇒ RequestPickupPackage
Returns a new instance of RequestPickupPackage.
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/kiriminaja/types/order.rb', line 13 def initialize(order_id:, destination_name:, destination_phone:, destination_address:, destination_kecamatan_id:, weight:, width:, length:, height:, item_value:, shipping_cost:, service:, service_type:, cod:, package_type_id:, item_name:, destination_kelurahan_id: nil, destination_zipcode: nil, qty: nil, insurance_amount: nil, drop: nil, note: nil) @order_id = order_id @destination_name = destination_name @destination_phone = destination_phone @destination_address = destination_address @destination_kecamatan_id = destination_kecamatan_id @weight = weight @width = width @length = length @height = height @item_value = item_value @shipping_cost = shipping_cost @service = service @service_type = service_type @cod = cod @package_type_id = package_type_id @item_name = item_name @destination_kelurahan_id = destination_kelurahan_id @destination_zipcode = destination_zipcode @qty = qty @insurance_amount = insurance_amount @drop = drop @note = note end |
Instance Attribute Details
#cod ⇒ Object
Returns the value of attribute cod.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def cod @cod end |
#destination_address ⇒ Object
Returns the value of attribute destination_address.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def destination_address @destination_address end |
#destination_kecamatan_id ⇒ Object
Returns the value of attribute destination_kecamatan_id.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def destination_kecamatan_id @destination_kecamatan_id end |
#destination_kelurahan_id ⇒ Object
Returns the value of attribute destination_kelurahan_id.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def destination_kelurahan_id @destination_kelurahan_id end |
#destination_name ⇒ Object
Returns the value of attribute destination_name.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def destination_name @destination_name end |
#destination_phone ⇒ Object
Returns the value of attribute destination_phone.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def destination_phone @destination_phone end |
#destination_zipcode ⇒ Object
Returns the value of attribute destination_zipcode.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def destination_zipcode @destination_zipcode end |
#drop ⇒ Object
Returns the value of attribute drop.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def drop @drop end |
#height ⇒ Object
Returns the value of attribute height.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def height @height end |
#insurance_amount ⇒ Object
Returns the value of attribute insurance_amount.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def insurance_amount @insurance_amount end |
#item_name ⇒ Object
Returns the value of attribute item_name.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def item_name @item_name end |
#item_value ⇒ Object
Returns the value of attribute item_value.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def item_value @item_value end |
#length ⇒ Object
Returns the value of attribute length.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def length @length end |
#note ⇒ Object
Returns the value of attribute note.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def note @note end |
#order_id ⇒ Object
Returns the value of attribute order_id.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def order_id @order_id end |
#package_type_id ⇒ Object
Returns the value of attribute package_type_id.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def package_type_id @package_type_id end |
#qty ⇒ Object
Returns the value of attribute qty.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def qty @qty end |
#service ⇒ Object
Returns the value of attribute service.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def service @service end |
#service_type ⇒ Object
Returns the value of attribute service_type.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def service_type @service_type end |
#shipping_cost ⇒ Object
Returns the value of attribute shipping_cost.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def shipping_cost @shipping_cost end |
#weight ⇒ Object
Returns the value of attribute weight.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def weight @weight end |
#width ⇒ Object
Returns the value of attribute width.
6 7 8 |
# File 'lib/kiriminaja/types/order.rb', line 6 def width @width end |
Instance Method Details
#to_h ⇒ Object
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/kiriminaja/types/order.rb', line 43 def to_h d = { order_id: @order_id, destination_name: @destination_name, destination_phone: @destination_phone, destination_address: @destination_address, destination_kecamatan_id: @destination_kecamatan_id, weight: @weight, width: @width, length: @length, height: @height, item_value: @item_value, shipping_cost: @shipping_cost, service: @service, service_type: @service_type, cod: @cod, package_type_id: @package_type_id, item_name: @item_name, } d[:destination_kelurahan_id] = @destination_kelurahan_id unless @destination_kelurahan_id.nil? d[:destination_zipcode] = @destination_zipcode unless @destination_zipcode.nil? d[:qty] = @qty unless @qty.nil? d[:insurance_amount] = @insurance_amount unless @insurance_amount.nil? d[:drop] = @drop unless @drop.nil? d[:note] = @note unless @note.nil? d end |