Skip to content

Commit

Permalink
Merge pull request #936 from guardian/ph-20231002-1600-refactoring
Browse files Browse the repository at this point in the history
Introduce the migrations namespace
  • Loading branch information
shtukas authored Oct 3, 2023
2 parents 863a4fc + f10f2a0 commit 89ea5f6
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package pricemigrationengine.handlers

import pricemigrationengine.model.CohortTableFilter.NotificationSendDateWrittenToSalesforce
import pricemigrationengine.model._
import pricemigrationengine.migrations._
import pricemigrationengine.services._
import zio.{Clock, ZIO}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
package pricemigrationengine.model
package pricemigrationengine.migrations

import pricemigrationengine.model.AmendmentData.RatePlanChargePair
import pricemigrationengine.model.BillingPeriod.BillingPeriod
import pricemigrationengine.model.ZuoraProductCatalogue.{homeDeliveryRatePlans, newGuardianWeeklyRatePlans}
import pricemigrationengine.model.{
AmendmentDataFailure,
ZuoraAccount,
ZuoraProductCatalogue,
ZuoraProductRatePlan,
ZuoraRatePlanCharge,
Currency
}

object BillingPeriod extends Enumeration {
type BillingPeriod = Value
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
package pricemigrationengine.model
import pricemigrationengine.model.CohortSpec
package pricemigrationengine.migrations

import pricemigrationengine.model.{
AddZuoraRatePlan,
AmendmentDataFailure,
CohortSpec,
Currency,
Membership2023Annuals,
Membership2023Monthlies,
MigrationType,
PriceData,
RemoveZuoraRatePlan,
ZuoraAccount,
ZuoraInvoiceItem,
ZuoraInvoiceList,
ZuoraProductCatalogue,
ZuoraRatePlan,
ZuoraRatePlanCharge,
ZuoraSubscription,
ZuoraSubscriptionUpdate
}

import java.time.LocalDate

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package pricemigrationengine.model

import pricemigrationengine.migrations.{GuardianWeekly, Membership2023}
import pricemigrationengine.model.ZuoraProductCatalogue.{homeDeliveryRatePlans, productPricingMap}

import java.time.LocalDate
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package pricemigrationengine.model

import pricemigrationengine.migrations.GuardianWeekly
import pricemigrationengine.model.ChargeOverride.fromRatePlanCharge

import java.time.LocalDate
import java.time.temporal.ChronoUnit.DAYS
import pricemigrationengine.model.Either._
import pricemigrationengine.model.ZuoraProductCatalogue.{productPricingMap}
import pricemigrationengine.model.ZuoraProductCatalogue.productPricingMap
import upickle.default.{ReadWriter, macroRW}

case class ZuoraSubscriptionUpdate(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import pricemigrationengine.model.{ZuoraRatePlanCharge, ZuoraSubscriptionUpdate,
import java.time.{LocalDate, ZoneOffset}
import pricemigrationengine.Fixtures
import pricemigrationengine.handlers.AmendmentHandler.amendmentIsBeforeInstant
import pricemigrationengine.migrations.Membership2023
import pricemigrationengine.model.CohortTableFilter.NotificationSendDateWrittenToSalesforce

class AmendmentHandlerTest extends munit.FunSuite {
Expand Down

0 comments on commit 89ea5f6

Please sign in to comment.