Skip to content

Commit

Permalink
Merge pull request #411 from Ecwid/ECWID-141762
Browse files Browse the repository at this point in the history
ECWID-141762 Linkup Reports: update API for filter storefrontPlatform in ReportRequest
  • Loading branch information
n-viktorovich authored Aug 26, 2024
2 parents 81b7338 + d7a48ac commit 6651408
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.ecwid.apiclient.v3.dto.report.enums

enum class StorefrontPlatform {
undefined,
code,
instantSite,
facebook,
singleProduct,
wix,
linkUp,
email,
ecwidServer,
wordpress,
squarespace,
joomla,
weebly,
duda,
other,
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
package com.ecwid.apiclient.v3.dto.report.request

import com.ecwid.apiclient.v3.dto.ApiRequest
import com.ecwid.apiclient.v3.dto.report.enums.ComparePeriod
import com.ecwid.apiclient.v3.dto.report.enums.FirstDayOfWeek
import com.ecwid.apiclient.v3.dto.report.enums.ReportType
import com.ecwid.apiclient.v3.dto.report.enums.TimeScaleValue
import com.ecwid.apiclient.v3.dto.report.enums.*
import com.ecwid.apiclient.v3.impl.RequestInfo
import com.ecwid.apiclient.v3.responsefields.ResponseFields

Expand All @@ -20,6 +17,7 @@ data class ReportRequest(
val limit: Int? = null,
val offset: Int? = null,
val responseFields: ResponseFields = ResponseFields.All,
val storefrontPlatform: StorefrontPlatform? = null,
) : ApiRequest {

override fun toRequestInfo() = RequestInfo.createGetRequest(
Expand All @@ -42,6 +40,7 @@ data class ReportRequest(
orderDirection?.let { put("orderDirection", it) }
limit?.let { put("limit", it.toString()) }
offset?.let { put("offset", it.toString()) }
storefrontPlatform?.let { put("storefrontPlatform", it.toString()) }
}.toMap()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ val otherNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf(
AllowNullable(ReportRequest::orderDirection),
AllowNullable(ReportRequest::limit),
AllowNullable(ReportRequest::offset),
AllowNullable(ReportRequest::storefrontPlatform),

AllowNullable(FetchedReportResponse::timeScaleValue),
AllowNullable(FetchedReportResponse::comparePeriod),
Expand Down

0 comments on commit 6651408

Please sign in to comment.