Class: Centaman::Service::BookingType

Inherits:
Centaman::Service show all
Includes:
JsonWrapper
Defined in:
lib/centaman/service/booking_type.rb

Constant Summary

Constants inherited from Wrapper

Wrapper::DEFAULT_TIMEOUT_TIME

Instance Attribute Summary

Attributes inherited from Wrapper

#api_password, #api_token, #api_url, #api_username, #proxie_host, #proxie_password, #proxie_port, #proxie_user

Class Method Summary collapse

Instance Method Summary collapse

Methods included from JsonWrapper

#additional_hash_to_serialize_after_response, #build_object, #build_objects, #final_object_class, #objects

Methods inherited from Centaman::Service

#after_init, #after_post, #fetch_all, #post, #put

Methods inherited from Wrapper

#after_init, #generate_token, #headers, #initialize, #options, #options_hash, #payload, #payload_key, #proxy_hash, #wrap_request_in_case_of_timeout

Constructor Details

This class inherits a constructor from Centaman::Wrapper

Class Method Details

.find(booking_type_id, date) ⇒ Object



20
21
22
# File 'lib/centaman/service/booking_type.rb', line 20

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

Instance Method Details

#all_booking_typeObject



13
14
15
16
17
18
# File 'lib/centaman/service/booking_type.rb', line 13

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

#endpointObject



5
6
7
# File 'lib/centaman/service/booking_type.rb', line 5

def endpoint
  '/ticket_services/TimedTicket'
end

#object_classObject



9
10
11
# File 'lib/centaman/service/booking_type.rb', line 9

def object_class
  Centaman::Object::BookingType
end