Skip to content

Commit 88177dc

Browse files
authored
Merge pull request #24 from inplayer-org/develop
Merge develop to master
2 parents d64e735 + f32f139 commit 88177dc

File tree

121 files changed

+12793
-284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

121 files changed

+12793
-284
lines changed

Example/Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ platform :ios, '10.0'
44
target 'Example' do
55
use_frameworks!
66

7-
pod 'InPlayerSDK', '1.0.0'
7+
pod 'InPlayerSDK', '1.1.0'
88

99
target 'ExampleTests' do
1010
inherit! :search_paths

InPlayerSDK.podspec

+2-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Pod::Spec.new do |s|
1616
#
1717

1818
s.name = "InPlayerSDK"
19-
s.version = "1.0.0"
19+
s.version = "1.1.0"
2020
s.summary = "InPlayer's iOS API client wrapper."
2121

2222
# This description is used to generate tags and improve search results.
@@ -81,7 +81,6 @@ Pod::Spec.new do |s|
8181

8282
s.source_files = "Source/**/*.swift"
8383

84-
8584
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
8685
#
8786
# A list of resources included with the Pod. These are copied into the
@@ -126,7 +125,7 @@ Pod::Spec.new do |s|
126125
s.subspec 'Notification' do |notification|
127126
notification.source_files = "Source/{Core,Notification}/**/*.swift"
128127
notification.dependency 'Alamofire', '5.0.0.beta.1'
129-
notification.dependency 'AWSIoT', '2.8.4'
128+
notification.dependency 'AWSIoT', '2.9.3'
130129
end
131130

132131
s.subspec 'Payment' do |payment|

InPlayerSDK.xcodeproj/project.pbxproj

+64-23
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@
88

