-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayment.proto
59 lines (49 loc) · 1.7 KB
/
payment.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
syntax = "proto3";
option csharp_namespace = "GsServer.Protobufs";
import "gs_protobufs/protos/custom_types/calendar_date.proto";
import "gs_protobufs/protos/custom_types/decimal_value.proto";
import "gs_protobufs/protos/custom_types/void_value.proto";
import "google/protobuf/wrappers.proto";
package protos.payment;
service PaymentService {
rpc GetPaginatedAsync(GetPaginatedPaymentsRequest) returns (GetPaginatedPaymentsResponse);
rpc GetByIdAsync(GetPaymentByIdRequest) returns (GetPaymentByIdResponse);
rpc PostAsync(CreatePaymentRequest) returns (custom_types.void.VoidValue);
rpc PutAsync(UpdatePaymentRequest) returns (custom_types.void.VoidValue);
rpc DeleteAsync(DeletePaymentRequest) returns (custom_types.void.VoidValue);
}
message GetPaginatedPaymentsRequest {
google.protobuf.StringValue cursor = 1;
}
message GetPaginatedPaymentsResponse {
repeated GetPaymentByIdResponse payments = 1;
google.protobuf.StringValue next_cursor = 2;
}
message GetPaymentByIdRequest {
string payment_id = 1;
}
message GetPaymentByIdResponse {
string payment_id = 1;
string observations = 2;
repeated PaymentInstallment installments = 3;
}
message CreatePaymentRequest {
string observations = 1;
repeated PaymentInstallment installments = 2;
}
message UpdatePaymentRequest {
string payment_id = 1;
string observations = 2;
repeated PaymentInstallment installments = 3;
}
message DeletePaymentRequest {
string payment_id = 1;
}
message PaymentInstallment {
string payment_installment_id = 1;
string payment_id = 2;
int32 installment_number = 3;
custom_types.decimal_value.DecimalValue installment_amount = 4;
string payment_method = 5;
custom_types.calendar_date.CalendarDate due_date = 6;
}