public static ReverseProviderCreditResponse ReverseProviderCreditAction(IOffAmazonPaymentsService service, OffAmazonPaymentsServicePropertyCollection propertiesCollection, Random rng, string amazonProviderCreditId, string creditReversalAmount) { //Initiate the ReverseProviderCredit request, including SellerId, AmazonProviderCreditId, CreditReversalReferenceId and CreditReversalAmount ReverseProviderCreditRequest request = new ReverseProviderCreditRequest(); request.SellerId = propertiesCollection.MerchantID; request.AmazonProviderCreditId = amazonProviderCreditId; request.CreditReversalReferenceId = amazonProviderCreditId.Replace("-", "") + "r" + rng.Next(1, 1000).ToString(); //assign the ReverseProviderCreditAmount to the ReverseProviderCredit request Price price = new Price(); price.Amount = creditReversalAmount; price.CurrencyCode = propertiesCollection.CurrencyCode; request.CreditReversalAmount = price; return(ReverseProviderCreditSample.InvokeReverseProviderCredit(service, request)); }
//Invoke the ReverseProviderCredit method public ReverseProviderCreditResponse ReverseProviderCreditAction(string amazonProviderCreditId, string creditReversalAmount) { return(ReverseProviderCreditSample.ReverseProviderCreditAction(this._service, this._propertiesCollection, this._rng, amazonProviderCreditId, creditReversalAmount)); }