See PayPal Developer documentation for more information.
/// <summary> /// Set the balance for an agreement by passing the ID of the agreement to the request URI. In addition, pass a Currency object in the request JSON that specifies the currency type and value of the balance. /// </summary> /// <param name="apiContext">APIContext used for the API call.</param> /// <param name="agreementId">ID of the billing agreement to perform the operation against.</param> /// <param name="currency">Currency</param> public static void SetBalance(APIContext apiContext, string agreementId, Currency currency) { // Validate the arguments to be used in the request ArgumentValidator.ValidateAndSetupAPIContext(apiContext); ArgumentValidator.Validate(agreementId, "agreementId"); ArgumentValidator.Validate(currency, "currency"); // Configure and send the request var pattern = "v1/payments/billing-agreements/{0}/set-balance"; var resourcePath = SDKUtil.FormatURIPath(pattern, new object[] { agreementId }); PayPalResource.ConfigureAndExecute(apiContext, HttpMethod.POST, resourcePath, currency.ConvertToJson()); }
/// <summary> /// Set the balance for an agreement by passing the ID of the agreement to the request URI. In addition, pass a Currency object in the request JSON that specifies the currency type and value of the balance. /// </summary> /// <param name="apiContext">APIContext used for the API call.</param> /// <param name="currency">Currency</param> public void SetBalance(APIContext apiContext, Currency currency) { Agreement.SetBalance(apiContext, this.id, currency); }