All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.paysera.lib.inrento.retrofit.NetworkApiClient.kt Maven / Gradle / Ivy

There is a newer version: 1.0.18
Show newest version
package com.paysera.lib.inrento.retrofit

import com.paysera.lib.inrento.entities.account.PSAccount
import com.paysera.lib.inrento.entities.portfolio.PSPortfolio
import com.paysera.lib.inrento.entities.project.PSInvestmentEarns
import com.paysera.lib.inrento.entities.project.PSProjectInfo
import com.paysera.lib.inrento.entities.project.PSProjectStatus
import com.paysera.lib.inrento.entities.project.PSProjects
import com.paysera.lib.inrento.entities.questionnaire.QuestionnaireAnswersRequest
import com.paysera.lib.inrento.entities.requests.PSInvestRequest
import com.paysera.lib.inrento.entities.transaction.PSTransactions
import kotlinx.coroutines.Deferred
import retrofit2.Response
import retrofit2.http.*

interface NetworkApiClient {

    @GET("account")
    fun getAccount(): Deferred

    @GET("portfolio")
    fun getPortfolio(
        @Query("page") page: Int,
        @Query("limit") limit: Int
    ): Deferred

    @GET("transactions")
    fun getTransactions(
        @Query("page") page: Int,
        @Query("limit") limit: Int
    ): Deferred

    @GET("projects")
    fun getProjects(
        @Query("page") page: Int,
        @Query("limit") limit: Int
    ): Deferred

    @GET("project/{id}")
    fun getProject(@Path("id") id: Int): Deferred

    @GET("project/{id}/stats")
    fun getProjectStatus(@Path("id") id: Int): Deferred

    @POST("invest")
    fun invest(@Body investRequest: PSInvestRequest): Deferred>

    @POST("risk_agreement")
    fun confirmRiskAgreement(): Deferred>

    @POST("questionnaire")
    fun saveQuestionnaire(
        @Body questionnaireAnswersRequest: QuestionnaireAnswersRequest
    ): Deferred>

    @GET("project/{projectId}/{amount}")
    fun getInvestmentEarns(
        @Path("projectId") projectId: Int,
        @Path("amount") amount: Double
    ): Deferred
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy