-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreturn.proto
58 lines (48 loc) · 1.7 KB
/
return.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
syntax = "proto3";
option csharp_namespace = "GsServer.Protobufs";
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.return;
service ReturnService {
rpc GetPaginatedAsync(GetPaginatedReturnsRequest) returns (GetPaginatedReturnsResponse);
rpc GetByIdAsync(GetReturnByIdRequest) returns (GetReturnByIdResponse);
rpc PostAsync(CreateReturnRequest) returns (custom_types.void.VoidValue);
rpc PutAsync(UpdateReturnRequest) returns (custom_types.void.VoidValue);
rpc DeleteAsync(DeleteReturnRequest) returns (custom_types.void.VoidValue);
}
message GetPaginatedReturnsRequest {
google.protobuf.StringValue cursor = 1;
}
message GetPaginatedReturnsResponse {
repeated GetReturnByIdResponse returns = 1;
google.protobuf.StringValue next_cursor = 2;
}
message GetReturnByIdRequest {
string return_id = 1;
}
message GetReturnByIdResponse {
string return_id = 1;
string sale_id = 2;
custom_types.decimal_value.DecimalValue total_amount_refunded = 3;
repeated ReturnItem ItemsReturned = 4;
}
message CreateReturnRequest {
google.protobuf.StringValue sale_id = 1;
custom_types.decimal_value.DecimalValue total_amount_refunded = 2;
repeated ReturnItem ItemsReturned = 3;
}
message UpdateReturnRequest {
string return_id = 1;
google.protobuf.StringValue sale_id = 2;
custom_types.decimal_value.DecimalValue total_amount_refunded = 3;
repeated ReturnItem ItemsReturned = 4;
}
message DeleteReturnRequest {
string return_id = 1;
}
message ReturnItem {
string product_variant_id = 1;
custom_types.decimal_value.DecimalValue unit_price = 2;
int32 quantity_returned = 3;
}