Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CreateStoreRequest" /> class.
 /// </summary>
 /// <param name="Name">Name (required).</param>
 /// <param name="Url">Url (required).</param>
 /// <param name="CountryIsoCodeAlpha3">CountryIsoCodeAlpha3 (required).</param>
 /// <param name="Sectors">Sectors (required).</param>
 public CreateStoreRequest(StoreName Name = default(StoreName), StoreUrl Url = default(StoreUrl), StoreCountryIsoCodeAlpha3 CountryIsoCodeAlpha3 = default(StoreCountryIsoCodeAlpha3), StoreSectors Sectors = default(StoreSectors))
 {
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for CreateStoreRequest and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     // to ensure "Url" is required (not null)
     if (Url == null)
     {
         throw new InvalidDataException("Url is a required property for CreateStoreRequest and cannot be null");
     }
     else
     {
         this.Url = Url;
     }
     // to ensure "CountryIsoCodeAlpha3" is required (not null)
     if (CountryIsoCodeAlpha3 == null)
     {
         throw new InvalidDataException("CountryIsoCodeAlpha3 is a required property for CreateStoreRequest and cannot be null");
     }
     else
     {
         this.CountryIsoCodeAlpha3 = CountryIsoCodeAlpha3;
     }
     // to ensure "Sectors" is required (not null)
     if (Sectors == null)
     {
         throw new InvalidDataException("Sectors is a required property for CreateStoreRequest and cannot be null");
     }
     else
     {
         this.Sectors = Sectors;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="StoreHeader" /> class.
 /// </summary>
 /// <param name="Name">Name (required).</param>
 /// <param name="Url">Url (required).</param>
 /// <param name="CountryIsoCodeAlpha3">CountryIsoCodeAlpha3 (required).</param>
 /// <param name="Sectors">Sectors (required).</param>
 /// <param name="StoreId">StoreId (required).</param>
 /// <param name="UserRole">UserRole (required).</param>
 /// <param name="Status">Status (required).</param>
 /// <param name="OwnerUserId">The user id of the owner of the store (required).</param>
 /// <param name="ShareCount">The share count related to this store (required).</param>
 /// <param name="CreationUtcDate">The creation date of the store (required).</param>
 /// <param name="Links">Links.</param>
 public StoreHeader(StoreName Name = default(StoreName), StoreUrl Url = default(StoreUrl), StoreCountryIsoCodeAlpha3 CountryIsoCodeAlpha3 = default(StoreCountryIsoCodeAlpha3), StoreSectors Sectors = default(StoreSectors), BeezUPCommonStoreId StoreId = default(BeezUPCommonStoreId), StoreUserRole UserRole = default(StoreUserRole), StoreStatus Status = default(StoreStatus), string OwnerUserId = default(string), int?ShareCount = default(int?), DateTime?CreationUtcDate = default(DateTime?), StoreHeaderLinks Links = default(StoreHeaderLinks))
 {
     // to ensure "Name" is required (not null)
     if (Name == null)
     {
         throw new InvalidDataException("Name is a required property for StoreHeader and cannot be null");
     }
     else
     {
         this.Name = Name;
     }
     // to ensure "Url" is required (not null)
     if (Url == null)
     {
         throw new InvalidDataException("Url is a required property for StoreHeader and cannot be null");
     }
     else
     {
         this.Url = Url;
     }
     // to ensure "CountryIsoCodeAlpha3" is required (not null)
     if (CountryIsoCodeAlpha3 == null)
     {
         throw new InvalidDataException("CountryIsoCodeAlpha3 is a required property for StoreHeader and cannot be null");
     }
     else
     {
         this.CountryIsoCodeAlpha3 = CountryIsoCodeAlpha3;
     }
     // to ensure "Sectors" is required (not null)
     if (Sectors == null)
     {
         throw new InvalidDataException("Sectors is a required property for StoreHeader and cannot be null");
     }
     else
     {
         this.Sectors = Sectors;
     }
     // to ensure "StoreId" is required (not null)
     if (StoreId == null)
     {
         throw new InvalidDataException("StoreId is a required property for StoreHeader and cannot be null");
     }
     else
     {
         this.StoreId = StoreId;
     }
     // to ensure "UserRole" is required (not null)
     if (UserRole == null)
     {
         throw new InvalidDataException("UserRole is a required property for StoreHeader and cannot be null");
     }
     else
     {
         this.UserRole = UserRole;
     }
     // to ensure "Status" is required (not null)
     if (Status == null)
     {
         throw new InvalidDataException("Status is a required property for StoreHeader and cannot be null");
     }
     else
     {
         this.Status = Status;
     }
     // to ensure "OwnerUserId" is required (not null)
     if (OwnerUserId == null)
     {
         throw new InvalidDataException("OwnerUserId is a required property for StoreHeader and cannot be null");
     }
     else
     {
         this.OwnerUserId = OwnerUserId;
     }
     // to ensure "ShareCount" is required (not null)
     if (ShareCount == null)
     {
         throw new InvalidDataException("ShareCount is a required property for StoreHeader and cannot be null");
     }
     else
     {
         this.ShareCount = ShareCount;
     }
     // to ensure "CreationUtcDate" is required (not null)
     if (CreationUtcDate == null)
     {
         throw new InvalidDataException("CreationUtcDate is a required property for StoreHeader and cannot be null");
     }
     else
     {
         this.CreationUtcDate = CreationUtcDate;
     }
     this.Links = Links;
 }