-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Removing request-promise/native, replace with node-fetch Bump up node version support to 12 Bump up dependencies versions #47 #48 Fix mutual exclusive for serial number and lot number in Item detail Add APPYMT support, refactor ApPaymentRequest to ApPayment Add ApPaymentRequestDecline to dist folder #44 Fix negative clause for InArray and InString Add sessionTimestamp and sessionTimeout to ClientConfig Add Timesheet approve, decline, update #31
- Loading branch information
1 parent
28aa6b8
commit b76ddae
Showing
92 changed files
with
4,219 additions
and
2,342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
language: node_js | ||
node_js: | ||
- 6 | ||
- 8 | ||
- 10 | ||
- 12 | ||
- 14 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
src/Functions/AccountsPayable/AbstractApPaymentDetailCredit.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/** | ||
* @module Intacct/SDK/Functions/AccountsPayable | ||
*/ | ||
|
||
/** | ||
* Copyright 2020 Sage Intacct, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not | ||
* use this file except in compliance with the License. You may obtain a copy | ||
* of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "LICENSE" file accompanying this file. This file is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
import IaXmlWriter from "../../Xml/IaXmlWriter"; | ||
|
||
export default abstract class AbstractApPaymentDetailCredit { | ||
|
||
public static readonly DEBIT_MEMO = "debit memo"; | ||
|
||
public static readonly NEGATIVE_BILL = "negative bill"; | ||
|
||
public static readonly ADVANCE = "advance"; | ||
|
||
public recordNo: number; | ||
|
||
public lineRecordNo: number; | ||
|
||
public transactionAmount: number; | ||
|
||
public writeXml(xml: IaXmlWriter): void { | ||
xml.writeElement(this.getKeyType(), this.recordNo, true); | ||
xml.writeElement(this.getEntryKeyType(), this.lineRecordNo); | ||
xml.writeElement(this.getTransactionType(), this.transactionAmount); | ||
} | ||
|
||
protected abstract getKeyType(): string; | ||
|
||
protected abstract getEntryKeyType(): string; | ||
|
||
protected abstract getTransactionType(): string; | ||
} |
96 changes: 96 additions & 0 deletions
96
src/Functions/AccountsPayable/AbstractApPaymentFunction.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
/** | ||
* @module Intacct/SDK/Functions/AccountsPayable | ||
*/ | ||
|
||
/** | ||
* Copyright 2020 Sage Intacct, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not | ||
* use this file except in compliance with the License. You may obtain a copy | ||
* of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "LICENSE" file accompanying this file. This file is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
import IntacctException from "../../Exceptions/IntacctException"; | ||
import IaXmlWriter from "../../Xml/IaXmlWriter"; | ||
import AbstractFunction from "../AbstractFunction"; | ||
|
||
export default abstract class AbstractApPaymentFunction extends AbstractFunction { | ||
|
||
public static readonly DELETE = "delete"; | ||
|
||
public static readonly DECLINE = "decline_appaymentrequest"; | ||
|
||
public static readonly CONFIRM = "confirm_appaymentrequest"; | ||
|
||
public static readonly APPROVE = "approve_appaymentrequest"; | ||
|
||
public static readonly SEND = "send_appaymentrequest"; | ||
|
||
public static readonly VOID = "void_appaymentrequest"; | ||
|
||
private recordNo: number; | ||
|
||
constructor(recordNo: number, controlId?: string) { | ||
super(controlId); | ||
this.recordNo = recordNo; | ||
} | ||
|
||
public writeXml(xml: IaXmlWriter): void { | ||
switch (this.getFunction()) { | ||
case AbstractApPaymentFunction.DELETE: | ||
this.writeCrudXml(xml); | ||
break; | ||
case AbstractApPaymentFunction.DECLINE: | ||
case AbstractApPaymentFunction.CONFIRM: | ||
case AbstractApPaymentFunction.APPROVE: | ||
case AbstractApPaymentFunction.SEND: | ||
case AbstractApPaymentFunction.VOID: | ||
this.writeLegacyXml(xml); | ||
break; | ||
default: | ||
throw new IntacctException("Cannot write XML for ApPaymentFunction " + this.getFunction()); | ||
} | ||
} | ||
|
||
protected abstract getFunction(): string; | ||
|
||
private writeCrudXml(xml: IaXmlWriter): void { | ||
|
||
xml.writeStartElement("function"); | ||
xml.writeAttribute("controlid", this.controlId, true); | ||
|
||
xml.writeStartElement(this.getFunction()); | ||
|
||
xml.writeElement("object", "APPYMT"); | ||
xml.writeElement("keys", this.recordNo); | ||
|
||
xml.writeEndElement(); // delete | ||
|
||
xml.writeEndElement(); // function | ||
} | ||
|
||
private writeLegacyXml(xml: IaXmlWriter): void { | ||
|
||
xml.writeStartElement("function"); | ||
xml.writeAttribute("controlid", this.controlId, true); | ||
|
||
xml.writeStartElement(this.getFunction()); | ||
|
||
xml.writeStartElement("appaymentkeys"); | ||
|
||
xml.writeElement("appaymentkey", this.recordNo, true); | ||
|
||
xml.writeEndElement(); // appaymentkeys | ||
|
||
xml.writeEndElement(); // GetFunction | ||
|
||
xml.writeEndElement(); // function | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* @module Intacct/SDK/Functions/AccountsPayable | ||
*/ | ||
|
||
/** | ||
* Copyright 2020 Sage Intacct, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not | ||
* use this file except in compliance with the License. You may obtain a copy | ||
* of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "LICENSE" file accompanying this file. This file is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
import AbstractApPaymentFunction from "./AbstractApPaymentFunction"; | ||
|
||
export default class ApPaymentApprove extends AbstractApPaymentFunction { | ||
constructor(recordNo: number, controlId?: string) { | ||
super(recordNo, controlId); | ||
} | ||
|
||
protected getFunction(): string { | ||
return AbstractApPaymentFunction.APPROVE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* @module Intacct/SDK/Functions/AccountsPayable | ||
*/ | ||
|
||
/** | ||
* Copyright 2020 Sage Intacct, Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"). You may not | ||
* use this file except in compliance with the License. You may obtain a copy | ||
* of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* or in the "LICENSE" file accompanying this file. This file is distributed on | ||
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either | ||
* express or implied. See the License for the specific language governing | ||
* permissions and limitations under the License. | ||
*/ | ||
|
||
import AbstractApPaymentFunction from "./AbstractApPaymentFunction"; | ||
|
||
export default class ApPaymentConfirm extends AbstractApPaymentFunction { | ||
constructor(recordNo: number, controlId?: string) { | ||
super(recordNo, controlId); | ||
} | ||
|
||
protected getFunction(): string { | ||
return AbstractApPaymentFunction.CONFIRM; | ||
} | ||
} |
Oops, something went wrong.