Skip to content

Commit 14ffe90

Browse files
authored
Merge pull request #1094 from dproychev-payhawk/fix/fix-offer-id-casing
Fix/fix offer id casing
2 parents 6f10cfb + 28f095e commit 14ffe90

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

src/booking/Offers/OfferTypes.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -745,11 +745,6 @@ export interface OfferIntendedService {
745745
}
746746

747747
export interface GetOfferPricedParams {
748-
/**
749-
* The ID of the offer
750-
*/
751-
offerId: string
752-
753748
/**
754749
* The payment methods intended to use to pay for the offer
755750
*/

src/booking/Offers/Offers.spec.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ describe('offers', () => {
117117

118118
const response = await new Offers(
119119
new Client({ token: 'mockToken' }),
120-
).getPriced({
121-
offerId: mockOffer.id,
120+
).getPriced(mockOffer.id, {
122121
intended_payment_methods: [
123122
{
124123
type: 'card',

src/booking/Offers/Offers.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,13 @@ export class Offers extends Resource {
102102

103103
/**
104104
* Price the offer with intended payment methods and intended services. This will return the total amount that will be charged to the customer, including any applicable surcharges.
105+
* @param {string} offerId - Duffel's unique identifier for the offer
105106
* @param {Object.<GetOfferPricedParams>} params - The intended payment methods and services of the offer
106-
* @param {string} params.offerId - Duffel's unique identifier for the offer
107107
*/
108-
public getPriced = async ({
109-
offerId,
110-
...params
111-
}: GetOfferPricedParams): Promise<DuffelResponse<OfferPriced>> =>
108+
public getPriced = async (
109+
offerId: string,
110+
params: GetOfferPricedParams,
111+
): Promise<DuffelResponse<OfferPriced>> =>
112112
this.request({
113113
method: 'POST',
114114
path: `${this.path}/${offerId}/actions/price`,

0 commit comments

Comments
 (0)