Skip to content

Commit

Permalink
feat: v8 update
Browse files Browse the repository at this point in the history
  • Loading branch information
ksavosteev committed Dec 26, 2024
1 parent 2047b3f commit 82aa158
Show file tree
Hide file tree
Showing 43 changed files with 99 additions and 356 deletions.
6 changes: 4 additions & 2 deletions src/VirtoCommerce.XOrder.Core/Models/ExpOrderAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

namespace VirtoCommerce.XOrder.Core.Models
{
public sealed class ExpOrderAddress
public class ExpOrderAddress
{
public Optional<string> Id { get; set; }
public Optional<string> Key { get; set; }
public Optional<string> City { get; set; }
public Optional<string> CountryCode { get; set; }
Expand All @@ -27,10 +28,11 @@ public sealed class ExpOrderAddress
public Optional<string> OuterId { get; set; }
public Optional<int> AddressType { get; set; }

public Address MapTo(Address address)
public virtual Address MapTo(Address address)
{
address ??= AbstractTypeFactory<Address>.TryCreateInstance();

Optional.SetValue(Id, x => address.Key = x);
Optional.SetValue(Key, x => address.Key = x);
Optional.SetValue(City, x => address.City = x);
Optional.SetValue(CountryCode, x => address.CountryCode = x);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using System.Collections.Generic;
using System.Linq;
using GraphQL.Types;
using GraphQL.Types.Relay;
using VirtoCommerce.Xapi.Core.Infrastructure;
using VirtoCommerce.Xapi.Core.Models.Facets;
using VirtoCommerce.Xapi.Core.Schemas;
using CoreFacets = VirtoCommerce.Xapi.Core.Schemas.Facets;

namespace VirtoCommerce.XOrder.Core.Schemas
{
public class CustomerOrderConnectionType<TNodeType> : ConnectionType<TNodeType, EdgeType<TNodeType>>
public class CustomerOrderConnectionType<TNodeType> : ExtendableConnectionType<TNodeType>
where TNodeType : IGraphType
{
public CustomerOrderConnectionType()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace VirtoCommerce.XOrder.Core.Schemas
{
public class InitializePaymentResultType : ObjectGraphType<InitializePaymentResult>
public class InitializePaymentResultType : ExtendableGraphType<InitializePaymentResult>
{
public InitializePaymentResultType()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using GraphQL.Types;
using VirtoCommerce.Xapi.Core.Schemas;

namespace VirtoCommerce.XOrder.Core.Schemas
{
public class InputAddOrUpdateOrderPaymentType : InputObjectGraphType
public class InputAddOrUpdateOrderPaymentType : ExtendableInputGraphType
{
public InputAddOrUpdateOrderPaymentType()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace VirtoCommerce.XOrder.Core.Schemas
{
public class InputAuthorizePaymentType : InputObjectGraphType
public class InputAuthorizePaymentType : ExtendableInputGraphType
{
public InputAuthorizePaymentType()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using GraphQL.Types;
using VirtoCommerce.Xapi.Core.Schemas;

namespace VirtoCommerce.XOrder.Core.Schemas
{
public class InputChangeOrderStatusType : InputObjectGraphType
public class InputChangeOrderStatusType : ExtendableInputGraphType
{
public InputChangeOrderStatusType()
{
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using GraphQL.Types;
using VirtoCommerce.Xapi.Core.Schemas;

namespace VirtoCommerce.XOrder.Core.Schemas
{
public class InputCreateOrderFromCartType : InputObjectGraphType
public class InputCreateOrderFromCartType : ExtendableInputGraphType
{
public InputCreateOrderFromCartType()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using GraphQL.Types;
using VirtoCommerce.Xapi.Core.Schemas;

namespace VirtoCommerce.XOrder.Core.Schemas
{
public class InputInitializePaymentType : InputObjectGraphType
public class InputInitializePaymentType : ExtendableInputGraphType
{
public InputInitializePaymentType()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
using GraphQL.Types;
using VirtoCommerce.OrdersModule.Core.Model;
using VirtoCommerce.Xapi.Core.Schemas;
using VirtoCommerce.XOrder.Core.Models;

namespace VirtoCommerce.XOrder.Core.Schemas
{
public class InputOrderAddressType : InputObjectGraphType<ExpOrderAddress>
public class InputOrderAddressType : ExtendableInputGraphType<ExpOrderAddress>
{
public InputOrderAddressType()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using GraphQL.Types;
using VirtoCommerce.PaymentModule.Core.Model;
using VirtoCommerce.Xapi.Core.Schemas;

namespace VirtoCommerce.XOrder.Core.Schemas
{
public class InputOrderBankCardInfoType : InputObjectGraphType<BankCardInfo>
public class InputOrderBankCardInfoType : ExtendableInputGraphType<BankCardInfo>
{
public InputOrderBankCardInfoType()
{
Expand Down
19 changes: 0 additions & 19 deletions src/VirtoCommerce.XOrder.Core/Schemas/InputOrderDiscountType.cs

This file was deleted.

60 changes: 0 additions & 60 deletions src/VirtoCommerce.XOrder.Core/Schemas/InputOrderLineItemType.cs

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace VirtoCommerce.XOrder.Core.Schemas
{
public class InputOrderPaymentType : InputObjectGraphType<ExpOrderPayment>
public class InputOrderPaymentType : ExtendableInputGraphType<ExpOrderPayment>
{
public InputOrderPaymentType()
{
Expand Down

This file was deleted.

This file was deleted.

69 changes: 0 additions & 69 deletions src/VirtoCommerce.XOrder.Core/Schemas/InputOrderShipmentType.cs

This file was deleted.

This file was deleted.

Loading

0 comments on commit 82aa158

Please sign in to comment.