def create_calendar(profile_id, name, options = {})
      request = options.merge(profile_id: profile_id, name: name)
      response = post("/v1/calendars", request)
      parse_json(Calendar, "calendar", response)
    end
def create_calendar(profile_id, name, options = {})
      request = options.merge(profile_id: profile_id, name: name)
      response = post("/v1/calendars", request)
      parse_json(Calendar, "calendar", response)
    end
Public: Initialize a new Cronofy::Client.

 options - A Hash of options used to initialize the client (default: {}):
           :access_token  - An existing access token String for the user's
                            account (optional).
           :client_id     - The client ID String of your Cronofy OAuth
                            application (default:
                            ENV["CRONOFY_CLIENT_ID"]).
           :client_secret - The client secret String of your Cronofy OAuth
                            application (default:
                            ENV["CRONOFY_CLIENT_SECRET"]).
           :refresh_token - An existing refresh token String for the user's
                            account (optional).
           :data_centre   - An identifier to override the default data
                            centre (optional).
 Public: Creates a new calendar for the profile.

 profile_id - The String ID of the profile to create the calendar within.
 name       - The String to use as the name of the calendar.
 options    - The Hash options used to customize the calendar
              (default: {}):
              :color - The color to make the calendar (optional).

 See https://www.cronofy.com/developers/api/#create-calendar for reference.

 Returns the created Calendar

 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::AccountLockedError if the profile is not in a writable
 state and so a calendar cannot be created.
 Raises Cronofy::TooManyRequestsError if the request exceeds the rate
 limits for the application.