package com.isidroid.job.data.source.remote

import com.isidroid.job.data.mapper.transform
import com.isidroid.job.data.source.remote.api.ApiJob
import com.isidroid.job.data.source.remote.api.request.CreateJobRequest
import com.isidroid.job.model.PrintJob

class JobNetworkSource(private val api: ApiJob) {
    fun createJob(spotId: String, profileId: String, clientName: String): PrintJob? {
        val response = api.createJob(CreateJobRequest(spotId, profileId, senderName = clientName)).execute()
        return response.body()?.transform()
    }



}