-
Notifications
You must be signed in to change notification settings - Fork 17
1.0.4.6 #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
1.0.4.6 #40
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #region License | ||
| // Copyright (c) 2026 1010Tires.com | ||
| // | ||
| // Permission is hereby granted, free of charge, to any person | ||
| // obtaining a copy of this software and associated documentation | ||
| // files (the "Software"), to deal in the Software without | ||
| // restriction, including without limitation the rights to use, | ||
| // copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| // copies of the Software, and to permit persons to whom the | ||
| // Software is furnished to do so, subject to the following | ||
| // conditions: | ||
| // | ||
| // The above copyright notice and this permission notice shall be | ||
| // included in all copies or substantial portions of the Software. | ||
| // | ||
| // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
| // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES | ||
| // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
| // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
| // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, | ||
| // WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
| // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR | ||
| // OTHER DEALINGS IN THE SOFTWARE. | ||
| #endregion | ||
|
|
||
| using Newtonsoft.Json; | ||
|
|
||
| namespace MXTires.Microdata.Intangible | ||
| { | ||
| /// <summary> | ||
| /// A membership program tier, for example a club card tier, frequent flyer tier, etc. | ||
| /// </summary> | ||
| public class MemberProgramTier : Thing | ||
| { | ||
| /// <summary> | ||
| /// Text - A requirement for a user to join a membership tier, for example: a CreditCard if the tier requires sign up for a credit card, | ||
| /// A textual summary of the required threshold or expectations to meet the tier. | ||
| /// </summary> | ||
| /// <value>The tier requirement.</value> | ||
| [JsonProperty("tierRequirement")] | ||
| public string TierRequirement { get; set; } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
| <PropertyGroup> | ||
| <TargetFrameworks>net461;net472;net48;netcoreapp3.1;net5.0;net6.0</TargetFrameworks> | ||
| <Version>1.0.4.5</Version> | ||
| <TargetFrameworks>net461;net472;net48;net6.0;net8.0</TargetFrameworks> | ||
| <Version>1.0.4.6</Version> | ||
|
Comment on lines
+3
to
+4
|
||
| <Authors>1010Tires.com Inc.</Authors> | ||
| <Company>1010Tires.com Inc.</Company> | ||
| <Copyright>Copyright© 1010Tires.com Inc. 2023. All rights reserved.</Copyright> | ||
|
|
@@ -13,8 +13,8 @@ | |
| <SignAssembly>true</SignAssembly> | ||
| <AssemblyOriginatorKeyFile>MXTires.MicroData.snk</AssemblyOriginatorKeyFile> | ||
| <RepositoryUrl>https://github.com/idenys/MXTires.Microdata</RepositoryUrl> | ||
| <AssemblyVersion>1.0.4.5</AssemblyVersion> | ||
| <FileVersion>1.0.4.5</FileVersion> | ||
| <AssemblyVersion>1.0.4.6</AssemblyVersion> | ||
| <FileVersion>1.0.4.6</FileVersion> | ||
| <Title>MXTires.Microdata</Title> | ||
| <PackageReadmeFile>README.md</PackageReadmeFile> | ||
| <LangVersion>latest</LangVersion> | ||
|
|
@@ -38,7 +38,7 @@ | |
| <Compile Remove="Properties\AssemblyInfo.cs" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> | ||
| <PackageReference Include="Newtonsoft.Json" Version="13.0.4" /> | ||
| </ItemGroup> | ||
| <ItemGroup> | ||
| <Folder Include="Properties\" /> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,7 @@ | |
| // OTHER DEALINGS IN THE SOFTWARE. | ||
| #endregion | ||
|
|
||
| using MXTires.Microdata.Intangible; | ||
| using Newtonsoft.Json; | ||
| using System; | ||
|
|
||
|
|
@@ -36,8 +37,22 @@ public class PriceSpecification : Thing | |
|
|
||
| #region Properties | ||
|
|
||
| //eligibleQuantity QuantitativeValue The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. | ||
| //eligibleTransactionVolume PriceSpecification The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. | ||
| /// <summary> | ||
| /// QuantitativeValue - The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. | ||
| /// This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. | ||
| /// </summary> | ||
| /// <value>The eligible quantity.</value> | ||
| [JsonProperty("eligibleQuantity")] | ||
| public QuantitativeValue EligibleQuantity { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// PriceSpecification - The transaction volume, in a monetary unit, for which the offer or price specification is valid, | ||
| /// e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, | ||
| /// or to limit the acceptance of credit cards to purchases to a certain minimal amount. | ||
| /// </summary> | ||
| /// <value>The eligible transaction volume.</value> | ||
| [JsonProperty("eligibleTransactionVolume")] | ||
| public PriceSpecification EligibleTransactionVolume { get; set; } | ||
| /// <summary> | ||
| /// Number The highest price if the price is a range. | ||
| /// </summary> | ||
|
|
@@ -62,7 +77,24 @@ public class PriceSpecification : Thing | |
| /// Text. The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. | ||
| /// </summary> | ||
| /// <value>The price currency.</value> | ||
| [JsonProperty("priceCurrency")] | ||
| public string PriceCurrency { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// Number or QuantitativeValue - The number of membership points earned by the member. | ||
| /// If necessary, the unitText can be used to express the units the points are issued in. (E.g. stars, miles, etc.) | ||
| /// </summary> | ||
| /// <value>The membership points earned.</value> | ||
| [JsonProperty("membershipPointsEarned")] | ||
| public QuantitativeValue MembershipPointsEarned { get; set; } | ||
|
|
||
|
Comment on lines
+83
to
+90
|
||
| /// <summary> | ||
| /// MemberProgramTier - The membership program tier an Offer (or a PriceSpecification, OfferShippingDetails, | ||
| /// or MerchantReturnPolicy under an Offer) is valid for. | ||
| /// </summary> | ||
| /// <value>The eligible member tier.</value> | ||
| [JsonProperty("eligibleMemberTier")] | ||
| public MemberProgramTier EligibleMemberTier { get; set; } | ||
|
|
||
| /// <summary> | ||
| /// The date when the item becomes valid. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,90 +1,22 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| <Project Sdk="Microsoft.NET.Sdk"> | ||
|
|
||
| <PropertyGroup> | ||
| <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
| <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
| <ProjectGuid>{E0A5D9F0-0521-4646-A2B7-C4A34B414F71}</ProjectGuid> | ||
| <OutputType>Library</OutputType> | ||
| <AppDesignerFolder>Properties</AppDesignerFolder> | ||
| <RootNamespace>MXTires.Microdata.Tests</RootNamespace> | ||
| <AssemblyName>MXTires.Microdata.Tests</AssemblyName> | ||
| <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion> | ||
| <FileAlignment>512</FileAlignment> | ||
| <ProjectTypeGuids>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> | ||
| <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> | ||
| <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> | ||
| <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages</ReferencePath> | ||
| <IsCodedUITest>False</IsCodedUITest> | ||
| <TestProjectType>UnitTest</TestProjectType> | ||
| <TargetFrameworkProfile /> | ||
| <TargetFramework>net48</TargetFramework> | ||
| <IsPackable>false</IsPackable> | ||
|
|
||
| <!-- MSTest project behavior --> | ||
| <IsTestProject>true</IsTestProject> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
| <DebugSymbols>true</DebugSymbols> | ||
| <DebugType>full</DebugType> | ||
| <Optimize>false</Optimize> | ||
| <OutputPath>bin\Debug\</OutputPath> | ||
| <DefineConstants>DEBUG;TRACE</DefineConstants> | ||
| <ErrorReport>prompt</ErrorReport> | ||
| <WarningLevel>4</WarningLevel> | ||
| </PropertyGroup> | ||
| <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
| <DebugType>pdbonly</DebugType> | ||
| <Optimize>true</Optimize> | ||
| <OutputPath>bin\Release\</OutputPath> | ||
| <DefineConstants>TRACE</DefineConstants> | ||
| <ErrorReport>prompt</ErrorReport> | ||
| <WarningLevel>4</WarningLevel> | ||
| </PropertyGroup> | ||
| <ItemGroup> | ||
| <Reference Include="System" /> | ||
| </ItemGroup> | ||
| <Choose> | ||
| <When Condition="('$(VisualStudioVersion)' == '10.0' or '$(VisualStudioVersion)' == '') and '$(TargetFrameworkVersion)' == 'v3.5'"> | ||
| <ItemGroup> | ||
| <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" /> | ||
| </ItemGroup> | ||
| </When> | ||
| <Otherwise> | ||
| <ItemGroup> | ||
| <Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" /> | ||
| </ItemGroup> | ||
| </Otherwise> | ||
| </Choose> | ||
|
|
||
| <ItemGroup> | ||
| <Compile Include="DemoTests.cs" /> | ||
| <Compile Include="Properties\AssemblyInfo.cs" /> | ||
| <PackageReference Include="MSTest.TestAdapter" Version="4.0.2" /> | ||
| <PackageReference Include="MSTest.TestFramework" Version="4.0.2" /> | ||
| <PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" /> | ||
| </ItemGroup> | ||
|
|
||
| <ItemGroup> | ||
| <ProjectReference Include="..\MXTires.Microdata.csproj"> | ||
| <Project>{f2a9b387-b954-4895-8ed7-ae95850b1bc1}</Project> | ||
| <Name>MXTires.Microdata</Name> | ||
| </ProjectReference> | ||
| <ProjectReference Include="..\MXTires.Microdata.csproj" /> | ||
| </ItemGroup> | ||
| <Choose> | ||
| <When Condition="'$(VisualStudioVersion)' == '10.0' And '$(IsCodedUITest)' == 'True'"> | ||
| <ItemGroup> | ||
| <Reference Include="Microsoft.VisualStudio.QualityTools.CodedUITestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
| <Private>False</Private> | ||
| </Reference> | ||
| <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
| <Private>False</Private> | ||
| </Reference> | ||
| <Reference Include="Microsoft.VisualStudio.TestTools.UITest.Extension, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
| <Private>False</Private> | ||
| </Reference> | ||
| <Reference Include="Microsoft.VisualStudio.TestTools.UITesting, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> | ||
| <Private>False</Private> | ||
| </Reference> | ||
| </ItemGroup> | ||
| </When> | ||
| </Choose> | ||
| <Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" /> | ||
| <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | ||
| <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | ||
| Other similar extension points exist, see Microsoft.Common.targets. | ||
| <Target Name="BeforeBuild"> | ||
| </Target> | ||
| <Target Name="AfterBuild"> | ||
| </Target> | ||
| --> | ||
|
|
||
| </Project> |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TypeValidatorchecks exact runtime types; allowingtypeof(IList<PriceSpecification>)does not allow aList<PriceSpecification>instance. As written, assigning aList<PriceSpecification>toOffer.PriceSpecificationwill fail validation. Addtypeof(List<PriceSpecification>)(and/or update the validator strategy to use assignability) so common list implementations are accepted.