implicit def readsList[T]()

in membership-common/src/main/scala/com/gu/stripe/Stripe.scala [145:157]


    implicit def readsList[T](implicit reads: Reads[Seq[T]]): Reads[StripeList[T]] =
      ((JsPath \ "total_count").read[Int] and (JsPath \ "data").read[Seq[T]])(StripeList[T] _)

    implicit val readsCreateCustomerResponse: Reads[CreateCustomerResponse] = Json.reads[CreateCustomerResponse]

    implicit val currencyReads: Reads[Currency] = Reads {
      case JsString(str) =>
        Currency.fromString(str.toUpperCase) match {
          case Some(currency) => JsSuccess(currency)
          case None => JsError(s"$str is not a valid currency code")
        }
      case _ => JsError(s"Missing currency code in Stripe response")
    }