183 lines
		
	
	
		
			5.9 KiB
		
	
	
	
		
			Dart
		
	
	
	
			
		
		
	
	
			183 lines
		
	
	
		
			5.9 KiB
		
	
	
	
		
			Dart
		
	
	
	
| // This is a generated file - do not edit.
 | |
| //
 | |
| // Generated from payment.proto.
 | |
| 
 | |
| // @dart = 3.3
 | |
| 
 | |
| // ignore_for_file: annotate_overrides, camel_case_types, comment_references
 | |
| // ignore_for_file: constant_identifier_names
 | |
| // ignore_for_file: curly_braces_in_flow_control_structures
 | |
| // ignore_for_file: deprecated_member_use_from_same_package, library_prefixes
 | |
| // ignore_for_file: non_constant_identifier_names
 | |
| 
 | |
| import 'dart:async' as $async;
 | |
| import 'dart:core' as $core;
 | |
| 
 | |
| import 'package:grpc/service_api.dart' as $grpc;
 | |
| import 'package:protobuf/protobuf.dart' as $pb;
 | |
| 
 | |
| import 'blocks.pb.dart' as $1;
 | |
| import 'payment.pb.dart' as $0;
 | |
| 
 | |
| export 'payment.pb.dart';
 | |
| 
 | |
| @$pb.GrpcServiceName('wallet.Payment')
 | |
| class PaymentClient extends $grpc.Client {
 | |
|   /// The hostname for this service.
 | |
|   static const $core.String defaultHost = '';
 | |
| 
 | |
|   /// OAuth scopes needed for the client.
 | |
|   static const $core.List<$core.String> oauthScopes = [
 | |
|     '',
 | |
|   ];
 | |
| 
 | |
|   PaymentClient(super.channel, {super.options, super.interceptors});
 | |
| 
 | |
|   /// 获取平台支持的支付网关
 | |
|   $grpc.ResponseFuture<$0.WayReply> way(
 | |
|     $0.WayRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$way, request, options: options);
 | |
|   }
 | |
| 
 | |
|   /// 获取支付的详情
 | |
|   $grpc.ResponseFuture<$0.PaymentItem> get(
 | |
|     $1.IdentRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$get, request, options: options);
 | |
|   }
 | |
| 
 | |
|   /// 支付-电商订单
 | |
|   $grpc.ResponseFuture<$0.PaymentReply> byOrder(
 | |
|     $0.OrderRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$byOrder, request, options: options);
 | |
|   }
 | |
| 
 | |
|   /// 支付-充值
 | |
|   $grpc.ResponseFuture<$0.PaymentReply> byCharge(
 | |
|     $0.ChargeRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$byCharge, request, options: options);
 | |
|   }
 | |
| 
 | |
|   /// 回调更新支付的结果和状态
 | |
|   $grpc.ResponseFuture<$1.StatusReply> callback(
 | |
|     $0.CallbackRequest request, {
 | |
|     $grpc.CallOptions? options,
 | |
|   }) {
 | |
|     return $createUnaryCall(_$callback, request, options: options);
 | |
|   }
 | |
| 
 | |
|   // method descriptors
 | |
| 
 | |
|   static final _$way = $grpc.ClientMethod<$0.WayRequest, $0.WayReply>(
 | |
|       '/wallet.Payment/Way',
 | |
|       ($0.WayRequest value) => value.writeToBuffer(),
 | |
|       $0.WayReply.fromBuffer);
 | |
|   static final _$get = $grpc.ClientMethod<$1.IdentRequest, $0.PaymentItem>(
 | |
|       '/wallet.Payment/Get',
 | |
|       ($1.IdentRequest value) => value.writeToBuffer(),
 | |
|       $0.PaymentItem.fromBuffer);
 | |
|   static final _$byOrder = $grpc.ClientMethod<$0.OrderRequest, $0.PaymentReply>(
 | |
|       '/wallet.Payment/ByOrder',
 | |
|       ($0.OrderRequest value) => value.writeToBuffer(),
 | |
|       $0.PaymentReply.fromBuffer);
 | |
|   static final _$byCharge =
 | |
