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.
-
#items ⇒ Object
Returns the value of attribute items.
-
#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, items: 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, items: nil) ⇒ RequestPickupPackage
Returns a new instance of RequestPickupPackage.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/kiriminaja/types/order.rb', line 59 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, items: 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 @items = items end |
Instance Attribute Details
#cod ⇒ Object
Returns the value of attribute cod.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def cod @cod end |
#destination_address ⇒ Object
Returns the value of attribute destination_address.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def destination_address @destination_address end |
#destination_kecamatan_id ⇒ Object
Returns the value of attribute destination_kecamatan_id.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def destination_kecamatan_id @destination_kecamatan_id end |
#destination_kelurahan_id ⇒ Object
Returns the value of attribute destination_kelurahan_id.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def destination_kelurahan_id @destination_kelurahan_id end |
#destination_name ⇒ Object
Returns the value of attribute destination_name.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def destination_name @destination_name end |
#destination_phone ⇒ Object
Returns the value of attribute destination_phone.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def destination_phone @destination_phone end |
#destination_zipcode ⇒ Object
Returns the value of attribute destination_zipcode.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def destination_zipcode @destination_zipcode end |
#drop ⇒ Object
Returns the value of attribute drop.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def drop @drop end |
#height ⇒ Object
Returns the value of attribute height.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def height @height end |
#insurance_amount ⇒ Object
Returns the value of attribute insurance_amount.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def insurance_amount @insurance_amount end |
#item_name ⇒ Object
Returns the value of attribute item_name.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def item_name @item_name end |
#item_value ⇒ Object
Returns the value of attribute item_value.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def item_value @item_value end |
#items ⇒ Object
Returns the value of attribute items.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def items @items end |
#length ⇒ Object
Returns the value of attribute length.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def length @length end |
#note ⇒ Object
Returns the value of attribute note.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def note @note end |
#order_id ⇒ Object
Returns the value of attribute order_id.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def order_id @order_id end |
#package_type_id ⇒ Object
Returns the value of attribute package_type_id.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def package_type_id @package_type_id end |
#qty ⇒ Object
Returns the value of attribute qty.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def qty @qty end |
#service ⇒ Object
Returns the value of attribute service.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def service @service end |
#service_type ⇒ Object
Returns the value of attribute service_type.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def service_type @service_type end |
#shipping_cost ⇒ Object
Returns the value of attribute shipping_cost.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def shipping_cost @shipping_cost end |
#weight ⇒ Object
Returns the value of attribute weight.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def weight @weight end |
#width ⇒ Object
Returns the value of attribute width.
52 53 54 |
# File 'lib/kiriminaja/types/order.rb', line 52 def width @width end |
Instance Method Details
#to_h ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/kiriminaja/types/order.rb', line 90 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[:items] = @items.map(&:to_h) unless @items.nil? d end |