public async Task <ActionResult> Search(SearchPersonModel model) { List <Person> persons = new List <Person>(); if (!String.IsNullOrWhiteSpace(model.Email)) { //search by email PersonListOptions options = new PersonListOptions() { Email = model.Email }; persons = await ArenaAPIHelper.GetPersons(options); } else if (!String.IsNullOrWhiteSpace(model.PhoneNumber)) { //search by phone PersonListOptions options = new PersonListOptions() { PhoneNumber = ValidationHelper.CleanPhoneNumber(model.PhoneNumber) }; persons = await ArenaAPIHelper.GetPersons(options); } return(PartialView("_persons", persons)); }
public PersonServiceTest() { this.service = new PersonService(); this.createOptions = new PersonCreateOptions { FirstName = "John", Relationship = new PersonRelationshipOptions { AccountOpener = true, Owner = true, PercentOwnership = 30.5m, } }; this.updateOptions = new PersonUpdateOptions { FirstName = "John", Relationship = new PersonRelationshipOptions { AccountOpener = true, Owner = true, PercentOwnership = 30.5m, } }; this.listOptions = new PersonListOptions { Limit = 1, Relationship = new PersonRelationshipListOptions { Director = true, } }; }
public static async Task <List <Person> > GetPersons(PersonListOptions options) { if (!IsReady()) { await StartSession(); } PersonRepository repository = new PersonRepository(_arenaAPI); return(await repository.Get(options)); }
public PersonServiceTest( StripeMockFixture stripeMockFixture, MockHttpClientFixture mockHttpClientFixture) : base(stripeMockFixture, mockHttpClientFixture) { this.service = new PersonService(this.StripeClient); this.createOptions = new PersonCreateOptions { FirstName = "John", Relationship = new PersonRelationshipOptions { AccountOpener = true, Owner = true, PercentOwnership = 30.5m, }, Verification = new PersonVerificationOptions { AdditionalDocument = new PersonVerificationDocumentOptions { BackFileId = "file_abc", FrontFileId = "file_def", }, Document = new PersonVerificationDocumentOptions { BackFileId = "file_123", FrontFileId = "file_345", }, }, }; this.updateOptions = new PersonUpdateOptions { FirstName = "John", Relationship = new PersonRelationshipOptions { AccountOpener = true, Owner = true, PercentOwnership = 30.5m, } }; this.listOptions = new PersonListOptions { Limit = 1, Relationship = new PersonRelationshipListOptions { Director = true, } }; }