syntax = "proto3"; package payments.methods.v1; option go_package = "github.com/tech/sendico/pkg/proto/payments/methods/v1;methodsv1"; import "api/proto/common/pagination/v2/cursor.proto"; import "api/proto/payments/endpoint/v1/endpoint.proto"; message CreatePaymentMethodRequest { string account_ref = 1; string organization_ref = 2; payments.endpoint.v1.PaymentMethod payment_method = 3; } message CreatePaymentMethodResponse { payments.endpoint.v1.PaymentMethodRecord payment_method_record = 1; } message GetPaymentMethodRequest { string account_ref = 1; string payment_method_ref = 2; } message GetPaymentMethodResponse { payments.endpoint.v1.PaymentMethodRecord payment_method_record = 1; } message UpdatePaymentMethodRequest { string account_ref = 1; payments.endpoint.v1.PaymentMethodRecord payment_method_record = 2; } message UpdatePaymentMethodResponse { payments.endpoint.v1.PaymentMethodRecord payment_method_record = 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 payments.endpoint.v1.PaymentMethodRecord payment_methods = 1; } // PaymentMethodsService provides operations for managing payment methods. service PaymentMethodsService { // CreatePaymentMethod creates a new payment method. rpc CreatePaymentMethod(CreatePaymentMethodRequest) returns (CreatePaymentMethodResponse); // GetPaymentMethod retrieves a payment method by reference. rpc GetPaymentMethod(GetPaymentMethodRequest) returns (GetPaymentMethodResponse); // UpdatePaymentMethod updates an existing payment method. rpc UpdatePaymentMethod(UpdatePaymentMethodRequest) returns (UpdatePaymentMethodResponse); // Delete exising payment method rpc DeletePaymentMethod(DeletePaymentMethodRequest) returns (DeletePaymentMethodResponse); // SetPaymentMethodArchived sets the archived status of a payment method. rpc SetPaymentMethodArchived(SetPaymentMethodArchivedRequest) returns (SetPaymentMethodArchivedResponse); // ListPaymentMethods retrieves a list of payment methods. rpc ListPaymentMethods(ListPaymentMethodsRequest) returns (ListPaymentMethodsResponse); }