@@ -52,6 +52,12 @@ class EstimatesApi(object):
52
52
"cabin_class" ,
53
53
"passenger_count" ,
54
54
"state" ,
55
+ "country_code" ,
56
+ "city" ,
57
+ "region" ,
58
+ "star_rating" ,
59
+ "number_of_nights" ,
60
+ "number_of_rooms" ,
55
61
]
56
62
57
63
def __init__ (self , api_client = None ):
@@ -144,6 +150,12 @@ def create_bitcoin_estimate_with_http_info(
144
150
all_params .append ("cabin_class" )
145
151
all_params .append ("passenger_count" )
146
152
all_params .append ("state" )
153
+ all_params .append ("country_code" )
154
+ all_params .append ("city" )
155
+ all_params .append ("region" )
156
+ all_params .append ("star_rating" )
157
+ all_params .append ("number_of_nights" )
158
+ all_params .append ("number_of_rooms" )
147
159
148
160
for key , val in six .iteritems (local_var_params ["kwargs" ]):
149
161
if key not in all_params :
@@ -307,6 +319,12 @@ def create_ethereum_estimate_with_http_info(
307
319
all_params .append ("cabin_class" )
308
320
all_params .append ("passenger_count" )
309
321
all_params .append ("state" )
322
+ all_params .append ("country_code" )
323
+ all_params .append ("city" )
324
+ all_params .append ("region" )
325
+ all_params .append ("star_rating" )
326
+ all_params .append ("number_of_nights" )
327
+ all_params .append ("number_of_rooms" )
310
328
311
329
for key , val in six .iteritems (local_var_params ["kwargs" ]):
312
330
if key not in all_params :
@@ -470,6 +488,12 @@ def create_flight_estimate_with_http_info(
470
488
all_params .append ("cabin_class" )
471
489
all_params .append ("passenger_count" )
472
490
all_params .append ("state" )
491
+ all_params .append ("country_code" )
492
+ all_params .append ("city" )
493
+ all_params .append ("region" )
494
+ all_params .append ("star_rating" )
495
+ all_params .append ("number_of_nights" )
496
+ all_params .append ("number_of_rooms" )
473
497
474
498
for key , val in six .iteritems (local_var_params ["kwargs" ]):
475
499
if key not in all_params :
@@ -546,6 +570,175 @@ def create_flight_estimate_with_http_info(
546
570
collection_formats = collection_formats ,
547
571
)
548
572
573
+ def create_hotel_estimate (
574
+ self , create_hotel_estimate_request = {}, ** kwargs
575
+ ): # noqa: E501
576
+ """Create a hotel estimate. # noqa: E501
577
+
578
+ Creates a hotel estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters. # noqa: E501
579
+ This method makes a synchronous HTTP request by default. To make an
580
+ asynchronous HTTP request, please pass async_req=True
581
+ >>> thread = api.create_hotel_estimate(create_hotel_estimate_request, async_req=True)
582
+ >>> result = thread.get()
583
+
584
+ :param async_req bool: execute request asynchronously
585
+ :param CreateHotelEstimateRequest create_hotel_estimate_request: (required)
586
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
587
+ be returned without reading/decoding response
588
+ data. Default is True.
589
+ :param _request_timeout: timeout setting for this request. If one
590
+ number provided, it will be total request
591
+ timeout. It can also be a pair (tuple) of
592
+ (connection, read) timeouts.
593
+ :return: EstimateResponse
594
+ If the method is called asynchronously,
595
+ returns the request thread.
596
+ """
597
+ kwargs ["_return_http_data_only" ] = True
598
+ return self .create_hotel_estimate_with_http_info (
599
+ create_hotel_estimate_request , ** kwargs
600
+ ) # noqa: E501
601
+
602
+ def create_hotel_estimate_with_http_info (
603
+ self , create_hotel_estimate_request , ** kwargs
604
+ ): # noqa: E501
605
+ """Create a hotel estimate. # noqa: E501
606
+
607
+ Creates a hotel estimate for the amount of CO2 to be compensated. An order in the `draft` state may be created based on the parameters. # noqa: E501
608
+ This method makes a synchronous HTTP request by default. To make an
609
+ asynchronous HTTP request, please pass async_req=True
610
+ >>> thread = api.create_hotel_estimate_with_http_info(create_hotel_estimate_request, async_req=True)
611
+ >>> result = thread.get()
612
+
613
+ :param async_req bool: execute request asynchronously
614
+ :param CreateHotelEstimateRequest create_hotel_estimate_request: (required)
615
+ :param _return_http_data_only: response data without head status code
616
+ and headers
617
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
618
+ be returned without reading/decoding response
619
+ data. Default is True.
620
+ :param _request_timeout: timeout setting for this request. If one
621
+ number provided, it will be total request
622
+ timeout. It can also be a pair (tuple) of
623
+ (connection, read) timeouts.
624
+ :return: tuple(EstimateResponse, status_code(int), headers(HTTPHeaderDict))
625
+ If the method is called asynchronously,
626
+ returns the request thread.
627
+ """
628
+
629
+ local_var_params = locals ()
630
+
631
+ all_params = ["create_hotel_estimate_request" ] # noqa: E501
632
+ all_params .append ("async_req" )
633
+ all_params .append ("_return_http_data_only" )
634
+ all_params .append ("_preload_content" )
635
+ all_params .append ("_request_timeout" )
636
+ all_params .append ("mass_g" )
637
+ all_params .append ("total_price_cents_usd" )
638
+ all_params .append ("project_id" )
639
+ all_params .append ("metadata" )
640
+ all_params .append ("distance_m" )
641
+ all_params .append ("transportation_method" )
642
+ all_params .append ("package_mass_g" )
643
+ all_params .append ("create_order" )
644
+ all_params .append ("make" )
645
+ all_params .append ("model" )
646
+ all_params .append ("year" )
647
+ all_params .append ("transaction_value_btc_sats" )
648
+ all_params .append ("transaction_value_eth_gwei" )
649
+ all_params .append ("gas_used" )
650
+ all_params .append ("transaction_value_btc_sats" )
651
+ all_params .append ("average_daily_balance_btc_sats" )
652
+ all_params .append ("average_daily_balance_eth_gwei" )
653
+ all_params .append ("timestamp" )
654
+ all_params .append ("origin_airport" )
655
+ all_params .append ("destination_airport" )
656
+ all_params .append ("aircraft_code" )
657
+ all_params .append ("cabin_class" )
658
+ all_params .append ("passenger_count" )
659
+ all_params .append ("state" )
660
+ all_params .append ("country_code" )
661
+ all_params .append ("city" )
662
+ all_params .append ("region" )
663
+ all_params .append ("star_rating" )
664
+ all_params .append ("number_of_nights" )
665
+ all_params .append ("number_of_rooms" )
666
+
667
+ for key , val in six .iteritems (local_var_params ["kwargs" ]):
668
+ if key not in all_params :
669
+ raise ApiTypeError (
670
+ "Got an unexpected keyword argument '%s'"
671
+ " to method create_hotel_estimate" % key
672
+ )
673
+ local_var_params [key ] = val
674
+ del local_var_params ["kwargs" ]
675
+ # verify the required parameter 'create_hotel_estimate_request' is set
676
+ if (
677
+ "create_hotel_estimate_request" not in local_var_params
678
+ or local_var_params ["create_hotel_estimate_request" ] is None
679
+ ):
680
+ raise ApiValueError (
681
+ "Missing the required parameter `create_hotel_estimate_request` when calling `create_hotel_estimate`"
682
+ ) # noqa: E501
683
+
684
+ collection_formats = {}
685
+
686
+ path_params = {}
687
+
688
+ query_params = []
689
+
690
+ # do not add duplicate keys to query_params list
691
+ existing_keys = []
692
+ for param in query_params :
693
+ existing_keys .append (param [0 ])
694
+
695
+ for key in kwargs :
696
+ if key not in existing_keys :
697
+ query_params .append ([key , kwargs .get (key )])
698
+
699
+ header_params = {}
700
+
701
+ form_params = []
702
+ local_var_files = {}
703
+
704
+ body_params = None
705
+ if "create_hotel_estimate_request" in local_var_params :
706
+ body_params = local_var_params ["create_hotel_estimate_request" ]
707
+ # HTTP header `Accept`
708
+ header_params ["Accept" ] = self .api_client .select_header_accept (
709
+ ["application/json" ]
710
+ ) # noqa: E501
711
+
712
+ # HTTP header `Content-Type`
713
+ header_params [
714
+ "Content-Type"
715
+ ] = self .api_client .select_header_content_type ( # noqa: E501
716
+ ["application/json" ]
717
+ ) # noqa: E501
718
+
719
+ # Authentication setting
720
+ auth_settings = ["bearer_auth" ] # noqa: E501
721
+
722
+ return self .api_client .call_api (
723
+ "/v1/estimates/hotel" ,
724
+ "POST" ,
725
+ path_params ,
726
+ query_params ,
727
+ header_params ,
728
+ body = body_params ,
729
+ post_params = form_params ,
730
+ files = local_var_files ,
731
+ response_type = "EstimateResponse" , # noqa: E501
732
+ auth_settings = auth_settings ,
733
+ async_req = local_var_params .get ("async_req" ),
734
+ _return_http_data_only = local_var_params .get (
735
+ "_return_http_data_only"
736
+ ), # noqa: E501
737
+ _preload_content = local_var_params .get ("_preload_content" , True ),
738
+ _request_timeout = local_var_params .get ("_request_timeout" ),
739
+ collection_formats = collection_formats ,
740
+ )
741
+
549
742
def create_mass_estimate (
550
743
self , create_mass_estimate_request = {}, ** kwargs
551
744
): # noqa: E501
@@ -633,6 +826,12 @@ def create_mass_estimate_with_http_info(
633
826
all_params .append ("cabin_class" )
634
827
all_params .append ("passenger_count" )
635
828
all_params .append ("state" )
829
+ all_params .append ("country_code" )
830
+ all_params .append ("city" )
831
+ all_params .append ("region" )
832
+ all_params .append ("star_rating" )
833
+ all_params .append ("number_of_nights" )
834
+ all_params .append ("number_of_rooms" )
636
835
637
836
for key , val in six .iteritems (local_var_params ["kwargs" ]):
638
837
if key not in all_params :
@@ -796,6 +995,12 @@ def create_shipping_estimate_with_http_info(
796
995
all_params .append ("cabin_class" )
797
996
all_params .append ("passenger_count" )
798
997
all_params .append ("state" )
998
+ all_params .append ("country_code" )
999
+ all_params .append ("city" )
1000
+ all_params .append ("region" )
1001
+ all_params .append ("star_rating" )
1002
+ all_params .append ("number_of_nights" )
1003
+ all_params .append ("number_of_rooms" )
799
1004
800
1005
for key , val in six .iteritems (local_var_params ["kwargs" ]):
801
1006
if key not in all_params :
@@ -959,6 +1164,12 @@ def create_vehicle_estimate_with_http_info(
959
1164
all_params .append ("cabin_class" )
960
1165
all_params .append ("passenger_count" )
961
1166
all_params .append ("state" )
1167
+ all_params .append ("country_code" )
1168
+ all_params .append ("city" )
1169
+ all_params .append ("region" )
1170
+ all_params .append ("star_rating" )
1171
+ all_params .append ("number_of_nights" )
1172
+ all_params .append ("number_of_rooms" )
962
1173
963
1174
for key , val in six .iteritems (local_var_params ["kwargs" ]):
964
1175
if key not in all_params :
@@ -1116,6 +1327,12 @@ def retrieve_estimate_with_http_info(self, id, **kwargs): # noqa: E501
1116
1327
all_params .append ("cabin_class" )
1117
1328
all_params .append ("passenger_count" )
1118
1329
all_params .append ("state" )
1330
+ all_params .append ("country_code" )
1331
+ all_params .append ("city" )
1332
+ all_params .append ("region" )
1333
+ all_params .append ("star_rating" )
1334
+ all_params .append ("number_of_nights" )
1335
+ all_params .append ("number_of_rooms" )
1119
1336
1120
1337
for key , val in six .iteritems (local_var_params ["kwargs" ]):
1121
1338
if key not in all_params :
@@ -1263,6 +1480,12 @@ def retrieve_estimates_with_http_info(self, **kwargs): # noqa: E501
1263
1480
all_params .append ("cabin_class" )
1264
1481
all_params .append ("passenger_count" )
1265
1482
all_params .append ("state" )
1483
+ all_params .append ("country_code" )
1484
+ all_params .append ("city" )
1485
+ all_params .append ("region" )
1486
+ all_params .append ("star_rating" )
1487
+ all_params .append ("number_of_nights" )
1488
+ all_params .append ("number_of_rooms" )
1266
1489
1267
1490
for key , val in six .iteritems (local_var_params ["kwargs" ]):
1268
1491
if key not in all_params :
0 commit comments