public void FetchInstitutionByIdAsync_should_retrieve_a_bank_that_matches_a_specified_id() { // Arrange var sut = new PlaidClient(Environment.Sandbox); // Act var request = new Institution.SearchByIdRequest() { InstitutionId = "ins_109511" }.UseDefaults(); var response = sut.FetchInstitutionByIdAsync(request).Result; // Assert response.IsSuccessStatusCode.ShouldBeTrue(); response.RequestId.ShouldNotBeNullOrEmpty(); response.Institution.Id.ShouldBe(request.InstitutionId); }
public void Can_retrieve_institutions_by_id() { // Arrange var sut = new PlaidClient(Environment.Sandbox); var request = new Institution.SearchByIdRequest().UseDefaults(); request.InstitutionId = "ins_109511"; request.Options = new Institution.SearchByIdRequest.AdditionalOptions { InclueMetadata = true }; // Act var response = sut.FetchInstitutionByIdAsync(request).Result; // Assert response.IsSuccessStatusCode.ShouldBeTrue(); response.RequestId.ShouldNotBeNullOrEmpty(); response.Institution.Id.ShouldBe(request.InstitutionId); response.Institution.Name.ShouldNotBeNullOrEmpty(); }
/// <summary> /// Retrieves the institutions that match the id. /// </summary> public Task <Institution.SearchByIdResponse> FetchInstitutionByIdAsync(Institution.SearchByIdRequest request) => PostAsync("institutions/get_by_id", request) .ParseResponseAsync <Institution.SearchByIdResponse>();