-
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.
add json converter for ProductTailoringAttributes
- Loading branch information
Showing
22 changed files
with
961 additions
and
12 deletions.
There are no files selected for viewing
443 changes: 443 additions & 0 deletions
443
...etools.Sdk/Tests/commercetools.Api.Serialization.Tests/ProductTailoringAttributesTests.cs
Large diffs are not rendered by default.
Oops, something went wrong.
149 changes: 149 additions & 0 deletions
149
...ols.Sdk/Tests/commercetools.Api.Serialization.Tests/Resources/ProductTailorings/List.json
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,149 @@ | ||
{ | ||
"id": 1, | ||
"key": "newKey", | ||
"attributes": [ | ||
{ | ||
"name": "text", | ||
"value": "txt" | ||
}, | ||
{ | ||
"name": "ltext", | ||
"value": { | ||
"de": "de-txt", | ||
"en": "en-txt" | ||
} | ||
}, | ||
{ | ||
"name": "enum", | ||
"value": { | ||
"key": "enum-key2", | ||
"label": "enum-label2" | ||
} | ||
}, | ||
{ | ||
"name": "lenum", | ||
"value": { | ||
"key": "lenum-key2", | ||
"label": { | ||
"de": "enum-label2-de", | ||
"en": "enum-label2-en" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "date", | ||
"value": "2021-03-24" | ||
}, | ||
{ | ||
"name": "time", | ||
"value": "13:23:00.000" | ||
}, | ||
{ | ||
"name": "datetime", | ||
"value": "2021-03-24T00:45:00.000Z" | ||
}, | ||
{ | ||
"name": "boolean", | ||
"value": true | ||
}, | ||
{ | ||
"name": "integer", | ||
"value": 12233344 | ||
}, | ||
{ | ||
"name": "double", | ||
"value": 10.2 | ||
}, | ||
{ | ||
"name": "double-zero", | ||
"value": 13.0 | ||
}, | ||
{ | ||
"name": "reference", | ||
"value": { | ||
"typeId": "product", | ||
"id": "b7334b20-c570-4e1d-a71a-35efd1c1c895" | ||
} | ||
}, | ||
{ | ||
"name": "money", | ||
"value": { | ||
"type": "centPrecision", | ||
"currencyCode": "EUR", | ||
"centAmount": 234500, | ||
"fractionDigits": 2 | ||
} | ||
}, | ||
{ | ||
"name": "set-text", | ||
"value": ["foo"] | ||
}, | ||
{ | ||
"name": "set-ltext", | ||
"value": [{ "en": "foo" }] | ||
}, | ||
{ | ||
"name": "set-integer", | ||
"value": [10] | ||
}, | ||
{ | ||
"name": "set-double", | ||
"value": [11.2] | ||
}, | ||
{ | ||
"name": "set-double-zero", | ||
"value": [13.0] | ||
}, | ||
{ | ||
"name": "set-enum", | ||
"value": [{ | ||
"key": "foo", | ||
"label": "foo" | ||
}] | ||
}, | ||
{ | ||
"name": "set-lenum", | ||
"value": [{ | ||
"key": "foo", | ||
"label": { | ||
"en": "foo" | ||
} | ||
}] | ||
}, | ||
{ | ||
"name": "set-money", | ||
"value": [{ | ||
"type": "centPrecision", | ||
"currencyCode": "EUR", | ||
"centAmount": 100 | ||
}] | ||
}, | ||
{ | ||
"name": "set-reference", | ||
"value": [{ | ||
"typeId": "product", | ||
"id": "12345" | ||
}] | ||
}, | ||
{ | ||
"name": "set-date", | ||
"value": ["2020-01-01"] | ||
}, | ||
{ | ||
"name": "set-datetime", | ||
"value": ["2020-01-01T13:15:00.123Z"] | ||
}, | ||
{ | ||
"name": "set-time", | ||
"value": ["13:15:00.123"] | ||
}, | ||
{ | ||
"name": "set-boolean", | ||
"value": [true] | ||
}, | ||
{ | ||
"name": "set-empty", | ||
"value": [] | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
.../commercetools.Api.Serialization.Tests/Resources/ProductTailorings/MixedSetAttribute.json
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 @@ | ||
{ | ||
"id": 1, | ||
"key": "newKey", | ||
"attributes": [ | ||
{ | ||
"name": "set-mixed", | ||
"value": [10, 10.3] | ||
}, | ||
{ | ||
"name": "decimal", | ||
"value": 10.3 | ||
} | ||
] | ||
} |
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
11 changes: 11 additions & 0 deletions
11
...rcetools.Sdk/commercetools.Sdk.Api/Models/ProductTailorings/IProductTailoringAttribute.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,11 @@ | ||
using System; | ||
using commercetools.Base.CustomAttributes; | ||
using commercetools.Sdk.Api.Models.Products; | ||
|
||
// ReSharper disable CheckNamespace | ||
namespace commercetools.Sdk.Api.Models.ProductTailorings | ||
{ | ||
public partial interface IProductTailoringAttribute : IAttribute | ||
{ | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...ercetools.Sdk/commercetools.Sdk.Api/Models/ProductTailorings/ProductTailoringAttribute.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,9 @@ | ||
using commercetools.Sdk.Api.Models.Products; | ||
|
||
namespace commercetools.Sdk.Api.Models.ProductTailorings | ||
{ | ||
|
||
public partial class ProductTailoringAttribute : Attribute | ||
{ | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
commercetools.Sdk/commercetools.Sdk.Api/Models/Products/BooleanAttribute.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
3 changes: 2 additions & 1 deletion
3
commercetools.Sdk/commercetools.Sdk.Api/Models/Products/DecimalAttribute.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
3 changes: 2 additions & 1 deletion
3
commercetools.Sdk/commercetools.Sdk.Api/Models/Products/LocalizedEnumAttribute.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
3 changes: 2 additions & 1 deletion
3
commercetools.Sdk/commercetools.Sdk.Api/Models/Products/LocalizedStringAttribute.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
3 changes: 2 additions & 1 deletion
3
commercetools.Sdk/commercetools.Sdk.Api/Models/Products/LongAttribute.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
3 changes: 2 additions & 1 deletion
3
commercetools.Sdk/commercetools.Sdk.Api/Models/Products/MoneyAttribute.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
3 changes: 2 additions & 1 deletion
3
commercetools.Sdk/commercetools.Sdk.Api/Models/Products/PlainEnumAttribute.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
3 changes: 2 additions & 1 deletion
3
commercetools.Sdk/commercetools.Sdk.Api/Models/Products/ReferenceAttribute.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
3 changes: 2 additions & 1 deletion
3
commercetools.Sdk/commercetools.Sdk.Api/Models/Products/SetAttribute.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
3 changes: 2 additions & 1 deletion
3
commercetools.Sdk/commercetools.Sdk.Api/Models/Products/StringAttribute.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
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
Oops, something went wrong.