Charges

A 'Charge' is a feature designed to record expenses associated with tasks. This could include costs like purchasing replacement parts by a maintenance worker to repair an item in a room or expenses related to a room renovation. It serves as a systematic way to track and manage the financial aspects of operational activities.

Types

type Charge {
    id: ID
    amountCents: Number
    category: String
    chargeType: String
    currencyCode: String
    description: String
    status: String
    totalCents: Number
    vatCents: Number
    tags: [String]
}

Queries

input SearchQueryInput {
   amountCents: Number
   tags: String
}

query {
    tickets {
        charges {
            search(
                q: SearchQueryInput
             ) {
             edges {
                node {
                   # Charge
                }
             }
          }
        }
    }
}

Get

query {
    tickets {
       charges {
          charge(chargeId: ID) {
             # Charge  
          }
       }   
    }
}

Mutations

mutation {
    tickets {
        charges {
            createCharge(data: Charge, taskId: ID)
            updateCharge(chargeId: ID, data: Charge)
            deleteCharge(chargeId: ID)
        }
    }
}

Last updated