Files
sendico/api/proto/payments/methods/v1/methods.proto
2026-02-13 00:23:39 +01:00

76 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";
import "common/pagination/v2/cursor.proto";
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;
common.pagination.v2.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);
}