-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
960bfd0
commit 7e48267
Showing
13 changed files
with
174 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
commercetools.Sdk/commercetools.Sdk.Api/Generated/Models/Common/Attribution.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace commercetools.Sdk.Api.Models.Common | ||
{ | ||
|
||
public partial class Attribution : IAttribution | ||
{ | ||
public string ClientId { get; set; } | ||
|
||
public IAttributionSource Source { get; set; } | ||
} | ||
} |
64 changes: 64 additions & 0 deletions
64
commercetools.Sdk/commercetools.Sdk.Api/Generated/Models/Common/AttributionSource.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Linq; | ||
using commercetools.Base.CustomAttributes; | ||
using commercetools.Base.Models; | ||
|
||
// ReSharper disable CheckNamespace | ||
namespace commercetools.Sdk.Api.Models.Common | ||
{ | ||
public enum AttributionSource | ||
{ | ||
[Description("Import")] | ||
Import, | ||
|
||
[Description("Export")] | ||
Export | ||
} | ||
|
||
public class AttributionSourceWrapper : IAttributionSource | ||
{ | ||
public string JsonName { get; internal set; } | ||
public AttributionSource? Value { get; internal set; } | ||
public override string ToString() | ||
{ | ||
return JsonName; | ||
} | ||
|
||
IEnumerator IEnumerable.GetEnumerator() | ||
{ | ||
return GetEnumerator(); | ||
} | ||
|
||
public new IEnumerator<char> GetEnumerator() | ||
{ | ||
return JsonName.GetEnumerator(); | ||
} | ||
} | ||
|
||
[EnumInterfaceCreator(typeof(IAttributionSource), "FindEnum")] | ||
public interface IAttributionSource : IJsonName, IEnumerable<char> | ||
{ | ||
public static IAttributionSource Import = new AttributionSourceWrapper | ||
{ Value = AttributionSource.Import, JsonName = "Import" }; | ||
|
||
public static IAttributionSource Export = new AttributionSourceWrapper | ||
{ Value = AttributionSource.Export, JsonName = "Export" }; | ||
|
||
AttributionSource? Value { get; } | ||
|
||
static IAttributionSource[] Values() | ||
{ | ||
return new[] | ||
{ | ||
Import , | ||
Export | ||
}; | ||
} | ||
static IAttributionSource FindEnum(string value) | ||
{ | ||
return Values().FirstOrDefault(origin => origin.JsonName == value) ?? new AttributionSourceWrapper() { JsonName = value }; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
commercetools.Sdk/commercetools.Sdk.Api/Generated/Models/Common/IAttribution.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using commercetools.Base.CustomAttributes; | ||
|
||
// ReSharper disable CheckNamespace | ||
namespace commercetools.Sdk.Api.Models.Common | ||
{ | ||
[DeserializeAs(typeof(commercetools.Sdk.Api.Models.Common.Attribution))] | ||
public partial interface IAttribution | ||
{ | ||
string ClientId { get; set; } | ||
|
||
IAttributionSource Source { get; set; } | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...Sdk/commercetools.Sdk.Api/Predicates/Query/Generated/Common/AttributionQueryBuilderDsl.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// ReSharper disable CheckNamespace | ||
namespace commercetools.Sdk.Api.Predicates.Query.Common | ||
{ | ||
|
||
public partial class AttributionQueryBuilderDsl | ||
{ | ||
public AttributionQueryBuilderDsl() | ||
{ | ||
} | ||
|
||
public static AttributionQueryBuilderDsl Of() | ||
{ | ||
return new AttributionQueryBuilderDsl(); | ||
} | ||
|
||
public IComparisonPredicateBuilder<AttributionQueryBuilderDsl, string> ClientId() | ||
{ | ||
return new ComparisonPredicateBuilder<AttributionQueryBuilderDsl, string>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("clientId")), | ||
p => new CombinationQueryPredicate<AttributionQueryBuilderDsl>(p, AttributionQueryBuilderDsl.Of), | ||
PredicateFormatter.Format); | ||
} | ||
public IComparisonPredicateBuilder<AttributionQueryBuilderDsl, string> Source() | ||
{ | ||
return new ComparisonPredicateBuilder<AttributionQueryBuilderDsl, string>(BinaryQueryPredicate.Of().Left(new ConstantQueryPredicate("source")), | ||
p => new CombinationQueryPredicate<AttributionQueryBuilderDsl>(p, AttributionQueryBuilderDsl.Of), | ||
PredicateFormatter.Format); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters