Skip to content

Turn payment service endpoints into CRUD. - #200

Draft
Gerrit91 wants to merge 8 commits into
mainfrom
payment-service-crud
Draft

Turn payment service endpoints into CRUD.#200
Gerrit91 wants to merge 8 commits into
mainfrom
payment-service-crud

Conversation

@Gerrit91

@Gerrit91 Gerrit91 commented Jul 7, 2025

Copy link
Copy Markdown
Contributor

This makes our API more consistent and makes it easier to implement and handle for the CLI.

This makes our API more consistent and makes it easier to implement and handle for the CLI.
Comment thread proto/api/v1/payment.proto
Comment thread proto/api/v1/payment.proto
Comment thread proto/api/v1/payment.proto Outdated
Comment on lines +227 to +239
string name = 2;
// PaymentMethodId at the payment provider, the client receives this from the payment provider and passes it on to the api
optional string payment_method_id = 5;
string payment_method_id = 3;
// Email of the customer to be billed
optional string email = 6 [(buf.validate.field).string.email = true];
string email = 4 [(buf.validate.field).string.email = true];
// Card the customer to be billed
optional Card card = 7;
Card card = 5;
// Address is the postal address of the customer to be billed
Address address = 8;
Address address = 6;
// Vat which applies to the customer to be billed
optional string vat = 9;
string vat = 7;
// PhoneNumber of the customer to be billed
optional string phone_number = 10;
optional string phone_number = 8;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure that we should add more validations to this. Fields like address must be provided?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think there should more validations in general.

@Gerrit91
Gerrit91 force-pushed the payment-service-crud branch from 10c4d51 to 1298609 Compare July 8, 2025 08:32
// Balance actual balance of the customer
optional int64 balance = 13;
// Tier describes the state in which the customer is using the products.
ProductTier tier = 14;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this field?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants