-
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.
ECWID-148789 OE2: Choose customer from existing customers — add abili…
…ty to get last order.
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
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
23 changes: 23 additions & 0 deletions
23
src/main/kotlin/com/ecwid/apiclient/v3/dto/order/request/LastOrderDetailsRequest.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,23 @@ | ||
package com.ecwid.apiclient.v3.dto.order.request | ||
|
||
import com.ecwid.apiclient.v3.dto.ApiRequest | ||
import com.ecwid.apiclient.v3.impl.RequestInfo | ||
import com.ecwid.apiclient.v3.responsefields.ResponseFields | ||
|
||
data class LastOrderDetailsRequest( | ||
val customerEmail: String = "", | ||
val withAddress: Boolean = false, | ||
val responseFields: ResponseFields = ResponseFields.All, | ||
) : ApiRequest { | ||
override fun toRequestInfo() = RequestInfo.createGetRequest( | ||
pathSegments = listOf( | ||
"orders", | ||
"last", | ||
), | ||
params = mapOf( | ||
"customerEmail" to customerEmail, | ||
"withAddress" to withAddress.toString(), | ||
), | ||
responseFields = responseFields, | ||
) | ||
} |
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