|
| 1 | +syntax = "proto3"; |
| 2 | + |
| 3 | +package payattable.v1; |
| 4 | +import "google/protobuf/timestamp.proto"; |
| 5 | +import "google/protobuf/wrappers.proto"; // For optional fields like tip |
| 6 | + |
| 7 | +// Service definition for Pay@Table operations |
| 8 | +service PayAtTableService { |
| 9 | + // Find open checks based on search criteria (e.g., table number, check number) |
| 10 | + rpc FindChecks (FindChecksRequest) returns (FindChecksResponse); |
| 11 | +} |
| 12 | + |
| 13 | +message CheckItem { |
| 14 | + string name = 1; |
| 15 | + string quantity = 2; // Using string for flexibility |
| 16 | + string price = 3; // Using string for flexibility (currency formatting) |
| 17 | +} |
| 18 | + |
| 19 | +message CheckPayment { |
| 20 | + string tender_name = 1; |
| 21 | + string amount = 2; |
| 22 | + string reference_text = 3; // e.g., Auth Code |
| 23 | +} |
| 24 | + |
| 25 | +message Check { |
| 26 | + string check_ref = 1; // Unique identifier for the check from Simphony |
| 27 | + string check_number = 2; |
| 28 | + string table_name = 3; |
| 29 | + string total_amount = 4; // Current total due (string for currency) |
| 30 | + string balance_due = 5; // Remaining balance (string for currency) |
| 31 | + repeated CheckItem items = 6; |
| 32 | + repeated CheckPayment payments_applied = 7; |
| 33 | + string subtotal = 8; |
| 34 | + string tax_total = 9; |
| 35 | + // Add other relevant check details: guest count, server name, open time etc. |
| 36 | + google.protobuf.Timestamp open_time = 10; |
| 37 | +} |
| 38 | + |
| 39 | +// Check Finding |
| 40 | +message FindChecksRequest { |
| 41 | + string search_query = 1; // e.g., "Table 5", "12345" |
| 42 | + enum SearchType { |
| 43 | + TABLE_NAME = 0; |
| 44 | + CHECK_NUMBER = 1; |
| 45 | + // Add other search types if supported/needed |
| 46 | + } |
| 47 | + SearchType search_type = 2; |
| 48 | +} |
| 49 | + |
| 50 | +message FindChecksResponse { |
| 51 | + repeated Check checks = 1; |
| 52 | + string error_message = 2; // If retrieval fails |
| 53 | +} |
0 commit comments