pub(crate) const LIST_CUSTOMERS: &str = r#"
query ($businessId: ID!, $page: Int, $pageSize: Int, $sort: [CustomerSort!]!, $email: String) {
business(id: $businessId) {
customers(page: $page, pageSize: $pageSize, sort: $sort, email: $email) {
pageInfo {
currentPage
totalPages
totalCount
}
edges {
node {
id name firstName lastName displayId
email mobile phone fax tollFree website
internalNotes isArchived
address {
addressLine1 addressLine2 city
province { code name }
country { code name }
postalCode
}
currency { code symbol name }
shippingDetails { name phone instructions
address {
addressLine1 addressLine2 city
province { code name }
country { code name }
postalCode
}
}
outstandingAmount { value currency { code symbol } }
overdueAmount { value currency { code symbol } }
createdAt modifiedAt
}
}
}
}
}
"#;
pub(crate) const GET_CUSTOMER: &str = r#"
query ($businessId: ID!, $customerId: ID!) {
business(id: $businessId) {
customer(id: $customerId) {
id name firstName lastName displayId
email mobile phone fax tollFree website
internalNotes isArchived
address {
addressLine1 addressLine2 city
province { code name }
country { code name }
postalCode
}
currency { code symbol name }
shippingDetails { name phone instructions
address {
addressLine1 addressLine2 city
province { code name }
country { code name }
postalCode
}
}
outstandingAmount { value currency { code symbol } }
overdueAmount { value currency { code symbol } }
createdAt modifiedAt
}
}
}
"#;