Skip to content

Commit 6097ff6

Browse files
authored
Merge pull request #519 from unit-finance/version-bump-1.3.3
Version 1.3.3
2 parents 328d22b + 9a342ff commit 6097ff6

File tree

8 files changed

+82
-11
lines changed

8 files changed

+82
-11
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@unit-finance/unit-node-sdk",
3-
"version": "1.3.2",
3+
"version": "1.3.3",
44
"description": "",
55
"main": "dist/unit.js",
66
"types": "dist/unit.d.ts",

resources/receivedPayments.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ export class ReceivedPayments extends BaseResource {
1818
return this.httpPost<UnitResponse<AchReceivedPayment>>(`/${id}/advance`)
1919
}
2020

21+
public async reprocess(id: string): Promise<UnitResponse<AchReceivedPayment>> {
22+
return this.httpPost<UnitResponse<AchReceivedPayment>>(`/${id}/reprocess`)
23+
}
24+
2125
/**
2226
* @param include
2327
* Optional. A comma-separated list of related resources to include in the response.

tests/applications.spec.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
import { createAddress, createFullName, createPhone } from "../helpers"
42
import {
53
Agent,

tests/statements.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ const statementId: string[] = []
77

88
describe("Statements List", () => {
99
test("Get Statements List", async () => {
10-
const params: StatementsListParams = { limit: 50 }
10+
const params: StatementsListParams = { limit: 35 }
1111
const res = await unit.statements.list(params)
1212
expect(res.data.length).toBeGreaterThan(0)
1313
res.data.forEach(element => {
1414
if(element.relationships.customer){
1515
statementId.push(element.id)
1616
}
1717
})
18-
})
18+
}, 120000)
1919
})
2020

2121
describe("Get Statement Test", () => {

tests/testHelpers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ export function createBusinessApplication(unit: Unit) {
7777
contact: createBusinessContact(createFullName("Jone", "Doe"), "[email protected]", createPhone("1", "2025550108")),
7878
beneficialOwners: [
7979
createBeneficialOwner(null, createFullName("James", "Smith"), "574567625", null, null, "2012-04-05",
80-
createAddress("650 Allerton Street", null, "Redwood City", "CA", "94063", "US"), createPhone("1", "2025550127"), "[email protected]", null),
80+
createAddress("650 Allerton Street", null, "Redwood City", "CA", "94063", "US"), createPhone("1", "2025550127"), "[email protected]", 60),
8181
createBeneficialOwner(null, createFullName("Richard", "Hendricks"), "574572795", null, null, "2012-04-03",
82-
createAddress("470 Allerton Street", null, "Redwood City", "CA", "94063", "US"), createPhone("1", "2025550158"), "[email protected]", null)
82+
createAddress("470 Allerton Street", null, "Redwood City", "CA", "94063", "US"), createPhone("1", "2025550158"), "[email protected]", 40)
8383
],
8484
businessVertical: "Construction",
8585
yearOfIncorporation: "1999"

types/payments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ export interface WirePayment {
204204
relationships: BasePaymentRelationships
205205
}
206206

207-
export type ReceivedPaymentStatus = "Pending" | "Advanced" | "Completed" | "Returned"
207+
export type ReceivedPaymentStatus = "Pending" | "PendingReview" | "MarkedForReturn" | "Advanced" | "Completed" | "Returned"
208208

209209
export interface AchReceivedPayment {
210210
/**

types/transactions.ts

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Address, CardNetwork, Coordinates, Counterparty, CurrencyConversion, Direction, Merchant, Relationship, RelationshipsArray, RichMerchantData, Tags, UnimplementedFields } from "./common"
22

33
export type Transaction = OriginatedAchTransaction | ReceivedAchTransaction | ReturnedAchTransaction | ReturnedReceivedAchTransaction | DishonoredAchTransaction | BookTransaction | PurchaseTransaction | AtmTransaction | FeeTransaction | FeeReversalTransaction |
4-
CardReversalTransaction | CardTransaction | WireTransaction | ReleaseTransaction | AdjustmentTransaction | InterestTransaction | DisputeTransaction | CheckDepositTransaction | CheckPaymentTransaction | ReturnedCheckDepositTransaction | PaymentAdvanceTransaction |
4+
CardReversalTransaction | CardTransaction | WireTransaction | ReturnedWireTransaction | ReleaseTransaction | AdjustmentTransaction | InterestTransaction | DisputeTransaction | CheckDepositTransaction | CheckPaymentTransaction | ReturnedCheckDepositTransaction | ReturnedCheckPaymentTransaction | PaymentAdvanceTransaction |
55
RepaidPaymentAdvanceTransaction | PaymentCanceledTransaction | RewardTransaction | NegativeBalanceCoverageTransaction | PushToCardTransaction | AccountLowBalanceClosureTransaction | BankRepaymentTransaction
66

77
export interface BaseTransaction {
@@ -500,6 +500,11 @@ export type AtmTransaction = BaseTransaction & {
500500
* The debit card involved in the transaction.
501501
*/
502502
card: Relationship
503+
504+
/**
505+
* Optional. The [Authorization](https://developers.unit.co/#authorization) request made by the merchant, if present (see [Authorizations](https://developers.unit.co/#authorizations)).
506+
*/
507+
authorization?: Relationship
503508
}
504509
}
505510

