Skip to content

Commit

Permalink
ECWID-141762 add enum StorefrontPlatform and use as param in ReportRe…
Browse files Browse the repository at this point in the history
…quest
  • Loading branch information
n-viktorovich committed Jun 10, 2024
1 parent 5f79b94 commit 21bae0f
Show file tree
Hide file tree
Showing 2 changed files with 22 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;

public enum 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

0 comments on commit 21bae0f

Please sign in to comment.