Skip to content

Commit 6651408

Browse files
Merge pull request #411 from Ecwid/ECWID-141762
ECWID-141762 Linkup Reports: update API for filter storefrontPlatform in ReportRequest
2 parents 81b7338 + d7a48ac commit 6651408

3 files changed

Lines changed: 23 additions & 4 deletions

File tree

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package com.ecwid.apiclient.v3.dto.report.enums
2+
3+
enum class StorefrontPlatform {
4+
undefined,
5+
code,
6+
instantSite,
7+
facebook,
8+
singleProduct,
9+
wix,
10+
linkUp,
11+
email,
12+
ecwidServer,
13+
wordpress,
14+
squarespace,
15+
joomla,
16+
weebly,
17+
duda,
18+
other,
19+
}

src/main/kotlin/com/ecwid/apiclient/v3/dto/report/request/ReportRequest.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
package com.ecwid.apiclient.v3.dto.report.request
22

33
import com.ecwid.apiclient.v3.dto.ApiRequest
4-
import com.ecwid.apiclient.v3.dto.report.enums.ComparePeriod
5-
import com.ecwid.apiclient.v3.dto.report.enums.FirstDayOfWeek
6-
import com.ecwid.apiclient.v3.dto.report.enums.ReportType
7-
import com.ecwid.apiclient.v3.dto.report.enums.TimeScaleValue
4+
import com.ecwid.apiclient.v3.dto.report.enums.*
85
import com.ecwid.apiclient.v3.impl.RequestInfo
96
import com.ecwid.apiclient.v3.responsefields.ResponseFields
107

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

2523
override fun toRequestInfo() = RequestInfo.createGetRequest(
@@ -42,6 +40,7 @@ data class ReportRequest(
4240
orderDirection?.let { put("orderDirection", it) }
4341
limit?.let { put("limit", it.toString()) }
4442
offset?.let { put("offset", it.toString()) }
43+
storefrontPlatform?.let { put("storefrontPlatform", it.toString()) }
4544
}.toMap()
4645
}
4746

src/test/kotlin/com/ecwid/apiclient/v3/rule/NullablePropertyRules.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ val otherNullablePropertyRules: List<NullablePropertyRule<*, *>> = listOf(
8282
AllowNullable(ReportRequest::orderDirection),
8383
AllowNullable(ReportRequest::limit),
8484
AllowNullable(ReportRequest::offset),
85+
AllowNullable(ReportRequest::storefrontPlatform),
8586

8687
AllowNullable(FetchedReportResponse::timeScaleValue),
8788
AllowNullable(FetchedReportResponse::comparePeriod),

0 commit comments

Comments
 (0)