Beispiel #1
0
 private InvoicePartyInfo(NonNegativeInt?branch = null, TaxpayerIdentificationNumber taxIdentifier = null, string name = null, Address address = null)
 {
     Branch        = branch ?? NonNegativeInt.Zero();
     TaxIdentifier = taxIdentifier.ToOption();
     Name          = name.ToOption();
     Address       = address.ToOption();
 }
Beispiel #2
0
 internal static InvoiceParty CreateInvoiceParty(Country country, string taxNumber, string name = null, Address address = null)
 {
     return(InvoiceParty.Create(
                info: InvoicePartyInfo.Create(NonNegativeInt.Zero(), TaxpayerIdentificationNumber.Create(country, taxNumber).Success.Get(), name, address).Success.Get(),
                country: country
                ).Success.Get());
 }
Beispiel #3
0
 public static ITry <InvoicePartyInfo, INonEmptyEnumerable <Error> > Create(NonNegativeInt?branch = null, TaxpayerIdentificationNumber taxpayerNumber = null, string name = null, Address address = null)
 {
     return(ObjectValidations.NotNull(branch).Map(b => new InvoicePartyInfo(b ?? NonNegativeInt.Zero(), taxpayerNumber, name, address)));
 }