Пример #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);
        }
        public override object CreateBulkRegistrationType(Taxpayer taxpayer)
        {
            var actionsItems = ActionItems.Select(x => x.MapActionItem());

            if (!Enum.TryParse(ActionCode, true, out BulkRegistrationCOUTypeActionCode actionCode))
            {
                throw new ArgumentOutOfRangeException($"Can not parse the value Action Code. Value: {(string.IsNullOrEmpty(ActionCode) ? "Empty" : ActionCode)}.");
            }

            var record = new BulkRegistrationCOUType
            {
                ActionCode    = actionCode,
                EffectiveDate = DateTime.UtcNow,
                SSTPID        = taxpayer.SstpId,
                Items         = actionsItems.ToArray()
            };

            return(record);
        }
Пример #3
0
 public abstract object CreateBulkRegistrationType(Taxpayer taxpayer);