Skip to content

Commit 8ae629a

Browse files
authored
Merge pull request #1069 from duffelhq/andreja/tsp-460-fix-typing-error-in-js-sdk-for-order-change-payment-type
fix: order change type
2 parents 43abc8f + 3c10309 commit 8ae629a

File tree

1 file changed

+28
-18
lines changed

1 file changed

+28
-18
lines changed

src/booking/OrderChanges/OrderChangesTypes.ts

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -102,22 +102,32 @@ export interface CreateOrderChangeParameters {
102102
}
103103

104104
export interface ConfirmOrderChangePayment {
105-
/**
106-
* The amount of the payment. This should be the same as the change_total_amount of the order change.
107-
*/
108-
109-
amount: string
110-
/**
111-
* The currency of the change_total_amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
112-
*/
113-
currency: string
114-
115-
/**
116-
* The type of payment you want to use for the Order Change.
117-
* If you are an IATA agent with your own agreements with airlines, in some cases, you can pay using ARC/BSP cash by specifying arc_bsp_cash.
118-
* Otherwise, you must pay using your Duffel account's balance by specifying balance.
119-
* In test mode, your balance is unlimited.
120-
* If you're not sure which of these options applies to you, get in touch with the Duffel support team at [[email protected]](mailto:[email protected]).
121-
*/
122-
type: PaymentType
105+
/** The payment details to use to pay for the order change, if there is an amount to be paid.
106+
* Some order changes may not need this.
107+
* If the change_total_amount is zero or negative, there is no need to pass a payment object. */
108+
payment?: {
109+
/**
110+
* The amount of the payment. This should be the same as the change_total_amount of the order change.
111+
*/
112+
113+
amount: string
114+
/**
115+
* The currency of the change_total_amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
116+
*/
117+
currency: string
118+
119+
/**
120+
* The type of payment you want to use for the Order Change.
121+
* If you are an IATA agent with your own agreements with airlines, in some cases, you can pay using ARC/BSP cash by specifying arc_bsp_cash.
122+
* Otherwise, you must pay using your Duffel account's balance by specifying balance.
123+
* In test mode, your balance is unlimited.
124+
* If you're not sure which of these options applies to you, get in touch with the Duffel support team at [[email protected]](mailto:[email protected]).
125+
*/
126+
type: PaymentType | 'card'
127+
128+
/**
129+
* The id of the 3DSecure Session ID. This is the autentication when paying by card.
130+
*/
131+
three_d_secure_session_id?: string
132+
}
123133
}

0 commit comments

Comments
 (0)