Class: KiriminAja::Types::RequestPickupPayload
- Inherits:
-
Object
- Object
- KiriminAja::Types::RequestPickupPayload
- Defined in:
- lib/kiriminaja/types/order.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#kecamatan_id ⇒ Object
Returns the value of attribute kecamatan_id.
-
#kelurahan_id ⇒ Object
Returns the value of attribute kelurahan_id.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
-
#name ⇒ Object
Returns the value of attribute name.
-
#packages ⇒ Object
Returns the value of attribute packages.
-
#phone ⇒ Object
Returns the value of attribute phone.
-
#platform_name ⇒ Object
Returns the value of attribute platform_name.
-
#schedule ⇒ Object
Returns the value of attribute schedule.
-
#zipcode ⇒ Object
Returns the value of attribute zipcode.
Instance Method Summary collapse
-
#initialize(address:, phone:, name:, kecamatan_id:, packages:, schedule:, zipcode: nil, kelurahan_id: nil, latitude: nil, longitude: nil, platform_name: nil) ⇒ RequestPickupPayload
constructor
A new instance of RequestPickupPayload.
- #to_h ⇒ Object
Constructor Details
#initialize(address:, phone:, name:, kecamatan_id:, packages:, schedule:, zipcode: nil, kelurahan_id: nil, latitude: nil, longitude: nil, platform_name: nil) ⇒ RequestPickupPayload
Returns a new instance of RequestPickupPayload.
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/kiriminaja/types/order.rb', line 76 def initialize(address:, phone:, name:, kecamatan_id:, packages:, schedule:, zipcode: nil, kelurahan_id: nil, latitude: nil, longitude: nil, platform_name: nil) @address = address @phone = phone @name = name @kecamatan_id = kecamatan_id @packages = packages @schedule = schedule @zipcode = zipcode @kelurahan_id = kelurahan_id @latitude = latitude @longitude = longitude @platform_name = platform_name end |
Instance Attribute Details
#address ⇒ Object
Returns the value of attribute address.
73 74 75 |
# File 'lib/kiriminaja/types/order.rb', line 73 def address @address end |
#kecamatan_id ⇒ Object
Returns the value of attribute kecamatan_id.
73 74 75 |
# File 'lib/kiriminaja/types/order.rb', line 73 def kecamatan_id @kecamatan_id end |
#kelurahan_id ⇒ Object
Returns the value of attribute kelurahan_id.
73 74 75 |
# File 'lib/kiriminaja/types/order.rb', line 73 def kelurahan_id @kelurahan_id end |
#latitude ⇒ Object
Returns the value of attribute latitude.
73 74 75 |
# File 'lib/kiriminaja/types/order.rb', line 73 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude.
73 74 75 |
# File 'lib/kiriminaja/types/order.rb', line 73 def longitude @longitude end |
#name ⇒ Object
Returns the value of attribute name.
73 74 75 |
# File 'lib/kiriminaja/types/order.rb', line 73 def name @name end |
#packages ⇒ Object
Returns the value of attribute packages.
73 74 75 |
# File 'lib/kiriminaja/types/order.rb', line 73 def packages @packages end |
#phone ⇒ Object
Returns the value of attribute phone.
73 74 75 |
# File 'lib/kiriminaja/types/order.rb', line 73 def phone @phone end |
#platform_name ⇒ Object
Returns the value of attribute platform_name.
73 74 75 |
# File 'lib/kiriminaja/types/order.rb', line 73 def platform_name @platform_name end |
#schedule ⇒ Object
Returns the value of attribute schedule.
73 74 75 |
# File 'lib/kiriminaja/types/order.rb', line 73 def schedule @schedule end |
#zipcode ⇒ Object
Returns the value of attribute zipcode.
73 74 75 |
# File 'lib/kiriminaja/types/order.rb', line 73 def zipcode @zipcode end |
Instance Method Details
#to_h ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/kiriminaja/types/order.rb', line 91 def to_h d = { address: @address, phone: @phone, name: @name, kecamatan_id: @kecamatan_id, packages: @packages.map(&:to_h), schedule: @schedule, } d[:zipcode] = @zipcode unless @zipcode.nil? d[:kelurahan_id] = @kelurahan_id unless @kelurahan_id.nil? d[:latitude] = @latitude unless @latitude.nil? d[:longitude] = @longitude unless @longitude.nil? d[:platform_name] = @platform_name unless @platform_name.nil? d end |