PayPal.Api.Invoice.Cancel C# (CSharp) Method

Cancel() public method

Cancels a sent invoice, by ID, and, optionally, sends a notification about the cancellation to the payer, merchant, and Cc: emails.
public Cancel ( APIContext apiContext, CancelNotification cancelNotification ) : void
apiContext APIContext APIContext used for the API call.
cancelNotification CancelNotification CancelNotification
return void
        public void Cancel(APIContext apiContext, CancelNotification cancelNotification)
        {
            Invoice.Cancel(apiContext, this.id, cancelNotification);
        }

Same methods

Invoice::Cancel ( APIContext apiContext, string invoiceId, CancelNotification cancelNotification ) : void

Usage Example

Example #1
0
 /// <summary>
 /// Cancels a sent invoice, by ID, and, optionally, sends a notification about the cancellation to the payer, merchant, and Cc: emails.
 /// </summary>
 /// <param name="apiContext">APIContext used for the API call.</param>
 /// <param name="cancelNotification">CancelNotification</param>
 public void Cancel(APIContext apiContext, CancelNotification cancelNotification)
 {
     Invoice.Cancel(apiContext, this.id, cancelNotification);
 }