Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECWID-141762 Linkup Reports: update API for filter storefrontPlatform in ReportRequest #411

Merged
merged 5 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading