/// <summary>
        /// Creates a new API App.
        /// </summary>
        /// <param name="app">The application.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">app</exception>
        public Task <ApiAppResponse> CreateApiAppAsync(NewApiApp app)
        {
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }

            var content = new MultipartFormDataContent();

            content.AddApiApp(_log, app);

            return(PostAsync <ApiAppResponse>(ApiAppUrl, content));
        }
        /// <summary>
        /// Updates an existing API App. Can only be invoked for apps you own.
        /// Only the fields you provide will be updated. If you wish to clear an existing optional field,
        /// provide an empty string.
        /// </summary>
        /// <param name="clientId">The client identifier.</param>
        /// <param name="app">The application.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">app</exception>
        public Task <ApiAppResponse> UpdateApiAppAsync(string clientId, NewApiApp app)
        {
            if (string.IsNullOrEmpty(clientId))
            {
                throw new ArgumentException("Client id is required.");
            }
            if (app == null)
            {
                throw new ArgumentNullException(nameof(app));
            }

            var content = new MultipartFormDataContent();

            content.AddApiApp(_log, app);

            return(PostAsync <ApiAppResponse>($"{ApiAppUrl}/{clientId}", content));
        }