Browse Source

Generate client-proxies for payment service

pull/63/head
enisn 5 years ago
parent
commit
7d2c2c6469
  1. 20
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.Generated.cs
  2. 7
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.cs
  3. 74
      services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/payment-generate-proxy.json

20
services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.Generated.cs

@ -9,16 +9,17 @@ using Volo.Abp.Http.Client.ClientProxying;
using EShopOnAbp.PaymentService.PaymentRequests;
// ReSharper disable once CheckNamespace
namespace EShopOnAbp.PaymentService.Controllers.ClientProxies
namespace EShopOnAbp.PaymentService.Controllers.ClientProxies;
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IPaymentRequestAppService), typeof(PaymentRequestClientProxy))]
public partial class PaymentRequestClientProxy : ClientProxyBase<IPaymentRequestAppService>, IPaymentRequestAppService
{
[Dependency(ReplaceServices = true)]
[ExposeServices(typeof(IPaymentRequestAppService), typeof(PaymentRequestClientProxy))]
public partial class PaymentRequestClientProxy : ClientProxyBase<IPaymentRequestAppService>, IPaymentRequestAppService
{
public virtual async Task<PaymentRequestDto> CompleteAsync(PaymentRequestCompleteInputDto input)
public virtual async Task<PaymentRequestDto> CompleteAsync(string paymentType, PaymentRequestCompleteInputDto input)
{
return await RequestAsync<PaymentRequestDto>(nameof(CompleteAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), paymentType },
{ typeof(PaymentRequestCompleteInputDto), input }
});
}
@ -31,20 +32,21 @@ namespace EShopOnAbp.PaymentService.Controllers.ClientProxies
});
}
public virtual async Task<bool> HandleWebhookAsync(string payload)
public virtual async Task<bool> HandleWebhookAsync(string paymentType, string payload)
{
return await RequestAsync<bool>(nameof(HandleWebhookAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), paymentType },
{ typeof(string), payload }
});
}
public virtual async Task<PaymentRequestStartResultDto> StartAsync(PaymentRequestStartDto input)
public virtual async Task<PaymentRequestStartResultDto> StartAsync(string paymentType, PaymentRequestStartDto input)
{
return await RequestAsync<PaymentRequestStartResultDto>(nameof(StartAsync), new ClientProxyRequestTypeValue
{
{ typeof(string), paymentType },
{ typeof(PaymentRequestStartDto), input }
});
}
}
}

7
services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/PaymentRequestClientProxy.cs

@ -1,8 +1,7 @@
// This file is part of PaymentRequestClientProxy, you can customize it here
// ReSharper disable once CheckNamespace
namespace EShopOnAbp.PaymentService.Controllers.ClientProxies
namespace EShopOnAbp.PaymentService.Controllers.ClientProxies;
public partial class PaymentRequestClientProxy
{
public partial class PaymentRequestClientProxy
{
}
}

74
services/payment/src/EShopOnAbp.PaymentService.HttpApi.Client/ClientProxies/payment-generate-proxy.json

@ -14,13 +14,21 @@
}
],
"actions": {
"CompleteAsyncByInput": {
"uniqueName": "CompleteAsyncByInput",
"CompleteAsyncByPaymentTypeAndInput": {
"uniqueName": "CompleteAsyncByPaymentTypeAndInput",
"name": "CompleteAsync",
"httpMethod": "POST",
"url": "api/payment/requests/complete",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "paymentType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestCompleteInputDto, EShopOnAbp.PaymentService.Application.Contracts",
@ -31,6 +39,18 @@
}
],
"parameters": [
{
"nameOnMethod": "paymentType",
"name": "paymentType",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": ""
},
{
"nameOnMethod": "input",
"name": "input",
@ -88,13 +108,21 @@
"allowAnonymous": null,
"implementFrom": "EShopOnAbp.PaymentService.PaymentRequests.IPaymentRequestAppService"
},
"HandleWebhookAsyncByPayload": {
"uniqueName": "HandleWebhookAsyncByPayload",
"HandleWebhookAsyncByPaymentTypeAndPayload": {
"uniqueName": "HandleWebhookAsyncByPaymentTypeAndPayload",
"name": "HandleWebhookAsync",
"httpMethod": "POST",
"url": "api/payment/requests/webhook",
"url": "api/payment/requests/{paymentType}/webhook",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "paymentType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "payload",
"typeAsString": "System.String, System.Private.CoreLib",
@ -105,6 +133,18 @@
}
],
"parameters": [
{
"nameOnMethod": "paymentType",
"name": "paymentType",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
},
{
"nameOnMethod": "payload",
"name": "payload",
@ -125,13 +165,21 @@
"allowAnonymous": null,
"implementFrom": "EShopOnAbp.PaymentService.PaymentRequests.IPaymentRequestAppService"
},
"StartAsyncByInput": {
"uniqueName": "StartAsyncByInput",
"StartAsyncByPaymentTypeAndInput": {
"uniqueName": "StartAsyncByPaymentTypeAndInput",
"name": "StartAsync",
"httpMethod": "POST",
"url": "api/payment/requests/start",
"supportedVersions": [],
"parametersOnMethod": [
{
"name": "paymentType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{
"name": "input",
"typeAsString": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestStartDto, EShopOnAbp.PaymentService.Application.Contracts",
@ -142,6 +190,18 @@
}
],
"parameters": [
{
"nameOnMethod": "paymentType",
"name": "paymentType",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": ""
},
{
"nameOnMethod": "input",
"name": "input",

Loading…
Cancel
Save