| 1 |
syntax = "proto3"; |
| 2 |
|
| 3 |
package types.v1; |
| 4 |
|
| 5 |
import "google/protobuf/timestamp.proto"; |
| 6 |
|
| 7 |
option go_package = "types/v1;typesv1"; |
| 8 |
|
| 9 |
message Address { |
| 10 |
string city = 1; |
| 11 |
string country = 2; |
| 12 |
string line1 = 3; |
| 13 |
string line2 = 4; |
| 14 |
string postal_code = 5; |
| 15 |
string state = 6; |
| 16 |
} |
| 17 |
|
| 18 |
message PaymentMethod { |
| 19 |
message Card { |
| 20 |
enum Brand { |
| 21 |
unknown = 0; |
| 22 |
amex = 1; |
| 23 |
diners = 2; |
| 24 |
discover = 3; |
| 25 |
jcb = 4; |
| 26 |
mastercard = 5; |
| 27 |
unionpay = 6; |
| 28 |
visa = 7; |
| 29 |
} |
| 30 |
Brand brand = 1; |
| 31 |
string country = 2; |
| 32 |
string display_brandh = 3; |
| 33 |
int64 exp_month = 4; |
| 34 |
int64 exp_year = 5; |
| 35 |
string last4 = 6; |
| 36 |
} |
| 37 |
|
| 38 |
message BillingDetails { |
| 39 |
Address address = 1; |
| 40 |
string email = 2; |
| 41 |
string name = 3; |
| 42 |
string phone = 4; |
| 43 |
} |
| 44 |
|
| 45 |
google.protobuf.Timestamp created_at = 100; |
| 46 |
|
| 47 |
string stripe_id = 1; |
| 48 |
oneof type { |
| 49 |
Card card = 200; |
| 50 |
} |
| 51 |
BillingDetails billing_details = 3; |
| 52 |
} |