in src/main/scala/com/gu/invoicing/invoice/Impl.scala [58:85]
def getPaymentMethods(accountId: String): List[PaymentMethod] = {
Http(s"$zuoraApiHost/v1/action/query")
.header("Authorization", s"Bearer ${accessToken}")
.header("Content-Type", "application/json")
.postData(s"""{
| "queryString":
| "select
| Id,
| Type,
| AccountId,
| BankCode,
| BankTransferType,
| BankTransferAccountName,
| BankTransferAccountNumberMask,
| PaypalEmail,
| CreditCardMaskNumber,
| CreditCardExpirationMonth,
| CreditCardExpirationYear,
| CreditCardType
| from PaymentMethod
| where AccountId = '$accountId'"
|}""".pipe(stripZoqlMargins))
.method("POST")
.asString
.body
.pipe(read[PaymentMethods](_))
.records
}