Skip to content

Remove retired estimates endpoints #99

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 32 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@patch-technology/patch",
"version": "2.2.0",
"version": "2.3.0",
"description": "Node.js wrapper for the Patch API",
"license": "MIT",
"repository": {
Expand Down Expand Up @@ -48,7 +48,7 @@
"husky": "^4.2.5",
"lint-staged": "^10.5.4",
"mocha": "^10.4.0",
"sinon": "^18.0.0",
"sinon": "^17.0.1",
"prettier": "^3.2.5"
},
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/ApiClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ApiClient {
};

this.defaultHeaders = {
'User-Agent': 'patch-node/2.2.0',
'User-Agent': 'patch-node/2.3.0',
'Patch-Version': 2
};

Expand Down
165 changes: 0 additions & 165 deletions src/api/EstimatesApi.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,12 @@ import ApiClient from '../ApiClient';
import CreateAirShippingEstimateRequest from '../model/CreateAirShippingEstimateRequest';
import CreateBitcoinEstimateRequest from '../model/CreateBitcoinEstimateRequest';
import CreateEcommerceEstimateRequest from '../model/CreateEcommerceEstimateRequest';
import CreateEthereumEstimateRequest from '../model/CreateEthereumEstimateRequest';
import CreateFlightEstimateRequest from '../model/CreateFlightEstimateRequest';
import CreateHotelEstimateRequest from '../model/CreateHotelEstimateRequest';
import CreateMassEstimateRequest from '../model/CreateMassEstimateRequest';
import CreateRailShippingEstimateRequest from '../model/CreateRailShippingEstimateRequest';
import CreateRoadShippingEstimateRequest from '../model/CreateRoadShippingEstimateRequest';
import CreateSeaShippingEstimateRequest from '../model/CreateSeaShippingEstimateRequest';
import CreateShippingEstimateRequest from '../model/CreateShippingEstimateRequest';
import CreateVehicleEstimateRequest from '../model/CreateVehicleEstimateRequest';
import ErrorResponse from '../model/ErrorResponse';
import EstimateListResponse from '../model/EstimateListResponse';
import EstimateResponse from '../model/EstimateResponse';
Expand Down Expand Up @@ -192,60 +189,6 @@ export default class EstimatesApi {
);
}

createEthereumEstimateWithHttpInfo(createEthereumEstimateRequest, opts) {
opts = opts || {};

const _createEthereumEstimateRequest =
CreateEthereumEstimateRequest.constructFromObject(
createEthereumEstimateRequest,
new CreateEthereumEstimateRequest()
);

// verify the required parameter 'createEthereumEstimateRequest' is set
if (
_createEthereumEstimateRequest === undefined ||
_createEthereumEstimateRequest === null
) {
throw new Error(
"Missing the required parameter 'createEthereumEstimateRequest' when calling createEthereumEstimate"
);
}

let postBody = _createEthereumEstimateRequest;
let pathParams = {};
let queryParams = {};
let headerParams = {
'Patch-Version': opts['patchVersion']
};
let formParams = {};

let authNames = ['bearer_auth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = EstimateResponse;

return this.apiClient.callApi(
'/v1/estimates/crypto/eth',
'POST',
pathParams,
queryParams,
headerParams,
formParams,
postBody,
authNames,
contentTypes,
accepts,
returnType
);
}

createEthereumEstimate(createEthereumEstimateRequest, opts) {
return this.createEthereumEstimateWithHttpInfo(
createEthereumEstimateRequest,
opts
);
}

createFlightEstimateWithHttpInfo(createFlightEstimateRequest, opts) {
opts = opts || {};

Expand Down Expand Up @@ -576,114 +519,6 @@ export default class EstimatesApi {
);
}

createShippingEstimateWithHttpInfo(createShippingEstimateRequest, opts) {
opts = opts || {};

const _createShippingEstimateRequest =
CreateShippingEstimateRequest.constructFromObject(
createShippingEstimateRequest,
new CreateShippingEstimateRequest()
);

// verify the required parameter 'createShippingEstimateRequest' is set
if (
_createShippingEstimateRequest === undefined ||
_createShippingEstimateRequest === null
) {
throw new Error(
"Missing the required parameter 'createShippingEstimateRequest' when calling createShippingEstimate"
);
}

let postBody = _createShippingEstimateRequest;
let pathParams = {};
let queryParams = {};
let headerParams = {
'Patch-Version': opts['patchVersion']
};
let formParams = {};

let authNames = ['bearer_auth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = EstimateResponse;

return this.apiClient.callApi(
'/v1/estimates/shipping',
'POST',
pathParams,
queryParams,
headerParams,
formParams,
postBody,
authNames,
contentTypes,
accepts,
returnType
);
}

createShippingEstimate(createShippingEstimateRequest, opts) {
return this.createShippingEstimateWithHttpInfo(
createShippingEstimateRequest,
opts
);
}

createVehicleEstimateWithHttpInfo(createVehicleEstimateRequest, opts) {
opts = opts || {};

const _createVehicleEstimateRequest =
CreateVehicleEstimateRequest.constructFromObject(
createVehicleEstimateRequest,
new CreateVehicleEstimateRequest()
);

// verify the required parameter 'createVehicleEstimateRequest' is set
if (
_createVehicleEstimateRequest === undefined ||
_createVehicleEstimateRequest === null
) {
throw new Error(
"Missing the required parameter 'createVehicleEstimateRequest' when calling createVehicleEstimate"
);
}

let postBody = _createVehicleEstimateRequest;
let pathParams = {};
let queryParams = {};
let headerParams = {
'Patch-Version': opts['patchVersion']
};
let formParams = {};

let authNames = ['bearer_auth'];
let contentTypes = ['application/json'];
let accepts = ['application/json'];
let returnType = EstimateResponse;

return this.apiClient.callApi(
'/v1/estimates/vehicle',
'POST',
pathParams,
queryParams,
headerParams,
formParams,
postBody,
authNames,
contentTypes,
accepts,
returnType
);
}

createVehicleEstimate(createVehicleEstimateRequest, opts) {
return this.createVehicleEstimateWithHttpInfo(
createVehicleEstimateRequest,
opts
);
}

retrieveEstimateWithHttpInfo(id, opts) {
opts = opts || {};

Expand Down
Loading
Loading