Skip to content

Commit

Permalink
Add field days for due date (#78)
Browse files Browse the repository at this point in the history
* Fix webhook name

* Fix discountModality to modality

* Fix unit test

* Add field days for due date
  • Loading branch information
JonatasPedroso authored Jul 5, 2024
1 parent 3c6bbaf commit 43bf120
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/kotlin/Charge.kt
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public data class ChargeRequestBody @JvmOverloads public constructor(
public val customer: CustomerRequest? = null,
public val expiresIn: Int? = null,
public val daysForOverdue: Int? = null,
public val daysForDueDate: Int? = null,
public val daysAfterDueDate: Int? = null,
public val interests: Interests? = null,
public val fines: Fines? = null,
Expand Down Expand Up @@ -189,6 +190,7 @@ public class ChargeBuilder internal constructor() {
public var customer: CustomerRequest? by Properties.nullable()
public var expiresIn: Int? by Properties.nullable()
public var daysForOverdue: Int? by Properties.nullable()
public var daysForDueDate: Int? by Properties.nullable()
public var daysAfterDueDate: Int? by Properties.nullable()
public var interests: Interests? by Properties.nullable()
public var fines: Fines? by Properties.nullable()
Expand Down Expand Up @@ -260,6 +262,15 @@ public class ChargeBuilder internal constructor() {
this.daysForOverdue = daysForOverdue
}

/**
* The days for due date.
*
* @param daysForDueDate The days for due date
*/
public fun daysForDueDate(daysForDueDate: Int): ChargeBuilder = apply {
this.daysForDueDate = daysForDueDate
}

/**
* The days after due date.
*
Expand Down Expand Up @@ -333,6 +344,7 @@ public class ChargeBuilder internal constructor() {
customer,
expiresIn,
daysForOverdue,
daysForDueDate,
daysAfterDueDate,
interests,
fines,
Expand Down

0 comments on commit 43bf120

Please sign in to comment.