@duffel/api 2.5.2 → 2.5.4
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 +6 -7
- package/package.json +15 -15
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { Client } from 'Client';
|
|
2
|
-
import { Resource } from '../../Resource';
|
|
3
|
-
import { DuffelResponse, ListOffersParams, Offer, LoyaltyProgrammeAccounts, UpdateOffer } from '../../types';
|
|
4
|
-
interface UpdateOfferBodyParameters {
|
|
5
|
-
loyalty_programme_accounts: LoyaltyProgrammeAccounts[];
|
|
6
|
-
given_name: string;
|
|
7
|
-
family_name: string;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Each offer represents flights you can buy from an airline at a particular price that meet your search criteria.
|
|
11
|
-
* @class
|
|
12
|
-
* @link https://duffel.com/docs/api/offers
|
|
13
|
-
*/
|
|
14
|
-
export declare class Offers extends Resource {
|
|
15
|
-
/**
|
|
16
|
-
* Endpoint path
|
|
17
|
-
*/
|
|
18
|
-
path: string;
|
|
19
|
-
constructor(client: Client);
|
|
20
|
-
/**
|
|
21
|
-
* Retrieves an offer by its ID
|
|
22
|
-
* @param {string} id - Duffel's unique identifier for the offer
|
|
23
|
-
* @param {string} return_available_services - When set to true, the offer resource returned will include all the available_services returned by the airline. If set to false, the offer resource won't include any available_services.
|
|
24
|
-
* @link https:/duffel.com/docs/api/offers/get-offer-by-id
|
|
25
|
-
*/
|
|
26
|
-
get: (id: string, params?: {
|
|
27
|
-
return_available_services: boolean;
|
|
28
|
-
}) => Promise<DuffelResponse<Offer>>;
|
|
29
|
-
/**
|
|
30
|
-
* Retrieves a page of offers. The results may be returned in any order.
|
|
31
|
-
* @param {Object.<ListOffersParams>} params - Endpoint options (optional: limit, after, before, max_connections, sort)
|
|
32
|
-
* @param {string} params.offer_request_id - Duffel's unique identifier for the offer request, returned when it was created
|
|
33
|
-
* @link https://duffel.com/docs/api/offers/get-offers
|
|
34
|
-
*/
|
|
35
|
-
list: ({ offer_request_id, ...params }: ListOffersParams) => Promise<DuffelResponse<Offer[]>>;
|
|
36
|
-
/**
|
|
37
|
-
* Retrieves a generator of all offers. The results may be returned in any order.
|
|
38
|
-
* @param {Object.<ListOffersParams>} params - Endpoint options (optional: limit, after, before, max_connections, sort)
|
|
39
|
-
* @param {string} params.offer_request_id - Duffel's unique identifier for the offer request, returned when it was created
|
|
40
|
-
* @link https://duffel.com/docs/api/offers/get-offers
|
|
41
|
-
*/
|
|
42
|
-
listWithGenerator: ({ offer_request_id, ...params }: ListOffersParams) => AsyncGenerator<DuffelResponse<Offer>, void, unknown>;
|
|
43
|
-
/**
|
|
44
|
-
* Some offer passenger fields are updateable. Each field that can be updated is detailed in the request object.
|
|
45
|
-
* @param {string} offerId - Duffel's unique identifier for the offer
|
|
46
|
-
* @param {string} passengerId - The identifier for the passenger. This ID will be generated by Duffel
|
|
47
|
-
* @param {string} params.family_name - The passenger's family name. Only space, -, ', and letters from the ASCII, Latin-1 Supplement and Latin Extended-A (with the exceptions of Æ, æ, IJ, ij, Œ, œ, Þ, and ð) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters.
|
|
48
|
-
* @param {string} params.given_name - The passenger's given name. Only space, -, ', and letters from the ASCII, Latin-1 Supplement and Latin Extended-A (with the exceptions of Æ, æ, IJ, ij, Œ, œ, Þ, and ð) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters.
|
|
49
|
-
* @param {Object.<LoyaltyProgrammeAccounts>} params.loyalty_programme_accounts - The Loyalty Programme Accounts for this passenger
|
|
50
|
-
*/
|
|
51
|
-
update: (offerId: string, passengerId: string, params: UpdateOfferBodyParameters) => Promise<DuffelResponse<UpdateOffer>>;
|
|
52
|
-
}
|
|
53
|
-
export {};
|
|
1
|
+
import { Client } from '../../Client';
|
|
2
|
+
import { Resource } from '../../Resource';
|
|
3
|
+
import { DuffelResponse, ListOffersParams, Offer, LoyaltyProgrammeAccounts, UpdateOffer } from '../../types';
|
|
4
|
+
interface UpdateOfferBodyParameters {
|
|
5
|
+
loyalty_programme_accounts: LoyaltyProgrammeAccounts[];
|
|
6
|
+
given_name: string;
|
|
7
|
+
family_name: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Each offer represents flights you can buy from an airline at a particular price that meet your search criteria.
|
|
11
|
+
* @class
|
|
12
|
+
* @link https://duffel.com/docs/api/offers
|
|
13
|
+
*/
|
|
14
|
+
export declare class Offers extends Resource {
|
|
15
|
+
/**
|
|
16
|
+
* Endpoint path
|
|
17
|
+
*/
|
|
18
|
+
path: string;
|
|
19
|
+
constructor(client: Client);
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves an offer by its ID
|
|
22
|
+
* @param {string} id - Duffel's unique identifier for the offer
|
|
23
|
+
* @param {string} return_available_services - When set to true, the offer resource returned will include all the available_services returned by the airline. If set to false, the offer resource won't include any available_services.
|
|
24
|
+
* @link https:/duffel.com/docs/api/offers/get-offer-by-id
|
|
25
|
+
*/
|
|
26
|
+
get: (id: string, params?: {
|
|
27
|
+
return_available_services: boolean;
|
|
28
|
+
}) => Promise<DuffelResponse<Offer>>;
|
|
29
|
+
/**
|
|
30
|
+
* Retrieves a page of offers. The results may be returned in any order.
|
|
31
|
+
* @param {Object.<ListOffersParams>} params - Endpoint options (optional: limit, after, before, max_connections, sort)
|
|
32
|
+
* @param {string} params.offer_request_id - Duffel's unique identifier for the offer request, returned when it was created
|
|
33
|
+
* @link https://duffel.com/docs/api/offers/get-offers
|
|
34
|
+
*/
|
|
35
|
+
list: ({ offer_request_id, ...params }: ListOffersParams) => Promise<DuffelResponse<Offer[]>>;
|
|
36
|
+
/**
|
|
37
|
+
* Retrieves a generator of all offers. The results may be returned in any order.
|
|
38
|
+
* @param {Object.<ListOffersParams>} params - Endpoint options (optional: limit, after, before, max_connections, sort)
|
|
39
|
+
* @param {string} params.offer_request_id - Duffel's unique identifier for the offer request, returned when it was created
|
|
40
|
+
* @link https://duffel.com/docs/api/offers/get-offers
|
|
41
|
+
*/
|
|
42
|
+
listWithGenerator: ({ offer_request_id, ...params }: ListOffersParams) => AsyncGenerator<DuffelResponse<Offer>, void, unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Some offer passenger fields are updateable. Each field that can be updated is detailed in the request object.
|
|
45
|
+
* @param {string} offerId - Duffel's unique identifier for the offer
|
|
46
|
+
* @param {string} passengerId - The identifier for the passenger. This ID will be generated by Duffel
|
|
47
|
+
* @param {string} params.family_name - The passenger's family name. Only space, -, ', and letters from the ASCII, Latin-1 Supplement and Latin Extended-A (with the exceptions of Æ, æ, IJ, ij, Œ, œ, Þ, and ð) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters.
|
|
48
|
+
* @param {string} params.given_name - The passenger's given name. Only space, -, ', and letters from the ASCII, Latin-1 Supplement and Latin Extended-A (with the exceptions of Æ, æ, IJ, ij, Œ, œ, Þ, and ð) Unicode charts are accepted. All other characters will result in a validation error. The minimum length is 1 character, and the maximum is 20 characters.
|
|
49
|
+
* @param {Object.<LoyaltyProgrammeAccounts>} params.loyalty_programme_accounts - The Loyalty Programme Accounts for this passenger
|
|
50
|
+
*/
|
|
51
|
+
update: (offerId: string, passengerId: string, params: UpdateOfferBodyParameters) => Promise<DuffelResponse<UpdateOffer>>;
|
|
52
|
+
}
|
|
53
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './Offers';
|
|
1
|
+
export * from './Offers';
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { Resource } from '../../Resource';
|
|
2
|
-
import { CreateOrderCancellation, DuffelResponse, OrderCancellation, ListOrderCancellationsParams } from '../../types';
|
|
3
|
-
export declare class OrderCancellations extends Resource {
|
|
4
|
-
/**
|
|
5
|
-
* Endpoint path
|
|
6
|
-
*/
|
|
7
|
-
path: string;
|
|
8
|
-
constructor(args: any);
|
|
9
|
-
/**
|
|
10
|
-
* Retrieves an order cancellation by its ID
|
|
11
|
-
* @param {string} id - Duffel's unique identifier for the order cancellation
|
|
12
|
-
* @link https:/duffel.com/docs/api/order-cancellations/get-order-cancellation-by-id
|
|
13
|
-
*/
|
|
14
|
-
get: (id: string) => Promise<DuffelResponse<OrderCancellation>>;
|
|
15
|
-
/**
|
|
16
|
-
* Retrieves a page of order cancellations. The results may be returned in any order.
|
|
17
|
-
* @param {Object.<ListOrderCancellationsParams>} params - Endpoint options (optional: limit, after, before, order_id)
|
|
18
|
-
* @link https://duffel.com/docs/api/order-cancellations/get-order-cancellations
|
|
19
|
-
*/
|
|
20
|
-
list: (params?: ListOrderCancellationsParams) => Promise<DuffelResponse<OrderCancellation[]>>;
|
|
21
|
-
/**
|
|
22
|
-
* Retrieves a generator of all order cancellations. The results may be returned in any order.
|
|
23
|
-
* @param {Object.<ListOrderCancellationsParams>} params - Endpoint options (optional: limit, after, before, order_id)
|
|
24
|
-
* @link https://duffel.com/docs/api/order-cancellations/get-order-cancellations
|
|
25
|
-
*/
|
|
26
|
-
listWithGenerator: (params?: ListOrderCancellationsParams) => AsyncGenerator<DuffelResponse<OrderCancellation>, void, unknown>;
|
|
27
|
-
/**
|
|
28
|
-
* Create order cancellation
|
|
29
|
-
* @description To begin the process of cancelling an order you need to create an order cancellation.
|
|
30
|
-
* @param order_id - Duffel's unique identifier for the order
|
|
31
|
-
* @link https://duffel.com/docs/api/order-cancellations/create-order-cancellation
|
|
32
|
-
*/
|
|
33
|
-
create: (options: CreateOrderCancellation) => Promise<DuffelResponse<OrderCancellation>>;
|
|
34
|
-
/**
|
|
35
|
-
* Confirm order cancellation
|
|
36
|
-
* @description Once you've created a pending order cancellation, you'll know the `refund_amount` you're due to get back.
|
|
37
|
-
* @param {string} id - Duffel's unique identifier for the order to cancel
|
|
38
|
-
* @link https://duffel.com/docs/api/order-cancellations/confirm-order-cancellation
|
|
39
|
-
*/
|
|
40
|
-
confirm: (id: string) => Promise<DuffelResponse<OrderCancellation>>;
|
|
41
|
-
}
|
|
1
|
+
import { Resource } from '../../Resource';
|
|
2
|
+
import { CreateOrderCancellation, DuffelResponse, OrderCancellation, ListOrderCancellationsParams } from '../../types';
|
|
3
|
+
export declare class OrderCancellations extends Resource {
|
|
4
|
+
/**
|
|
5
|
+
* Endpoint path
|
|
6
|
+
*/
|
|
7
|
+
path: string;
|
|
8
|
+
constructor(args: any);
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves an order cancellation by its ID
|
|
11
|
+
* @param {string} id - Duffel's unique identifier for the order cancellation
|
|
12
|
+
* @link https:/duffel.com/docs/api/order-cancellations/get-order-cancellation-by-id
|
|
13
|
+
*/
|
|
14
|
+
get: (id: string) => Promise<DuffelResponse<OrderCancellation>>;
|
|
15
|
+
/**
|
|
16
|
+
* Retrieves a page of order cancellations. The results may be returned in any order.
|
|
17
|
+
* @param {Object.<ListOrderCancellationsParams>} params - Endpoint options (optional: limit, after, before, order_id)
|
|
18
|
+
* @link https://duffel.com/docs/api/order-cancellations/get-order-cancellations
|
|
19
|
+
*/
|
|
20
|
+
list: (params?: ListOrderCancellationsParams) => Promise<DuffelResponse<OrderCancellation[]>>;
|
|
21
|
+
/**
|
|
22
|
+
* Retrieves a generator of all order cancellations. The results may be returned in any order.
|
|
23
|
+
* @param {Object.<ListOrderCancellationsParams>} params - Endpoint options (optional: limit, after, before, order_id)
|
|
24
|
+
* @link https://duffel.com/docs/api/order-cancellations/get-order-cancellations
|
|
25
|
+
*/
|
|
26
|
+
listWithGenerator: (params?: ListOrderCancellationsParams) => AsyncGenerator<DuffelResponse<OrderCancellation>, void, unknown>;
|
|
27
|
+
/**
|
|
28
|
+
* Create order cancellation
|
|
29
|
+
* @description To begin the process of cancelling an order you need to create an order cancellation.
|
|
30
|
+
* @param order_id - Duffel's unique identifier for the order
|
|
31
|
+
* @link https://duffel.com/docs/api/order-cancellations/create-order-cancellation
|
|
32
|
+
*/
|
|
33
|
+
create: (options: CreateOrderCancellation) => Promise<DuffelResponse<OrderCancellation>>;
|
|
34
|
+
/**
|
|
35
|
+
* Confirm order cancellation
|
|
36
|
+
* @description Once you've created a pending order cancellation, you'll know the `refund_amount` you're due to get back.
|
|
37
|
+
* @param {string} id - Duffel's unique identifier for the order to cancel
|
|
38
|
+
* @link https://duffel.com/docs/api/order-cancellations/confirm-order-cancellation
|
|
39
|
+
*/
|
|
40
|
+
confirm: (id: string) => Promise<DuffelResponse<OrderCancellation>>;
|
|
41
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { PaginationMeta } from '../../types';
|
|
2
|
-
export interface CreateOrderCancellation {
|
|
3
|
-
/**
|
|
4
|
-
* Duffel's unique identifier for the order
|
|
5
|
-
*/
|
|
6
|
-
order_id: string;
|
|
7
|
-
}
|
|
8
|
-
export interface ListOrderCancellationsParams extends PaginationMeta {
|
|
9
|
-
/**
|
|
10
|
-
* Duffel's unique identifier for the order, returned when it was created
|
|
11
|
-
*/
|
|
12
|
-
order_id?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface OrderCancellation {
|
|
15
|
-
/**
|
|
16
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime that indicates when the order cancellation was confirmed
|
|
17
|
-
*/
|
|
18
|
-
confirmed_at: string;
|
|
19
|
-
/**
|
|
20
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the order cancellation was created
|
|
21
|
-
*/
|
|
22
|
-
created_at: string;
|
|
23
|
-
/**
|
|
24
|
-
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime by which this cancellation must be confirmed
|
|
25
|
-
*/
|
|
26
|
-
expires_at: string;
|
|
27
|
-
/**
|
|
28
|
-
* Duffel's unique identifier for the order cancellation
|
|
29
|
-
*/
|
|
30
|
-
id: string;
|
|
31
|
-
/**
|
|
32
|
-
* Whether the order cancellation was created in live mode. This field will be set to `true` if the order cancellation was created in live mode, or `false` if it was created in test mode.
|
|
33
|
-
*/
|
|
34
|
-
live_mode: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Duffel's unique identifier for the order
|
|
37
|
-
*/
|
|
38
|
-
order_id: string;
|
|
39
|
-
/**
|
|
40
|
-
* The amount that will be returned to the original payment method if the order is cancelled, determined according to the fare conditions. This may be `0.00` if the fare is non-refundable. It will include the refund amount of the flights and the services booked.
|
|
41
|
-
*/
|
|
42
|
-
refund_amount: string;
|
|
43
|
-
/**
|
|
44
|
-
* The currency of the `refund_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
45
|
-
* 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).
|
|
46
|
-
* For pay later orders that are awaiting payment, the refund amount will always be 0.00.
|
|
47
|
-
*/
|
|
48
|
-
refund_currency: string;
|
|
49
|
-
/**
|
|
50
|
-
* 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.
|
|
51
|
-
*/
|
|
52
|
-
refund_to: 'arc_bsp_cash' | 'balance' | 'card' | 'voucher' | 'awaiting_payment';
|
|
53
|
-
}
|
|
1
|
+
import { PaginationMeta } from '../../types';
|
|
2
|
+
export interface CreateOrderCancellation {
|
|
3
|
+
/**
|
|
4
|
+
* Duffel's unique identifier for the order
|
|
5
|
+
*/
|
|
6
|
+
order_id: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ListOrderCancellationsParams extends PaginationMeta {
|
|
9
|
+
/**
|
|
10
|
+
* Duffel's unique identifier for the order, returned when it was created
|
|
11
|
+
*/
|
|
12
|
+
order_id?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface OrderCancellation {
|
|
15
|
+
/**
|
|
16
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime that indicates when the order cancellation was confirmed
|
|
17
|
+
*/
|
|
18
|
+
confirmed_at: string;
|
|
19
|
+
/**
|
|
20
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the order cancellation was created
|
|
21
|
+
*/
|
|
22
|
+
created_at: string;
|
|
23
|
+
/**
|
|
24
|
+
* The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime by which this cancellation must be confirmed
|
|
25
|
+
*/
|
|
26
|
+
expires_at: string;
|
|
27
|
+
/**
|
|
28
|
+
* Duffel's unique identifier for the order cancellation
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether the order cancellation was created in live mode. This field will be set to `true` if the order cancellation was created in live mode, or `false` if it was created in test mode.
|
|
33
|
+
*/
|
|
34
|
+
live_mode: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Duffel's unique identifier for the order
|
|
37
|
+
*/
|
|
38
|
+
order_id: string;
|
|
39
|
+
/**
|
|
40
|
+
* The amount that will be returned to the original payment method if the order is cancelled, determined according to the fare conditions. This may be `0.00` if the fare is non-refundable. It will include the refund amount of the flights and the services booked.
|
|
41
|
+
*/
|
|
42
|
+
refund_amount: string;
|
|
43
|
+
/**
|
|
44
|
+
* The currency of the `refund_amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
|
|
45
|
+
* 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).
|
|
46
|
+
* For pay later orders that are awaiting payment, the refund amount will always be 0.00.
|
|
47
|
+
*/
|
|
48
|
+
refund_currency: string;
|
|
49
|
+
/**
|
|
50
|
+
* 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.
|
|
51
|
+
*/
|
|
52
|
+
refund_to: 'arc_bsp_cash' | 'balance' | 'card' | 'voucher' | 'awaiting_payment';
|
|
53
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './OrderCancellations';
|
|
1
|
+
export * from './OrderCancellations';
|
|
@@ -1,113 +1,113 @@
|
|
|
1
|
-
import { OfferSliceSegment } from '../Offers/OfferTypes';
|
|
2
|
-
import { PlaceType, Place } from '../../types';
|
|
3
|
-
/**
|
|
4
|
-
* @link https://duffel.com/docs/api/order-change-offers/schema
|
|
5
|
-
*/
|
|
6
|
-
export interface OrderChangeOffer {
|
|
7
|
-
/**
|
|
8
|
-
* The price of this offer as a change to your existing order, excluding taxes
|
|
9
|
-
*/
|
|
10
|
-
change_total_amount: string | null;
|
|
11
|
-
/**
|
|
12
|
-
* The currency of the change_total_amount, as an ISO 4217 currency code.
|
|
13
|
-
* It will match your organisation's billing currency unless you're using Duffel
|
|
14
|
-
* as an accredited IATA agent, in which case it will be in the currency provided
|
|
15
|
-
* by the airline (which will usually be based on the country where your
|
|
16
|
-
* IATA agency is registered).
|
|
17
|
-
*/
|
|
18
|
-
change_total_currency: string | null;
|
|
19
|
-
/**
|
|
20
|
-
* The ISO 8601 datetime at which the offer was created
|
|
21
|
-
*/
|
|
22
|
-
created_at: string;
|
|
23
|
-
/**
|
|
24
|
-
* The ISO 8601 datetime at which the offer will expire
|
|
25
|
-
* and no longer be usable to create an order
|
|
26
|
-
*/
|
|
27
|
-
expires_at: string;
|
|
28
|
-
/**
|
|
29
|
-
* Duffel's unique identifier for the order change offer
|
|
30
|
-
*/
|
|
31
|
-
id: string;
|
|
32
|
-
/**
|
|
33
|
-
* The price of this offer if it was newly purchased, excluding taxes
|
|
34
|
-
*/
|
|
35
|
-
new_total_amount: string | null;
|
|
36
|
-
/**
|
|
37
|
-
* The currency of the new_total_amount, as an ISO 4217 currency code.
|
|
38
|
-
* It will match your organisation's billing currency unless you're using
|
|
39
|
-
* Duffel as an accredited IATA agent, in which case it will be in the
|
|
40
|
-
* currency provided by the airline (which will usually be based on the
|
|
41
|
-
* country where your IATA agency is registered).
|
|
42
|
-
*/
|
|
43
|
-
new_total_currency: string;
|
|
44
|
-
/**
|
|
45
|
-
* The ID for an order change if one has already been created from this order change offer
|
|
46
|
-
*/
|
|
47
|
-
order_change_id: string;
|
|
48
|
-
/**
|
|
49
|
-
* The penalty price imposed by the airline for making this change
|
|
50
|
-
*/
|
|
51
|
-
penalty_amount: string;
|
|
52
|
-
/**
|
|
53
|
-
* The currency of the penalty_amount, as an ISO 4217 currency code.
|
|
54
|
-
* It will match your organisation's billing currency unless you're using
|
|
55
|
-
* Duffel as an accredited IATA agent, in which case it will be in the
|
|
56
|
-
* currency provided by the airline (which will usually be based on
|
|
57
|
-
* the country where your IATA agency is registered).
|
|
58
|
-
*/
|
|
59
|
-
penalty_currency: string;
|
|
60
|
-
/**
|
|
61
|
-
* Where the refund, once confirmed, will be sent. card is currently a restricted feature.
|
|
62
|
-
* `awaiting_payment` is for pay later orders where no payment has been made yet.
|
|
63
|
-
*/
|
|
64
|
-
refund_to: 'arc_bsp_cash' | 'balance' | 'card' | 'voucher' | 'awaiting_payment' | 'original_form_of_payment';
|
|
65
|
-
/**
|
|
66
|
-
* The slices to be added and/or removed
|
|
67
|
-
*/
|
|
68
|
-
slices: OrderChangeOfferSlices;
|
|
69
|
-
/**
|
|
70
|
-
* The ISO 8601 datetime at which the offer was last updated
|
|
71
|
-
*/
|
|
72
|
-
updated_at: string;
|
|
73
|
-
}
|
|
74
|
-
export interface OrderChangeOfferSlices {
|
|
75
|
-
/**
|
|
76
|
-
* The slices that will be added to the order
|
|
77
|
-
*/
|
|
78
|
-
add: OrderChangeOfferSlice[];
|
|
79
|
-
/**
|
|
80
|
-
* The slices that will be removed from the order
|
|
81
|
-
*/
|
|
82
|
-
remove: OrderChangeOfferSlice[];
|
|
83
|
-
}
|
|
84
|
-
export interface OrderChangeOfferSlice {
|
|
85
|
-
/**
|
|
86
|
-
* The city or airport where this slice ends
|
|
87
|
-
*/
|
|
88
|
-
destination: Place;
|
|
89
|
-
/**
|
|
90
|
-
* The type of the destination
|
|
91
|
-
*/
|
|
92
|
-
destination_type: PlaceType;
|
|
93
|
-
/**
|
|
94
|
-
* The duration of the slice, represented as a [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) duration
|
|
95
|
-
*/
|
|
96
|
-
duration?: string | null;
|
|
97
|
-
/**
|
|
98
|
-
* Duffel's unique identifier for the slice. It identifies the slice of an order (i.e. the same slice across orders will have different `id`s.
|
|
99
|
-
*/
|
|
100
|
-
id: string;
|
|
101
|
-
/**
|
|
102
|
-
* The city or airport where this slice begins
|
|
103
|
-
*/
|
|
104
|
-
origin: Place;
|
|
105
|
-
/**
|
|
106
|
-
* The type of the origin
|
|
107
|
-
*/
|
|
108
|
-
origin_type: PlaceType;
|
|
109
|
-
/**
|
|
110
|
-
* The segments - that is, specific flights - that the airline is offering to get the passengers from the `origin` to the `destination`
|
|
111
|
-
*/
|
|
112
|
-
segments: Array<Omit<OfferSliceSegment, 'passengers'>>;
|
|
113
|
-
}
|
|
1
|
+
import { OfferSliceSegment } from '../Offers/OfferTypes';
|
|
2
|
+
import { PlaceType, Place } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* @link https://duffel.com/docs/api/order-change-offers/schema
|
|
5
|
+
*/
|
|
6
|
+
export interface OrderChangeOffer {
|
|
7
|
+
/**
|
|
8
|
+
* The price of this offer as a change to your existing order, excluding taxes
|
|
9
|
+
*/
|
|
10
|
+
change_total_amount: string | null;
|
|
11
|
+
/**
|
|
12
|
+
* The currency of the change_total_amount, as an ISO 4217 currency code.
|
|
13
|
+
* It will match your organisation's billing currency unless you're using Duffel
|
|
14
|
+
* as an accredited IATA agent, in which case it will be in the currency provided
|
|
15
|
+
* by the airline (which will usually be based on the country where your
|
|
16
|
+
* IATA agency is registered).
|
|
17
|
+
*/
|
|
18
|
+
change_total_currency: string | null;
|
|
19
|
+
/**
|
|
20
|
+
* The ISO 8601 datetime at which the offer was created
|
|
21
|
+
*/
|
|
22
|
+
created_at: string;
|
|
23
|
+
/**
|
|
24
|
+
* The ISO 8601 datetime at which the offer will expire
|
|
25
|
+
* and no longer be usable to create an order
|
|
26
|
+
*/
|
|
27
|
+
expires_at: string;
|
|
28
|
+
/**
|
|
29
|
+
* Duffel's unique identifier for the order change offer
|
|
30
|
+
*/
|
|
31
|
+
id: string;
|
|
32
|
+
/**
|
|
33
|
+
* The price of this offer if it was newly purchased, excluding taxes
|
|
34
|
+
*/
|
|
35
|
+
new_total_amount: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* The currency of the new_total_amount, as an ISO 4217 currency code.
|
|
38
|
+
* It will match your organisation's billing currency unless you're using
|
|
39
|
+
* Duffel as an accredited IATA agent, in which case it will be in the
|
|
40
|
+
* currency provided by the airline (which will usually be based on the
|
|
41
|
+
* country where your IATA agency is registered).
|
|
42
|
+
*/
|
|
43
|
+
new_total_currency: string;
|
|
44
|
+
/**
|
|
45
|
+
* The ID for an order change if one has already been created from this order change offer
|
|
46
|
+
*/
|
|
47
|
+
order_change_id: string;
|
|
48
|
+
/**
|
|
49
|
+
* The penalty price imposed by the airline for making this change
|
|
50
|
+
*/
|
|
51
|
+
penalty_amount: string;
|
|
52
|
+
/**
|
|
53
|
+
* The currency of the penalty_amount, as an ISO 4217 currency code.
|
|
54
|
+
* It will match your organisation's billing currency unless you're using
|
|
55
|
+
* Duffel as an accredited IATA agent, in which case it will be in the
|
|
56
|
+
* currency provided by the airline (which will usually be based on
|
|
57
|
+
* the country where your IATA agency is registered).
|
|
58
|
+
*/
|
|
59
|
+
penalty_currency: string;
|
|
60
|
+
/**
|
|
61
|
+
* Where the refund, once confirmed, will be sent. card is currently a restricted feature.
|
|
62
|
+
* `awaiting_payment` is for pay later orders where no payment has been made yet.
|
|
63
|
+
*/
|
|
64
|
+
refund_to: 'arc_bsp_cash' | 'balance' | 'card' | 'voucher' | 'awaiting_payment' | 'original_form_of_payment';
|
|
65
|
+
/**
|
|
66
|
+
* The slices to be added and/or removed
|
|
67
|
+
*/
|
|
68
|
+
slices: OrderChangeOfferSlices;
|
|
69
|
+
/**
|
|
70
|
+
* The ISO 8601 datetime at which the offer was last updated
|
|
71
|
+
*/
|
|
72
|
+
updated_at: string;
|
|
73
|
+
}
|
|
74
|
+
export interface OrderChangeOfferSlices {
|
|
75
|
+
/**
|
|
76
|
+
* The slices that will be added to the order
|
|
77
|
+
*/
|
|
78
|
+
add: OrderChangeOfferSlice[];
|
|
79
|
+
/**
|
|
80
|
+
* The slices that will be removed from the order
|
|
81
|
+
*/
|
|
82
|
+
remove: OrderChangeOfferSlice[];
|
|
83
|
+
}
|
|
84
|
+
export interface OrderChangeOfferSlice {
|
|
85
|
+
/**
|
|
86
|
+
* The city or airport where this slice ends
|
|
87
|
+
*/
|
|
88
|
+
destination: Place;
|
|
89
|
+
/**
|
|
90
|
+
* The type of the destination
|
|
91
|
+
*/
|
|
92
|
+
destination_type: PlaceType;
|
|
93
|
+
/**
|
|
94
|
+
* The duration of the slice, represented as a [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601#Durations) duration
|
|
95
|
+
*/
|
|
96
|
+
duration?: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* Duffel's unique identifier for the slice. It identifies the slice of an order (i.e. the same slice across orders will have different `id`s.
|
|
99
|
+
*/
|
|
100
|
+
id: string;
|
|
101
|
+
/**
|
|
102
|
+
* The city or airport where this slice begins
|
|
103
|
+
*/
|
|
104
|
+
origin: Place;
|
|
105
|
+
/**
|
|
106
|
+
* The type of the origin
|
|
107
|
+
*/
|
|
108
|
+
origin_type: PlaceType;
|
|
109
|
+
/**
|
|
110
|
+
* The segments - that is, specific flights - that the airline is offering to get the passengers from the `origin` to the `destination`
|
|
111
|
+
*/
|
|
112
|
+
segments: Array<Omit<OfferSliceSegment, 'passengers'>>;
|
|
113
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { Resource } from '../../Resource';
|
|
2
|
-
import { DuffelResponse, OrderChangeOffer, PaginationMeta } from '../../types';
|
|
3
|
-
/**
|
|
4
|
-
* After you've searched for flights to add to your order by creating an order change request, we'll send your search to a range of airlines, which may return order change offers.
|
|
5
|
-
* This is still in PREVIEW mode
|
|
6
|
-
* @export
|
|
7
|
-
* @class OrderChangeOffers
|
|
8
|
-
* @extends {Resource}
|
|
9
|
-
*/
|
|
10
|
-
export declare class OrderChangeOffers extends Resource {
|
|
11
|
-
/**
|
|
12
|
-
* Endpoint path
|
|
13
|
-
*/
|
|
14
|
-
path: string;
|
|
15
|
-
constructor(args: any);
|
|
16
|
-
/**
|
|
17
|
-
* Retrieves an order change offer by its ID
|
|
18
|
-
* @param {string} id - The ID of your order change offer
|
|
19
|
-
* @link https://duffel.com/docs/api/order-change-offers/get-order-change-offer-by-id
|
|
20
|
-
*/
|
|
21
|
-
get: (id: string) => Promise<DuffelResponse<OrderChangeOffer>>;
|
|
22
|
-
/**
|
|
23
|
-
* Retrieves a page of order change offers. The results may be returned in any order.
|
|
24
|
-
* @param {Object} [options] - Pagination options (optional: limit, after, before)
|
|
25
|
-
*/
|
|
26
|
-
list: (options?: PaginationMeta) => Promise<DuffelResponse<OrderChangeOffer[]>>;
|
|
27
|
-
/**
|
|
28
|
-
* Retrieves a generator of all order change offers. The results may be returned in any order.
|
|
29
|
-
*/
|
|
30
|
-
listWithGenerator: () => AsyncGenerator<DuffelResponse<OrderChangeOffer>, void, unknown>;
|
|
31
|
-
}
|
|
1
|
+
import { Resource } from '../../Resource';
|
|
2
|
+
import { DuffelResponse, OrderChangeOffer, PaginationMeta } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* After you've searched for flights to add to your order by creating an order change request, we'll send your search to a range of airlines, which may return order change offers.
|
|
5
|
+
* This is still in PREVIEW mode
|
|
6
|
+
* @export
|
|
7
|
+
* @class OrderChangeOffers
|
|
8
|
+
* @extends {Resource}
|
|
9
|
+
*/
|
|
10
|
+
export declare class OrderChangeOffers extends Resource {
|
|
11
|
+
/**
|
|
12
|
+
* Endpoint path
|
|
13
|
+
*/
|
|
14
|
+
path: string;
|
|
15
|
+
constructor(args: any);
|
|
16
|
+
/**
|
|
17
|
+
* Retrieves an order change offer by its ID
|
|
18
|
+
* @param {string} id - The ID of your order change offer
|
|
19
|
+
* @link https://duffel.com/docs/api/order-change-offers/get-order-change-offer-by-id
|
|
20
|
+
*/
|
|
21
|
+
get: (id: string) => Promise<DuffelResponse<OrderChangeOffer>>;
|
|
22
|
+
/**
|
|
23
|
+
* Retrieves a page of order change offers. The results may be returned in any order.
|
|
24
|
+
* @param {Object} [options] - Pagination options (optional: limit, after, before)
|
|
25
|
+
*/
|
|
26
|
+
list: (options?: PaginationMeta) => Promise<DuffelResponse<OrderChangeOffer[]>>;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieves a generator of all order change offers. The results may be returned in any order.
|
|
29
|
+
*/
|
|
30
|
+
listWithGenerator: () => AsyncGenerator<DuffelResponse<OrderChangeOffer>, void, unknown>;
|
|
31
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './OrderChangeOffers';
|
|
1
|
+
export * from './OrderChangeOffers';
|