@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.
Files changed (97) hide show
  1. package/dist/DuffelPayments/PaymentIntents/PaymentIntents.d.ts +28 -28
  2. package/dist/DuffelPayments/PaymentIntents/PaymentIntents.spec.d.ts +1 -1
  3. package/dist/DuffelPayments/PaymentIntents/PaymentIntentsType.d.ts +112 -112
  4. package/dist/DuffelPayments/PaymentIntents/index.d.ts +1 -1
  5. package/dist/DuffelPayments/Refunds/Refunds.d.ts +21 -21
  6. package/dist/DuffelPayments/Refunds/Refunds.spec.d.ts +1 -1
  7. package/dist/DuffelPayments/Refunds/RefundsType.d.ts +70 -70
  8. package/dist/DuffelPayments/Refunds/index.d.ts +1 -1
  9. package/dist/DuffelPayments/index.d.ts +1 -1
  10. package/dist/Links/Sessions/Sessions.d.ts +63 -63
  11. package/dist/Links/Sessions/Sessions.spec.d.ts +1 -1
  12. package/dist/Links/Sessions/index.d.ts +1 -1
  13. package/dist/Links/index.d.ts +1 -1
  14. package/dist/Places/Suggestions/Suggestions.d.ts +42 -42
  15. package/dist/Places/Suggestions/Suggestions.spec.d.ts +1 -1
  16. package/dist/Places/Suggestions/SuggestionsType.d.ts +59 -59
  17. package/dist/Places/Suggestions/index.d.ts +1 -1
  18. package/dist/Places/index.d.ts +1 -1
  19. package/dist/Stays/Bookings/Bookings.d.ts +41 -41
  20. package/dist/Stays/Bookings/Bookings.spec.d.ts +1 -1
  21. package/dist/Stays/Bookings/index.d.ts +1 -1
  22. package/dist/Stays/Quotes/Quotes.d.ts +16 -16
  23. package/dist/Stays/Quotes/Quotes.spec.d.ts +1 -1
  24. package/dist/Stays/Quotes/index.d.ts +1 -1
  25. package/dist/Stays/SearchResults/SearchResults.d.ts +16 -16
  26. package/dist/Stays/SearchResults/SearchResults.spec.d.ts +1 -1
  27. package/dist/Stays/SearchResults/index.d.ts +1 -1
  28. package/dist/Stays/Stays.d.ts +22 -22
  29. package/dist/Stays/Stays.spec.d.ts +1 -1
  30. package/dist/Stays/StaysTypes.d.ts +454 -454
  31. package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChanges.d.ts +63 -63
  32. package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChanges.spec.d.ts +1 -1
  33. package/dist/booking/AirlineInitiatedChanges/AirlineInitiatedChangesTypes.d.ts +57 -57
  34. package/dist/booking/AirlineInitiatedChanges/index.d.ts +1 -1
  35. package/dist/booking/OfferRequests/OfferRequests.d.ts +46 -46
  36. package/dist/booking/OfferRequests/OfferRequests.spec.d.ts +1 -1
  37. package/dist/booking/OfferRequests/OfferRequestsTypes.d.ts +240 -240
  38. package/dist/booking/OfferRequests/index.d.ts +1 -1
  39. package/dist/booking/Offers/OfferTypes.d.ts +495 -495
  40. package/dist/booking/Offers/Offers.d.ts +53 -53
  41. package/dist/booking/Offers/Offers.spec.d.ts +1 -1
  42. package/dist/booking/Offers/index.d.ts +1 -1
  43. package/dist/booking/OrderCancellations/OrderCancellations.d.ts +41 -41
  44. package/dist/booking/OrderCancellations/OrderCancellations.spec.d.ts +1 -1
  45. package/dist/booking/OrderCancellations/OrderCancellationsTypes.d.ts +53 -53
  46. package/dist/booking/OrderCancellations/index.d.ts +1 -1
  47. package/dist/booking/OrderChangeOffers/OrderChangeOfferTypes.d.ts +113 -113
  48. package/dist/booking/OrderChangeOffers/OrderChangeOffers.d.ts +31 -31
  49. package/dist/booking/OrderChangeOffers/OrderChangeOffers.spec.d.ts +1 -1
  50. package/dist/booking/OrderChangeOffers/index.d.ts +1 -1
  51. package/dist/booking/OrderChangeRequests/OrderChangeRequests.d.ts +29 -29
  52. package/dist/booking/OrderChangeRequests/OrderChangeRequestsTypes.d.ts +141 -141
  53. package/dist/booking/OrderChangeRequests/OrderRequestChanges.spec.d.ts +1 -1
  54. package/dist/booking/OrderChangeRequests/index.d.ts +1 -1
  55. package/dist/booking/OrderChanges/OrderChanges.d.ts +31 -31
  56. package/dist/booking/OrderChanges/OrderChanges.spec.d.ts +1 -1
  57. package/dist/booking/OrderChanges/OrderChangesTypes.d.ts +102 -102
  58. package/dist/booking/OrderChanges/index.d.ts +1 -1
  59. package/dist/booking/Orders/Orders.d.ts +52 -52
  60. package/dist/booking/Orders/Orders.spec.d.ts +1 -1
  61. package/dist/booking/Orders/OrdersTypes.d.ts +500 -500
  62. package/dist/booking/Orders/index.d.ts +1 -1
  63. package/dist/booking/PartialOfferRequests/PartialOfferRequestTypes.d.ts +6 -6
  64. package/dist/booking/PartialOfferRequests/PartialOfferRequests.d.ts +40 -40
  65. package/dist/booking/PartialOfferRequests/PartialOfferRequests.spec.d.ts +1 -1
  66. package/dist/booking/PartialOfferRequests/index.d.ts +1 -1
  67. package/dist/booking/Payments/Payments.d.ts +16 -16
  68. package/dist/booking/Payments/Payments.spec.d.ts +1 -1
  69. package/dist/booking/Payments/PaymentsTypes.d.ts +43 -43
  70. package/dist/booking/Payments/index.d.ts +1 -1
  71. package/dist/booking/SeatMaps/SeatMapTypes.d.ts +190 -190
  72. package/dist/booking/SeatMaps/SeatMaps.d.ts +17 -17
  73. package/dist/booking/SeatMaps/SeatMaps.spec.d.ts +1 -1
  74. package/dist/booking/SeatMaps/index.d.ts +1 -1
  75. package/dist/booking/index.d.ts +11 -11
  76. package/dist/index.es.js +1 -1
  77. package/dist/index.js +1 -1
  78. package/dist/notifications/Webhooks/Webhooks.d.ts +51 -51
  79. package/dist/notifications/Webhooks/Webhooks.spec.d.ts +1 -1
  80. package/dist/notifications/Webhooks/WebhooksType.d.ts +113 -113
  81. package/dist/notifications/Webhooks/index.d.ts +1 -1
  82. package/dist/notifications/index.d.ts +1 -1
  83. package/dist/supportingResources/Aircraft/Aircraft.d.ts +30 -30
  84. package/dist/supportingResources/Aircraft/Aircraft.spec.d.ts +1 -1
  85. package/dist/supportingResources/Aircraft/AircraftTypes.d.ts +18 -18
  86. package/dist/supportingResources/Aircraft/index.d.ts +1 -1
  87. package/dist/supportingResources/Airlines/Airlines.d.ts +29 -29
  88. package/dist/supportingResources/Airlines/Airlines.spec.d.ts +1 -1
  89. package/dist/supportingResources/Airlines/AirlinesTypes.d.ts +17 -17
  90. package/dist/supportingResources/Airlines/index.d.ts +2 -2
  91. package/dist/supportingResources/Airports/Airports.d.ts +30 -30
  92. package/dist/supportingResources/Airports/Airports.spec.d.ts +1 -1
  93. package/dist/supportingResources/Airports/AirportsTypes.d.ts +55 -55
  94. package/dist/supportingResources/Airports/index.d.ts +2 -2
  95. package/dist/supportingResources/index.d.ts +3 -3
  96. package/dist/typings.d.ts +6 -7
  97. package/package.json +15 -15
