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; using EShopOnAbp.PaymentService.PaymentRequests;
// ReSharper disable once CheckNamespace // 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)] public virtual async Task<PaymentRequestDto> CompleteAsync(string paymentType, PaymentRequestCompleteInputDto input)
[ExposeServices(typeof(IPaymentRequestAppService), typeof(PaymentRequestClientProxy))]
public partial class PaymentRequestClientProxy : ClientProxyBase<IPaymentRequestAppService>, IPaymentRequestAppService
{
public virtual async Task<PaymentRequestDto> CompleteAsync(PaymentRequestCompleteInputDto input)
{ {
return await RequestAsync<PaymentRequestDto>(nameof(CompleteAsync), new ClientProxyRequestTypeValue return await RequestAsync<PaymentRequestDto>(nameof(CompleteAsync), new ClientProxyRequestTypeValue
{ {
{ typeof(string), paymentType },
{ typeof(PaymentRequestCompleteInputDto), input } { 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 return await RequestAsync<bool>(nameof(HandleWebhookAsync), new ClientProxyRequestTypeValue
{ {
{ typeof(string), paymentType },
{ typeof(string), payload } { 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 return await RequestAsync<PaymentRequestStartResultDto>(nameof(StartAsync), new ClientProxyRequestTypeValue
{ {
{ typeof(string), paymentType },
{ typeof(PaymentRequestStartDto), input } { 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 // This file is part of PaymentRequestClientProxy, you can customize it here
// ReSharper disable once CheckNamespace // 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": { "actions": {
"CompleteAsyncByInput": { "CompleteAsyncByPaymentTypeAndInput": {
"uniqueName": "CompleteAsyncByInput", "uniqueName": "CompleteAsyncByPaymentTypeAndInput",
"name": "CompleteAsync", "name": "CompleteAsync",
"httpMethod": "POST", "httpMethod": "POST",
"url": "api/payment/requests/complete", "url": "api/payment/requests/complete",
"supportedVersions": [], "supportedVersions": [],
"parametersOnMethod": [ "parametersOnMethod": [
{
"name": "paymentType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{ {
"name": "input", "name": "input",
"typeAsString": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestCompleteInputDto, EShopOnAbp.PaymentService.Application.Contracts", "typeAsString": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestCompleteInputDto, EShopOnAbp.PaymentService.Application.Contracts",
@ -31,6 +39,18 @@
} }
], ],
"parameters": [ "parameters": [
{
"nameOnMethod": "paymentType",
"name": "paymentType",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": ""
},
{ {
"nameOnMethod": "input", "nameOnMethod": "input",
"name": "input", "name": "input",
@ -88,13 +108,21 @@
"allowAnonymous": null, "allowAnonymous": null,
"implementFrom": "EShopOnAbp.PaymentService.PaymentRequests.IPaymentRequestAppService" "implementFrom": "EShopOnAbp.PaymentService.PaymentRequests.IPaymentRequestAppService"
}, },
"HandleWebhookAsyncByPayload": { "HandleWebhookAsyncByPaymentTypeAndPayload": {
"uniqueName": "HandleWebhookAsyncByPayload", "uniqueName": "HandleWebhookAsyncByPaymentTypeAndPayload",
"name": "HandleWebhookAsync", "name": "HandleWebhookAsync",
"httpMethod": "POST", "httpMethod": "POST",
"url": "api/payment/requests/webhook", "url": "api/payment/requests/{paymentType}/webhook",
"supportedVersions": [], "supportedVersions": [],
"parametersOnMethod": [ "parametersOnMethod": [
{
"name": "paymentType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{ {
"name": "payload", "name": "payload",
"typeAsString": "System.String, System.Private.CoreLib", "typeAsString": "System.String, System.Private.CoreLib",
@ -105,6 +133,18 @@
} }
], ],
"parameters": [ "parameters": [
{
"nameOnMethod": "paymentType",
"name": "paymentType",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": [],
"bindingSourceId": "Path",
"descriptorName": ""
},
{ {
"nameOnMethod": "payload", "nameOnMethod": "payload",
"name": "payload", "name": "payload",
@ -125,13 +165,21 @@
"allowAnonymous": null, "allowAnonymous": null,
"implementFrom": "EShopOnAbp.PaymentService.PaymentRequests.IPaymentRequestAppService" "implementFrom": "EShopOnAbp.PaymentService.PaymentRequests.IPaymentRequestAppService"
}, },
"StartAsyncByInput": { "StartAsyncByPaymentTypeAndInput": {
"uniqueName": "StartAsyncByInput", "uniqueName": "StartAsyncByPaymentTypeAndInput",
"name": "StartAsync", "name": "StartAsync",
"httpMethod": "POST", "httpMethod": "POST",
"url": "api/payment/requests/start", "url": "api/payment/requests/start",
"supportedVersions": [], "supportedVersions": [],
"parametersOnMethod": [ "parametersOnMethod": [
{
"name": "paymentType",
"typeAsString": "System.String, System.Private.CoreLib",
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null
},
{ {
"name": "input", "name": "input",
"typeAsString": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestStartDto, EShopOnAbp.PaymentService.Application.Contracts", "typeAsString": "EShopOnAbp.PaymentService.PaymentRequests.PaymentRequestStartDto, EShopOnAbp.PaymentService.Application.Contracts",
@ -142,6 +190,18 @@
} }
], ],
"parameters": [ "parameters": [
{
"nameOnMethod": "paymentType",
"name": "paymentType",
"jsonName": null,
"type": "System.String",
"typeSimple": "string",
"isOptional": false,
"defaultValue": null,
"constraintTypes": null,
"bindingSourceId": "ModelBinding",
"descriptorName": ""
},
{ {
"nameOnMethod": "input", "nameOnMethod": "input",
"name": "input", "name": "input",

Loading…
Cancel
Save