81 lines
2.0 KiB
Protocol Buffer
81 lines
2.0 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package payments.methods.v1;
|
|
|
|
option go_package = "github.com/tech/sendico/pkg/proto/payments/methods/v1;methodsv1";
|
|
|
|
import "google/protobuf/wrappers.proto";
|
|
|
|
message ViewCursor {
|
|
google.protobuf.Int64Value limit = 1;
|
|
google.protobuf.Int64Value offset = 2;
|
|
google.protobuf.BoolValue is_archived = 3;
|
|
}
|
|
|
|
|
|
message CreatePaymentMethodRequest {
|
|
string account_ref = 1;
|
|
string organization_ref = 2;
|
|
bytes payment_method_json = 3;
|
|
}
|
|
|
|
message CreatePaymentMethodResponse {
|
|
bytes payment_method_json = 1;
|
|
}
|
|
|
|
message GetPaymentMethodRequest {
|
|
string account_ref = 1;
|
|
string payment_method_ref = 2;
|
|
}
|
|
|
|
message GetPaymentMethodResponse {
|
|
bytes payment_method_json = 1;
|
|
}
|
|
|
|
message UpdatePaymentMethodRequest {
|
|
string account_ref = 1;
|
|
bytes payment_method_json = 2;
|
|
}
|
|
|
|
message UpdatePaymentMethodResponse {
|
|
bytes payment_method_json = 1;
|
|
}
|
|
|
|
message DeletePaymentMethodRequest {
|
|
string account_ref = 1;
|
|
string payment_method_ref = 2;
|
|
bool cascade = 3;
|
|
}
|
|
|
|
message DeletePaymentMethodResponse {}
|
|
|
|
message SetPaymentMethodArchivedRequest {
|
|
string account_ref = 1;
|
|
string organization_ref = 2;
|
|
string payment_method_ref = 3;
|
|
bool archived = 4;
|
|
bool cascade = 5;
|
|
}
|
|
|
|
message SetPaymentMethodArchivedResponse {}
|
|
|
|
message ListPaymentMethodsRequest {
|
|
string account_ref = 1;
|
|
string organization_ref = 2;
|
|
string recipient_ref = 3;
|
|
ViewCursor cursor = 4;
|
|
}
|
|
|
|
message ListPaymentMethodsResponse {
|
|
repeated bytes payment_methods_json = 1;
|
|
}
|
|
|
|
service PaymentMethodsService {
|
|
rpc CreatePaymentMethod(CreatePaymentMethodRequest) returns (CreatePaymentMethodResponse);
|
|
rpc GetPaymentMethod(GetPaymentMethodRequest) returns (GetPaymentMethodResponse);
|
|
rpc UpdatePaymentMethod(UpdatePaymentMethodRequest) returns (UpdatePaymentMethodResponse);
|
|
rpc DeletePaymentMethod(DeletePaymentMethodRequest) returns (DeletePaymentMethodResponse);
|
|
rpc SetPaymentMethodArchived(SetPaymentMethodArchivedRequest) returns (SetPaymentMethodArchivedResponse);
|
|
rpc ListPaymentMethods(ListPaymentMethodsRequest) returns (ListPaymentMethodsResponse);
|
|
}
|