@duffel/api 2.5.3 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DuffelPayments/PaymentIntents/PaymentIntents.d.ts +28 -28
- package/dist/DuffelPayments/PaymentIntents/PaymentIntents.spec.d.ts +1 -1
- package/dist/DuffelPayments/PaymentIntents/PaymentIntentsType.d.ts +112 -112
- package/dist/DuffelPayments/PaymentIntents/index.d.ts +1 -1
- package/dist/DuffelPayments/Refunds/Refunds.d.ts +21 -21
- package/dist/DuffelPayments/Refunds/Refunds.spec.d.ts +1 -1
- package/dist/DuffelPayments/Refunds/RefundsType.d.ts +70 -70
- package/dist/DuffelPayments/Refunds/index.d.ts +1 -1
- package/dist/DuffelPayments/index.d.ts +1 -1
- package/dist/Links/Sessions/Sessions.d.ts +63 -63
- package/dist/Links/Sessions/Sessions.spec.d.ts +1 -1
- package/dist/Links/Sessions/index.d.ts +1 -1
- package/dist/Links/index.d.ts +1 -1
- package/dist/Places/Suggestions/Suggestions.d.ts +42 -42
- package/dist/Places/Suggestions/Suggestions.spec.d.ts +1 -1
- package/dist/Places/Suggestions/SuggestionsType.d.ts +59 -59
- package/dist/Places/Suggestions/index.d.ts +1 -1
- package/dist/Places/index.d.ts +1 -1
- package/dist/Stays/Bookings/Bookings.d.ts +41 -41
- package/dist/Stays/Bookings/Bookings.spec.d.ts +1 -1
- package/dist/Stays/Bookings/index.d.ts +1 -1
- package/dist/Stays/Quotes/Quotes.d.ts +16 -16
- package/dist/Stays/Quotes/Quotes.spec.d.ts +1 -1
- package/dist/Stays/Quotes/index.d.ts +1 -1
- package/dist/Stays/SearchResults/SearchResults.d.ts +16 -16
- package/dist/Stays/SearchResults/SearchResults.spec.d.ts +1 -1
- package/dist/Stays/SearchResults/index.d.ts +1 -1
- package/dist/Stays/Stays.d.ts +22 -22
- package/dist/Stays/Stays.spec.d.ts +1 -1
- package/dist/Stays/StaysTypes.d.ts +454 -454
- package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChanges.d.ts +63 -63
- package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChanges.spec.d.ts +1 -1
- package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChangesTypes.d.ts +57 -57
- package/dist/booking/AirlineInitiatedChanges/index.d.ts +1 -1
- package/dist/booking/OfferRequests/OfferRequests.d.ts +46 -46
- package/dist/booking/OfferRequests/OfferRequests.spec.d.ts +1 -1
- package/dist/booking/OfferRequests/OfferRequestsTypes.d.ts +240 -240
- package/dist/booking/OfferRequests/index.d.ts +1 -1
- package/dist/booking/Offers/OfferTypes.d.ts +495 -495
- package/dist/booking/Offers/Offers.d.ts +53 -53
- package/dist/booking/Offers/Offers.spec.d.ts +1 -1
- package/dist/booking/Offers/index.d.ts +1 -1
- package/dist/booking/OrderCancellations/OrderCancellations.d.ts +41 -41
- package/dist/booking/OrderCancellations/OrderCancellations.spec.d.ts +1 -1
- package/dist/booking/OrderCancellations/OrderCancellationsTypes.d.ts +53 -53
- package/dist/booking/OrderCancellations/index.d.ts +1 -1
- package/dist/booking/OrderChangeOffers/OrderChangeOfferTypes.d.ts +113 -113
- package/dist/booking/OrderChangeOffers/OrderChangeOffers.d.ts +31 -31
- package/dist/booking/OrderChangeOffers/OrderChangeOffers.spec.d.ts +1 -1
- package/dist/booking/OrderChangeOffers/index.d.ts +1 -1
- package/dist/booking/OrderChangeRequests/OrderChangeRequests.d.ts +29 -29
- package/dist/booking/OrderChangeRequests/OrderChangeRequestsTypes.d.ts +141 -141
- package/dist/booking/OrderChangeRequests/OrderRequestChanges.spec.d.ts +1 -1
- package/dist/booking/OrderChangeRequests/index.d.ts +1 -1
- package/dist/booking/OrderChanges/OrderChanges.d.ts +31 -31
- package/dist/booking/OrderChanges/OrderChanges.spec.d.ts +1 -1
- package/dist/booking/OrderChanges/OrderChangesTypes.d.ts +102 -102
- package/dist/booking/OrderChanges/index.d.ts +1 -1
- package/dist/booking/Orders/Orders.d.ts +52 -52
- package/dist/booking/Orders/Orders.spec.d.ts +1 -1
- package/dist/booking/Orders/OrdersTypes.d.ts +500 -500
- package/dist/booking/Orders/index.d.ts +1 -1
- package/dist/booking/PartialOfferRequests/PartialOfferRequestTypes.d.ts +6 -6
- package/dist/booking/PartialOfferRequests/PartialOfferRequests.d.ts +40 -40
- package/dist/booking/PartialOfferRequests/PartialOfferRequests.spec.d.ts +1 -1
- package/dist/booking/PartialOfferRequests/index.d.ts +1 -1
- package/dist/booking/Payments/Payments.d.ts +16 -16
- package/dist/booking/Payments/Payments.spec.d.ts +1 -1
- package/dist/booking/Payments/PaymentsTypes.d.ts +43 -43
- package/dist/booking/Payments/index.d.ts +1 -1
- package/dist/booking/SeatMaps/SeatMapTypes.d.ts +190 -190
- package/dist/booking/SeatMaps/SeatMaps.d.ts +17 -17
- package/dist/booking/SeatMaps/SeatMaps.spec.d.ts +1 -1
- package/dist/booking/SeatMaps/index.d.ts +1 -1
- package/dist/booking/index.d.ts +11 -11
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/dist/notifications/Webhooks/Webhooks.d.ts +51 -51
- package/dist/notifications/Webhooks/Webhooks.spec.d.ts +1 -1
- package/dist/notifications/Webhooks/WebhooksType.d.ts +113 -113
- package/dist/notifications/Webhooks/index.d.ts +1 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/supportingResources/Aircraft/Aircraft.d.ts +30 -30
- package/dist/supportingResources/Aircraft/Aircraft.spec.d.ts +1 -1
- package/dist/supportingResources/Aircraft/AircraftTypes.d.ts +18 -18
- package/dist/supportingResources/Aircraft/index.d.ts +1 -1
- package/dist/supportingResources/Airlines/Airlines.d.ts +29 -29
- package/dist/supportingResources/Airlines/Airlines.spec.d.ts +1 -1
- package/dist/supportingResources/Airlines/AirlinesTypes.d.ts +17 -17
- package/dist/supportingResources/Airlines/index.d.ts +2 -2
- package/dist/supportingResources/Airports/Airports.d.ts +30 -30
- package/dist/supportingResources/Airports/Airports.spec.d.ts +1 -1
- package/dist/supportingResources/Airports/AirportsTypes.d.ts +55 -55
- package/dist/supportingResources/Airports/index.d.ts +2 -2
- package/dist/supportingResources/index.d.ts +3 -3
- package/dist/typings.d.ts +2 -3
- package/package.json +15 -15
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { Resource } from '../../Resource';
|
|
2
|
-
import { CreateOrderChangeRequest, DuffelResponse, OrderChangeRequestResponse } from '../../types';
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* To change an order, you'll need to create an order change request.
|
|
6
|
-
* This is still in PREVIEW mode
|
|
7
|
-
* @export
|
|
8
|
-
* @class OrderChangeRequests
|
|
9
|
-
* @extends {Resource}
|
|
10
|
-
*/
|
|
11
|
-
export declare class OrderChangeRequests extends Resource {
|
|
12
|
-
/**
|
|
13
|
-
* Endpoint path
|
|
14
|
-
*/
|
|
15
|
-
path: string;
|
|
16
|
-
constructor(args: any);
|
|
17
|
-
/**
|
|
18
|
-
* Retrieves an order change request by its ID
|
|
19
|
-
* @param {string} id - The ID of your order change request
|
|
20
|
-
*/
|
|
21
|
-
get: (id: string) => Promise<DuffelResponse<OrderChangeRequestResponse>>;
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* To change flights on an existing paid order, you'll need to create an order change request.
|
|
25
|
-
* @link https://duffel.com/docs/api/order-change-requests/create-order-change-request
|
|
26
|
-
* @memberof OrderChangeRequests
|
|
27
|
-
*/
|
|
28
|
-
create: (options: CreateOrderChangeRequest) => Promise<DuffelResponse<OrderChangeRequestResponse>>;
|
|
29
|
-
}
|
|
1
|
+
import { Resource } from '../../Resource';
|
|
2
|
+
import { CreateOrderChangeRequest, DuffelResponse, OrderChangeRequestResponse } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* To change an order, you'll need to create an order change request.
|
|
6
|
+
* This is still in PREVIEW mode
|
|
7
|
+
* @export
|
|
8
|
+
* @class OrderChangeRequests
|
|
9
|
+
* @extends {Resource}
|
|
10
|
+
*/
|
|
11
|
+
export declare class OrderChangeRequests extends Resource {
|
|
12
|
+
/**
|
|
13
|
+
* Endpoint path
|
|
14
|
+
*/
|
|
15
|
+
path: string;
|
|
16
|
+
constructor(args: any);
|
|
17
|
+
/**
|
|
18
|
+
* Retrieves an order change request by its ID
|
|
19
|
+
* @param {string} id - The ID of your order change request
|
|
20
|
+
*/
|
|
21
|
+
get: (id: string) => Promise<DuffelResponse<OrderChangeRequestResponse>>;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* To change flights on an existing paid order, you'll need to create an order change request.
|
|
25
|
+
* @link https://duffel.com/docs/api/order-change-requests/create-order-change-request
|
|
26
|
+
* @memberof OrderChangeRequests
|
|
27
|
+
*/
|
|
28
|
+
create: (options: CreateOrderChangeRequest) => Promise<DuffelResponse<OrderChangeRequestResponse>>;
|
|
29
|
+
}
|
|
@@ -1,141 +1,141 @@
|
|
|
1
|
-
import { CabinClass, Place } from '../../types';
|
|
2
|
-
import { OrderChangeOfferSlices } from '../OrderChangeOffers/OrderChangeOfferTypes';
|
|
3
|
-
export interface OrderChangeSliceResponse {
|
|
4
|
-
remove: {
|
|
5
|
-
slice_id: string;
|
|
6
|
-
};
|
|
7
|
-
add: {
|
|
8
|
-
/**
|
|
9
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the passengers want to depart
|
|
10
|
-
*/
|
|
11
|
-
departure_date: string;
|
|
12
|
-
/**
|
|
13
|
-
* The city or airport where this slice ends
|
|
14
|
-
*/
|
|
15
|
-
destination: Place;
|
|
16
|
-
/**
|
|
17
|
-
* The city or airport where this slice begins
|
|
18
|
-
*/
|
|
19
|
-
origin: Place;
|
|
20
|
-
/**
|
|
21
|
-
* The cabin that the passengers want to travel in
|
|
22
|
-
*/
|
|
23
|
-
cabin_class: CabinClass;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export interface OrderChangeOffers {
|
|
27
|
-
/**
|
|
28
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer was last updated
|
|
29
|
-
*/
|
|
30
|
-
updated_at: string;
|
|
31
|
-
/**
|
|
32
|
-
* The price of this offer as a change to your existing order, excluding taxes
|
|
33
|
-
*/
|
|
34
|
-
change_total_amount: string | null;
|
|
35
|
-
/**
|
|
36
|
-
* The currency of the `change_total_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
37
|
-
* It will match your organisation's billing currency unless you're using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).
|
|
38
|
-
*/
|
|
39
|
-
change_total_currency: string | null;
|
|
40
|
-
/**
|
|
41
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer was created
|
|
42
|
-
*/
|
|
43
|
-
created_at: string;
|
|
44
|
-
/**
|
|
45
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer will expire and no longer be usable to create an order
|
|
46
|
-
*/
|
|
47
|
-
expires_at: string;
|
|
48
|
-
/**
|
|
49
|
-
* Duffel's unique identifier for the order change offer
|
|
50
|
-
*/
|
|
51
|
-
id: string;
|
|
52
|
-
/**
|
|
53
|
-
* The price of this offer if it was newly purchased, excluding taxes
|
|
54
|
-
*/
|
|
55
|
-
new_total_amount: string | null;
|
|
56
|
-
/**
|
|
57
|
-
* The currency of the `new_total_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. It will match your organisation's billing currency unless you're using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).
|
|
58
|
-
*/
|
|
59
|
-
new_total_currency: string;
|
|
60
|
-
/**
|
|
61
|
-
* The ID for an `order change` if one has already been created from this `order change offer`
|
|
62
|
-
*/
|
|
63
|
-
order_change_id: string;
|
|
64
|
-
/**
|
|
65
|
-
* The penalty price imposed by the airline for making this change
|
|
66
|
-
*/
|
|
67
|
-
penalty_amount: string | null;
|
|
68
|
-
/**
|
|
69
|
-
* The currency of the `penalty_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
70
|
-
* It will match your organisation's billing currency unless you're using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).
|
|
71
|
-
*/
|
|
72
|
-
penalty_currency: string | null;
|
|
73
|
-
/**
|
|
74
|
-
* Where the refund, once confirmed, will be sent. `card` is currently a restricted feature. `awaiting_payment` is for pay later orders where no payment has been made yet.
|
|
75
|
-
*/
|
|
76
|
-
refund_to: 'arc_bsp_cash' | 'balance' | 'card' | 'voucher' | 'awaiting_payment';
|
|
77
|
-
/**
|
|
78
|
-
* The slices within an order change that are being added to and/or removed from the order
|
|
79
|
-
*/
|
|
80
|
-
slices: OrderChangeOfferSlices;
|
|
81
|
-
}
|
|
82
|
-
export interface OrderChangeRequestResponse {
|
|
83
|
-
/**
|
|
84
|
-
* The ID of your order change request
|
|
85
|
-
*/
|
|
86
|
-
id: string;
|
|
87
|
-
/**
|
|
88
|
-
* Whether the order was created in live mode. This field will be set to `true` if the order was created in live mode, or `false` if it was created in test mode.
|
|
89
|
-
*/
|
|
90
|
-
live_mode: boolean;
|
|
91
|
-
/**
|
|
92
|
-
* The list of the offers available to perform change on the order.
|
|
93
|
-
*/
|
|
94
|
-
order_change_offers: OrderChangeOffers[];
|
|
95
|
-
/**
|
|
96
|
-
* The order ID that you want to change
|
|
97
|
-
*/
|
|
98
|
-
order_id: string;
|
|
99
|
-
/**
|
|
100
|
-
* The slices to be added and/or removed
|
|
101
|
-
*/
|
|
102
|
-
slices: OrderChangeSliceResponse;
|
|
103
|
-
}
|
|
104
|
-
export interface CreateOrderChangeRequest {
|
|
105
|
-
/**
|
|
106
|
-
* The [slices](https://duffel.com/docs/api/overview/key-principles) that make up this offer request. One-way journeys can be expressed using one slice, whereas return trips will need two.
|
|
107
|
-
*/
|
|
108
|
-
slices: {
|
|
109
|
-
/**
|
|
110
|
-
* The search criteria for slices which you wish to add to your order
|
|
111
|
-
*/
|
|
112
|
-
add: {
|
|
113
|
-
/**
|
|
114
|
-
* The cabin that the passengers want to travel in
|
|
115
|
-
*/
|
|
116
|
-
cabin_class: CabinClass;
|
|
117
|
-
/**
|
|
118
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the passengers want to depart
|
|
119
|
-
*/
|
|
120
|
-
departure_date: string;
|
|
121
|
-
/**
|
|
122
|
-
* The 3-letter IATA code for the city or airport where this slice ends
|
|
123
|
-
*/
|
|
124
|
-
destination: string;
|
|
125
|
-
/**
|
|
126
|
-
* The 3-letter IATA code for the city or airport where this slice starts
|
|
127
|
-
*/
|
|
128
|
-
origin: string;
|
|
129
|
-
}[];
|
|
130
|
-
/**
|
|
131
|
-
* The slices that you wish to remove from your order
|
|
132
|
-
*/
|
|
133
|
-
remove: {
|
|
134
|
-
slice_id: string;
|
|
135
|
-
}[];
|
|
136
|
-
};
|
|
137
|
-
/**
|
|
138
|
-
* The order ID you wish to change
|
|
139
|
-
*/
|
|
140
|
-
order_id: string;
|
|
141
|
-
}
|
|
1
|
+
import { CabinClass, Place } from '../../types';
|
|
2
|
+
import { OrderChangeOfferSlices } from '../OrderChangeOffers/OrderChangeOfferTypes';
|
|
3
|
+
export interface OrderChangeSliceResponse {
|
|
4
|
+
remove: {
|
|
5
|
+
slice_id: string;
|
|
6
|
+
};
|
|
7
|
+
add: {
|
|
8
|
+
/**
|
|
9
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the passengers want to depart
|
|
10
|
+
*/
|
|
11
|
+
departure_date: string;
|
|
12
|
+
/**
|
|
13
|
+
* The city or airport where this slice ends
|
|
14
|
+
*/
|
|
15
|
+
destination: Place;
|
|
16
|
+
/**
|
|
17
|
+
* The city or airport where this slice begins
|
|
18
|
+
*/
|
|
19
|
+
origin: Place;
|
|
20
|
+
/**
|
|
21
|
+
* The cabin that the passengers want to travel in
|
|
22
|
+
*/
|
|
23
|
+
cabin_class: CabinClass;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export interface OrderChangeOffers {
|
|
27
|
+
/**
|
|
28
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer was last updated
|
|
29
|
+
*/
|
|
30
|
+
updated_at: string;
|
|
31
|
+
/**
|
|
32
|
+
* The price of this offer as a change to your existing order, excluding taxes
|
|
33
|
+
*/
|
|
34
|
+
change_total_amount: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* The currency of the `change_total_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
37
|
+
* It will match your organisation's billing currency unless you're using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).
|
|
38
|
+
*/
|
|
39
|
+
change_total_currency: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer was created
|
|
42
|
+
*/
|
|
43
|
+
created_at: string;
|
|
44
|
+
/**
|
|
45
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer will expire and no longer be usable to create an order
|
|
46
|
+
*/
|
|
47
|
+
expires_at: string;
|
|
48
|
+
/**
|
|
49
|
+
* Duffel's unique identifier for the order change offer
|
|
50
|
+
*/
|
|
51
|
+
id: string;
|
|
52
|
+
/**
|
|
53
|
+
* The price of this offer if it was newly purchased, excluding taxes
|
|
54
|
+
*/
|
|
55
|
+
new_total_amount: string | null;
|
|
56
|
+
/**
|
|
57
|
+
* The currency of the `new_total_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. It will match your organisation's billing currency unless you're using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).
|
|
58
|
+
*/
|
|
59
|
+
new_total_currency: string;
|
|
60
|
+
/**
|
|
61
|
+
* The ID for an `order change` if one has already been created from this `order change offer`
|
|
62
|
+
*/
|
|
63
|
+
order_change_id: string;
|
|
64
|
+
/**
|
|
65
|
+
* The penalty price imposed by the airline for making this change
|
|
66
|
+
*/
|
|
67
|
+
penalty_amount: string | null;
|
|
68
|
+
/**
|
|
69
|
+
* The currency of the `penalty_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
70
|
+
* It will match your organisation's billing currency unless you're using Duffel as an accredited IATA agent, in which case it will be in the currency provided by the airline (which will usually be based on the country where your IATA agency is registered).
|
|
71
|
+
*/
|
|
72
|
+
penalty_currency: string | null;
|
|
73
|
+
/**
|
|
74
|
+
* Where the refund, once confirmed, will be sent. `card` is currently a restricted feature. `awaiting_payment` is for pay later orders where no payment has been made yet.
|
|
75
|
+
*/
|
|
76
|
+
refund_to: 'arc_bsp_cash' | 'balance' | 'card' | 'voucher' | 'awaiting_payment';
|
|
77
|
+
/**
|
|
78
|
+
* The slices within an order change that are being added to and/or removed from the order
|
|
79
|
+
*/
|
|
80
|
+
slices: OrderChangeOfferSlices;
|
|
81
|
+
}
|
|
82
|
+
export interface OrderChangeRequestResponse {
|
|
83
|
+
/**
|
|
84
|
+
* The ID of your order change request
|
|
85
|
+
*/
|
|
86
|
+
id: string;
|
|
87
|
+
/**
|
|
88
|
+
* Whether the order was created in live mode. This field will be set to `true` if the order was created in live mode, or `false` if it was created in test mode.
|
|
89
|
+
*/
|
|
90
|
+
live_mode: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* The list of the offers available to perform change on the order.
|
|
93
|
+
*/
|
|
94
|
+
order_change_offers: OrderChangeOffers[];
|
|
95
|
+
/**
|
|
96
|
+
* The order ID that you want to change
|
|
97
|
+
*/
|
|
98
|
+
order_id: string;
|
|
99
|
+
/**
|
|
100
|
+
* The slices to be added and/or removed
|
|
101
|
+
*/
|
|
102
|
+
slices: OrderChangeSliceResponse;
|
|
103
|
+
}
|
|
104
|
+
export interface CreateOrderChangeRequest {
|
|
105
|
+
/**
|
|
106
|
+
* The [slices](https://duffel.com/docs/api/overview/key-principles) that make up this offer request. One-way journeys can be expressed using one slice, whereas return trips will need two.
|
|
107
|
+
*/
|
|
108
|
+
slices: {
|
|
109
|
+
/**
|
|
110
|
+
* The search criteria for slices which you wish to add to your order
|
|
111
|
+
*/
|
|
112
|
+
add: {
|
|
113
|
+
/**
|
|
114
|
+
* The cabin that the passengers want to travel in
|
|
115
|
+
*/
|
|
116
|
+
cabin_class: CabinClass;
|
|
117
|
+
/**
|
|
118
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the passengers want to depart
|
|
119
|
+
*/
|
|
120
|
+
departure_date: string;
|
|
121
|
+
/**
|
|
122
|
+
* The 3-letter IATA code for the city or airport where this slice ends
|
|
123
|
+
*/
|
|
124
|
+
destination: string;
|
|
125
|
+
/**
|
|
126
|
+
* The 3-letter IATA code for the city or airport where this slice starts
|
|
127
|
+
*/
|
|
128
|
+
origin: string;
|
|
129
|
+
}[];
|
|
130
|
+
/**
|
|
131
|
+
* The slices that you wish to remove from your order
|
|
132
|
+
*/
|
|
133
|
+
remove: {
|
|
134
|
+
slice_id: string;
|
|
135
|
+
}[];
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* The order ID you wish to change
|
|
139
|
+
*/
|
|
140
|
+
order_id: string;
|
|
141
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './OrderChangeRequests';
|
|
1
|
+
export * from './OrderChangeRequests';
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { Resource } from '../../Resource';
|
|
2
|
-
import { ConfirmOrderChangePayment, CreateOrderChangeParameters, DuffelResponse, OrderChangeOfferSlice } from '../../types';
|
|
3
|
-
/**
|
|
4
|
-
* Once you've created an order change request, and you've chosen which slices to add and remove, you'll then want to create an order change.
|
|
5
|
-
*/
|
|
6
|
-
export declare class OrderChanges extends Resource {
|
|
7
|
-
/**
|
|
8
|
-
* Endpoint path
|
|
9
|
-
*/
|
|
10
|
-
path: string;
|
|
11
|
-
constructor(args: any);
|
|
12
|
-
/**
|
|
13
|
-
* To begin the process of changing an order you need to create an order change.
|
|
14
|
-
* The OrderChange will contain the `selected_order_change_offer` reference of the change you wish to make to your order.
|
|
15
|
-
* @link https://duffel.com/docs/api/order-changes/create-order-change
|
|
16
|
-
*/
|
|
17
|
-
create: (options: CreateOrderChangeParameters) => Promise<DuffelResponse<OrderChangeOfferSlice>>;
|
|
18
|
-
/**
|
|
19
|
-
* Retrieves an order change by its ID
|
|
20
|
-
* @param {string} id - Duffel's unique identifier for the order change
|
|
21
|
-
* @link https://duffel.com/docs/api/order-changes/get-order-change-by-id
|
|
22
|
-
*/
|
|
23
|
-
get: (id: string) => Promise<DuffelResponse<OrderChangeOfferSlice>>;
|
|
24
|
-
/**
|
|
25
|
-
* Once you've created a pending order change, you'll know the change_total_amount due for the change.
|
|
26
|
-
* @param {string} id - Duffel's unique identifier for the order change
|
|
27
|
-
* @param {payment} Object - The payment details to use to pay for the order change, if there is an amount to be paid. Some order changes may not need this if they instead refund an amount. In those cases, you can pass any empty object.
|
|
28
|
-
* @link https://duffel.com/docs/api/order-changes/confirm-order-change
|
|
29
|
-
*/
|
|
30
|
-
confirm: (id: string, options: Partial<ConfirmOrderChangePayment>) => Promise<DuffelResponse<OrderChangeOfferSlice>>;
|
|
31
|
-
}
|
|
1
|
+
import { Resource } from '../../Resource';
|
|
2
|
+
import { ConfirmOrderChangePayment, CreateOrderChangeParameters, DuffelResponse, OrderChangeOfferSlice } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Once you've created an order change request, and you've chosen which slices to add and remove, you'll then want to create an order change.
|
|
5
|
+
*/
|
|
6
|
+
export declare class OrderChanges extends Resource {
|
|
7
|
+
/**
|
|
8
|
+
* Endpoint path
|
|
9
|
+
*/
|
|
10
|
+
path: string;
|
|
11
|
+
constructor(args: any);
|
|
12
|
+
/**
|
|
13
|
+
* To begin the process of changing an order you need to create an order change.
|
|
14
|
+
* The OrderChange will contain the `selected_order_change_offer` reference of the change you wish to make to your order.
|
|
15
|
+
* @link https://duffel.com/docs/api/order-changes/create-order-change
|
|
16
|
+
*/
|
|
17
|
+
create: (options: CreateOrderChangeParameters) => Promise<DuffelResponse<OrderChangeOfferSlice>>;
|
|
18
|
+
/**
|
|
19
|
+
* Retrieves an order change by its ID
|
|
20
|
+
* @param {string} id - Duffel's unique identifier for the order change
|
|
21
|
+
* @link https://duffel.com/docs/api/order-changes/get-order-change-by-id
|
|
22
|
+
*/
|
|
23
|
+
get: (id: string) => Promise<DuffelResponse<OrderChangeOfferSlice>>;
|
|
24
|
+
/**
|
|
25
|
+
* Once you've created a pending order change, you'll know the change_total_amount due for the change.
|
|
26
|
+
* @param {string} id - Duffel's unique identifier for the order change
|
|
27
|
+
* @param {payment} Object - The payment details to use to pay for the order change, if there is an amount to be paid. Some order changes may not need this if they instead refund an amount. In those cases, you can pass any empty object.
|
|
28
|
+
* @link https://duffel.com/docs/api/order-changes/confirm-order-change
|
|
29
|
+
*/
|
|
30
|
+
confirm: (id: string, options: Partial<ConfirmOrderChangePayment>) => Promise<DuffelResponse<OrderChangeOfferSlice>>;
|
|
31
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,102 +1,102 @@
|
|
|
1
|
-
import { OrderChangeOfferSlices, PaymentType } from '../../types';
|
|
2
|
-
export interface OrderChange {
|
|
3
|
-
/**
|
|
4
|
-
* The price of this offer as a change to your existing order, excluding taxes
|
|
5
|
-
*/
|
|
6
|
-
change_total_amount: string | null;
|
|
7
|
-
/**
|
|
8
|
-
* The currency of the change_total_amount, as an ISO 4217 currency code.
|
|
9
|
-
* It will match your organisation's billing currency unless you're using Duffel
|
|
10
|
-
* as an accredited IATA agent, in which case it will be in the currency provided
|
|
11
|
-
* by the airline (which will usually be based on the country where your
|
|
12
|
-
* IATA agency is registered).
|
|
13
|
-
*/
|
|
14
|
-
change_total_currency: string | null;
|
|
15
|
-
/**
|
|
16
|
-
* Whether the order was created in live mode. This field will be set to `true`
|
|
17
|
-
* if the order was created in live mode, or `false` if it was created in test mode.
|
|
18
|
-
*/
|
|
19
|
-
live_mode: boolean;
|
|
20
|
-
/**
|
|
21
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer was created
|
|
22
|
-
*/
|
|
23
|
-
created_at: string;
|
|
24
|
-
/**
|
|
25
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime that indicates when the order change was confirmed
|
|
26
|
-
*/
|
|
27
|
-
confirmed_at: string;
|
|
28
|
-
/**
|
|
29
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer will expire
|
|
30
|
-
* and no longer be usable to create an order
|
|
31
|
-
*/
|
|
32
|
-
expires_at: string;
|
|
33
|
-
/**
|
|
34
|
-
* Duffel's unique identifier for the order change offer
|
|
35
|
-
*/
|
|
36
|
-
id: string;
|
|
37
|
-
/**
|
|
38
|
-
* The price of this offer if it was newly purchased, excluding taxes
|
|
39
|
-
*/
|
|
40
|
-
new_total_amount: string | null;
|
|
41
|
-
/**
|
|
42
|
-
* The currency of the new_total_amount, as an ISO 4217 currency code.
|
|
43
|
-
* It will match your organisation's billing currency unless you're using
|
|
44
|
-
* Duffel as an accredited IATA agent, in which case it will be in the
|
|
45
|
-
* currency provided by the airline (which will usually be based on the
|
|
46
|
-
* country where your IATA agency is registered).
|
|
47
|
-
*/
|
|
48
|
-
new_total_currency: string;
|
|
49
|
-
/**
|
|
50
|
-
* Duffel's unique identifier for the order which is being changed
|
|
51
|
-
*/
|
|
52
|
-
order_id: string;
|
|
53
|
-
/**
|
|
54
|
-
* The penalty price imposed by the airline for making this change
|
|
55
|
-
*/
|
|
56
|
-
penalty_amount: string | null;
|
|
57
|
-
/**
|
|
58
|
-
* The currency of the penalty_amount, as an ISO 4217 currency code.
|
|
59
|
-
* It will match your organisation's billing currency unless you're using
|
|
60
|
-
* Duffel as an accredited IATA agent, in which case it will be in the
|
|
61
|
-
* currency provided by the airline (which will usually be based on
|
|
62
|
-
* the country where your IATA agency is registered).
|
|
63
|
-
*/
|
|
64
|
-
penalty_currency: string | null;
|
|
65
|
-
/**
|
|
66
|
-
* Where the refund, once confirmed, will be sent. card is currently a restricted feature.
|
|
67
|
-
* `awaiting_payment` is for pay later orders where no payment has been made yet.
|
|
68
|
-
*/
|
|
69
|
-
refund_to: 'arc_bsp_cash' | 'balance' | 'card' | 'voucher' | 'awaiting_payment' | 'original_form_of_payment';
|
|
70
|
-
/**
|
|
71
|
-
* The slices to be added and/or removed
|
|
72
|
-
*/
|
|
73
|
-
slices: OrderChangeOfferSlices;
|
|
74
|
-
/**
|
|
75
|
-
* The available payment types to complete the order change.
|
|
76
|
-
*/
|
|
77
|
-
available_payment_types?: PaymentType[] | null;
|
|
78
|
-
}
|
|
79
|
-
export interface CreateOrderChangeParameters {
|
|
80
|
-
/**
|
|
81
|
-
* Duffel's unique identifier for the order change offer
|
|
82
|
-
*/
|
|
83
|
-
selected_order_change_offer: string;
|
|
84
|
-
}
|
|
85
|
-
export interface ConfirmOrderChangePayment {
|
|
86
|
-
/**
|
|
87
|
-
* The amount of the payment. This should be the same as the change_total_amount of the order change.
|
|
88
|
-
*/
|
|
89
|
-
amount: string;
|
|
90
|
-
/**
|
|
91
|
-
* The currency of the change_total_amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
92
|
-
*/
|
|
93
|
-
currency: string;
|
|
94
|
-
/**
|
|
95
|
-
* The type of payment you want to use for the Order Change.
|
|
96
|
-
* 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.
|
|
97
|
-
* Otherwise, you must pay using your Duffel account's balance by specifying balance.
|
|
98
|
-
* In test mode, your balance is unlimited.
|
|
99
|
-
* If you're not sure which of these options applies to you, get in touch with the Duffel support team at [help@duffel.com](mailto:help@duffel.com).
|
|
100
|
-
*/
|
|
101
|
-
type: PaymentType;
|
|
102
|
-
}
|
|
1
|
+
import { OrderChangeOfferSlices, PaymentType } from '../../types';
|
|
2
|
+
export interface OrderChange {
|
|
3
|
+
/**
|
|
4
|
+
* The price of this offer as a change to your existing order, excluding taxes
|
|
5
|
+
*/
|
|
6
|
+
change_total_amount: string | null;
|
|
7
|
+
/**
|
|
8
|
+
* The currency of the change_total_amount, as an ISO 4217 currency code.
|
|
9
|
+
* It will match your organisation's billing currency unless you're using Duffel
|
|
10
|
+
* as an accredited IATA agent, in which case it will be in the currency provided
|
|
11
|
+
* by the airline (which will usually be based on the country where your
|
|
12
|
+
* IATA agency is registered).
|
|
13
|
+
*/
|
|
14
|
+
change_total_currency: string | null;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the order was created in live mode. This field will be set to `true`
|
|
17
|
+
* if the order was created in live mode, or `false` if it was created in test mode.
|
|
18
|
+
*/
|
|
19
|
+
live_mode: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer was created
|
|
22
|
+
*/
|
|
23
|
+
created_at: string;
|
|
24
|
+
/**
|
|
25
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime that indicates when the order change was confirmed
|
|
26
|
+
*/
|
|
27
|
+
confirmed_at: string;
|
|
28
|
+
/**
|
|
29
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the offer will expire
|
|
30
|
+
* and no longer be usable to create an order
|
|
31
|
+
*/
|
|
32
|
+
expires_at: string;
|
|
33
|
+
/**
|
|
34
|
+
* Duffel's unique identifier for the order change offer
|
|
35
|
+
*/
|
|
36
|
+
id: string;
|
|
37
|
+
/**
|
|
38
|
+
* The price of this offer if it was newly purchased, excluding taxes
|
|
39
|
+
*/
|
|
40
|
+
new_total_amount: string | null;
|
|
41
|
+
/**
|
|
42
|
+
* The currency of the new_total_amount, as an ISO 4217 currency code.
|
|
43
|
+
* It will match your organisation's billing currency unless you're using
|
|
44
|
+
* Duffel as an accredited IATA agent, in which case it will be in the
|
|
45
|
+
* currency provided by the airline (which will usually be based on the
|
|
46
|
+
* country where your IATA agency is registered).
|
|
47
|
+
*/
|
|
48
|
+
new_total_currency: string;
|
|
49
|
+
/**
|
|
50
|
+
* Duffel's unique identifier for the order which is being changed
|
|
51
|
+
*/
|
|
52
|
+
order_id: string;
|
|
53
|
+
/**
|
|
54
|
+
* The penalty price imposed by the airline for making this change
|
|
55
|
+
*/
|
|
56
|
+
penalty_amount: string | null;
|
|
57
|
+
/**
|
|
58
|
+
* The currency of the penalty_amount, as an ISO 4217 currency code.
|
|
59
|
+
* It will match your organisation's billing currency unless you're using
|
|
60
|
+
* Duffel as an accredited IATA agent, in which case it will be in the
|
|
61
|
+
* currency provided by the airline (which will usually be based on
|
|
62
|
+
* the country where your IATA agency is registered).
|
|
63
|
+
*/
|
|
64
|
+
penalty_currency: string | null;
|
|
65
|
+
/**
|
|
66
|
+
* Where the refund, once confirmed, will be sent. card is currently a restricted feature.
|
|
67
|
+
* `awaiting_payment` is for pay later orders where no payment has been made yet.
|
|
68
|
+
*/
|
|
69
|
+
refund_to: 'arc_bsp_cash' | 'balance' | 'card' | 'voucher' | 'awaiting_payment' | 'original_form_of_payment';
|
|
70
|
+
/**
|
|
71
|
+
* The slices to be added and/or removed
|
|
72
|
+
*/
|
|
73
|
+
slices: OrderChangeOfferSlices;
|
|
74
|
+
/**
|
|
75
|
+
* The available payment types to complete the order change.
|
|
76
|
+
*/
|
|
77
|
+
available_payment_types?: PaymentType[] | null;
|
|
78
|
+
}
|
|
79
|
+
export interface CreateOrderChangeParameters {
|
|
80
|
+
/**
|
|
81
|
+
* Duffel's unique identifier for the order change offer
|
|
82
|
+
*/
|
|
83
|
+
selected_order_change_offer: string;
|
|
84
|
+
}
|
|
85
|
+
export interface ConfirmOrderChangePayment {
|
|
86
|
+
/**
|
|
87
|
+
* The amount of the payment. This should be the same as the change_total_amount of the order change.
|
|
88
|
+
*/
|
|
89
|
+
amount: string;
|
|
90
|
+
/**
|
|
91
|
+
* The currency of the change_total_amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
92
|
+
*/
|
|
93
|
+
currency: string;
|
|
94
|
+
/**
|
|
95
|
+
* The type of payment you want to use for the Order Change.
|
|
96
|
+
* 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.
|
|
97
|
+
* Otherwise, you must pay using your Duffel account's balance by specifying balance.
|
|
98
|
+
* In test mode, your balance is unlimited.
|
|
99
|
+
* If you're not sure which of these options applies to you, get in touch with the Duffel support team at [help@duffel.com](mailto:help@duffel.com).
|
|
100
|
+
*/
|
|
101
|
+
type: PaymentType;
|
|
102
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './OrderChanges';
|
|
1
|
+
export * from './OrderChanges';
|