refactored notificatoin / tgsettle responsibility boundaries
This commit is contained in:
@@ -7,25 +7,30 @@ option go_package = "github.com/tech/sendico/pkg/proto/payments/methods/v1;metho
|
||||
import "api/proto/common/pagination/v2/cursor.proto";
|
||||
import "api/proto/payments/endpoint/v1/endpoint.proto";
|
||||
|
||||
// CreatePaymentMethodRequest is the request to create a new payment method.
|
||||
message CreatePaymentMethodRequest {
|
||||
string account_ref = 1;
|
||||
string organization_ref = 2;
|
||||
payments.endpoint.v1.PaymentMethod payment_method = 3;
|
||||
}
|
||||
|
||||
// CreatePaymentMethodResponse is the response for CreatePaymentMethod.
|
||||
message CreatePaymentMethodResponse {
|
||||
payments.endpoint.v1.PaymentMethodRecord payment_method_record = 1;
|
||||
}
|
||||
|
||||
// GetPaymentMethodRequest is the request to retrieve a payment method.
|
||||
message GetPaymentMethodRequest {
|
||||
string account_ref = 1;
|
||||
string payment_method_ref = 2;
|
||||
}
|
||||
|
||||
// GetPaymentMethodResponse is the response for GetPaymentMethod.
|
||||
message GetPaymentMethodResponse {
|
||||
payments.endpoint.v1.PaymentMethodRecord payment_method_record = 1;
|
||||
}
|
||||
|
||||
// GetPaymentMethodPrivateRequest retrieves a payment method without permission checks.
|
||||
message GetPaymentMethodPrivateRequest {
|
||||
string organization_ref = 1;
|
||||
oneof selector {
|
||||
@@ -35,33 +40,43 @@ message GetPaymentMethodPrivateRequest {
|
||||
PrivateEndpoint endpoint = 4;
|
||||
}
|
||||
|
||||
// PrivateEndpoint specifies which side of a payment method to retrieve.
|
||||
enum PrivateEndpoint {
|
||||
// PRIVATE_ENDPOINT_UNSPECIFIED is the default zero value.
|
||||
PRIVATE_ENDPOINT_UNSPECIFIED = 0;
|
||||
// PRIVATE_ENDPOINT_SOURCE retrieves the source endpoint.
|
||||
PRIVATE_ENDPOINT_SOURCE = 1;
|
||||
// PRIVATE_ENDPOINT_DESTINATION retrieves the destination endpoint.
|
||||
PRIVATE_ENDPOINT_DESTINATION = 2;
|
||||
}
|
||||
|
||||
// GetPaymentMethodPrivateResponse is the response for GetPaymentMethodPrivate.
|
||||
message GetPaymentMethodPrivateResponse {
|
||||
payments.endpoint.v1.PaymentMethodRecord payment_method_record = 1;
|
||||
}
|
||||
|
||||
// UpdatePaymentMethodRequest is the request to update an existing payment method.
|
||||
message UpdatePaymentMethodRequest {
|
||||
string account_ref = 1;
|
||||
payments.endpoint.v1.PaymentMethodRecord payment_method_record = 2;
|
||||
}
|
||||
|
||||
// UpdatePaymentMethodResponse is the response for UpdatePaymentMethod.
|
||||
message UpdatePaymentMethodResponse {
|
||||
payments.endpoint.v1.PaymentMethodRecord payment_method_record = 1;
|
||||
}
|
||||
|
||||
// DeletePaymentMethodRequest is the request to delete a payment method.
|
||||
message DeletePaymentMethodRequest {
|
||||
string account_ref = 1;
|
||||
string payment_method_ref = 2;
|
||||
bool cascade = 3;
|
||||
}
|
||||
|
||||
// DeletePaymentMethodResponse is the response for DeletePaymentMethod.
|
||||
message DeletePaymentMethodResponse {}
|
||||
|
||||
// SetPaymentMethodArchivedRequest is the request to archive or unarchive a payment method.
|
||||
message SetPaymentMethodArchivedRequest {
|
||||
string account_ref = 1;
|
||||
string organization_ref = 2;
|
||||
@@ -70,8 +85,10 @@ message SetPaymentMethodArchivedRequest {
|
||||
bool cascade = 5;
|
||||
}
|
||||
|
||||
// SetPaymentMethodArchivedResponse is the response for SetPaymentMethodArchived.
|
||||
message SetPaymentMethodArchivedResponse {}
|
||||
|
||||
// ListPaymentMethodsRequest is the request to list payment methods with optional filters.
|
||||
message ListPaymentMethodsRequest {
|
||||
string account_ref = 1;
|
||||
string organization_ref = 2;
|
||||
@@ -79,6 +96,7 @@ message ListPaymentMethodsRequest {
|
||||
common.pagination.v2.ViewCursor cursor = 4;
|
||||
}
|
||||
|
||||
// ListPaymentMethodsResponse is the response for ListPaymentMethods.
|
||||
message ListPaymentMethodsResponse {
|
||||
repeated payments.endpoint.v1.PaymentMethodRecord payment_methods = 1;
|
||||
}
|
||||
@@ -91,7 +109,7 @@ service PaymentMethodsService {
|
||||
rpc GetPaymentMethod(GetPaymentMethodRequest) returns (GetPaymentMethodResponse);
|
||||
// UpdatePaymentMethod updates an existing payment method.
|
||||
rpc UpdatePaymentMethod(UpdatePaymentMethodRequest) returns (UpdatePaymentMethodResponse);
|
||||
// Delete exising payment method
|
||||
// DeletePaymentMethod deletes an existing payment method.
|
||||
rpc DeletePaymentMethod(DeletePaymentMethodRequest) returns (DeletePaymentMethodResponse);
|
||||
// SetPaymentMethodArchived sets the archived status of a payment method.
|
||||
rpc SetPaymentMethodArchived(SetPaymentMethodArchivedRequest) returns (SetPaymentMethodArchivedResponse);
|
||||
|
||||
Reference in New Issue
Block a user