コード例 #1
0
        public override object CreateBulkRegistrationType(Taxpayer taxpayer)
        {
            var items = RegistrationIndicatorItems.Select(x => x.MapStateRegistrationIndicator());

            var physicalAddress = PhysicalAddress?.MapAddressType();
            var mailingAddress  = MailingAddress?.MapAddressType();
            var contactInfo     = ContactInfo?.MapContactInformation();
            var technologyModel = TechnologyModel?.MapTechnologyModel();

            var record = new BulkRegistrationNewType
            {
                ActionCode         = BulkRegistrationNewTypeActionCode.N,
                RegistrationEntity = EnumHelper.GetEnumItemFromValueName <EntityType>(EntityType),
                NAICSCode          = NaicsCode,
                PhysicalAddress    = physicalAddress,
                MailingAddress     = mailingAddress ?? physicalAddress,
                SSTPContact        = contactInfo,
                TechnologyModel    = technologyModel,
                Item                       = taxpayer.MapTaxpayerName(),
                SellerPhone                = taxpayer.SellerPhone,
                SellerPhoneExt             = taxpayer.SellerPhoneExtension,
                StateIncorporated          = taxpayer.StateIncorporated,
                EffectiveDate              = DateTime.UtcNow,
                FirstFilingPeriod          = $"{DateTime.UtcNow.Year}-{DateTime.UtcNow:MM}",
                NewPass                    = taxpayer.Password,
                StateRegistrationIndicator = items.ToArray(),
                DBAName                    = taxpayer.DoingBusinessName
            };

            return(record);
        }