Class: KiriminAja::Types::PricingInstantPayload

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(service:, item_price:, origin:, destination:, weight:, vehicle:, timezone:) ⇒ PricingInstantPayload

Returns a new instance of PricingInstantPayload.



46
47
48
49
50
51
52
53
54
# File 'lib/kiriminaja/types/address.rb', line 46

def initialize(service:, item_price:, origin:, destination:, weight:, vehicle:, timezone:)
  @service = service
  @item_price = item_price
  @origin = origin
  @destination = destination
  @weight = weight
  @vehicle = vehicle
  @timezone = timezone
end

Instance Attribute Details

#destinationObject

Returns the value of attribute destination.



44
45
46
# File 'lib/kiriminaja/types/address.rb', line 44

def destination
  @destination
end

#item_priceObject

Returns the value of attribute item_price.



44
45
46
# File 'lib/kiriminaja/types/address.rb', line 44

def item_price
  @item_price
end

#originObject

Returns the value of attribute origin.



44
45
46
# File 'lib/kiriminaja/types/address.rb', line 44

def origin
  @origin
end

#serviceObject

Returns the value of attribute service.



44
45
46
# File 'lib/kiriminaja/types/address.rb', line 44

def service
  @service
end

#timezoneObject

Returns the value of attribute timezone.



44
45
46
# File 'lib/kiriminaja/types/address.rb', line 44

def timezone
  @timezone
end

#vehicleObject

Returns the value of attribute vehicle.



44
45
46
# File 'lib/kiriminaja/types/address.rb', line 44

def vehicle
  @vehicle
end

#weightObject

Returns the value of attribute weight.



44
45
46
# File 'lib/kiriminaja/types/address.rb', line 44

def weight
  @weight
end

Instance Method Details

#to_hObject



56
57
58
59
60
61
62
63
64
65
66
# File 'lib/kiriminaja/types/address.rb', line 56

def to_h
  {
    service: Array(@service),
    item_price: @item_price,
    origin: @origin.to_h,
    destination: @destination.to_h,
    weight: @weight,
    vehicle: @vehicle.to_s,
    timezone: @timezone,
  }
end