From d52d62e98ec79c09f6c66b5ff48c5fa8151ffb91 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Mon, 2 Oct 2023 19:12:12 +0330 Subject: [PATCH 1/3] Refactor --- .../Database/Contexts/PaymentContext.cs | 17 ++++------- .../{InvoiceEntity.cs => OrderEntity.cs} | 6 ++-- ...yEntity.cs => OrderStatusHistoryEntity.cs} | 6 ++-- ...{InvoiceUrlEntity.cs => OrderUrlEntity.cs} | 6 ++-- .../Database/Entities/ProductEntity.cs | 4 +-- .../Database/Entities/ServiceEntity.cs | 2 +- .../{InvoiceSchema.cs => OrderSchema.cs} | 5 ++-- ...ySchema.cs => OrderStatusHistorySchema.cs} | 4 +-- ...{InvoiceUrlSchema.cs => OrderUrlSchema.cs} | 2 +- .../Database/Schemas/ProductSchema.cs | 3 +- ...vices.PaymentsMicroservice.Database.csproj | 2 +- .../{InvoiceContract.cs => OrderContract.cs} | 4 +-- ...tract.cs => OrderStatusHistoryContract.cs} | 6 ++-- .../Contracts/Common/ProductContract.cs | 4 +-- ...tract.cs => CreateOrderRequestContract.cs} | 4 +-- ...reateOrderStatusHistoryRequestContract.cs} | 6 ++-- .../Requests/CreateProudctRequestContract.cs | 4 +-- ...tract.cs => UpdateOrderRequestContract.cs} | 4 +-- ...pdateOrderStatusHistoryRequestContract.cs} | 6 ++-- .../Requests/UpdateProudctRequestContract.cs | 2 +- ...nvoiceStatusType.cs => OrderStatusType.cs} | 2 +- ...ervices.PaymentsMicroservice.Domain.csproj | 2 +- .../Mappers/CompileTimeClassesMappers.cs | 28 +++++++++---------- ...rvices.PaymentsMicroservice.StartUp.csproj | 2 +- ...services.PaymentsMicroservice.Tests.csproj | 4 +-- ...nvoiceController.cs => OrderController.cs} | 4 +-- ...ler.cs => OrderStatusHistoryController.cs} | 4 +-- .../Controllers/ProductController.cs | 2 +- .../Controllers/ServiceAddressController.cs | 2 +- .../Controllers/ServiceController.cs | 2 +- ...ervices.PaymentsMicroservice.WebApi.csproj | 2 +- .../Program.cs | 7 +---- 32 files changed, 72 insertions(+), 86 deletions(-) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/{InvoiceEntity.cs => OrderEntity.cs} (68%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/{InvoiceStatusHistoryEntity.cs => OrderStatusHistoryEntity.cs} (61%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/{InvoiceUrlEntity.cs => OrderUrlEntity.cs} (55%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/{InvoiceSchema.cs => OrderSchema.cs} (73%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/{InvoiceStatusHistorySchema.cs => OrderStatusHistorySchema.cs} (63%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/{InvoiceUrlSchema.cs => OrderUrlSchema.cs} (76%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/{InvoiceContract.cs => OrderContract.cs} (84%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/{InvoiceStatusHistoryContract.cs => OrderStatusHistoryContract.cs} (74%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/{CreateInvoiceRequestContract.cs => CreateOrderRequestContract.cs} (78%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/{CreateInvoiceStatusHistoryRequestContract.cs => CreateOrderStatusHistoryRequestContract.cs} (66%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/{UpdateInvoiceRequestContract.cs => UpdateOrderRequestContract.cs} (84%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/{UpdateInvoiceStatusHistoryRequestContract.cs => UpdateOrderStatusHistoryRequestContract.cs} (68%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/DataTypes/{InvoiceStatusType.cs => OrderStatusType.cs} (96%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/{InvoiceController.cs => OrderController.cs} (76%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/{InvoiceStatusHistoryController.cs => OrderStatusHistoryController.cs} (71%) diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Contexts/PaymentContext.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Contexts/PaymentContext.cs index 6fd0447..6e1752d 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Contexts/PaymentContext.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Contexts/PaymentContext.cs @@ -8,26 +8,19 @@ namespace EasyMicroservices.PaymentsMicroservice.Database.Contexts { public class PaymentContext : RelationalCoreContext { - readonly IEntityFrameworkCoreDatabaseBuilder _builder; - public PaymentContext(IEntityFrameworkCoreDatabaseBuilder builder) + public PaymentContext(IEntityFrameworkCoreDatabaseBuilder builder) : base(builder) { - _builder = builder; + } - public DbSet Invoices { get; set; } - public DbSet InvoiceUrls { get; set; } - public DbSet InvoiceStatusHistories { get; set; } + public DbSet Orders { get; set; } + public DbSet OrderUrls { get; set; } + public DbSet OrderStatusHistories { get; set; } public DbSet Products { get; set; } public DbSet ServiceAddresses { get; set; } public DbSet Services { get; set; } - protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) - { - _builder?.OnConfiguring(optionsBuilder); - base.OnConfiguring(optionsBuilder); - } - protected override void OnModelCreating(ModelBuilder modelBuilder) { base.AutoModelCreating(modelBuilder); diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/InvoiceEntity.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderEntity.cs similarity index 68% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/InvoiceEntity.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderEntity.cs index 0d83137..223c609 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/InvoiceEntity.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderEntity.cs @@ -5,7 +5,7 @@ namespace EasyMicroservices.PaymentsMicroservice.Database.Entities { - public class InvoiceEntity : InvoiceSchema, IIdSchema + public class OrderEntity : OrderSchema, IIdSchema { public long Id { get; set; } @@ -13,8 +13,8 @@ public class InvoiceEntity : InvoiceSchema, IIdSchema public ServiceEntity Service { get; set; } public ICollection Products { get; set; } - public ICollection InvoiceStatusHistories { get; set; } - public ICollection InvoiceUrls { get; set; } + public ICollection OrderStatusHistories { get; set; } + public ICollection OrderUrls { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/InvoiceStatusHistoryEntity.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderStatusHistoryEntity.cs similarity index 61% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/InvoiceStatusHistoryEntity.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderStatusHistoryEntity.cs index 0ecbd71..4aa9db9 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/InvoiceStatusHistoryEntity.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderStatusHistoryEntity.cs @@ -4,11 +4,11 @@ namespace EasyMicroservices.AuthenticationsMicroservice.Database.Entities { - public class InvoiceStatusHistoryEntity : InvoiceStatusHistorySchema, IIdSchema + public class OrderStatusHistoryEntity : OrderStatusHistorySchema, IIdSchema { public long Id { get; set; } - public long InvoiceId { get; set; } - public InvoiceEntity Invoice { get; set; } + public long OrderId { get; set; } + public OrderEntity Order { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/InvoiceUrlEntity.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderUrlEntity.cs similarity index 55% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/InvoiceUrlEntity.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderUrlEntity.cs index 1fb8fa6..7a972bd 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/InvoiceUrlEntity.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderUrlEntity.cs @@ -2,11 +2,11 @@ namespace EasyMicroservices.PaymentsMicroservice.Database.Entities { - public class InvoiceUrlEntity : InvoiceUrlSchema + public class OrderUrlEntity : OrderUrlSchema { public long Id { get; set; } - public long InvoiceId { get; set; } - public InvoiceEntity Invoice { get; set; } + public long OrderId { get; set; } + public OrderEntity Order { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ProductEntity.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ProductEntity.cs index bb3685f..c2786f0 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ProductEntity.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ProductEntity.cs @@ -8,8 +8,8 @@ public class ProductEntity : ProductSchema, IIdSchema { public long Id { get; set; } - public long InvoiceId { get; set; } - public InvoiceEntity Invoice { get; set; } + public long OrderId { get; set; } + public OrderEntity Order { get; set; } public long? ProductId { get; set; } public ProductEntity Parent { get; set; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ServiceEntity.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ServiceEntity.cs index 4c2da6e..57693f0 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ServiceEntity.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ServiceEntity.cs @@ -9,6 +9,6 @@ public class ServiceEntity : PaymentSchema, IIdSchema public long Id { get; set; } public ICollection ServiceAddresses { get; set; } - public ICollection Invoices { get; set; } + public ICollection Orders { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/InvoiceSchema.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderSchema.cs similarity index 73% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/InvoiceSchema.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderSchema.cs index e97d658..f5b64f1 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/InvoiceSchema.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderSchema.cs @@ -4,12 +4,11 @@ namespace EasyMicroservices.PaymentsMicroservice.Database.Schemas { - public class InvoiceSchema : FullAbilitySchema + public class OrderSchema : FullAbilitySchema { public bool HasCallbackCalledByUser { get; set; } - public InvoiceStatusType Status { get; set; } + public OrderStatusType Status { get; set; } public decimal TotalAmount { get; set; } public CurrencyCodeType CurrencyCode { get; set; } - public string Url { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/InvoiceStatusHistorySchema.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderStatusHistorySchema.cs similarity index 63% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/InvoiceStatusHistorySchema.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderStatusHistorySchema.cs index 653ae08..0a54ab9 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/InvoiceStatusHistorySchema.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderStatusHistorySchema.cs @@ -4,8 +4,8 @@ namespace EasyMicroservices.PaymentsMicroservice.Database.Schemas { - public class InvoiceStatusHistorySchema : FullAbilitySchema + public class OrderStatusHistorySchema : FullAbilitySchema { - public InvoiceStatusType Status { get; set; } + public OrderStatusType Status { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/InvoiceUrlSchema.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderUrlSchema.cs similarity index 76% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/InvoiceUrlSchema.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderUrlSchema.cs index 4919273..4a4e0fa 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/InvoiceUrlSchema.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderUrlSchema.cs @@ -2,7 +2,7 @@ namespace EasyMicroservices.PaymentsMicroservice.Database.Schemas { - public class InvoiceUrlSchema : FullAbilitySchema + public class OrderUrlSchema : FullAbilitySchema { public string Url { get; set; } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/ProductSchema.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/ProductSchema.cs index 552f0d8..8f69fb8 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/ProductSchema.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/ProductSchema.cs @@ -6,7 +6,6 @@ namespace EasyMicroservices.PaymentsMicroservice.Database.Schemas public class ProductSchema : FullAbilitySchema { public string Name { get; set; } - public decimal Amount { get; set; } - public CurrencyCodeType CurrencyCode { get; set; } + public decimal TotalAmount { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/EasyMicroservices.PaymentsMicroservice.Database.csproj b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/EasyMicroservices.PaymentsMicroservice.Database.csproj index a5f7dc5..b006dd3 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/EasyMicroservices.PaymentsMicroservice.Database.csproj +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/EasyMicroservices.PaymentsMicroservice.Database.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/InvoiceContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/OrderContract.cs similarity index 84% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/InvoiceContract.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/OrderContract.cs index 8c2481c..1475c42 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/InvoiceContract.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/OrderContract.cs @@ -8,12 +8,12 @@ namespace EasyMicroservices.PaymentsMicroservice.Contracts.Common { - public class InvoiceContract : IUniqueIdentitySchema, ISoftDeleteSchema, IDateTimeSchema + public class OrderContract : IUniqueIdentitySchema, ISoftDeleteSchema, IDateTimeSchema { public long Id { get; set; } public long ServiceId { get; set; } public string Address { get; set; } - public InvoiceStatusType Status { get; set; } + public OrderStatusType Status { get; set; } public decimal TotalAmount { get; set; } public string Url { get; set; } public string UniqueIdentity { get; set; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/InvoiceStatusHistoryContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/OrderStatusHistoryContract.cs similarity index 74% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/InvoiceStatusHistoryContract.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/OrderStatusHistoryContract.cs index 3dab196..c501a8e 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/InvoiceStatusHistoryContract.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/OrderStatusHistoryContract.cs @@ -8,11 +8,11 @@ namespace EasyMicroservices.PaymentsMicroservice.Contracts.Common { - public class InvoiceStatusHistoryContract : IUniqueIdentitySchema, ISoftDeleteSchema, IDateTimeSchema + public class OrderStatusHistoryContract : IUniqueIdentitySchema, ISoftDeleteSchema, IDateTimeSchema { - public long InvoiceId { get; set; } + public long OrderId { get; set; } public long Id { get; set; } - public InvoiceStatusType Status { get; set; } + public OrderStatusType Status { get; set; } public string UniqueIdentity { get; set; } public DateTime CreationDateTime { get; set; } public DateTime? ModificationDateTime { get; set; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/ProductContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/ProductContract.cs index de68052..13aa9bc 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/ProductContract.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/ProductContract.cs @@ -10,9 +10,9 @@ namespace EasyMicroservices.PaymentsMicroservice.Contracts.Common public class ProductContract : IUniqueIdentitySchema, ISoftDeleteSchema, IDateTimeSchema { public long Id { get; set; } - public long InvoiceId { get; set; } + public long OrderId { get; set; } public string Name { get; set; } - public decimal Amount { get; set; } + public decimal TotalAmount { get; set; } public string UniqueIdentity { get; set; } public DateTime CreationDateTime { get; set; } public DateTime? ModificationDateTime { get; set; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateInvoiceRequestContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateOrderRequestContract.cs similarity index 78% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateInvoiceRequestContract.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateOrderRequestContract.cs index 6ae6f1e..0779743 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateInvoiceRequestContract.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateOrderRequestContract.cs @@ -2,11 +2,11 @@ namespace EasyMicroservices.PaymentsMicroservice.Contracts.Requests { - public class CreateInvoiceRequestContract + public class CreateOrderRequestContract { public long ServiceId { get; set; } public string Address { get; set; } - public InvoiceStatusType Status { get; set; } + public OrderStatusType Status { get; set; } public decimal TotalAmount { get; set; } public string Url { get; set; } public string UniqueIdentity { get; set; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateInvoiceStatusHistoryRequestContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateOrderStatusHistoryRequestContract.cs similarity index 66% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateInvoiceStatusHistoryRequestContract.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateOrderStatusHistoryRequestContract.cs index 18c5c97..f93a296 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateInvoiceStatusHistoryRequestContract.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateOrderStatusHistoryRequestContract.cs @@ -7,10 +7,10 @@ namespace EasyMicroservices.PaymentsMicroservice.Contracts.Requests { - public class CreateInvoiceStatusHistoryRequestContract + public class CreateOrderStatusHistoryRequestContract { - public long InvoiceId { get; set; } - public InvoiceStatusType Status { get; set; } + public long OrderId { get; set; } + public OrderStatusType Status { get; set; } public string UniqueIdentity { get; set; } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateProudctRequestContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateProudctRequestContract.cs index 31863d8..9dfe3cc 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateProudctRequestContract.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateProudctRequestContract.cs @@ -8,9 +8,9 @@ namespace EasyMicroservices.PaymentsMicroservice.Contracts.Requests { public class CreateProudctRequestContract { - public long InvoiceId { get; set; } + public long OrderId { get; set; } public string Name { get; set; } - public decimal Amount { get; set; } + public decimal TotalAmount { get; set; } public string UniqueIdentity { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateInvoiceRequestContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateOrderRequestContract.cs similarity index 84% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateInvoiceRequestContract.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateOrderRequestContract.cs index b8d493b..166f3aa 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateInvoiceRequestContract.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateOrderRequestContract.cs @@ -7,12 +7,12 @@ namespace EasyMicroservices.PaymentsMicroservice.Contracts.Requests { - public class UpdateInvoiceRequestContract + public class UpdateOrderRequestContract { public long Id { get; set; } public long ServiceId { get; set; } public string Address { get; set; } - public InvoiceStatusType Status { get; set; } + public OrderStatusType Status { get; set; } public decimal TotalAmount { get; set; } public string Url { get; set; } public string UniqueIdentity { get; set; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateInvoiceStatusHistoryRequestContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateOrderStatusHistoryRequestContract.cs similarity index 68% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateInvoiceStatusHistoryRequestContract.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateOrderStatusHistoryRequestContract.cs index 9dff2bf..f7303b6 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateInvoiceStatusHistoryRequestContract.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateOrderStatusHistoryRequestContract.cs @@ -7,11 +7,11 @@ namespace EasyMicroservices.PaymentsMicroservice.Contracts.Requests { - public class UpdateInvoiceStatusHistoryRequestContract + public class UpdateOrderStatusHistoryRequestContract { public long Id { get; set; } - public long InvoiceId { get; set; } - public InvoiceStatusType Status { get; set; } + public long OrderId { get; set; } + public OrderStatusType Status { get; set; } public string UniqueIdentity { get; set; } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateProudctRequestContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateProudctRequestContract.cs index 466c055..fdca941 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateProudctRequestContract.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/UpdateProudctRequestContract.cs @@ -9,7 +9,7 @@ namespace EasyMicroservices.PaymentsMicroservice.Contracts.Requests public class UpdateProudctRequestContract { public long Id { get; set; } - public long InvoiceId { get; set; } + public long OrderId { get; set; } public string Name { get; set; } public decimal Amount { get; set; } public string UniqueIdentity { get; set; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/DataTypes/InvoiceStatusType.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/DataTypes/OrderStatusType.cs similarity index 96% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/DataTypes/InvoiceStatusType.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/DataTypes/OrderStatusType.cs index b6531be..1ab3c04 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/DataTypes/InvoiceStatusType.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/DataTypes/OrderStatusType.cs @@ -1,6 +1,6 @@ namespace EasyMicroservices.PaymentsMicroservice.DataTypes { - public enum InvoiceStatusType : byte + public enum OrderStatusType : byte { /// /// value is none, Never use the None to return values diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/EasyMicroservices.PaymentsMicroservice.Domain.csproj b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/EasyMicroservices.PaymentsMicroservice.Domain.csproj index c4138fd..52462f5 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/EasyMicroservices.PaymentsMicroservice.Domain.csproj +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/EasyMicroservices.PaymentsMicroservice.Domain.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Mappers/CompileTimeClassesMappers.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Mappers/CompileTimeClassesMappers.cs index d01cb9d..986e444 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Mappers/CompileTimeClassesMappers.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Mappers/CompileTimeClassesMappers.cs @@ -12,11 +12,11 @@ // { // _mapper = mapper; // } -// public global::EasyMicroservices.PaymentsMicroservice.Database.Entities.InvoiceEntity Map(global::EasyMicroservices.PaymentsMicroservice.Contracts.Common.InvoiceContract fromObject, string uniqueRecordId, string language, object[] parameters) +// public global::EasyMicroservices.PaymentsMicroservice.Database.Entities.OrderEntity Map(global::EasyMicroservices.PaymentsMicroservice.Contracts.Common.OrderContract fromObject, string uniqueRecordId, string language, object[] parameters) // { // if (fromObject == default) // return default; -// var mapped = new global::EasyMicroservices.PaymentsMicroservice.Database.Entities.InvoiceEntity() +// var mapped = new global::EasyMicroservices.PaymentsMicroservice.Database.Entities.OrderEntity() // { // Id = fromObject.Id, // ServiceId = fromObject.ServiceId, @@ -32,11 +32,11 @@ // }; // return mapped; // } -// public global::EasyMicroservices.PaymentsMicroservice.Contracts.Common.InvoiceContract Map(global::EasyMicroservices.PaymentsMicroservice.Database.Entities.InvoiceEntity fromObject, string uniqueRecordId, string language, object[] parameters) +// public global::EasyMicroservices.PaymentsMicroservice.Contracts.Common.OrderContract Map(global::EasyMicroservices.PaymentsMicroservice.Database.Entities.OrderEntity fromObject, string uniqueRecordId, string language, object[] parameters) // { // if (fromObject == default) // return default; -// var mapped = new global::EasyMicroservices.PaymentsMicroservice.Contracts.Common.InvoiceContract() +// var mapped = new global::EasyMicroservices.PaymentsMicroservice.Contracts.Common.OrderContract() // { // Id = fromObject.Id, // ServiceId = fromObject.ServiceId, @@ -52,11 +52,11 @@ // }; // return mapped; // } -// public async Task MapAsync(global::EasyMicroservices.PaymentsMicroservice.Contracts.Common.InvoiceContract fromObject, string uniqueRecordId, string language, object[] parameters) +// public async Task MapAsync(global::EasyMicroservices.PaymentsMicroservice.Contracts.Common.OrderContract fromObject, string uniqueRecordId, string language, object[] parameters) // { // if (fromObject == default) // return default; -// var mapped = new global::EasyMicroservices.PaymentsMicroservice.Database.Entities.InvoiceEntity() +// var mapped = new global::EasyMicroservices.PaymentsMicroservice.Database.Entities.OrderEntity() // { // Id = fromObject.Id, // ServiceId = fromObject.ServiceId, @@ -72,11 +72,11 @@ // }; // return mapped; // } -// public async Task MapAsync(global::EasyMicroservices.PaymentsMicroservice.Database.Entities.InvoiceEntity fromObject, string uniqueRecordId, string language, object[] parameters) +// public async Task MapAsync(global::EasyMicroservices.PaymentsMicroservice.Database.Entities.OrderEntity fromObject, string uniqueRecordId, string language, object[] parameters) // { // if (fromObject == default) // return default; -// var mapped = new global::EasyMicroservices.PaymentsMicroservice.Contracts.Common.InvoiceContract() +// var mapped = new global::EasyMicroservices.PaymentsMicroservice.Contracts.Common.OrderContract() // { // Id = fromObject.Id, // ServiceId = fromObject.ServiceId, @@ -97,17 +97,17 @@ // { // if (fromObject == default) // return default; -// if (fromObject.GetType() == typeof(EasyMicroservices.PaymentsMicroservice.Database.Entities.InvoiceEntity)) -// return Map((EasyMicroservices.PaymentsMicroservice.Database.Entities.InvoiceEntity)fromObject, uniqueRecordId, language, parameters); -// return Map((EasyMicroservices.PaymentsMicroservice.Contracts.Common.InvoiceContract)fromObject, uniqueRecordId, language, parameters); +// if (fromObject.GetType() == typeof(EasyMicroservices.PaymentsMicroservice.Database.Entities.OrderEntity)) +// return Map((EasyMicroservices.PaymentsMicroservice.Database.Entities.OrderEntity)fromObject, uniqueRecordId, language, parameters); +// return Map((EasyMicroservices.PaymentsMicroservice.Contracts.Common.OrderContract)fromObject, uniqueRecordId, language, parameters); // } // public async Task MapObjectAsync(object fromObject, string uniqueRecordId, string language, object[] parameters) // { // if (fromObject == default) // return default; -// if (fromObject.GetType() == typeof(EasyMicroservices.PaymentsMicroservice.Database.Entities.InvoiceEntity)) -// return await MapAsync((EasyMicroservices.PaymentsMicroservice.Database.Entities.InvoiceEntity)fromObject, uniqueRecordId, language, parameters); -// return await MapAsync((EasyMicroservices.PaymentsMicroservice.Contracts.Common.InvoiceContract)fromObject, uniqueRecordId, language, parameters); +// if (fromObject.GetType() == typeof(EasyMicroservices.PaymentsMicroservice.Database.Entities.OrderEntity)) +// return await MapAsync((EasyMicroservices.PaymentsMicroservice.Database.Entities.OrderEntity)fromObject, uniqueRecordId, language, parameters); +// return await MapAsync((EasyMicroservices.PaymentsMicroservice.Contracts.Common.OrderContract)fromObject, uniqueRecordId, language, parameters); // } // } //} \ No newline at end of file diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.StartUp/EasyMicroservices.PaymentsMicroservice.StartUp.csproj b/src/CSharp/EasyMicroservices.PaymentsMicroservice.StartUp/EasyMicroservices.PaymentsMicroservice.StartUp.csproj index 5a516c0..4e2642b 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.StartUp/EasyMicroservices.PaymentsMicroservice.StartUp.csproj +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.StartUp/EasyMicroservices.PaymentsMicroservice.StartUp.csproj @@ -6,7 +6,7 @@ - + diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/EasyMicroservices.PaymentsMicroservice.Tests.csproj b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/EasyMicroservices.PaymentsMicroservice.Tests.csproj index d1b2f80..b7bc6fa 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/EasyMicroservices.PaymentsMicroservice.Tests.csproj +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/EasyMicroservices.PaymentsMicroservice.Tests.csproj @@ -10,8 +10,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/InvoiceController.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/OrderController.cs similarity index 76% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/InvoiceController.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/OrderController.cs index 5800c47..177f80f 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/InvoiceController.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/OrderController.cs @@ -12,10 +12,10 @@ namespace EasyMicroservices.PaymentsMicroservice.WebApi.Controllers { - public class InvoiceController : SimpleQueryServiceController + public class OrderController : SimpleQueryServiceController { private readonly IUnitOfWork _unitOfWork; - public InvoiceController(IUnitOfWork unitOfWork) : base(null) + public OrderController(IUnitOfWork unitOfWork) : base(unitOfWork) { _unitOfWork = unitOfWork; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/InvoiceStatusHistoryController.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/OrderStatusHistoryController.cs similarity index 71% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/InvoiceStatusHistoryController.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/OrderStatusHistoryController.cs index 5ad157e..34f15e8 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/InvoiceStatusHistoryController.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/OrderStatusHistoryController.cs @@ -11,10 +11,10 @@ namespace EasyMicroservices.PaymentsMicroservice.WebApi.Controllers { - public class InvoiceStatusHistoryController : SimpleQueryServiceController + public class OrderStatusHistoryController : SimpleQueryServiceController { private readonly IUnitOfWork _unitOfWork; - public InvoiceStatusHistoryController(IUnitOfWork unitOfWork) : base(null) + public OrderStatusHistoryController(IUnitOfWork unitOfWork) : base(unitOfWork) { _unitOfWork = unitOfWork; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ProductController.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ProductController.cs index bd9356b..e42467f 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ProductController.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ProductController.cs @@ -9,7 +9,7 @@ namespace EasyMicroservices.PaymentsMicroservice.WebApi.Controllers public class ProductController : SimpleQueryServiceController { private readonly IUnitOfWork _unitOfWork; - public ProductController(IUnitOfWork unitOfWork) : base(null) + public ProductController(IUnitOfWork unitOfWork) : base(unitOfWork) { _unitOfWork = unitOfWork; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ServiceAddressController.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ServiceAddressController.cs index 4b937dc..fc7ce3a 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ServiceAddressController.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ServiceAddressController.cs @@ -9,7 +9,7 @@ namespace EasyMicroservices.PaymentsMicroservice.WebApi.Controllers public class ServiceAddressController : SimpleQueryServiceController { private readonly IUnitOfWork _unitOfWork; - public ServiceAddressController(IUnitOfWork unitOfWork) : base(null) + public ServiceAddressController(IUnitOfWork unitOfWork) : base(unitOfWork) { _unitOfWork = unitOfWork; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ServiceController.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ServiceController.cs index 8b3e289..ac8e692 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ServiceController.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/ServiceController.cs @@ -11,7 +11,7 @@ namespace EasyMicroservices.PaymentsMicroservice.WebApi.Controllers public class ServiceController : SimpleQueryServiceController { private readonly IUnitOfWork _unitOfWork; - public ServiceController(IUnitOfWork unitOfWork) : base(null) + public ServiceController(IUnitOfWork unitOfWork) : base(unitOfWork) { _unitOfWork = unitOfWork; } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/EasyMicroservices.PaymentsMicroservice.WebApi.csproj b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/EasyMicroservices.PaymentsMicroservice.WebApi.csproj index 6a567ae..0d44662 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/EasyMicroservices.PaymentsMicroservice.WebApi.csproj +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/EasyMicroservices.PaymentsMicroservice.WebApi.csproj @@ -6,7 +6,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Program.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Program.cs index e6b39ce..63125c1 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Program.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Program.cs @@ -20,14 +20,9 @@ public static async Task Main(string[] args) var app = StartUpExtensions.Create(args); app.Services.Builder(); app.Services.AddScoped((serviceProvider) => new UnitOfWork(serviceProvider)); - app.Services.AddScoped((serviceProvider) => serviceProvider.GetService().GetLongContractLogic()); - app.Services.AddScoped((serviceProvider) => serviceProvider.GetService().GetLongContractLogic()); - app.Services.AddScoped((serviceProvider) => serviceProvider.GetService().GetLongContractLogic()); - app.Services.AddScoped((serviceProvider) => serviceProvider.GetService().GetLongContractLogic()); - app.Services.AddScoped((serviceProvider) => serviceProvider.GetService().GetLongContractLogic()); app.Services.AddTransient(serviceProvider => new PaymentContext(serviceProvider.GetService())); app.Services.AddScoped(serviceProvider => new DatabaseBuilder()); - StartUpExtensions.AddWhiteLabel("Ordering", "RootAddresses:WhiteLabel"); + StartUpExtensions.AddWhiteLabel("Payments", "RootAddresses:WhiteLabel"); var build = await app.Build(); build.MapControllers(); From 11b69b712e45276dd8cd1f88c1649139c184e4a6 Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Tue, 3 Oct 2023 09:07:50 +0330 Subject: [PATCH 2/3] add support for create order --- ...roservices.PaymentsMicroservice.Client.sln | 2 +- ...vices.PaymentsMicroservice.Clients.csproj} | 0 .../Database/Entities/OrderEntity.cs | 5 +- .../Database/Entities/ServiceEntity.cs | 4 +- .../Database/Schemas/OrderSchema.cs | 2 +- .../Database/Schemas/OrderUrlSchema.cs | 2 + .../Database/Schemas/ServiceAddressSchema.cs | 1 + .../{PaymentSchema.cs => ServiceSchema.cs} | 4 +- .../Contracts/Common/OrderUrlContract.cs | 10 +++ .../Requests/CreateOrderRequestContract.cs | 10 ++- .../Responses/CreateOrderResponseContract.cs | 10 +++ .../DataTypes/PaymentServiceType.cs | 35 +++++++++++ ...ervices.PaymentsMicroservice.Domain.csproj | 2 +- ...ervices.PaymentsMicroservice.Logics.csproj | 4 -- .../Helpers/AppUnitOfWork.cs | 43 +++++++++++++ .../Interfaces/IAppUnitOfWork.cs | 15 +++++ .../Logics/OrderLogic.cs | 61 +++++++++++++++++++ .../Validations/ServiceEntityValidation.cs | 19 ++++++ .../DatabaseBuilder.cs | 10 +-- ...services.PaymentsMicroservice.Tests.csproj | 4 ++ .../Orders/OrderTest.cs | 12 ++++ .../TestBase.cs | 36 +++++++++++ .../Controllers/OrderController.cs | 33 +++++++--- .../Program.cs | 22 ++++++- .../appsettings.json | 5 ++ 25 files changed, 320 insertions(+), 31 deletions(-) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/{EasyMicroservices.Payments.Clients.csproj => EasyMicroservices.PaymentsMicroservice.Clients.csproj} (100%) rename src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/{PaymentSchema.cs => ServiceSchema.cs} (57%) create mode 100644 src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/OrderUrlContract.cs create mode 100644 src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Responses/CreateOrderResponseContract.cs create mode 100644 src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/DataTypes/PaymentServiceType.cs create mode 100644 src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Helpers/AppUnitOfWork.cs create mode 100644 src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Interfaces/IAppUnitOfWork.cs create mode 100644 src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Logics/OrderLogic.cs create mode 100644 src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Validations/ServiceEntityValidation.cs create mode 100644 src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/Orders/OrderTest.cs create mode 100644 src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/TestBase.cs diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Client.sln b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Client.sln index 82d511c..c158b1a 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Client.sln +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Client.sln @@ -9,7 +9,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test-Layer", "Test-Layer", EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.PaymentsMicroservice.Clients.Tests", "EasyMicroservices.PaymentsMicroservice.Tests\EasyMicroservices.PaymentsMicroservice.Clients.Tests.csproj", "{3969FAB0-9A48-4516-97DD-C1882DDF1E96}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.Payments.Clients", "EasyMicroservices.PaymentsMicroservice.Clients\EasyMicroservices.Payments.Clients.csproj", "{94B6630B-2C88-4549-B27F-8A32F4D68C86}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EasyMicroservices.PaymentsMicroservice.Clients", "EasyMicroservices.PaymentsMicroservice.Clients\EasyMicroservices.PaymentsMicroservice.Clients.csproj", "{94B6630B-2C88-4549-B27F-8A32F4D68C86}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/EasyMicroservices.Payments.Clients.csproj b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/EasyMicroservices.PaymentsMicroservice.Clients.csproj similarity index 100% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/EasyMicroservices.Payments.Clients.csproj rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/EasyMicroservices.PaymentsMicroservice.Clients.csproj diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderEntity.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderEntity.cs index 223c609..6eb2b7c 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderEntity.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/OrderEntity.cs @@ -13,8 +13,7 @@ public class OrderEntity : OrderSchema, IIdSchema public ServiceEntity Service { get; set; } public ICollection Products { get; set; } - public ICollection OrderStatusHistories { get; set; } - public ICollection OrderUrls { get; set; } + public ICollection StatusHistories { get; set; } + public ICollection Urls { get; set; } } - } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ServiceEntity.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ServiceEntity.cs index 57693f0..352f130 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ServiceEntity.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Entities/ServiceEntity.cs @@ -4,11 +4,11 @@ namespace EasyMicroservices.PaymentsMicroservice.Database.Entities { - public class ServiceEntity : PaymentSchema, IIdSchema + public class ServiceEntity : ServiceSchema, IIdSchema { public long Id { get; set; } - public ICollection ServiceAddresses { get; set; } + public ICollection Addresses { get; set; } public ICollection Orders { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderSchema.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderSchema.cs index f5b64f1..410b295 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderSchema.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderSchema.cs @@ -7,7 +7,7 @@ namespace EasyMicroservices.PaymentsMicroservice.Database.Schemas public class OrderSchema : FullAbilitySchema { public bool HasCallbackCalledByUser { get; set; } - public OrderStatusType Status { get; set; } + public OrderStatusType Status { get; set; } = OrderStatusType.Created; public decimal TotalAmount { get; set; } public CurrencyCodeType CurrencyCode { get; set; } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderUrlSchema.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderUrlSchema.cs index 4a4e0fa..e0ad00e 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderUrlSchema.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/OrderUrlSchema.cs @@ -1,9 +1,11 @@ using EasyMicroservices.Cores.Database.Schemas; +using EasyMicroservices.Payments.DataTypes; namespace EasyMicroservices.PaymentsMicroservice.Database.Schemas { public class OrderUrlSchema : FullAbilitySchema { public string Url { get; set; } + public RequestUrlType Type { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/ServiceAddressSchema.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/ServiceAddressSchema.cs index d1492f5..d56028a 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/ServiceAddressSchema.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/ServiceAddressSchema.cs @@ -5,5 +5,6 @@ namespace EasyMicroservices.PaymentsMicroservice.Database.Schemas public class ServiceAddressSchema : FullAbilitySchema { public string Address { get; set; } + public string ApiKey { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/PaymentSchema.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/ServiceSchema.cs similarity index 57% rename from src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/PaymentSchema.cs rename to src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/ServiceSchema.cs index d814f67..c25bd7c 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/PaymentSchema.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Database/Database/Schemas/ServiceSchema.cs @@ -1,11 +1,13 @@ using EasyMicroservices.Cores.Database.Schemas; +using EasyMicroservices.PaymentsMicroservice.DataTypes; namespace EasyMicroservices.PaymentsMicroservice.Database.Schemas { - public class PaymentSchema : FullAbilitySchema + public class ServiceSchema : FullAbilitySchema { public string Name { get; set; } public string Description { get; set; } + public PaymentServiceType ServiceType { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/OrderUrlContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/OrderUrlContract.cs new file mode 100644 index 0000000..66fe727 --- /dev/null +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Common/OrderUrlContract.cs @@ -0,0 +1,10 @@ +using EasyMicroservices.Payments.DataTypes; + +namespace EasyMicroservices.PaymentsMicroservice.Contracts.Common +{ + public class OrderUrlContract + { + public string Url { get; set; } + public RequestUrlType Type { get; set; } + } +} diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateOrderRequestContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateOrderRequestContract.cs index 0779743..634f663 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateOrderRequestContract.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Requests/CreateOrderRequestContract.cs @@ -1,14 +1,18 @@ -using EasyMicroservices.PaymentsMicroservice.DataTypes; +using EasyMicroservices.Domain.DataTypes; +using EasyMicroservices.PaymentsMicroservice.Contracts.Common; +using EasyMicroservices.PaymentsMicroservice.DataTypes; +using System.Collections.Generic; namespace EasyMicroservices.PaymentsMicroservice.Contracts.Requests { public class CreateOrderRequestContract { + public string Name { get; set; } public long ServiceId { get; set; } public string Address { get; set; } - public OrderStatusType Status { get; set; } public decimal TotalAmount { get; set; } - public string Url { get; set; } + public CurrencyCodeType CurrencyCode { get; set; } + public List Urls { get; set; } public string UniqueIdentity { get; set; } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Responses/CreateOrderResponseContract.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Responses/CreateOrderResponseContract.cs new file mode 100644 index 0000000..9c99c81 --- /dev/null +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/Contracts/Responses/CreateOrderResponseContract.cs @@ -0,0 +1,10 @@ +using System.Collections.Generic; + +namespace EasyMicroservices.PaymentsMicroservice.Contracts.Responses +{ + public class CreateOrderResponseContract + { + public long Id { get; set; } + public List PortalUrls { get; set; } + } +} diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/DataTypes/PaymentServiceType.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/DataTypes/PaymentServiceType.cs new file mode 100644 index 0000000..8547475 --- /dev/null +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/DataTypes/PaymentServiceType.cs @@ -0,0 +1,35 @@ +namespace EasyMicroservices.PaymentsMicroservice.DataTypes +{ + /// + /// + /// + public enum PaymentServiceType : byte + { + /// + /// value is none, Never use the None to return values + /// + None = 0, + /// + /// error value is default + /// + Default = 1, + /// + /// for the filter values from web admin panel you can sent all for types + /// + All = 2, + /// + /// there is other error that is not in the types + /// + Other = 3, + /// + /// the error type is uknown to us + /// + Unknown = 4, + /// + /// there is nothing to show or validate error + /// + Nothing = 5, + PayPal = 6, + Stripe = 7 + } +} diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/EasyMicroservices.PaymentsMicroservice.Domain.csproj b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/EasyMicroservices.PaymentsMicroservice.Domain.csproj index 52462f5..33e3cd5 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/EasyMicroservices.PaymentsMicroservice.Domain.csproj +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Domain/EasyMicroservices.PaymentsMicroservice.Domain.csproj @@ -7,10 +7,10 @@ - + diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/EasyMicroservices.PaymentsMicroservice.Logics.csproj b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/EasyMicroservices.PaymentsMicroservice.Logics.csproj index f1f96d2..037e39c 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/EasyMicroservices.PaymentsMicroservice.Logics.csproj +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/EasyMicroservices.PaymentsMicroservice.Logics.csproj @@ -5,12 +5,8 @@ EasyMicroservices.PaymentsMicroservice - - - - diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Helpers/AppUnitOfWork.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Helpers/AppUnitOfWork.cs new file mode 100644 index 0000000..ffe91e1 --- /dev/null +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Helpers/AppUnitOfWork.cs @@ -0,0 +1,43 @@ +using EasyMicroservices.Cores.AspEntityFrameworkCoreApi; +using EasyMicroservices.Payments.Interfaces; +using EasyMicroservices.Payments.Stripe.Providers; +using EasyMicroservices.PaymentsMicroservice.Database.Entities; +using EasyMicroservices.PaymentsMicroservice.Interfaces; +using EasyMicroservices.PaymentsMicroservice.Validations; +using EasyMicroservices.ServiceContracts; +using Microsoft.EntityFrameworkCore; +using Microsoft.Extensions.Configuration; +using Microsoft.Extensions.DependencyInjection; +using Stripe; +using System; +using System.Linq; +using System.Threading.Tasks; + +namespace EasyMicroservices.PaymentsMicroservice.Helpers +{ + public class AppUnitOfWork : UnitOfWork, IAppUnitOfWork + { + public AppUnitOfWork(IServiceProvider service) : base(service) + { + + } + + public IConfiguration GetConfiguration() + { + return _service.GetService(); + } + + public async Task> GetPayment() + { + var serviceId = await GetReadableOf().Select(x => x.Id).FirstOrDefaultAsync(); + return await GetPayment(serviceId); + } + + public async Task> GetPayment(long serviceId) + { + var service = await GetReadableOf().Include(x => x.Addresses).FirstOrDefaultAsync(x => x.Id == serviceId); + service.Validate(); + return new StripeProvider(service.Addresses.First().ApiKey); + } + } +} diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Interfaces/IAppUnitOfWork.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Interfaces/IAppUnitOfWork.cs new file mode 100644 index 0000000..a5e740d --- /dev/null +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Interfaces/IAppUnitOfWork.cs @@ -0,0 +1,15 @@ +using EasyMicroservices.Cores.AspEntityFrameworkCoreApi.Interfaces; +using EasyMicroservices.Payments.Interfaces; +using EasyMicroservices.ServiceContracts; +using Microsoft.Extensions.Configuration; +using System.Threading.Tasks; + +namespace EasyMicroservices.PaymentsMicroservice.Interfaces +{ + public interface IAppUnitOfWork : IUnitOfWork + { + IConfiguration GetConfiguration(); + Task> GetPayment(); + Task> GetPayment(long serviceId); + } +} diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Logics/OrderLogic.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Logics/OrderLogic.cs new file mode 100644 index 0000000..4da6af5 --- /dev/null +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Logics/OrderLogic.cs @@ -0,0 +1,61 @@ +using EasyMicroservices.Payments.Models; +using EasyMicroservices.PaymentsMicroservice.Contracts.Requests; +using EasyMicroservices.PaymentsMicroservice.Interfaces; +using EasyMicroservices.ServiceContracts; +using Microsoft.Extensions.Configuration; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace EasyMicroservices.PaymentsMicroservice.Logics +{ + public static class OrderLogic + { + public static List GetOrderUrls(IAppUnitOfWork unitOfWork) + { + var config = unitOfWork.GetConfiguration(); + + var successUrl = config.GetValue("PaymentAddresses:SuccessCallbackUrl"); + var cancelUrl = config.GetValue("PaymentAddresses:FailedCallbackUrl"); + return new List() + { + new PaymentUrl() + { + Type = Payments.DataTypes.RequestUrlType.SuccessUrl, + Url = successUrl + }, + new PaymentUrl() + { + Type = Payments.DataTypes.RequestUrlType.CancelUrl, + Url = cancelUrl + } + }; + } + + public static List GetRedirectToPortalUrls(IEnumerable orderUrlIds, IAppUnitOfWork unitOfWork) + { + var config = unitOfWork.GetConfiguration(); + var redirectUrl = config.GetValue("PaymentAddresses:RedirectToPortalUrl"); + return orderUrlIds.Select(x => redirectUrl + $"?{x}").ToList(); + } + + public static async Task> CreateOrder(CreateOrderRequestContract request, IAppUnitOfWork unitOfWork) + { + var paymentProvider = await unitOfWork.GetPayment().AsCheckedResult(); + var createOrderResult = await paymentProvider.CreateOrderAsync(new Payments.Models.Requests.PaymentOrderRequest() + { + Urls = GetOrderUrls(unitOfWork), + Orders = new List() + { + new Payments.Models.PaymentOrder() + { + Name = request.Name, + Amount = request.TotalAmount, + CurrencyCode = request.CurrencyCode, + } + } + }).AsCheckedResult(); + return createOrderResult.Urls; + } + } +} diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Validations/ServiceEntityValidation.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Validations/ServiceEntityValidation.cs new file mode 100644 index 0000000..adca21f --- /dev/null +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Logics/Validations/ServiceEntityValidation.cs @@ -0,0 +1,19 @@ +using EasyMicroservices.PaymentsMicroservice.Database.Entities; +using EasyMicroservices.ServiceContracts; +using Microsoft.IdentityModel.Tokens; +using System.Text; + +namespace EasyMicroservices.PaymentsMicroservice.Validations +{ + public static class ServiceEntityValidation + { + public static MessageContract Validate(this ServiceEntity service) + { + if (service == null) + return (FailedReasonType.NotFound, "No service provider found in ServiceEntity, Please add your service provider!"); + else if (service.Addresses.IsNullOrEmpty()) + return (FailedReasonType.Empty, $"No address found for service provider Id: {service.Id}"); + return true; + } + } +} diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.StartUp/DatabaseBuilder.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.StartUp/DatabaseBuilder.cs index 82cd3bb..5f057cd 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.StartUp/DatabaseBuilder.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.StartUp/DatabaseBuilder.cs @@ -6,14 +6,16 @@ namespace EasyMicroservices.PaymentsMicroservice { public class DatabaseBuilder : IEntityFrameworkCoreDatabaseBuilder { - readonly IConfiguration config = new ConfigurationBuilder() - .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) - .Build(); + readonly IConfiguration _config; + public DatabaseBuilder(IConfiguration config) + { + _config = config; + } public void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { optionsBuilder.UseInMemoryDatabase("PaymentDatabase"); - //optionsBuilder.UseSqlServer(config.GetConnectionString("local")); + //optionsBuilder.UseSqlServer(_config.GetConnectionString("local")); } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/EasyMicroservices.PaymentsMicroservice.Tests.csproj b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/EasyMicroservices.PaymentsMicroservice.Tests.csproj index b7bc6fa..ebfd7ad 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/EasyMicroservices.PaymentsMicroservice.Tests.csproj +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/EasyMicroservices.PaymentsMicroservice.Tests.csproj @@ -23,4 +23,8 @@ + + + + diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/Orders/OrderTest.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/Orders/OrderTest.cs new file mode 100644 index 0000000..830500b --- /dev/null +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/Orders/OrderTest.cs @@ -0,0 +1,12 @@ +namespace EasyMicroservices.PaymentsMicroservice.Tests.Orders +{ + public class OrderTest : TestBase + { + [Theory] + [InlineData("Bag", 1000.0)] + public static Task Createorder(string productName, decimal amount) + { + return Task.CompletedTask; + } + } +} diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/TestBase.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/TestBase.cs new file mode 100644 index 0000000..2847b28 --- /dev/null +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Tests/TestBase.cs @@ -0,0 +1,36 @@ +using EasyMicroservices.PaymentsMicroservice.WebApi.Controllers; +using Microsoft.AspNetCore.Mvc.ApplicationParts; +using Microsoft.Extensions.DependencyInjection; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace EasyMicroservices.PaymentsMicroservice.Tests +{ + public class TestBase + { + static TestBase() + { + StartServer().GetAwaiter().GetResult(); + } + + static bool IsStarted = false; + + static async Task StartServer() + { + if (IsStarted) + return; + IsStarted = true; + _ = Task.Run(async () => + { + await WebApi.Program.Run(null, (s) => + { + s.AddControllers().PartManager.ApplicationParts.Add(new AssemblyPart(typeof(OrderController).Assembly)); + }); + }); + await Task.Delay(2000); + } + } +} diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/OrderController.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/OrderController.cs index 177f80f..74d8909 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/OrderController.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Controllers/OrderController.cs @@ -1,23 +1,40 @@ using EasyMicroservices.Cores.AspCoreApi; -using EasyMicroservices.Cores.AspEntityFrameworkCoreApi.Interfaces; -using EasyMicroservices.Cores.Contracts.Requests; -using EasyMicroservices.Cores.Database.Interfaces; using EasyMicroservices.PaymentsMicroservice.Contracts.Common; using EasyMicroservices.PaymentsMicroservice.Contracts.Requests; -using EasyMicroservices.PaymentsMicroservice.Database.Contexts; +using EasyMicroservices.PaymentsMicroservice.Contracts.Responses; using EasyMicroservices.PaymentsMicroservice.Database.Entities; +using EasyMicroservices.PaymentsMicroservice.Interfaces; +using EasyMicroservices.PaymentsMicroservice.Logics; using EasyMicroservices.ServiceContracts; -using Microsoft.Identity.Client; -using System.Threading; +using Microsoft.AspNetCore.Mvc; namespace EasyMicroservices.PaymentsMicroservice.WebApi.Controllers { public class OrderController : SimpleQueryServiceController { - private readonly IUnitOfWork _unitOfWork; - public OrderController(IUnitOfWork unitOfWork) : base(unitOfWork) + private readonly IAppUnitOfWork _unitOfWork; + public OrderController(IAppUnitOfWork unitOfWork) : base(unitOfWork) { _unitOfWork = unitOfWork; } + + [HttpPost] + public async Task> CreateOrder(CreateOrderRequestContract request, CancellationToken cancellationToken = default) + { + var addedOrderId = await base.Add(request, cancellationToken).AsCheckedResult(); + var urls = await OrderLogic.CreateOrder(request, _unitOfWork); + var getOrder = await base.GetById(addedOrderId, cancellationToken).AsCheckedResult(); + var orderUrls = await _unitOfWork.GetWritableOf().AddBulkAsync(urls.Select(x => new OrderUrlEntity() + { + OrderId = addedOrderId, + Type = x.Type, + Url = x.Url + }), cancellationToken); + return new CreateOrderResponseContract() + { + Id = addedOrderId, + PortalUrls = OrderLogic.GetRedirectToPortalUrls(orderUrls.Select(x => x.Entity.Id), _unitOfWork) + }; + } } } diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Program.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Program.cs index 63125c1..7f828b9 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Program.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/Program.cs @@ -2,10 +2,13 @@ using EasyMicroservices.Cores.AspEntityFrameworkCoreApi; using EasyMicroservices.Cores.AspEntityFrameworkCoreApi.Interfaces; using EasyMicroservices.Cores.Relational.EntityFrameworkCore.Intrerfaces; +using EasyMicroservices.Payments.Interfaces; +using EasyMicroservices.Payments.Stripe.Providers; using EasyMicroservices.PaymentsMicroservice.Contracts.Common; using EasyMicroservices.PaymentsMicroservice.Contracts.Requests; using EasyMicroservices.PaymentsMicroservice.Database.Contexts; using EasyMicroservices.PaymentsMicroservice.Database.Entities; +using EasyMicroservices.PaymentsMicroservice.Helpers; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; using System.Threading.Tasks; @@ -14,16 +17,29 @@ namespace EasyMicroservices.PaymentsMicroservice.WebApi { public class Program { - public static async Task Main(string[] args) + { + var app = CreateBuilder(args); + var build = await app.Build(); + build.MapControllers(); + build.Run(); + } + + static WebApplicationBuilder CreateBuilder(string[] args) { var app = StartUpExtensions.Create(args); app.Services.Builder(); - app.Services.AddScoped((serviceProvider) => new UnitOfWork(serviceProvider)); + app.Services.AddTransient((serviceProvider) => new AppUnitOfWork(serviceProvider)); app.Services.AddTransient(serviceProvider => new PaymentContext(serviceProvider.GetService())); - app.Services.AddScoped(serviceProvider => new DatabaseBuilder()); + app.Services.AddTransient(); StartUpExtensions.AddWhiteLabel("Payments", "RootAddresses:WhiteLabel"); + return app; + } + public static async Task Run(string[] args, Action use) + { + var app = CreateBuilder(args); + use?.Invoke(app.Services); var build = await app.Build(); build.MapControllers(); build.Run(); diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/appsettings.json b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/appsettings.json index e8f9dbc..6e991d3 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/appsettings.json +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.WebApi/appsettings.json @@ -12,5 +12,10 @@ "RootAddresses": { "WhiteLabel": "http://localhost:1041" }, + "PaymentAddresses": { + "SuccessCallbackUrl": "http://localhost/success", + "FailedCallbackUrl": "http://localhost/failed", + "RedirectToPortalUrl": "http://localhost/portal" + }, "Urls": "http://*:1047" } From 961a10856b51aab0ae541062ccdbfcfb8dd5991d Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Tue, 3 Oct 2023 09:57:08 +0330 Subject: [PATCH 3/3] update client --- .../PaymentsGeneratedServices/OpenAPI.cs | 6730 +++++++++++++---- .../OpenAPI.nswag.json | 3502 +++++++-- 2 files changed, 8001 insertions(+), 2231 deletions(-) diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/Connected Services/PaymentsGeneratedServices/OpenAPI.cs b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/Connected Services/PaymentsGeneratedServices/OpenAPI.cs index 0477b78..3a657c4 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/Connected Services/PaymentsGeneratedServices/OpenAPI.cs +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/Connected Services/PaymentsGeneratedServices/OpenAPI.cs @@ -19,13 +19,13 @@ namespace Payments.GeneratedServices using System = global::System; [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceClient + public partial class OrderClient { private string _baseUrl = ""; private System.Net.Http.HttpClient _httpClient; private System.Lazy _settings; - public InvoiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) + public OrderClient(string baseUrl, System.Net.Http.HttpClient httpClient) { BaseUrl = baseUrl; _httpClient = httpClient; @@ -55,18 +55,18 @@ public string BaseUrl /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task AddAsync(InvoiceCreateRequestContract body) + public virtual System.Threading.Tasks.Task CreateOrderAsync(CreateOrderRequestContract body) { - return AddAsync(body, System.Threading.CancellationToken.None); + return CreateOrderAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task AddAsync(InvoiceCreateRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task CreateOrderAsync(CreateOrderRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Invoice/Add"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/CreateOrder"); var client_ = _httpClient; var disposeClient_ = false; @@ -104,7 +104,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -133,18 +133,18 @@ public virtual async System.Threading.Tasks.Task AddAsync( /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateAsync(InvoiceUpdateRequestContract body) + public virtual System.Threading.Tasks.Task AddAsync(CreateOrderRequestContract body) { - return UpdateAsync(body, System.Threading.CancellationToken.None); + return AddAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task UpdateAsync(InvoiceUpdateRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AddAsync(CreateOrderRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Invoice/Update"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/Add"); var client_ = _httpClient; var disposeClient_ = false; @@ -156,7 +156,7 @@ public virtual async System.Threading.Tasks.Task var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -182,7 +182,7 @@ public virtual async System.Threading.Tasks.Task var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -211,18 +211,18 @@ public virtual async System.Threading.Tasks.Task /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task AddBulkAsync(CreateOrderRequestContractCreateBulkRequestContract body) { - return GetByIdAsync(body, System.Threading.CancellationToken.None); + return AddBulkAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AddBulkAsync(CreateOrderRequestContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Invoice/GetById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/AddBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -260,7 +260,7 @@ public virtual async System.Threading.Tasks.Task var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -289,18 +289,18 @@ public virtual async System.Threading.Tasks.Task /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task UpdateAsync(UpdateOrderRequestContract body) { - return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + return UpdateAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateAsync(UpdateOrderRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Invoice/GetByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/Update"); var client_ = _httpClient; var disposeClient_ = false; @@ -312,7 +312,7 @@ public virtual async System.Threading.Tasks.Task var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -338,7 +338,7 @@ public virtual async System.Threading.Tasks.Task var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -367,18 +367,18 @@ public virtual async System.Threading.Tasks.Task /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) + public virtual System.Threading.Tasks.Task UpdateBulkAsync(UpdateOrderRequestContractUpdateBulkRequestContract body) { - return HardDeleteByIdAsync(body, System.Threading.CancellationToken.None); + return UpdateBulkAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateBulkAsync(UpdateOrderRequestContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Invoice/HardDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/UpdateBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -390,7 +390,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteById var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -445,18 +445,18 @@ public virtual async System.Threading.Tasks.Task HardDeleteById /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) { - return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + return HardDeleteByIdAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Invoice/SoftDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/HardDeleteById"); var client_ = _httpClient; var disposeClient_ = false; @@ -523,18 +523,18 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllAsync() + public virtual System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) { - return GetAllAsync(System.Threading.CancellationToken.None); + return HardDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Invoice/GetAll"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/HardDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; @@ -542,7 +542,11 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -597,18 +601,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) { - return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Invoice/GetAllByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/SoftDeleteById"); var client_ = _httpClient; var disposeClient_ = false; @@ -620,7 +624,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -673,158 +677,20 @@ public virtual async System.Threading.Tasks.Task - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[]) value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array) value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceStatusHistoryClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public InvoiceStatusHistoryClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new EasyMicroservices.PaymentsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task AddAsync(InvoiceStatusHistoryCreateRequestContract body) + public virtual System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) { - return AddAsync(body, System.Threading.CancellationToken.None); + return SoftDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task AddAsync(InvoiceStatusHistoryCreateRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/InvoiceStatusHistory/Add"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/SoftDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; @@ -836,7 +702,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("DELETE"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -862,7 +728,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -891,18 +757,18 @@ public virtual async System.Threading.Tasks.Task AddAsync( /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateAsync(InvoiceStatusHistoryUpdateRequestContract body) + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) { - return UpdateAsync(body, System.Threading.CancellationToken.None); + return GetByIdAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task UpdateAsync(InvoiceStatusHistoryUpdateRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/InvoiceStatusHistory/Update"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/GetById"); var client_ = _httpClient; var disposeClient_ = false; @@ -914,7 +780,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -969,18 +835,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) { - return GetByIdAsync(body, System.Threading.CancellationToken.None); + return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/InvoiceStatusHistory/GetById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/GetByUniqueIdentity"); var client_ = _httpClient; var disposeClient_ = false; @@ -1018,7 +884,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1047,18 +913,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) { - return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + return FilterAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/InvoiceStatusHistory/GetByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/Filter"); var client_ = _httpClient; var disposeClient_ = false; @@ -1096,7 +962,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1125,18 +991,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) + public virtual System.Threading.Tasks.Task GetAllAsync() { - return HardDeleteByIdAsync(body, System.Threading.CancellationToken.None); + return GetAllAsync(System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/InvoiceStatusHistory/HardDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/GetAll"); var client_ = _httpClient; var disposeClient_ = false; @@ -1144,11 +1010,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteById { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); - var content_ = new System.Net.Http.StringContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -1174,7 +1036,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteById var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1203,18 +1065,18 @@ public virtual async System.Threading.Tasks.Task HardDeleteById /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) { - return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/InvoiceStatusHistory/SoftDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Order/GetAllByUniqueIdentity"); var client_ = _httpClient; var disposeClient_ = false; @@ -1226,7 +1088,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -1252,7 +1114,7 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1279,179 +1141,27 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById } } - /// Success - /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllAsync() - { - return GetAllAsync(System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Success - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) + protected struct ObjectResponseResult { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/InvoiceStatusHistory/GetAll"); - - var client_ = _httpClient; - var disposeClient_ = false; - try + public ObjectResponseResult(T responseObject, string responseText) { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - request_.Method = new System.Net.Http.HttpMethod("GET"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - - PrepareRequest(client_, request_, urlBuilder_); + this.Object = responseObject; + this.Text = responseText; + } - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + public T Object { get; } - PrepareRequest(client_, request_, url_); + public string Text { get; } + } - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } + public bool ReadResponseAsString { get; set; } - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - /// Success - /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) - { - return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Success - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/InvoiceStatusHistory/GetAllByUniqueIdentity"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); - var content_ = new System.Net.Http.StringContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); - } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - protected struct ObjectResponseResult - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } if (ReadResponseAsString) { @@ -1535,13 +1245,13 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu } [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ProductClient + public partial class OrderStatusHistoryClient { private string _baseUrl = ""; private System.Net.Http.HttpClient _httpClient; private System.Lazy _settings; - public ProductClient(string baseUrl, System.Net.Http.HttpClient httpClient) + public OrderStatusHistoryClient(string baseUrl, System.Net.Http.HttpClient httpClient) { BaseUrl = baseUrl; _httpClient = httpClient; @@ -1571,7 +1281,7 @@ public string BaseUrl /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task AddAsync(ProudctCreateRequestContract body) + public virtual System.Threading.Tasks.Task AddAsync(CreateOrderStatusHistoryRequestContract body) { return AddAsync(body, System.Threading.CancellationToken.None); } @@ -1579,10 +1289,10 @@ public virtual System.Threading.Tasks.Task AddAsync(Proudc /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task AddAsync(ProudctCreateRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AddAsync(CreateOrderStatusHistoryRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/Add"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/Add"); var client_ = _httpClient; var disposeClient_ = false; @@ -1649,18 +1359,18 @@ public virtual async System.Threading.Tasks.Task AddAsync( /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateAsync(ProudctUpdateRequestContract body) + public virtual System.Threading.Tasks.Task AddBulkAsync(CreateOrderStatusHistoryRequestContractCreateBulkRequestContract body) { - return UpdateAsync(body, System.Threading.CancellationToken.None); + return AddBulkAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task UpdateAsync(ProudctUpdateRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AddBulkAsync(CreateOrderStatusHistoryRequestContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/Update"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/AddBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -1672,7 +1382,7 @@ public virtual async System.Threading.Tasks.Task var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -1698,7 +1408,7 @@ public virtual async System.Threading.Tasks.Task var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1727,18 +1437,18 @@ public virtual async System.Threading.Tasks.Task /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task UpdateAsync(UpdateOrderStatusHistoryRequestContract body) { - return GetByIdAsync(body, System.Threading.CancellationToken.None); + return UpdateAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateAsync(UpdateOrderStatusHistoryRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/GetById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/Update"); var client_ = _httpClient; var disposeClient_ = false; @@ -1750,7 +1460,7 @@ public virtual async System.Threading.Tasks.Task var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -1776,7 +1486,7 @@ public virtual async System.Threading.Tasks.Task var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1805,18 +1515,18 @@ public virtual async System.Threading.Tasks.Task /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task UpdateBulkAsync(UpdateOrderStatusHistoryRequestContractUpdateBulkRequestContract body) { - return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + return UpdateBulkAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateBulkAsync(UpdateOrderStatusHistoryRequestContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/GetByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/UpdateBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -1828,7 +1538,7 @@ public virtual async System.Threading.Tasks.Task var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -1854,7 +1564,7 @@ public virtual async System.Threading.Tasks.Task var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1894,7 +1604,7 @@ public virtual System.Threading.Tasks.Task HardDeleteByIdAsync( public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/HardDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/HardDeleteById"); var client_ = _httpClient; var disposeClient_ = false; @@ -1961,18 +1671,18 @@ public virtual async System.Threading.Tasks.Task HardDeleteById /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + public virtual System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) { - return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + return HardDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/SoftDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/HardDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; @@ -2039,18 +1749,18 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllAsync() + public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) { - return GetAllAsync(System.Threading.CancellationToken.None); + return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/GetAll"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/SoftDeleteById"); var client_ = _httpClient; var disposeClient_ = false; @@ -2058,7 +1768,11 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2113,18 +1827,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) { - return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + return SoftDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/GetAllByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/SoftDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; @@ -2136,7 +1850,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2189,173 +1903,35 @@ public virtual async System.Threading.Tasks.Task + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } + return GetByIdAsync(body, System.Threading.CancellationToken.None); } - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/GetById"); - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else + var client_ = _httpClient; + var disposeClient_ = false; + try { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) + using (var request_ = new System.Net.Http.HttpRequestMessage()) { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[]) value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array) value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new EasyMicroservices.PaymentsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - - /// Success - /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) - { - return GetByIdAsync(body, System.Threading.CancellationToken.None); - } - - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Success - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) - { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/GetById"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); - var content_ = new System.Net.Http.StringContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - - PrepareRequest(client_, request_, urlBuilder_); + PrepareRequest(client_, request_, urlBuilder_); var url_ = urlBuilder_.ToString(); request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); @@ -2378,7 +1954,7 @@ public virtual async System.Threading.Tasks.Task var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2407,7 +1983,7 @@ public virtual async System.Threading.Tasks.Task /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) { return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -2415,10 +1991,10 @@ public virtual System.Threading.Tasks.Task GetBy /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/GetByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/GetByUniqueIdentity"); var client_ = _httpClient; var disposeClient_ = false; @@ -2456,7 +2032,7 @@ public virtual async System.Threading.Tasks.Task var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2485,18 +2061,18 @@ public virtual async System.Threading.Tasks.Task /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task AddAsync(ServiceCreateRequestContract body) + public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) { - return AddAsync(body, System.Threading.CancellationToken.None); + return FilterAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task AddAsync(ServiceCreateRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/Add"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/Filter"); var client_ = _httpClient; var disposeClient_ = false; @@ -2534,7 +2110,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2563,18 +2139,18 @@ public virtual async System.Threading.Tasks.Task AddAsync( /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateAsync(ServiceUpdateRequestContract body) + public virtual System.Threading.Tasks.Task GetAllAsync() { - return UpdateAsync(body, System.Threading.CancellationToken.None); + return GetAllAsync(System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task UpdateAsync(ServiceUpdateRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/Update"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/GetAll"); var client_ = _httpClient; var disposeClient_ = false; @@ -2582,11 +2158,7 @@ public virtual async System.Threading.Tasks.Task { using (var request_ = new System.Net.Http.HttpRequestMessage()) { - var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); - var content_ = new System.Net.Http.StringContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Method = new System.Net.Http.HttpMethod("GET"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -2612,7 +2184,7 @@ public virtual async System.Threading.Tasks.Task var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2641,18 +2213,18 @@ public virtual async System.Threading.Tasks.Task /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) { - return HardDeleteByIdAsync(body, System.Threading.CancellationToken.None); + return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/HardDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/OrderStatusHistory/GetAllByUniqueIdentity"); var client_ = _httpClient; var disposeClient_ = false; @@ -2664,7 +2236,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteById var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Method = new System.Net.Http.HttpMethod("POST"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -2690,7 +2262,7 @@ public virtual async System.Threading.Tasks.Task HardDeleteById var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2717,98 +2289,158 @@ public virtual async System.Threading.Tasks.Task HardDeleteById } } - /// Success - /// A server side error occurred. - public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + protected struct ObjectResponseResult { - return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } } - /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. - /// Success - /// A server side error occurred. - public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) { - var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/SoftDeleteById"); + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } - var client_ = _httpClient; - var disposeClient_ = false; - try + if (ReadResponseAsString) { - using (var request_ = new System.Net.Http.HttpRequestMessage()) + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try { - var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); - var content_ = new System.Net.Http.StringContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) { - var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } - ProcessResponse(client_, response_); + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } - var status_ = (int)response_.StatusCode; - if (status_ == 200) - { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); - if (objectResponse_.Object == null) - { - throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); - } - return objectResponse_.Object; - } - else + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + return attribute.Value != null ? attribute.Value : name; } } - finally - { - if (disposeResponse_) - response_.Dispose(); - } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; } } - finally + else if (value is bool) { - if (disposeClient_) - client_.Dispose(); + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); } - } - - /// Success + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ProductClient + { + private string _baseUrl = ""; + private System.Net.Http.HttpClient _httpClient; + private System.Lazy _settings; + + public ProductClient(string baseUrl, System.Net.Http.HttpClient httpClient) + { + BaseUrl = baseUrl; + _httpClient = httpClient; + _settings = new System.Lazy(CreateSerializerSettings); + } + + private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new EasyMicroservices.PaymentsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set { _baseUrl = value; } + } + + public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + + partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllAsync() + public virtual System.Threading.Tasks.Task AddAsync(CreateProudctRequestContract body) { - return GetAllAsync(System.Threading.CancellationToken.None); + return AddAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AddAsync(CreateProudctRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/GetAll"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/Add"); var client_ = _httpClient; var disposeClient_ = false; @@ -2816,7 +2448,11 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2871,18 +2507,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task AddBulkAsync(CreateProudctRequestContractCreateBulkRequestContract body) { - return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + return AddBulkAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task AddBulkAsync(CreateProudctRequestContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/GetAllByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/AddBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -2920,7 +2556,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -2947,158 +2583,20 @@ public virtual async System.Threading.Tasks.Task - { - public ObjectResponseResult(T responseObject, string responseText) - { - this.Object = responseObject; - this.Text = responseText; - } - - public T Object { get; } - - public string Text { get; } - } - - public bool ReadResponseAsString { get; set; } - - protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) - { - if (response == null || response.Content == null) - { - return new ObjectResponseResult(default(T), string.Empty); - } - - if (ReadResponseAsString) - { - var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); - try - { - var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); - return new ObjectResponseResult(typedBody, responseText); - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); - } - } - else - { - try - { - using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) - using (var streamReader = new System.IO.StreamReader(responseStream)) - using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) - { - var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); - var typedBody = serializer.Deserialize(jsonTextReader); - return new ObjectResponseResult(typedBody, string.Empty); - } - } - catch (Newtonsoft.Json.JsonException exception) - { - var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; - throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); - } - } - } - - private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) - { - if (value == null) - { - return ""; - } - - if (value is System.Enum) - { - var name = System.Enum.GetName(value.GetType(), value); - if (name != null) - { - var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); - if (field != null) - { - var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) - as System.Runtime.Serialization.EnumMemberAttribute; - if (attribute != null) - { - return attribute.Value != null ? attribute.Value : name; - } - } - - var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); - return converted == null ? string.Empty : converted; - } - } - else if (value is bool) - { - return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); - } - else if (value is byte[]) - { - return System.Convert.ToBase64String((byte[]) value); - } - else if (value.GetType().IsArray) - { - var array = System.Linq.Enumerable.OfType((System.Array) value); - return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); - } - - var result = System.Convert.ToString(value, cultureInfo); - return result == null ? "" : result; - } - } - - [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceAddressClient - { - private string _baseUrl = ""; - private System.Net.Http.HttpClient _httpClient; - private System.Lazy _settings; - - public ServiceAddressClient(string baseUrl, System.Net.Http.HttpClient httpClient) - { - BaseUrl = baseUrl; - _httpClient = httpClient; - _settings = new System.Lazy(CreateSerializerSettings); - } - - private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() - { - var settings = new EasyMicroservices.PaymentsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); - UpdateJsonSerializerSettings(settings); - return settings; - } - - public string BaseUrl - { - get { return _baseUrl; } - set { _baseUrl = value; } - } - - public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } - - partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); - - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); - partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); - partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); - /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task AddAsync(ServiceAddressCreateRequestContract body) + public virtual System.Threading.Tasks.Task UpdateAsync(UpdateProudctRequestContract body) { - return AddAsync(body, System.Threading.CancellationToken.None); + return UpdateAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task AddAsync(ServiceAddressCreateRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateAsync(UpdateProudctRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/Add"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/Update"); var client_ = _httpClient; var disposeClient_ = false; @@ -3110,7 +2608,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Method = new System.Net.Http.HttpMethod("PUT"); request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); PrepareRequest(client_, request_, urlBuilder_); @@ -3136,7 +2634,7 @@ public virtual async System.Threading.Tasks.Task AddAsync( var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -3165,18 +2663,18 @@ public virtual async System.Threading.Tasks.Task AddAsync( /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task UpdateAsync(ServiceAddressUpdateRequestContract body) + public virtual System.Threading.Tasks.Task UpdateBulkAsync(UpdateProudctRequestContractUpdateBulkRequestContract body) { - return UpdateAsync(body, System.Threading.CancellationToken.None); + return UpdateBulkAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task UpdateAsync(ServiceAddressUpdateRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task UpdateBulkAsync(UpdateProudctRequestContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/Update"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/UpdateBulk"); var client_ = _httpClient; var disposeClient_ = false; @@ -3214,7 +2712,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -3243,18 +2741,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) { - return GetByIdAsync(body, System.Threading.CancellationToken.None); + return HardDeleteByIdAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/GetById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/HardDeleteById"); var client_ = _httpClient; var disposeClient_ = false; @@ -3266,7 +2764,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -3321,18 +2819,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) { - return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + return HardDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/GetByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/HardDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; @@ -3344,7 +2842,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -3399,18 +2897,18 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) + public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) { - return HardDeleteByIdAsync(body, System.Threading.CancellationToken.None); + return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/HardDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/SoftDeleteById"); var client_ = _httpClient; var disposeClient_ = false; @@ -3477,18 +2975,18 @@ public virtual async System.Threading.Tasks.Task HardDeleteById /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + public virtual System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) { - return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + return SoftDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/SoftDeleteById"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/SoftDeleteBulkByIds"); var client_ = _httpClient; var disposeClient_ = false; @@ -3555,18 +3053,252 @@ public virtual async System.Threading.Tasks.Task SoftDeleteById /// Success /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllAsync() + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) { - return GetAllAsync(System.Threading.CancellationToken.None); + return GetByIdAsync(body, System.Threading.CancellationToken.None); } /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/GetAll"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/GetById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + { + return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/GetByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) + { + return FilterAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/Filter"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetAllAsync() + { + return GetAllAsync(System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/GetAll"); var client_ = _httpClient; var disposeClient_ = false; @@ -3600,7 +3332,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -3629,7 +3361,7 @@ public virtual async System.Threading.Tasks.TaskSuccess /// A server side error occurred. - public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) { return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); } @@ -3637,10 +3369,10 @@ public virtual System.Threading.Tasks.TaskA cancellation token that can be used by other objects or threads to receive notice of cancellation. /// Success /// A server side error occurred. - public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) { var urlBuilder_ = new System.Text.StringBuilder(); - urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/GetAllByUniqueIdentity"); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Product/GetAllByUniqueIdentity"); var client_ = _httpClient; var disposeClient_ = false; @@ -3678,7 +3410,7 @@ public virtual async System.Threading.Tasks.Task(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -3808,17 +3540,3347 @@ private string ConvertToString(object value, System.Globalization.CultureInfo cu } } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ErrorContract : System.ComponentModel.INotifyPropertyChanged + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ServiceClient { - private System.Collections.Generic.ICollection _validations; - private FailedReasonType _failedReasonType; - private string _message; - private string _endUserMessage; - private string _details; - private string _stackTrace; - - [Newtonsoft.Json.JsonProperty("validations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + private string _baseUrl = ""; + private System.Net.Http.HttpClient _httpClient; + private System.Lazy _settings; + + public ServiceClient(string baseUrl, System.Net.Http.HttpClient httpClient) + { + BaseUrl = baseUrl; + _httpClient = httpClient; + _settings = new System.Lazy(CreateSerializerSettings); + } + + private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new EasyMicroservices.PaymentsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set { _baseUrl = value; } + } + + public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + + partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task AddAsync(CreateServiceRequestContract body) + { + return AddAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task AddAsync(CreateServiceRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/Add"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task AddBulkAsync(CreateServiceRequestContractCreateBulkRequestContract body) + { + return AddBulkAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task AddBulkAsync(CreateServiceRequestContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/AddBulk"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateAsync(UpdateServiceRequestContract body) + { + return UpdateAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateAsync(UpdateServiceRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/Update"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateBulkAsync(UpdateServiceRequestContractUpdateBulkRequestContract body) + { + return UpdateBulkAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateBulkAsync(UpdateServiceRequestContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/UpdateBulk"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) + { + return HardDeleteByIdAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/HardDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) + { + return HardDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/HardDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + { + return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/SoftDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) + { + return SoftDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/SoftDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + { + return GetByIdAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/GetById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + { + return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/GetByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) + { + return FilterAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/Filter"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetAllAsync() + { + return GetAllAsync(System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/GetAll"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + { + return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Service/GetAllByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + protected struct ObjectResponseResult + { + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } + } + + public bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ServiceAddressClient + { + private string _baseUrl = ""; + private System.Net.Http.HttpClient _httpClient; + private System.Lazy _settings; + + public ServiceAddressClient(string baseUrl, System.Net.Http.HttpClient httpClient) + { + BaseUrl = baseUrl; + _httpClient = httpClient; + _settings = new System.Lazy(CreateSerializerSettings); + } + + private Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new EasyMicroservices.PaymentsMicroservice.Clients.MyJsonSerializerSettings(new Newtonsoft.Json.JsonSerializerSettings { }); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set { _baseUrl = value; } + } + + public Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + + partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task AddAsync(CreateServiceAddressRequestContract body) + { + return AddAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task AddAsync(CreateServiceAddressRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/Add"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task AddBulkAsync(CreateServiceAddressRequestContractCreateBulkRequestContract body) + { + return AddBulkAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task AddBulkAsync(CreateServiceAddressRequestContractCreateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/AddBulk"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateAsync(UpdateServiceAddressRequestContract body) + { + return UpdateAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateAsync(UpdateServiceAddressRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/Update"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateBulkAsync(UpdateServiceAddressRequestContractUpdateBulkRequestContract body) + { + return UpdateBulkAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateBulkAsync(UpdateServiceAddressRequestContractUpdateBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/UpdateBulk"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body) + { + return HardDeleteByIdAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task HardDeleteByIdAsync(Int64DeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/HardDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body) + { + return HardDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task HardDeleteBulkByIdsAsync(Int64DeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/HardDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body) + { + return SoftDeleteByIdAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SoftDeleteByIdAsync(Int64SoftDeleteRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/SoftDeleteById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body) + { + return SoftDeleteBulkByIdsAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task SoftDeleteBulkByIdsAsync(Int64SoftDeleteBulkRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/SoftDeleteBulkByIds"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body) + { + return GetByIdAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetByIdAsync(Int64GetIdRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/GetById"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + { + return GetByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/GetByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task FilterAsync(FilterRequestContract body) + { + return FilterAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task FilterAsync(FilterRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/Filter"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetAllAsync() + { + return GetAllAsync(System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetAllAsync(System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/GetAll"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body) + { + return GetAllByUniqueIdentityAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetAllByUniqueIdentityAsync(GetUniqueIdentityRequestContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/ServiceAddress/GetAllByUniqueIdentity"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + protected struct ObjectResponseResult + { + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } + } + + public bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[]) value); + } + else if (value.GetType().IsArray) + { + var array = System.Linq.Enumerable.OfType((System.Array) value); + return string.Join(",", System.Linq.Enumerable.Select(array, o => ConvertToString(o, cultureInfo))); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateOrderRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _name; + private long _serviceId; + private string _address; + private double _totalAmount; + private CurrencyCodeType _currencyCode; + private System.Collections.Generic.ICollection _urls; + private string _uniqueIdentity; + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name + { + get { return _name; } + + set + { + if (_name != value) + { + _name = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("serviceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long ServiceId + { + get { return _serviceId; } + + set + { + if (_serviceId != value) + { + _serviceId = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address + { + get { return _address; } + + set + { + if (_address != value) + { + _address = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("totalAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TotalAmount + { + get { return _totalAmount; } + + set + { + if (_totalAmount != value) + { + _totalAmount = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("currencyCode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CurrencyCodeType CurrencyCode + { + get { return _currencyCode; } + + set + { + if (_currencyCode != value) + { + _currencyCode = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("urls", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Urls + { + get { return _urls; } + + set + { + if (_urls != value) + { + _urls = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity + { + get { return _uniqueIdentity; } + + set + { + if (_uniqueIdentity != value) + { + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateOrderRequestContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateOrderResponseContract : System.ComponentModel.INotifyPropertyChanged + { + private long _id; + private System.Collections.Generic.ICollection _portalUrls; + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id + { + get { return _id; } + + set + { + if (_id != value) + { + _id = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("portalUrls", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection PortalUrls + { + get { return _portalUrls; } + + set + { + if (_portalUrls != value) + { + _portalUrls = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateOrderResponseContractMessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private CreateOrderResponseContract _result; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } + + set + { + if (_isSuccess != value) + { + _isSuccess = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error + { + get { return _error; } + + set + { + if (_error != value) + { + _error = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public CreateOrderResponseContract Result + { + get { return _result; } + + set + { + if (_result != value) + { + _result = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateOrderStatusHistoryRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _orderId; + private OrderStatusType _status; + private string _uniqueIdentity; + + [Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long OrderId + { + get { return _orderId; } + + set + { + if (_orderId != value) + { + _orderId = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public OrderStatusType Status + { + get { return _status; } + + set + { + if (_status != value) + { + _status = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity + { + get { return _uniqueIdentity; } + + set + { + if (_uniqueIdentity != value) + { + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateOrderStatusHistoryRequestContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateProudctRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _orderId; + private string _name; + private double _totalAmount; + private string _uniqueIdentity; + + [Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long OrderId + { + get { return _orderId; } + + set + { + if (_orderId != value) + { + _orderId = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name + { + get { return _name; } + + set + { + if (_name != value) + { + _name = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("totalAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TotalAmount + { + get { return _totalAmount; } + + set + { + if (_totalAmount != value) + { + _totalAmount = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity + { + get { return _uniqueIdentity; } + + set + { + if (_uniqueIdentity != value) + { + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateProudctRequestContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateServiceAddressRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _serviceId; + private string _address; + private string _uniqueIdentity; + + [Newtonsoft.Json.JsonProperty("serviceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long ServiceId + { + get { return _serviceId; } + + set + { + if (_serviceId != value) + { + _serviceId = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address + { + get { return _address; } + + set + { + if (_address != value) + { + _address = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity + { + get { return _uniqueIdentity; } + + set + { + if (_uniqueIdentity != value) + { + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateServiceAddressRequestContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateServiceRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private string _name; + private string _description; + private string _uniqueIdentity; + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name + { + get { return _name; } + + set + { + if (_name != value) + { + _name = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description + { + get { return _description; } + + set + { + if (_description != value) + { + _description = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity + { + get { return _uniqueIdentity; } + + set + { + if (_uniqueIdentity != value) + { + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class CreateServiceRequestContractCreateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public enum CurrencyCodeType + { + + ALL = 8, + + DZD = 12, + + ARS = 32, + + AUD = 36, + + BSD = 44, + + BHD = 48, + + BDT = 50, + + AMD = 51, + + BBD = 52, + + BMD = 60, + + BTN = 64, + + BOB = 68, + + BWP = 72, + + BZD = 84, + + SBD = 90, + + BND = 96, + + MMK = 104, + + BIF = 108, + + KHR = 116, + + CAD = 124, + + CVE = 132, + + KYD = 136, + + LKR = 144, + + CLP = 152, + + CNY = 156, + + COP = 170, + + KMF = 174, + + CRC = 188, + + HRK = 191, + + CUP = 192, + + CZK = 203, + + DKK = 208, + + DOP = 214, + + SVC = 222, + + ETB = 230, + + ERN = 232, + + FKP = 238, + + FJD = 242, + + DJF = 262, + + GMD = 270, + + GIP = 292, + + GTQ = 320, + + GNF = 324, + + GYD = 328, + + HTG = 332, + + HNL = 340, + + HKD = 344, + + HUF = 348, + + ISK = 352, + + INR = 356, + + IDR = 360, + + IRR = 364, + + IQD = 368, + + ILS = 376, + + JMD = 388, + + JPY = 392, + + KZT = 398, + + JOD = 400, + + KES = 404, + + KPW = 408, + + KRW = 410, + + KWD = 414, + + KGS = 417, + + LAK = 418, + + LBP = 422, + + LSL = 426, + + LRD = 430, + + LYD = 434, + + MOP = 446, + + MWK = 454, + + MYR = 458, + + MVR = 462, + + MUR = 480, + + MXN = 484, + + MNT = 496, + + MDL = 498, + + MAD = 504, + + OMR = 512, + + NAD = 516, + + NPR = 524, + + ANG = 532, + + AWG = 533, + + VUV = 548, + + NZD = 554, + + NIO = 558, + + NGN = 566, + + NOK = 578, + + PKR = 586, + + PAB = 590, + + PGK = 598, + + PYG = 600, + + PEN = 604, + + PHP = 608, + + QAR = 634, + + RUB = 643, + + RWF = 646, + + SHP = 654, + + SAR = 682, + + SCR = 690, + + SLL = 694, + + SGD = 702, + + VND = 704, + + SOS = 706, + + ZAR = 710, + + SSP = 728, + + SZL = 748, + + SEK = 752, + + CHF = 756, + + SYP = 760, + + THB = 764, + + TOP = 776, + + TTD = 780, + + AED = 784, + + TND = 788, + + UGX = 800, + + MKD = 807, + + EGP = 818, + + GBP = 826, + + TZS = 834, + + USD = 840, + + UYU = 858, + + UZS = 860, + + WST = 882, + + YER = 886, + + TWD = 901, + + SLE = 925, + + VED = 926, + + UYW = 927, + + VES = 928, + + MRU = 929, + + STN = 930, + + CUC = 931, + + ZWL = 932, + + BYN = 933, + + TMT = 934, + + GHS = 936, + + SDG = 938, + + UYI = 940, + + RSD = 941, + + MZN = 943, + + AZN = 944, + + RON = 946, + + CHE = 947, + + CHW = 948, + + TRY = 949, + + XAF = 950, + + XCD = 951, + + XOF = 952, + + XPF = 953, + + XBA = 955, + + XBB = 956, + + XBC = 957, + + XBD = 958, + + XAU = 959, + + XDR = 960, + + XAG = 961, + + XPT = 962, + + XTS = 963, + + XPD = 964, + + XUA = 965, + + ZMW = 967, + + SRD = 968, + + MGA = 969, + + COU = 970, + + AFN = 971, + + TJS = 972, + + AOA = 973, + + BGN = 975, + + CDF = 976, + + BAM = 977, + + EUR = 978, + + MXV = 979, + + UAH = 980, + + GEL = 981, + + BOV = 984, + + PLN = 985, + + BRL = 986, + + CLF = 990, + + XSU = 994, + + USN = 997, + + XXX = 999, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ErrorContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _validations; + private FailedReasonType _failedReasonType; + private string _message; + private string _endUserMessage; + private string _details; + private System.Collections.Generic.ICollection _stackTrace; + private System.Collections.Generic.ICollection _children; + private ServiceDetailsContract _serviceDetails; + + [Newtonsoft.Json.JsonProperty("validations", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Validations { get { return _validations; } @@ -3894,7 +6956,7 @@ public string Details } [Newtonsoft.Json.JsonProperty("stackTrace", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string StackTrace + public System.Collections.Generic.ICollection StackTrace { get { return _stackTrace; } @@ -3908,6 +6970,36 @@ public string StackTrace } } + [Newtonsoft.Json.JsonProperty("children", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Children + { + get { return _children; } + + set + { + if (_children != value) + { + _children = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("serviceDetails", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ServiceDetailsContract ServiceDetails + { + get { return _serviceDetails; } + + set + { + if (_serviceDetails != value) + { + _serviceDetails = value; + RaisePropertyChanged(); + } + } + } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) @@ -3940,7 +7032,7 @@ public enum FailedReasonType InternalError = 8, - Dupplicate = 9, + Duplicate = 9, Empty = 10, @@ -3959,142 +7051,212 @@ public enum FailedReasonType } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class GetUniqueIdentityRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class FilterRequestContract : System.ComponentModel.INotifyPropertyChanged { + private bool? _isDeleted; + private System.DateTimeOffset? _fromDeletedDateTime; + private System.DateTimeOffset? _toDeletedDateTime; + private System.DateTimeOffset? _fromCreationDateTime; + private System.DateTimeOffset? _toCreationDateTime; + private System.DateTimeOffset? _fromModificationDateTime; + private System.DateTimeOffset? _toModificationDateTime; private string _uniqueIdentity; + private GetUniqueIdentityType _uniqueIdentityType; + private long? _index; + private long? _length; + private string _sortColumnName; + private bool _isDescending; - [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UniqueIdentity + [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool? IsDeleted { - get { return _uniqueIdentity; } + get { return _isDeleted; } set { - if (_uniqueIdentity != value) + if (_isDeleted != value) { - _uniqueIdentity = value; + _isDeleted = value; RaisePropertyChanged(); } } } - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + [Newtonsoft.Json.JsonProperty("fromDeletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? FromDeletedDateTime { - var handler = PropertyChanged; - if (handler != null) - handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } + get { return _fromDeletedDateTime; } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class Int64DeleteRequestContract : System.ComponentModel.INotifyPropertyChanged - { - private long _id; + set + { + if (_fromDeletedDateTime != value) + { + _fromDeletedDateTime = value; + RaisePropertyChanged(); + } + } + } - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + [Newtonsoft.Json.JsonProperty("toDeletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ToDeletedDateTime { - get { return _id; } + get { return _toDeletedDateTime; } set { - if (_id != value) + if (_toDeletedDateTime != value) { - _id = value; + _toDeletedDateTime = value; RaisePropertyChanged(); } } } - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [Newtonsoft.Json.JsonProperty("fromCreationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? FromCreationDateTime + { + get { return _fromCreationDateTime; } - protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + set + { + if (_fromCreationDateTime != value) + { + _fromCreationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("toCreationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ToCreationDateTime { - var handler = PropertyChanged; - if (handler != null) - handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + get { return _toCreationDateTime; } + + set + { + if (_toCreationDateTime != value) + { + _toCreationDateTime = value; + RaisePropertyChanged(); + } + } } - } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class Int64GetIdRequestContract : System.ComponentModel.INotifyPropertyChanged - { - private long _id; + [Newtonsoft.Json.JsonProperty("fromModificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? FromModificationDateTime + { + get { return _fromModificationDateTime; } - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + set + { + if (_fromModificationDateTime != value) + { + _fromModificationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("toModificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ToModificationDateTime { - get { return _id; } + get { return _toModificationDateTime; } set { - if (_id != value) + if (_toModificationDateTime != value) { - _id = value; + _toModificationDateTime = value; RaisePropertyChanged(); } } } - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity + { + get { return _uniqueIdentity; } - protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + set + { + if (_uniqueIdentity != value) + { + _uniqueIdentity = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("uniqueIdentityType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GetUniqueIdentityType UniqueIdentityType { - var handler = PropertyChanged; - if (handler != null) - handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + get { return _uniqueIdentityType; } + + set + { + if (_uniqueIdentityType != value) + { + _uniqueIdentityType = value; + RaisePropertyChanged(); + } + } } - } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class Int64MessageContract : System.ComponentModel.INotifyPropertyChanged - { - private bool _isSuccess; - private ErrorContract _error; - private long _result; + [Newtonsoft.Json.JsonProperty("index", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Index + { + get { return _index; } - [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsSuccess + set + { + if (_index != value) + { + _index = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long? Length { - get { return _isSuccess; } + get { return _length; } set { - if (_isSuccess != value) + if (_length != value) { - _isSuccess = value; + _length = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ErrorContract Error + [Newtonsoft.Json.JsonProperty("sortColumnName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string SortColumnName { - get { return _error; } + get { return _sortColumnName; } set { - if (_error != value) + if (_sortColumnName != value) { - _error = value; + _sortColumnName = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Result + [Newtonsoft.Json.JsonProperty("isDescending", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDescending { - get { return _result; } + get { return _isDescending; } set { - if (_result != value) + if (_isDescending != value) { - _result = value; + _isDescending = value; RaisePropertyChanged(); } } @@ -4111,36 +7273,36 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class Int64SoftDeleteRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class GetUniqueIdentityRequestContract : System.ComponentModel.INotifyPropertyChanged { - private long _id; - private bool _isDelete; + private string _uniqueIdentity; + private GetUniqueIdentityType _type; - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity { - get { return _id; } + get { return _uniqueIdentity; } set { - if (_id != value) + if (_uniqueIdentity != value) { - _id = value; + _uniqueIdentity = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("isDelete", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsDelete + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public GetUniqueIdentityType Type { - get { return _isDelete; } + get { return _type; } set { - if (_isDelete != value) + if (_type != value) { - _isDelete = value; + _type = value; RaisePropertyChanged(); } } @@ -4157,180 +7319,226 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceContract : System.ComponentModel.INotifyPropertyChanged + public enum GetUniqueIdentityType { - private long _id; - private long _serviceId; - private string _address; - private StatusType _status; - private double _totalAmount; - private string _url; - private string _uniqueIdentity; - private System.DateTimeOffset _creationDateTime; - private System.DateTimeOffset? _modificationDateTime; - private bool _isDeleted; - private System.DateTimeOffset? _deletedDateTime; - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + None = 0, + + Default = 1, + + All = 2, + + Other = 3, + + Unknown = 4, + + Nothing = 5, + + OnlyParent = 6, + + OnlyChilren = 7, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64DeleteBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _ids; + + [Newtonsoft.Json.JsonProperty("ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Ids { - get { return _id; } + get { return _ids; } set { - if (_id != value) + if (_ids != value) { - _id = value; + _ids = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("serviceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long ServiceId - { - get { return _serviceId; } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - set - { - if (_serviceId != value) - { - _serviceId = value; - RaisePropertyChanged(); - } - } + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); } + } - [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Address + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64DeleteRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _id; + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _address; } + get { return _id; } set { - if (_address != value) + if (_id != value) { - _address = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public StatusType Status - { - get { return _status; } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - set - { - if (_status != value) - { - _status = value; - RaisePropertyChanged(); - } - } + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); } + } - [Newtonsoft.Json.JsonProperty("totalAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double TotalAmount + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64GetIdRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _id; + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _totalAmount; } + get { return _id; } set { - if (_totalAmount != value) + if (_id != value) { - _totalAmount = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Url + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _url; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64MessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private long _result; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } set { - if (_url != value) + if (_isSuccess != value) { - _url = value; + _isSuccess = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UniqueIdentity + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error { - get { return _uniqueIdentity; } + get { return _error; } set { - if (_uniqueIdentity != value) + if (_error != value) { - _uniqueIdentity = value; + _error = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("creationDateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset CreationDateTime + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success { - get { return _creationDateTime; } + get { return _success; } set { - if (_creationDateTime != value) + if (_success != value) { - _creationDateTime = value; + _success = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("modificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ModificationDateTime + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Result { - get { return _modificationDateTime; } + get { return _result; } set { - if (_modificationDateTime != value) + if (_result != value) { - _modificationDateTime = value; + _result = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsDeleted + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _isDeleted; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class Int64SoftDeleteBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _ids; + private bool _isDelete; + + [Newtonsoft.Json.JsonProperty("ids", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Ids + { + get { return _ids; } set { - if (_isDeleted != value) + if (_ids != value) { - _isDeleted = value; + _ids = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("deletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DeletedDateTime + [Newtonsoft.Json.JsonProperty("isDelete", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDelete { - get { return _deletedDateTime; } + get { return _isDelete; } set { - if (_deletedDateTime != value) + if (_isDelete != value) { - _deletedDateTime = value; + _isDelete = value; RaisePropertyChanged(); } } @@ -4347,52 +7555,36 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceContractListMessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class Int64SoftDeleteRequestContract : System.ComponentModel.INotifyPropertyChanged { - private bool _isSuccess; - private ErrorContract _error; - private System.Collections.Generic.ICollection _result; - - [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsSuccess - { - get { return _isSuccess; } - - set - { - if (_isSuccess != value) - { - _isSuccess = value; - RaisePropertyChanged(); - } - } - } + private long _id; + private bool _isDelete; - [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ErrorContract Error + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _error; } + get { return _id; } set { - if (_error != value) + if (_id != value) { - _error = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Result + [Newtonsoft.Json.JsonProperty("isDelete", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDelete { - get { return _result; } + get { return _isDelete; } set { - if (_result != value) + if (_isDelete != value) { - _result = value; + _isDelete = value; RaisePropertyChanged(); } } @@ -4409,11 +7601,11 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceContractMessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class MessageContract : System.ComponentModel.INotifyPropertyChanged { private bool _isSuccess; private ErrorContract _error; - private InvoiceContract _result; + private SuccessContract _success; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -4445,16 +7637,16 @@ public ErrorContract Error } } - [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public InvoiceContract Result + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success { - get { return _result; } + get { return _success; } set { - if (_result != value) + if (_success != value) { - _result = value; + _success = value; RaisePropertyChanged(); } } @@ -4471,14 +7663,34 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceCreateRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class OrderContract : System.ComponentModel.INotifyPropertyChanged { + private long _id; private long _serviceId; private string _address; - private StatusType _status; + private OrderStatusType _status; private double _totalAmount; private string _url; private string _uniqueIdentity; + private System.DateTimeOffset _creationDateTime; + private System.DateTimeOffset? _modificationDateTime; + private bool _isDeleted; + private System.DateTimeOffset? _deletedDateTime; + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id + { + get { return _id; } + + set + { + if (_id != value) + { + _id = value; + RaisePropertyChanged(); + } + } + } [Newtonsoft.Json.JsonProperty("serviceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public long ServiceId @@ -4511,7 +7723,7 @@ public string Address } [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public StatusType Status + public OrderStatusType Status { get { return _status; } @@ -4532,106 +7744,24 @@ public double TotalAmount set { - if (_totalAmount != value) - { - _totalAmount = value; - RaisePropertyChanged(); - } - } - } - - [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Url - { - get { return _url; } - - set - { - if (_url != value) - { - _url = value; - RaisePropertyChanged(); - } - } - } - - [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UniqueIdentity - { - get { return _uniqueIdentity; } - - set - { - if (_uniqueIdentity != value) - { - _uniqueIdentity = value; - RaisePropertyChanged(); - } - } - } - - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) - { - var handler = PropertyChanged; - if (handler != null) - handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceStatusHistoryContract : System.ComponentModel.INotifyPropertyChanged - { - private long _invoiceId; - private long _id; - private StatusType _status; - private string _uniqueIdentity; - private System.DateTimeOffset _creationDateTime; - private System.DateTimeOffset? _modificationDateTime; - private bool _isDeleted; - private System.DateTimeOffset? _deletedDateTime; - - [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long InvoiceId - { - get { return _invoiceId; } - - set - { - if (_invoiceId != value) - { - _invoiceId = value; - RaisePropertyChanged(); - } - } - } - - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id - { - get { return _id; } - - set - { - if (_id != value) + if (_totalAmount != value) { - _id = value; + _totalAmount = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public StatusType Status + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { - get { return _status; } + get { return _url; } set { - if (_status != value) + if (_url != value) { - _status = value; + _url = value; RaisePropertyChanged(); } } @@ -4723,11 +7853,13 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceStatusHistoryContractListMessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class OrderContractListMessageContract : System.ComponentModel.INotifyPropertyChanged { private bool _isSuccess; private ErrorContract _error; - private System.Collections.Generic.ICollection _result; + private SuccessContract _success; + private System.Collections.Generic.ICollection _result; + private bool _hasItems; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -4759,8 +7891,23 @@ public ErrorContract Error } } + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Result + public System.Collections.Generic.ICollection Result { get { return _result; } @@ -4774,6 +7921,21 @@ public System.Collections.Generic.ICollection Resu } } + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasItems + { + get { return _hasItems; } + + set + { + if (_hasItems != value) + { + _hasItems = value; + RaisePropertyChanged(); + } + } + } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) @@ -4785,11 +7947,12 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceStatusHistoryContractMessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class OrderContractMessageContract : System.ComponentModel.INotifyPropertyChanged { private bool _isSuccess; private ErrorContract _error; - private InvoiceStatusHistoryContract _result; + private SuccessContract _success; + private OrderContract _result; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -4821,8 +7984,23 @@ public ErrorContract Error } } + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public InvoiceStatusHistoryContract Result + public OrderContract Result { get { return _result; } @@ -4847,29 +8025,49 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceStatusHistoryCreateRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class OrderStatusHistoryContract : System.ComponentModel.INotifyPropertyChanged { - private long _invoiceId; - private StatusType _status; + private long _orderId; + private long _id; + private OrderStatusType _status; private string _uniqueIdentity; + private System.DateTimeOffset _creationDateTime; + private System.DateTimeOffset? _modificationDateTime; + private bool _isDeleted; + private System.DateTimeOffset? _deletedDateTime; - [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long InvoiceId + [Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long OrderId { - get { return _invoiceId; } + get { return _orderId; } set { - if (_invoiceId != value) + if (_orderId != value) { - _invoiceId = value; + _orderId = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id + { + get { return _id; } + + set + { + if (_id != value) + { + _id = value; RaisePropertyChanged(); } } } [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public StatusType Status + public OrderStatusType Status { get { return _status; } @@ -4898,79 +8096,61 @@ public string UniqueIdentity } } - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) - { - var handler = PropertyChanged; - if (handler != null) - handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceStatusHistoryUpdateRequestContract : System.ComponentModel.INotifyPropertyChanged - { - private long _id; - private long _invoiceId; - private StatusType _status; - private string _uniqueIdentity; - - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + [Newtonsoft.Json.JsonProperty("creationDateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset CreationDateTime { - get { return _id; } + get { return _creationDateTime; } set { - if (_id != value) + if (_creationDateTime != value) { - _id = value; + _creationDateTime = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long InvoiceId + [Newtonsoft.Json.JsonProperty("modificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ModificationDateTime { - get { return _invoiceId; } + get { return _modificationDateTime; } set { - if (_invoiceId != value) + if (_modificationDateTime != value) { - _invoiceId = value; + _modificationDateTime = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public StatusType Status + [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDeleted { - get { return _status; } + get { return _isDeleted; } set { - if (_status != value) + if (_isDeleted != value) { - _status = value; + _isDeleted = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UniqueIdentity + [Newtonsoft.Json.JsonProperty("deletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? DeletedDateTime { - get { return _uniqueIdentity; } + get { return _deletedDateTime; } set { - if (_uniqueIdentity != value) + if (_deletedDateTime != value) { - _uniqueIdentity = value; + _deletedDateTime = value; RaisePropertyChanged(); } } @@ -4987,116 +8167,162 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class InvoiceUpdateRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class OrderStatusHistoryContractListMessageContract : System.ComponentModel.INotifyPropertyChanged { - private long _id; - private long _serviceId; - private string _address; - private StatusType _status; - private double _totalAmount; - private string _url; - private string _uniqueIdentity; + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private System.Collections.Generic.ICollection _result; + private bool _hasItems; - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess { - get { return _id; } + get { return _isSuccess; } set { - if (_id != value) + if (_isSuccess != value) { - _id = value; + _isSuccess = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("serviceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long ServiceId + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error { - get { return _serviceId; } + get { return _error; } set { - if (_serviceId != value) + if (_error != value) { - _serviceId = value; + _error = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Address + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success { - get { return _address; } + get { return _success; } set { - if (_address != value) + if (_success != value) { - _address = value; + _success = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public StatusType Status + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Result { - get { return _status; } + get { return _result; } set { - if (_status != value) + if (_result != value) { - _status = value; + _result = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("totalAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double TotalAmount + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasItems { - get { return _totalAmount; } + get { return _hasItems; } set { - if (_totalAmount != value) + if (_hasItems != value) { - _totalAmount = value; + _hasItems = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Url + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _url; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class OrderStatusHistoryContractMessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private OrderStatusHistoryContract _result; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess + { + get { return _isSuccess; } set { - if (_url != value) + if (_isSuccess != value) { - _url = value; + _isSuccess = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UniqueIdentity + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error { - get { return _uniqueIdentity; } + get { return _error; } set { - if (_uniqueIdentity != value) + if (_error != value) { - _uniqueIdentity = value; + _error = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public OrderStatusHistoryContract Result + { + get { return _result; } + + set + { + if (_result != value) + { + _result = value; RaisePropertyChanged(); } } @@ -5104,45 +8330,79 @@ public string UniqueIdentity public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) - { - var handler = PropertyChanged; - if (handler != null) - handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public enum OrderStatusType + { + + None = 0, + + Default = 1, + + All = 2, + + Other = 3, + + Unknown = 4, + + Nothing = 5, + + Created = 6, + + RedirectedToBankPortal = 7, + + Paied = 8, + + Canceled = 9, + + Failed = 10, + + Successful = 11, + + Closed = 12, + + PaidBack = 13, + } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class MessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class OrderUrlContract : System.ComponentModel.INotifyPropertyChanged { - private bool _isSuccess; - private ErrorContract _error; + private string _url; + private RequestUrlType _type; - [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsSuccess + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url { - get { return _isSuccess; } + get { return _url; } set { - if (_isSuccess != value) + if (_url != value) { - _isSuccess = value; + _url = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ErrorContract Error + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public RequestUrlType Type { - get { return _error; } + get { return _type; } set { - if (_error != value) + if (_type != value) { - _error = value; + _type = value; RaisePropertyChanged(); } } @@ -5162,9 +8422,9 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal public partial class ProductContract : System.ComponentModel.INotifyPropertyChanged { private long _id; - private long _invoiceId; + private long _orderId; private string _name; - private double _amount; + private double _totalAmount; private string _uniqueIdentity; private System.DateTimeOffset _creationDateTime; private System.DateTimeOffset? _modificationDateTime; @@ -5186,16 +8446,16 @@ public long Id } } - [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long InvoiceId + [Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long OrderId { - get { return _invoiceId; } + get { return _orderId; } set { - if (_invoiceId != value) + if (_orderId != value) { - _invoiceId = value; + _orderId = value; RaisePropertyChanged(); } } @@ -5216,16 +8476,16 @@ public string Name } } - [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Amount + [Newtonsoft.Json.JsonProperty("totalAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TotalAmount { - get { return _amount; } + get { return _totalAmount; } set { - if (_amount != value) + if (_totalAmount != value) { - _amount = value; + _totalAmount = value; RaisePropertyChanged(); } } @@ -5321,7 +8581,9 @@ public partial class ProductContractListMessageContract : System.ComponentModel. { private bool _isSuccess; private ErrorContract _error; + private SuccessContract _success; private System.Collections.Generic.ICollection _result; + private bool _hasItems; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -5353,6 +8615,21 @@ public ErrorContract Error } } + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public System.Collections.Generic.ICollection Result { @@ -5368,6 +8645,21 @@ public System.Collections.Generic.ICollection Result } } + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasItems + { + get { return _hasItems; } + + set + { + if (_hasItems != value) + { + _hasItems = value; + RaisePropertyChanged(); + } + } + } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) @@ -5383,6 +8675,7 @@ public partial class ProductContractMessageContract : System.ComponentModel.INot { private bool _isSuccess; private ErrorContract _error; + private SuccessContract _success; private ProductContract _result; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -5415,6 +8708,21 @@ public ErrorContract Error } } + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public ProductContract Result { @@ -5441,53 +8749,81 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ProudctCreateRequestContract : System.ComponentModel.INotifyPropertyChanged + public enum RequestUrlType { - private long _invoiceId; - private string _name; - private double _amount; + + None = 0, + + Default = 1, + + All = 2, + + Other = 3, + + Unknown = 4, + + Nothing = 5, + + SuccessUrl = 6, + + CancelUrl = 7, + + RedirectUrl = 8, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ServiceAddressContract : System.ComponentModel.INotifyPropertyChanged + { + private long _serviceId; + private long _id; + private string _address; private string _uniqueIdentity; + private System.DateTimeOffset _creationDateTime; + private System.DateTimeOffset? _modificationDateTime; + private bool _isDeleted; + private System.DateTimeOffset? _deletedDateTime; - [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long InvoiceId + [Newtonsoft.Json.JsonProperty("serviceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long ServiceId { - get { return _invoiceId; } + get { return _serviceId; } set { - if (_invoiceId != value) + if (_serviceId != value) { - _invoiceId = value; + _serviceId = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _name; } + get { return _id; } set { - if (_name != value) + if (_id != value) { - _name = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Amount + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address { - get { return _amount; } + get { return _address; } set { - if (_amount != value) + if (_address != value) { - _amount = value; + _address = value; RaisePropertyChanged(); } } @@ -5508,6 +8844,66 @@ public string UniqueIdentity } } + [Newtonsoft.Json.JsonProperty("creationDateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset CreationDateTime + { + get { return _creationDateTime; } + + set + { + if (_creationDateTime != value) + { + _creationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("modificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? ModificationDateTime + { + get { return _modificationDateTime; } + + set + { + if (_modificationDateTime != value) + { + _modificationDateTime = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsDeleted + { + get { return _isDeleted; } + + set + { + if (_isDeleted != value) + { + _isDeleted = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("deletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? DeletedDateTime + { + get { return _deletedDateTime; } + + set + { + if (_deletedDateTime != value) + { + _deletedDateTime = value; + RaisePropertyChanged(); + } + } + } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) @@ -5519,84 +8915,162 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ProudctUpdateRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class ServiceAddressContractListMessageContract : System.ComponentModel.INotifyPropertyChanged { - private long _id; - private long _invoiceId; - private string _name; - private double _amount; - private string _uniqueIdentity; + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private System.Collections.Generic.ICollection _result; + private bool _hasItems; - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess { - get { return _id; } + get { return _isSuccess; } set { - if (_id != value) + if (_isSuccess != value) { - _id = value; + _isSuccess = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error + { + get { return _error; } + + set + { + if (_error != value) + { + _error = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Result + { + get { return _result; } + + set + { + if (_result != value) + { + _result = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("invoiceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long InvoiceId + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasItems + { + get { return _hasItems; } + + set + { + if (_hasItems != value) + { + _hasItems = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class ServiceAddressContractMessageContract : System.ComponentModel.INotifyPropertyChanged + { + private bool _isSuccess; + private ErrorContract _error; + private SuccessContract _success; + private ServiceAddressContract _result; + + [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool IsSuccess { - get { return _invoiceId; } + get { return _isSuccess; } set { - if (_invoiceId != value) + if (_isSuccess != value) { - _invoiceId = value; + _isSuccess = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name + [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ErrorContract Error { - get { return _name; } + get { return _error; } set { - if (_name != value) + if (_error != value) { - _name = value; + _error = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public double Amount + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success { - get { return _amount; } + get { return _success; } set { - if (_amount != value) + if (_success != value) { - _amount = value; + _success = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UniqueIdentity + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public ServiceAddressContract Result { - get { return _uniqueIdentity; } + get { return _result; } set { - if (_uniqueIdentity != value) + if (_result != value) { - _uniqueIdentity = value; + _result = value; RaisePropertyChanged(); } } @@ -5613,57 +9087,57 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceAddressContract : System.ComponentModel.INotifyPropertyChanged + public partial class ServiceContract : System.ComponentModel.INotifyPropertyChanged { - private long _serviceId; private long _id; - private string _address; + private string _name; + private string _description; private string _uniqueIdentity; private System.DateTimeOffset _creationDateTime; private System.DateTimeOffset? _modificationDateTime; private bool _isDeleted; private System.DateTimeOffset? _deletedDateTime; - [Newtonsoft.Json.JsonProperty("serviceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long ServiceId + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _serviceId; } + get { return _id; } set { - if (_serviceId != value) + if (_id != value) { - _serviceId = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { - get { return _id; } + get { return _name; } set { - if (_id != value) + if (_name != value) { - _id = value; + _name = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Address + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { - get { return _address; } + get { return _description; } set { - if (_address != value) + if (_description != value) { - _address = value; + _description = value; RaisePropertyChanged(); } } @@ -5755,11 +9229,13 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceAddressContractListMessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class ServiceContractListMessageContract : System.ComponentModel.INotifyPropertyChanged { private bool _isSuccess; private ErrorContract _error; - private System.Collections.Generic.ICollection _result; + private SuccessContract _success; + private System.Collections.Generic.ICollection _result; + private bool _hasItems; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -5791,8 +9267,23 @@ public ErrorContract Error } } + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Result + public System.Collections.Generic.ICollection Result { get { return _result; } @@ -5806,6 +9297,21 @@ public System.Collections.Generic.ICollection Result } } + [Newtonsoft.Json.JsonProperty("hasItems", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool HasItems + { + get { return _hasItems; } + + set + { + if (_hasItems != value) + { + _hasItems = value; + RaisePropertyChanged(); + } + } + } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) @@ -5817,11 +9323,12 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceAddressContractMessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class ServiceContractMessageContract : System.ComponentModel.INotifyPropertyChanged { private bool _isSuccess; private ErrorContract _error; - private ServiceAddressContract _result; + private SuccessContract _success; + private ServiceContract _result; [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public bool IsSuccess @@ -5853,8 +9360,23 @@ public ErrorContract Error } } + [Newtonsoft.Json.JsonProperty("success", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public SuccessContract Success + { + get { return _success; } + + set + { + if (_success != value) + { + _success = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ServiceAddressContract Result + public ServiceContract Result { get { return _result; } @@ -5879,52 +9401,98 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceAddressCreateRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class ServiceDetailsContract : System.ComponentModel.INotifyPropertyChanged { - private long _serviceId; - private string _address; - private string _uniqueIdentity; + private string _servieRouteAddress; + private string _methodName; + private string _path; + private string _porjectName; - [Newtonsoft.Json.JsonProperty("serviceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long ServiceId + [Newtonsoft.Json.JsonProperty("servieRouteAddress", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string ServieRouteAddress { - get { return _serviceId; } + get { return _servieRouteAddress; } set { - if (_serviceId != value) + if (_servieRouteAddress != value) { - _serviceId = value; + _servieRouteAddress = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Address + [Newtonsoft.Json.JsonProperty("methodName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string MethodName { - get { return _address; } + get { return _methodName; } set { - if (_address != value) + if (_methodName != value) { - _address = value; + _methodName = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UniqueIdentity + [Newtonsoft.Json.JsonProperty("path", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Path { - get { return _uniqueIdentity; } + get { return _path; } set { - if (_uniqueIdentity != value) + if (_path != value) { - _uniqueIdentity = value; + _path = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("porjectName", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string PorjectName + { + get { return _porjectName; } + + set + { + if (_porjectName != value) + { + _porjectName = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class SuccessContract : System.ComponentModel.INotifyPropertyChanged + { + private string _endUserMessage; + + [Newtonsoft.Json.JsonProperty("endUserMessage", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string EndUserMessage + { + get { return _endUserMessage; } + + set + { + if (_endUserMessage != value) + { + _endUserMessage = value; RaisePropertyChanged(); } } @@ -5941,11 +9509,14 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceAddressUpdateRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class UpdateOrderRequestContract : System.ComponentModel.INotifyPropertyChanged { private long _id; private long _serviceId; private string _address; + private OrderStatusType _status; + private double _totalAmount; + private string _url; private string _uniqueIdentity; [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -5993,6 +9564,51 @@ public string Address } } + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public OrderStatusType Status + { + get { return _status; } + + set + { + if (_status != value) + { + _status = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("totalAmount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double TotalAmount + { + get { return _totalAmount; } + + set + { + if (_totalAmount != value) + { + _totalAmount = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Url + { + get { return _url; } + + set + { + if (_url != value) + { + _url = value; + RaisePropertyChanged(); + } + } + } + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string UniqueIdentity { @@ -6019,132 +9635,128 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceContract : System.ComponentModel.INotifyPropertyChanged + public partial class UpdateOrderRequestContractUpdateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged { - private long _id; - private string _name; - private string _description; - private string _uniqueIdentity; - private System.DateTimeOffset _creationDateTime; - private System.DateTimeOffset? _modificationDateTime; - private bool _isDeleted; - private System.DateTimeOffset? _deletedDateTime; + private System.Collections.Generic.ICollection _items; - [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public long Id + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { - get { return _id; } + get { return _items; } set { - if (_id != value) + if (_items != value) { - _id = value; + _items = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name - { - get { return _name; } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - set - { - if (_name != value) - { - _name = value; - RaisePropertyChanged(); - } - } + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class UpdateOrderStatusHistoryRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private long _id; + private long _orderId; + private OrderStatusType _status; + private string _uniqueIdentity; - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _description; } + get { return _id; } set { - if (_description != value) + if (_id != value) { - _description = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string UniqueIdentity + [Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long OrderId { - get { return _uniqueIdentity; } + get { return _orderId; } set { - if (_uniqueIdentity != value) + if (_orderId != value) { - _uniqueIdentity = value; + _orderId = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("creationDateTime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset CreationDateTime + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public OrderStatusType Status { - get { return _creationDateTime; } + get { return _status; } set { - if (_creationDateTime != value) + if (_status != value) { - _creationDateTime = value; + _status = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("modificationDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? ModificationDateTime + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity { - get { return _modificationDateTime; } + get { return _uniqueIdentity; } set { - if (_modificationDateTime != value) + if (_uniqueIdentity != value) { - _modificationDateTime = value; + _uniqueIdentity = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("isDeleted", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsDeleted - { - get { return _isDeleted; } + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - set - { - if (_isDeleted != value) - { - _isDeleted = value; - RaisePropertyChanged(); - } - } + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); } + } - [Newtonsoft.Json.JsonProperty("deletedDateTime", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.DateTimeOffset? DeletedDateTime + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class UpdateOrderStatusHistoryRequestContractUpdateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items { - get { return _deletedDateTime; } + get { return _items; } set { - if (_deletedDateTime != value) + if (_items != value) { - _deletedDateTime = value; + _items = value; RaisePropertyChanged(); } } @@ -6161,114 +9773,114 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceContractListMessageContract : System.ComponentModel.INotifyPropertyChanged + public partial class UpdateProudctRequestContract : System.ComponentModel.INotifyPropertyChanged { - private bool _isSuccess; - private ErrorContract _error; - private System.Collections.Generic.ICollection _result; + private long _id; + private long _orderId; + private string _name; + private double _amount; + private string _uniqueIdentity; - [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsSuccess + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _isSuccess; } + get { return _id; } set { - if (_isSuccess != value) + if (_id != value) { - _isSuccess = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ErrorContract Error + [Newtonsoft.Json.JsonProperty("orderId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long OrderId { - get { return _error; } + get { return _orderId; } set { - if (_error != value) + if (_orderId != value) { - _error = value; + _orderId = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection Result + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { - get { return _result; } + get { return _name; } set { - if (_result != value) + if (_name != value) { - _result = value; + _name = value; RaisePropertyChanged(); } } } - public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; - - protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) - { - var handler = PropertyChanged; - if (handler != null) - handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); - } - } - - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceContractMessageContract : System.ComponentModel.INotifyPropertyChanged - { - private bool _isSuccess; - private ErrorContract _error; - private ServiceContract _result; - - [Newtonsoft.Json.JsonProperty("isSuccess", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public bool IsSuccess + [Newtonsoft.Json.JsonProperty("amount", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Amount { - get { return _isSuccess; } + get { return _amount; } set { - if (_isSuccess != value) + if (_amount != value) { - _isSuccess = value; + _amount = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("error", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ErrorContract Error + [Newtonsoft.Json.JsonProperty("uniqueIdentity", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string UniqueIdentity { - get { return _error; } + get { return _uniqueIdentity; } set { - if (_error != value) + if (_uniqueIdentity != value) { - _error = value; + _uniqueIdentity = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("result", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public ServiceContract Result + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) { - get { return _result; } + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class UpdateProudctRequestContractUpdateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } set { - if (_result != value) + if (_items != value) { - _result = value; + _items = value; RaisePropertyChanged(); } } @@ -6285,37 +9897,53 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceCreateRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class UpdateServiceAddressRequestContract : System.ComponentModel.INotifyPropertyChanged { - private string _name; - private string _description; + private long _id; + private long _serviceId; + private string _address; private string _uniqueIdentity; - [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Name + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Id { - get { return _name; } + get { return _id; } set { - if (_name != value) + if (_id != value) { - _name = value; + _id = value; RaisePropertyChanged(); } } } - [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public string Description + [Newtonsoft.Json.JsonProperty("serviceId", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long ServiceId { - get { return _description; } + get { return _serviceId; } set { - if (_description != value) + if (_serviceId != value) { - _description = value; + _serviceId = value; + RaisePropertyChanged(); + } + } + } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address + { + get { return _address; } + + set + { + if (_address != value) + { + _address = value; RaisePropertyChanged(); } } @@ -6347,7 +9975,37 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public partial class ServiceUpdateRequestContract : System.ComponentModel.INotifyPropertyChanged + public partial class UpdateServiceAddressRequestContractUpdateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged + { + private System.Collections.Generic.ICollection _items; + + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } + + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } + + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] + public partial class UpdateServiceRequestContract : System.ComponentModel.INotifyPropertyChanged { private long _id; private string _name; @@ -6425,37 +10083,33 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] - public enum StatusType + public partial class UpdateServiceRequestContractUpdateBulkRequestContract : System.ComponentModel.INotifyPropertyChanged { + private System.Collections.Generic.ICollection _items; - None = 0, - - Default = 1, - - All = 2, - - Other = 3, - - Unknown = 4, - - Nothing = 5, - - Created = 6, - - RedirectedToBankPortal = 7, - - Paied = 8, - - Canceled = 9, - - Failed = 10, - - Successful = 11, + [Newtonsoft.Json.JsonProperty("items", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.ICollection Items + { + get { return _items; } - Closed = 12, + set + { + if (_items != value) + { + _items = value; + RaisePropertyChanged(); + } + } + } - PaidBack = 13, + public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; + protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null) + { + var handler = PropertyChanged; + if (handler != null) + handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); + } } [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")] diff --git a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/Connected Services/PaymentsGeneratedServices/OpenAPI.nswag.json b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/Connected Services/PaymentsGeneratedServices/OpenAPI.nswag.json index 9c14874..1e2e38b 100644 --- a/src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/Connected Services/PaymentsGeneratedServices/OpenAPI.nswag.json +++ b/src/CSharp/EasyMicroservices.PaymentsMicroservice.Clients/Connected Services/PaymentsGeneratedServices/OpenAPI.nswag.json @@ -5,27 +5,27 @@ "version": "1.0" }, "paths": { - "/api/Invoice/Add": { + "/api/Order/CreateOrder": { "post": { "tags": [ - "Invoice" + "Order" ], - "operationId": "Add", + "operationId": "CreateOrder", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceCreateRequestContract" + "$ref": "#/components/schemas/CreateOrderRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceCreateRequestContract" + "$ref": "#/components/schemas/CreateOrderRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/InvoiceCreateRequestContract" + "$ref": "#/components/schemas/CreateOrderRequestContract" } } } @@ -36,17 +36,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/CreateOrderResponseContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/CreateOrderResponseContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/CreateOrderResponseContractMessageContract" } } } @@ -54,27 +54,27 @@ } } }, - "/api/Invoice/Update": { - "put": { + "/api/Order/Add": { + "post": { "tags": [ - "Invoice" + "Order" ], - "operationId": "Update", + "operationId": "Add", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceUpdateRequestContract" + "$ref": "#/components/schemas/CreateOrderRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceUpdateRequestContract" + "$ref": "#/components/schemas/CreateOrderRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/InvoiceUpdateRequestContract" + "$ref": "#/components/schemas/CreateOrderRequestContract" } } } @@ -85,17 +85,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/InvoiceContractMessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceContractMessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceContractMessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } } } @@ -103,27 +103,27 @@ } } }, - "/api/Invoice/GetById": { + "/api/Order/AddBulk": { "post": { "tags": [ - "Invoice" + "Order" ], - "operationId": "GetById", + "operationId": "AddBulk", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/CreateOrderRequestContractCreateBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/CreateOrderRequestContractCreateBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/CreateOrderRequestContractCreateBulkRequestContract" } } } @@ -134,17 +134,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/InvoiceContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -152,27 +152,27 @@ } } }, - "/api/Invoice/GetByUniqueIdentity": { - "post": { + "/api/Order/Update": { + "put": { "tags": [ - "Invoice" + "Order" ], - "operationId": "GetByUniqueIdentity", + "operationId": "Update", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/UpdateOrderRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/UpdateOrderRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/UpdateOrderRequestContract" } } } @@ -183,17 +183,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/InvoiceContractMessageContract" + "$ref": "#/components/schemas/OrderContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceContractMessageContract" + "$ref": "#/components/schemas/OrderContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceContractMessageContract" + "$ref": "#/components/schemas/OrderContractMessageContract" } } } @@ -201,27 +201,27 @@ } } }, - "/api/Invoice/HardDeleteById": { - "delete": { + "/api/Order/UpdateBulk": { + "put": { "tags": [ - "Invoice" + "Order" ], - "operationId": "HardDeleteById", + "operationId": "UpdateBulk", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/UpdateOrderRequestContractUpdateBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/UpdateOrderRequestContractUpdateBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/UpdateOrderRequestContractUpdateBulkRequestContract" } } } @@ -250,27 +250,27 @@ } } }, - "/api/Invoice/SoftDeleteById": { + "/api/Order/HardDeleteById": { "delete": { "tags": [ - "Invoice" + "Order" ], - "operationId": "SoftDeleteById", + "operationId": "HardDeleteById", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/Int64DeleteRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/Int64DeleteRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/Int64DeleteRequestContract" } } } @@ -299,57 +299,27 @@ } } }, - "/api/Invoice/GetAll": { - "get": { - "tags": [ - "Invoice" - ], - "operationId": "GetAll", - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/InvoiceContractListMessageContract" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvoiceContractListMessageContract" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/InvoiceContractListMessageContract" - } - } - } - } - } - } - }, - "/api/Invoice/GetAllByUniqueIdentity": { - "post": { + "/api/Order/HardDeleteBulkByIds": { + "delete": { "tags": [ - "Invoice" + "Order" ], - "operationId": "GetAllByUniqueIdentity", + "operationId": "HardDeleteBulkByIds", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" } } } @@ -360,17 +330,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/InvoiceContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -378,27 +348,27 @@ } } }, - "/api/InvoiceStatusHistory/Add": { - "post": { + "/api/Order/SoftDeleteById": { + "delete": { "tags": [ - "InvoiceStatusHistory" + "Order" ], - "operationId": "Add2", + "operationId": "SoftDeleteById", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryCreateRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryCreateRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryCreateRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" } } } @@ -409,17 +379,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -427,27 +397,27 @@ } } }, - "/api/InvoiceStatusHistory/Update": { - "put": { + "/api/Order/SoftDeleteBulkByIds": { + "delete": { "tags": [ - "InvoiceStatusHistory" + "Order" ], - "operationId": "Update2", + "operationId": "SoftDeleteBulkByIds", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryUpdateRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryUpdateRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryUpdateRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } } } @@ -458,17 +428,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -476,12 +446,12 @@ } } }, - "/api/InvoiceStatusHistory/GetById": { + "/api/Order/GetById": { "post": { "tags": [ - "InvoiceStatusHistory" + "Order" ], - "operationId": "GetById2", + "operationId": "GetById", "requestBody": { "content": { "application/json": { @@ -507,17 +477,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractMessageContract" + "$ref": "#/components/schemas/OrderContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractMessageContract" + "$ref": "#/components/schemas/OrderContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractMessageContract" + "$ref": "#/components/schemas/OrderContractMessageContract" } } } @@ -525,12 +495,12 @@ } } }, - "/api/InvoiceStatusHistory/GetByUniqueIdentity": { + "/api/Order/GetByUniqueIdentity": { "post": { "tags": [ - "InvoiceStatusHistory" + "Order" ], - "operationId": "GetByUniqueIdentity2", + "operationId": "GetByUniqueIdentity", "requestBody": { "content": { "application/json": { @@ -556,66 +526,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractMessageContract" - } - }, - "application/json": { - "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractMessageContract" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractMessageContract" - } - } - } - } - } - } - }, - "/api/InvoiceStatusHistory/HardDeleteById": { - "delete": { - "tags": [ - "InvoiceStatusHistory" - ], - "operationId": "HardDeleteById2", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" - } - } - } - }, - "responses": { - "200": { - "description": "Success", - "content": { - "text/plain": { - "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/OrderContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/OrderContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/OrderContractMessageContract" } } } @@ -623,27 +544,27 @@ } } }, - "/api/InvoiceStatusHistory/SoftDeleteById": { - "delete": { + "/api/Order/Filter": { + "post": { "tags": [ - "InvoiceStatusHistory" + "Order" ], - "operationId": "SoftDeleteById2", + "operationId": "Filter", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } } } @@ -654,17 +575,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/OrderContractListMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/OrderContractListMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/OrderContractListMessageContract" } } } @@ -672,29 +593,29 @@ } } }, - "/api/InvoiceStatusHistory/GetAll": { + "/api/Order/GetAll": { "get": { "tags": [ - "InvoiceStatusHistory" + "Order" ], - "operationId": "GetAll2", + "operationId": "GetAll", "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractListMessageContract" + "$ref": "#/components/schemas/OrderContractListMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractListMessageContract" + "$ref": "#/components/schemas/OrderContractListMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractListMessageContract" + "$ref": "#/components/schemas/OrderContractListMessageContract" } } } @@ -702,12 +623,12 @@ } } }, - "/api/InvoiceStatusHistory/GetAllByUniqueIdentity": { + "/api/Order/GetAllByUniqueIdentity": { "post": { "tags": [ - "InvoiceStatusHistory" + "Order" ], - "operationId": "GetAllByUniqueIdentity2", + "operationId": "GetAllByUniqueIdentity", "requestBody": { "content": { "application/json": { @@ -733,17 +654,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractListMessageContract" + "$ref": "#/components/schemas/OrderContractListMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractListMessageContract" + "$ref": "#/components/schemas/OrderContractListMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContractListMessageContract" + "$ref": "#/components/schemas/OrderContractListMessageContract" } } } @@ -751,27 +672,27 @@ } } }, - "/api/Product/Add": { + "/api/OrderStatusHistory/Add": { "post": { "tags": [ - "Product" + "OrderStatusHistory" ], - "operationId": "Add3", + "operationId": "Add2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProudctCreateRequestContract" + "$ref": "#/components/schemas/CreateOrderStatusHistoryRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ProudctCreateRequestContract" + "$ref": "#/components/schemas/CreateOrderStatusHistoryRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/ProudctCreateRequestContract" + "$ref": "#/components/schemas/CreateOrderStatusHistoryRequestContract" } } } @@ -800,27 +721,27 @@ } } }, - "/api/Product/Update": { - "put": { + "/api/OrderStatusHistory/AddBulk": { + "post": { "tags": [ - "Product" + "OrderStatusHistory" ], - "operationId": "Update3", + "operationId": "AddBulk2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ProudctUpdateRequestContract" + "$ref": "#/components/schemas/CreateOrderStatusHistoryRequestContractCreateBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ProudctUpdateRequestContract" + "$ref": "#/components/schemas/CreateOrderStatusHistoryRequestContractCreateBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/ProudctUpdateRequestContract" + "$ref": "#/components/schemas/CreateOrderStatusHistoryRequestContractCreateBulkRequestContract" } } } @@ -831,17 +752,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ProductContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ProductContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ProductContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -849,27 +770,27 @@ } } }, - "/api/Product/GetById": { - "post": { + "/api/OrderStatusHistory/Update": { + "put": { "tags": [ - "Product" + "OrderStatusHistory" ], - "operationId": "GetById3", + "operationId": "Update2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/UpdateOrderStatusHistoryRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/UpdateOrderStatusHistoryRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/UpdateOrderStatusHistoryRequestContract" } } } @@ -880,17 +801,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ProductContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ProductContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ProductContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractMessageContract" } } } @@ -898,27 +819,27 @@ } } }, - "/api/Product/GetByUniqueIdentity": { - "post": { + "/api/OrderStatusHistory/UpdateBulk": { + "put": { "tags": [ - "Product" + "OrderStatusHistory" ], - "operationId": "GetByUniqueIdentity3", + "operationId": "UpdateBulk2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/UpdateOrderStatusHistoryRequestContractUpdateBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/UpdateOrderStatusHistoryRequestContractUpdateBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/UpdateOrderStatusHistoryRequestContractUpdateBulkRequestContract" } } } @@ -929,17 +850,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ProductContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ProductContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ProductContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -947,12 +868,12 @@ } } }, - "/api/Product/HardDeleteById": { + "/api/OrderStatusHistory/HardDeleteById": { "delete": { "tags": [ - "Product" + "OrderStatusHistory" ], - "operationId": "HardDeleteById3", + "operationId": "HardDeleteById2", "requestBody": { "content": { "application/json": { @@ -996,27 +917,27 @@ } } }, - "/api/Product/SoftDeleteById": { + "/api/OrderStatusHistory/HardDeleteBulkByIds": { "delete": { "tags": [ - "Product" + "OrderStatusHistory" ], - "operationId": "SoftDeleteById3", + "operationId": "HardDeleteBulkByIds2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" } } } @@ -1045,29 +966,48 @@ } } }, - "/api/Product/GetAll": { - "get": { + "/api/OrderStatusHistory/SoftDeleteById": { + "delete": { "tags": [ - "Product" + "OrderStatusHistory" ], - "operationId": "GetAll3", + "operationId": "SoftDeleteById2", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + } + } + }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ProductContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ProductContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ProductContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -1075,27 +1015,27 @@ } } }, - "/api/Product/GetAllByUniqueIdentity": { - "post": { + "/api/OrderStatusHistory/SoftDeleteBulkByIds": { + "delete": { "tags": [ - "Product" + "OrderStatusHistory" ], - "operationId": "GetAllByUniqueIdentity3", + "operationId": "SoftDeleteBulkByIds2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } } } @@ -1106,17 +1046,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ProductContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ProductContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ProductContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -1124,12 +1064,12 @@ } } }, - "/api/Service/GetById": { + "/api/OrderStatusHistory/GetById": { "post": { "tags": [ - "Service" + "OrderStatusHistory" ], - "operationId": "GetById4", + "operationId": "GetById2", "requestBody": { "content": { "application/json": { @@ -1155,17 +1095,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ServiceContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractMessageContract" } } } @@ -1173,12 +1113,12 @@ } } }, - "/api/Service/GetByUniqueIdentity": { + "/api/OrderStatusHistory/GetByUniqueIdentity": { "post": { "tags": [ - "Service" + "OrderStatusHistory" ], - "operationId": "GetByUniqueIdentity4", + "operationId": "GetByUniqueIdentity2", "requestBody": { "content": { "application/json": { @@ -1204,17 +1144,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ServiceContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractMessageContract" } } } @@ -1222,27 +1162,27 @@ } } }, - "/api/Service/Add": { + "/api/OrderStatusHistory/Filter": { "post": { "tags": [ - "Service" + "OrderStatusHistory" ], - "operationId": "Add4", + "operationId": "Filter2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceCreateRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceCreateRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/ServiceCreateRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } } } @@ -1253,17 +1193,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractListMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractListMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractListMessageContract" } } } @@ -1271,48 +1211,29 @@ } } }, - "/api/Service/Update": { - "put": { + "/api/OrderStatusHistory/GetAll": { + "get": { "tags": [ - "Service" + "OrderStatusHistory" ], - "operationId": "Update4", - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ServiceUpdateRequestContract" - } - }, - "text/json": { - "schema": { - "$ref": "#/components/schemas/ServiceUpdateRequestContract" - } - }, - "application/*+json": { - "schema": { - "$ref": "#/components/schemas/ServiceUpdateRequestContract" - } - } - } - }, + "operationId": "GetAll2", "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ServiceContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractListMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractListMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceContractMessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractListMessageContract" } } } @@ -1320,27 +1241,27 @@ } } }, - "/api/Service/HardDeleteById": { - "delete": { + "/api/OrderStatusHistory/GetAllByUniqueIdentity": { + "post": { "tags": [ - "Service" + "OrderStatusHistory" ], - "operationId": "HardDeleteById4", + "operationId": "GetAllByUniqueIdentity2", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" } } } @@ -1351,17 +1272,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractListMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractListMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/OrderStatusHistoryContractListMessageContract" } } } @@ -1369,27 +1290,27 @@ } } }, - "/api/Service/SoftDeleteById": { - "delete": { + "/api/Product/Add": { + "post": { "tags": [ - "Service" + "Product" ], - "operationId": "SoftDeleteById4", + "operationId": "Add3", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/CreateProudctRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/CreateProudctRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/CreateProudctRequestContract" } } } @@ -1400,17 +1321,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/Int64MessageContract" } } } @@ -1418,29 +1339,48 @@ } } }, - "/api/Service/GetAll": { - "get": { + "/api/Product/AddBulk": { + "post": { "tags": [ - "Service" + "Product" ], - "operationId": "GetAll4", + "operationId": "AddBulk3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateProudctRequestContractCreateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreateProudctRequestContractCreateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreateProudctRequestContractCreateBulkRequestContract" + } + } + } + }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ServiceContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceContractListMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -1448,27 +1388,27 @@ } } }, - "/api/Service/GetAllByUniqueIdentity": { - "post": { + "/api/Product/Update": { + "put": { "tags": [ - "Service" + "Product" ], - "operationId": "GetAllByUniqueIdentity4", + "operationId": "Update3", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/UpdateProudctRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/UpdateProudctRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/UpdateProudctRequestContract" } } } @@ -1479,17 +1419,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ServiceContractListMessageContract" + "$ref": "#/components/schemas/ProductContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceContractListMessageContract" + "$ref": "#/components/schemas/ProductContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceContractListMessageContract" + "$ref": "#/components/schemas/ProductContractMessageContract" } } } @@ -1497,27 +1437,27 @@ } } }, - "/api/ServiceAddress/Add": { - "post": { + "/api/Product/UpdateBulk": { + "put": { "tags": [ - "ServiceAddress" + "Product" ], - "operationId": "Add5", + "operationId": "UpdateBulk3", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressCreateRequestContract" + "$ref": "#/components/schemas/UpdateProudctRequestContractUpdateBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressCreateRequestContract" + "$ref": "#/components/schemas/UpdateProudctRequestContractUpdateBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressCreateRequestContract" + "$ref": "#/components/schemas/UpdateProudctRequestContractUpdateBulkRequestContract" } } } @@ -1528,17 +1468,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64MessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -1546,27 +1486,27 @@ } } }, - "/api/ServiceAddress/Update": { - "put": { + "/api/Product/HardDeleteById": { + "delete": { "tags": [ - "ServiceAddress" + "Product" ], - "operationId": "Update5", + "operationId": "HardDeleteById3", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressUpdateRequestContract" + "$ref": "#/components/schemas/Int64DeleteRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressUpdateRequestContract" + "$ref": "#/components/schemas/Int64DeleteRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressUpdateRequestContract" + "$ref": "#/components/schemas/Int64DeleteRequestContract" } } } @@ -1577,17 +1517,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -1595,27 +1535,27 @@ } } }, - "/api/ServiceAddress/GetById": { - "post": { + "/api/Product/HardDeleteBulkByIds": { + "delete": { "tags": [ - "ServiceAddress" + "Product" ], - "operationId": "GetById5", + "operationId": "HardDeleteBulkByIds3", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64GetIdRequestContract" + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" } } } @@ -1626,17 +1566,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -1644,27 +1584,27 @@ } } }, - "/api/ServiceAddress/GetByUniqueIdentity": { - "post": { + "/api/Product/SoftDeleteById": { + "delete": { "tags": [ - "ServiceAddress" + "Product" ], - "operationId": "GetByUniqueIdentity5", + "operationId": "SoftDeleteById3", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" } } } @@ -1675,17 +1615,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + "$ref": "#/components/schemas/MessageContract" } } } @@ -1693,27 +1633,27 @@ } } }, - "/api/ServiceAddress/HardDeleteById": { + "/api/Product/SoftDeleteBulkByIds": { "delete": { "tags": [ - "ServiceAddress" + "Product" ], - "operationId": "HardDeleteById5", + "operationId": "SoftDeleteBulkByIds3", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64DeleteRequestContract" + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" } } } @@ -1742,27 +1682,27 @@ } } }, - "/api/ServiceAddress/SoftDeleteById": { - "delete": { + "/api/Product/GetById": { + "post": { "tags": [ - "ServiceAddress" + "Product" ], - "operationId": "SoftDeleteById5", + "operationId": "GetById3", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/Int64GetIdRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/Int64GetIdRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + "$ref": "#/components/schemas/Int64GetIdRequestContract" } } } @@ -1773,17 +1713,17 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/ProductContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/ProductContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/MessageContract" + "$ref": "#/components/schemas/ProductContractMessageContract" } } } @@ -1791,29 +1731,48 @@ } } }, - "/api/ServiceAddress/GetAll": { - "get": { + "/api/Product/GetByUniqueIdentity": { + "post": { "tags": [ - "ServiceAddress" + "Product" ], - "operationId": "GetAll5", + "operationId": "GetByUniqueIdentity3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, "responses": { "200": { "description": "Success", "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + "$ref": "#/components/schemas/ProductContractMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + "$ref": "#/components/schemas/ProductContractMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + "$ref": "#/components/schemas/ProductContractMessageContract" } } } @@ -1821,27 +1780,27 @@ } } }, - "/api/ServiceAddress/GetAllByUniqueIdentity": { + "/api/Product/Filter": { "post": { "tags": [ - "ServiceAddress" + "Product" ], - "operationId": "GetAllByUniqueIdentity5", + "operationId": "Filter3", "requestBody": { "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } }, "application/*+json": { "schema": { - "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + "$ref": "#/components/schemas/FilterRequestContract" } } } @@ -1852,27 +1811,1936 @@ "content": { "text/plain": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + "$ref": "#/components/schemas/ProductContractListMessageContract" } }, "application/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + "$ref": "#/components/schemas/ProductContractListMessageContract" } }, "text/json": { "schema": { - "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + "$ref": "#/components/schemas/ProductContractListMessageContract" } } } } } } - } + }, + "/api/Product/GetAll": { + "get": { + "tags": [ + "Product" + ], + "operationId": "GetAll3", + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ProductContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ProductContractListMessageContract" + } + } + } + } + } + } + }, + "/api/Product/GetAllByUniqueIdentity": { + "post": { + "tags": [ + "Product" + ], + "operationId": "GetAllByUniqueIdentity3", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ProductContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProductContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ProductContractListMessageContract" + } + } + } + } + } + } + }, + "/api/Service/Add": { + "post": { + "tags": [ + "Service" + ], + "operationId": "Add4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + } + } + } + } + } + }, + "/api/Service/AddBulk": { + "post": { + "tags": [ + "Service" + ], + "operationId": "AddBulk4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceRequestContractCreateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceRequestContractCreateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceRequestContractCreateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/Service/Update": { + "put": { + "tags": [ + "Service" + ], + "operationId": "Update4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractMessageContract" + } + } + } + } + } + } + }, + "/api/Service/UpdateBulk": { + "put": { + "tags": [ + "Service" + ], + "operationId": "UpdateBulk4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceRequestContractUpdateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceRequestContractUpdateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceRequestContractUpdateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/Service/HardDeleteById": { + "delete": { + "tags": [ + "Service" + ], + "operationId": "HardDeleteById4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/Service/HardDeleteBulkByIds": { + "delete": { + "tags": [ + "Service" + ], + "operationId": "HardDeleteBulkByIds4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/Service/SoftDeleteById": { + "delete": { + "tags": [ + "Service" + ], + "operationId": "SoftDeleteById4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/Service/SoftDeleteBulkByIds": { + "delete": { + "tags": [ + "Service" + ], + "operationId": "SoftDeleteBulkByIds4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/Service/GetById": { + "post": { + "tags": [ + "Service" + ], + "operationId": "GetById4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractMessageContract" + } + } + } + } + } + } + }, + "/api/Service/GetByUniqueIdentity": { + "post": { + "tags": [ + "Service" + ], + "operationId": "GetByUniqueIdentity4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractMessageContract" + } + } + } + } + } + } + }, + "/api/Service/Filter": { + "post": { + "tags": [ + "Service" + ], + "operationId": "Filter4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractListMessageContract" + } + } + } + } + } + } + }, + "/api/Service/GetAll": { + "get": { + "tags": [ + "Service" + ], + "operationId": "GetAll4", + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractListMessageContract" + } + } + } + } + } + } + }, + "/api/Service/GetAllByUniqueIdentity": { + "post": { + "tags": [ + "Service" + ], + "operationId": "GetAllByUniqueIdentity4", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceContractListMessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/Add": { + "post": { + "tags": [ + "ServiceAddress" + ], + "operationId": "Add5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceAddressRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceAddressRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceAddressRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64MessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/AddBulk": { + "post": { + "tags": [ + "ServiceAddress" + ], + "operationId": "AddBulk5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceAddressRequestContractCreateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceAddressRequestContractCreateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/CreateServiceAddressRequestContractCreateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/Update": { + "put": { + "tags": [ + "ServiceAddress" + ], + "operationId": "Update5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceAddressRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceAddressRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceAddressRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/UpdateBulk": { + "put": { + "tags": [ + "ServiceAddress" + ], + "operationId": "UpdateBulk5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceAddressRequestContractUpdateBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceAddressRequestContractUpdateBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/UpdateServiceAddressRequestContractUpdateBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/HardDeleteById": { + "delete": { + "tags": [ + "ServiceAddress" + ], + "operationId": "HardDeleteById5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/HardDeleteBulkByIds": { + "delete": { + "tags": [ + "ServiceAddress" + ], + "operationId": "HardDeleteBulkByIds5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64DeleteBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/SoftDeleteById": { + "delete": { + "tags": [ + "ServiceAddress" + ], + "operationId": "SoftDeleteById5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/SoftDeleteBulkByIds": { + "delete": { + "tags": [ + "ServiceAddress" + ], + "operationId": "SoftDeleteBulkByIds5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64SoftDeleteBulkRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/GetById": { + "post": { + "tags": [ + "ServiceAddress" + ], + "operationId": "GetById5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/Int64GetIdRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/GetByUniqueIdentity": { + "post": { + "tags": [ + "ServiceAddress" + ], + "operationId": "GetByUniqueIdentity5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractMessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/Filter": { + "post": { + "tags": [ + "ServiceAddress" + ], + "operationId": "Filter5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/FilterRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/GetAll": { + "get": { + "tags": [ + "ServiceAddress" + ], + "operationId": "GetAll5", + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + } + } + } + } + } + } + }, + "/api/ServiceAddress/GetAllByUniqueIdentity": { + "post": { + "tags": [ + "ServiceAddress" + ], + "operationId": "GetAllByUniqueIdentity5", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/GetUniqueIdentityRequestContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/ServiceAddressContractListMessageContract" + } + } + } + } + } + } + } }, "components": { "schemas": { + "CreateOrderRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "serviceId": { + "type": "integer", + "format": "int64" + }, + "address": { + "type": "string", + "nullable": true + }, + "totalAmount": { + "type": "number", + "format": "double" + }, + "currencyCode": { + "$ref": "#/components/schemas/CurrencyCodeType" + }, + "urls": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/OrderUrlContract" + } + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + } + } + }, + "CreateOrderRequestContractCreateBulkRequestContract": { + "title": "CreateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/CreateOrderRequestContract" + } + } + } + }, + "CreateOrderResponseContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "portalUrls": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + }, + "CreateOrderResponseContractMessageContract": { + "title": "MessageContract", + "type": "object", + "additionalProperties": false, + "properties": { + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "$ref": "#/components/schemas/CreateOrderResponseContract" + } + } + }, + "CreateOrderStatusHistoryRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "orderId": { + "type": "integer", + "format": "int64" + }, + "status": { + "$ref": "#/components/schemas/OrderStatusType" + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + } + } + }, + "CreateOrderStatusHistoryRequestContractCreateBulkRequestContract": { + "title": "CreateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/CreateOrderStatusHistoryRequestContract" + } + } + } + }, + "CreateProudctRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "orderId": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string", + "nullable": true + }, + "totalAmount": { + "type": "number", + "format": "double" + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + } + } + }, + "CreateProudctRequestContractCreateBulkRequestContract": { + "title": "CreateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/CreateProudctRequestContract" + } + } + } + }, + "CreateServiceAddressRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "serviceId": { + "type": "integer", + "format": "int64" + }, + "address": { + "type": "string", + "nullable": true + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + } + } + }, + "CreateServiceAddressRequestContractCreateBulkRequestContract": { + "title": "CreateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/CreateServiceAddressRequestContract" + } + } + } + }, + "CreateServiceRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "uniqueIdentity": { + "type": "string", + "nullable": true + } + } + }, + "CreateServiceRequestContractCreateBulkRequestContract": { + "title": "CreateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/CreateServiceRequestContract" + } + } + } + }, + "CurrencyCodeType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "ALL", + "DZD", + "ARS", + "AUD", + "BSD", + "BHD", + "BDT", + "AMD", + "BBD", + "BMD", + "BTN", + "BOB", + "BWP", + "BZD", + "SBD", + "BND", + "MMK", + "BIF", + "KHR", + "CAD", + "CVE", + "KYD", + "LKR", + "CLP", + "CNY", + "COP", + "KMF", + "CRC", + "HRK", + "CUP", + "CZK", + "DKK", + "DOP", + "SVC", + "ETB", + "ERN", + "FKP", + "FJD", + "DJF", + "GMD", + "GIP", + "GTQ", + "GNF", + "GYD", + "HTG", + "HNL", + "HKD", + "HUF", + "ISK", + "INR", + "IDR", + "IRR", + "IQD", + "ILS", + "JMD", + "JPY", + "KZT", + "JOD", + "KES", + "KPW", + "KRW", + "KWD", + "KGS", + "LAK", + "LBP", + "LSL", + "LRD", + "LYD", + "MOP", + "MWK", + "MYR", + "MVR", + "MUR", + "MXN", + "MNT", + "MDL", + "MAD", + "OMR", + "NAD", + "NPR", + "ANG", + "AWG", + "VUV", + "NZD", + "NIO", + "NGN", + "NOK", + "PKR", + "PAB", + "PGK", + "PYG", + "PEN", + "PHP", + "QAR", + "RUB", + "RWF", + "SHP", + "SAR", + "SCR", + "SLL", + "SGD", + "VND", + "SOS", + "ZAR", + "SSP", + "SZL", + "SEK", + "CHF", + "SYP", + "THB", + "TOP", + "TTD", + "AED", + "TND", + "UGX", + "MKD", + "EGP", + "GBP", + "TZS", + "USD", + "UYU", + "UZS", + "WST", + "YER", + "TWD", + "SLE", + "VED", + "UYW", + "VES", + "MRU", + "STN", + "CUC", + "ZWL", + "BYN", + "TMT", + "GHS", + "SDG", + "UYI", + "RSD", + "MZN", + "AZN", + "RON", + "CHE", + "CHW", + "TRY", + "XAF", + "XCD", + "XOF", + "XPF", + "XBA", + "XBB", + "XBC", + "XBD", + "XAU", + "XDR", + "XAG", + "XPT", + "XTS", + "XPD", + "XUA", + "ZMW", + "SRD", + "MGA", + "COU", + "AFN", + "TJS", + "AOA", + "BGN", + "CDF", + "BAM", + "EUR", + "MXV", + "UAH", + "GEL", + "BOV", + "PLN", + "BRL", + "CLF", + "XSU", + "USN", + "XXX" + ], + "enum": [ + 8, + 12, + 32, + 36, + 44, + 48, + 50, + 51, + 52, + 60, + 64, + 68, + 72, + 84, + 90, + 96, + 104, + 108, + 116, + 124, + 132, + 136, + 144, + 152, + 156, + 170, + 174, + 188, + 191, + 192, + 203, + 208, + 214, + 222, + 230, + 232, + 238, + 242, + 262, + 270, + 292, + 320, + 324, + 328, + 332, + 340, + 344, + 348, + 352, + 356, + 360, + 364, + 368, + 376, + 388, + 392, + 398, + 400, + 404, + 408, + 410, + 414, + 417, + 418, + 422, + 426, + 430, + 434, + 446, + 454, + 458, + 462, + 480, + 484, + 496, + 498, + 504, + 512, + 516, + 524, + 532, + 533, + 548, + 554, + 558, + 566, + 578, + 586, + 590, + 598, + 600, + 604, + 608, + 634, + 643, + 646, + 654, + 682, + 690, + 694, + 702, + 704, + 706, + 710, + 728, + 748, + 752, + 756, + 760, + 764, + 776, + 780, + 784, + 788, + 800, + 807, + 818, + 826, + 834, + 840, + 858, + 860, + 882, + 886, + 901, + 925, + 926, + 927, + 928, + 929, + 930, + 931, + 932, + 933, + 934, + 936, + 938, + 940, + 941, + 943, + 944, + 946, + 947, + 948, + 949, + 950, + 951, + 952, + 953, + 955, + 956, + 957, + 958, + 959, + 960, + 961, + 962, + 963, + 964, + 965, + 967, + 968, + 969, + 970, + 971, + 972, + 973, + 975, + 976, + 977, + 978, + 979, + 980, + 981, + 984, + 985, + 986, + 990, + 994, + 997, + 999 + ] + }, "ErrorContract": { "type": "object", "additionalProperties": false, @@ -1892,21 +3760,164 @@ "type": "string", "nullable": true }, - "endUserMessage": { + "endUserMessage": { + "type": "string", + "nullable": true + }, + "details": { + "type": "string", + "nullable": true + }, + "stackTrace": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + }, + "children": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ErrorContract" + } + }, + "serviceDetails": { + "$ref": "#/components/schemas/ServiceDetailsContract" + } + } + }, + "FailedReasonType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "None", + "Default", + "All", + "Other", + "Unknown", + "Nothing", + "SessionAccessDenied", + "AccessDenied", + "InternalError", + "Duplicate", + "Empty", + "NotFound", + "ValidationsError", + "StreamError", + "WebServiceNotWorking", + "Incorrect", + "OperationFailed" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16 + ] + }, + "FilterRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "isDeleted": { + "title": "Nullable", + "type": "boolean", + "nullable": true + }, + "fromDeletedDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "toDeletedDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "fromCreationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "toCreationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "fromModificationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "toModificationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "uniqueIdentity": { "type": "string", "nullable": true }, - "details": { + "uniqueIdentityType": { + "$ref": "#/components/schemas/GetUniqueIdentityType" + }, + "index": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true + }, + "length": { + "title": "Nullable", + "type": "integer", + "format": "int64", + "nullable": true + }, + "sortColumnName": { "type": "string", "nullable": true }, - "stackTrace": { + "isDescending": { + "type": "boolean" + } + } + }, + "GetUniqueIdentityRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "uniqueIdentity": { "type": "string", "nullable": true + }, + "type": { + "$ref": "#/components/schemas/GetUniqueIdentityType" } } }, - "FailedReasonType": { + "GetUniqueIdentityType": { "type": "integer", "format": "int32", "x-enumNames": [ @@ -1916,17 +3927,8 @@ "Other", "Unknown", "Nothing", - "SessionAccessDenied", - "AccessDenied", - "InternalError", - "Dupplicate", - "Empty", - "NotFound", - "ValidationsError", - "StreamError", - "WebServiceNotWorking", - "Incorrect", - "OperationFailed" + "OnlyParent", + "OnlyChilren" ], "enum": [ 0, @@ -1936,25 +3938,22 @@ 4, 5, 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16 + 7 ] }, - "GetUniqueIdentityRequestContract": { + "Int64DeleteBulkRequestContract": { + "title": "DeleteBulkRequestContract", "type": "object", "additionalProperties": false, "properties": { - "uniqueIdentity": { - "type": "string", - "nullable": true + "ids": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "type": "integer", + "format": "int64" + } } } }, @@ -1991,12 +3990,34 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, "result": { "type": "integer", "format": "int64" } } }, + "Int64SoftDeleteBulkRequestContract": { + "title": "SoftDeleteBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "ids": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "type": "integer", + "format": "int64" + } + }, + "isDelete": { + "type": "boolean" + } + } + }, "Int64SoftDeleteRequestContract": { "title": "SoftDeleteRequestContract", "type": "object", @@ -2011,7 +4032,22 @@ } } }, - "InvoiceContract": { + "MessageContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "isSuccess": { + "type": "boolean" + }, + "error": { + "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + } + } + }, + "OrderContract": { "type": "object", "additionalProperties": false, "properties": { @@ -2028,7 +4064,7 @@ "nullable": true }, "status": { - "$ref": "#/components/schemas/StatusType" + "$ref": "#/components/schemas/OrderStatusType" }, "totalAmount": { "type": "number", @@ -2063,8 +4099,8 @@ } } }, - "InvoiceContractListMessageContract": { - "title": "MessageContract", + "OrderContractListMessageContract": { + "title": "ListMessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -2074,18 +4110,25 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, "result": { - "title": "List", + "title": "List", "type": "array", "nullable": true, "items": { - "$ref": "#/components/schemas/InvoiceContract" + "$ref": "#/components/schemas/OrderContract" } + }, + "hasItems": { + "type": "boolean", + "readOnly": true } } }, - "InvoiceContractMessageContract": { - "title": "MessageContract", + "OrderContractMessageContract": { + "title": "MessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -2095,45 +4138,19 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, - "result": { - "$ref": "#/components/schemas/InvoiceContract" - } - } - }, - "InvoiceCreateRequestContract": { - "type": "object", - "additionalProperties": false, - "properties": { - "serviceId": { - "type": "integer", - "format": "int64" - }, - "address": { - "type": "string", - "nullable": true - }, - "status": { - "$ref": "#/components/schemas/StatusType" - }, - "totalAmount": { - "type": "number", - "format": "double" - }, - "url": { - "type": "string", - "nullable": true + "success": { + "$ref": "#/components/schemas/SuccessContract" }, - "uniqueIdentity": { - "type": "string", - "nullable": true + "result": { + "$ref": "#/components/schemas/OrderContract" } } }, - "InvoiceStatusHistoryContract": { + "OrderStatusHistoryContract": { "type": "object", "additionalProperties": false, "properties": { - "invoiceId": { + "orderId": { "type": "integer", "format": "int64" }, @@ -2142,7 +4159,7 @@ "format": "int64" }, "status": { - "$ref": "#/components/schemas/StatusType" + "$ref": "#/components/schemas/OrderStatusType" }, "uniqueIdentity": { "type": "string", @@ -2169,8 +4186,8 @@ } } }, - "InvoiceStatusHistoryContractListMessageContract": { - "title": "MessageContract", + "OrderStatusHistoryContractListMessageContract": { + "title": "ListMessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -2180,18 +4197,25 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, "result": { - "title": "List", + "title": "List", "type": "array", "nullable": true, "items": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContract" + "$ref": "#/components/schemas/OrderStatusHistoryContract" } + }, + "hasItems": { + "type": "boolean", + "readOnly": true } } }, - "InvoiceStatusHistoryContractMessageContract": { - "title": "MessageContract", + "OrderStatusHistoryContractMessageContract": { + "title": "MessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -2201,29 +4225,64 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, "result": { - "$ref": "#/components/schemas/InvoiceStatusHistoryContract" + "$ref": "#/components/schemas/OrderStatusHistoryContract" } } }, - "InvoiceStatusHistoryCreateRequestContract": { + "OrderStatusType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "None", + "Default", + "All", + "Other", + "Unknown", + "Nothing", + "Created", + "RedirectedToBankPortal", + "Paied", + "Canceled", + "Failed", + "Successful", + "Closed", + "PaidBack" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13 + ] + }, + "OrderUrlContract": { "type": "object", "additionalProperties": false, "properties": { - "invoiceId": { - "type": "integer", - "format": "int64" - }, - "status": { - "$ref": "#/components/schemas/StatusType" - }, - "uniqueIdentity": { + "url": { "type": "string", "nullable": true + }, + "type": { + "$ref": "#/components/schemas/RequestUrlType" } } }, - "InvoiceStatusHistoryUpdateRequestContract": { + "ProductContract": { "type": "object", "additionalProperties": false, "properties": { @@ -2231,53 +4290,73 @@ "type": "integer", "format": "int64" }, - "invoiceId": { + "orderId": { "type": "integer", "format": "int64" }, - "status": { - "$ref": "#/components/schemas/StatusType" + "name": { + "type": "string", + "nullable": true + }, + "totalAmount": { + "type": "number", + "format": "double" }, "uniqueIdentity": { "type": "string", "nullable": true + }, + "creationDateTime": { + "type": "string", + "format": "date-time" + }, + "modificationDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true + }, + "isDeleted": { + "type": "boolean" + }, + "deletedDateTime": { + "title": "Nullable", + "type": "string", + "format": "date-time", + "nullable": true } } }, - "InvoiceUpdateRequestContract": { + "ProductContractListMessageContract": { + "title": "ListMessageContract", "type": "object", "additionalProperties": false, "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "serviceId": { - "type": "integer", - "format": "int64" - }, - "address": { - "type": "string", - "nullable": true + "isSuccess": { + "type": "boolean" }, - "status": { - "$ref": "#/components/schemas/StatusType" + "error": { + "$ref": "#/components/schemas/ErrorContract" }, - "totalAmount": { - "type": "number", - "format": "double" + "success": { + "$ref": "#/components/schemas/SuccessContract" }, - "url": { - "type": "string", - "nullable": true + "result": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/ProductContract" + } }, - "uniqueIdentity": { - "type": "string", - "nullable": true + "hasItems": { + "type": "boolean", + "readOnly": true } } }, - "MessageContract": { + "ProductContractMessageContract": { + "title": "MessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -2286,28 +4365,56 @@ }, "error": { "$ref": "#/components/schemas/ErrorContract" + }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, + "result": { + "$ref": "#/components/schemas/ProductContract" } } }, - "ProductContract": { + "RequestUrlType": { + "type": "integer", + "format": "int32", + "x-enumNames": [ + "None", + "Default", + "All", + "Other", + "Unknown", + "Nothing", + "SuccessUrl", + "CancelUrl", + "RedirectUrl" + ], + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8 + ] + }, + "ServiceAddressContract": { "type": "object", "additionalProperties": false, "properties": { - "id": { + "serviceId": { "type": "integer", "format": "int64" }, - "invoiceId": { + "id": { "type": "integer", "format": "int64" }, - "name": { - "type": "string", - "nullable": true - }, - "amount": { - "type": "number", - "format": "double" + "address": { + "type": "string", + "nullable": true }, "uniqueIdentity": { "type": "string", @@ -2334,8 +4441,8 @@ } } }, - "ProductContractListMessageContract": { - "title": "MessageContract", + "ServiceAddressContractListMessageContract": { + "title": "ListMessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -2345,18 +4452,25 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, "result": { - "title": "List", + "title": "List", "type": "array", "nullable": true, "items": { - "$ref": "#/components/schemas/ProductContract" + "$ref": "#/components/schemas/ServiceAddressContract" } + }, + "hasItems": { + "type": "boolean", + "readOnly": true } } }, - "ProductContractMessageContract": { - "title": "MessageContract", + "ServiceAddressContractMessageContract": { + "title": "MessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -2366,34 +4480,15 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, - "result": { - "$ref": "#/components/schemas/ProductContract" - } - } - }, - "ProudctCreateRequestContract": { - "type": "object", - "additionalProperties": false, - "properties": { - "invoiceId": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string", - "nullable": true - }, - "amount": { - "type": "number", - "format": "double" + "success": { + "$ref": "#/components/schemas/SuccessContract" }, - "uniqueIdentity": { - "type": "string", - "nullable": true + "result": { + "$ref": "#/components/schemas/ServiceAddressContract" } } }, - "ProudctUpdateRequestContract": { + "ServiceContract": { "type": "object", "additionalProperties": false, "properties": { @@ -2401,37 +4496,11 @@ "type": "integer", "format": "int64" }, - "invoiceId": { - "type": "integer", - "format": "int64" - }, "name": { "type": "string", "nullable": true }, - "amount": { - "type": "number", - "format": "double" - }, - "uniqueIdentity": { - "type": "string", - "nullable": true - } - } - }, - "ServiceAddressContract": { - "type": "object", - "additionalProperties": false, - "properties": { - "serviceId": { - "type": "integer", - "format": "int64" - }, - "id": { - "type": "integer", - "format": "int64" - }, - "address": { + "description": { "type": "string", "nullable": true }, @@ -2460,8 +4529,8 @@ } } }, - "ServiceAddressContractListMessageContract": { - "title": "MessageContract", + "ServiceContractListMessageContract": { + "title": "ListMessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -2471,18 +4540,25 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, "result": { - "title": "List", + "title": "List", "type": "array", "nullable": true, "items": { - "$ref": "#/components/schemas/ServiceAddressContract" + "$ref": "#/components/schemas/ServiceContract" } + }, + "hasItems": { + "type": "boolean", + "readOnly": true } } }, - "ServiceAddressContractMessageContract": { - "title": "MessageContract", + "ServiceContractMessageContract": { + "title": "MessageContract", "type": "object", "additionalProperties": false, "properties": { @@ -2492,30 +4568,47 @@ "error": { "$ref": "#/components/schemas/ErrorContract" }, + "success": { + "$ref": "#/components/schemas/SuccessContract" + }, "result": { - "$ref": "#/components/schemas/ServiceAddressContract" + "$ref": "#/components/schemas/ServiceContract" } } }, - "ServiceAddressCreateRequestContract": { + "ServiceDetailsContract": { "type": "object", "additionalProperties": false, "properties": { - "serviceId": { - "type": "integer", - "format": "int64" + "servieRouteAddress": { + "type": "string", + "nullable": true }, - "address": { + "methodName": { "type": "string", "nullable": true }, - "uniqueIdentity": { + "path": { + "type": "string", + "nullable": true + }, + "porjectName": { + "type": "string", + "nullable": true + } + } + }, + "SuccessContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "endUserMessage": { "type": "string", "nullable": true } } }, - "ServiceAddressUpdateRequestContract": { + "UpdateOrderRequestContract": { "type": "object", "additionalProperties": false, "properties": { @@ -2531,13 +4624,39 @@ "type": "string", "nullable": true }, + "status": { + "$ref": "#/components/schemas/OrderStatusType" + }, + "totalAmount": { + "type": "number", + "format": "double" + }, + "url": { + "type": "string", + "nullable": true + }, "uniqueIdentity": { "type": "string", "nullable": true } } }, - "ServiceContract": { + "UpdateOrderRequestContractUpdateBulkRequestContract": { + "title": "UpdateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/UpdateOrderRequestContract" + } + } + } + }, + "UpdateOrderStatusHistoryRequestContract": { "type": "object", "additionalProperties": false, "properties": { @@ -2545,85 +4664,88 @@ "type": "integer", "format": "int64" }, - "name": { - "type": "string", - "nullable": true + "orderId": { + "type": "integer", + "format": "int64" }, - "description": { - "type": "string", - "nullable": true + "status": { + "$ref": "#/components/schemas/OrderStatusType" }, "uniqueIdentity": { "type": "string", "nullable": true + } + } + }, + "UpdateOrderStatusHistoryRequestContractUpdateBulkRequestContract": { + "title": "UpdateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/UpdateOrderStatusHistoryRequestContract" + } + } + } + }, + "UpdateProudctRequestContract": { + "type": "object", + "additionalProperties": false, + "properties": { + "id": { + "type": "integer", + "format": "int64" }, - "creationDateTime": { - "type": "string", - "format": "date-time" + "orderId": { + "type": "integer", + "format": "int64" }, - "modificationDateTime": { - "title": "Nullable", + "name": { "type": "string", - "format": "date-time", "nullable": true }, - "isDeleted": { - "type": "boolean" + "amount": { + "type": "number", + "format": "double" }, - "deletedDateTime": { - "title": "Nullable", + "uniqueIdentity": { "type": "string", - "format": "date-time", "nullable": true } } }, - "ServiceContractListMessageContract": { - "title": "MessageContract", + "UpdateProudctRequestContractUpdateBulkRequestContract": { + "title": "UpdateBulkRequestContract", "type": "object", "additionalProperties": false, "properties": { - "isSuccess": { - "type": "boolean" - }, - "error": { - "$ref": "#/components/schemas/ErrorContract" - }, - "result": { - "title": "List", + "items": { + "title": "List", "type": "array", "nullable": true, "items": { - "$ref": "#/components/schemas/ServiceContract" + "$ref": "#/components/schemas/UpdateProudctRequestContract" } } } }, - "ServiceContractMessageContract": { - "title": "MessageContract", + "UpdateServiceAddressRequestContract": { "type": "object", "additionalProperties": false, "properties": { - "isSuccess": { - "type": "boolean" - }, - "error": { - "$ref": "#/components/schemas/ErrorContract" + "id": { + "type": "integer", + "format": "int64" }, - "result": { - "$ref": "#/components/schemas/ServiceContract" - } - } - }, - "ServiceCreateRequestContract": { - "type": "object", - "additionalProperties": false, - "properties": { - "name": { - "type": "string", - "nullable": true + "serviceId": { + "type": "integer", + "format": "int64" }, - "description": { + "address": { "type": "string", "nullable": true }, @@ -2633,7 +4755,22 @@ } } }, - "ServiceUpdateRequestContract": { + "UpdateServiceAddressRequestContractUpdateBulkRequestContract": { + "title": "UpdateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/UpdateServiceAddressRequestContract" + } + } + } + }, + "UpdateServiceRequestContract": { "type": "object", "additionalProperties": false, "properties": { @@ -2655,41 +4792,20 @@ } } }, - "StatusType": { - "type": "integer", - "format": "int32", - "x-enumNames": [ - "None", - "Default", - "All", - "Other", - "Unknown", - "Nothing", - "Created", - "RedirectedToBankPortal", - "Paied", - "Canceled", - "Failed", - "Successful", - "Closed", - "PaidBack" - ], - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13 - ] + "UpdateServiceRequestContractUpdateBulkRequestContract": { + "title": "UpdateBulkRequestContract", + "type": "object", + "additionalProperties": false, + "properties": { + "items": { + "title": "List", + "type": "array", + "nullable": true, + "items": { + "$ref": "#/components/schemas/UpdateServiceRequestContract" + } + } + } }, "ValidationContract": { "type": "object",