Debian Codegraph @

js/types/v1/payment_method_pb.ts

raw symbols SCIP
1 // @generated by protoc-gen-es v1.10.0 with parameter "target=ts,import_extension=none"
2 // @generated from file types/v1/payment_method.proto (package types.v1, syntax proto3)
3 /* eslint-disable */
4 // @ts-nocheck
5
6 import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
7 import { Message, proto3, protoInt64, Timestamp } from "@bufbuild/protobuf";
8
9 /**
10 * @generated from message types.v1.Address
11 */
12 export class Address extends Message<Address> {
13 /**
14 * @generated from field: string city = 1;
15 */
16 city = "";
17
18 /**
19 * @generated from field: string country = 2;
20 */
21 country = "";
22
23 /**
24 * @generated from field: string line1 = 3;
25 */
26 line1 = "";
27
28 /**
29 * @generated from field: string line2 = 4;
30 */
31 line2 = "";
32
33 /**
34 * @generated from field: string postal_code = 5;
35 */
36 postalCode = "";
37
38 /**
39 * @generated from field: string state = 6;
40 */
41 state = "";
42
43 constructor(data?: PartialMessage<Address>) {
44 super();
45 proto3.util.initPartial(data, this);
46 }
47
48 static readonly runtime: typeof proto3 = proto3;
49 static readonly typeName = "types.v1.Address";
50 static readonly fields: FieldList = proto3.util.newFieldList(() => [
51 { no: 1, name: "city", kind: "scalar", T: 9 /* ScalarType.STRING */ },
52 { no: 2, name: "country", kind: "scalar", T: 9 /* ScalarType.STRING */ },
53 { no: 3, name: "line1", kind: "scalar", T: 9 /* ScalarType.STRING */ },
54 { no: 4, name: "line2", kind: "scalar", T: 9 /* ScalarType.STRING */ },
55 { no: 5, name: "postal_code", kind: "scalar", T: 9 /* ScalarType.STRING */ },
56 { no: 6, name: "state", kind: "scalar", T: 9 /* ScalarType.STRING */ },
57 ]);
58
59 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): Address {
60 return new Address().fromBinary(bytes, options);
61 }
62
63 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): Address {
64 return new Address().fromJson(jsonValue, options);
65 }
66
67 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): Address {
68 return new Address().fromJsonString(jsonString, options);
69 }
70
71 static equals(a: Address | PlainMessage<Address> | undefined, b: Address | PlainMessage<Address> | undefined): boolean {
72 return proto3.util.equals(Address, a, b);
73 }
74 }
75
76 /**
77 * @generated from message types.v1.PaymentMethod
78 */
79 export class PaymentMethod extends Message<PaymentMethod> {
80 /**
81 * @generated from field: google.protobuf.Timestamp created_at = 100;
82 */
83 createdAt?: Timestamp;
84
85 /**
86 * @generated from field: string stripe_id = 1;
87 */
88 stripeId = "";
89
90 /**
91 * @generated from oneof types.v1.PaymentMethod.type
92 */
93 type: {
94 /**
95 * @generated from field: types.v1.PaymentMethod.Card card = 200;
96 */
97 value: PaymentMethod_Card;
98 case: "card";
99 } | { case: undefined; value?: undefined } = { case: undefined };
100
101 /**
102 * @generated from field: types.v1.PaymentMethod.BillingDetails billing_details = 3;
103 */
104 billingDetails?: PaymentMethod_BillingDetails;
105
106 constructor(data?: PartialMessage<PaymentMethod>) {
107 super();
108 proto3.util.initPartial(data, this);
109 }
110
111 static readonly runtime: typeof proto3 = proto3;
112 static readonly typeName = "types.v1.PaymentMethod";
113 static readonly fields: FieldList = proto3.util.newFieldList(() => [
114 { no: 100, name: "created_at", kind: "message", T: Timestamp },
115 { no: 1, name: "stripe_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
116 { no: 200, name: "card", kind: "message", T: PaymentMethod_Card, oneof: "type" },
117 { no: 3, name: "billing_details", kind: "message", T: PaymentMethod_BillingDetails },
118 ]);
119
120 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PaymentMethod {
121 return new PaymentMethod().fromBinary(bytes, options);
122 }
123
124 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PaymentMethod {
125 return new PaymentMethod().fromJson(jsonValue, options);
126 }
127
128 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PaymentMethod {
129 return new PaymentMethod().fromJsonString(jsonString, options);
130 }
131
132 static equals(a: PaymentMethod | PlainMessage<PaymentMethod> | undefined, b: PaymentMethod | PlainMessage<PaymentMethod> | undefined): boolean {
133 return proto3.util.equals(PaymentMethod, a, b);
134 }
135 }
136
137 /**
138 * @generated from message types.v1.PaymentMethod.Card
139 */
140 export class PaymentMethod_Card extends Message<PaymentMethod_Card> {
141 /**
142 * @generated from field: types.v1.PaymentMethod.Card.Brand brand = 1;
143 */
144 brand = PaymentMethod_Card_Brand.unknown;
145
146 /**
147 * @generated from field: string country = 2;
148 */
149 country = "";
150
151 /**
152 * @generated from field: string display_brandh = 3;
153 */
154 displayBrandh = "";
155
156 /**
157 * @generated from field: int64 exp_month = 4;
158 */
159 expMonth = protoInt64.zero;
160
161 /**
162 * @generated from field: int64 exp_year = 5;
163 */
164 expYear = protoInt64.zero;
165
166 /**
167 * @generated from field: string last4 = 6;
168 */
169 last4 = "";
170
171 constructor(data?: PartialMessage<PaymentMethod_Card>) {
172 super();
173 proto3.util.initPartial(data, this);
174 }
175
176 static readonly runtime: typeof proto3 = proto3;
177 static readonly typeName = "types.v1.PaymentMethod.Card";
178 static readonly fields: FieldList = proto3.util.newFieldList(() => [
179 { no: 1, name: "brand", kind: "enum", T: proto3.getEnumType(PaymentMethod_Card_Brand) },
180 { no: 2, name: "country", kind: "scalar", T: 9 /* ScalarType.STRING */ },
181 { no: 3, name: "display_brandh", kind: "scalar", T: 9 /* ScalarType.STRING */ },
182 { no: 4, name: "exp_month", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
183 { no: 5, name: "exp_year", kind: "scalar", T: 3 /* ScalarType.INT64 */ },
184 { no: 6, name: "last4", kind: "scalar", T: 9 /* ScalarType.STRING */ },
185 ]);
186
187 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PaymentMethod_Card {
188 return new PaymentMethod_Card().fromBinary(bytes, options);
189 }
190
191 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PaymentMethod_Card {
192 return new PaymentMethod_Card().fromJson(jsonValue, options);
193 }
194
195 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PaymentMethod_Card {
196 return new PaymentMethod_Card().fromJsonString(jsonString, options);
197 }
198
199 static equals(a: PaymentMethod_Card | PlainMessage<PaymentMethod_Card> | undefined, b: PaymentMethod_Card | PlainMessage<PaymentMethod_Card> | undefined): boolean {
200 return proto3.util.equals(PaymentMethod_Card, a, b);
201 }
202 }
203
204 /**
205 * @generated from enum types.v1.PaymentMethod.Card.Brand
206 */
207 export enum PaymentMethod_Card_Brand {
208 /**
209 * @generated from enum value: unknown = 0;
210 */
211 unknown = 0,
212
213 /**
214 * @generated from enum value: amex = 1;
215 */
216 amex = 1,
217
218 /**
219 * @generated from enum value: diners = 2;
220 */
221 diners = 2,
222
223 /**
224 * @generated from enum value: discover = 3;
225 */
226 discover = 3,
227
228 /**
229 * @generated from enum value: jcb = 4;
230 */
231 jcb = 4,
232
233 /**
234 * @generated from enum value: mastercard = 5;
235 */
236 mastercard = 5,
237
238 /**
239 * @generated from enum value: unionpay = 6;
240 */
241 unionpay = 6,
242
243 /**
244 * @generated from enum value: visa = 7;
245 */
246 visa = 7,
247 }
248 // Retrieve enum metadata with: proto3.getEnumType(PaymentMethod_Card_Brand)
249 proto3.util.setEnumType(PaymentMethod_Card_Brand, "types.v1.PaymentMethod.Card.Brand", [
250 { no: 0, name: "unknown" },
251 { no: 1, name: "amex" },
252 { no: 2, name: "diners" },
253 { no: 3, name: "discover" },
254 { no: 4, name: "jcb" },
255 { no: 5, name: "mastercard" },
256 { no: 6, name: "unionpay" },
257 { no: 7, name: "visa" },
258 ]);
259
260 /**
261 * @generated from message types.v1.PaymentMethod.BillingDetails
262 */
263 export class PaymentMethod_BillingDetails extends Message<PaymentMethod_BillingDetails> {
264 /**
265 * @generated from field: types.v1.Address address = 1;
266 */
267 address?: Address;
268
269 /**
270 * @generated from field: string email = 2;
271 */
272 email = "";
273
274 /**
275 * @generated from field: string name = 3;
276 */
277 name = "";
278
279 /**
280 * @generated from field: string phone = 4;
281 */
282 phone = "";
283
284 constructor(data?: PartialMessage<PaymentMethod_BillingDetails>) {
285 super();
286 proto3.util.initPartial(data, this);
287 }
288
289 static readonly runtime: typeof proto3 = proto3;
290 static readonly typeName = "types.v1.PaymentMethod.BillingDetails";
291 static readonly fields: FieldList = proto3.util.newFieldList(() => [
292 { no: 1, name: "address", kind: "message", T: Address },
293 { no: 2, name: "email", kind: "scalar", T: 9 /* ScalarType.STRING */ },
294 { no: 3, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
295 { no: 4, name: "phone", kind: "scalar", T: 9 /* ScalarType.STRING */ },
296 ]);
297
298 static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): PaymentMethod_BillingDetails {
299 return new PaymentMethod_BillingDetails().fromBinary(bytes, options);
300 }
301
302 static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): PaymentMethod_BillingDetails {
303 return new PaymentMethod_BillingDetails().fromJson(jsonValue, options);
304 }
305
306 static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): PaymentMethod_BillingDetails {
307 return new PaymentMethod_BillingDetails().fromJsonString(jsonString, options);
308 }
309
310 static equals(a: PaymentMethod_BillingDetails | PlainMessage<PaymentMethod_BillingDetails> | undefined, b: PaymentMethod_BillingDetails | PlainMessage<PaymentMethod_BillingDetails> | undefined): boolean {
311 return proto3.util.equals(PaymentMethod_BillingDetails, a, b);
312 }
313 }
314