Skip to content

Commit

Permalink
Merge pull request #468 from sanctusmob/AddedCustomizationField
Browse files Browse the repository at this point in the history
Added product customization field
  • Loading branch information
EduLeonPavon authored Dec 1, 2023
2 parents 2e753a5 + 0ec69f6 commit 0276cfe
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
51 changes: 51 additions & 0 deletions PrestaSharp/Entities/customization_field.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Bukimedia.PrestaSharp.Entities
{
[XmlType(Namespace = "Bukimedia/PrestaSharp/Entities")]
public class customization_field : PrestaShopEntity, IPrestaShopFactoryEntity
{
public long? id { get; set; }

/// <summary>
/// Required: Yes
/// Description: Product ID
/// </summary>
public long? id_product { get; set; }

/// <summary>
/// Required: Yes
/// Description:
/// For File Value 0
/// For Text Value 1
/// </summary>
public int type { get; set; }

/// <summary>
/// Required: Yes
/// It´s a logical bool.
/// </summary
public int required { get; set; }

/// <summary>
/// Required: No
/// It´s a logical bool.
/// </summary
public int is_module { get; set; }

/// <summary>
/// Required: No
/// It´s a logical bool.
/// </summary
public int is_deleted { get; set; }
public List<PrestaSharp.Entities.AuxEntities.language> name { get; set; }

public customization_field()
{
this.name = new List<AuxEntities.language>();
}
}
}
18 changes: 18 additions & 0 deletions PrestaSharp/Factories/ProductCustomizationFieldFactory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
using Bukimedia.PrestaSharp.Entities;

namespace Bukimedia.PrestaSharp.Factories
{
public class ProductCustomizationFieldFactory : GenericFactory<customization_field>
{
protected override string singularEntityName { get { return "customization_fields"; } }
protected override string pluralEntityName { get { return "product_customization_fields"; } }

public ProductCustomizationFieldFactory(string BaseUrl, string Account, string SecretKey)
: base(BaseUrl, Account, SecretKey)
{
}
}
}

0 comments on commit 0276cfe

Please sign in to comment.