99
/* Begin PBXBuildFile section */
1010
753F5D595D59548CC1AF1909 /* Pods_InPlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 89DF19FEC807CF03559464F9 /* Pods_InPlayerSDK.framework */; };
11+
A73211D0223AD06E00452C15 /* InPlayerCustomerAccessItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73211CF223AD06E00452C15 /* InPlayerCustomerAccessItem.swift */; };
12+
A73211D6223AD42300452C15 /* InPlayerPurchaseHistory.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73211D5223AD42300452C15 /* InPlayerPurchaseHistory.swift */; };
13+
A73211DA223C0D7E00452C15 /* InPlayerRegisterField.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73211D9223C0D7E00452C15 /* InPlayerRegisterField.swift */; };
14+
A73211DC223C11B500452C15 /* Subscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73211DB223C11B500452C15 /* Subscription.swift */; };
15+
A73211E1223C138E00452C15 /* INPSubscriptionService.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73211E0223C138E00452C15 /* INPSubscriptionService.swift */; };
16+
A73211E3223C182200452C15 /* InPlayerSubscriptionList.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73211E2223C182200452C15 /* InPlayerSubscriptionList.swift */; };
17+
A73211E5223C1A8800452C15 /* InPlayerSubscription.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73211E4223C1A8800452C15 /* InPlayerSubscription.swift */; };
18+
A73211E7224006AC00452C15 /* InPlayerRegisterFieldsResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73211E6224006AC00452C15 /* InPlayerRegisterFieldsResponse.swift */; };
19+
A73211E922400B5700452C15 /* InPlayerFieldCountry.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73211E822400B5700452C15 /* InPlayerFieldCountry.swift */; };
20+
A73211EB2240114C00452C15 /* countries.json in Resources */ = {isa = PBXBuildFile; fileRef = A73211EA2240114C00452C15 /* countries.json */; };
1121
A741EAA921F7799B00290AFD /* InPlayer+Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = A741EAA821F7799B00290AFD /* InPlayer+Configuration.swift */; };
1222
A741EAAB21F77A8700290AFD /* InPlayerEnvironmentType.swift in Sources */ = {isa = PBXBuildFile; fileRef = A741EAAA21F77A8700290AFD /* InPlayerEnvironmentType.swift */; };
1323
A7EA961921F5018600CDA238 /* InPlayerSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7EA960F21F5018600CDA238 /* InPlayerSDK.framework */; };
@@ -79,6 +89,16 @@
7989
863B37A5E53B1B204C406696 /* Pods-InPlayerSDKTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InPlayerSDKTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InPlayerSDKTests/Pods-InPlayerSDKTests.debug.xcconfig"; sourceTree = "<group>"; };
8090
89DF19FEC807CF03559464F9 /* Pods_InPlayerSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_InPlayerSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; };
8191
A42AFBEAB4A1A9893C497B3B /* Pods-InPlayerSDK.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-InPlayerSDK.debug.xcconfig"; path = "Pods/Target Support Files/Pods-InPlayerSDK/Pods-InPlayerSDK.debug.xcconfig"; sourceTree = "<group>"; };
92+
A73211CF223AD06E00452C15 /* InPlayerCustomerAccessItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InPlayerCustomerAccessItem.swift; sourceTree = "<group>"; };
93+
A73211D5223AD42300452C15 /* InPlayerPurchaseHistory.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InPlayerPurchaseHistory.swift; sourceTree = "<group>"; };
94+
A73211D9223C0D7E00452C15 /* InPlayerRegisterField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InPlayerRegisterField.swift; sourceTree = "<group>"; };
95+
A73211DB223C11B500452C15 /* Subscription.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Subscription.swift; sourceTree = "<group>"; };
96+
A73211E0223C138E00452C15 /* INPSubscriptionService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = INPSubscriptionService.swift; sourceTree = "<group>"; };
97+
A73211E2223C182200452C15 /* InPlayerSubscriptionList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InPlayerSubscriptionList.swift; sourceTree = "<group>"; };
98+
A73211E4223C1A8800452C15 /* InPlayerSubscription.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InPlayerSubscription.swift; sourceTree = "<group>"; };
99+
A73211E6224006AC00452C15 /* InPlayerRegisterFieldsResponse.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InPlayerRegisterFieldsResponse.swift; sourceTree = "<group>"; };
100+
A73211E822400B5700452C15 /* InPlayerFieldCountry.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InPlayerFieldCountry.swift; sourceTree = "<group>"; };
101+
A73211EA2240114C00452C15 /* countries.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = countries.json; sourceTree = "<group>"; };
82102
A741EAA821F7799B00290AFD /* InPlayer+Configuration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "InPlayer+Configuration.swift"; sourceTree = "<group>"; };
83103
A741EAAA21F77A8700290AFD /* InPlayerEnvironmentType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InPlayerEnvironmentType.swift; sourceTree = "<group>"; };
84104
A7EA960F21F5018600CDA238 /* InPlayerSDK.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = InPlayerSDK.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -181,6 +201,32 @@
181201
name = Frameworks;
182202
sourceTree = "<group>";
183203
};
204+
A73211CE223AC9AD00452C15 /* Models */ = {
205+
isa = PBXGroup;
206+
children = (
207+
A73211D5223AD42300452C15 /* InPlayerPurchaseHistory.swift */,
208+
A73211CF223AD06E00452C15 /* InPlayerCustomerAccessItem.swift */,
209+
);
210+
path = Models;
211+
sourceTree = "<group>";
212+
};
213+
A73211DD223C124200452C15 /* Subscription */ = {
214+
isa = PBXGroup;
215+
children = (
216+
A73211E2223C182200452C15 /* InPlayerSubscriptionList.swift */,
217+
A73211E4223C1A8800452C15 /* InPlayerSubscription.swift */,
218+
);
219+
path = Subscription;
220+
sourceTree = "<group>";
221+
};
222+
A73211DF223C125600452C15 /* Subscription */ = {
223+
isa = PBXGroup;
224+
children = (
225+
A73211E0223C138E00452C15 /* INPSubscriptionService.swift */,
226+
);
227+
path = Subscription;
228+
sourceTree = "<group>";
229+
};
184230
A7EA960521F5018600CDA238 = {
185231
isa = PBXGroup;
186232
children = (
@@ -217,11 +263,13 @@
217263
A7EA963221F501F000CDA238 /* InPlayer.swift */,
218264
A7EA965321F501F000CDA238 /* Account.swift */,
219265
A7EA963621F501F000CDA238 /* Asset.swift */,
266+
A73211DB223C11B500452C15 /* Subscription.swift */,
220267
A7EA96D121F52B6900CDA238 /* InPlayerConstants.swift */,
221268
A7EA962B21F501F000CDA238 /* Configuration */,
222269
A7EA963921F501F000CDA238 /* Models */,
223270
A7EA963321F501F000CDA238 /* API */,
224271
A7EA962E21F501F000CDA238 /* Extensions */,
272+
A73211EA2240114C00452C15 /* countries.json */,
225273
);
226274
path = Core;
227275
sourceTree = "<group>";
@@ -255,6 +303,7 @@
255303
A7EA964A21F501F000CDA238 /* InPlayerSessionAPIManager.swift */,
256304
A7EA965121F501F000CDA238 /* Account */,
257305
A7EA963421F501F000CDA238 /* Asset */,
306+
A73211DF223C125600452C15 /* Subscription */,
258307
A7EA965421F501F000CDA238 /* NetworkConstants.swift */,
259308
);
260309
path = API;
@@ -274,6 +323,7 @@
274323
A7EA964B21F501F000CDA238 /* Errors */,
275324
A7EA963A21F501F000CDA238 /* Asset */,
276325
A7EA964521F501F000CDA238 /* Account */,
326+
A73211DD223C124200452C15 /* Subscription */,
277327
);
278328
path = Models;
279329
sourceTree = "<group>";
@@ -300,6 +350,9 @@
300350
A7EA964621F501F000CDA238 /* InPlayerAccount.swift */,
301351
A7EA964721F501F000CDA238 /* InPlayerCredentials.swift */,
302352
A7EA964821F501F000CDA238 /* InPlayerAuthorization.swift */,
353+
A73211E6224006AC00452C15 /* InPlayerRegisterFieldsResponse.swift */,
354+
A73211D9223C0D7E00452C15 /* InPlayerRegisterField.swift */,
355+
A73211E822400B5700452C15 /* InPlayerFieldCountry.swift */,
303356
);
304357
path = Account;
305358
sourceTree = "<group>";
@@ -360,6 +413,7 @@
360413
children = (
361414
A7EA96E221F52C9B00CDA238 /* Payment.swift */,
362415
A7EA966221F501F000CDA238 /* API */,
416+
A73211CE223AC9AD00452C15 /* Models */,
363417
);
364418
path = Payment;
365419
sourceTree = "<group>";
@@ -432,7 +486,6 @@
432486
A7EA961421F5018600CDA238 /* Sources */,
433487
A7EA961521F5018600CDA238 /* Frameworks */,
434488
A7EA961621F5018600CDA238 /* Resources */,
435-
14A810E310E51CC500354B4C /* [CP] Embed Pods Frameworks */,
436489
);
437490
buildRules = (
438491
);
@@ -485,6 +538,7 @@
485538
isa = PBXResourcesBuildPhase;
486539
buildActionMask = 2147483647;
487540
files = (
541+
A73211EB2240114C00452C15 /* countries.json in Resources */,
488542
);
489543
runOnlyForDeploymentPostprocessing = 0;
490544
};
@@ -498,28 +552,6 @@
498552
/* End PBXResourcesBuildPhase section */
499553

