public void Fill(CompaniesHouseOfficerAppointmentOrderItem model) { model.Name = name; model.Nationality = nationality; model.AppointedOn = appointed_on; model.CountryOfResidence = country_of_residence; model.Link = links != null ? links.company : null; model.Occupation = occupation; model.OfficerRole = officer_role; model.ResignedOn = resigned_on; model.AppointedBefore = appointed_before; model.IsPre1992Appointment = is_pre_1992_appointment; if (identification != null) { model.IdentificationType = identification.identification_type; model.LegalAuthority = identification.legal_authority; model.LegalForm = identification.legal_form; model.PlaceRegistered = identification.place_registered; model.RegistrationNumber = identification.registration_number; } //if if (appointed_to != null) { model.CompanyName = appointed_to.company_name; model.CompanyNumber = appointed_to.company_number; model.CompanyStatus = appointed_to.company_status; } //if if (name_elements != null) { model.Forename = name_elements.forename; model.Honours = name_elements.honours; model.OtherForenames = name_elements.other_forenames; model.Surname = name_elements.surname; model.Title = name_elements.title; } //if if (address != null) { model.AddressLine1 = address.address_line_1; model.AddressLine2 = address.address_line_2; model.CareOf = address.care_of; model.Country = address.country; model.Locality = address.locality; model.PoBox = address.po_box; model.Postcode = address.postal_code; model.Premises = address.premises; model.Region = address.region; } //if } //Fill
public void Fill(CompaniesHouseOfficerAppointmentOrder model) { model.Name = name; model.Etag = etag; model.IsCorporateOfficer = is_corporate_officer; model.ItemsPerPage = items_per_page; model.Kind = kind; model.Link = links != null ? links.self : null; model.StartIndex = start_index; model.TotalResults = total_results; if (model.Appointments == null) { model.Appointments = new List <CompaniesHouseOfficerAppointmentOrderItem>(); } foreach (var item in items) { var appointmentModel = new CompaniesHouseOfficerAppointmentOrderItem(); item.Fill(appointmentModel); model.Appointments.Add(appointmentModel); } //foreach } //Fill