|
| 1 | +<?php |
| 2 | + |
| 3 | + |
| 4 | +namespace Amritms\WaveappsClientPhp\GraphQL; |
| 5 | + |
| 6 | + |
| 7 | +class Mutation |
| 8 | +{ |
| 9 | + public static function customerCreate() |
| 10 | + { |
| 11 | + return <<<GQL |
| 12 | +mutation CustomerCreateInput(\$input: CustomerCreateInput!) { customerCreate(input: \$input) { customer { id name firstName lastName displayId email mobile phone fax website address { addressLine1 addressLine2 city country { code name } postalCode } createdAt modifiedAt } didSucceed inputErrors { path message code } } } |
| 13 | +GQL; |
| 14 | + } |
| 15 | + |
| 16 | + public static function customerPatch() |
| 17 | + { |
| 18 | + return <<<GQL |
| 19 | +mutation CustomerPatchInput(\$input: CustomerPatchInput!) { customerPatch(input: \$input) { customer { id name firstName lastName address { addressLine1 addressLine2 city country { code } postalCode } displayId email mobile phone fax tollFree website internalNotes currency { code } shippingDetails { name address { addressLine1 addressLine2 city country { code } postalCode } phone instructions } } didSucceed inputErrors { message path code } } } |
| 20 | +GQL; |
| 21 | + } |
| 22 | + |
| 23 | + public static function customerDelete() |
| 24 | + { |
| 25 | + return <<<GQL |
| 26 | +mutation CustomerDeleteInput(\$input: CustomerDeleteInput!) { customerDelete(input: \$input) { didSucceed inputErrors { message path code } } } |
| 27 | +GQL; |
| 28 | + } |
| 29 | + |
| 30 | + public static function accountCreate() |
| 31 | + { |
| 32 | + return <<<GQL |
| 33 | +mutation AccountCreateInput(\$input: AccountCreateInput!) { accountCreate(input: \$input) { account { id name description displayId currency { code } type { name normalBalanceType value } subtype { name value type { name normalBalanceType value } } normalBalanceType isArchived sequence } didSucceed inputErrors { path message code } } } |
| 34 | +GQL; |
| 35 | + } |
| 36 | + |
| 37 | + public static function accountPatch() |
| 38 | + { |
| 39 | + return <<<GQL |
| 40 | +mutation AccountPatchInput(\$input: AccountPatchInput!) { accountPatch(input: \$input) { account { id name description displayId currency { code } type { name normalBalanceType value } subtype { name value type { name normalBalanceType value } } normalBalanceType isArchived sequence } didSucceed inputErrors { path message code } } } |
| 41 | +GQL; |
| 42 | + } |
| 43 | + |
| 44 | + public static function accountArchive() |
| 45 | + { |
| 46 | + return <<<GQL |
| 47 | +mutation AccountArchiveInput(\$input: AccountArchiveInput!) { accountArchive(input: \$input) { didSucceed inputErrors { path message code } } } |
| 48 | +GQL; |
| 49 | + } |
| 50 | + |
| 51 | + public static function productCreate() |
| 52 | + { |
| 53 | + return <<<GQL |
| 54 | +mutation ProductCreateInput(\$input: ProductCreateInput!) { productCreate(input: \$input) { product { id name description unitPrice isSold isBought isArchived createdAt modifiedAt } } } |
| 55 | +GQL; |
| 56 | + } |
| 57 | + |
| 58 | + public static function productPatch() |
| 59 | + { |
| 60 | + return <<<GQL |
| 61 | +mutation ProductPatchInput(\$input: ProductPatchInput!) { productPatch(input: \$input) { product { id name description unitPrice isSold isBought isArchived createdAt modifiedAt } didSucceed inputErrors { message path code } } } |
| 62 | +GQL; |
| 63 | + } |
| 64 | + |
| 65 | + public static function productArchive() |
| 66 | + { |
| 67 | + return <<<GQL |
| 68 | +mutation ProductArchiveInput(\$input: ProductArchiveInput!) { productArchive(input: \$input) { product { id name description unitPrice isSold isBought isArchived createdAt modifiedAt } didSucceed inputErrors { path message code } } } |
| 69 | +GQL; |
| 70 | + } |
| 71 | + |
| 72 | + public static function salesTaxCreate() |
| 73 | + { |
| 74 | + return <<<GQL |
| 75 | +mutation SalesTaxCreateInput(\$input: SalesTaxCreateInput!) { salesTaxCreate(input: \$input) { salesTax { id name abbreviation description taxNumber showTaxNumberOnInvoices rate rates { effective rate } isCompound isRecoverable isArchived createdAt modifiedAt } didSucceed inputErrors { path message code } } } |
| 76 | +GQL; |
| 77 | + } |
| 78 | + |
| 79 | + public static function salesTaxPatch() |
| 80 | + { |
| 81 | + return <<<GQL |
| 82 | +mutation SalesTaxPatchInput(\$input: SalesTaxPatchInput!) { salesTaxPatch(input: \$input) { salesTax { id name abbreviation description taxNumber showTaxNumberOnInvoices rate rates { effective rate } isCompound isRecoverable isArchived createdAt modifiedAt } didSucceed inputErrors { path message code } } } |
| 83 | +GQL; |
| 84 | + } |
| 85 | + |
| 86 | + public static function salesTaxArchive() |
| 87 | + { |
| 88 | + return <<<GQL |
| 89 | +mutation SalesTaxArchiveInput(\$input: SalesTaxArchiveInput!) { salesTaxArchive(input: \$input) { salesTax { id name abbreviation description taxNumber showTaxNumberOnInvoices rate rates { effective rate } isCompound isRecoverable isArchived createdAt modifiedAt } didSucceed inputErrors { path message code } } } |
| 90 | +GQL; |
| 91 | + } |
| 92 | + |
| 93 | + public static function salesTaxRateCreate() |
| 94 | + { |
| 95 | + return <<<GQL |
| 96 | +mutation SalesTaxRateCreateInput(\$input: SalesTaxRateCreateInput!) { salesTaxRateCreate(input: \$input) { didSucceed inputErrors { path message code } } } |
| 97 | +GQL; |
| 98 | + } |
| 99 | + |
| 100 | + public static function moneyTransactionCreate() |
| 101 | + { |
| 102 | + return <<<GQL |
| 103 | +mutation MoneyTransactionCreateInput(\$input: MoneyTransactionCreateInput!) { moneyTransactionCreate(input: \$input) { transaction { id } didSucceed inputErrors { path message code } } } |
| 104 | +GQL; |
| 105 | + |
| 106 | + } |
| 107 | + |
| 108 | + public static function invoiceCreate() |
| 109 | + { |
| 110 | + return <<<GQL |
| 111 | +mutation InvoiceCreateInput(\$input: InvoiceCreateInput!) { invoiceCreate(input: \$input) { didSucceed inputErrors { path message code } invoice { id createdAt modifiedAt pdfUrl viewUrl status title invoiceNumber invoiceDate }} } |
| 112 | +GQL; |
| 113 | + } |
| 114 | + |
| 115 | + public static function invoiceDelete() |
| 116 | + { |
| 117 | + return <<<GQL |
| 118 | +mutation InvoiceDeleteInput(\$input: InvoiceDeleteInput!) { invoiceDelete(input: \$input) { didSucceed inputErrors { path message code } } } |
| 119 | +GQL; |
| 120 | + } |
| 121 | + |
| 122 | + public static function invoiceSend() |
| 123 | + { |
| 124 | + return <<<GQL |
| 125 | +mutation InvoiceSendInput(\$input: InvoiceSendInput!) { invoiceSend(input: \$input) { didSucceed inputErrors { path message code } } } |
| 126 | +GQL; |
| 127 | + } |
| 128 | + |
| 129 | + public static function invoiceApprove() |
| 130 | + { |
| 131 | + return <<<GQL |
| 132 | +mutation InvoiceApproveInput(\$input: InvoiceApproveInput!) { invoiceApprove(input: \$input) { didSucceed inputErrors { path message code } invoice { id createdAt modifiedAt source { __typename } pdfUrl viewUrl status title invoiceNumber invoiceDate } } } |
| 133 | +GQL; |
| 134 | + } |
| 135 | + |
| 136 | + public static function invoiceMarkSent() |
| 137 | + { |
| 138 | + return <<<GQL |
| 139 | +mutation InvoiceMarkSentInput(\$input: InvoiceMarkSentInput!) { invoiceMarkSent(input: \$input) { invoice { id createdAt modifiedAt source { __typename } pdfUrl viewUrl status title subhead invoiceNumber poNumber invoiceDate dueDate amountDue { raw value currency { code symbol name plural exponent } } amountPaid { raw value currency { code symbol name plural exponent } } taxTotal { raw value currency { code symbol name plural exponent } } total { raw value currency { code symbol name plural exponent } } items { description quantity price subtotal { raw value currency { code symbol name plural exponent } } total { raw value currency { code symbol name plural exponent } } taxes { amount { raw value currency { code symbol name plural exponent } } rate salesTax { business { id name } id name abbreviation description taxNumber showTaxNumberOnInvoices rate rates { effective rate } isCompound isRecoverable isArchived createdAt modifiedAt } } normalBalanceType isArchived sequence } product { business { id name } incomeAccount { business { id name } id name description displayId currency { code symbol name plural exponent } type { name normalBalanceType value } subtype { name value type { name normalBalanceType value } } normalBalanceType isArchived sequence } expenseAccount { business { id name } id name description displayId currency { code symbol name plural exponent } type { name normalBalanceType value } subtype { name value type { name normalBalanceType value } } normalBalanceType isArchived sequence } id name description unitPrice isSold isBought isArchived createdAt modifiedAt } } memo footer disableCreditCardPayments disableBankPayments disableAmexPayments itemTitle unitTitle priceTitle amountTitle hideName hideDescription hideUnit hidePrice hideAmount lastSentAt lastSentVia lastViewedAt customer { business { id name } id name address { addressLine1 addressLine2 city country { code name currency { code symbol name plural exponent } nameWithArticle } postalCode } firstName lastName displayId email mobile phone fax tollFree website internalNotes currency { code symbol name plural exponent } shippingDetails { name address { addressLine1 addressLine2 city country { code name currency { code symbol name plural exponent } nameWithArticle } postalCode } phone instructions } createdAt modifiedAt } } didSucceed inputErrors { path message code } } } |
| 140 | +GQL; |
| 141 | + } |
| 142 | +} |
0 commit comments