500554
/* Begin PBXShellScriptBuildPhase section */
501-
14A810E310E51CC500354B4C /* [CP] Embed Pods Frameworks */ = {
502-
isa = PBXShellScriptBuildPhase;
503-
buildActionMask = 2147483647;
504-
files = (
505-
);
506-
inputPaths = (
507-
"${SRCROOT}/Pods/Target Support Files/Pods-InPlayerSDKTests/Pods-InPlayerSDKTests-frameworks.sh",
508-
"${BUILT_PRODUCTS_DIR}/AWSCore/AWSCore.framework",
509-
"${BUILT_PRODUCTS_DIR}/AWSIoT/AWSIoT.framework",
510-
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
511-
);
512-
name = "[CP] Embed Pods Frameworks";
513-
outputPaths = (
514-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSCore.framework",
515-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSIoT.framework",
516-
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
517-
);
518-
runOnlyForDeploymentPostprocessing = 0;
519-
shellPath = /bin/sh;
520-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InPlayerSDKTests/Pods-InPlayerSDKTests-frameworks.sh\"\n";
521-
showEnvVarsInLog = 0;
522-
};
523555
8394ECE9E19E0EC962E775E9 /* [CP] Check Pods Manifest.lock */ = {
524556
isa = PBXShellScriptBuildPhase;
525557
buildActionMask = 2147483647;
@@ -572,6 +604,7 @@
572604
A7EA967421F501F000CDA238 /* InPlayerAccessFee.swift in Sources */,
573605
A7EA967021F501F000CDA238 /* INPAPIConfiguration.swift in Sources */,
574606
A7EA967521F501F000CDA238 /* InPlayerTrialPeriod.swift in Sources */,
607+
A73211DA223C0D7E00452C15 /* InPlayerRegisterField.swift in Sources */,
575608
A7EA966B21F501F000CDA238 /* DataDecodeExt.swift in Sources */,
576609
A7EA966C21F501F000CDA238 /* DateExt.swift in Sources */,
577610
A7EA968D21F501F000CDA238 /* InPlayerAwsKey.swift in Sources */,
@@ -585,13 +618,20 @@
585618
A7EA967C21F501F000CDA238 /* InPlayerAccount.swift in Sources */,
586619
A7EA96D621F52BD500CDA238 /* INPAccountService.swift in Sources */,
587620
A7EA96D221F52B6900CDA238 /* InPlayerConstants.swift in Sources */,
621+
A73211E5223C1A8800452C15 /* InPlayerSubscription.swift in Sources */,
588622
A741EAAB21F77A8700290AFD /* InPlayerEnvironmentType.swift in Sources */,
623+
A73211DC223C11B500452C15 /* Subscription.swift in Sources */,
624+
A73211E7224006AC00452C15 /* InPlayerRegisterFieldsResponse.swift in Sources */,
589625
A741EAA921F7799B00290AFD /* InPlayer+Configuration.swift in Sources */,
626+
A73211E3223C182200452C15 /* InPlayerSubscriptionList.swift in Sources */,
590627
A7EA968C21F501F000CDA238 /* InPlayerNotification.swift in Sources */,
628+
A73211D6223AD42300452C15 /* InPlayerPurchaseHistory.swift in Sources */,
591629
A7EA967321F501F000CDA238 /* InPlayerAccessControlType.swift in Sources */,
592630
A7EA967121F501F000CDA238 /* NetworkDataSource.swift in Sources */,
631+
A73211D0223AD06E00452C15 /* InPlayerCustomerAccessItem.swift in Sources */,
593632
A7EA968421F501F000CDA238 /* InPlayerInvalidResponseError.swift in Sources */,
594633
A7EA968F21F501F000CDA238 /* INPNotificationService.swift in Sources */,
634+
A73211E922400B5700452C15 /* InPlayerFieldCountry.swift in Sources */,
595635
A7EA969021F501F000CDA238 /* InPlayerNotificationAPIManager.swift in Sources */,
596636
A7EA969321F501F000CDA238 /* PaymentNetworkConstants.swift in Sources */,
597637
A7EA967A21F501F000CDA238 /* InPlayerItemMetadata.swift in Sources */,
@@ -609,6 +649,7 @@
609649
A7EA967721F501F000CDA238 /* InPlayerAccessType.swift in Sources */,
610650
A7EA967F21F501F000CDA238 /* INPAuthHandler.swift in Sources */,
611651
A7EA967821F501F000CDA238 /* InPlayerItemType.swift in Sources */,
652+
A73211E1223C138E00452C15 /* INPSubscriptionService.swift in Sources */,
612653
);
613654
runOnlyForDeploymentPostprocessing = 0;
614655
};

Podfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ target 'InPlayerSDK' do
44
use_frameworks!
55

66
pod 'Alamofire', '5.0.0.beta.1'
7-
pod 'AWSIoT', '2.8.4'
7+
pod 'AWSIoT', '2.9.3'
88

99
target 'InPlayerSDKTests' do
1010
inherit! :search_paths

README.md

+32-7
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ Then, run the following command:
3535

3636
$ pod install
3737

38-
**Note**: InPlayerSDK is build with submodules. So if you like you can call it like this in your Podfile:
38+
**Note**: InPlayerSDK is build with submodules. So if you like you can add it like this in your Podfile:
3939

40-
pod 'InPlayerSDK/Core' (all features, default)
40+
pod 'InPlayerSDK' (all features, default)
41+
pod 'InPlayerSDK/Core' (includes Core features - Account, Asset, Subscription)
4142
pod 'InPlayerSDK/Payment' (includes Core and Payment modules)
4243
pod 'InPlayerSDK/Notification' (includes Core and Notification modules)
4344

@@ -46,7 +47,7 @@ Then, run the following command:
4647
This SDK has dependencies that it relies on. The list consists of:
4748

4849
pod 'Alamofire', '5.0.0.beta.1'
49-
pod 'AWSIoT', '2.8.4' (only Notifications module)
50+
pod 'AWSIoT', '2.9.3' (only Notifications module)
5051

