@@ -168,7 +168,7 @@ class SourcePointClient: SourcePointProtocol {
168
168
consentLanguage: consentLanguage,
169
169
campaigns: CampaignsRequest ( from: campaigns)
170
170
) ) . map { body in
171
- client. post ( urlString: Constants . GET_MESSAGES_URL. absoluteString, body: body) { result in
171
+ client. post ( urlString: Constants . Urls . GET_MESSAGES_URL. absoluteString, body: body) { result in
172
172
handler ( Result {
173
173
try result. decoded ( ) as MessagesResponse
174
174
} . mapError ( {
@@ -184,8 +184,8 @@ class SourcePointClient: SourcePointProtocol {
184
184
messageId: String ,
185
185
handler: @escaping MessageHandler
186
186
) {
187
- let url = Constants . GDPR_MESSAGE_URL. appendQueryItems ( [
188
- " env " : Constants . envParam,
187
+ let url = Constants . Urls . GDPR_MESSAGE_URL. appendQueryItems ( [
188
+ " env " : Constants . Urls . envParam,
189
189
" consentLanguage " : consentLanguage. rawValue,
190
190
" propertyId " : propertyId,
191
191
" messageId " : messageId,
@@ -206,8 +206,8 @@ class SourcePointClient: SourcePointProtocol {
206
206
messageId: String ,
207
207
handler: @escaping MessageHandler
208
208
) {
209
- let url = Constants . CCPA_MESSAGE_URL. appendQueryItems ( [
210
- " env " : Constants . envParam,
209
+ let url = Constants . Urls . CCPA_MESSAGE_URL. appendQueryItems ( [
210
+ " env " : Constants . Urls . envParam,
211
211
" consentLanguage " : consentLanguage. rawValue,
212
212
" propertyId " : propertyId,
213
213
" messageId " : messageId
@@ -222,7 +222,7 @@ class SourcePointClient: SourcePointProtocol {
222
222
}
223
223
224
224
func gdprPrivacyManagerView( propertyId: Int , consentLanguage: SPMessageLanguage , handler: @escaping GDPRPrivacyManagerViewHandler ) {
225
- let url = Constants . GDPR_PRIVACY_MANAGER_VIEW_URL. appendQueryItems ( [
225
+ let url = Constants . Urls . GDPR_PRIVACY_MANAGER_VIEW_URL. appendQueryItems ( [
226
226
" siteId " : String ( propertyId) ,
227
227
" consentLanguage " : consentLanguage. rawValue
228
228
] ) !
@@ -236,7 +236,7 @@ class SourcePointClient: SourcePointProtocol {
236
236
}
237
237
238
238
func ccpaPrivacyManagerView( propertyId: Int , consentLanguage: SPMessageLanguage , handler: @escaping CCPAPrivacyManagerViewHandler ) {
239
- let url = Constants . CCPA_PRIVACY_MANAGER_VIEW_URL. appendQueryItems ( [
239
+ let url = Constants . Urls . CCPA_PRIVACY_MANAGER_VIEW_URL. appendQueryItems ( [
240
240
" siteId " : String ( propertyId) ,
241
241
" consentLanguage " : consentLanguage. rawValue
242
242
] ) !
@@ -253,7 +253,7 @@ class SourcePointClient: SourcePointProtocol {
253
253
guard let actionUrl = URL ( string: " \( actionType. rawValue) " ) else { return nil }
254
254
255
255
var components = URLComponents ( url: actionUrl, resolvingAgainstBaseURL: true )
256
- components? . queryItems = [ URLQueryItem ( name: " env " , value: Constants . envParam) ]
256
+ components? . queryItems = [ URLQueryItem ( name: " env " , value: Constants . Urls . envParam) ]
257
257
return components? . url ( relativeTo: baseUrl)
258
258
}
259
259
@@ -265,7 +265,7 @@ class SourcePointClient: SourcePointProtocol {
265
265
pmSaveAndExitVariables: action. pmPayload,
266
266
requestUUID: requestUUID
267
267
) ) . map { body in
268
- client. post ( urlString: consentUrl ( Constants . CCPA_CONSENT_URL, action. type) !. absoluteString, body: body) { result in
268
+ client. post ( urlString: consentUrl ( Constants . Urls . CCPA_CONSENT_URL, action. type) !. absoluteString, body: body) { result in
269
269
handler ( Result {
270
270
let response = try result. decoded ( ) as ConsentResponse
271
271
switch response. userConsent {
@@ -288,7 +288,7 @@ class SourcePointClient: SourcePointProtocol {
288
288
publisherData: action. publisherData,
289
289
requestUUID: requestUUID
290
290
) ) . map { body in
291
- client. post ( urlString: consentUrl ( Constants . GDPR_CONSENT_URL, action. type) !. absoluteString, body: body) { result in
291
+ client. post ( urlString: consentUrl ( Constants . Urls . GDPR_CONSENT_URL, action. type) !. absoluteString, body: body) { result in
292
292
handler ( Result {
293
293
let response = try result. decoded ( ) as ConsentResponse
294
294
switch response. userConsent {
@@ -312,7 +312,7 @@ class SourcePointClient: SourcePointProtocol {
312
312
iosVersion: iosVersion,
313
313
appleTracking: AppleTrackingPayload ( appleChoice: idfaStatus, appleMsgId: messageId, messagePartitionUUID: partitionUUID)
314
314
) ) . map {
315
- client. post ( urlString: Constants . IDFA_RERPORT_URL. absoluteString, body: $0) { _ in }
315
+ client. post ( urlString: Constants . Urls . IDFA_RERPORT_URL. absoluteString, body: $0) { _ in }
316
316
}
317
317
}
318
318
@@ -330,7 +330,7 @@ class SourcePointClient: SourcePointProtocol {
330
330
categories: categories,
331
331
legIntCategories: legIntCategories
332
332
) ) . map { body in
333
- client. post ( urlString: Constants . CUSTOM_CONSENT_URL. absoluteString, body: body) { result in
333
+ client. post ( urlString: Constants . Urls . CUSTOM_CONSENT_URL. absoluteString, body: body) { result in
334
334
handler ( Result {
335
335
try result. decoded ( ) as CustomConsentResponse
336
336
} . mapError {
@@ -359,7 +359,7 @@ class SourcePointClient: SourcePointProtocol {
359
359
propertyName: propertyName,
360
360
campaignType: campaignType
361
361
) ) . map {
362
- client. post ( urlString: Constants . ERROR_METRIS_URL. absoluteString, body: $0) { _ in }
362
+ client. post ( urlString: Constants . Urls . ERROR_METRIS_URL. absoluteString, body: $0) { _ in }
363
363
}
364
364
}
365
365
}
0 commit comments