Sha256: ea9a8ff6e934a3e454bde989839d07ff277c4e0810dd98c83e8fb6dc6ecb9910
Contents?: true
Size: 949 Bytes
Versions: 35
Compression:
Stored size: 949 Bytes
Contents
module Centaman class Service::Extra < Centaman::Service include Centaman::JsonWrapper attr_reader :booking_time_id def after_init(args) @booking_time_id = args[:booking_time_id] require_args end def endpoint '/ticket_services/TimedTicketExtra' end def object_class Centaman::Object::Extra end def options super + [ { key: 'TimedTicketTypeId', value: booking_time_id } ] end def require_args raise "booking_time_id is required for #{self.class.name}" if booking_time_id.nil? end def sample_response [{ 'ExtraId' => 581, 'ExtraDescription' => 'Bar Package Cocktail Cruises', 'ExtraPrice' => 22.05, 'DepositPercentage' => 100.0, 'IsTaxInclusive' => true, 'TaxPercentage' => 10.25 }] end def objects Rails.env.test? ? build_objects(sample_response) : super end end end
Version data entries
35 entries across 35 versions & 1 rubygems