-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #421 from Ecwid/report-advice
Add support for report advices endpoints
- Loading branch information
Showing
6 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/kotlin/com/ecwid/apiclient/v3/dto/report/request/ReportAdviceRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.ecwid.apiclient.v3.dto.report.request | ||
|
||
import com.ecwid.apiclient.v3.dto.ApiRequest | ||
import com.ecwid.apiclient.v3.dto.report.enums.ReportType | ||
import com.ecwid.apiclient.v3.impl.RequestInfo | ||
import com.ecwid.apiclient.v3.responsefields.ResponseFields | ||
|
||
data class ReportAdviceRequest( | ||
val reportType: ReportType = ReportType.allTraffic, | ||
) : ApiRequest { | ||
|
||
override fun toRequestInfo() = RequestInfo.createGetRequest( | ||
pathSegments = listOf( | ||
"reports", | ||
reportType.toString(), | ||
"tip" | ||
), | ||
params = emptyMap(), | ||
responseFields = ResponseFields.All | ||
) | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
src/main/kotlin/com/ecwid/apiclient/v3/dto/report/result/FetchedReportAdviceResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.ecwid.apiclient.v3.dto.report.result | ||
|
||
import com.ecwid.apiclient.v3.dto.common.ApiFetchedDTO | ||
|
||
data class FetchedReportAdviceResponse( | ||
val tip: String? = null | ||
) : ApiFetchedDTO { | ||
|
||
override fun getModifyKind() = ApiFetchedDTO.ModifyKind.ReadOnly | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters