public async Task DeleteTokenAsync(string tokenId, CancellationToken ct = default(CancellationToken)) { await this.ProcessAsync <object>( PayUClientUrlBuilder.BuildDeleteTokenUrl(this.settings.Url, this.settings.ApiVersion, tokenId), HttpMethod.Delete, ct); }
public void DeleteTokenAsync(string tokenId) { this.Process <object>( PayUClientUrlBuilder.BuildDeleteTokenUrl(this.settings.Url, this.settings.ApiVersion, tokenId), HttpMethod.Delete); }
public static void BuildDeleteTokenUrl_NullEmptyApiVersion_ThrowsArgumentException(string apiVersion, string tokenId) { Assert.Throws <ArgumentException>(() => PayUClientUrlBuilder.BuildDeleteTokenUrl("http://localhost:3000", apiVersion, tokenId)); }
public static void BuildDeleteTokenUrl_CorrectParameters_CorrectBuildedUrl() { Assert.Equal(new Uri("http://localhost:3000/api/v2_1/tokens/tokenId"), PayUClientUrlBuilder.BuildDeleteTokenUrl("http://localhost:3000", "v2_1", "tokenId")); }