/// <summary> /// Update details of a billing agreement, such as the description, shipping address, and start date, by passing the ID of the agreement to the request URI. /// </summary> /// <param name="apiContext">APIContext used for the API call.</param> /// <param name="patchRequest">PatchRequest</param> public void Update(APIContext apiContext, PatchRequest patchRequest) { // Validate the arguments to be used in the request ArgumentValidator.ValidateAndSetupAPIContext(apiContext); ArgumentValidator.Validate(this.id, "Id"); ArgumentValidator.Validate(patchRequest, "patchRequest"); // Configure and send the request object[] parameters = new object[] { this.id }; string pattern = "v1/payments/billing-agreements/{0}"; string resourcePath = SDKUtil.FormatURIPath(pattern, parameters); string payLoad = patchRequest.ConvertToJson(); PayPalResource.ConfigureAndExecute <Agreement>(apiContext, HttpMethod.PATCH, resourcePath, payLoad); }
/// <summary> /// Update details of a billing agreement, such as the description, shipping address, and start date, by passing the ID of the agreement to the request URI. /// </summary> /// <param name="accessToken">Access Token used for the API call.</param> /// <param name="patchRequest">PatchRequest</param> public void Update(string accessToken, PatchRequest patchRequest) { APIContext apiContext = new APIContext(accessToken); Update(apiContext, patchRequest); }
/// <summary> /// Update information in a previously saved bank account. Only the modified fields need to be passed in the request. /// </summary> /// <param name="accessToken">Access Token used for the API call.</param> /// <param name="patchRequest">PatchRequest</param> /// <returns>BankAccount</returns> public BankAccount Update(string accessToken, PatchRequest patchRequest) { APIContext apiContext = new APIContext(accessToken); return(Update(apiContext, patchRequest)); }