public void OBWriteDomesticDataInitiationRemittanceInformation_To_V111()
        {
            OBWriteDomestic2DataInitiationRemittanceInformation value =
                new OBWriteDomestic2DataInitiationRemittanceInformation
            {
                Reference    = "reference",
                Unstructured = "unstructured"
            };

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

            result.Should().NotBeNull();
            result.Reference.Should().Be(value.Reference);
            result.Unstructured.Should().Be(value.Unstructured);
        }
        public static DomesticPaymentConsentContext Remittance(
            this DomesticPaymentConsentContext context,
            OBWriteDomestic2DataInitiationRemittanceInformation value)
        {
            context.ArgNotNull(nameof(context));

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

            return(context);
        }
        public string GetOBWriteDomesticConsent2()
        {
            OBWriteDomestic2DataInitiationInstructedAmount instructedAmount =
                new OBWriteDomestic2DataInitiationInstructedAmount(amount: "50", currency: "GBP");
            OBWriteDomestic2DataInitiationCreditorAccount creditorAccount =
                new OBWriteDomestic2DataInitiationCreditorAccount(
                    schemeName: "IBAN",
                    identification: "BE56456394728288",
                    name: "ACME DIY",
                    secondaryIdentification: "secondary-identif");
            OBWriteDomestic2DataInitiationRemittanceInformation remittanceInformation =
                new OBWriteDomestic2DataInitiationRemittanceInformation(unstructured: "Tools", reference: "Tools");
            OBWriteDomestic2DataInitiation domestic2 = new OBWriteDomestic2DataInitiation(
                instructionIdentification: "instr-identification",
                endToEndIdentification: "e2e-identification",
                localInstrument: null,
                instructedAmount: instructedAmount,
                debtorAccount: null,
                creditorAccount: creditorAccount,
                remittanceInformation: remittanceInformation);
            OBWriteDomesticConsent4Data data = new OBWriteDomesticConsent4Data
            {
                Initiation = domestic2
            };

            OBRisk1DeliveryAddress deliveryAddress = new OBRisk1DeliveryAddress
            {
                StreetName     = "Oxford Street",
                BuildingNumber = "42",
                PostCode       = "SW1 1AA",
                TownName       = "London",
                Country        = "UK"
            };
            OBRisk1 risk = new OBRisk1(
                paymentContextCode: OBRisk1.PaymentContextCodeEnum.EcommerceGoods,
                merchantCategoryCode: null,
                merchantCustomerIdentification: null,
                deliveryAddress: deliveryAddress);

            OBWriteDomesticConsent4 model = new OBWriteDomesticConsent4(data: data, risk: risk);

            return(JsonConvert.SerializeObject(model));
        }