@@ -23,31 +23,32 @@ var testData = []gppEncodeTestData{
23
23
{
24
24
description : "USPCA GPP string encoding" ,
25
25
expected : "DBABh4A~BlgWEYCY.QA~BSFgmiU" ,
26
- sections : []Section {uspca.USPCA {
27
- CoreSegment : uspca.USPCACoreSegment {
28
- Version : 1 ,
29
- SaleOptOutNotice : 2 ,
30
- SharingOptOutNotice : 1 ,
31
- SensitiveDataLimitUseNotice : 1 ,
32
- SaleOptOut : 2 ,
33
- SharingOptOut : 0 ,
34
- SensitiveDataProcessing : []byte {
35
- 0 , 1 , 1 , 2 , 0 , 1 , 0 , 1 , 2 ,
26
+ sections : []Section {
27
+ uspca.USPCA {
28
+ CoreSegment : uspca.USPCACoreSegment {
29
+ Version : 1 ,
30
+ SaleOptOutNotice : 2 ,
31
+ SharingOptOutNotice : 1 ,
32
+ SensitiveDataLimitUseNotice : 1 ,
33
+ SaleOptOut : 2 ,
34
+ SharingOptOut : 0 ,
35
+ SensitiveDataProcessing : []byte {
36
+ 0 , 1 , 1 , 2 , 0 , 1 , 0 , 1 , 2 ,
37
+ },
38
+ KnownChildSensitiveDataConsents : []byte {
39
+ 0 , 0 ,
40
+ },
41
+ PersonalDataConsents : 0 ,
42
+ MspaCoveredTransaction : 2 ,
43
+ MspaOptOutOptionMode : 1 ,
44
+ MspaServiceProviderMode : 2 ,
36
45
},
37
- KnownChildSensitiveDataConsents : []byte {
38
- 0 , 0 ,
46
+ GPCSegment : sections.CommonUSGPCSegment {
47
+ SubsectionType : 1 ,
48
+ Gpc : false ,
39
49
},
40
- PersonalDataConsents : 0 ,
41
- MspaCoveredTransaction : 2 ,
42
- MspaOptOutOptionMode : 1 ,
43
- MspaServiceProviderMode : 2 ,
44
- },
45
- GPCSegment : sections.CommonUSGPCSegment {
46
- SubsectionType : 1 ,
47
- Gpc : false ,
48
- },
49
- SectionID : constants .SectionUSPCA ,
50
- Value : "BlgWEYCY.QA" },
50
+ SectionID : constants .SectionUSPCA ,
51
+ Value : "BlgWEYCY.QA" },
51
52
uspva.USPVA {
52
53
CoreSegment : sections.CommonUSCoreSegment {
53
54
Version : 1 ,
@@ -71,138 +72,143 @@ var testData = []gppEncodeTestData{
71
72
{
72
73
description : "USPVA GPP string encoding" ,
73
74
expected : "DBABRg~bSFgmiU" ,
74
- sections : []Section {uspva.USPVA {
75
- CoreSegment : sections.CommonUSCoreSegment {
76
- Version : 27 ,
77
- SharingNotice : 1 ,
78
- SaleOptOutNotice : 0 ,
79
- TargetedAdvertisingOptOutNotice : 2 ,
80
- SaleOptOut : 0 ,
81
- TargetedAdvertisingOptOut : 1 ,
82
- SensitiveDataProcessing : []byte {
83
- 1 , 2 , 0 , 0 , 2 , 1 , 2 , 2 ,
75
+ sections : []Section {
76
+ uspva.USPVA {
77
+ CoreSegment : sections.CommonUSCoreSegment {
78
+ Version : 27 ,
79
+ SharingNotice : 1 ,
80
+ SaleOptOutNotice : 0 ,
81
+ TargetedAdvertisingOptOutNotice : 2 ,
82
+ SaleOptOut : 0 ,
83
+ TargetedAdvertisingOptOut : 1 ,
84
+ SensitiveDataProcessing : []byte {
85
+ 1 , 2 , 0 , 0 , 2 , 1 , 2 , 2 ,
86
+ },
87
+ KnownChildSensitiveDataConsents : []byte {0 },
88
+ MspaCoveredTransaction : 2 ,
89
+ MspaOptOutOptionMode : 1 ,
90
+ MspaServiceProviderMode : 1 ,
84
91
},
85
- KnownChildSensitiveDataConsents : []byte {0 },
86
- MspaCoveredTransaction : 2 ,
87
- MspaOptOutOptionMode : 1 ,
88
- MspaServiceProviderMode : 1 ,
89
- },
90
- SectionID : constants .SectionUSPVA ,
91
- Value : "bSFgmiU" },
92
+ SectionID : constants .SectionUSPVA ,
93
+ Value : "bSFgmiU" },
92
94
},
93
95
},
94
96
{
95
97
description : "USPCO GPP string encoding" ,
96
98
expected : "DBABJg~bSFgmJQ.YA" ,
97
- sections : []Section {uspco.USPCO {
98
- CoreSegment : sections.CommonUSCoreSegment {
99
- Version : 27 ,
100
- SharingNotice : 1 ,
101
- SaleOptOutNotice : 0 ,
102
- TargetedAdvertisingOptOutNotice : 2 ,
103
- SaleOptOut : 0 ,
104
- TargetedAdvertisingOptOut : 1 ,
105
- SensitiveDataProcessing : []byte {
106
- 1 , 2 , 0 , 0 , 2 , 1 , 2 ,
99
+ sections : []Section {
100
+ uspco.USPCO {
101
+ CoreSegment : sections.CommonUSCoreSegment {
102
+ Version : 27 ,
103
+ SharingNotice : 1 ,
104
+ SaleOptOutNotice : 0 ,
105
+ TargetedAdvertisingOptOutNotice : 2 ,
106
+ SaleOptOut : 0 ,
107
+ TargetedAdvertisingOptOut : 1 ,
108
+ SensitiveDataProcessing : []byte {
109
+ 1 , 2 , 0 , 0 , 2 , 1 , 2 ,
110
+ },
111
+ KnownChildSensitiveDataConsents : []byte {0 },
112
+ MspaCoveredTransaction : 2 ,
113
+ MspaOptOutOptionMode : 1 ,
114
+ MspaServiceProviderMode : 1 ,
107
115
},
108
- KnownChildSensitiveDataConsents : []byte {0 },
109
- MspaCoveredTransaction : 2 ,
110
- MspaOptOutOptionMode : 1 ,
111
- MspaServiceProviderMode : 1 ,
112
- },
113
- GPCSegment : sections.CommonUSGPCSegment {
114
- SubsectionType : 1 ,
115
- Gpc : true ,
116
- },
117
- SectionID : constants .SectionUSPCO ,
118
- Value : "bSFgmJQ.YA" },
116
+ GPCSegment : sections.CommonUSGPCSegment {
117
+ SubsectionType : 1 ,
118
+ Gpc : true ,
119
+ },
120
+ SectionID : constants .SectionUSPCO ,
121
+ Value : "bSFgmJQ.YA" },
119
122
},
120
123
},
121
124
{
122
125
description : "USPCT GPP string encoding" ,
123
126
expected : "DBABVg~bSFgmSZQ.YA" ,
124
- sections : []Section {uspct.USPCT {
125
- CoreSegment : sections.CommonUSCoreSegment {
126
- Version : 27 ,
127
- SharingNotice : 1 ,
128
- SaleOptOutNotice : 0 ,
129
- TargetedAdvertisingOptOutNotice : 2 ,
130
- SaleOptOut : 0 ,
131
- TargetedAdvertisingOptOut : 1 ,
132
- SensitiveDataProcessing : []byte {
133
- 1 , 2 , 0 , 0 , 2 , 1 , 2 , 1 ,
127
+ sections : []Section {
128
+ uspct.USPCT {
129
+ CoreSegment : sections.CommonUSCoreSegment {
130
+ Version : 27 ,
131
+ SharingNotice : 1 ,
132
+ SaleOptOutNotice : 0 ,
133
+ TargetedAdvertisingOptOutNotice : 2 ,
134
+ SaleOptOut : 0 ,
135
+ TargetedAdvertisingOptOut : 1 ,
136
+ SensitiveDataProcessing : []byte {
137
+ 1 , 2 , 0 , 0 , 2 , 1 , 2 , 1 ,
138
+ },
139
+ KnownChildSensitiveDataConsents : []byte {
140
+ 0 , 2 , 1 ,
141
+ },
142
+ MspaCoveredTransaction : 2 ,
143
+ MspaOptOutOptionMode : 1 ,
144
+ MspaServiceProviderMode : 1 ,
134
145
},
135
- KnownChildSensitiveDataConsents : []byte {
136
- 0 , 2 , 1 ,
146
+ GPCSegment : sections.CommonUSGPCSegment {
147
+ SubsectionType : 1 ,
148
+ Gpc : true ,
137
149
},
138
- MspaCoveredTransaction : 2 ,
139
- MspaOptOutOptionMode : 1 ,
140
- MspaServiceProviderMode : 1 ,
141
- },
142
- GPCSegment : sections.CommonUSGPCSegment {
143
- SubsectionType : 1 ,
144
- Gpc : true ,
145
- },
146
- SectionID : constants .SectionUSPCT ,
147
- Value : "bSFgmSZQ.YA" },
150
+ SectionID : constants .SectionUSPCT ,
151
+ Value : "bSFgmSZQ.YA" },
148
152
},
149
153
},
150
154
{
151
155
description : "USPNAT GPP string encoding" ,
152
156
expected : "DBABLA~DSJgmkoZJSA.YA" ,
153
- sections : []Section {uspnat.USPNAT {
154
- CoreSegment : uspnat.USPNATCoreSegment {
155
- Version : 3 ,
156
- SharingNotice : 1 ,
157
- SaleOptOutNotice : 0 ,
158
- SharingOptOutNotice : 2 ,
159
- TargetedAdvertisingOptOutNotice : 0 ,
160
- SensitiveDataProcessingOptOutNotice : 2 ,
161
- SensitiveDataLimitUseNotice : 1 ,
162
- SaleOptOut : 2 ,
163
- SharingOptOut : 0 ,
164
- TargetedAdvertisingOptOut : 0 ,
165
- SensitiveDataProcessing : []byte {
166
- 2 , 1 , 2 , 2 , 1 , 0 , 2 , 2 , 0 , 1 , 2 , 1 ,
157
+ sections : []Section {
158
+ uspnat.USPNAT {
159
+ CoreSegment : uspnat.USPNATCoreSegment {
160
+ Version : 3 ,
161
+ SharingNotice : 1 ,
162
+ SaleOptOutNotice : 0 ,
163
+ SharingOptOutNotice : 2 ,
164
+ TargetedAdvertisingOptOutNotice : 0 ,
165
+ SensitiveDataProcessingOptOutNotice : 2 ,
166
+ SensitiveDataLimitUseNotice : 1 ,
167
+ SaleOptOut : 2 ,
168
+ SharingOptOut : 0 ,
169
+ TargetedAdvertisingOptOut : 0 ,
170
+ SensitiveDataProcessing : []byte {
171
+ 2 , 1 , 2 , 2 , 1 , 0 , 2 , 2 , 0 , 1 , 2 , 1 ,
172
+ },
173
+ KnownChildSensitiveDataConsents : []byte {
174
+ 0 , 2 ,
175
+ },
176
+ PersonalDataConsents : 1 ,
177
+ MspaCoveredTransaction : 1 ,
178
+ MspaOptOutOptionMode : 0 ,
179
+ MspaServiceProviderMode : 2 ,
167
180
},
168
- KnownChildSensitiveDataConsents : []byte {
169
- 0 , 2 ,
181
+ GPCSegment : sections.CommonUSGPCSegment {
182
+ SubsectionType : 1 ,
183
+ Gpc : true ,
170
184
},
171
- PersonalDataConsents : 1 ,
172
- MspaCoveredTransaction : 1 ,
173
- MspaOptOutOptionMode : 0 ,
174
- MspaServiceProviderMode : 2 ,
175
- },
176
- GPCSegment : sections.CommonUSGPCSegment {
177
- SubsectionType : 1 ,
178
- Gpc : true ,
179
- },
180
- SectionID : constants .SectionUSPNAT ,
181
- Value : "DSJgmkoZJSA.YA" },
185
+ SectionID : constants .SectionUSPNAT ,
186
+ Value : "DSJgmkoZJSA.YA" },
182
187
},
183
188
},
184
189
{
185
190
description : "USPUT GPP string encoding" ,
186
191
expected : "DBADLO8~BSJgmkoZJSA.YA~BSFgmiU~BWJYJllA~BSFgmSZQ.YA" ,
187
- sections : []Section {usput.USPUT {
188
- CoreSegment : usput.USPUTCoreSegment {
189
- Version : 1 ,
190
- SharingNotice : 1 ,
191
- SaleOptOutNotice : 1 ,
192
- TargetedAdvertisingOptOutNotice : 2 ,
193
- SensitiveDataProcessingOptOutNotice : 0 ,
194
- SaleOptOut : 2 ,
195
- TargetedAdvertisingOptOut : 1 ,
196
- SensitiveDataProcessing : []byte {
197
- 1 , 2 , 0 , 0 , 2 , 1 , 2 , 1 ,
192
+ sections : []Section {
193
+ usput.USPUT {
194
+ CoreSegment : usput.USPUTCoreSegment {
195
+ Version : 1 ,
196
+ SharingNotice : 1 ,
197
+ SaleOptOutNotice : 1 ,
198
+ TargetedAdvertisingOptOutNotice : 2 ,
199
+ SensitiveDataProcessingOptOutNotice : 0 ,
200
+ SaleOptOut : 2 ,
201
+ TargetedAdvertisingOptOut : 1 ,
202
+ SensitiveDataProcessing : []byte {
203
+ 1 , 2 , 0 , 0 , 2 , 1 , 2 , 1 ,
204
+ },
205
+ KnownChildSensitiveDataConsents : 1 ,
206
+ MspaCoveredTransaction : 2 ,
207
+ MspaOptOutOptionMode : 1 ,
208
+ MspaServiceProviderMode : 1 ,
198
209
},
199
- KnownChildSensitiveDataConsents : 1 ,
200
- MspaCoveredTransaction : 2 ,
201
- MspaOptOutOptionMode : 1 ,
202
- MspaServiceProviderMode : 1 ,
203
- },
204
- SectionID : constants .SectionUSPUT ,
205
- Value : "BWJYJllA" },
210
+ SectionID : constants .SectionUSPUT ,
211
+ Value : "BWJYJllA" },
206
212
uspnat.USPNAT {
207
213
CoreSegment : uspnat.USPNATCoreSegment {
208
214
Version : 1 ,
0 commit comments