public static Update ( |
||
apiContext | APIContext used for the API call. | |
invoice | Invoice object to update. | |
notifyMerchant | bool | Specifies if the invoice update notification is needed for merchant |
Résultat |
public static Invoice Update(APIContext apiContext, Invoice invoice, bool notifyMerchant = true)
{
// Validate the arguments to be used in the request
ArgumentValidator.ValidateAndSetupAPIContext(apiContext);
ArgumentValidator.Validate(invoice, "invoice");
var queryParameters = new QueryParameters();
queryParameters["notify_merchant"] = notifyMerchant.ToString();
// Configure and send the request
var pattern = "v1/invoicing/invoices/{0}";
var resourcePath = SDKUtil.FormatURIPath(pattern, new object[] { invoice.id }) + queryParameters.ToUrlFormattedString();
return PayPalResource.ConfigureAndExecute<Invoice>(apiContext, HttpMethod.PUT, resourcePath, invoice.ConvertToJson());
}
Invoice::Update ( |
/// <summary> /// Fully updates an invoice, by ID. In the JSON request body, include a complete `invoice` object. This call does not support partial updates. /// </summary> /// <param name="apiContext">APIContext used for the API call.</param> /// <param name="notifyMerchant">Indicates whether to send the invoice update notification to the merchant. Default is `true`.</param> /// <returns>Invoice</returns> public Invoice Update(APIContext apiContext, bool notifyMerchant = true) { return(Invoice.Update(apiContext, this, notifyMerchant)); }