pub(crate) const INVOICE_CREATE: &str = concat!(
r#"
mutation ($input: InvoiceCreateInput!) {
invoiceCreate(input: $input) {
didSucceed
inputErrors { code message path }
invoice {
"#,
r#"
id createdAt modifiedAt pdfUrl viewUrl status
title subhead invoiceNumber poNumber invoiceDate dueDate
amountDue { value currency { code symbol } }
amountPaid { value currency { code symbol } }
taxTotal { value currency { code symbol } }
total { value currency { code symbol } }
currency { code symbol name }
exchangeRate
memo footer
disableCreditCardPayments disableBankPayments
itemTitle unitTitle priceTitle amountTitle
hideName hideDescription hideUnit hidePrice hideAmount
lastSentAt lastSentVia lastViewedAt
customer { id name email }
items {
product { id name }
description quantity unitPrice
subtotal { value currency { code symbol } }
total { value currency { code symbol } }
taxes {
salesTax { id name }
amount { value currency { code symbol } }
}
}
"#,
r#"
}
}
}
"#
);
pub(crate) const INVOICE_PATCH: &str = concat!(
r#"
mutation ($input: InvoicePatchInput!) {
invoicePatch(input: $input) {
didSucceed
inputErrors { code message path }
invoice {
"#,
r#"
id createdAt modifiedAt pdfUrl viewUrl status
title subhead invoiceNumber poNumber invoiceDate dueDate
amountDue { value currency { code symbol } }
amountPaid { value currency { code symbol } }
taxTotal { value currency { code symbol } }
total { value currency { code symbol } }
currency { code symbol name }
exchangeRate
memo footer
disableCreditCardPayments disableBankPayments
itemTitle unitTitle priceTitle amountTitle
hideName hideDescription hideUnit hidePrice hideAmount
lastSentAt lastSentVia lastViewedAt
customer { id name email }
items {
product { id name }
description quantity unitPrice
subtotal { value currency { code symbol } }
total { value currency { code symbol } }
taxes {
salesTax { id name }
amount { value currency { code symbol } }
}
}
"#,
r#"
}
}
}
"#
);
pub(crate) const INVOICE_DELETE: &str = r#"
mutation ($input: InvoiceDeleteInput!) {
invoiceDelete(input: $input) {
didSucceed
inputErrors { code message path }
}
}
"#;
pub(crate) const INVOICE_CLONE: &str = concat!(
r#"
mutation ($input: InvoiceCloneInput!) {
invoiceClone(input: $input) {
didSucceed
inputErrors { code message path }
invoice {
"#,
r#"
id createdAt modifiedAt pdfUrl viewUrl status
title subhead invoiceNumber poNumber invoiceDate dueDate
amountDue { value currency { code symbol } }
amountPaid { value currency { code symbol } }
taxTotal { value currency { code symbol } }
total { value currency { code symbol } }
currency { code symbol name }
exchangeRate
memo footer
disableCreditCardPayments disableBankPayments
itemTitle unitTitle priceTitle amountTitle
hideName hideDescription hideUnit hidePrice hideAmount
lastSentAt lastSentVia lastViewedAt
customer { id name email }
items {
product { id name }
description quantity unitPrice
subtotal { value currency { code symbol } }
total { value currency { code symbol } }
taxes {
salesTax { id name }
amount { value currency { code symbol } }
}
}
"#,
r#"
}
}
}
"#
);
pub(crate) const INVOICE_APPROVE: &str = concat!(
r#"
mutation ($input: InvoiceApproveInput!) {
invoiceApprove(input: $input) {
didSucceed
inputErrors { code message path }
invoice {
"#,
r#"
id createdAt modifiedAt pdfUrl viewUrl status
title subhead invoiceNumber poNumber invoiceDate dueDate
amountDue { value currency { code symbol } }
amountPaid { value currency { code symbol } }
taxTotal { value currency { code symbol } }
total { value currency { code symbol } }
currency { code symbol name }
exchangeRate
memo footer
disableCreditCardPayments disableBankPayments
itemTitle unitTitle priceTitle amountTitle
hideName hideDescription hideUnit hidePrice hideAmount
lastSentAt lastSentVia lastViewedAt
customer { id name email }
items {
product { id name }
description quantity unitPrice
subtotal { value currency { code symbol } }
total { value currency { code symbol } }
taxes {
salesTax { id name }
amount { value currency { code symbol } }
}
}
"#,
r#"
}
}
}
"#
);
pub(crate) const INVOICE_MARK_SENT: &str = concat!(
r#"
mutation ($input: InvoiceMarkSentInput!) {
invoiceMarkSent(input: $input) {
didSucceed
inputErrors { code message path }
invoice {
"#,
r#"
id createdAt modifiedAt pdfUrl viewUrl status
title subhead invoiceNumber poNumber invoiceDate dueDate
amountDue { value currency { code symbol } }
amountPaid { value currency { code symbol } }
taxTotal { value currency { code symbol } }
total { value currency { code symbol } }
currency { code symbol name }
exchangeRate
memo footer
disableCreditCardPayments disableBankPayments
itemTitle unitTitle priceTitle amountTitle
hideName hideDescription hideUnit hidePrice hideAmount
lastSentAt lastSentVia lastViewedAt
customer { id name email }
items {
product { id name }
description quantity unitPrice
subtotal { value currency { code symbol } }
total { value currency { code symbol } }
taxes {
salesTax { id name }
amount { value currency { code symbol } }
}
}
"#,
r#"
}
}
}
"#
);
pub(crate) const INVOICE_SEND: &str = concat!(
r#"
mutation ($input: InvoiceSendInput!) {
invoiceSend(input: $input) {
didSucceed
inputErrors { code message path }
invoice {
"#,
r#"
id createdAt modifiedAt pdfUrl viewUrl status
title subhead invoiceNumber poNumber invoiceDate dueDate
amountDue { value currency { code symbol } }
amountPaid { value currency { code symbol } }
taxTotal { value currency { code symbol } }
total { value currency { code symbol } }
currency { code symbol name }
exchangeRate
memo footer
disableCreditCardPayments disableBankPayments
itemTitle unitTitle priceTitle amountTitle
hideName hideDescription hideUnit hidePrice hideAmount
lastSentAt lastSentVia lastViewedAt
customer { id name email }
items {
product { id name }
description quantity unitPrice
subtotal { value currency { code symbol } }
total { value currency { code symbol } }
taxes {
salesTax { id name }
amount { value currency { code symbol } }
}
}
"#,
r#"
}
}
}
"#
);