5152
## Usage
5253

@@ -66,8 +67,8 @@ Initialize InPlayer:
6667

6768
### Services
6869

69-
InPlayerSDK consists out of four services:
70-
`Account`, `Asset`, `Payment` and `Notification`.
70+
InPlayerSDK consists out of five services:
71+
`Account`, `Asset`, `Payment`, `Subscription` and `Notification`.
7172

7273
##### Account
7374
Account related methods.
@@ -93,9 +94,33 @@ Get asset details:
9394
// Some error occured.
9495
}
9596

97+
##### Payment
98+
Payment related methods:
99+
100+
###### Example
101+
Validate purchase:
102+
103+
InPlayer.Payment.validate(receiptString: <RECEIPT_STRING>, productIdentifier: <PRODUCT_IDENTIFIER>, success: {
104+
// Successfully validated receipt
105+
}, failure: { (error) in
106+
// Some error occured
107+
})
108+
109+
##### Subscription
110+
Subscription related methods:
111+
112+
###### Example
113+
Get account subscriptions:
114+
115+
InPlayer.Subscription.getSubscriptions(page: 1, limit: 10, success: { (list) in
116+
// Successfully obtained subscription list
117+
}, failure: { (error) in
118+
// Some error occured
119+
})
120+
96121
##### Notification
97122

98-
Notification service has two methods:
123+
Notification service has three methods:
99124

100125
public static func subscribe(onStatusChanged: @escaping ( _status: InPlayerNotificationStatus) -> Void, onMessageReceived: @escaping (_ notification: InPlayerNotification) -> Void, onError: @escaping (_ error: InPlayerError) -> Void)
101126

