@@ -42,6 +42,7 @@ class EstimatesApi(object):
42
42
"year" ,
43
43
"transaction_value_btc_sats" ,
44
44
"timestamp" ,
45
+ "gas_used" ,
45
46
]
46
47
47
48
def __init__ (self , api_client = None ):
@@ -52,7 +53,7 @@ def create_bitcoin_estimate(
52
53
): # noqa: E501
53
54
"""Create a bitcoin estimate given a timestamp and transaction value # noqa: E501
54
55
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
56
57
This method makes a synchronous HTTP request by default. To make an
57
58
asynchronous HTTP request, please pass async_req=True
58
59
>>> thread = api.create_bitcoin_estimate(create_bitcoin_estimate_request, async_req=True)
@@ -81,7 +82,7 @@ def create_bitcoin_estimate_with_http_info(
81
82
): # noqa: E501
82
83
"""Create a bitcoin estimate given a timestamp and transaction value # noqa: E501
83
84
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
85
86
This method makes a synchronous HTTP request by default. To make an
86
87
asynchronous HTTP request, please pass async_req=True
87
88
>>> 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(
123
124
all_params .append ("year" )
124
125
all_params .append ("transaction_value_btc_sats" )
125
126
all_params .append ("timestamp" )
127
+ all_params .append ("gas_used" )
126
128
127
129
for key , val in six .iteritems (local_var_params ["kwargs" ]):
128
130
if key not in all_params :
@@ -192,6 +194,152 @@ def create_bitcoin_estimate_with_http_info(
192
194
collection_formats = collection_formats ,
193
195
)
194
196
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
+
195
343
def create_flight_estimate (
196
344
self , create_flight_estimate_request = {}, ** kwargs
197
345
): # noqa: E501
@@ -268,6 +416,7 @@ def create_flight_estimate_with_http_info(
268
416
all_params .append ("year" )
269
417
all_params .append ("transaction_value_btc_sats" )
270
418
all_params .append ("timestamp" )
419
+ all_params .append ("gas_used" )
271
420
272
421
for key , val in six .iteritems (local_var_params ["kwargs" ]):
273
422
if key not in all_params :
@@ -413,6 +562,7 @@ def create_mass_estimate_with_http_info(
413
562
all_params .append ("year" )
414
563
all_params .append ("transaction_value_btc_sats" )
415
564
all_params .append ("timestamp" )
565
+ all_params .append ("gas_used" )
416
566
417
567
for key , val in six .iteritems (local_var_params ["kwargs" ]):
418
568
if key not in all_params :
@@ -558,6 +708,7 @@ def create_shipping_estimate_with_http_info(
558
708
all_params .append ("year" )
559
709
all_params .append ("transaction_value_btc_sats" )
560
710
all_params .append ("timestamp" )
711
+ all_params .append ("gas_used" )
561
712
562
713
for key , val in six .iteritems (local_var_params ["kwargs" ]):
563
714
if key not in all_params :
@@ -703,6 +854,7 @@ def create_vehicle_estimate_with_http_info(
703
854
all_params .append ("year" )
704
855
all_params .append ("transaction_value_btc_sats" )
705
856
all_params .append ("timestamp" )
857
+ all_params .append ("gas_used" )
706
858
707
859
for key , val in six .iteritems (local_var_params ["kwargs" ]):
708
860
if key not in all_params :
@@ -842,6 +994,7 @@ def retrieve_estimate_with_http_info(self, id, **kwargs): # noqa: E501
842
994
all_params .append ("year" )
843
995
all_params .append ("transaction_value_btc_sats" )
844
996
all_params .append ("timestamp" )
997
+ all_params .append ("gas_used" )
845
998
846
999
for key , val in six .iteritems (local_var_params ["kwargs" ]):
847
1000
if key not in all_params :
@@ -971,6 +1124,7 @@ def retrieve_estimates_with_http_info(self, **kwargs): # noqa: E501
971
1124
all_params .append ("year" )
972
1125
all_params .append ("transaction_value_btc_sats" )
973
1126
all_params .append ("timestamp" )
1127
+ all_params .append ("gas_used" )
974
1128
975
1129
for key , val in six .iteritems (local_var_params ["kwargs" ]):
976
1130
if key not in all_params :
0 commit comments