@@ -662,6 +667,43 @@ export type WireTransaction = BaseTransaction & {
662667
}
663668
}
664669

670+
export type ReturnedWireTransaction = BaseTransaction & {
671+
/**
672+
* Type of the transaction resource. The value is always returnedWireTransaction.
673+
*/
674+
type: "returnedWireTransaction"
675+
676+
/**
677+
* JSON object representing the transaction data.
678+
*/
679+
attributes: {
680+
/**
681+
* The reason for the return.
682+
*/
683+
reason: string
684+
685+
/**
686+
* Input Message Accountability Data. It's a unique number given to each FedWire payment in case of payment has been sent and fully processed.
687+
*/
688+
imad: string
689+
690+
/**
691+
* Optional. Output Message Accountability Data. It's a unique number given to each FedWire payment in case of payment has been sent and fully processed.
692+
*/
693+
omad?: string
694+
}
695+
696+
/**
697+
* Describes relationships between the transaction resource and other resources (account and customer).
698+
*/
699+
relationships: {
700+
/**
701+
* The payment belonging to this transaction.
702+
*/
703+
payment: Relationship
704+
}
705+
}
706+
665707
export type ReleaseTransaction = BaseTransaction & {
666708
/**
667709
* Type of the transaction resource. The value is always releaseTransaction.
@@ -813,6 +855,33 @@ export type ReturnedCheckDepositTransaction = BaseTransaction & {
813855
}
814856
}
815857

858+
export type ReturnedCheckPaymentTransaction = BaseTransaction & {
859+
/**
860+
* Type of the transaction resource. The value is always returnedCheckPaymentTransaction.
861+
*/
862+
type: "returnedCheckPaymentTransaction"
863+
864+
/**
865+
* JSON object representing the transaction data.
866+
*/
867+
attributes: {
868+
/**
869+
* The reason for the transaction return. This is a replacement to the deprecated `reason` attribute.
870+
*/
871+
returnReason: string
872+
}
873+
874+
/**
875+
* Describes relationships between the transaction resource and other resources (account, customer, checkDeposit).
876+
*/
877+
relationships: {
878+
/**
879+
* The [Check Payment](https://developers.unit.co/resources/#transaction-check-payment) the transaction is related to.
880+
*/
881+
checkPayment: Relationship
882+
}
883+
}
884+
816885
export type PaymentAdvanceTransaction = BaseTransaction & {
817886
/**
818887
* Type of the transaction resource. The value is always paymentAdvanceTransaction.

0 commit comments

Comments
 (0)