public async Task <PayMethodsResponse> GetPayMethodsAsync(CancellationToken ct = default(CancellationToken)) { return(await this.ProcessAsync <PayMethodsResponse>( PayUClientUrlBuilder.BuildPayMethodsUrl(this.settings.Url, this.settings.ApiVersion), HttpMethod.Get, ct)); }
public PayMethodsResponse GetPayMethods() { return(this.Process <PayMethodsResponse>( PayUClientUrlBuilder.BuildPayMethodsUrl(this.settings.Url, this.settings.ApiVersion), HttpMethod.Get)); }
public static void BuildPaymethodsUrl_CorrectApiVersion_CorrectBuildedUrl() { Assert.Equal(new Uri("http://localhost:3000/api/v2.1/paymethods/"), PayUClientUrlBuilder.BuildPayMethodsUrl("http://localhost:3000", "v2.1")); }
public static void BuildPaymethodsUrl_NullEmptyApiVersion_ThrowsArgumentException(string apiVersion) { Assert.Throws <ArgumentException>(() => PayUClientUrlBuilder.BuildPayMethodsUrl("http://localhost:3000", apiVersion)); }