public void Can_retrieve_personal_info_associated_with_an_account() { // Arrange var sut = new PlaidClient(Environment.Sandbox); var request = new Identity.GetUserIdentityRequest().UseDefaults(); // Act var result = sut.FetchUserIdentityAsync(request).Result; bool publicKeyDontHaveAccess = result.Exception?.ErrorCode == "INVALID_PRODUCT"; if (publicKeyDontHaveAccess) { Assert.Inconclusive(Helper.your_public_key_do_not_have_access_contact_plaid); } // Assert result.IsSuccessStatusCode.ShouldBeTrue(); result.RequestId.ShouldNotBeNullOrEmpty(); result.Item.ShouldNotBeNull(); result.Accounts.Length.ShouldBeGreaterThan(0); result.Accounts[0].Owners.ShouldAllBe(x => x.Names.Length > 0); result.Accounts[0].Owners.ShouldAllBe(x => x.Addresses.Length > 0); result.Accounts[0].Owners.ShouldAllBe(x => x.PhoneNumbers.Length > 0); }
/* Identity */ /// <summary> /// Retrieves various account holder information on file with the financial institution, including names, emails, phone numbers, and addresses. /// </summary> public Task <Identity.GetUserIdentityResponse> FetchUserIdentityAsync(Identity.GetUserIdentityRequest request) => PostAsync("identity/get", request) .ParseResponseAsync <Identity.GetUserIdentityResponse>();
/* Identity */ /// <summary> /// Retrieves various account holder information on file with the financial institution, including names, emails, phone numbers, and addresses. /// </summary> /// <param name="request">The request.</param> /// <returns>Task<Identity.GetUserIdentityResponse>.</returns> public Task <Identity.GetUserIdentityResponse> FetchUserIdentityAsync(Identity.GetUserIdentityRequest request) { return(PostAsync <Identity.GetUserIdentityResponse>("identity/get", request)); }