|       $grpc.ClientMethod<$0.ChargeRequest, $0.PaymentReply>(
 | |
|           '/wallet.Payment/ByCharge',
 | |
|           ($0.ChargeRequest value) => value.writeToBuffer(),
 | |
|           $0.PaymentReply.fromBuffer);
 | |
|   static final _$callback =
 | |
|       $grpc.ClientMethod<$0.CallbackRequest, $1.StatusReply>(
 | |
|           '/wallet.Payment/Callback',
 | |
|           ($0.CallbackRequest value) => value.writeToBuffer(),
 | |
|           $1.StatusReply.fromBuffer);
 | |
| }
 | |
| 
 | |
| @$pb.GrpcServiceName('wallet.Payment')
 | |
| abstract class PaymentServiceBase extends $grpc.Service {
 | |
|   $core.String get $name => 'wallet.Payment';
 | |
| 
 | |
|   PaymentServiceBase() {
 | |
|     $addMethod($grpc.ServiceMethod<$0.WayRequest, $0.WayReply>(
 | |
|         'Way',
 | |
|         way_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) => $0.WayRequest.fromBuffer(value),
 | |
|         ($0.WayReply value) => value.writeToBuffer()));
 | |
|     $addMethod($grpc.ServiceMethod<$1.IdentRequest, $0.PaymentItem>(
 | |
|         'Get',
 | |
|         get_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) => $1.IdentRequest.fromBuffer(value),
 | |
|         ($0.PaymentItem value) => value.writeToBuffer()));
 | |
|     $addMethod($grpc.ServiceMethod<$0.OrderRequest, $0.PaymentReply>(
 | |
|         'ByOrder',
 | |
|         byOrder_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) => $0.OrderRequest.fromBuffer(value),
 | |
|         ($0.PaymentReply value) => value.writeToBuffer()));
 | |
|     $addMethod($grpc.ServiceMethod<$0.ChargeRequest, $0.PaymentReply>(
 | |
|         'ByCharge',
 | |
|         byCharge_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) => $0.ChargeRequest.fromBuffer(value),
 | |
|         ($0.PaymentReply value) => value.writeToBuffer()));
 | |
|     $addMethod($grpc.ServiceMethod<$0.CallbackRequest, $1.StatusReply>(
 | |
|         'Callback',
 | |
|         callback_Pre,
 | |
|         false,
 | |
|         false,
 | |
|         ($core.List<$core.int> value) => $0.CallbackRequest.fromBuffer(value),
 | |
|         ($1.StatusReply value) => value.writeToBuffer()));
 | |
|   }
 | |
| 
 | |
|   $async.Future<$0.WayReply> way_Pre(
 | |
|       $grpc.ServiceCall $call, $async.Future<$0.WayRequest> $request) async {
 | |
|     return way($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$0.WayReply> way($grpc.ServiceCall call, $0.WayRequest request);
 | |
| 
 | |
|   $async.Future<$0.PaymentItem> get_Pre(
 | |
|       $grpc.ServiceCall $call, $async.Future<$1.IdentRequest> $request) async {
 | |
|     return get($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$0.PaymentItem> get(
 | |
|       $grpc.ServiceCall call, $1.IdentRequest request);
 | |
| 
 | |
|   $async.Future<$0.PaymentReply> byOrder_Pre(
 | |
|       $grpc.ServiceCall $call, $async.Future<$0.OrderRequest> $request) async {
 | |
|     return byOrder($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$0.PaymentReply> byOrder(
 | |
|       $grpc.ServiceCall call, $0.OrderRequest request);
 | |
| 
 | |
|   $async.Future<$0.PaymentReply> byCharge_Pre(
 | |
|       $grpc.ServiceCall $call, $async.Future<$0.ChargeRequest> $request) async {
 | |
|     return byCharge($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$0.PaymentReply> byCharge(
 | |
|       $grpc.ServiceCall call, $0.ChargeRequest request);
 | |
| 
 | |
|   $async.Future<$1.StatusReply> callback_Pre($grpc.ServiceCall $call,
 | |
|       $async.Future<$0.CallbackRequest> $request) async {
 | |
|     return callback($call, await $request);
 | |
|   }
 | |
| 
 | |
|   $async.Future<$1.StatusReply> callback(
 | |
|       $grpc.ServiceCall call, $0.CallbackRequest request);
 | |
| }
 |