/// <summary> /// Reminds the payer to pay the invoice. /// </summary> /// <param name="apiContext">APIContext used for the API call.</param> /// <param name="notification">Notification</param> /// <returns></returns> public void Remind(APIContext apiContext, Notification notification) { if (apiContext == null) { throw new ArgumentNullException("APIContext cannot be null"); } if (string.IsNullOrEmpty(apiContext.AccessToken)) { throw new ArgumentNullException("AccessToken cannot be null or empty"); } if (apiContext.HTTPHeaders == null) { apiContext.HTTPHeaders = new Dictionary <string, string>(); } apiContext.HTTPHeaders.Add(BaseConstants.ContentTypeHeader, BaseConstants.ContentTypeHeaderJson); apiContext.SdkVersion = new SDKVersionImpl(); if (this.id == null) { throw new ArgumentNullException("Id cannot be null"); } if (notification == null) { throw new ArgumentNullException("notification cannot be null"); } object[] parameters = new object[] { this.id }; string pattern = "v1/invoicing/invoices/{0}/remind"; string resourcePath = SDKUtil.FormatURIPath(pattern, parameters); string payLoad = notification.ConvertToJson(); PayPalResource.ConfigureAndExecute <object>(apiContext, HttpMethod.POST, resourcePath, payLoad); return; }
/// <summary> /// Reminds the payer to pay the invoice. /// </summary> /// <param name="apiContext">APIContext used for the API call.</param> /// <param name="notification">Notification</param> /// <returns></returns> public void Remind(APIContext apiContext, Notification notification) { // Validate the arguments to be used in the request ArgumentValidator.ValidateAndSetupAPIContext(apiContext); ArgumentValidator.Validate(this.id, "Id"); ArgumentValidator.Validate(notification, "notification"); // Configure and send the request object[] parameters = new object[] { this.id }; string pattern = "v1/invoicing/invoices/{0}/remind"; string resourcePath = SDKUtil.FormatURIPath(pattern, parameters); string payLoad = notification.ConvertToJson(); PayPalResource.ConfigureAndExecute <object>(apiContext, HttpMethod.POST, resourcePath, payLoad); return; }
/// <summary> /// Reminds the payer to pay the invoice. /// </summary> /// <param name="apiContext">APIContext used for the API call.</param> /// <param name="notification">Notification</param> /// <returns></returns> public void Remind(APIContext apiContext, Notification notification) { if (apiContext == null) { throw new ArgumentNullException("APIContext cannot be null"); } if (string.IsNullOrEmpty(apiContext.AccessToken)) { throw new ArgumentNullException("AccessToken cannot be null or empty"); } if (apiContext.HTTPHeaders == null) { apiContext.HTTPHeaders = new Dictionary<string, string>(); } apiContext.HTTPHeaders.Add(BaseConstants.ContentTypeHeader, BaseConstants.ContentTypeHeaderJson); apiContext.SdkVersion = new SDKVersionImpl(); if (this.id == null) { throw new ArgumentNullException("Id cannot be null"); } if (notification == null) { throw new ArgumentNullException("notification cannot be null"); } object[] parameters = new object[] {this.id}; string pattern = "v1/invoicing/invoices/{0}/remind"; string resourcePath = SDKUtil.FormatURIPath(pattern, parameters); string payLoad = notification.ConvertToJson(); PayPalResource.ConfigureAndExecute<object>(apiContext, HttpMethod.POST, resourcePath, payLoad); return; }