-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpromotion.proto
65 lines (56 loc) · 1.95 KB
/
promotion.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
syntax = "proto3";
option csharp_namespace = "GsServer.Protobufs";
import "gs_protobufs/protos/custom_types/calendar_date.proto";
import "gs_protobufs/protos/custom_types/void_value.proto";
import "gs_protobufs/protos/customer.proto";
import "google/protobuf/wrappers.proto";
package protos.promotion;
service PromotionService {
rpc GetPaginatedAsync(GetPaginatedPromotionsRequest) returns (GetPaginatedPromotionsResponse);
rpc GetByIdAsync(GetPromotionByIdRequest) returns (GetPromotionByIdResponse);
rpc PostAsync(CreatePromotionRequest) returns (custom_types.void.VoidValue);
rpc PutAsync(UpdatePromotionRequest) returns (custom_types.void.VoidValue);
rpc DeleteAsync(DeletePromotionRequest) returns (custom_types.void.VoidValue);
}
message GetPaginatedPromotionsRequest {
google.protobuf.StringValue cursor = 1;
}
message GetPaginatedPromotionsResponse {
repeated GetPromotionByIdResponse promotions = 1;
google.protobuf.StringValue next_cursor = 2;
}
message GetPromotionByIdRequest {
string promotion_id = 1;
}
message GetPromotionByIdResponse {
string promotion_id = 1;
customer.GetCustomerByIdResponse customer = 2;
string name = 3;
string description = 4;
string discount_type = 5;
custom_types.calendar_date.CalendarDate start_date = 6;
custom_types.calendar_date.CalendarDate end_date = 7;
bool is_active = 8;
}
message CreatePromotionRequest {
string customer_id = 3;
string name = 4;
string description = 5;
string discount_type = 6;
custom_types.calendar_date.CalendarDate start_date = 7;
custom_types.calendar_date.CalendarDate end_date = 8;
bool is_active = 9;
}
message UpdatePromotionRequest {
string promotion_id = 1;
string customer_id = 2;
string name = 3;
string description = 4;
string discount_type = 5;
custom_types.calendar_date.CalendarDate start_date = 6;
custom_types.calendar_date.CalendarDate end_date = 7;
bool is_active = 8;
}
message DeletePromotionRequest {
string promotion_id = 1;
}