
Delivery notifications module for Superkassa
This library serves as a unified multiplatform abstraction layer for dispatching and delivering fiscal receipts in the Superkassa ecosystem.
Rather than hardcoding platform-specific APIs or protocol logic into the core business applications, this library decouples delivery orchestration from concrete transport channels:
DeliveryRequest and DeliveryService.DeliveryAdapter interface and passed dynamically at runtime.Add the dependency to your shared commonMain source set inside build.gradle.kts:
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("io.github.texport:superkassa-delivery:1.2.0")
}
}
}
}Add the dependency to your build.gradle.kts for single-platform JVM applications:
dependencies {
implementation("io.github.texport:superkassa-delivery-jvm:1.2.0")
}Or for Maven (pom.xml):
<dependency>
<groupId>io.github.texport</groupId>
<artifactId>superkassa-delivery-jvm</artifactId>
<version>1.2.0</version>
</dependency>You can integrate this library directly into your iOS project using Xcode's Swift Package Manager:
https://github.com/texport/superkassa-delivery.git
1.2.0.import io.github.texport.superkassa.delivery.application.service.DeliveryService
import io.github.texport.superkassa.delivery.domain.model.DeliveryChannel
import io.github.texport.superkassa.delivery.domain.model.DeliveryRequest
// Initialize service with channel adapters
val deliveryService = DeliveryService(listOf(emailAdapter, telegramAdapter))
val request = DeliveryRequest(
cashboxId = "cashbox-1",
documentId = "doc-1",
channel = DeliveryChannel.EMAIL,
destination = "client@example.com",
payloadUrl = "https://example.com/receipts/123"
)
val result = deliveryService.deliver(request)
if (result.ok) {
println("Delivered successfully")
} else {
println("Failed to deliver: ${result.message}")
}Данная библиотека является унифицированным мультиплатформенным слоем абстракции для отправки и доставки фискальных чеков в экосистеме Superkassa.
Вместо того чтобы жестко привязывать бизнес-логику к конкретным API платформ или протоколам, библиотека изолирует процесс оркестрации доставки:
DeliveryRequest и сервисом DeliveryService.DeliveryAdapter и подключаются динамически в рантайме.Добавьте зависимость в ваш общий набор исходников commonMain в build.gradle.kts:
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("io.github.texport:superkassa-delivery:1.2.0")
}
}
}
}Добавьте зависимость в build.gradle.kts вашего JVM-проекта:
dependencies {
implementation("io.github.texport:superkassa-delivery-jvm:1.2.0")
}Или для Maven (pom.xml):
<dependency>
<groupId>io.github.texport</groupId>
<artifactId>superkassa-delivery-jvm</artifactId>
<version>1.2.0</version>
</dependency>Вы можете подключить библиотеку непосредственно в iOS приложение с помощью Swift Package Manager в Xcode:
https://github.com/texport/superkassa-delivery.git
1.2.0.import io.github.texport.superkassa.delivery.application.service.DeliveryService
import io.github.texport.superkassa.delivery.domain.model.DeliveryChannel
import io.github.texport.superkassa.delivery.domain.model.DeliveryRequest
// Инициализация сервиса со списком адаптеров
val deliveryService = DeliveryService(listOf(emailAdapter, telegramAdapter))
val request = DeliveryRequest(
cashboxId = "cashbox-1",
documentId = "doc-1",
channel = DeliveryChannel.EMAIL,
destination = "client@example.com",
payloadUrl = "https://example.com/receipts/123"
)
val result = deliveryService.deliver(request)
if (result.ok) {
println("Успешно доставлено")
} else {
println("Ошибка доставки: ${result.message}")
}This project is licensed under the Apache License 2.0. See LICENSE for details.
Этот проект распространяется под лицензией Apache License 2.0. Подробности см. в файле LICENSE.
This library serves as a unified multiplatform abstraction layer for dispatching and delivering fiscal receipts in the Superkassa ecosystem.
Rather than hardcoding platform-specific APIs or protocol logic into the core business applications, this library decouples delivery orchestration from concrete transport channels:
DeliveryRequest and DeliveryService.DeliveryAdapter interface and passed dynamically at runtime.Add the dependency to your shared commonMain source set inside build.gradle.kts:
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("io.github.texport:superkassa-delivery:1.2.0")
}
}
}
}Add the dependency to your build.gradle.kts for single-platform JVM applications:
dependencies {
implementation("io.github.texport:superkassa-delivery-jvm:1.2.0")
}Or for Maven (pom.xml):
<dependency>
<groupId>io.github.texport</groupId>
<artifactId>superkassa-delivery-jvm</artifactId>
<version>1.2.0</version>
</dependency>You can integrate this library directly into your iOS project using Xcode's Swift Package Manager:
https://github.com/texport/superkassa-delivery.git
1.2.0.import io.github.texport.superkassa.delivery.application.service.DeliveryService
import io.github.texport.superkassa.delivery.domain.model.DeliveryChannel
import io.github.texport.superkassa.delivery.domain.model.DeliveryRequest
// Initialize service with channel adapters
val deliveryService = DeliveryService(listOf(emailAdapter, telegramAdapter))
val request = DeliveryRequest(
cashboxId = "cashbox-1",
documentId = "doc-1",
channel = DeliveryChannel.EMAIL,
destination = "client@example.com",
payloadUrl = "https://example.com/receipts/123"
)
val result = deliveryService.deliver(request)
if (result.ok) {
println("Delivered successfully")
} else {
println("Failed to deliver: ${result.message}")
}Данная библиотека является унифицированным мультиплатформенным слоем абстракции для отправки и доставки фискальных чеков в экосистеме Superkassa.
Вместо того чтобы жестко привязывать бизнес-логику к конкретным API платформ или протоколам, библиотека изолирует процесс оркестрации доставки:
DeliveryRequest и сервисом DeliveryService.DeliveryAdapter и подключаются динамически в рантайме.Добавьте зависимость в ваш общий набор исходников commonMain в build.gradle.kts:
kotlin {
sourceSets {
commonMain {
dependencies {
implementation("io.github.texport:superkassa-delivery:1.2.0")
}
}
}
}Добавьте зависимость в build.gradle.kts вашего JVM-проекта:
dependencies {
implementation("io.github.texport:superkassa-delivery-jvm:1.2.0")
}Или для Maven (pom.xml):
<dependency>
<groupId>io.github.texport</groupId>
<artifactId>superkassa-delivery-jvm</artifactId>
<version>1.2.0</version>
</dependency>Вы можете подключить библиотеку непосредственно в iOS приложение с помощью Swift Package Manager в Xcode:
https://github.com/texport/superkassa-delivery.git
1.2.0.import io.github.texport.superkassa.delivery.application.service.DeliveryService
import io.github.texport.superkassa.delivery.domain.model.DeliveryChannel
import io.github.texport.superkassa.delivery.domain.model.DeliveryRequest
// Инициализация сервиса со списком адаптеров
val deliveryService = DeliveryService(listOf(emailAdapter, telegramAdapter))
val request = DeliveryRequest(
cashboxId = "cashbox-1",
documentId = "doc-1",
channel = DeliveryChannel.EMAIL,
destination = "client@example.com",
payloadUrl = "https://example.com/receipts/123"
)
val result = deliveryService.deliver(request)
if (result.ok) {
println("Успешно доставлено")
} else {
println("Ошибка доставки: ${result.message}")
}This project is licensed under the Apache License 2.0. See LICENSE for details.
Этот проект распространяется под лицензией Apache License 2.0. Подробности см. в файле LICENSE.