Untitled

mail@pastecode.io avatar
unknown
graphqlschema
a month ago
1.3 kB
1
Indexable
Never
query orderPayments($orderId: String!) {
  orderPayments(orderId: $orderId) {
    paymentsDetails {
      method
      terms
      option
    }
    payments {
      id
      invoiceNumber
      dateCreated
    }
  }
}

interface OrderPaymentsResponse {
  paymentsDetails: PaymentsDetails
  payments: [Payment]!
}

"""Prev type is Payment"""
interface PaymentsDetails {
  method: String
  terms: String
  option: String
  poNumber: String
}

interface Payment {
  id: ID!
  invoiceNumber: String
  amountPlanned: String
  serviceProvider: String
  dateCreated: String
  dateModified: String
  transactions: [Transaction]!
}

""" Do we have an id?"""
interface Transaction {
  date: String
  status: String
  type: String
  reference: String
  products: TransactionProduct
}

interface TransactionProduct {
  sku: String!
  quantity: Int!
}



"""
query finalQuoteById and the same others rename payment to paymentDetails
"""

query payment($id: ID!) {
  payment(id: $id) {
    id
    invoiceNumber
    amountPlanned
    serviceProvider
    dateCreated
    dateModified
    transactions {
      date
      status
      type
      reference
      products {
        sku
        quantity
      }
    }
  }
}

interface PaymentResponse {
  payment: Payment
}
Leave a Comment