@@ -40,11 +40,158 @@ class EstimatesApi(object):
40
40
"model" ,
41
41
"make" ,
42
42
"year" ,
43
+ "transaction_value_btc_sats" ,
44
+ "timestamp" ,
43
45
]
44
46
45
47
def __init__ (self , api_client = None ):
46
48
self .api_client = api_client
47
49
50
+ def create_bitcoin_estimate (
51
+ self , create_bitcoin_estimate_request = {}, ** kwargs
52
+ ): # noqa: E501
53
+ """Create a bitcoin estimate given a timestamp and transaction value # noqa: E501
54
+
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
+ This method makes a synchronous HTTP request by default. To make an
57
+ asynchronous HTTP request, please pass async_req=True
58
+ >>> thread = api.create_bitcoin_estimate(create_bitcoin_estimate_request, async_req=True)
59
+ >>> result = thread.get()
60
+
61
+ :param async_req bool: execute request asynchronously
62
+ :param CreateBitcoinEstimateRequest create_bitcoin_estimate_request: (required)
63
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
64
+ be returned without reading/decoding response
65
+ data. Default is True.
66
+ :param _request_timeout: timeout setting for this request. If one
67
+ number provided, it will be total request
68
+ timeout. It can also be a pair (tuple) of
69
+ (connection, read) timeouts.
70
+ :return: EstimateResponse
71
+ If the method is called asynchronously,
72
+ returns the request thread.
73
+ """
74
+ kwargs ["_return_http_data_only" ] = True
75
+ return self .create_bitcoin_estimate_with_http_info (
76
+ create_bitcoin_estimate_request , ** kwargs
77
+ ) # noqa: E501
78
+
79
+ def create_bitcoin_estimate_with_http_info (
80
+ self , create_bitcoin_estimate_request , ** kwargs
81
+ ): # noqa: E501
82
+ """Create a bitcoin estimate given a timestamp and transaction value # noqa: E501
83
+
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
+ This method makes a synchronous HTTP request by default. To make an
86
+ asynchronous HTTP request, please pass async_req=True
87
+ >>> thread = api.create_bitcoin_estimate_with_http_info(create_bitcoin_estimate_request, async_req=True)
88
+ >>> result = thread.get()
89
+
90
+ :param async_req bool: execute request asynchronously
91
+ :param CreateBitcoinEstimateRequest create_bitcoin_estimate_request: (required)
92
+ :param _return_http_data_only: response data without head status code
93
+ and headers
94
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
95
+ be returned without reading/decoding response
96
+ data. Default is True.
97
+ :param _request_timeout: timeout setting for this request. If one
98
+ number provided, it will be total request
99
+ timeout. It can also be a pair (tuple) of
100
+ (connection, read) timeouts.
101
+ :return: tuple(EstimateResponse, status_code(int), headers(HTTPHeaderDict))
102
+ If the method is called asynchronously,
103
+ returns the request thread.
104
+ """
105
+
106
+ local_var_params = locals ()
107
+
108
+ all_params = ["create_bitcoin_estimate_request" ] # noqa: E501
109
+ all_params .append ("async_req" )
110
+ all_params .append ("_return_http_data_only" )
111
+ all_params .append ("_preload_content" )
112
+ all_params .append ("_request_timeout" )
113
+ all_params .append ("mass_g" )
114
+ all_params .append ("total_price_cents_usd" )
115
+ all_params .append ("project_id" )
116
+ all_params .append ("metadata" )
117
+ all_params .append ("distance_m" )
118
+ all_params .append ("transportation_method" )
119
+ all_params .append ("package_mass_g" )
120
+ all_params .append ("create_order" )
121
+ all_params .append ("make" )
122
+ all_params .append ("model" )
123
+ all_params .append ("year" )
124
+ all_params .append ("transaction_value_btc_sats" )
125
+ all_params .append ("timestamp" )
126
+
127
+ for key , val in six .iteritems (local_var_params ["kwargs" ]):
128
+ if key not in all_params :
129
+ raise ApiTypeError (
130
+ "Got an unexpected keyword argument '%s'"
131
+ " to method create_bitcoin_estimate" % key
132
+ )
133
+ local_var_params [key ] = val
134
+ del local_var_params ["kwargs" ]
135
+ # verify the required parameter 'create_bitcoin_estimate_request' is set
136
+ if (
137
+ "create_bitcoin_estimate_request" not in local_var_params
138
+ or local_var_params ["create_bitcoin_estimate_request" ] is None
139
+ ):
140
+ raise ApiValueError (
141
+ "Missing the required parameter `create_bitcoin_estimate_request` when calling `create_bitcoin_estimate`"
142
+ ) # noqa: E501
143
+
144
+ collection_formats = {}
145
+
146
+ path_params = {}
147
+
148
+ query_params = []
149
+ for key in kwargs :
150
+ query_params .append ([key , kwargs .get (key )])
151
+
152
+ header_params = {}
153
+
154
+ form_params = []
155
+ local_var_files = {}
156
+
157
+ body_params = None
158
+ if "create_bitcoin_estimate_request" in local_var_params :
159
+ body_params = local_var_params ["create_bitcoin_estimate_request" ]
160
+ # HTTP header `Accept`
161
+ header_params ["Accept" ] = self .api_client .select_header_accept (
162
+ ["application/json" ]
163
+ ) # noqa: E501
164
+
165
+ # HTTP header `Content-Type`
166
+ header_params [
167
+ "Content-Type"
168
+ ] = self .api_client .select_header_content_type ( # noqa: E501
169
+ ["application/json" ]
170
+ ) # noqa: E501
171
+
172
+ # Authentication setting
173
+ auth_settings = ["bearer_auth" ] # noqa: E501
174
+
175
+ return self .api_client .call_api (
176
+ "/v1/estimates/crypto/btc" ,
177
+ "POST" ,
178
+ path_params ,
179
+ query_params ,
180
+ header_params ,
181
+ body = body_params ,
182
+ post_params = form_params ,
183
+ files = local_var_files ,
184
+ response_type = "EstimateResponse" , # noqa: E501
185
+ auth_settings = auth_settings ,
186
+ async_req = local_var_params .get ("async_req" ),
187
+ _return_http_data_only = local_var_params .get (
188
+ "_return_http_data_only"
189
+ ), # noqa: E501
190
+ _preload_content = local_var_params .get ("_preload_content" , True ),
191
+ _request_timeout = local_var_params .get ("_request_timeout" ),
192
+ collection_formats = collection_formats ,
193
+ )
194
+
48
195
def create_flight_estimate (
49
196
self , create_flight_estimate_request = {}, ** kwargs
50
197
): # noqa: E501
@@ -119,6 +266,8 @@ def create_flight_estimate_with_http_info(
119
266
all_params .append ("make" )
120
267
all_params .append ("model" )
121
268
all_params .append ("year" )
269
+ all_params .append ("transaction_value_btc_sats" )
270
+ all_params .append ("timestamp" )
122
271
123
272
for key , val in six .iteritems (local_var_params ["kwargs" ]):
124
273
if key not in all_params :
@@ -262,6 +411,8 @@ def create_mass_estimate_with_http_info(
262
411
all_params .append ("make" )
263
412
all_params .append ("model" )
264
413
all_params .append ("year" )
414
+ all_params .append ("transaction_value_btc_sats" )
415
+ all_params .append ("timestamp" )
265
416
266
417
for key , val in six .iteritems (local_var_params ["kwargs" ]):
267
418
if key not in all_params :
@@ -405,6 +556,8 @@ def create_shipping_estimate_with_http_info(
405
556
all_params .append ("make" )
406
557
all_params .append ("model" )
407
558
all_params .append ("year" )
559
+ all_params .append ("transaction_value_btc_sats" )
560
+ all_params .append ("timestamp" )
408
561
409
562
for key , val in six .iteritems (local_var_params ["kwargs" ]):
410
563
if key not in all_params :
@@ -548,6 +701,8 @@ def create_vehicle_estimate_with_http_info(
548
701
all_params .append ("make" )
549
702
all_params .append ("model" )
550
703
all_params .append ("year" )
704
+ all_params .append ("transaction_value_btc_sats" )
705
+ all_params .append ("timestamp" )
551
706
552
707
for key , val in six .iteritems (local_var_params ["kwargs" ]):
553
708
if key not in all_params :
@@ -685,6 +840,8 @@ def retrieve_estimate_with_http_info(self, id, **kwargs): # noqa: E501
685
840
all_params .append ("make" )
686
841
all_params .append ("model" )
687
842
all_params .append ("year" )
843
+ all_params .append ("transaction_value_btc_sats" )
844
+ all_params .append ("timestamp" )
688
845
689
846
for key , val in six .iteritems (local_var_params ["kwargs" ]):
690
847
if key not in all_params :
@@ -812,6 +969,8 @@ def retrieve_estimates_with_http_info(self, **kwargs): # noqa: E501
812
969
all_params .append ("make" )
813
970
all_params .append ("model" )
814
971
all_params .append ("year" )
972
+ all_params .append ("transaction_value_btc_sats" )
973
+ all_params .append ("timestamp" )
815
974
816
975
for key , val in six .iteritems (local_var_params ["kwargs" ]):
817
976
if key not in all_params :
0 commit comments