@@ -1,28 +1,28 @@
1
- import { DuffelResponse } from '../../types';
2
- import { Resource } from '../../Resource';
3
- import { CreatePaymentIntent, PaymentIntent } from './PaymentIntentsType';
4
- export declare class PaymentIntents extends Resource {
5
- /**
6
- * Endpoint path
7
- */
8
- path: string;
9
- constructor(args: any);
10
- /**
11
- * You should use this API to get the complete, up-to-date information about a Payment Intent.
12
- * @param {string} id - Duffel's unique identifier for the Payment Intent
13
- * @link https://duffel.com/docs/api/payment-intents/get-payment-intent-by-id
14
- */
15
- get: (id: string) => Promise<DuffelResponse<PaymentIntent>>;
16
- /**
17
- * Once you've successfully collected the customer's card details, using the `client_token` from when you first created the Payment Intent, you then need to confirm it using this endpoint.
18
- * Once confirmed, the amount charged to your customer's card will be added to your `Balance` (minus any Duffel Payment fees).
19
- */
20
- confirm: (id: string) => Promise<DuffelResponse<PaymentIntent>>;
21
- /**
22
- * To begin the process of collecting a card payment from your customer, you need to create a Payment Intent.
23
- * The Payment Intent will contain a `client_token` that you use to collect the card payment in your application.
24
- * If the Payment Intent is created in test mode you should use a [test card](https://duffel.com/docs/api/overview/test-mode/test-card-numbers).
25
- * @param {Object.<CreatePaymentIntent>} params - Endpoint params (amount and string)
26
- */
27
- create: (params: CreatePaymentIntent) => Promise<DuffelResponse<PaymentIntent>>;
28
- }
1
+ import { DuffelResponse } from '../../types';
2
+ import { Resource } from '../../Resource';
3
+ import { CreatePaymentIntent, PaymentIntent } from './PaymentIntentsType';
4
+ export declare class PaymentIntents extends Resource {
5
+ /**
6
+ * Endpoint path
7
+ */
8
+ path: string;
9
+ constructor(args: any);
10
+ /**
11
+ * You should use this API to get the complete, up-to-date information about a Payment Intent.
12
+ * @param {string} id - Duffel's unique identifier for the Payment Intent
13
+ * @link https://duffel.com/docs/api/payment-intents/get-payment-intent-by-id
14
+ */
15
+ get: (id: string) => Promise<DuffelResponse<PaymentIntent>>;
16
+ /**
17
+ * Once you've successfully collected the customer's card details, using the `client_token` from when you first created the Payment Intent, you then need to confirm it using this endpoint.
18
+ * Once confirmed, the amount charged to your customer's card will be added to your `Balance` (minus any Duffel Payment fees).
19
+ */
20
+ confirm: (id: string) => Promise<DuffelResponse<PaymentIntent>>;
21
+ /**
22
+ * To begin the process of collecting a card payment from your customer, you need to create a Payment Intent.
23
+ * The Payment Intent will contain a `client_token` that you use to collect the card payment in your application.
24
+ * If the Payment Intent is created in test mode you should use a [test card](https://duffel.com/docs/api/overview/test-mode/test-card-numbers).
25
+ * @param {Object.<CreatePaymentIntent>} params - Endpoint params (amount and string)
26
+ */
27
+ create: (params: CreatePaymentIntent) => Promise<DuffelResponse<PaymentIntent>>;
28
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,112 +1,112 @@
1
- export interface PaymentIntent {
2
- /**
3
- * The amount of the Payment Intent that covers the cost of the flight being sold and any additional markup.
4
- * The card payment will be charged this amount.
5
- */
6
- amount: string;
7
- /**
8
- * The [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the country that issued the card used to confirm the Payment Intent.
9
- * It will be null until the Payment Intent is confirmed.
10
- */
11
- card_country_code: string | null;
12
- /**
13
- * The last four digits of the card used to confirm the Payment Intent.
14
- * It will be null until the Payment Intent is confirmed.
15
- */
16
- card_last_four_digits: string | null;
17
- /**
18
- * The card network in which the Payment Intent was processed on.
19
- * It will be null until the Payment Intent is confirmed.
20
- */
21
- card_network: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'visa' | 'unknown' | null;
22
- /**
23
- * This value is used when displaying the payment collection form to securely identify and transmit the values to Duffel.
24
- */
25
- client_token: string;
26
- /**
27
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the Payment Intent was confirmed
28
- */
29
- confirmed_at: string;
30
- /**
31
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the Payment Intent was created
32
- */
33
- created_at: string;
34
- /**
35
- * The currency of the `amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
36
- * The card payment will be charged in this currency.
37
- * If it's different to your Balance currency, it will be converted to your Balance currency before the Balance is topped up.
38
- */
39
- currency: string;
40
- /**
41
- * The amount of the fees to process the Payment Intent.
42
- * It will be `null` until the Payment Intent is confirmed.
43
- */
44
- fees_amount: string | null;
45
- /**
46
- * The currency of the fees_amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
47
- * This currency will match your Balance currency.
48
- * It will be null until the Payment Intent is confirmed.
49
- */
50
- fees_currency: string | null;
51
- /**
52
- * Duffel's unique identifier for the `Payment Intent`
53
- */
54
- id: string;
55
- /**
56
- * Whether the Payment Intent was created in live mode. This field will be set to `true` if the Payment Intent was created in live mode, or `false` if it was created in test mode.
57
- */
58
- live_mode: boolean;
59
- /**
60
- * The amount of the Payment Intent that was added to the Balance.
61
- * It'll be `amount` (in the Balance currency) less the `fees_amount`.
62
- * It will be `null` until the Payment Intent is confirmed.
63
- */
64
- net_amount: string | null;
65
- /**
66
- * The currency of the net_amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
67
- * This currency will match your Balance currency.
68
- * It will be null until the Payment Intent is confirmed.
69
- */
70
- net_currency: string | null;
71
- /**
72
- * The Refunds for this Payment Intent
73
- * @link https://duffel.com/docs/api/payment-intents/schema#payment-intents-schema-refunds
74
- */
75
- refunds: {
76
- amount: string;
77
- arrival: string;
78
- created_at: string;
79
- currency: string;
80
- destination: string;
81
- id: string;
82
- live_mode: boolean;
83
- net_amount: string;
84
- net_currency: string;
85
- payment_intent_id: string;
86
- status: 'succeeded' | 'pending' | 'failed';
87
- updated_at: string;
88
- }[];
89
- /**
90
- * The status of this Payment Intent
91
- */
92
- status: null | 'requires_payment_method' | 'requires_confirmation' | 'requires_action' | 'processing' | 'requires_capture' | 'cancelled' | 'succeeded';
93
- /**
94
- * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the Payment Intent was updated
95
- */
96
- updated_at: string;
97
- }
98
- export interface CreatePaymentIntent {
99
- /**
100
- * This is the amount that the card payment being taken will be charged.
101
- * It should be enough to cover the service(s) you want to sell (enough to book an Offer for example) and the processing fees.
102
- * If the currency is different from your Balance currency you should also account for foreign exchange.
103
- * It can be higher than that, in which case the remainder will be considered your markup.
104
- * If it's higher than the maximum allowed for you organisation you will get a validation error. By default the maximum is 5,000.00 GBP (or equivalent in the same currency). If you need a maximum higher than the default please get in touch with us via help@duffel.com.
105
- */
106
- amount: string;
107
- /**
108
- * The currency of the amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
109
- * This is going to be the currency that the card payment being taken in will be charged in.
110
- */
111
- currency: string;
112
- }
1
+ export interface PaymentIntent {
2
+ /**
3
+ * The amount of the Payment Intent that covers the cost of the flight being sold and any additional markup.
4
+ * The card payment will be charged this amount.
5
+ */
6
+ amount: string;
7
+ /**
8
+ * The [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code of the country that issued the card used to confirm the Payment Intent.
9
+ * It will be null until the Payment Intent is confirmed.
10
+ */
11
+ card_country_code: string | null;
12
+ /**
13
+ * The last four digits of the card used to confirm the Payment Intent.
14
+ * It will be null until the Payment Intent is confirmed.
15
+ */
16
+ card_last_four_digits: string | null;
17
+ /**
18
+ * The card network in which the Payment Intent was processed on.
19
+ * It will be null until the Payment Intent is confirmed.
20
+ */
21
+ card_network: 'amex' | 'cartes_bancaires' | 'diners' | 'discover' | 'interac' | 'jcb' | 'mastercard' | 'unionpay' | 'visa' | 'unknown' | null;
22
+ /**
23
+ * This value is used when displaying the payment collection form to securely identify and transmit the values to Duffel.
24
+ */
25
+ client_token: string;
26
+ /**
27
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the Payment Intent was confirmed
28
+ */
29
+ confirmed_at: string;
30
+ /**
31
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the Payment Intent was created
32
+ */
33
+ created_at: string;
34
+ /**
35
+ * The currency of the `amount`, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
36
+ * The card payment will be charged in this currency.
37
+ * If it's different to your Balance currency, it will be converted to your Balance currency before the Balance is topped up.
38
+ */
39
+ currency: string;
40
+ /**
41
+ * The amount of the fees to process the Payment Intent.
42
+ * It will be `null` until the Payment Intent is confirmed.
43
+ */
44
+ fees_amount: string | null;
45
+ /**
46
+ * The currency of the fees_amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
47
+ * This currency will match your Balance currency.
48
+ * It will be null until the Payment Intent is confirmed.
49
+ */
50
+ fees_currency: string | null;
51
+ /**
52
+ * Duffel's unique identifier for the `Payment Intent`
53
+ */
54
+ id: string;
55
+ /**
56
+ * Whether the Payment Intent was created in live mode. This field will be set to `true` if the Payment Intent was created in live mode, or `false` if it was created in test mode.
57
+ */
58
+ live_mode: boolean;
59
+ /**
60
+ * The amount of the Payment Intent that was added to the Balance.
61
+ * It'll be `amount` (in the Balance currency) less the `fees_amount`.
62
+ * It will be `null` until the Payment Intent is confirmed.
63
+ */
64
+ net_amount: string | null;
65
+ /**
66
+ * The currency of the net_amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
67
+ * This currency will match your Balance currency.
68
+ * It will be null until the Payment Intent is confirmed.
69
+ */
70
+ net_currency: string | null;
71
+ /**
72
+ * The Refunds for this Payment Intent
73
+ * @link https://duffel.com/docs/api/payment-intents/schema#payment-intents-schema-refunds
74
+ */
75
+ refunds: {
76
+ amount: string;
77
+ arrival: string;
78
+ created_at: string;
79
+ currency: string;
80
+ destination: string;
81
+ id: string;
82
+ live_mode: boolean;
83
+ net_amount: string;
84
+ net_currency: string;
85
+ payment_intent_id: string;
86
+ status: 'succeeded' | 'pending' | 'failed';
87
+ updated_at: string;
88
+ }[];
89
+ /**
90
+ * The status of this Payment Intent
91
+ */
92
+ status: null | 'requires_payment_method' | 'requires_confirmation' | 'requires_action' | 'processing' | 'requires_capture' | 'cancelled' | 'succeeded';
93
+ /**
94
+ * The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) datetime at which the Payment Intent was updated
95
+ */
96
+ updated_at: string;
97
+ }
98
+ export interface CreatePaymentIntent {
99
+ /**
100
+ * This is the amount that the card payment being taken will be charged.
101
+ * It should be enough to cover the service(s) you want to sell (enough to book an Offer for example) and the processing fees.
102
+ * If the currency is different from your Balance currency you should also account for foreign exchange.
103
+ * It can be higher than that, in which case the remainder will be considered your markup.
104
+ * If it's higher than the maximum allowed for you organisation you will get a validation error. By default the maximum is 5,000.00 GBP (or equivalent in the same currency). If you need a maximum higher than the default please get in touch with us via help@duffel.com.
105
+ */
106
+ amount: string;
107
+ /**
108
+ * The currency of the amount, as an [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code.
109
+ * This is going to be the currency that the card payment being taken in will be charged in.
110
+ */
111
+ currency: string;
112
+ }
@@ -1 +1 @@
1
- export * from './PaymentIntents';
1
+ export * from './PaymentIntents';
@@ -1,21 +1,21 @@
1
- import { Resource } from '../../Resource';
2
- import { DuffelResponse } from '../../types';
3
- import { CreateRefund, Refund } from './RefundsType';
4
- export declare class Refunds extends Resource {
5
- /**
6
- * Endpoint path
7
- */
8
- path: string;
9
- constructor(args: any);
10
- /**
11
- * You should use this API to get the complete, up-to-date information about a Refund.
12
- * @param {string} id - Duffel's unique identifier for the Refund
13
- * @link https://duffel.com/docs/api/refunds/get-refund-by-id
14
- */
15
- get: (id: string) => Promise<DuffelResponse<Refund>>;
16
- /**
17
- * Create a Refund to refund some money to a customer that they paid using a Payment Intent. You must specify the amount and currency. The currency is currently limited to the currency in which the Payment Intent was made.
18
- * @param {Object.<CreateFund>} params - Endpoint params (amount, currency and payment_intent_id)
19
- */
20
- create: (params: CreateRefund) => Promise<DuffelResponse<Refund>>;
21
- }
1
+ import { Resource } from '../../Resource';
2
+ import { DuffelResponse } from '../../types';
3
+ import { CreateRefund, Refund } from './RefundsType';
4
+ export declare class Refunds extends Resource {
5
+ /**
6
+ * Endpoint path
7
+ */
8
+ path: string;
9
+ constructor(args: any);
10
+ /**
11
+ * You should use this API to get the complete, up-to-date information about a Refund.
12
+ * @param {string} id - Duffel's unique identifier for the Refund
13
+ * @link https://duffel.com/docs/api/refunds/get-refund-by-id
14
+ */
15
+ get: (id: string) => Promise<DuffelResponse<Refund>>;
16
+ /**
17
+ * Create a Refund to refund some money to a customer that they paid using a Payment Intent. You must specify the amount and currency. The currency is currently limited to the currency in which the Payment Intent was made.
18
+ * @param {Object.<CreateFund>} params - Endpoint params (amount, currency and payment_intent_id)
19
+ */
20
+ create: (params: CreateRefund) => Promise<DuffelResponse<Refund>>;
21
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,70 +1,70 @@
1
- export interface Refund {
2
- /**
3
- * The amount of the Payment Intent that will be refunded to the customer
4
- */
5
- amount: string;
6
- /**
7
- * When the refund is expected to arrive in the destination
8
- */
9
- arrival: string;
10
- /**
11
- * The ISO 8601 datetime at which the Refund was created
12
- */
13
- created_at: string;
14
- /**
15
- * The currency of the amount, as an ISO 4217 currency code.
16
- * It will always match the currency of the Payment Intent.
17
- */
18
- currency: string;
19
- /**
20
- * Where the Refund amount will be sent to
21
- */
22
- destination: 'original_form_of_payment';
23
- /**
24
- * Duffel's unique identifier for the Refund
25
- */
26
- id: string;
27
- /**
28
- * Whether the Refund was created in live mode. This field will be set to true if the Refund was created in live mode, or false if it was created in test mode.
29
- */
30
- live_mode: boolean;
31
- /**
32
- * The amount deducted from your Balance to cover the Refund amount
33
- */
34
- net_amount: string;
35
- /**
36
- * The currency of the net_amount, as an ISO 4217 currency code.
37
- * This currency will match your Balance currency.
38
- */
39
- net_currency: string;
40
- /**
41
- * Duffel's unique identifier for the Payment Intent that the Refund is for
42
- */
43
- payment_intent_id: string;
44
- /**
45
- * The status of the Refund.
46
- * Succeeded: The refund is on its way to the destination.
47
- * Pending: The Refund could not be processed immediately, and is pending processing.
48
- * Failed: A refund can fail if the customer’s bank or card issuer has been unable to process it correctly (e.g., a closed bank account or a problem with the card). The bank returns the refunded amount to us and we add it back to your Balance. This process can take up to 30 days from the post date.
49
- */
50
- status: 'succeeded' | 'pending' | 'failed';
51
- /**
52
- * The ISO 8601 datetime at which the Refund was updated
53
- */
54
- updated_at: string;
55
- }
56
- export interface CreateRefund {
57
- /**
58
- * This amount that will be refunded to the customer's card.
59
- */
60
- amount: string;
61
- /**
62
- * The currency of the amount, as an ISO 4217 currency code.
63
- * It must match the Payment Intent currency.
64
- */
65
- currency: string;
66
- /**
67
- * Duffel's unique identifier for the Payment Intent that the Refund is for
68
- */
69
- payment_intent_id: string;
70
- }
1
+ export interface Refund {
2
+ /**
3
+ * The amount of the Payment Intent that will be refunded to the customer
4
+ */
5
+ amount: string;
6
+ /**
7
+ * When the refund is expected to arrive in the destination
8
+ */
9
+ arrival: string;
10
+ /**
11
+ * The ISO 8601 datetime at which the Refund was created
12
+ */
13
+ created_at: string;
14
+ /**
15
+ * The currency of the amount, as an ISO 4217 currency code.
16
+ * It will always match the currency of the Payment Intent.
17
+ */
18
+ currency: string;
19
+ /**
20
+ * Where the Refund amount will be sent to
21
+ */
22
+ destination: 'original_form_of_payment';
23
+ /**
24
+ * Duffel's unique identifier for the Refund
25
+ */
26
+ id: string;
27
+ /**
28
+ * Whether the Refund was created in live mode. This field will be set to true if the Refund was created in live mode, or false if it was created in test mode.
29
+ */
30
+ live_mode: boolean;
31
+ /**
32
+ * The amount deducted from your Balance to cover the Refund amount
33
+ */
34
+ net_amount: string;
35
+ /**
36
+ * The currency of the net_amount, as an ISO 4217 currency code.
37
+ * This currency will match your Balance currency.
38
+ */
39
+ net_currency: string;
40
+ /**
41
+ * Duffel's unique identifier for the Payment Intent that the Refund is for
42
+ */
43
+ payment_intent_id: string;
44
+ /**
45
+ * The status of the Refund.
46
+ * Succeeded: The refund is on its way to the destination.
47
+ * Pending: The Refund could not be processed immediately, and is pending processing.
48
+ * Failed: A refund can fail if the customer’s bank or card issuer has been unable to process it correctly (e.g., a closed bank account or a problem with the card). The bank returns the refunded amount to us and we add it back to your Balance. This process can take up to 30 days from the post date.
49
+ */
50
+ status: 'succeeded' | 'pending' | 'failed';
51
+ /**
52
+ * The ISO 8601 datetime at which the Refund was updated
53
+ */
54
+ updated_at: string;
55
+ }
56
+ export interface CreateRefund {
57
+ /**
58
+ * This amount that will be refunded to the customer's card.
59
+ */
60
+ amount: string;
61
+ /**
62
+ * The currency of the amount, as an ISO 4217 currency code.
63
+ * It must match the Payment Intent currency.
64
+ */
65
+ currency: string;
66
+ /**
67
+ * Duffel's unique identifier for the Payment Intent that the Refund is for
68
+ */
69
+ payment_intent_id: string;
70
+ }
@@ -1 +1 @@
1
- export * from './Refunds';
1
+ export * from './Refunds';
@@ -1 +1 @@
1
- export * from './PaymentIntents';
1
+ export * from './PaymentIntents';
@@ -1,63 +1,63 @@
1
- import { Client } from 'Client';
2
- import { Resource } from '../../Resource';
3
- import { DuffelResponse } from '../../types';
4
- interface SessionParameters {
5
- /**
6
- * A tracking reference for the booking that may be created within this Duffel Links session
7
- */
8
- reference: string;
9
- /**
10
- * A url to return to when a flight is booked via Duffel Links
11
- */
12
- success_url: string;
13
- /**
14
- * A url to return to when there is an error within Duffel Links
15
- */
16
- failure_url: string;
17
- /**
18
- * A url to return to when the user exits Duffel Links before booking
19
- */
20
- abandonment_url: string;
21
- /**
22
- * A primary color to show within Duffel Links
23
- */
24
- primary_color?: string;
25
- /**
26
- * A url of the logo to show within Duffel Links
27
- */
28
- logo_url?: string;
29
- /**
30
- * A markup amount to be added to the flights shown within Duffel Links
31
- */
32
- markup_amount?: number;
33
- /**
34
- * A markup amount to be added to the flights shown within Duffel Links
35
- */
36
- markup_currency?: string;
37
- /**
38
- * A markup percentage to be added to the flights shown within Duffel Links
39
- */
40
- markup_rate?: number;
41
- /**
42
- * A text to be shown on the checkout page within Duffel Links
43
- */
44
- checkout_display_text?: string;
45
- }
46
- interface Session {
47
- /**
48
- * The Duffel Links url that contains the specified configuration
49
- */
50
- url: string;
51
- }
52
- export declare class Sessions extends Resource {
53
- /**
54
- * Endpoint path
55
- */
56
- path: string;
57
- constructor(client: Client);
58
- /**
59
- * Create a Duffel Links Session per the configuration
60
- */
61
- create: (data: SessionParameters) => Promise<DuffelResponse<Session>>;
62
- }
63
- export {};
1
+ import { Client } from '../../Client';
2
+ import { Resource } from '../../Resource';
3
+ import { DuffelResponse } from '../../types';
4
+ interface SessionParameters {
5
+ /**
6
+ * A tracking reference for the booking that may be created within this Duffel Links session
7
+ */
8
+ reference: string;
9
+ /**
10
+ * A url to return to when a flight is booked via Duffel Links
11
+ */
12
+ success_url: string;
13
+ /**
14
+ * A url to return to when there is an error within Duffel Links
15
+ */
16
+ failure_url: string;
17
+ /**
18
+ * A url to return to when the user exits Duffel Links before booking
19
+ */
20
+ abandonment_url: string;
21
+ /**
22
+ * A primary color to show within Duffel Links
23
+ */
24
+ primary_color?: string;
25
+ /**
26
+ * A url of the logo to show within Duffel Links
27
+ */
28
+ logo_url?: string;
29
+ /**
30
+ * A markup amount to be added to the flights shown within Duffel Links
31
+ */
32
+ markup_amount?: number;
33
+ /**
34
+ * A markup amount to be added to the flights shown within Duffel Links
35
+ */
36
+ markup_currency?: string;
37
+ /**
38
+ * A markup percentage to be added to the flights shown within Duffel Links
39
+ */
40
+ markup_rate?: number;
41
+ /**
42
+ * A text to be shown on the checkout page within Duffel Links
43
+ */
44
+ checkout_display_text?: string;
45
+ }
46
+ interface Session {
47
+ /**
48
+ * The Duffel Links url that contains the specified configuration
49
+ */
50
+ url: string;
51
+ }
52
+ export declare class Sessions extends Resource {
53
+ /**
54
+ * Endpoint path
55
+ */
56
+ path: string;
57
+ constructor(client: Client);
58
+ /**
59
+ * Create a Duffel Links Session per the configuration
60
+ */
61
+ create: (data: SessionParameters) => Promise<DuffelResponse<Session>>;
62
+ }
63
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export * from './Sessions';
1
+ export * from './Sessions';
@@ -1 +1 @@
1
- export * from './Sessions';
1
+ export * from './Sessions';