Example #1
0
 public PayoutResponse PostPayout(PayoutRequest payoutRequest)
 {
     return(this.Process <PayoutResponse>(
                PayUClientUrlBuilder.BuildPayoutsUrl(this.settings.Url, this.settings.ApiVersion),
                HttpMethod.Post,
                payoutRequest));
 }
Example #2
0
 public async Task <PayoutResponse> PostPayoutAsync(PayoutRequest payoutRequest, CancellationToken ct = default(CancellationToken))
 {
     return(await this.ProcessAsync <PayoutResponse>(
                PayUClientUrlBuilder.BuildPayoutsUrl(this.settings.Url, this.settings.ApiVersion),
                HttpMethod.Post,
                ct,
                payoutRequest));
 }
 public static void BuildPayoutsUrl_CorrectApiVersion_CorrectBuildedUrl()
 {
     Assert.Equal(new Uri("http://localhost:3000/api/v2.1/payouts"),
                  PayUClientUrlBuilder.BuildPayoutsUrl("http://localhost:3000", "v2.1"));
 }
 public static void BuildPayoutsUrl_NullEmptyApiVersion_ThrowsArgumentException(string apiVersion)
 {
     Assert.Throws <ArgumentException>(() => PayUClientUrlBuilder.BuildPayoutsUrl("http://localhost:3000", apiVersion));
 }