def availability(options = {})
      options[:participants] = map_availability_participants(options[:participants])
      options[:required_duration] = map_availability_required_duration(options[:required_duration])

      if options[:start_interval]
        options[:start_interval] = map_availability_required_duration(options[:start_interval])
      end

      if buffer = options[:buffer]
        options[:buffer] = map_availability_buffer(buffer)
      end

      translate_available_periods(options[:available_periods])

      response = post("/v1/availability", options)
      parse_collection(AvailablePeriod, "available_periods", response)
    end
def availability(options = {})
      options[:participants] = map_availability_participants(options[:participants])
      options[:required_duration] = map_availability_required_duration(options[:required_duration])

      if options[:start_interval]
        options[:start_interval] = map_availability_required_duration(options[:start_interval])
      end

      if buffer = options[:buffer]
        options[:buffer] = map_availability_buffer(buffer)
      end

      translate_available_periods(options[:available_periods])

      response = post("/v1/availability", options)
      parse_collection(AvailablePeriod, "available_periods", response)
    end
Public: Performs an availability query.

 options - The Hash options used to refine the selection (default: {}):
           :participants      - An Array of participant groups or a Hash
                                for a single participant group.
           :required_duration - An Integer representing the minimum number
                                of minutes of availability required.
           :available_periods - An Array of available time periods Hashes,
                                each must specify a start and end Time.
           :start_interval    - An Integer representing the start interval
                                of minutes for the availability query.
           :buffer            - An Hash containing the buffer to apply to
                                the availability query.

 Returns an Array of AvailablePeriods.

 Raises Cronofy::CredentialsMissingError if no credentials available.
 Raises Cronofy::AuthenticationFailureError if the access token is no
 longer valid.
 Raises Cronofy::AuthorizationFailureError if the access token does not
 include the required scope.
 Raises Cronofy::InvalidRequestError if the request contains invalid
 parameters.
 Raises Cronofy::TooManyRequestsError if the request exceeds the rate
 limits for the application.