Class: KiriminAja::Types::InstantPickupPackage

Inherits:
Object
  • Object
show all
Defined in:
lib/kiriminaja/types/order.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(origin_name:, origin_phone:, origin_lat:, origin_long:, origin_address:, origin_address_note:, destination_name:, destination_phone:, destination_lat:, destination_long:, destination_address:, destination_address_note:, shipping_price:, item:) ⇒ InstantPickupPackage

Returns a new instance of InstantPickupPackage.



136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# File 'lib/kiriminaja/types/order.rb', line 136

def initialize(origin_name:, origin_phone:, origin_lat:, origin_long:,
               origin_address:, origin_address_note:,
               destination_name:, destination_phone:, destination_lat:, destination_long:,
               destination_address:, destination_address_note:,
               shipping_price:, item:)
  @origin_name = origin_name
  @origin_phone = origin_phone
  @origin_lat = origin_lat
  @origin_long = origin_long
  @origin_address = origin_address
  @origin_address_note = origin_address_note
  @destination_name = destination_name
  @destination_phone = destination_phone
  @destination_lat = destination_lat
  @destination_long = destination_long
  @destination_address = destination_address
  @destination_address_note = destination_address_note
  @shipping_price = shipping_price
  @item = item
end

Instance Attribute Details

#destination_addressObject

Returns the value of attribute destination_address.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def destination_address
  @destination_address
end

#destination_address_noteObject

Returns the value of attribute destination_address_note.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def destination_address_note
  @destination_address_note
end

#destination_latObject

Returns the value of attribute destination_lat.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def destination_lat
  @destination_lat
end

#destination_longObject

Returns the value of attribute destination_long.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def destination_long
  @destination_long
end

#destination_nameObject

Returns the value of attribute destination_name.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def destination_name
  @destination_name
end

#destination_phoneObject

Returns the value of attribute destination_phone.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def destination_phone
  @destination_phone
end

#itemObject

Returns the value of attribute item.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def item
  @item
end

#origin_addressObject

Returns the value of attribute origin_address.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def origin_address
  @origin_address
end

#origin_address_noteObject

Returns the value of attribute origin_address_note.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def origin_address_note
  @origin_address_note
end

#origin_latObject

Returns the value of attribute origin_lat.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def origin_lat
  @origin_lat
end

#origin_longObject

Returns the value of attribute origin_long.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def origin_long
  @origin_long
end

#origin_nameObject

Returns the value of attribute origin_name.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def origin_name
  @origin_name
end

#origin_phoneObject

Returns the value of attribute origin_phone.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def origin_phone
  @origin_phone
end

#shipping_priceObject

Returns the value of attribute shipping_price.



130
131
132
# File 'lib/kiriminaja/types/order.rb', line 130

def shipping_price
  @shipping_price
end

Instance Method Details

#to_hObject



157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
# File 'lib/kiriminaja/types/order.rb', line 157

def to_h
  {
    origin_name: @origin_name,
    origin_phone: @origin_phone,
    origin_lat: @origin_lat,
    origin_long: @origin_long,
    origin_address: @origin_address,
    origin_address_note: @origin_address_note,
    destination_name: @destination_name,
    destination_phone: @destination_phone,
    destination_lat: @destination_lat,
    destination_long: @destination_long,
    destination_address: @destination_address,
    destination_address_note: @destination_address_note,
    shipping_price: @shipping_price,
    item: @item.to_h,
  }
end