public static DomesticPaymentConsentContext DebtorAccount(
            this DomesticPaymentConsentContext context,
            OBWriteDomestic2DataInitiationDebtorAccount value)
        {
            context.ArgNotNull(nameof(context));

            if (value != null)
            {
                context.GetOrCreateDefault(BaseLens)
                .GetOrCreateDefault(DomesticConsentLens)
                .GetOrCreateDefault(DataLens)
                .GetOrCreateDefault(InitiationLens).DebtorAccount = value;
            }

            return(context);
        }
        public void OBWriteDomesticDataInitiationDebtorAccount_To_V111()
        {
            OBWriteDomestic2DataInitiationDebtorAccount value = new OBWriteDomestic2DataInitiationDebtorAccount
            {
                Identification          = "abc",
                Name                    = "debtor name",
                SchemeName              = "schema",
                SecondaryIdentification = "debtor secondary id"
            };

            ObModels.PaymentInitiation.V3p1p1.Model.OBCashAccountDebtor4 result = _entityMapper.Map <ObModels.PaymentInitiation.V3p1p1.Model.OBCashAccountDebtor4>(value);

            result.Should().NotBeNull();
            result.Identification.Should().Be(value.Identification);
            result.Name.Should().Be(value.Name);
            result.SchemeName.Should().Be(value.SchemeName);
            result.SecondaryIdentification.Should().Be(value.SecondaryIdentification);
        }
        public static DomesticPaymentConsentContext DebtorAccount(
            this DomesticPaymentConsentContext context,
            string identification,
            string schema,
            string name,
            string secondaryId)
        {
            context.ArgNotNull(nameof(context));

            OBWriteDomestic2DataInitiationDebtorAccount acct = context.GetOrCreateDefault(BaseLens)
                                                               .GetOrCreateDefault(DomesticConsentLens)
                                                               .GetOrCreateDefault(DataLens)
                                                               .GetOrCreateDefault(InitiationLens)
                                                               .GetOrCreateDefault(DebtorAccountLens);

            acct.Identification          = identification;
            acct.Name                    = name;
            acct.SchemeName              = schema;
            acct.SecondaryIdentification = secondaryId;

            return(context);
        }