lib/centaman/service/extra.rb in centaman-5.0.4 vs lib/centaman/service/extra.rb in centaman-5.0.5
- old
+ new
@@ -1,12 +1,13 @@
module Centaman
class Service::Extra < Centaman::Service
include Centaman::JsonWrapper
- attr_reader :booking_time_id
+ attr_reader :booking_time_id, :cost_rate_id
def after_init(args)
@booking_time_id = args[:booking_time_id]
+ @cost_rate_id = args[:cost_rate_id]
require_args
end
def endpoint
'/ticket_services/TimedTicketExtra'
@@ -16,11 +17,18 @@
Centaman::Object::Extra
end
def options
super + [
- { key: 'TimedTicketTypeId', value: booking_time_id }
+ { key: 'TimedTicketTypeId', value: booking_time_id },
+ { key: 'CostRateId', value: cost_rate_id }
]
+ end
+
+ def additional_hash_to_serialize_after_response
+ {
+ booking_time_id: booking_time_id
+ }
end
def require_args
raise "booking_time_id is required for #{self.class.name}" if booking_time_id.nil?
end