Skip to content

Commit 40297f4

Browse files
authored
Update authorization attribute types to match docs (#294)
1 parent e9b57e1 commit 40297f4

File tree

1 file changed

+41
-3
lines changed

1 file changed

+41
-3
lines changed

types/authorization.ts

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Merchant, Relationship, UnimplementedRelationships } from "./common"
1+
import { CardNetwork, Merchant, Relationship, Tags, UnimplementedRelationships } from "./common"
22

33
export type AuthorizationStatus = "Authorized" | "Completed" | "Canceled" | "Declined"
44

@@ -38,16 +38,54 @@ export interface Authorization {
3838
status: AuthorizationStatus
3939

4040
/**
41-
* Optional. The reason the authorization was declined. Available only when status is Declined
41+
* Optional. The reason the authorization was declined. Available only when status is Declined.
4242
*/
4343
declineReason?: string
4444

4545
merchant: Merchant
4646

4747
/**
48-
* Indicates whether the authorization is recurring
48+
* Indicates whether the authorization is recurring.
4949
*/
5050
recurring: boolean
51+
52+
/**
53+
* Optional. The payment method used, one of: Manual, Swipe, Contactless, ChipAndPin, Stored, Other.
54+
*/
55+
paymentMethod?: string
56+
57+
/**
58+
* Optional. The type of digital wallet used, one of: Google, Apple, Other.
59+
*/
60+
digitalWallet?: string
61+
62+
/**
63+
* Optional. The verification method used, one of: Address, CVV2, AddressAndCVV2.
64+
*/
65+
cardVerificationData?: {
66+
verificationMethod?: string
67+
}
68+
69+
/**
70+
* Optional. The card network used, one of: Visa, Interlink, Accel, Allpoint, Other.
71+
*/
72+
cardNetwork?: CardNetwork
73+
74+
/**
75+
* See [Tags](https://developers.unit.co/#tags).
76+
* Inherited from the payment tags (see [Tag Inheritance](https://developers.unit.co/#tag-inheritance)).
77+
*/
78+
tags?: Tags
79+
80+
/**
81+
* Optional. Cash withdrawal amount.
82+
*/
83+
cashWithdrawalAmount?: number
84+
85+
/**
86+
* Optional. Summary of the authorization.
87+
*/
88+
summary?: string
5189
}
5290

5391
/**

0 commit comments

Comments
 (0)