-
Notifications
You must be signed in to change notification settings - Fork 0
/
payment.pb.go
3247 lines (2901 loc) · 127 KB
/
payment.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.34.1
// protoc (unknown)
// source: api/v1/payment.proto
package apiv1
import (
_ "github.com/envoyproxy/protoc-gen-validate/validate"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// ProductType defines for which type of product a price applies
type ProductType int32
const (
// PRODUCT_TYPE_UNSPECIFIED is unspecified
ProductType_PRODUCT_TYPE_UNSPECIFIED ProductType = 0
// PRODUCT_TYPE_STORAGE for storage
ProductType_PRODUCT_TYPE_STORAGE ProductType = 1
// PRODUCT_TYPE_COMPUTE for compute, e.g. machines
ProductType_PRODUCT_TYPE_COMPUTE ProductType = 2
// PRODUCT_TYPE_NETWORK for network, e.g. ips and traffic
ProductType_PRODUCT_TYPE_NETWORK ProductType = 3
// PRODUCT_TYPE_KUBERNETES for kubernetes, e.g. the control plane
ProductType_PRODUCT_TYPE_KUBERNETES ProductType = 5
)
// Enum value maps for ProductType.
var (
ProductType_name = map[int32]string{
0: "PRODUCT_TYPE_UNSPECIFIED",
1: "PRODUCT_TYPE_STORAGE",
2: "PRODUCT_TYPE_COMPUTE",
3: "PRODUCT_TYPE_NETWORK",
5: "PRODUCT_TYPE_KUBERNETES",
}
ProductType_value = map[string]int32{
"PRODUCT_TYPE_UNSPECIFIED": 0,
"PRODUCT_TYPE_STORAGE": 1,
"PRODUCT_TYPE_COMPUTE": 2,
"PRODUCT_TYPE_NETWORK": 3,
"PRODUCT_TYPE_KUBERNETES": 5,
}
)
func (x ProductType) Enum() *ProductType {
p := new(ProductType)
*p = x
return p
}
func (x ProductType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (ProductType) Descriptor() protoreflect.EnumDescriptor {
return file_api_v1_payment_proto_enumTypes[0].Descriptor()
}
func (ProductType) Type() protoreflect.EnumType {
return &file_api_v1_payment_proto_enumTypes[0]
}
func (x ProductType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use ProductType.Descriptor instead.
func (ProductType) EnumDescriptor() ([]byte, []int) {
return file_api_v1_payment_proto_rawDescGZIP(), []int{0}
}
// PaymentCustomer is a customer at the payment processor
type PaymentCustomer struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Login of the customer
Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
// Name of the customer
Name *string `protobuf:"bytes,2,opt,name=name,proto3,oneof" json:"name,omitempty"`
// CustomerId id of the customer
CustomerId *string `protobuf:"bytes,3,opt,name=customer_id,json=customerId,proto3,oneof" json:"customer_id,omitempty"`
// PaymentMethodId at the payment processor
PaymentMethodId *string `protobuf:"bytes,4,opt,name=payment_method_id,json=paymentMethodId,proto3,oneof" json:"payment_method_id,omitempty"`
// SubscriptionId of the customer
SubscriptionId string `protobuf:"bytes,5,opt,name=subscription_id,json=subscriptionId,proto3" json:"subscription_id,omitempty"`
// Email of the customer
Email *string `protobuf:"bytes,6,opt,name=email,proto3,oneof" json:"email,omitempty"`
// Card the customer supplied
Card *Card `protobuf:"bytes,7,opt,name=card,proto3,oneof" json:"card,omitempty"`
// Prices which apply to customer resources
Prices []*Price `protobuf:"bytes,8,rep,name=prices,proto3" json:"prices,omitempty"`
// Address is the postal address of the customer
Address *Address `protobuf:"bytes,9,opt,name=address,proto3" json:"address,omitempty"`
// Coupon details of granted coupon if any
Coupon *Coupon `protobuf:"bytes,10,opt,name=coupon,proto3,oneof" json:"coupon,omitempty"`
// Vat which applies to the customer
Vat *string `protobuf:"bytes,11,opt,name=vat,proto3,oneof" json:"vat,omitempty"`
// PhoneNumber of the customer
PhoneNumber *string `protobuf:"bytes,12,opt,name=phone_number,json=phoneNumber,proto3,oneof" json:"phone_number,omitempty"`
// Balance actual balance of the customer
Balance *int64 `protobuf:"varint,13,opt,name=balance,proto3,oneof" json:"balance,omitempty"`
}
func (x *PaymentCustomer) Reset() {
*x = PaymentCustomer{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v1_payment_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PaymentCustomer) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PaymentCustomer) ProtoMessage() {}
func (x *PaymentCustomer) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_payment_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PaymentCustomer.ProtoReflect.Descriptor instead.
func (*PaymentCustomer) Descriptor() ([]byte, []int) {
return file_api_v1_payment_proto_rawDescGZIP(), []int{0}
}
func (x *PaymentCustomer) GetLogin() string {
if x != nil {
return x.Login
}
return ""
}
func (x *PaymentCustomer) GetName() string {
if x != nil && x.Name != nil {
return *x.Name
}
return ""
}
func (x *PaymentCustomer) GetCustomerId() string {
if x != nil && x.CustomerId != nil {
return *x.CustomerId
}
return ""
}
func (x *PaymentCustomer) GetPaymentMethodId() string {
if x != nil && x.PaymentMethodId != nil {
return *x.PaymentMethodId
}
return ""
}
func (x *PaymentCustomer) GetSubscriptionId() string {
if x != nil {
return x.SubscriptionId
}
return ""
}
func (x *PaymentCustomer) GetEmail() string {
if x != nil && x.Email != nil {
return *x.Email
}
return ""
}
func (x *PaymentCustomer) GetCard() *Card {
if x != nil {
return x.Card
}
return nil
}
func (x *PaymentCustomer) GetPrices() []*Price {
if x != nil {
return x.Prices
}
return nil
}
func (x *PaymentCustomer) GetAddress() *Address {
if x != nil {
return x.Address
}
return nil
}
func (x *PaymentCustomer) GetCoupon() *Coupon {
if x != nil {
return x.Coupon
}
return nil
}
func (x *PaymentCustomer) GetVat() string {
if x != nil && x.Vat != nil {
return *x.Vat
}
return ""
}
func (x *PaymentCustomer) GetPhoneNumber() string {
if x != nil && x.PhoneNumber != nil {
return *x.PhoneNumber
}
return ""
}
func (x *PaymentCustomer) GetBalance() int64 {
if x != nil && x.Balance != nil {
return *x.Balance
}
return 0
}
// Card is the payment card the customer pays with
type Card struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Brand of the card
Brand string `protobuf:"bytes,1,opt,name=brand,proto3" json:"brand,omitempty"`
// Country where the card was issued
Country string `protobuf:"bytes,2,opt,name=country,proto3" json:"country,omitempty"`
// ExpMonth is the month when this card expires
ExpMonth int64 `protobuf:"varint,3,opt,name=exp_month,json=expMonth,proto3" json:"exp_month,omitempty"`
// ExpYear is the year when this card expires
ExpYear int64 `protobuf:"varint,4,opt,name=exp_year,json=expYear,proto3" json:"exp_year,omitempty"`
// Last4 are the 4 last digits of the card number, the full number is not stored anywhere
Last_4 string `protobuf:"bytes,5,opt,name=last_4,json=last4,proto3" json:"last_4,omitempty"`
}
func (x *Card) Reset() {
*x = Card{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v1_payment_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Card) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Card) ProtoMessage() {}
func (x *Card) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_payment_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Card.ProtoReflect.Descriptor instead.
func (*Card) Descriptor() ([]byte, []int) {
return file_api_v1_payment_proto_rawDescGZIP(), []int{1}
}
func (x *Card) GetBrand() string {
if x != nil {
return x.Brand
}
return ""
}
func (x *Card) GetCountry() string {
if x != nil {
return x.Country
}
return ""
}
func (x *Card) GetExpMonth() int64 {
if x != nil {
return x.ExpMonth
}
return 0
}
func (x *Card) GetExpYear() int64 {
if x != nil {
return x.ExpYear
}
return 0
}
func (x *Card) GetLast_4() string {
if x != nil {
return x.Last_4
}
return ""
}
// Price of a product
type Price struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Name of the price
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// UnitAmountDecimal the value of this price
UnitAmountDecimal float64 `protobuf:"fixed64,2,opt,name=unit_amount_decimal,json=unitAmountDecimal,proto3" json:"unit_amount_decimal,omitempty"`
// Currency of this price
Currency string `protobuf:"bytes,3,opt,name=currency,proto3" json:"currency,omitempty"`
// UnitLabel is a label which allows for searching this unit at the payment processor
UnitLabel string `protobuf:"bytes,4,opt,name=unit_label,json=unitLabel,proto3" json:"unit_label,omitempty"`
// ProductType this price applies to
ProductType ProductType `protobuf:"varint,5,opt,name=product_type,json=productType,proto3,enum=api.v1.ProductType" json:"product_type,omitempty"`
// Description of this price
Description *string `protobuf:"bytes,6,opt,name=description,proto3,oneof" json:"description,omitempty"`
}
func (x *Price) Reset() {
*x = Price{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v1_payment_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Price) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Price) ProtoMessage() {}
func (x *Price) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_payment_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Price.ProtoReflect.Descriptor instead.
func (*Price) Descriptor() ([]byte, []int) {
return file_api_v1_payment_proto_rawDescGZIP(), []int{2}
}
func (x *Price) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Price) GetUnitAmountDecimal() float64 {
if x != nil {
return x.UnitAmountDecimal
}
return 0
}
func (x *Price) GetCurrency() string {
if x != nil {
return x.Currency
}
return ""
}
func (x *Price) GetUnitLabel() string {
if x != nil {
return x.UnitLabel
}
return ""
}
func (x *Price) GetProductType() ProductType {
if x != nil {
return x.ProductType
}
return ProductType_PRODUCT_TYPE_UNSPECIFIED
}
func (x *Price) GetDescription() string {
if x != nil && x.Description != nil {
return *x.Description
}
return ""
}
// Address postal address of a customer
type Address struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Line1 the first address line
Line1 string `protobuf:"bytes,1,opt,name=line1,proto3" json:"line1,omitempty"`
// Line2 the second address line
Line2 string `protobuf:"bytes,2,opt,name=line2,proto3" json:"line2,omitempty"`
// PostalCode of the city or address
PostalCode string `protobuf:"bytes,3,opt,name=postal_code,json=postalCode,proto3" json:"postal_code,omitempty"`
// City where the customer lives
City string `protobuf:"bytes,4,opt,name=city,proto3" json:"city,omitempty"`
// Sate where the customer lives
State string `protobuf:"bytes,5,opt,name=state,proto3" json:"state,omitempty"`
// Country where the customer lives
Country string `protobuf:"bytes,6,opt,name=country,proto3" json:"country,omitempty"`
}
func (x *Address) Reset() {
*x = Address{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v1_payment_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Address) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Address) ProtoMessage() {}
func (x *Address) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_payment_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Address.ProtoReflect.Descriptor instead.
func (*Address) Descriptor() ([]byte, []int) {
return file_api_v1_payment_proto_rawDescGZIP(), []int{3}
}
func (x *Address) GetLine1() string {
if x != nil {
return x.Line1
}
return ""
}
func (x *Address) GetLine2() string {
if x != nil {
return x.Line2
}
return ""
}
func (x *Address) GetPostalCode() string {
if x != nil {
return x.PostalCode
}
return ""
}
func (x *Address) GetCity() string {
if x != nil {
return x.City
}
return ""
}
func (x *Address) GetState() string {
if x != nil {
return x.State
}
return ""
}
func (x *Address) GetCountry() string {
if x != nil {
return x.Country
}
return ""
}
// SubscriptionUsageItem details of a subscription
type SubscriptionUsageItem struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// SubscriptionItemId is the id of the subscription
SubscriptionItemId string `protobuf:"bytes,1,opt,name=subscription_item_id,json=subscriptionItemId,proto3" json:"subscription_item_id,omitempty"`
// SubscriptionItemName is the name of the subscription
SubscriptionItemName string `protobuf:"bytes,2,opt,name=subscription_item_name,json=subscriptionItemName,proto3" json:"subscription_item_name,omitempty"`
// TotalUsage of this subscription
TotalUsage int64 `protobuf:"varint,3,opt,name=total_usage,json=totalUsage,proto3" json:"total_usage,omitempty"`
// PeriodStart is the start date of this subscription
PeriodStart *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=period_start,json=periodStart,proto3" json:"period_start,omitempty"`
// PeriodEnd is the end date of this subscription
PeriodEnd *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=period_end,json=periodEnd,proto3" json:"period_end,omitempty"`
}
func (x *SubscriptionUsageItem) Reset() {
*x = SubscriptionUsageItem{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v1_payment_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *SubscriptionUsageItem) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*SubscriptionUsageItem) ProtoMessage() {}
func (x *SubscriptionUsageItem) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_payment_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use SubscriptionUsageItem.ProtoReflect.Descriptor instead.
func (*SubscriptionUsageItem) Descriptor() ([]byte, []int) {
return file_api_v1_payment_proto_rawDescGZIP(), []int{4}
}
func (x *SubscriptionUsageItem) GetSubscriptionItemId() string {
if x != nil {
return x.SubscriptionItemId
}
return ""
}
func (x *SubscriptionUsageItem) GetSubscriptionItemName() string {
if x != nil {
return x.SubscriptionItemName
}
return ""
}
func (x *SubscriptionUsageItem) GetTotalUsage() int64 {
if x != nil {
return x.TotalUsage
}
return 0
}
func (x *SubscriptionUsageItem) GetPeriodStart() *timestamppb.Timestamp {
if x != nil {
return x.PeriodStart
}
return nil
}
func (x *SubscriptionUsageItem) GetPeriodEnd() *timestamppb.Timestamp {
if x != nil {
return x.PeriodEnd
}
return nil
}
// Invoice a customer has to pay for subscription usage
type Invoice struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Id of the invoice
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// PdfDownloadUrl is the url where the customer can download this invoice in pdf format
PdfDownloadUrl string `protobuf:"bytes,2,opt,name=pdf_download_url,json=pdfDownloadUrl,proto3" json:"pdf_download_url,omitempty"`
// PeriodStart is the start date of this subscription
PeriodStart *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=period_start,json=periodStart,proto3" json:"period_start,omitempty"`
// PeriodEnd is the end date of this subscription
PeriodEnd *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=period_end,json=periodEnd,proto3" json:"period_end,omitempty"`
}
func (x *Invoice) Reset() {
*x = Invoice{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v1_payment_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Invoice) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Invoice) ProtoMessage() {}
func (x *Invoice) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_payment_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Invoice.ProtoReflect.Descriptor instead.
func (*Invoice) Descriptor() ([]byte, []int) {
return file_api_v1_payment_proto_rawDescGZIP(), []int{5}
}
func (x *Invoice) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Invoice) GetPdfDownloadUrl() string {
if x != nil {
return x.PdfDownloadUrl
}
return ""
}
func (x *Invoice) GetPeriodStart() *timestamppb.Timestamp {
if x != nil {
return x.PeriodStart
}
return nil
}
func (x *Invoice) GetPeriodEnd() *timestamppb.Timestamp {
if x != nil {
return x.PeriodEnd
}
return nil
}
// Coupon is a amount of free usage which can be granted to a customer
type Coupon struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Id of the coupon
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
// Name of this coupon
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
// AmountOff is th amount the customer can use for free
AmountOff int64 `protobuf:"varint,3,opt,name=amount_off,json=amountOff,proto3" json:"amount_off,omitempty"`
// Currency of the free usage amount
Currency string `protobuf:"bytes,4,opt,name=currency,proto3" json:"currency,omitempty"`
// DurationInMonth defines how many month this coupon is valid for
DurationInMonth int64 `protobuf:"varint,5,opt,name=duration_in_month,json=durationInMonth,proto3" json:"duration_in_month,omitempty"`
// CreatedAt is the date the coupon was created
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,6,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
// RedeemBy is the date when this coupon can no longer be used
RedeemBy *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=redeem_by,json=redeemBy,proto3" json:"redeem_by,omitempty"`
// TimesRedeemed how often this coupon was already consumed
TimesRedeemed int64 `protobuf:"varint,8,opt,name=times_redeemed,json=timesRedeemed,proto3" json:"times_redeemed,omitempty"`
// MaxRedemptions defines how often this coupon can be consumed
MaxRedemptions int64 `protobuf:"varint,9,opt,name=max_redemptions,json=maxRedemptions,proto3" json:"max_redemptions,omitempty"`
// AmountLeft how many usages are left for this coupon
AmountLeft int64 `protobuf:"varint,10,opt,name=amount_left,json=amountLeft,proto3" json:"amount_left,omitempty"`
}
func (x *Coupon) Reset() {
*x = Coupon{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v1_payment_proto_msgTypes[6]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Coupon) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Coupon) ProtoMessage() {}
func (x *Coupon) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_payment_proto_msgTypes[6]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Coupon.ProtoReflect.Descriptor instead.
func (*Coupon) Descriptor() ([]byte, []int) {
return file_api_v1_payment_proto_rawDescGZIP(), []int{6}
}
func (x *Coupon) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *Coupon) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *Coupon) GetAmountOff() int64 {
if x != nil {
return x.AmountOff
}
return 0
}
func (x *Coupon) GetCurrency() string {
if x != nil {
return x.Currency
}
return ""
}
func (x *Coupon) GetDurationInMonth() int64 {
if x != nil {
return x.DurationInMonth
}
return 0
}
func (x *Coupon) GetCreatedAt() *timestamppb.Timestamp {
if x != nil {
return x.CreatedAt
}
return nil
}
func (x *Coupon) GetRedeemBy() *timestamppb.Timestamp {
if x != nil {
return x.RedeemBy
}
return nil
}
func (x *Coupon) GetTimesRedeemed() int64 {
if x != nil {
return x.TimesRedeemed
}
return 0
}
func (x *Coupon) GetMaxRedemptions() int64 {
if x != nil {
return x.MaxRedemptions
}
return 0
}
func (x *Coupon) GetAmountLeft() int64 {
if x != nil {
return x.AmountLeft
}
return 0
}
// PaymentServiceCreateOrUpdateCustomerRequest is the request payload for a payment create or update customer request
type PaymentServiceCreateOrUpdateCustomerRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Login of the customer
Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
// Customer is the customer to modify
Customer *PaymentCustomer `protobuf:"bytes,2,opt,name=customer,proto3" json:"customer,omitempty"`
// AcceptedTermsAndConditions indicates the modification of the terms and conditions acceptance
AcceptedTermsAndConditions bool `protobuf:"varint,3,opt,name=accepted_terms_and_conditions,json=acceptedTermsAndConditions,proto3" json:"accepted_terms_and_conditions,omitempty"`
}
func (x *PaymentServiceCreateOrUpdateCustomerRequest) Reset() {
*x = PaymentServiceCreateOrUpdateCustomerRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v1_payment_proto_msgTypes[7]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PaymentServiceCreateOrUpdateCustomerRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PaymentServiceCreateOrUpdateCustomerRequest) ProtoMessage() {}
func (x *PaymentServiceCreateOrUpdateCustomerRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_payment_proto_msgTypes[7]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PaymentServiceCreateOrUpdateCustomerRequest.ProtoReflect.Descriptor instead.
func (*PaymentServiceCreateOrUpdateCustomerRequest) Descriptor() ([]byte, []int) {
return file_api_v1_payment_proto_rawDescGZIP(), []int{7}
}
func (x *PaymentServiceCreateOrUpdateCustomerRequest) GetLogin() string {
if x != nil {
return x.Login
}
return ""
}
func (x *PaymentServiceCreateOrUpdateCustomerRequest) GetCustomer() *PaymentCustomer {
if x != nil {
return x.Customer
}
return nil
}
func (x *PaymentServiceCreateOrUpdateCustomerRequest) GetAcceptedTermsAndConditions() bool {
if x != nil {
return x.AcceptedTermsAndConditions
}
return false
}
// PaymentServiceCreateOrUpdateCustomerResponse is the response payload for a payment create or update customer request
type PaymentServiceCreateOrUpdateCustomerResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Customer is the customer
Customer *PaymentCustomer `protobuf:"bytes,1,opt,name=customer,proto3" json:"customer,omitempty"`
}
func (x *PaymentServiceCreateOrUpdateCustomerResponse) Reset() {
*x = PaymentServiceCreateOrUpdateCustomerResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v1_payment_proto_msgTypes[8]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PaymentServiceCreateOrUpdateCustomerResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PaymentServiceCreateOrUpdateCustomerResponse) ProtoMessage() {}
func (x *PaymentServiceCreateOrUpdateCustomerResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_payment_proto_msgTypes[8]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PaymentServiceCreateOrUpdateCustomerResponse.ProtoReflect.Descriptor instead.
func (*PaymentServiceCreateOrUpdateCustomerResponse) Descriptor() ([]byte, []int) {
return file_api_v1_payment_proto_rawDescGZIP(), []int{8}
}
func (x *PaymentServiceCreateOrUpdateCustomerResponse) GetCustomer() *PaymentCustomer {
if x != nil {
return x.Customer
}
return nil
}
// PaymentServiceGetCustomerRequest is the request payload for a payment get customer request
type PaymentServiceGetCustomerRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Login of the customer
Login string `protobuf:"bytes,1,opt,name=login,proto3" json:"login,omitempty"`
// CustomerId of the customer
CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"`
}
func (x *PaymentServiceGetCustomerRequest) Reset() {
*x = PaymentServiceGetCustomerRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v1_payment_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PaymentServiceGetCustomerRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*PaymentServiceGetCustomerRequest) ProtoMessage() {}
func (x *PaymentServiceGetCustomerRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v1_payment_proto_msgTypes[9]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use PaymentServiceGetCustomerRequest.ProtoReflect.Descriptor instead.
func (*PaymentServiceGetCustomerRequest) Descriptor() ([]byte, []int) {
return file_api_v1_payment_proto_rawDescGZIP(), []int{9}
}
func (x *PaymentServiceGetCustomerRequest) GetLogin() string {
if x != nil {
return x.Login
}
return ""
}
func (x *PaymentServiceGetCustomerRequest) GetCustomerId() string {
if x != nil {
return x.CustomerId
}
return ""
}
// PaymentServiceGetCustomerResponse is the response payload for a payment get customer request
type PaymentServiceGetCustomerResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Customer is the customer
Customer *PaymentCustomer `protobuf:"bytes,1,opt,name=customer,proto3" json:"customer,omitempty"`
}
func (x *PaymentServiceGetCustomerResponse) Reset() {
*x = PaymentServiceGetCustomerResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v1_payment_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *PaymentServiceGetCustomerResponse) String() string {