-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathaccountactivity.go
More file actions
1622 lines (1469 loc) · 94.6 KB
/
accountactivity.go
File metadata and controls
1622 lines (1469 loc) · 94.6 KB
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
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
package lithic
import (
"context"
"errors"
"fmt"
"net/http"
"net/url"
"reflect"
"slices"
"time"
"github.com/lithic-com/lithic-go/internal/apijson"
"github.com/lithic-com/lithic-go/internal/apiquery"
"github.com/lithic-com/lithic-go/internal/param"
"github.com/lithic-com/lithic-go/internal/requestconfig"
"github.com/lithic-com/lithic-go/option"
"github.com/lithic-com/lithic-go/packages/pagination"
"github.com/lithic-com/lithic-go/shared"
"github.com/tidwall/gjson"
)
// AccountActivityService contains methods and other services that help with
// interacting with the lithic API.
//
// Note, unlike clients, this service does not read variables from the environment
// automatically. You should not instantiate this service directly, and instead use
// the [NewAccountActivityService] method instead.
type AccountActivityService struct {
Options []option.RequestOption
}
// NewAccountActivityService generates a new service that applies the given options
// to each request. These options are applied after the parent client's options (if
// there is one), and before any request-specific options.
func NewAccountActivityService(opts ...option.RequestOption) (r *AccountActivityService) {
r = &AccountActivityService{}
r.Options = opts
return
}
// Retrieve a list of transactions across all public accounts.
func (r *AccountActivityService) List(ctx context.Context, query AccountActivityListParams, opts ...option.RequestOption) (res *pagination.CursorPage[AccountActivityListResponse], err error) {
var raw *http.Response
opts = slices.Concat(r.Options, opts)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
path := "v1/account_activity"
cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, query, &res, opts...)
if err != nil {
return nil, err
}
err = cfg.Execute()
if err != nil {
return nil, err
}
res.SetPageConfig(cfg, raw)
return res, nil
}
// Retrieve a list of transactions across all public accounts.
func (r *AccountActivityService) ListAutoPaging(ctx context.Context, query AccountActivityListParams, opts ...option.RequestOption) *pagination.CursorPageAutoPager[AccountActivityListResponse] {
return pagination.NewCursorPageAutoPager(r.List(ctx, query, opts...))
}
// Retrieve a single transaction
func (r *AccountActivityService) GetTransaction(ctx context.Context, transactionToken string, opts ...option.RequestOption) (res *AccountActivityGetTransactionResponse, err error) {
opts = slices.Concat(r.Options, opts)
if transactionToken == "" {
err = errors.New("missing required transaction_token parameter")
return
}
path := fmt.Sprintf("v1/account_activity/%s", transactionToken)
err = requestconfig.ExecuteNewRequest(ctx, http.MethodGet, path, nil, &res, opts...)
return
}
type WirePartyDetails struct {
// Account number
AccountNumber string `json:"account_number" api:"nullable"`
// Routing number or BIC of the financial institution
AgentID string `json:"agent_id" api:"nullable"`
// Name of the financial institution
AgentName string `json:"agent_name" api:"nullable"`
// Name of the person or company
Name string `json:"name" api:"nullable"`
JSON wirePartyDetailsJSON `json:"-"`
}
// wirePartyDetailsJSON contains the JSON metadata for the struct
// [WirePartyDetails]
type wirePartyDetailsJSON struct {
AccountNumber apijson.Field
AgentID apijson.Field
AgentName apijson.Field
Name apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *WirePartyDetails) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r wirePartyDetailsJSON) RawJSON() string {
return r.raw
}
// Response containing multiple transaction types. The `family` field determines
// which transaction type is returned: INTERNAL returns FinancialTransaction,
// TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT
// returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse,
// and MANAGEMENT_OPERATION returns ManagementOperationTransaction
type AccountActivityListResponse struct {
// Unique identifier for the transaction
Token string `json:"token" api:"required" format:"uuid"`
// ISO 8601 timestamp of when the transaction was created
Created time.Time `json:"created" api:"required" format:"date-time"`
// The status of the transaction
Status AccountActivityListResponseStatus `json:"status" api:"required"`
// ISO 8601 timestamp of when the transaction was last updated
Updated time.Time `json:"updated" api:"required" format:"date-time"`
// The token for the account associated with this transaction.
AccountToken string `json:"account_token" format:"uuid"`
// Fee assessed by the merchant and paid for by the cardholder in the smallest unit
// of the currency. Will be zero if no fee is assessed. Rebates may be transmitted
// as a negative value to indicate credited fees.
AcquirerFee int64 `json:"acquirer_fee" api:"nullable"`
// Unique identifier assigned to a transaction by the acquirer that can be used in
// dispute and chargeback filing. This field has been deprecated in favor of the
// `acquirer_reference_number` that resides in the event-level `network_info`.
//
// Deprecated: deprecated
AcquirerReferenceNumber string `json:"acquirer_reference_number" api:"nullable"`
// When the transaction is pending, this represents the authorization amount of the
// transaction in the anticipated settlement currency. Once the transaction has
// settled, this field represents the settled amount in the settlement currency.
//
// Deprecated: deprecated
Amount int64 `json:"amount"`
// This field can have the runtime type of [TransactionAmounts].
Amounts interface{} `json:"amounts"`
// The authorization amount of the transaction in the anticipated settlement
// currency.
//
// Deprecated: deprecated
AuthorizationAmount int64 `json:"authorization_amount" api:"nullable"`
// A fixed-width 6-digit numeric identifier that can be used to identify a
// transaction with networks.
AuthorizationCode string `json:"authorization_code" api:"nullable"`
// This field can have the runtime type of [TransactionAvs].
Avs interface{} `json:"avs"`
// Token for the card used in this transaction.
CardToken string `json:"card_token" format:"uuid"`
CardholderAuthentication CardholderAuthentication `json:"cardholder_authentication" api:"nullable"`
// Transaction category
Category AccountActivityListResponseCategory `json:"category"`
// Currency of the transaction, represented in ISO 4217 format
Currency string `json:"currency"`
// Transaction descriptor
Descriptor string `json:"descriptor"`
// Transfer direction
Direction AccountActivityListResponseDirection `json:"direction"`
// This field can have the runtime type of [[]shared.FinancialEvent],
// [[]BookTransferResponseEvent], [[]TransactionEvent], [[]PaymentEvent],
// [[]ExternalPaymentEvent], [[]ManagementOperationTransactionEvent].
Events interface{} `json:"events"`
// Expected release date for the transaction
ExpectedReleaseDate time.Time `json:"expected_release_date" api:"nullable" format:"date"`
// External bank account token
ExternalBankAccountToken string `json:"external_bank_account_token" api:"nullable" format:"uuid"`
// External ID defined by the customer
ExternalID string `json:"external_id" api:"nullable"`
// External resource associated with the management operation
ExternalResource ExternalResource `json:"external_resource" api:"nullable"`
// INTERNAL - Financial Transaction
Family AccountActivityListResponseFamily `json:"family"`
// Financial account token associated with the transaction
FinancialAccountToken string `json:"financial_account_token" api:"nullable" format:"uuid"`
// Globally unique identifier for the financial account or card that will send the
// funds. Accepted type dependent on the program's use case
FromFinancialAccountToken string `json:"from_financial_account_token" format:"uuid"`
Merchant shared.Merchant `json:"merchant"`
// Analogous to the 'amount', but in the merchant currency.
//
// Deprecated: deprecated
MerchantAmount int64 `json:"merchant_amount" api:"nullable"`
// Analogous to the 'authorization_amount', but in the merchant currency.
//
// Deprecated: deprecated
MerchantAuthorizationAmount int64 `json:"merchant_authorization_amount" api:"nullable"`
// 3-character alphabetic ISO 4217 code for the local currency of the transaction.
//
// Deprecated: deprecated
MerchantCurrency string `json:"merchant_currency"`
// Transfer method
Method AccountActivityListResponseMethod `json:"method"`
// This field can have the runtime type of [PaymentMethodAttributes].
MethodAttributes interface{} `json:"method_attributes"`
// Card network of the authorization. Value is `UNKNOWN` when Lithic cannot
// determine the network code from the upstream provider.
Network AccountActivityListResponseNetwork `json:"network" api:"nullable"`
// Network-provided score assessing risk level associated with a given
// authorization. Scores are on a range of 0-999, with 0 representing the lowest
// risk and 999 representing the highest risk. For Visa transactions, where the raw
// score has a range of 0-99, Lithic will normalize the score by multiplying the
// raw score by 10x.
NetworkRiskScore int64 `json:"network_risk_score" api:"nullable"`
PaymentType AccountActivityListResponsePaymentType `json:"payment_type"`
// Pending amount in cents
PendingAmount int64 `json:"pending_amount"`
// This field can have the runtime type of [TransactionPos].
Pos interface{} `json:"pos"`
// This field can have the runtime type of [PaymentRelatedAccountTokens].
RelatedAccountTokens interface{} `json:"related_account_tokens"`
// Transaction result
Result AccountActivityListResponseResult `json:"result"`
// Settled amount in cents
SettledAmount int64 `json:"settled_amount"`
// Transaction source
Source AccountActivityListResponseSource `json:"source"`
// This field can have the runtime type of [map[string]string].
Tags interface{} `json:"tags"`
// Globally unique identifier for the financial account or card that will receive
// the funds. Accepted type dependent on the program's use case
ToFinancialAccountToken string `json:"to_financial_account_token" format:"uuid"`
TokenInfo TokenInfo `json:"token_info" api:"nullable"`
// This field can have the runtime type of [BookTransferResponseTransactionSeries],
// [ManagementOperationTransactionTransactionSeries].
TransactionSeries interface{} `json:"transaction_series"`
Type AccountActivityListResponseType `json:"type"`
// User-defined identifier
UserDefinedID string `json:"user_defined_id" api:"nullable"`
JSON accountActivityListResponseJSON `json:"-"`
union AccountActivityListResponseUnion
}
// accountActivityListResponseJSON contains the JSON metadata for the struct
// [AccountActivityListResponse]
type accountActivityListResponseJSON struct {
Token apijson.Field
Created apijson.Field
Status apijson.Field
Updated apijson.Field
AccountToken apijson.Field
AcquirerFee apijson.Field
AcquirerReferenceNumber apijson.Field
Amount apijson.Field
Amounts apijson.Field
AuthorizationAmount apijson.Field
AuthorizationCode apijson.Field
Avs apijson.Field
CardToken apijson.Field
CardholderAuthentication apijson.Field
Category apijson.Field
Currency apijson.Field
Descriptor apijson.Field
Direction apijson.Field
Events apijson.Field
ExpectedReleaseDate apijson.Field
ExternalBankAccountToken apijson.Field
ExternalID apijson.Field
ExternalResource apijson.Field
Family apijson.Field
FinancialAccountToken apijson.Field
FromFinancialAccountToken apijson.Field
Merchant apijson.Field
MerchantAmount apijson.Field
MerchantAuthorizationAmount apijson.Field
MerchantCurrency apijson.Field
Method apijson.Field
MethodAttributes apijson.Field
Network apijson.Field
NetworkRiskScore apijson.Field
PaymentType apijson.Field
PendingAmount apijson.Field
Pos apijson.Field
RelatedAccountTokens apijson.Field
Result apijson.Field
SettledAmount apijson.Field
Source apijson.Field
Tags apijson.Field
ToFinancialAccountToken apijson.Field
TokenInfo apijson.Field
TransactionSeries apijson.Field
Type apijson.Field
UserDefinedID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r accountActivityListResponseJSON) RawJSON() string {
return r.raw
}
func (r *AccountActivityListResponse) UnmarshalJSON(data []byte) (err error) {
*r = AccountActivityListResponse{}
err = apijson.UnmarshalRoot(data, &r.union)
if err != nil {
return err
}
return apijson.Port(r.union, &r)
}
// AsUnion returns a [AccountActivityListResponseUnion] interface which you can
// cast to the specific types for more type safety.
//
// Possible runtime types of the union are
// [AccountActivityListResponseFinancialTransaction], [BookTransferResponse],
// [AccountActivityListResponseCardTransaction], [Payment], [ExternalPayment],
// [ManagementOperationTransaction].
func (r AccountActivityListResponse) AsUnion() AccountActivityListResponseUnion {
return r.union
}
// Response containing multiple transaction types. The `family` field determines
// which transaction type is returned: INTERNAL returns FinancialTransaction,
// TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT
// returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse,
// and MANAGEMENT_OPERATION returns ManagementOperationTransaction
//
// Union satisfied by [AccountActivityListResponseFinancialTransaction],
// [BookTransferResponse], [AccountActivityListResponseCardTransaction], [Payment],
// [ExternalPayment] or [ManagementOperationTransaction].
type AccountActivityListResponseUnion interface {
implementsAccountActivityListResponse()
}
func init() {
apijson.RegisterUnion(
reflect.TypeOf((*AccountActivityListResponseUnion)(nil)).Elem(),
"family",
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AccountActivityListResponseFinancialTransaction{}),
DiscriminatorValue: "INTERNAL",
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(BookTransferResponse{}),
DiscriminatorValue: "TRANSFER",
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(AccountActivityListResponseCardTransaction{}),
DiscriminatorValue: "CARD",
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(Payment{}),
DiscriminatorValue: "PAYMENT",
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(ExternalPayment{}),
DiscriminatorValue: "EXTERNAL_PAYMENT",
},
apijson.UnionVariant{
TypeFilter: gjson.JSON,
Type: reflect.TypeOf(ManagementOperationTransaction{}),
DiscriminatorValue: "MANAGEMENT_OPERATION",
},
)
}
// Financial transaction with inheritance from unified base transaction
type AccountActivityListResponseFinancialTransaction struct {
// Unique identifier for the transaction
Token string `json:"token" api:"required" format:"uuid"`
// Transaction category
Category AccountActivityListResponseFinancialTransactionCategory `json:"category" api:"required"`
// ISO 8601 timestamp of when the transaction was created
Created time.Time `json:"created" api:"required" format:"date-time"`
// Currency of the transaction, represented in ISO 4217 format
Currency string `json:"currency" api:"required"`
// Transaction descriptor
Descriptor string `json:"descriptor" api:"required"`
// List of transaction events
Events []shared.FinancialEvent `json:"events" api:"required"`
// INTERNAL - Financial Transaction
Family AccountActivityListResponseFinancialTransactionFamily `json:"family" api:"required"`
// Financial account token associated with the transaction
FinancialAccountToken string `json:"financial_account_token" api:"required" format:"uuid"`
// Pending amount in cents
PendingAmount int64 `json:"pending_amount" api:"required"`
// Transaction result
Result AccountActivityListResponseFinancialTransactionResult `json:"result" api:"required"`
// Settled amount in cents
SettledAmount int64 `json:"settled_amount" api:"required"`
// The status of the transaction
Status AccountActivityListResponseFinancialTransactionStatus `json:"status" api:"required"`
// ISO 8601 timestamp of when the transaction was last updated
Updated time.Time `json:"updated" api:"required" format:"date-time"`
JSON accountActivityListResponseFinancialTransactionJSON `json:"-"`
}
// accountActivityListResponseFinancialTransactionJSON contains the JSON metadata
// for the struct [AccountActivityListResponseFinancialTransaction]
type accountActivityListResponseFinancialTransactionJSON struct {
Token apijson.Field
Category apijson.Field
Created apijson.Field
Currency apijson.Field
Descriptor apijson.Field
Events apijson.Field
Family apijson.Field
FinancialAccountToken apijson.Field
PendingAmount apijson.Field
Result apijson.Field
SettledAmount apijson.Field
Status apijson.Field
Updated apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *AccountActivityListResponseFinancialTransaction) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r accountActivityListResponseFinancialTransactionJSON) RawJSON() string {
return r.raw
}
func (r AccountActivityListResponseFinancialTransaction) implementsAccountActivityListResponse() {}
// Transaction category
type AccountActivityListResponseFinancialTransactionCategory string
const (
AccountActivityListResponseFinancialTransactionCategoryACH AccountActivityListResponseFinancialTransactionCategory = "ACH"
AccountActivityListResponseFinancialTransactionCategoryBalanceOrFunding AccountActivityListResponseFinancialTransactionCategory = "BALANCE_OR_FUNDING"
AccountActivityListResponseFinancialTransactionCategoryFee AccountActivityListResponseFinancialTransactionCategory = "FEE"
AccountActivityListResponseFinancialTransactionCategoryReward AccountActivityListResponseFinancialTransactionCategory = "REWARD"
AccountActivityListResponseFinancialTransactionCategoryAdjustment AccountActivityListResponseFinancialTransactionCategory = "ADJUSTMENT"
AccountActivityListResponseFinancialTransactionCategoryDerecognition AccountActivityListResponseFinancialTransactionCategory = "DERECOGNITION"
AccountActivityListResponseFinancialTransactionCategoryDispute AccountActivityListResponseFinancialTransactionCategory = "DISPUTE"
AccountActivityListResponseFinancialTransactionCategoryCard AccountActivityListResponseFinancialTransactionCategory = "CARD"
AccountActivityListResponseFinancialTransactionCategoryExternalACH AccountActivityListResponseFinancialTransactionCategory = "EXTERNAL_ACH"
AccountActivityListResponseFinancialTransactionCategoryExternalCheck AccountActivityListResponseFinancialTransactionCategory = "EXTERNAL_CHECK"
AccountActivityListResponseFinancialTransactionCategoryExternalFednow AccountActivityListResponseFinancialTransactionCategory = "EXTERNAL_FEDNOW"
AccountActivityListResponseFinancialTransactionCategoryExternalRtp AccountActivityListResponseFinancialTransactionCategory = "EXTERNAL_RTP"
AccountActivityListResponseFinancialTransactionCategoryExternalTransfer AccountActivityListResponseFinancialTransactionCategory = "EXTERNAL_TRANSFER"
AccountActivityListResponseFinancialTransactionCategoryExternalWire AccountActivityListResponseFinancialTransactionCategory = "EXTERNAL_WIRE"
AccountActivityListResponseFinancialTransactionCategoryManagementAdjustment AccountActivityListResponseFinancialTransactionCategory = "MANAGEMENT_ADJUSTMENT"
AccountActivityListResponseFinancialTransactionCategoryManagementDispute AccountActivityListResponseFinancialTransactionCategory = "MANAGEMENT_DISPUTE"
AccountActivityListResponseFinancialTransactionCategoryManagementFee AccountActivityListResponseFinancialTransactionCategory = "MANAGEMENT_FEE"
AccountActivityListResponseFinancialTransactionCategoryManagementReward AccountActivityListResponseFinancialTransactionCategory = "MANAGEMENT_REWARD"
AccountActivityListResponseFinancialTransactionCategoryManagementDisbursement AccountActivityListResponseFinancialTransactionCategory = "MANAGEMENT_DISBURSEMENT"
AccountActivityListResponseFinancialTransactionCategoryProgramFunding AccountActivityListResponseFinancialTransactionCategory = "PROGRAM_FUNDING"
)
func (r AccountActivityListResponseFinancialTransactionCategory) IsKnown() bool {
switch r {
case AccountActivityListResponseFinancialTransactionCategoryACH, AccountActivityListResponseFinancialTransactionCategoryBalanceOrFunding, AccountActivityListResponseFinancialTransactionCategoryFee, AccountActivityListResponseFinancialTransactionCategoryReward, AccountActivityListResponseFinancialTransactionCategoryAdjustment, AccountActivityListResponseFinancialTransactionCategoryDerecognition, AccountActivityListResponseFinancialTransactionCategoryDispute, AccountActivityListResponseFinancialTransactionCategoryCard, AccountActivityListResponseFinancialTransactionCategoryExternalACH, AccountActivityListResponseFinancialTransactionCategoryExternalCheck, AccountActivityListResponseFinancialTransactionCategoryExternalFednow, AccountActivityListResponseFinancialTransactionCategoryExternalRtp, AccountActivityListResponseFinancialTransactionCategoryExternalTransfer, AccountActivityListResponseFinancialTransactionCategoryExternalWire, AccountActivityListResponseFinancialTransactionCategoryManagementAdjustment, AccountActivityListResponseFinancialTransactionCategoryManagementDispute, AccountActivityListResponseFinancialTransactionCategoryManagementFee, AccountActivityListResponseFinancialTransactionCategoryManagementReward, AccountActivityListResponseFinancialTransactionCategoryManagementDisbursement, AccountActivityListResponseFinancialTransactionCategoryProgramFunding:
return true
}
return false
}
// INTERNAL - Financial Transaction
type AccountActivityListResponseFinancialTransactionFamily string
const (
AccountActivityListResponseFinancialTransactionFamilyInternal AccountActivityListResponseFinancialTransactionFamily = "INTERNAL"
)
func (r AccountActivityListResponseFinancialTransactionFamily) IsKnown() bool {
switch r {
case AccountActivityListResponseFinancialTransactionFamilyInternal:
return true
}
return false
}
// Transaction result
type AccountActivityListResponseFinancialTransactionResult string
const (
AccountActivityListResponseFinancialTransactionResultApproved AccountActivityListResponseFinancialTransactionResult = "APPROVED"
AccountActivityListResponseFinancialTransactionResultDeclined AccountActivityListResponseFinancialTransactionResult = "DECLINED"
)
func (r AccountActivityListResponseFinancialTransactionResult) IsKnown() bool {
switch r {
case AccountActivityListResponseFinancialTransactionResultApproved, AccountActivityListResponseFinancialTransactionResultDeclined:
return true
}
return false
}
// The status of the transaction
type AccountActivityListResponseFinancialTransactionStatus string
const (
AccountActivityListResponseFinancialTransactionStatusPending AccountActivityListResponseFinancialTransactionStatus = "PENDING"
AccountActivityListResponseFinancialTransactionStatusSettled AccountActivityListResponseFinancialTransactionStatus = "SETTLED"
AccountActivityListResponseFinancialTransactionStatusDeclined AccountActivityListResponseFinancialTransactionStatus = "DECLINED"
AccountActivityListResponseFinancialTransactionStatusReversed AccountActivityListResponseFinancialTransactionStatus = "REVERSED"
AccountActivityListResponseFinancialTransactionStatusCanceled AccountActivityListResponseFinancialTransactionStatus = "CANCELED"
AccountActivityListResponseFinancialTransactionStatusReturned AccountActivityListResponseFinancialTransactionStatus = "RETURNED"
)
func (r AccountActivityListResponseFinancialTransactionStatus) IsKnown() bool {
switch r {
case AccountActivityListResponseFinancialTransactionStatusPending, AccountActivityListResponseFinancialTransactionStatusSettled, AccountActivityListResponseFinancialTransactionStatusDeclined, AccountActivityListResponseFinancialTransactionStatusReversed, AccountActivityListResponseFinancialTransactionStatusCanceled, AccountActivityListResponseFinancialTransactionStatusReturned:
return true
}
return false
}
// Card transaction with ledger base properties
type AccountActivityListResponseCardTransaction struct {
// Unique identifier for the transaction
Token string `json:"token" api:"required" format:"uuid"`
// ISO 8601 timestamp of when the transaction was created
Created time.Time `json:"created" api:"required" format:"date-time"`
// CARD - Card Transaction
Family AccountActivityListResponseCardTransactionFamily `json:"family" api:"required"`
// The status of the transaction
Status AccountActivityListResponseCardTransactionStatus `json:"status" api:"required"`
// ISO 8601 timestamp of when the transaction was last updated
Updated time.Time `json:"updated" api:"required" format:"date-time"`
JSON accountActivityListResponseCardTransactionJSON `json:"-"`
Transaction
}
// accountActivityListResponseCardTransactionJSON contains the JSON metadata for
// the struct [AccountActivityListResponseCardTransaction]
type accountActivityListResponseCardTransactionJSON struct {
Token apijson.Field
Created apijson.Field
Family apijson.Field
Status apijson.Field
Updated apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *AccountActivityListResponseCardTransaction) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r accountActivityListResponseCardTransactionJSON) RawJSON() string {
return r.raw
}
func (r AccountActivityListResponseCardTransaction) implementsAccountActivityListResponse() {}
// CARD - Card Transaction
type AccountActivityListResponseCardTransactionFamily string
const (
AccountActivityListResponseCardTransactionFamilyCard AccountActivityListResponseCardTransactionFamily = "CARD"
)
func (r AccountActivityListResponseCardTransactionFamily) IsKnown() bool {
switch r {
case AccountActivityListResponseCardTransactionFamilyCard:
return true
}
return false
}
// The status of the transaction
type AccountActivityListResponseCardTransactionStatus string
const (
AccountActivityListResponseCardTransactionStatusPending AccountActivityListResponseCardTransactionStatus = "PENDING"
AccountActivityListResponseCardTransactionStatusSettled AccountActivityListResponseCardTransactionStatus = "SETTLED"
AccountActivityListResponseCardTransactionStatusDeclined AccountActivityListResponseCardTransactionStatus = "DECLINED"
AccountActivityListResponseCardTransactionStatusReversed AccountActivityListResponseCardTransactionStatus = "REVERSED"
AccountActivityListResponseCardTransactionStatusCanceled AccountActivityListResponseCardTransactionStatus = "CANCELED"
AccountActivityListResponseCardTransactionStatusReturned AccountActivityListResponseCardTransactionStatus = "RETURNED"
)
func (r AccountActivityListResponseCardTransactionStatus) IsKnown() bool {
switch r {
case AccountActivityListResponseCardTransactionStatusPending, AccountActivityListResponseCardTransactionStatusSettled, AccountActivityListResponseCardTransactionStatusDeclined, AccountActivityListResponseCardTransactionStatusReversed, AccountActivityListResponseCardTransactionStatusCanceled, AccountActivityListResponseCardTransactionStatusReturned:
return true
}
return false
}
// The status of the transaction
type AccountActivityListResponseStatus string
const (
AccountActivityListResponseStatusPending AccountActivityListResponseStatus = "PENDING"
AccountActivityListResponseStatusSettled AccountActivityListResponseStatus = "SETTLED"
AccountActivityListResponseStatusDeclined AccountActivityListResponseStatus = "DECLINED"
AccountActivityListResponseStatusReversed AccountActivityListResponseStatus = "REVERSED"
AccountActivityListResponseStatusCanceled AccountActivityListResponseStatus = "CANCELED"
AccountActivityListResponseStatusReturned AccountActivityListResponseStatus = "RETURNED"
AccountActivityListResponseStatusExpired AccountActivityListResponseStatus = "EXPIRED"
AccountActivityListResponseStatusVoided AccountActivityListResponseStatus = "VOIDED"
)
func (r AccountActivityListResponseStatus) IsKnown() bool {
switch r {
case AccountActivityListResponseStatusPending, AccountActivityListResponseStatusSettled, AccountActivityListResponseStatusDeclined, AccountActivityListResponseStatusReversed, AccountActivityListResponseStatusCanceled, AccountActivityListResponseStatusReturned, AccountActivityListResponseStatusExpired, AccountActivityListResponseStatusVoided:
return true
}
return false
}
// Transaction category
type AccountActivityListResponseCategory string
const (
AccountActivityListResponseCategoryACH AccountActivityListResponseCategory = "ACH"
AccountActivityListResponseCategoryBalanceOrFunding AccountActivityListResponseCategory = "BALANCE_OR_FUNDING"
AccountActivityListResponseCategoryFee AccountActivityListResponseCategory = "FEE"
AccountActivityListResponseCategoryReward AccountActivityListResponseCategory = "REWARD"
AccountActivityListResponseCategoryAdjustment AccountActivityListResponseCategory = "ADJUSTMENT"
AccountActivityListResponseCategoryDerecognition AccountActivityListResponseCategory = "DERECOGNITION"
AccountActivityListResponseCategoryDispute AccountActivityListResponseCategory = "DISPUTE"
AccountActivityListResponseCategoryCard AccountActivityListResponseCategory = "CARD"
AccountActivityListResponseCategoryExternalACH AccountActivityListResponseCategory = "EXTERNAL_ACH"
AccountActivityListResponseCategoryExternalCheck AccountActivityListResponseCategory = "EXTERNAL_CHECK"
AccountActivityListResponseCategoryExternalFednow AccountActivityListResponseCategory = "EXTERNAL_FEDNOW"
AccountActivityListResponseCategoryExternalRtp AccountActivityListResponseCategory = "EXTERNAL_RTP"
AccountActivityListResponseCategoryExternalTransfer AccountActivityListResponseCategory = "EXTERNAL_TRANSFER"
AccountActivityListResponseCategoryExternalWire AccountActivityListResponseCategory = "EXTERNAL_WIRE"
AccountActivityListResponseCategoryManagementAdjustment AccountActivityListResponseCategory = "MANAGEMENT_ADJUSTMENT"
AccountActivityListResponseCategoryManagementDispute AccountActivityListResponseCategory = "MANAGEMENT_DISPUTE"
AccountActivityListResponseCategoryManagementFee AccountActivityListResponseCategory = "MANAGEMENT_FEE"
AccountActivityListResponseCategoryManagementReward AccountActivityListResponseCategory = "MANAGEMENT_REWARD"
AccountActivityListResponseCategoryManagementDisbursement AccountActivityListResponseCategory = "MANAGEMENT_DISBURSEMENT"
AccountActivityListResponseCategoryProgramFunding AccountActivityListResponseCategory = "PROGRAM_FUNDING"
AccountActivityListResponseCategoryInternal AccountActivityListResponseCategory = "INTERNAL"
AccountActivityListResponseCategoryTransfer AccountActivityListResponseCategory = "TRANSFER"
)
func (r AccountActivityListResponseCategory) IsKnown() bool {
switch r {
case AccountActivityListResponseCategoryACH, AccountActivityListResponseCategoryBalanceOrFunding, AccountActivityListResponseCategoryFee, AccountActivityListResponseCategoryReward, AccountActivityListResponseCategoryAdjustment, AccountActivityListResponseCategoryDerecognition, AccountActivityListResponseCategoryDispute, AccountActivityListResponseCategoryCard, AccountActivityListResponseCategoryExternalACH, AccountActivityListResponseCategoryExternalCheck, AccountActivityListResponseCategoryExternalFednow, AccountActivityListResponseCategoryExternalRtp, AccountActivityListResponseCategoryExternalTransfer, AccountActivityListResponseCategoryExternalWire, AccountActivityListResponseCategoryManagementAdjustment, AccountActivityListResponseCategoryManagementDispute, AccountActivityListResponseCategoryManagementFee, AccountActivityListResponseCategoryManagementReward, AccountActivityListResponseCategoryManagementDisbursement, AccountActivityListResponseCategoryProgramFunding, AccountActivityListResponseCategoryInternal, AccountActivityListResponseCategoryTransfer:
return true
}
return false
}
// Transfer direction
type AccountActivityListResponseDirection string
const (
AccountActivityListResponseDirectionCredit AccountActivityListResponseDirection = "CREDIT"
AccountActivityListResponseDirectionDebit AccountActivityListResponseDirection = "DEBIT"
)
func (r AccountActivityListResponseDirection) IsKnown() bool {
switch r {
case AccountActivityListResponseDirectionCredit, AccountActivityListResponseDirectionDebit:
return true
}
return false
}
// INTERNAL - Financial Transaction
type AccountActivityListResponseFamily string
const (
AccountActivityListResponseFamilyInternal AccountActivityListResponseFamily = "INTERNAL"
AccountActivityListResponseFamilyTransfer AccountActivityListResponseFamily = "TRANSFER"
AccountActivityListResponseFamilyCard AccountActivityListResponseFamily = "CARD"
AccountActivityListResponseFamilyPayment AccountActivityListResponseFamily = "PAYMENT"
AccountActivityListResponseFamilyExternalPayment AccountActivityListResponseFamily = "EXTERNAL_PAYMENT"
AccountActivityListResponseFamilyManagementOperation AccountActivityListResponseFamily = "MANAGEMENT_OPERATION"
)
func (r AccountActivityListResponseFamily) IsKnown() bool {
switch r {
case AccountActivityListResponseFamilyInternal, AccountActivityListResponseFamilyTransfer, AccountActivityListResponseFamilyCard, AccountActivityListResponseFamilyPayment, AccountActivityListResponseFamilyExternalPayment, AccountActivityListResponseFamilyManagementOperation:
return true
}
return false
}
// Transfer method
type AccountActivityListResponseMethod string
const (
AccountActivityListResponseMethodACHNextDay AccountActivityListResponseMethod = "ACH_NEXT_DAY"
AccountActivityListResponseMethodACHSameDay AccountActivityListResponseMethod = "ACH_SAME_DAY"
AccountActivityListResponseMethodWire AccountActivityListResponseMethod = "WIRE"
)
func (r AccountActivityListResponseMethod) IsKnown() bool {
switch r {
case AccountActivityListResponseMethodACHNextDay, AccountActivityListResponseMethodACHSameDay, AccountActivityListResponseMethodWire:
return true
}
return false
}
// Card network of the authorization. Value is `UNKNOWN` when Lithic cannot
// determine the network code from the upstream provider.
type AccountActivityListResponseNetwork string
const (
AccountActivityListResponseNetworkAmex AccountActivityListResponseNetwork = "AMEX"
AccountActivityListResponseNetworkInterlink AccountActivityListResponseNetwork = "INTERLINK"
AccountActivityListResponseNetworkMaestro AccountActivityListResponseNetwork = "MAESTRO"
AccountActivityListResponseNetworkMastercard AccountActivityListResponseNetwork = "MASTERCARD"
AccountActivityListResponseNetworkUnknown AccountActivityListResponseNetwork = "UNKNOWN"
AccountActivityListResponseNetworkVisa AccountActivityListResponseNetwork = "VISA"
)
func (r AccountActivityListResponseNetwork) IsKnown() bool {
switch r {
case AccountActivityListResponseNetworkAmex, AccountActivityListResponseNetworkInterlink, AccountActivityListResponseNetworkMaestro, AccountActivityListResponseNetworkMastercard, AccountActivityListResponseNetworkUnknown, AccountActivityListResponseNetworkVisa:
return true
}
return false
}
type AccountActivityListResponsePaymentType string
const (
AccountActivityListResponsePaymentTypeDeposit AccountActivityListResponsePaymentType = "DEPOSIT"
AccountActivityListResponsePaymentTypeWithdrawal AccountActivityListResponsePaymentType = "WITHDRAWAL"
)
func (r AccountActivityListResponsePaymentType) IsKnown() bool {
switch r {
case AccountActivityListResponsePaymentTypeDeposit, AccountActivityListResponsePaymentTypeWithdrawal:
return true
}
return false
}
// Transaction result
type AccountActivityListResponseResult string
const (
AccountActivityListResponseResultApproved AccountActivityListResponseResult = "APPROVED"
AccountActivityListResponseResultDeclined AccountActivityListResponseResult = "DECLINED"
AccountActivityListResponseResultAccountPaused AccountActivityListResponseResult = "ACCOUNT_PAUSED"
AccountActivityListResponseResultAccountStateTransactionFail AccountActivityListResponseResult = "ACCOUNT_STATE_TRANSACTION_FAIL"
AccountActivityListResponseResultBankConnectionError AccountActivityListResponseResult = "BANK_CONNECTION_ERROR"
AccountActivityListResponseResultBankNotVerified AccountActivityListResponseResult = "BANK_NOT_VERIFIED"
AccountActivityListResponseResultCardClosed AccountActivityListResponseResult = "CARD_CLOSED"
AccountActivityListResponseResultCardPaused AccountActivityListResponseResult = "CARD_PAUSED"
AccountActivityListResponseResultFraudAdvice AccountActivityListResponseResult = "FRAUD_ADVICE"
AccountActivityListResponseResultIgnoredTtlExpiry AccountActivityListResponseResult = "IGNORED_TTL_EXPIRY"
AccountActivityListResponseResultSuspectedFraud AccountActivityListResponseResult = "SUSPECTED_FRAUD"
AccountActivityListResponseResultInactiveAccount AccountActivityListResponseResult = "INACTIVE_ACCOUNT"
AccountActivityListResponseResultIncorrectPin AccountActivityListResponseResult = "INCORRECT_PIN"
AccountActivityListResponseResultInvalidCardDetails AccountActivityListResponseResult = "INVALID_CARD_DETAILS"
AccountActivityListResponseResultInsufficientFunds AccountActivityListResponseResult = "INSUFFICIENT_FUNDS"
AccountActivityListResponseResultInsufficientFundsPreload AccountActivityListResponseResult = "INSUFFICIENT_FUNDS_PRELOAD"
AccountActivityListResponseResultInvalidTransaction AccountActivityListResponseResult = "INVALID_TRANSACTION"
AccountActivityListResponseResultMerchantBlacklist AccountActivityListResponseResult = "MERCHANT_BLACKLIST"
AccountActivityListResponseResultOriginalNotFound AccountActivityListResponseResult = "ORIGINAL_NOT_FOUND"
AccountActivityListResponseResultPreviouslyCompleted AccountActivityListResponseResult = "PREVIOUSLY_COMPLETED"
AccountActivityListResponseResultSingleUseRecharged AccountActivityListResponseResult = "SINGLE_USE_RECHARGED"
AccountActivityListResponseResultSwitchInoperativeAdvice AccountActivityListResponseResult = "SWITCH_INOPERATIVE_ADVICE"
AccountActivityListResponseResultUnauthorizedMerchant AccountActivityListResponseResult = "UNAUTHORIZED_MERCHANT"
AccountActivityListResponseResultUnknownHostTimeout AccountActivityListResponseResult = "UNKNOWN_HOST_TIMEOUT"
AccountActivityListResponseResultUserTransactionLimit AccountActivityListResponseResult = "USER_TRANSACTION_LIMIT"
)
func (r AccountActivityListResponseResult) IsKnown() bool {
switch r {
case AccountActivityListResponseResultApproved, AccountActivityListResponseResultDeclined, AccountActivityListResponseResultAccountPaused, AccountActivityListResponseResultAccountStateTransactionFail, AccountActivityListResponseResultBankConnectionError, AccountActivityListResponseResultBankNotVerified, AccountActivityListResponseResultCardClosed, AccountActivityListResponseResultCardPaused, AccountActivityListResponseResultFraudAdvice, AccountActivityListResponseResultIgnoredTtlExpiry, AccountActivityListResponseResultSuspectedFraud, AccountActivityListResponseResultInactiveAccount, AccountActivityListResponseResultIncorrectPin, AccountActivityListResponseResultInvalidCardDetails, AccountActivityListResponseResultInsufficientFunds, AccountActivityListResponseResultInsufficientFundsPreload, AccountActivityListResponseResultInvalidTransaction, AccountActivityListResponseResultMerchantBlacklist, AccountActivityListResponseResultOriginalNotFound, AccountActivityListResponseResultPreviouslyCompleted, AccountActivityListResponseResultSingleUseRecharged, AccountActivityListResponseResultSwitchInoperativeAdvice, AccountActivityListResponseResultUnauthorizedMerchant, AccountActivityListResponseResultUnknownHostTimeout, AccountActivityListResponseResultUserTransactionLimit:
return true
}
return false
}
// Transaction source
type AccountActivityListResponseSource string
const (
AccountActivityListResponseSourceLithic AccountActivityListResponseSource = "LITHIC"
AccountActivityListResponseSourceExternal AccountActivityListResponseSource = "EXTERNAL"
AccountActivityListResponseSourceCustomer AccountActivityListResponseSource = "CUSTOMER"
)
func (r AccountActivityListResponseSource) IsKnown() bool {
switch r {
case AccountActivityListResponseSourceLithic, AccountActivityListResponseSourceExternal, AccountActivityListResponseSourceCustomer:
return true
}
return false
}
type AccountActivityListResponseType string
const (
AccountActivityListResponseTypeOriginationCredit AccountActivityListResponseType = "ORIGINATION_CREDIT"
AccountActivityListResponseTypeOriginationDebit AccountActivityListResponseType = "ORIGINATION_DEBIT"
AccountActivityListResponseTypeReceiptCredit AccountActivityListResponseType = "RECEIPT_CREDIT"
AccountActivityListResponseTypeReceiptDebit AccountActivityListResponseType = "RECEIPT_DEBIT"
AccountActivityListResponseTypeWireInboundPayment AccountActivityListResponseType = "WIRE_INBOUND_PAYMENT"
AccountActivityListResponseTypeWireInboundAdmin AccountActivityListResponseType = "WIRE_INBOUND_ADMIN"
AccountActivityListResponseTypeWireOutboundPayment AccountActivityListResponseType = "WIRE_OUTBOUND_PAYMENT"
AccountActivityListResponseTypeWireOutboundAdmin AccountActivityListResponseType = "WIRE_OUTBOUND_ADMIN"
AccountActivityListResponseTypeWireInboundDrawdownRequest AccountActivityListResponseType = "WIRE_INBOUND_DRAWDOWN_REQUEST"
)
func (r AccountActivityListResponseType) IsKnown() bool {
switch r {
case AccountActivityListResponseTypeOriginationCredit, AccountActivityListResponseTypeOriginationDebit, AccountActivityListResponseTypeReceiptCredit, AccountActivityListResponseTypeReceiptDebit, AccountActivityListResponseTypeWireInboundPayment, AccountActivityListResponseTypeWireInboundAdmin, AccountActivityListResponseTypeWireOutboundPayment, AccountActivityListResponseTypeWireOutboundAdmin, AccountActivityListResponseTypeWireInboundDrawdownRequest:
return true
}
return false
}
// Response containing multiple transaction types. The `family` field determines
// which transaction type is returned: INTERNAL returns FinancialTransaction,
// TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT
// returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse,
// and MANAGEMENT_OPERATION returns ManagementOperationTransaction
type AccountActivityGetTransactionResponse struct {
// Unique identifier for the transaction
Token string `json:"token" api:"required" format:"uuid"`
// ISO 8601 timestamp of when the transaction was created
Created time.Time `json:"created" api:"required" format:"date-time"`
// The status of the transaction
Status AccountActivityGetTransactionResponseStatus `json:"status" api:"required"`
// ISO 8601 timestamp of when the transaction was last updated
Updated time.Time `json:"updated" api:"required" format:"date-time"`
// The token for the account associated with this transaction.
AccountToken string `json:"account_token" format:"uuid"`
// Fee assessed by the merchant and paid for by the cardholder in the smallest unit
// of the currency. Will be zero if no fee is assessed. Rebates may be transmitted
// as a negative value to indicate credited fees.
AcquirerFee int64 `json:"acquirer_fee" api:"nullable"`
// Unique identifier assigned to a transaction by the acquirer that can be used in
// dispute and chargeback filing. This field has been deprecated in favor of the
// `acquirer_reference_number` that resides in the event-level `network_info`.
//
// Deprecated: deprecated
AcquirerReferenceNumber string `json:"acquirer_reference_number" api:"nullable"`
// When the transaction is pending, this represents the authorization amount of the
// transaction in the anticipated settlement currency. Once the transaction has
// settled, this field represents the settled amount in the settlement currency.
//
// Deprecated: deprecated
Amount int64 `json:"amount"`
// This field can have the runtime type of [TransactionAmounts].
Amounts interface{} `json:"amounts"`
// The authorization amount of the transaction in the anticipated settlement
// currency.
//
// Deprecated: deprecated
AuthorizationAmount int64 `json:"authorization_amount" api:"nullable"`
// A fixed-width 6-digit numeric identifier that can be used to identify a
// transaction with networks.
AuthorizationCode string `json:"authorization_code" api:"nullable"`
// This field can have the runtime type of [TransactionAvs].
Avs interface{} `json:"avs"`
// Token for the card used in this transaction.
CardToken string `json:"card_token" format:"uuid"`
CardholderAuthentication CardholderAuthentication `json:"cardholder_authentication" api:"nullable"`
// Transaction category
Category AccountActivityGetTransactionResponseCategory `json:"category"`
// Currency of the transaction, represented in ISO 4217 format
Currency string `json:"currency"`
// Transaction descriptor
Descriptor string `json:"descriptor"`
// Transfer direction
Direction AccountActivityGetTransactionResponseDirection `json:"direction"`
// This field can have the runtime type of [[]shared.FinancialEvent],
// [[]BookTransferResponseEvent], [[]TransactionEvent], [[]PaymentEvent],
// [[]ExternalPaymentEvent], [[]ManagementOperationTransactionEvent].
Events interface{} `json:"events"`
// Expected release date for the transaction
ExpectedReleaseDate time.Time `json:"expected_release_date" api:"nullable" format:"date"`
// External bank account token
ExternalBankAccountToken string `json:"external_bank_account_token" api:"nullable" format:"uuid"`
// External ID defined by the customer
ExternalID string `json:"external_id" api:"nullable"`
// External resource associated with the management operation
ExternalResource ExternalResource `json:"external_resource" api:"nullable"`
// INTERNAL - Financial Transaction
Family AccountActivityGetTransactionResponseFamily `json:"family"`
// Financial account token associated with the transaction
FinancialAccountToken string `json:"financial_account_token" api:"nullable" format:"uuid"`
// Globally unique identifier for the financial account or card that will send the
// funds. Accepted type dependent on the program's use case
FromFinancialAccountToken string `json:"from_financial_account_token" format:"uuid"`
Merchant shared.Merchant `json:"merchant"`
// Analogous to the 'amount', but in the merchant currency.
//
// Deprecated: deprecated
MerchantAmount int64 `json:"merchant_amount" api:"nullable"`
// Analogous to the 'authorization_amount', but in the merchant currency.
//
// Deprecated: deprecated
MerchantAuthorizationAmount int64 `json:"merchant_authorization_amount" api:"nullable"`
// 3-character alphabetic ISO 4217 code for the local currency of the transaction.
//
// Deprecated: deprecated
MerchantCurrency string `json:"merchant_currency"`
// Transfer method
Method AccountActivityGetTransactionResponseMethod `json:"method"`
// This field can have the runtime type of [PaymentMethodAttributes].
MethodAttributes interface{} `json:"method_attributes"`
// Card network of the authorization. Value is `UNKNOWN` when Lithic cannot
// determine the network code from the upstream provider.
Network AccountActivityGetTransactionResponseNetwork `json:"network" api:"nullable"`
// Network-provided score assessing risk level associated with a given
// authorization. Scores are on a range of 0-999, with 0 representing the lowest
// risk and 999 representing the highest risk. For Visa transactions, where the raw
// score has a range of 0-99, Lithic will normalize the score by multiplying the
// raw score by 10x.
NetworkRiskScore int64 `json:"network_risk_score" api:"nullable"`
PaymentType AccountActivityGetTransactionResponsePaymentType `json:"payment_type"`
// Pending amount in cents
PendingAmount int64 `json:"pending_amount"`
// This field can have the runtime type of [TransactionPos].
Pos interface{} `json:"pos"`
// This field can have the runtime type of [PaymentRelatedAccountTokens].
RelatedAccountTokens interface{} `json:"related_account_tokens"`
// Transaction result
Result AccountActivityGetTransactionResponseResult `json:"result"`
// Settled amount in cents
SettledAmount int64 `json:"settled_amount"`
// Transaction source
Source AccountActivityGetTransactionResponseSource `json:"source"`
// This field can have the runtime type of [map[string]string].
Tags interface{} `json:"tags"`
// Globally unique identifier for the financial account or card that will receive
// the funds. Accepted type dependent on the program's use case
ToFinancialAccountToken string `json:"to_financial_account_token" format:"uuid"`
TokenInfo TokenInfo `json:"token_info" api:"nullable"`
// This field can have the runtime type of [BookTransferResponseTransactionSeries],
// [ManagementOperationTransactionTransactionSeries].
TransactionSeries interface{} `json:"transaction_series"`
Type AccountActivityGetTransactionResponseType `json:"type"`
// User-defined identifier
UserDefinedID string `json:"user_defined_id" api:"nullable"`
JSON accountActivityGetTransactionResponseJSON `json:"-"`
union AccountActivityGetTransactionResponseUnion
}
// accountActivityGetTransactionResponseJSON contains the JSON metadata for the
// struct [AccountActivityGetTransactionResponse]
type accountActivityGetTransactionResponseJSON struct {
Token apijson.Field
Created apijson.Field
Status apijson.Field
Updated apijson.Field
AccountToken apijson.Field
AcquirerFee apijson.Field
AcquirerReferenceNumber apijson.Field
Amount apijson.Field
Amounts apijson.Field
AuthorizationAmount apijson.Field
AuthorizationCode apijson.Field
Avs apijson.Field
CardToken apijson.Field
CardholderAuthentication apijson.Field
Category apijson.Field
Currency apijson.Field
Descriptor apijson.Field
Direction apijson.Field
Events apijson.Field
ExpectedReleaseDate apijson.Field
ExternalBankAccountToken apijson.Field
ExternalID apijson.Field
ExternalResource apijson.Field
Family apijson.Field
FinancialAccountToken apijson.Field
FromFinancialAccountToken apijson.Field
Merchant apijson.Field
MerchantAmount apijson.Field
MerchantAuthorizationAmount apijson.Field
MerchantCurrency apijson.Field
Method apijson.Field
MethodAttributes apijson.Field
Network apijson.Field
NetworkRiskScore apijson.Field
PaymentType apijson.Field
PendingAmount apijson.Field
Pos apijson.Field
RelatedAccountTokens apijson.Field
Result apijson.Field
SettledAmount apijson.Field
Source apijson.Field
Tags apijson.Field
ToFinancialAccountToken apijson.Field
TokenInfo apijson.Field
TransactionSeries apijson.Field
Type apijson.Field
UserDefinedID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r accountActivityGetTransactionResponseJSON) RawJSON() string {
return r.raw
}
func (r *AccountActivityGetTransactionResponse) UnmarshalJSON(data []byte) (err error) {
*r = AccountActivityGetTransactionResponse{}
err = apijson.UnmarshalRoot(data, &r.union)