-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsubscription.proto
68 lines (58 loc) · 2.23 KB
/
subscription.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
60
61
62
63
64
65
66
67
68
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 "gs_protobufs/protos/discipline.proto";
import "gs_protobufs/protos/customer.proto";
import "google/protobuf/wrappers.proto";
package protos.subscription;
service SubscriptionService {
rpc GetPaginatedAsync(GetPaginatedSubscriptionsRequest) returns (GetPaginatedSubscriptionsResponse);
rpc GetByIdAsync(GetSubscriptionByIdRequest) returns (GetSubscriptionByIdResponse);
rpc PostAsync(CreateSubscriptionRequest) returns (custom_types.void.VoidValue);
rpc PutAsync(UpdateSubscriptionRequest) returns (custom_types.void.VoidValue);
rpc DeleteAsync(DeleteSubscriptionRequest) returns (custom_types.void.VoidValue);
}
message GetPaginatedSubscriptionsRequest {
google.protobuf.StringValue cursor = 1;
}
message GetPaginatedSubscriptionsResponse {
repeated GetSubscriptionByIdResponse subscriptions = 1;
google.protobuf.StringValue next_cursor = 2;
}
message GetSubscriptionByIdRequest {
string subscription_id = 1;
}
message GetSubscriptionByIdResponse {
string subscription_id = 1;
discipline.GetDisciplineByIdResponse discipline = 2;
customer.GetCustomerByIdResponse customer = 3;
int32 pay_day = 4;
custom_types.calendar_date.CalendarDate start_date = 5;
custom_types.calendar_date.CalendarDate end_date = 6;
custom_types.decimal_value.DecimalValue price = 7;
bool is_active = 8;
}
message CreateSubscriptionRequest {
string discipline_id = 1;
string customer_id = 2;
int32 pay_day = 3;
custom_types.calendar_date.CalendarDate start_date = 4;
custom_types.calendar_date.CalendarDate end_date = 5;
custom_types.decimal_value.DecimalValue price = 6;
bool is_active = 7;
}
message UpdateSubscriptionRequest {
string subscription_id = 1;
string discipline_id = 2;
string customer_id = 3;
int32 pay_day = 4;
custom_types.calendar_date.CalendarDate start_date = 5;
custom_types.calendar_date.CalendarDate end_date = 6;
custom_types.decimal_value.DecimalValue price = 7;
bool is_active = 8;
}
message DeleteSubscriptionRequest {
string subscription_id = 1;
}