@@ -61,6 +61,7 @@ public extension InPlayer {
61
61
- password: Password containing minimum 8 characters
62
62
- passwordConfirmation: The same password with minimum 8 characters
63
63
- metadata: Additional information about the account that can be attached to the account object
64
+ - brandingID: Optional parameter - system branding theme ID
64
65
- success: A closure to be executed once the request has finished successfully.
65
66
- authorization: Authorization model containing info regarding token and account
66
67
- failure: A closure to be executed once the request has finished with error.
@@ -70,13 +71,15 @@ public extension InPlayer {
70
71
email: String ,
71
72
password: String ,
72
73
passwordConfirmation: String ,
74
+ brandingID: Int ? = nil ,
73
75
metadata: [ String : Any ] ? = nil ,
74
76
success: @escaping ( _ authorization: InPlayerAuthorization ) -> Void ,
75
77
failure: @escaping ( _ error: InPlayerError ) -> Void ) {
76
78
INPAccountService . signUp ( fullName: fullName,
77
79
email: email,
78
80
password: password,
79
81
passwordConfirmation: passwordConfirmation,
82
+ brandingId: brandingID,
80
83
metadata: metadata,
81
84
completion: { ( authorization, error) in
82
85
if let error = error {
@@ -180,18 +183,21 @@ public extension InPlayer {
180
183
- oldPassword: Account's old password.
181
184
- newPassword: The account's new password
182
185
- newPasswordConfirmation: The account's new password for confirmation.
186
+ - brandingID: Optional parameter - system branding theme ID
183
187
- success: A closure to be executed once the request has finished successfully.
184
188
- failure: A closure to be executed once the request has finished with error.
185
189
- error: Containing information about the error that occurred.
186
190
*/
187
191
public static func changePassword( oldPassword: String ,
188
192
newPassword: String ,
189
193
newPasswordConfirmation: String ,
194
+ brandingID: Int ? = nil ,
190
195
success: @escaping ( ) -> Void ,
191
196
failure: @escaping ( _ error: InPlayerError ) -> Void ) {
192
197
INPAccountService . changePassword ( oldPassword: oldPassword,
193
198
newPassword: newPassword,
194
199
newPasswordConfirmation: newPasswordConfirmation,
200
+ brandingId: brandingID,
195
201
completion: { ( _, error) in
196
202
if let error = error {
197
203
failure ( error)
@@ -205,14 +211,16 @@ public extension InPlayer {
205
211
Deletes account and all information stored with it.
206
212
- Parameters:
207
213
- password: Password confirmation.
214
+ - brandingID: Optional parameter - system branding theme ID
208
215
- success: A closure to be executed once the request has finished successfully.
209
216
- failure: A closure to be executed once the request has finished with error.
210
217
- error: Containing information about the error that occurred.
211
218
*/
212
219
public static func deleteAccount( password: String ,
220
+ brandingID: Int ? = nil ,
213
221
success: @escaping ( ) -> Void ,
214
222
failure: @escaping ( _ error: InPlayerError ) -> Void ) {
215
- INPAccountService . deleteAccount ( password: password, completion: { ( _, error) in
223
+ INPAccountService . deleteAccount ( password: password, brandingId : brandingID , completion: { ( _, error) in
216
224
if let error = error {
217
225
failure ( error)
218
226
} else {
@@ -227,18 +235,21 @@ public extension InPlayer {
227
235
- token: The forgot password token sent to your email address.
228
236
- password: The account’s new password.
229
237
- passwordConfirmation: The password confirmation.
238
+ - brandingID: Optional parameter - system branding theme ID
230
239
- success: A closure to be executed once the request has finished successfully.
231
240
- failure: A closure to be executed once the request has finished with error.
232
241
- error: Containing information about the error that occurred.
233
242
*/
234
243
public static func setNewPassword( token: String ,
235
244
password: String ,
236
245
passwordConfirmation: String ,
246
+ brandingID: Int ? = nil ,
237
247
success: @escaping ( ) -> Void ,
238
248
failure: @escaping ( _ error: InPlayerError ) -> Void ) {
239
249
INPAccountService . setNewPassword ( token: token,
240
250
password: password,
241
251
passwordConfirmation: passwordConfirmation,
252
+ brandingId: brandingID,
242
253
completion: { ( _, error) in
243
254
if let error = error {
244
255
failure ( error)
@@ -252,14 +263,16 @@ public extension InPlayer {
252
263
Sends forgot password instructions on specified email.
253
264
- Parameters:
254
265
- email: Account’s email address.
266
+ - brandingID: Optional parameter - system branding theme ID
255
267
- success: A closure to be executed once the request has finished successfully.
256
268
- failure: A closure to be executed once the request has finished with error.
257
269
- error: Containing information about the error that occurred.
258
270
*/
259
271
public static func requestNewPassword( email: String ,
272
+ brandingID: Int ? = nil ,
260
273
success: @escaping ( ) -> Void ,
261
274
failure: @escaping ( _ error: InPlayerError ) -> Void ) {
262
- INPAccountService . requestNewPassword ( email: email, completion: { ( _, error) in
275
+ INPAccountService . requestNewPassword ( email: email, brandingId : brandingID , completion: { ( _, error) in
263
276
if let error = error {
264
277
failure ( error)
265
278
} else {
@@ -295,14 +308,16 @@ public extension InPlayer {
295
308
Exports account data such as logins, payments, subscriptions, access to assets etc. After invoking the request the account will receive the data in a json format via e-mail.
296
309
- Parameters:
297
310
- password: Password of the current logged user
311
+ - brandingID: Optional parameter - system branding theme ID
298
312
- success: A closure to be executed once the request has finished successfully.
299
313
- failure: A closure to be executed once the request has finished with error.
300
314
- error: Containing information about the error that occurred.
301
315
*/
302
316
public static func exportData( password: String ,
317
+ brandingID: Int ? = nil ,
303
318
success: @escaping ( ) -> Void ,
304
319
failure: @escaping ( _ error: InPlayerError ) -> Void ) {
305
- INPAccountService . exportData ( password: password) { ( _, error) in
320
+ INPAccountService . exportData ( password: password, brandingId : brandingID ) { ( _, error) in
306
321
if let error = error {
307
322
failure ( error)
308
323
} else {
0 commit comments