def real_time_sequencing(args)
      body = args.merge(client_id: @client_id, client_secret: @client_secret)

      if availability = args[:availability]
        availability[:sequence] = map_availability_sequence(availability[:sequence])
        translate_available_periods(availability[:available_periods]) if availability[:available_periods]
      end

      body[:availability] = availability

      response = raw_post("/v1/real_time_sequencing", body)
      parse_json(AddToCalendarResponse, nil , response)
    end
def real_time_sequencing(args)
      body = args.merge(client_id: @client_id, client_secret: @client_secret)

      if availability = args[:availability]
        availability[:sequence] = map_availability_sequence(availability[:sequence])
        translate_available_periods(availability[:available_periods]) if availability[:available_periods]
      end

      body[:availability] = availability

      response = raw_post("/v1/real_time_sequencing", body)
      parse_json(AddToCalendarResponse, nil , response)
    end
Public: Generates an real time sequencing link to start the OAuth process with
 an event to be automatically upserted

 oauth            - A Hash describing the OAuth flow required:
                    :scope             - A String representing the scopes to ask for
                                         within the OAuth flow
                    :redirect_uri      - A String containing a url to redirect the
                                         user to after completing the OAuth flow.
                    :scope             - A String representing additional state to
                                         be passed within the OAuth flow.

 availability     - A Hash describing the availability details for the event:
           :sequence          - An Array of sequence defintions containing
                                a Hash of:
             :sequence_id       - A String to uniquely identify this part
                                of the proposed sequence.
             :ordinal           - An integer to define the ordering of the
                                proposed sequence. (Optional)
             :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.
             :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.
             :event            - A Hash describing the event:
                    :event_id          - A String uniquely identifying the event for
                                         your application (note: this is NOT an ID
                                         generated by Cronofy).
                    :summary           - A String to use as the summary, sometimes
                                         referred to as the name or title, of the
                                         event.
                    :description       - A String to use as the description, sometimes
                                         referred to as the notes or body, of the
                                         event.
                    :url               - The URL associated with the event.
                    :location          - A Hash describing the location of the event
                                         with symbolized keys (optional):
                                         :description - A String describing the
                                                        location.
                                         :lat - A String of the location's latitude.
                                         :long - A String of the location's longitude.
                    :reminders         - An Array of Hashes describing the desired
                                         reminders for the event. Reminders should be
                                         specified in priority order as, for example,
                                         when the underlying provider only supports a
                                         single reminder then the first reminder will
                                         be used.
                                         :minutes - An Integer specifying the number
                                                    of minutes before the start of the
                                                    event that the reminder should
                                                    occur.
                    :transparency      - The transparency state for the event (optional).
                                         Accepted values are "transparent" and "opaque".
                    :attendees         - A Hash of :invite and :reject, each of which is
                                         an array of invitees to invite to or reject from
                                         the event. Invitees are represented by a hash of
                                         :email and :display_name (optional).
          :available_periods - A hash stating the available periods for the event
 target_calendars - An array of hashes stating into which calendars to insert the created
                    event
 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::NotFoundError if the calendar does not exist.
 Raises Cronofy::InvalidRequestError if the request contains invalid
 parameters.
 Raises Cronofy::TooManyRequestsError if the request exceeds the rate
 limits for the application.