convertToPigeon static method

  1. @visibleForTesting
SKSubscriptionPeriodUnitMessage convertToPigeon(
  1. SKSubscriptionPeriodUnit msg
)

Convert from SKSubscriptionPeriodUnit to SKSubscriptionPeriodUnitMessage

Implementation

@visibleForTesting
static SKSubscriptionPeriodUnitMessage convertToPigeon(
    SKSubscriptionPeriodUnit msg) {
  switch (msg) {
    case SKSubscriptionPeriodUnit.day:
      return SKSubscriptionPeriodUnitMessage.day;
    case SKSubscriptionPeriodUnit.week:
      return SKSubscriptionPeriodUnitMessage.week;
    case SKSubscriptionPeriodUnit.month:
      return SKSubscriptionPeriodUnitMessage.month;
    case SKSubscriptionPeriodUnit.year:
      return SKSubscriptionPeriodUnitMessage.year;
  }
}