com.tink.rest.apis.UserApi.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rest Show documentation
Show all versions of rest Show documentation
A library for Tink core services
/**
* NOTE: This class is auto generated by the Swagger Gradle Codegen for the following API: Tink API
*
* More info on this tool is available on https://github.com/Yelp/swagger-gradle-codegen
*/
package com.tink.rest.apis
import com.tink.rest.models.CreateUserRequest
import com.tink.rest.models.CreateUserResponse
import com.tink.rest.models.DeleteUserRequest
import com.tink.rest.models.MarketListResponse
import com.tink.rest.models.User
import com.tink.rest.models.UserProfile
import retrofit2.Response
import retrofit2.http.GET
import retrofit2.http.POST
import retrofit2.http.PUT
@JvmSuppressWildcards
interface UserApi {
/**
* Create a new user
* Returns the ID of the created user.
* @param body Configuration for new user. (optional)
*/
@POST("/api/v1/user/create")
suspend fun createUser(
@retrofit2.http.Body body: CreateUserRequest
): CreateUserResponse
/**
* Delete user
* Completely deletes the currently authenticated user and its data.
* @param body (optional)
*/
@POST("/api/v1/user/delete")
suspend fun delete(
@retrofit2.http.Body body: DeleteUserRequest
): Response
/**
* Flag user for test PSD2-migration
* Flag the currently authenticated user as ready for test PSD2-migration
*/
@PUT("/api/v1/user/psd2flag")
suspend fun flagUserReadyForTestPSD2MigrationFlow(): Response
/**
* List markets
* Returns an object with a list of all available markets in which a user could register with.
* @param desired The ISO 3166-1 alpha-2 country code of the desired market (optional)
*/
@GET("/api/v1/user/markets/list")
suspend fun getMarketList(
@retrofit2.http.Query("desired") desired: String?
): MarketListResponse
/**
* Get the user profile
* Returns the user profile.
*/
@GET("/api/v1/user/profile")
suspend fun getProfile(): UserProfile
/**
* Get the user
* Returns the user object. Note that the password field is not stored in clear text nor populated when getting the user. It's only used for setting the password when registering a new user.
*/
@GET("/api/v1/user")
suspend fun getUser(): User
/**
* Logout a user
*
* @param autologout boolean (optional)
*/
@POST("/api/v1/user/logout")
suspend fun logout(
@retrofit2.http.Query("autologout") autologout: Boolean?
): Response
/**
* Update the user profile
* Updates certain user modifiable properties of a user's profile. Please refer to the body schema to see which properties are modifiable by the user.
* @param body The updated user profile object (required)
*/
@PUT("/api/v1/user/profile")
suspend fun updateProfile(
@retrofit2.http.Body body: UserProfile
): UserProfile
/**
* Update the user
* Updates certain user modifiable properties of a user. Please refer to the body schema to see which properties are modifiable by the user.
* @param body The updated user object (required)
*/
@PUT("/api/v1/user")
suspend fun updateUser(
@retrofit2.http.Body body: User
): User
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy