Skip to content

Commit e37862a

Browse files
committed
Add source_type to OnlineRedemption when using lists
1 parent d045829 commit e37862a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

libpretixsync/src/main/java/eu/pretix/libpretixsync/api/PretixApi.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,16 @@ open class PretixApi(url: String, key: String, orgaSlug: String, version: Int, h
9090
}
9191

9292
@Throws(ApiException::class, JSONException::class)
93-
fun redeem(lists: List<Long>, secret: String, datetime: Date?, force: Boolean, nonce: String?, answers: List<Answer>?, ignore_unpaid: Boolean, pdf_data: Boolean, type: String?, callTimeout: Long? = null, questions_supported: Boolean = true): ApiResponse {
93+
fun redeem(lists: List<Long>, secret: String, datetime: Date?, force: Boolean, nonce: String?, answers: List<Answer>?, ignore_unpaid: Boolean, pdf_data: Boolean, type: String?, source_type: String?, callTimeout: Long? = null, questions_supported: Boolean = true): ApiResponse {
9494
var dt: String? = null
9595
if (datetime != null) {
9696
dt = QueuedCheckIn.formatDatetime(datetime)
9797
}
98-
return redeem(lists, secret, dt, force, nonce, answers, ignore_unpaid, pdf_data, type, callTimeout, questions_supported)
98+
return redeem(lists, secret, dt, force, nonce, answers, ignore_unpaid, pdf_data, type, source_type, callTimeout, questions_supported)
9999
}
100100

101101
@Throws(ApiException::class, JSONException::class)
102-
open fun redeem(lists: List<Long>, secret: String, datetime: String?, force: Boolean, nonce: String?, answers: List<Answer>?, ignore_unpaid: Boolean, pdf_data: Boolean, type: String?, callTimeout: Long? = null, questions_supported: Boolean = true): ApiResponse {
102+
open fun redeem(lists: List<Long>, secret: String, datetime: String?, force: Boolean, nonce: String?, answers: List<Answer>?, ignore_unpaid: Boolean, pdf_data: Boolean, type: String?, source_type: String?, callTimeout: Long? = null, questions_supported: Boolean = true): ApiResponse {
103103
val body = JSONObject()
104104
if (datetime != null) {
105105
body.put("datetime", datetime)
@@ -108,6 +108,7 @@ open class PretixApi(url: String, key: String, orgaSlug: String, version: Int, h
108108
body.put("ignore_unpaid", ignore_unpaid)
109109
body.put("nonce", nonce)
110110
body.put("type", type)
111+
body.put("source_type", source_type ?: "barcode")
111112
val answerbody = JSONObject()
112113
if (answers != null) {
113114
for (a in answers) {

libpretixsync/src/main/java/eu/pretix/libpretixsync/check/OnlineCheckProvider.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class OnlineCheckProvider(
6969
ignore_unpaid,
7070
with_badge_data,
7171
type.toString().lowercase(Locale.getDefault()),
72+
source_type,
7273
callTimeout = if (fallback != null) fallbackTimeout.toLong() else null,
7374
questions_supported = allowQuestions,
7475
)

0 commit comments

Comments
 (0)