-
Notifications
You must be signed in to change notification settings - Fork 0
/
provider.go
1059 lines (917 loc) · 47.7 KB
/
provider.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
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
package finchgo
import (
"context"
"net/http"
"github.com/Finch-API/finch-api-go/internal/apijson"
"github.com/Finch-API/finch-api-go/internal/requestconfig"
"github.com/Finch-API/finch-api-go/option"
"github.com/Finch-API/finch-api-go/packages/pagination"
)
// ProviderService contains methods and other services that help with interacting
// with the Finch 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 [NewProviderService] method instead.
type ProviderService struct {
Options []option.RequestOption
}
// NewProviderService 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 NewProviderService(opts ...option.RequestOption) (r *ProviderService) {
r = &ProviderService{}
r.Options = opts
return
}
// Return details on all available payroll and HR systems.
func (r *ProviderService) List(ctx context.Context, opts ...option.RequestOption) (res *pagination.SinglePage[Provider], err error) {
var raw *http.Response
opts = append(r.Options[:], opts...)
opts = append([]option.RequestOption{option.WithResponseInto(&raw)}, opts...)
path := "providers"
cfg, err := requestconfig.NewRequestConfig(ctx, http.MethodGet, path, nil, &res, opts...)
if err != nil {
return nil, err
}
err = cfg.Execute()
if err != nil {
return nil, err
}
res.SetPageConfig(cfg, raw)
return res, nil
}
// Return details on all available payroll and HR systems.
func (r *ProviderService) ListAutoPaging(ctx context.Context, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Provider] {
return pagination.NewSinglePageAutoPager(r.List(ctx, opts...))
}
type Provider struct {
// The id of the payroll provider used in Connect.
ID string `json:"id"`
// The list of authentication methods supported by the provider.
AuthenticationMethods []ProviderAuthenticationMethod `json:"authentication_methods"`
// `true` if the integration is in a beta state, `false` otherwise
Beta bool `json:"beta"`
// The display name of the payroll provider.
DisplayName string `json:"display_name"`
// The url to the official icon of the payroll provider.
Icon string `json:"icon"`
// The url to the official logo of the payroll provider.
Logo string `json:"logo"`
// [DEPRECATED] Whether the Finch integration with this provider uses the Assisted
// Connect Flow by default. This field is now deprecated. Please check for a `type`
// of `assisted` in the `authentication_methods` field instead.
Manual bool `json:"manual"`
// whether MFA is required for the provider.
MfaRequired bool `json:"mfa_required"`
// The hex code for the primary color of the payroll provider.
PrimaryColor string `json:"primary_color"`
// The list of Finch products supported on this payroll provider.
Products []string `json:"products"`
JSON providerJSON `json:"-"`
}
// providerJSON contains the JSON metadata for the struct [Provider]
type providerJSON struct {
ID apijson.Field
AuthenticationMethods apijson.Field
Beta apijson.Field
DisplayName apijson.Field
Icon apijson.Field
Logo apijson.Field
Manual apijson.Field
MfaRequired apijson.Field
PrimaryColor apijson.Field
Products apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *Provider) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethod struct {
// Each benefit type and their supported features. If the benefit type is not
// supported, the property will be null
BenefitsSupport BenefitsSupport `json:"benefits_support,nullable"`
// The supported data fields returned by our HR and payroll endpoints
SupportedFields ProviderAuthenticationMethodsSupportedFields `json:"supported_fields,nullable"`
// The type of authentication method.
Type ProviderAuthenticationMethodsType `json:"type"`
JSON providerAuthenticationMethodJSON `json:"-"`
}
// providerAuthenticationMethodJSON contains the JSON metadata for the struct
// [ProviderAuthenticationMethod]
type providerAuthenticationMethodJSON struct {
BenefitsSupport apijson.Field
SupportedFields apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethod) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodJSON) RawJSON() string {
return r.raw
}
// The supported data fields returned by our HR and payroll endpoints
type ProviderAuthenticationMethodsSupportedFields struct {
Company ProviderAuthenticationMethodsSupportedFieldsCompany `json:"company"`
Directory ProviderAuthenticationMethodsSupportedFieldsDirectory `json:"directory"`
Employment ProviderAuthenticationMethodsSupportedFieldsEmployment `json:"employment"`
Individual ProviderAuthenticationMethodsSupportedFieldsIndividual `json:"individual"`
PayGroup ProviderAuthenticationMethodsSupportedFieldsPayGroup `json:"pay_group"`
PayStatement ProviderAuthenticationMethodsSupportedFieldsPayStatement `json:"pay_statement"`
Payment ProviderAuthenticationMethodsSupportedFieldsPayment `json:"payment"`
JSON providerAuthenticationMethodsSupportedFieldsJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsJSON contains the JSON metadata for
// the struct [ProviderAuthenticationMethodsSupportedFields]
type providerAuthenticationMethodsSupportedFieldsJSON struct {
Company apijson.Field
Directory apijson.Field
Employment apijson.Field
Individual apijson.Field
PayGroup apijson.Field
PayStatement apijson.Field
Payment apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFields) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsCompany struct {
ID bool `json:"id"`
Accounts ProviderAuthenticationMethodsSupportedFieldsCompanyAccounts `json:"accounts"`
Departments ProviderAuthenticationMethodsSupportedFieldsCompanyDepartments `json:"departments"`
Ein bool `json:"ein"`
Entity ProviderAuthenticationMethodsSupportedFieldsCompanyEntity `json:"entity"`
LegalName bool `json:"legal_name"`
Locations ProviderAuthenticationMethodsSupportedFieldsCompanyLocations `json:"locations"`
PrimaryEmail bool `json:"primary_email"`
PrimaryPhoneNumber bool `json:"primary_phone_number"`
JSON providerAuthenticationMethodsSupportedFieldsCompanyJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsCompanyJSON contains the JSON
// metadata for the struct [ProviderAuthenticationMethodsSupportedFieldsCompany]
type providerAuthenticationMethodsSupportedFieldsCompanyJSON struct {
ID apijson.Field
Accounts apijson.Field
Departments apijson.Field
Ein apijson.Field
Entity apijson.Field
LegalName apijson.Field
Locations apijson.Field
PrimaryEmail apijson.Field
PrimaryPhoneNumber apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsCompany) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsCompanyJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsCompanyAccounts struct {
AccountName bool `json:"account_name"`
AccountNumber bool `json:"account_number"`
AccountType bool `json:"account_type"`
InstitutionName bool `json:"institution_name"`
RoutingNumber bool `json:"routing_number"`
JSON providerAuthenticationMethodsSupportedFieldsCompanyAccountsJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsCompanyAccountsJSON contains the
// JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsCompanyAccounts]
type providerAuthenticationMethodsSupportedFieldsCompanyAccountsJSON struct {
AccountName apijson.Field
AccountNumber apijson.Field
AccountType apijson.Field
InstitutionName apijson.Field
RoutingNumber apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsCompanyAccounts) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsCompanyAccountsJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsCompanyDepartments struct {
Name bool `json:"name"`
Parent ProviderAuthenticationMethodsSupportedFieldsCompanyDepartmentsParent `json:"parent"`
JSON providerAuthenticationMethodsSupportedFieldsCompanyDepartmentsJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsCompanyDepartmentsJSON contains the
// JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsCompanyDepartments]
type providerAuthenticationMethodsSupportedFieldsCompanyDepartmentsJSON struct {
Name apijson.Field
Parent apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsCompanyDepartments) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsCompanyDepartmentsJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsCompanyDepartmentsParent struct {
Name bool `json:"name"`
JSON providerAuthenticationMethodsSupportedFieldsCompanyDepartmentsParentJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsCompanyDepartmentsParentJSON
// contains the JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsCompanyDepartmentsParent]
type providerAuthenticationMethodsSupportedFieldsCompanyDepartmentsParentJSON struct {
Name apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsCompanyDepartmentsParent) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsCompanyDepartmentsParentJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsCompanyEntity struct {
Subtype bool `json:"subtype"`
Type bool `json:"type"`
JSON providerAuthenticationMethodsSupportedFieldsCompanyEntityJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsCompanyEntityJSON contains the JSON
// metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsCompanyEntity]
type providerAuthenticationMethodsSupportedFieldsCompanyEntityJSON struct {
Subtype apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsCompanyEntity) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsCompanyEntityJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsCompanyLocations struct {
City bool `json:"city"`
Country bool `json:"country"`
Line1 bool `json:"line1"`
Line2 bool `json:"line2"`
PostalCode bool `json:"postal_code"`
State bool `json:"state"`
JSON providerAuthenticationMethodsSupportedFieldsCompanyLocationsJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsCompanyLocationsJSON contains the
// JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsCompanyLocations]
type providerAuthenticationMethodsSupportedFieldsCompanyLocationsJSON struct {
City apijson.Field
Country apijson.Field
Line1 apijson.Field
Line2 apijson.Field
PostalCode apijson.Field
State apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsCompanyLocations) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsCompanyLocationsJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsDirectory struct {
Individuals ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividuals `json:"individuals"`
Paging ProviderAuthenticationMethodsSupportedFieldsDirectoryPaging `json:"paging"`
JSON providerAuthenticationMethodsSupportedFieldsDirectoryJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsDirectoryJSON contains the JSON
// metadata for the struct [ProviderAuthenticationMethodsSupportedFieldsDirectory]
type providerAuthenticationMethodsSupportedFieldsDirectoryJSON struct {
Individuals apijson.Field
Paging apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsDirectory) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsDirectoryJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividuals struct {
ID bool `json:"id"`
Department bool `json:"department"`
FirstName bool `json:"first_name"`
IsActive bool `json:"is_active"`
LastName bool `json:"last_name"`
Manager ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividualsManager `json:"manager"`
MiddleName bool `json:"middle_name"`
JSON providerAuthenticationMethodsSupportedFieldsDirectoryIndividualsJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsDirectoryIndividualsJSON contains
// the JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividuals]
type providerAuthenticationMethodsSupportedFieldsDirectoryIndividualsJSON struct {
ID apijson.Field
Department apijson.Field
FirstName apijson.Field
IsActive apijson.Field
LastName apijson.Field
Manager apijson.Field
MiddleName apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividuals) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsDirectoryIndividualsJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividualsManager struct {
ID bool `json:"id"`
JSON providerAuthenticationMethodsSupportedFieldsDirectoryIndividualsManagerJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsDirectoryIndividualsManagerJSON
// contains the JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividualsManager]
type providerAuthenticationMethodsSupportedFieldsDirectoryIndividualsManagerJSON struct {
ID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsDirectoryIndividualsManager) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsDirectoryIndividualsManagerJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsDirectoryPaging struct {
Count bool `json:"count"`
Offset bool `json:"offset"`
JSON providerAuthenticationMethodsSupportedFieldsDirectoryPagingJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsDirectoryPagingJSON contains the
// JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsDirectoryPaging]
type providerAuthenticationMethodsSupportedFieldsDirectoryPagingJSON struct {
Count apijson.Field
Offset apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsDirectoryPaging) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsDirectoryPagingJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsEmployment struct {
ID bool `json:"id"`
ClassCode bool `json:"class_code"`
CustomFields bool `json:"custom_fields"`
Department ProviderAuthenticationMethodsSupportedFieldsEmploymentDepartment `json:"department"`
Employment ProviderAuthenticationMethodsSupportedFieldsEmploymentEmployment `json:"employment"`
EmploymentStatus bool `json:"employment_status"`
EndDate bool `json:"end_date"`
FirstName bool `json:"first_name"`
Income ProviderAuthenticationMethodsSupportedFieldsEmploymentIncome `json:"income"`
IncomeHistory bool `json:"income_history"`
IsActive bool `json:"is_active"`
LastName bool `json:"last_name"`
Location ProviderAuthenticationMethodsSupportedFieldsEmploymentLocation `json:"location"`
Manager ProviderAuthenticationMethodsSupportedFieldsEmploymentManager `json:"manager"`
MiddleName bool `json:"middle_name"`
StartDate bool `json:"start_date"`
Title bool `json:"title"`
JSON providerAuthenticationMethodsSupportedFieldsEmploymentJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsEmploymentJSON contains the JSON
// metadata for the struct [ProviderAuthenticationMethodsSupportedFieldsEmployment]
type providerAuthenticationMethodsSupportedFieldsEmploymentJSON struct {
ID apijson.Field
ClassCode apijson.Field
CustomFields apijson.Field
Department apijson.Field
Employment apijson.Field
EmploymentStatus apijson.Field
EndDate apijson.Field
FirstName apijson.Field
Income apijson.Field
IncomeHistory apijson.Field
IsActive apijson.Field
LastName apijson.Field
Location apijson.Field
Manager apijson.Field
MiddleName apijson.Field
StartDate apijson.Field
Title apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsEmployment) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsEmploymentJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsEmploymentDepartment struct {
Name bool `json:"name"`
JSON providerAuthenticationMethodsSupportedFieldsEmploymentDepartmentJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsEmploymentDepartmentJSON contains
// the JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsEmploymentDepartment]
type providerAuthenticationMethodsSupportedFieldsEmploymentDepartmentJSON struct {
Name apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsEmploymentDepartment) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsEmploymentDepartmentJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsEmploymentEmployment struct {
Subtype bool `json:"subtype"`
Type bool `json:"type"`
JSON providerAuthenticationMethodsSupportedFieldsEmploymentEmploymentJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsEmploymentEmploymentJSON contains
// the JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsEmploymentEmployment]
type providerAuthenticationMethodsSupportedFieldsEmploymentEmploymentJSON struct {
Subtype apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsEmploymentEmployment) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsEmploymentEmploymentJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsEmploymentIncome struct {
Amount bool `json:"amount"`
Currency bool `json:"currency"`
Unit bool `json:"unit"`
JSON providerAuthenticationMethodsSupportedFieldsEmploymentIncomeJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsEmploymentIncomeJSON contains the
// JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsEmploymentIncome]
type providerAuthenticationMethodsSupportedFieldsEmploymentIncomeJSON struct {
Amount apijson.Field
Currency apijson.Field
Unit apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsEmploymentIncome) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsEmploymentIncomeJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsEmploymentLocation struct {
City bool `json:"city"`
Country bool `json:"country"`
Line1 bool `json:"line1"`
Line2 bool `json:"line2"`
PostalCode bool `json:"postal_code"`
State bool `json:"state"`
JSON providerAuthenticationMethodsSupportedFieldsEmploymentLocationJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsEmploymentLocationJSON contains the
// JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsEmploymentLocation]
type providerAuthenticationMethodsSupportedFieldsEmploymentLocationJSON struct {
City apijson.Field
Country apijson.Field
Line1 apijson.Field
Line2 apijson.Field
PostalCode apijson.Field
State apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsEmploymentLocation) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsEmploymentLocationJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsEmploymentManager struct {
ID bool `json:"id"`
JSON providerAuthenticationMethodsSupportedFieldsEmploymentManagerJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsEmploymentManagerJSON contains the
// JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsEmploymentManager]
type providerAuthenticationMethodsSupportedFieldsEmploymentManagerJSON struct {
ID apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsEmploymentManager) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsEmploymentManagerJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsIndividual struct {
ID bool `json:"id"`
Dob bool `json:"dob"`
Emails ProviderAuthenticationMethodsSupportedFieldsIndividualEmails `json:"emails"`
EncryptedSsn bool `json:"encrypted_ssn"`
Ethnicity bool `json:"ethnicity"`
FirstName bool `json:"first_name"`
Gender bool `json:"gender"`
LastName bool `json:"last_name"`
MiddleName bool `json:"middle_name"`
PhoneNumbers ProviderAuthenticationMethodsSupportedFieldsIndividualPhoneNumbers `json:"phone_numbers"`
PreferredName bool `json:"preferred_name"`
Residence ProviderAuthenticationMethodsSupportedFieldsIndividualResidence `json:"residence"`
Ssn bool `json:"ssn"`
JSON providerAuthenticationMethodsSupportedFieldsIndividualJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsIndividualJSON contains the JSON
// metadata for the struct [ProviderAuthenticationMethodsSupportedFieldsIndividual]
type providerAuthenticationMethodsSupportedFieldsIndividualJSON struct {
ID apijson.Field
Dob apijson.Field
Emails apijson.Field
EncryptedSsn apijson.Field
Ethnicity apijson.Field
FirstName apijson.Field
Gender apijson.Field
LastName apijson.Field
MiddleName apijson.Field
PhoneNumbers apijson.Field
PreferredName apijson.Field
Residence apijson.Field
Ssn apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsIndividual) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsIndividualJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsIndividualEmails struct {
Data bool `json:"data"`
Type bool `json:"type"`
JSON providerAuthenticationMethodsSupportedFieldsIndividualEmailsJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsIndividualEmailsJSON contains the
// JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsIndividualEmails]
type providerAuthenticationMethodsSupportedFieldsIndividualEmailsJSON struct {
Data apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsIndividualEmails) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsIndividualEmailsJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsIndividualPhoneNumbers struct {
Data bool `json:"data"`
Type bool `json:"type"`
JSON providerAuthenticationMethodsSupportedFieldsIndividualPhoneNumbersJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsIndividualPhoneNumbersJSON contains
// the JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsIndividualPhoneNumbers]
type providerAuthenticationMethodsSupportedFieldsIndividualPhoneNumbersJSON struct {
Data apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsIndividualPhoneNumbers) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsIndividualPhoneNumbersJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsIndividualResidence struct {
City bool `json:"city"`
Country bool `json:"country"`
Line1 bool `json:"line1"`
Line2 bool `json:"line2"`
PostalCode bool `json:"postal_code"`
State bool `json:"state"`
JSON providerAuthenticationMethodsSupportedFieldsIndividualResidenceJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsIndividualResidenceJSON contains the
// JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsIndividualResidence]
type providerAuthenticationMethodsSupportedFieldsIndividualResidenceJSON struct {
City apijson.Field
Country apijson.Field
Line1 apijson.Field
Line2 apijson.Field
PostalCode apijson.Field
State apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsIndividualResidence) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsIndividualResidenceJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsPayGroup struct {
ID bool `json:"id"`
IndividualIDs bool `json:"individual_ids"`
Name bool `json:"name"`
PayFrequencies bool `json:"pay_frequencies"`
JSON providerAuthenticationMethodsSupportedFieldsPayGroupJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsPayGroupJSON contains the JSON
// metadata for the struct [ProviderAuthenticationMethodsSupportedFieldsPayGroup]
type providerAuthenticationMethodsSupportedFieldsPayGroupJSON struct {
ID apijson.Field
IndividualIDs apijson.Field
Name apijson.Field
PayFrequencies apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsPayGroup) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsPayGroupJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsPayStatement struct {
Paging ProviderAuthenticationMethodsSupportedFieldsPayStatementPaging `json:"paging"`
PayStatements ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatements `json:"pay_statements"`
JSON providerAuthenticationMethodsSupportedFieldsPayStatementJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsPayStatementJSON contains the JSON
// metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsPayStatement]
type providerAuthenticationMethodsSupportedFieldsPayStatementJSON struct {
Paging apijson.Field
PayStatements apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatement) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsPayStatementJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPaging struct {
Count bool `json:"count,required"`
Offset bool `json:"offset,required"`
JSON providerAuthenticationMethodsSupportedFieldsPayStatementPagingJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsPayStatementPagingJSON contains the
// JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsPayStatementPaging]
type providerAuthenticationMethodsSupportedFieldsPayStatementPagingJSON struct {
Count apijson.Field
Offset apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPaging) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsPayStatementPagingJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatements struct {
Earnings ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarnings `json:"earnings"`
EmployeeDeductions ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductions `json:"employee_deductions"`
EmployerContributions ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerContributions `json:"employer_contributions"`
GrossPay bool `json:"gross_pay"`
IndividualID bool `json:"individual_id"`
NetPay bool `json:"net_pay"`
PaymentMethod bool `json:"payment_method"`
Taxes ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxes `json:"taxes"`
TotalHours bool `json:"total_hours"`
Type bool `json:"type"`
JSON providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsJSON
// contains the JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatements]
type providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsJSON struct {
Earnings apijson.Field
EmployeeDeductions apijson.Field
EmployerContributions apijson.Field
GrossPay apijson.Field
IndividualID apijson.Field
NetPay apijson.Field
PaymentMethod apijson.Field
Taxes apijson.Field
TotalHours apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatements) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarnings struct {
Amount bool `json:"amount"`
Currency bool `json:"currency"`
Name bool `json:"name"`
Type bool `json:"type"`
JSON providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarningsJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarningsJSON
// contains the JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarnings]
type providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarningsJSON struct {
Amount apijson.Field
Currency apijson.Field
Name apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarnings) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEarningsJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductions struct {
Amount bool `json:"amount"`
Currency bool `json:"currency"`
Name bool `json:"name"`
PreTax bool `json:"pre_tax"`
Type bool `json:"type"`
JSON providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductionsJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductionsJSON
// contains the JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductions]
type providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductionsJSON struct {
Amount apijson.Field
Currency apijson.Field
Name apijson.Field
PreTax apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductions) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployeeDeductionsJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerContributions struct {
Amount bool `json:"amount"`
Currency bool `json:"currency"`
Name bool `json:"name"`
JSON providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerContributionsJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerContributionsJSON
// contains the JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerContributions]
type providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerContributionsJSON struct {
Amount apijson.Field
Currency apijson.Field
Name apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerContributions) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsEmployerContributionsJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxes struct {
Amount bool `json:"amount"`
Currency bool `json:"currency"`
Employer bool `json:"employer"`
Name bool `json:"name"`
Type bool `json:"type"`
JSON providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxesJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxesJSON
// contains the JSON metadata for the struct
// [ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxes]
type providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxesJSON struct {
Amount apijson.Field
Currency apijson.Field
Employer apijson.Field
Name apijson.Field
Type apijson.Field
raw string
ExtraFields map[string]apijson.Field
}
func (r *ProviderAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxes) UnmarshalJSON(data []byte) (err error) {
return apijson.UnmarshalRoot(data, r)
}
func (r providerAuthenticationMethodsSupportedFieldsPayStatementPayStatementsTaxesJSON) RawJSON() string {
return r.raw
}
type ProviderAuthenticationMethodsSupportedFieldsPayment struct {
ID bool `json:"id"`
CompanyDebit bool `json:"company_debit"`
DebitDate bool `json:"debit_date"`
EmployeeTaxes bool `json:"employee_taxes"`
EmployerTaxes bool `json:"employer_taxes"`
GrossPay bool `json:"gross_pay"`
IndividualIDs bool `json:"individual_ids"`
NetPay bool `json:"net_pay"`
PayDate bool `json:"pay_date"`
PayFrequencies bool `json:"pay_frequencies"`
PayGroupIDs bool `json:"pay_group_ids"`
PayPeriod ProviderAuthenticationMethodsSupportedFieldsPaymentPayPeriod `json:"pay_period"`
JSON providerAuthenticationMethodsSupportedFieldsPaymentJSON `json:"-"`
}
// providerAuthenticationMethodsSupportedFieldsPaymentJSON contains the JSON
// metadata for the struct [ProviderAuthenticationMethodsSupportedFieldsPayment]
type providerAuthenticationMethodsSupportedFieldsPaymentJSON struct {
ID apijson.Field
CompanyDebit apijson.Field
DebitDate apijson.Field
EmployeeTaxes apijson.Field
EmployerTaxes apijson.Field
GrossPay apijson.Field
IndividualIDs apijson.Field