Skip to content

Commit b50fdba

Browse files
committed
Remove createFlightEstimateRequest
1 parent d0c3a75 commit b50fdba

File tree

9 files changed

+72
-300
lines changed

9 files changed

+72
-300
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.5.0] - 2025-08-19
9+
10+
### Removed
11+
12+
- Removes `createFlightEstimate` method
13+
814
## [2.4.0] - 2025-05-16
915

1016
### Removed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ Estimates allow API users to get a quote for the cost of compensating a certain
118118
const mass_g = 1000000; // Pass in the mass in grams (i.e. 1 metric tonne)
119119
patch.estimates.createMassEstimate({ mass_g });
120120

121-
// Create a flight estimate
122-
const distance_m = 9000000; // Pass in the distance traveled in meters
123-
patch.estimates.createFlightEstimate({ distance_m });
124-
125121
// Create an ecommerce estimate
126122
const distance_m = 9000000;
127123
// Pass in the shipping distance in meters, the transportation method, and the package mass

package-lock.json

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@patch-technology/patch",
3-
"version": "2.4.0",
3+
"version": "2.5.0",
44
"description": "Node.js wrapper for the Patch API",
55
"license": "MIT",
66
"repository": {

src/ApiClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class ApiClient {
1616
};
1717

1818
this.defaultHeaders = {
19-
'User-Agent': 'patch-node/2.4.0',
19+
'User-Agent': 'patch-node/2.5.0',
2020
'Patch-Version': 2
2121
};
2222

src/api/EstimatesApi.js

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import ApiClient from '../ApiClient';
99
import CreateAirShippingEstimateRequest from '../model/CreateAirShippingEstimateRequest';
1010
import CreateBitcoinEstimateRequest from '../model/CreateBitcoinEstimateRequest';
11-
import CreateFlightEstimateRequest from '../model/CreateFlightEstimateRequest';
1211
import CreateMassEstimateRequest from '../model/CreateMassEstimateRequest';
1312
import CreateRailShippingEstimateRequest from '../model/CreateRailShippingEstimateRequest';
1413
import CreateRoadShippingEstimateRequest from '../model/CreateRoadShippingEstimateRequest';
@@ -133,60 +132,6 @@ export default class EstimatesApi {
133132
);
134133
}
135134

136-
createFlightEstimateWithHttpInfo(createFlightEstimateRequest, opts) {
137-
opts = opts || {};
138-
139-
const _createFlightEstimateRequest =
140-
CreateFlightEstimateRequest.constructFromObject(
141-
createFlightEstimateRequest,
142-
new CreateFlightEstimateRequest()
143-
);
144-
145-
// verify the required parameter 'createFlightEstimateRequest' is set
146-
if (
147-
_createFlightEstimateRequest === undefined ||
148-
_createFlightEstimateRequest === null
149-
) {
150-
throw new Error(
151-
"Missing the required parameter 'createFlightEstimateRequest' when calling createFlightEstimate"
152-
);
153-
}
154-
155-
let postBody = _createFlightEstimateRequest;
156-
let pathParams = {};
157-
let queryParams = {};
158-
let headerParams = {
159-
'Patch-Version': opts['patchVersion']
160-
};
161-
let formParams = {};
162-
163-
let authNames = ['bearer_auth'];
164-
let contentTypes = ['application/json'];
165-
let accepts = ['application/json'];
166-
let returnType = EstimateResponse;
167-
168-
return this.apiClient.callApi(
169-
'/v1/estimates/flight',
170-
'POST',
171-
pathParams,
172-
queryParams,
173-
headerParams,
174-
formParams,
175-
postBody,
176-
authNames,
177-
contentTypes,
178-
accepts,
179-
returnType
180-
);
181-
}
182-
183-
createFlightEstimate(createFlightEstimateRequest, opts) {
184-
return this.createFlightEstimateWithHttpInfo(
185-
createFlightEstimateRequest,
186-
opts
187-
);
188-
}
189-
190135
createMassEstimateWithHttpInfo(createMassEstimateRequest, opts) {
191136
opts = opts || {};
192137

src/model/CreateEcommerceEstimateRequest.js

Lines changed: 0 additions & 79 deletions
This file was deleted.

src/model/CreateFlightEstimateRequest.js

Lines changed: 0 additions & 97 deletions
This file was deleted.

0 commit comments

Comments
 (0)