@@ -129,4 +154,4 @@ the Code of Conduct in the [Contributing Guidelines](https://github.com/inplayer
129154

130155
Licensed under the MIT License, Copyright © 2018-present InPlayer.
131156

132-
See [LICENSE](https://github.com/inplayer-org/inplayer-ios-sdk/blob/master/LICENSE) for more information.
157+
See [LICENSE](https://github.com/inplayer-org/inplayer-ios-sdk/blob/master/LICENSE) for more information.

Source/Core/API/Account/INPAccountService.swift

+30-1
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,20 @@ class INPAccountService {
172172
updateAuthorization(authorization: authorization, error: error, completion: completion)
173173
})
174174
}
175+
176+
static func exportData(password: String, completion: @escaping RequestCompletion<Empty>) {
177+
let params = [AccountParameters.password: password]
178+
NetworkDataSource.performRequest(session: InPlayerSessionAPIManager.default.session,
179+
route: AccountAPIRouter.exportData(parameters: params),
180+
completion: completion)
181+
}
182+
183+
static func getRegisterFields(completion: @escaping RequestCompletion<InPlayerRegisterFieldsResponse>) {
184+
let merchantUUID = InPlayer.clientId
185+
NetworkDataSource.performRequest(session: InPlayerSessionAPIManager.default.session,
186+
route: AccountAPIRouter.getRegisterFields(merchantUUID: merchantUUID),
187+
completion: completion)
188+
}
175189
}
176190

177191
private extension INPAccountService {
@@ -257,10 +271,18 @@ private enum AccountAPIRouter: INPAPIConfiguration {
257271
case authenticate(parameters: [String: Any])
258272
case refreshToken(parameters: [String: Any])
259273
case authenticateClientCredentials(parameters: [String: Any])
274+
case exportData(parameters: [String: Any])
275+
case getRegisterFields(merchantUUID: String)
260276

261277
var method: HTTPMethod {
262278
switch self {
263-
case .createAccount, .changePassword, .forgotPassword, .authenticate, .refreshToken, .authenticateClientCredentials:
279+
case .createAccount,
280+
.changePassword,
281+
.forgotPassword,
282+
.authenticate,
283+
.refreshToken,
284+
.authenticateClientCredentials,
285+
.exportData:
264286
return .post
265287
case .updateAccount, .setNewPassword:
266288
return .put
@@ -291,7 +313,12 @@ private enum AccountAPIRouter: INPAPIConfiguration {
291313
return NetworkConstants.Endpoints.Account.forgotPassword
292314
case .authenticate, .refreshToken, .authenticateClientCredentials:
293315
return NetworkConstants.Endpoints.Account.authenticate
316+
case .exportData:
317+
return NetworkConstants.Endpoints.Account.exportData
318+
case .getRegisterFields(let merchantUUID):
319+
return String(format: NetworkConstants.Endpoints.Account.registerFields, merchantUUID)
294320
}
321+
295322
}
296323

297324
var parameters: Parameters? {
@@ -314,6 +341,8 @@ private enum AccountAPIRouter: INPAPIConfiguration {
314341
return parameters
315342
case .authenticateClientCredentials(let parameters):
316343
return parameters
344+
case .exportData(let parameters):
345+
return parameters
317346
default:
318347
return nil
319348
}

Source/Core/API/NetworkConstants.swift

+6
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,18 @@ struct NetworkConstants {
2929
static let forgotPassword = "/accounts/forgot-password"
3030
static let authenticate = "/accounts/authenticate"
3131
static let setNewPassword = "/accounts/forgot-password/%@"
32+
static let exportData = "/accounts/export"
33+
static let registerFields = "/accounts/register-fields/%@"
3234
}
3335

3436
struct Asset {
3537
static let itemDetails = "/items/%@/%@"
3638
static let itemAccessFees = "items/%@/access-fees"
3739
static let itemAccess = "items/%@/access"
3840
}
41+
42+
struct Subscription {
43+
static let subscriptionList = "/subscriptions"
44+
}
3945
}
4046
}

0 commit comments

Comments
 (0)