Sha256: 6ed63899a7bc7463fd9d8928247c8c33a34b51a472a5c73546e5e448ab1253e1

Contents?: true

Size: 584 Bytes

Versions: 14

Compression:

Stored size: 584 Bytes

Contents

module Centaman
  class Service::BookingType < Centaman::Service
    include Centaman::JsonWrapper
    def endpoint
      '/ticket_services/TimedTicket'
    end

    def object_class
      Centaman::Object::BookingType
    end

    def all_booking_type
      object_class.new({
        'BookingTypeId' => 0,
        'BookingDescription' => 'All Booking Types'
      })
    end

    def self.find(booking_type_id, date)
      obj = new(
        start_date: date,
        end_date: date
      )
      obj.objects.detect {|obj| obj.booking_type_id == booking_type_id }
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
centaman-0.1.13 lib/centaman/service/booking_type.rb
centaman-0.1.12 lib/centaman/service/booking_type.rb
centaman-0.1.11 lib/centaman/service/booking_type.rb
centaman-0.1.10 lib/centaman/service/booking_type.rb
centaman-0.1.9 lib/centaman/service/booking_type.rb
centaman-0.1.8 lib/centaman/service/booking_type.rb
centaman-0.1.7 lib/centaman/service/booking_type.rb
centaman-0.1.6 lib/centaman/service/booking_type.rb
centaman-0.1.5 lib/centaman/service/booking_type.rb
centaman-0.1.4 lib/centaman/service/booking_type.rb
centaman-0.1.3 lib/centaman/service/booking_type.rb
centaman-0.1.2 lib/centaman/service/booking_type.rb
centaman-0.1.1 lib/centaman/service/booking_type.rb
centaman-0.1.0 lib/centaman/service/booking_type.rb