@@ -42,6 +42,7 @@ class EstimatesApi(object):
4242 "year" ,
4343 "transaction_value_btc_sats" ,
4444 "timestamp" ,
45+ "gas_used" ,
4546 ]
4647
4748 def __init__ (self , api_client = None ):
@@ -52,7 +53,7 @@ def create_bitcoin_estimate(
5253 ): # noqa: E501
5354 """Create a bitcoin estimate given a timestamp and transaction value # noqa: E501
5455
55- Creates a bitcoin estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate. # noqa: E501
56+ Creates a bitcoin estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate. # noqa: E501
5657 This method makes a synchronous HTTP request by default. To make an
5758 asynchronous HTTP request, please pass async_req=True
5859 >>> thread = api.create_bitcoin_estimate(create_bitcoin_estimate_request, async_req=True)
@@ -81,7 +82,7 @@ def create_bitcoin_estimate_with_http_info(
8182 ): # noqa: E501
8283 """Create a bitcoin estimate given a timestamp and transaction value # noqa: E501
8384
84- Creates a bitcoin estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate. # noqa: E501
85+ Creates a bitcoin estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate. # noqa: E501
8586 This method makes a synchronous HTTP request by default. To make an
8687 asynchronous HTTP request, please pass async_req=True
8788 >>> thread = api.create_bitcoin_estimate_with_http_info(create_bitcoin_estimate_request, async_req=True)
@@ -123,6 +124,7 @@ def create_bitcoin_estimate_with_http_info(
123124 all_params .append ("year" )
124125 all_params .append ("transaction_value_btc_sats" )
125126 all_params .append ("timestamp" )
127+ all_params .append ("gas_used" )
126128
127129 for key , val in six .iteritems (local_var_params ["kwargs" ]):
128130 if key not in all_params :
@@ -192,6 +194,152 @@ def create_bitcoin_estimate_with_http_info(
192194 collection_formats = collection_formats ,
193195 )
194196
197+ def create_ethereum_estimate (
198+ self , create_ethereum_estimate_request = {}, ** kwargs
199+ ): # noqa: E501
200+ """Create an ethereum estimate given a timestamp and gas used # noqa: E501
201+
202+ Creates an ethereum estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate. # noqa: E501
203+ This method makes a synchronous HTTP request by default. To make an
204+ asynchronous HTTP request, please pass async_req=True
205+ >>> thread = api.create_ethereum_estimate(create_ethereum_estimate_request, async_req=True)
206+ >>> result = thread.get()
207+
208+ :param async_req bool: execute request asynchronously
209+ :param CreateEthereumEstimateRequest create_ethereum_estimate_request: (required)
210+ :param _preload_content: if False, the urllib3.HTTPResponse object will
211+ be returned without reading/decoding response
212+ data. Default is True.
213+ :param _request_timeout: timeout setting for this request. If one
214+ number provided, it will be total request
215+ timeout. It can also be a pair (tuple) of
216+ (connection, read) timeouts.
217+ :return: EstimateResponse
218+ If the method is called asynchronously,
219+ returns the request thread.
220+ """
221+ kwargs ["_return_http_data_only" ] = True
222+ return self .create_ethereum_estimate_with_http_info (
223+ create_ethereum_estimate_request , ** kwargs
224+ ) # noqa: E501
225+
226+ def create_ethereum_estimate_with_http_info (
227+ self , create_ethereum_estimate_request , ** kwargs
228+ ): # noqa: E501
229+ """Create an ethereum estimate given a timestamp and gas used # noqa: E501
230+
231+ Creates an ethereum estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters, linked to the estimate. # noqa: E501
232+ This method makes a synchronous HTTP request by default. To make an
233+ asynchronous HTTP request, please pass async_req=True
234+ >>> thread = api.create_ethereum_estimate_with_http_info(create_ethereum_estimate_request, async_req=True)
235+ >>> result = thread.get()
236+
237+ :param async_req bool: execute request asynchronously
238+ :param CreateEthereumEstimateRequest create_ethereum_estimate_request: (required)
239+ :param _return_http_data_only: response data without head status code
240+ and headers
241+ :param _preload_content: if False, the urllib3.HTTPResponse object will
242+ be returned without reading/decoding response
243+ data. Default is True.
244+ :param _request_timeout: timeout setting for this request. If one
245+ number provided, it will be total request
246+ timeout. It can also be a pair (tuple) of
247+ (connection, read) timeouts.
248+ :return: tuple(EstimateResponse, status_code(int), headers(HTTPHeaderDict))
249+ If the method is called asynchronously,
250+ returns the request thread.
251+ """
252+
253+ local_var_params = locals ()
254+
255+ all_params = ["create_ethereum_estimate_request" ] # noqa: E501
256+ all_params .append ("async_req" )
257+ all_params .append ("_return_http_data_only" )
258+ all_params .append ("_preload_content" )
259+ all_params .append ("_request_timeout" )
260+ all_params .append ("mass_g" )
261+ all_params .append ("total_price_cents_usd" )
262+ all_params .append ("project_id" )
263+ all_params .append ("metadata" )
264+ all_params .append ("distance_m" )
265+ all_params .append ("transportation_method" )
266+ all_params .append ("package_mass_g" )
267+ all_params .append ("create_order" )
268+ all_params .append ("make" )
269+ all_params .append ("model" )
270+ all_params .append ("year" )
271+ all_params .append ("transaction_value_btc_sats" )
272+ all_params .append ("timestamp" )
273+ all_params .append ("gas_used" )
274+
275+ for key , val in six .iteritems (local_var_params ["kwargs" ]):
276+ if key not in all_params :
277+ raise ApiTypeError (
278+ "Got an unexpected keyword argument '%s'"
279+ " to method create_ethereum_estimate" % key
280+ )
281+ local_var_params [key ] = val
282+ del local_var_params ["kwargs" ]
283+ # verify the required parameter 'create_ethereum_estimate_request' is set
284+ if (
285+ "create_ethereum_estimate_request" not in local_var_params
286+ or local_var_params ["create_ethereum_estimate_request" ] is None
287+ ):
288+ raise ApiValueError (
289+ "Missing the required parameter `create_ethereum_estimate_request` when calling `create_ethereum_estimate`"
290+ ) # noqa: E501
291+
292+ collection_formats = {}
293+
294+ path_params = {}
295+
296+ query_params = []
297+ for key in kwargs :
298+ query_params .append ([key , kwargs .get (key )])
299+
300+ header_params = {}
301+
302+ form_params = []
303+ local_var_files = {}
304+
305+ body_params = None
306+ if "create_ethereum_estimate_request" in local_var_params :
307+ body_params = local_var_params ["create_ethereum_estimate_request" ]
308+ # HTTP header `Accept`
309+ header_params ["Accept" ] = self .api_client .select_header_accept (
310+ ["application/json" ]
311+ ) # noqa: E501
312+
313+ # HTTP header `Content-Type`
314+ header_params [
315+ "Content-Type"
316+ ] = self .api_client .select_header_content_type ( # noqa: E501
317+ ["application/json" ]
318+ ) # noqa: E501
319+
320+ # Authentication setting
321+ auth_settings = ["bearer_auth" ] # noqa: E501
322+
323+ return self .api_client .call_api (
324+ "/v1/estimates/crypto/eth" ,
325+ "POST" ,
326+ path_params ,
327+ query_params ,
328+ header_params ,
329+ body = body_params ,
330+ post_params = form_params ,
331+ files = local_var_files ,
332+ response_type = "EstimateResponse" , # noqa: E501
333+ auth_settings = auth_settings ,
334+ async_req = local_var_params .get ("async_req" ),
335+ _return_http_data_only = local_var_params .get (
336+ "_return_http_data_only"
337+ ), # noqa: E501
338+ _preload_content = local_var_params .get ("_preload_content" , True ),
339+ _request_timeout = local_var_params .get ("_request_timeout" ),
340+ collection_formats = collection_formats ,
341+ )
342+
195343 def create_flight_estimate (
196344 self , create_flight_estimate_request = {}, ** kwargs
197345 ): # noqa: E501
@@ -268,6 +416,7 @@ def create_flight_estimate_with_http_info(
268416 all_params .append ("year" )
269417 all_params .append ("transaction_value_btc_sats" )
270418 all_params .append ("timestamp" )
419+ all_params .append ("gas_used" )
271420
272421 for key , val in six .iteritems (local_var_params ["kwargs" ]):
273422 if key not in all_params :
@@ -413,6 +562,7 @@ def create_mass_estimate_with_http_info(
413562 all_params .append ("year" )
414563 all_params .append ("transaction_value_btc_sats" )
415564 all_params .append ("timestamp" )
565+ all_params .append ("gas_used" )
416566
417567 for key , val in six .iteritems (local_var_params ["kwargs" ]):
418568 if key not in all_params :
@@ -558,6 +708,7 @@ def create_shipping_estimate_with_http_info(
558708 all_params .append ("year" )
559709 all_params .append ("transaction_value_btc_sats" )
560710 all_params .append ("timestamp" )
711+ all_params .append ("gas_used" )
561712
562713 for key , val in six .iteritems (local_var_params ["kwargs" ]):
563714 if key not in all_params :
@@ -703,6 +854,7 @@ def create_vehicle_estimate_with_http_info(
703854 all_params .append ("year" )
704855 all_params .append ("transaction_value_btc_sats" )
705856 all_params .append ("timestamp" )
857+ all_params .append ("gas_used" )
706858
707859 for key , val in six .iteritems (local_var_params ["kwargs" ]):
708860 if key not in all_params :
@@ -842,6 +994,7 @@ def retrieve_estimate_with_http_info(self, id, **kwargs): # noqa: E501
842994 all_params .append ("year" )
843995 all_params .append ("transaction_value_btc_sats" )
844996 all_params .append ("timestamp" )
997+ all_params .append ("gas_used" )
845998
846999 for key , val in six .iteritems (local_var_params ["kwargs" ]):
8471000 if key not in all_params :
@@ -971,6 +1124,7 @@ def retrieve_estimates_with_http_info(self, **kwargs): # noqa: E501
9711124 all_params .append ("year" )
9721125 all_params .append ("transaction_value_btc_sats" )
9731126 all_params .append ("timestamp" )
1127+ all_params .append ("gas_used" )
9741128
9751129 for key , val in six .iteritems (local_var_params ["kwargs" ]):
9761130 if key not in all_params :
0 commit comments