Skip to content

Commit

Permalink
upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
fupelaqu committed Apr 12, 2023
1 parent 2aa2526 commit a870450
Show file tree
Hide file tree
Showing 8 changed files with 102 additions and 76 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ ThisBuild / organization := "app.softnetwork"

name := "payment"

ThisBuild / version := "0.2.6.1"
ThisBuild / version := "0.2.7"

ThisBuild / scalaVersion := "2.12.15"

Expand Down
2 changes: 1 addition & 1 deletion common/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ libraryDependencies ++= Seq(
"app.softnetwork.scheduler" %% "scheduler-common" % Versions.scheduler,
"app.softnetwork.scheduler" %% "scheduler-common" % Versions.scheduler % "protobuf",
"app.softnetwork.api" %% "generic-server-api" % Versions.server,
"app.softnetwork.protobuf" %% "scalapb-extensions" % "0.1.5",
"app.softnetwork.protobuf" %% "scalapb-extensions" % "0.1.6",
"commons-validator" % "commons-validator" % "1.6"
)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
package app.softnetwork.payment.model

import app.softnetwork.time.{now => _, _}

import app.softnetwork.time._
import app.softnetwork.persistence.now

import java.time.LocalDate
import java.util.Date

import scala.language.implicitConversions

trait RecurringPaymentDecorator { _: RecurringPayment =>
lazy val nextPaymentDate: Option[LocalDate] = {
if (`type`.isCard && getCardStatus.isEnded) {
None
} else {
val today: LocalDate = startDate.getOrElse(now()).toLocalDate
val d: Date = startDate.getOrElse(now())
val today: LocalDate = d
val maybePreviousPayment: Option[LocalDate] = lastRecurringPaymentDate match {
case Some(value) => Some(value)
case _ => None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import app.softnetwork.persistence.message.{BroadcastEvent, CrudEvent}
import app.softnetwork.persistence.typed._
import app.softnetwork.scheduler.config.SchedulerSettings
import app.softnetwork.serialization.asJson
import app.softnetwork.time.{now => _, _}
import app.softnetwork.time._
import org.slf4j.Logger
import app.softnetwork.scheduler.message.SchedulerEvents.{
ExternalEntityToSchedulerEvent,
Expand All @@ -29,6 +29,7 @@ import app.softnetwork.scheduler.message.SchedulerEvents.{
import app.softnetwork.scheduler.message.{AddSchedule, RemoveSchedule}
import app.softnetwork.scheduler.model.Schedule

import java.time.LocalDate
import scala.reflect.ClassTag
import scala.util.{Failure, Success}

Expand Down Expand Up @@ -1283,10 +1284,11 @@ trait GenericPaymentBehavior
case Some(transaction) =>
paymentAccount.walletId match {
case Some(creditedWalletId) =>
val transactionDate: LocalDate = transaction.createdDate
directDebitTransaction(
transaction.creditedWalletId.getOrElse(creditedWalletId),
transaction.id,
transaction.createdDate.minusDays(1)
transactionDate.minusDays(1)
) match {
case Some(t) =>
val lastUpdated = now()
Expand Down Expand Up @@ -2525,7 +2527,8 @@ trait GenericPaymentBehavior

case cmd: DeleteBankAccount =>
state match {
case Some(_) if PaymentSettings.DisableBankAccountDeletion && !cmd.force.getOrElse(false) =>
case Some(_)
if PaymentSettings.DisableBankAccountDeletion && !cmd.force.getOrElse(false) =>
Effect.none.thenRun(_ => BankAccountDeletionDisabled ~> replyTo)

case Some(paymentAccount) =>
Expand Down
Loading

0 comments on commit a870450

Please sign in to comment.