예제 #1
0
        public virtual VerificationSession Cancel(string id, VerificationSessionCancelOptions options, RequestOptions requestOptions = null)
        {
            if (options.StripeVersion == null)
            {
                throw new System.ArgumentException("The StripeVersion parameter has to be set when creating a Verification Session", "StripeVersion");
            }

            // Creating a Verification Session requires a specific API version to be set. This is handled as a parameter
            // but has to be set on the RequestOptions instead.
            requestOptions = requestOptions ?? new RequestOptions();
            requestOptions.StripeVersion = options.StripeVersion;

            return(this.Request(HttpMethod.Post, $"{this.InstanceUrl(id)}/cancel", options, requestOptions));
        }
예제 #2
0
 public virtual Task <VerificationSession> CancelAsync(string id, VerificationSessionCancelOptions options, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
 {
     return(this.RequestAsync(HttpMethod.Post, $"{this.InstanceUrl(id)}/cancel", options, requestOptions, cancellationToken));
 }