public virtual StripeInvoice Pay(string invoiceId, StripeInvoicePayOptions payOptions, StripeRequestOptions requestOptions = null)
 {
     return(Mapper <StripeInvoice> .MapFromJson(
                Requestor.PostString(
                    this.ApplyAllParameters(payOptions, $"{Urls.Invoices}/{invoiceId}/pay", false),
                    this.SetupRequestOptions(requestOptions))));
 }
 public virtual async Task <StripeInvoice> PayAsync(string invoiceId, StripeInvoicePayOptions payOptions, StripeRequestOptions requestOptions = null, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(Mapper <StripeInvoice> .MapFromJson(
                await Requestor.PostStringAsync(
                    this.ApplyAllParameters(payOptions, $"{Urls.Invoices}/{invoiceId}/pay", false),
                    this.SetupRequestOptions(requestOptions),
                    cancellationToken).ConfigureAwait(false)));
 }