diff --git a/src/main/kotlin/Charge.kt b/src/main/kotlin/Charge.kt index e03dbbd..21001f8 100644 --- a/src/main/kotlin/Charge.kt +++ b/src/main/kotlin/Charge.kt @@ -129,7 +129,7 @@ public data class ChargeDiscountFixedDate( @Serializable public data class ChargeDiscountSettings( - public val discountModality: ChargeDiscountModality, + public val modality: ChargeDiscountModality, public val discountFixedDate: List, ) diff --git a/src/main/kotlin/Webhook.kt b/src/main/kotlin/Webhook.kt index 2fafb49..30cf737 100644 --- a/src/main/kotlin/Webhook.kt +++ b/src/main/kotlin/Webhook.kt @@ -11,7 +11,7 @@ import kotlinx.serialization.Serializable @Serializable public data class WebhookPayload( - public val name: Int?, + public val name: String?, public val url: String?, public val authorization: String?, public val isActive: Boolean?, @@ -109,7 +109,6 @@ public enum class WebhookEvent { public class WebhookBuilder internal constructor() { public var name: String? by Properties.nullable() - public var number: Int? by Properties.nullable() public var url: String? by Properties.nullable() public var authorization: String? by Properties.nullable() public var isActive: Boolean? by Properties.nullable() @@ -124,15 +123,6 @@ public class WebhookBuilder internal constructor() { this.name = name } - /** - * The number of the webhook. - * - * @param number The number of the webhook. - */ - public fun number(number: Int): WebhookBuilder = apply { - this.number = number - } - /** * The url of the webhook. * @@ -254,7 +244,7 @@ public class WebhookBuilder internal constructor() { internal fun build(): WebhookRequest { return WebhookRequest( webhook = WebhookPayload( - name = number, + name = name, url = url, authorization = authorization, isActive = isActive, diff --git a/src/test/kotlin/ChargeTests.kt b/src/test/kotlin/ChargeTests.kt index b0b221e..94c1676 100644 --- a/src/test/kotlin/ChargeTests.kt +++ b/src/test/kotlin/ChargeTests.kt @@ -84,7 +84,7 @@ class ChargeTests { type = ChargeType.DYNAMIC expiresDate = "2021-04-01" discountSettings = ChargeDiscountSettings( - discountModality = ChargeDiscountModality.FIXED_VALUE_UNTIL_SPECIFIED_DATE, + modality = ChargeDiscountModality.FIXED_VALUE_UNTIL_SPECIFIED_DATE, discountFixedDate = listOf(ChargeDiscountFixedDate(10, 1000)) ) }