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.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/kiriminaja/types/order.rb', line 124 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.
121 122 123 |
# File 'lib/kiriminaja/types/order.rb', line 121 def address @address end |
#kecamatan_id ⇒ Object
Returns the value of attribute kecamatan_id.
121 122 123 |
# File 'lib/kiriminaja/types/order.rb', line 121 def kecamatan_id @kecamatan_id end |
#kelurahan_id ⇒ Object
Returns the value of attribute kelurahan_id.
121 122 123 |
# File 'lib/kiriminaja/types/order.rb', line 121 def kelurahan_id @kelurahan_id end |
#latitude ⇒ Object
Returns the value of attribute latitude.
121 122 123 |
# File 'lib/kiriminaja/types/order.rb', line 121 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude.
121 122 123 |
# File 'lib/kiriminaja/types/order.rb', line 121 def longitude @longitude end |
#name ⇒ Object
Returns the value of attribute name.
121 122 123 |
# File 'lib/kiriminaja/types/order.rb', line 121 def name @name end |
#packages ⇒ Object
Returns the value of attribute packages.
121 122 123 |
# File 'lib/kiriminaja/types/order.rb', line 121 def packages @packages end |
#phone ⇒ Object
Returns the value of attribute phone.
121 122 123 |
# File 'lib/kiriminaja/types/order.rb', line 121 def phone @phone end |
#platform_name ⇒ Object
Returns the value of attribute platform_name.
121 122 123 |
# File 'lib/kiriminaja/types/order.rb', line 121 def platform_name @platform_name end |
#schedule ⇒ Object
Returns the value of attribute schedule.
121 122 123 |
# File 'lib/kiriminaja/types/order.rb', line 121 def schedule @schedule end |
#zipcode ⇒ Object
Returns the value of attribute zipcode.
121 122 123 |
# File 'lib/kiriminaja/types/order.rb', line 121 def zipcode @zipcode end |
Instance Method Details
#to_h ⇒ Object
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/kiriminaja/types/order.rb', line 139 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 |