core / com.schibsted.account.network.service.user / UserService

UserService

class UserService : BaseNetworkService

Constructors

<init>

UserService(environment: String, okHttpClient: OkHttpClient)

Functions

acceptUserAgreements

fun acceptUserAgreements(userId: String, userToken: TokenResponse): Call<ApiContainer<AcceptAgreementResponse>>

createDeviceFingerprint

fun createDeviceFingerprint(userToken: TokenResponse, deviceData: Map<String, String>): Call<ApiContainer<DeviceFingerprint>>

Create a device fingerprint for the user's current device.

getMissingRequiredFields

fun getMissingRequiredFields(userId: String, userToken: TokenResponse): Call<ApiContainer<RequiredFieldsResponse>>

getProductAccess

fun getProductAccess(userToken: TokenResponse, userId: String, productId: String): Call<ApiContainer<ProductAccess>>

Checks whether the user has access to the given product.

getSubscriptions

fun getSubscriptions(userToken: TokenResponse, userId: String): Call<ListContainer<Subscription>>

getUserAgreements

fun getUserAgreements(userId: String, userToken: TokenResponse): Call<ApiContainer<AgreementsResponse>>

getUserProfile

fun getUserProfile(userId: String, userToken: TokenResponse): Call<ApiContainer<ProfileData>>

Retrieves the user data from Schibsted account

updateUserProfile

fun updateUserProfile(userId: String, userToken: TokenResponse, profileData: Map<String, Any>): Call<Unit>

Updates the user's profile data

Inherited Functions

createService

open fun <T : Any!> createService(service: Class<T>): T

Creates a service to perform network interactions against.