diff --git a/docs/examples/try_me_out/anywhere_freight_pricing_forecast_explanation.ipynb b/docs/examples/try_me_out/anywhere_freight_pricing_forecast_explanation.ipynb index 82060ac5..4b1d9a0d 100644 --- a/docs/examples/try_me_out/anywhere_freight_pricing_forecast_explanation.ipynb +++ b/docs/examples/try_me_out/anywhere_freight_pricing_forecast_explanation.ipynb @@ -38,8 +38,8 @@ "source": [ "# Get monthly forecast explanation for a Handymax MR2 clean route from Rotterdam to Houston\n", "result = AnywhereFreightPricingForecastExplanation().search(\n", - " origin_port=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", - " destination_port=\"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n", + " origin=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", + " destination=\"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n", " vessel_class=\"oil_handymax_mr2\",\n", " product=\"clean\",\n", " frequency=\"month\",\n", diff --git a/docs/examples/try_me_out/anywhere_freight_pricing_forecast_timeseries.ipynb b/docs/examples/try_me_out/anywhere_freight_pricing_forecast_timeseries.ipynb index f32a20a1..635a70de 100644 --- a/docs/examples/try_me_out/anywhere_freight_pricing_forecast_timeseries.ipynb +++ b/docs/examples/try_me_out/anywhere_freight_pricing_forecast_timeseries.ipynb @@ -40,8 +40,8 @@ "# Get weekly forecast pricing for a Handymax MR2 clean route from Rotterdam to Houston\n", "routes = [\n", " {\n", - " \"origin_port\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", - " \"destination_port\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n", + " \"origin\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", + " \"destination\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n", " \"product\": \"clean\",\n", " \"vessel_class\": \"oil_handymax_mr2\",\n", " }\n", diff --git a/docs/examples/try_me_out/anywhere_freight_pricing_get_price_details.ipynb b/docs/examples/try_me_out/anywhere_freight_pricing_get_price_details.ipynb index 8a6c75dd..901a362d 100644 --- a/docs/examples/try_me_out/anywhere_freight_pricing_get_price_details.ipynb +++ b/docs/examples/try_me_out/anywhere_freight_pricing_get_price_details.ipynb @@ -41,8 +41,8 @@ "result = AnywhereFreightPricingGetPriceDetails().search(\n", " time_min=datetime(2024, 1, 1),\n", " time_max=datetime(2024, 12, 31),\n", - " origin_port=\"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n", - " destination_port=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", + " origin=\"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n", + " destination=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", " vessel_class=\"oil_aframax_lr2\",\n", " product=\"crude\",\n", " unit=\"usd_per_tonne\",\n", @@ -83,14 +83,19 @@ "
1 rows × 21 columns
\n", "" ], "text/plain": [ " vessel_class max_dwt suggested_tonnage suggested_tonnage_overridden \\\n", "0 oil_aframax_lr2 119999.0 85000.0 False \n", "\n", - " avoid_zone via_waypoint rates \\\n", - "0 None None [{'date': '2024-01-01', 'breakdown': [{'type':... \n", + " avoid_zone rates \\\n", + "0 None [{'date': '2024-01-01', 'breakdown': [{'type':... \n", "\n", " lumpsums \\\n", "0 [{'date': '2024-01-01', 'breakdown': [{'type':... \n", @@ -133,14 +144,25 @@ " confidences product \\\n", "0 [{'date': '2024-01-01', 'value': 2}, {'date': ... crude \n", "\n", - " origin_port.id origin_port.lat \\\n", - "0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... 29.71926 \n", + " origin.id ... origin.lon \\\n", + "0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... ... -95.14733 \n", + "\n", + " origin_port.id origin_port.lat \\\n", + "0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... 29.71926 \n", "\n", - " origin_port.lon destination_port.id \\\n", + " origin_port.lon destination.id \\\n", "0 -95.14733 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... \n", "\n", - " destination_port.lat destination_port.lon \n", - "0 51.90924 4.27941 " + " destination.lat destination.lon \\\n", + "0 51.90924 4.27941 \n", + "\n", + " destination_port.id destination_port.lat \\\n", + "0 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... 51.90924 \n", + "\n", + " destination_port.lon \n", + "0 4.27941 \n", + "\n", + "[1 rows x 21 columns]" ] }, "execution_count": 3, diff --git a/docs/examples/try_me_out/anywhere_freight_pricing_post_price_details.ipynb b/docs/examples/try_me_out/anywhere_freight_pricing_post_price_details.ipynb index 25699129..8acd0a9c 100644 --- a/docs/examples/try_me_out/anywhere_freight_pricing_post_price_details.ipynb +++ b/docs/examples/try_me_out/anywhere_freight_pricing_post_price_details.ipynb @@ -40,14 +40,14 @@ "# Get price details for multiple routes\n", "routes = [\n", " {\n", - " \"origin_port\": \"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n", - " \"destination_port\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", + " \"origin\": \"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n", + " \"destination\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", " \"product\": \"crude\",\n", " \"vessel_class\": \"oil_aframax_lr2\",\n", " },\n", " {\n", - " \"origin_port\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", - " \"destination_port\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n", + " \"origin\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", + " \"destination\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n", " \"product\": \"clean\",\n", " \"vessel_class\": \"oil_handymax_mr2\",\n", " }\n", @@ -92,14 +92,19 @@ "2 rows × 21 columns
\n", "" ], "text/plain": [ @@ -153,9 +169,9 @@ "0 oil_aframax_lr2 119999.0 85000.0 \n", "1 oil_handymax_mr2 54999.0 37000.0 \n", "\n", - " suggested_tonnage_overridden avoid_zone via_waypoint \\\n", - "0 False None None \n", - "1 False None None \n", + " suggested_tonnage_overridden avoid_zone \\\n", + "0 False None \n", + "1 False None \n", "\n", " rates \\\n", "0 [{'date': '2024-01-01', 'breakdown': [{'type':... \n", @@ -169,17 +185,31 @@ "0 [{'date': '2024-01-01', 'value': 2}, {'date': ... crude \n", "1 [{'date': '2024-01-01', 'value': 3}, {'date': ... clean \n", "\n", - " origin_port.id origin_port.lat \\\n", - "0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... 29.71926 \n", - "1 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... 51.90924 \n", + " origin.id ... origin.lon \\\n", + "0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... ... -95.14733 \n", + "1 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... ... 4.27941 \n", + "\n", + " origin_port.id origin_port.lat \\\n", + "0 7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030e... 29.71926 \n", + "1 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... 51.90924 \n", "\n", - " origin_port.lon destination_port.id \\\n", + " origin_port.lon destination.id \\\n", "0 -95.14733 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... \n", "1 4.27941 ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da... \n", "\n", - " destination_port.lat destination_port.lon \n", - "0 51.90924 4.27941 \n", - "1 40.68878 -74.05066 " + " destination.lat destination.lon \\\n", + "0 51.90924 4.27941 \n", + "1 40.68878 -74.05066 \n", + "\n", + " destination_port.id destination_port.lat \\\n", + "0 68faf65af1345067f11dc6723b8da32f00e304a6f33c00... 51.90924 \n", + "1 ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da... 40.68878 \n", + "\n", + " destination_port.lon \n", + "0 4.27941 \n", + "1 -74.05066 \n", + "\n", + "[2 rows x 21 columns]" ] }, "execution_count": 3, @@ -197,13 +227,6 @@ "source": [ "That's it! You've successfully loaded data using the Vortexa SDK. Check out https://vortechsa.github.io/python-sdk/ for more examples" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/docs/examples/try_me_out/anywhere_freight_pricing_price_timeseries.ipynb b/docs/examples/try_me_out/anywhere_freight_pricing_price_timeseries.ipynb index 4f6aaa21..b441fca6 100644 --- a/docs/examples/try_me_out/anywhere_freight_pricing_price_timeseries.ipynb +++ b/docs/examples/try_me_out/anywhere_freight_pricing_price_timeseries.ipynb @@ -40,8 +40,8 @@ "# Get daily pricing for a Handymax MR2 clean route from Rotterdam to New York\n", "routes = [\n", " {\n", - " \"origin_port\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", - " \"destination_port\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n", + " \"origin\": \"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", + " \"destination\": \"ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb\",\n", " \"product\": \"clean\",\n", " \"vessel_class\": \"oil_handymax_mr2\",\n", " }\n", diff --git a/docs/examples/try_me_out/anywhere_freight_pricing_top_ports_destination.ipynb b/docs/examples/try_me_out/anywhere_freight_pricing_top_ports_destination.ipynb index 265bc573..7da52e3b 100644 --- a/docs/examples/try_me_out/anywhere_freight_pricing_top_ports_destination.ipynb +++ b/docs/examples/try_me_out/anywhere_freight_pricing_top_ports_destination.ipynb @@ -38,7 +38,7 @@ "source": [ "# Get top destination ports for clean products from Houston using MR2 vessels\n", "result = AnywhereFreightPricingTopPortsDestination().search(\n", - " origin_id=\"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n", + " origin=\"7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f\",\n", " vessel_class=\"oil_handymax_mr2\",\n", " product=\"clean\",\n", " unit=\"usd_per_tonne\",\n", diff --git a/docs/examples/try_me_out/anywhere_freight_pricing_top_ports_origin.ipynb b/docs/examples/try_me_out/anywhere_freight_pricing_top_ports_origin.ipynb index ee17a117..4663fbb6 100644 --- a/docs/examples/try_me_out/anywhere_freight_pricing_top_ports_origin.ipynb +++ b/docs/examples/try_me_out/anywhere_freight_pricing_top_ports_origin.ipynb @@ -38,7 +38,7 @@ "source": [ "# Get top origin ports for clean products to Rotterdam using MR2 vessels\n", "result = AnywhereFreightPricingTopPortsOrigin().search(\n", - " destination_id=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", + " destination=\"68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e\",\n", " vessel_class=\"oil_handymax_mr2\",\n", " product=\"clean\",\n", " unit=\"usd_per_tonne\",\n", diff --git a/tests/endpoints/test_anywhere_freight_pricing_forecast_explanation.py b/tests/endpoints/test_anywhere_freight_pricing_forecast_explanation.py index 3dd3d7fd..afc26510 100644 --- a/tests/endpoints/test_anywhere_freight_pricing_forecast_explanation.py +++ b/tests/endpoints/test_anywhere_freight_pricing_forecast_explanation.py @@ -5,8 +5,8 @@ class TestAnywhereFreightPricingForecastExplanation(TestCaseUsingRealAPI): def test_search_returns_data(self): result = AnywhereFreightPricingForecastExplanation().search( - origin_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - destination_port="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + origin="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + destination="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", vessel_class="oil_handymax_mr2", product="clean", frequency="month", @@ -19,8 +19,8 @@ def test_search_returns_data(self): def test_search_to_df(self): result = AnywhereFreightPricingForecastExplanation().search( - origin_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - destination_port="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + origin="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + destination="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", vessel_class="oil_handymax_mr2", product="clean", frequency="month", @@ -33,8 +33,8 @@ def test_search_to_df(self): def test_search_with_week_frequency(self): result = AnywhereFreightPricingForecastExplanation().search( - origin_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - destination_port="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + origin="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + destination="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", vessel_class="oil_handymax_mr2", product="clean", frequency="week", @@ -47,8 +47,8 @@ def test_search_with_week_frequency(self): def test_search_with_avoid_zone(self): result = AnywhereFreightPricingForecastExplanation().search( - origin_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - destination_port="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + origin="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + destination="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", vessel_class="oil_handymax_mr2", product="clean", frequency="month", @@ -60,8 +60,8 @@ def test_search_with_avoid_zone(self): def test_search_with_include_port_costs(self): result = AnywhereFreightPricingForecastExplanation().search( - origin_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - destination_port="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + origin="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + destination="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", vessel_class="oil_handymax_mr2", product="clean", frequency="month", diff --git a/tests/endpoints/test_anywhere_freight_pricing_forecast_timeseries.py b/tests/endpoints/test_anywhere_freight_pricing_forecast_timeseries.py index 724d4488..6f615f4e 100644 --- a/tests/endpoints/test_anywhere_freight_pricing_forecast_timeseries.py +++ b/tests/endpoints/test_anywhere_freight_pricing_forecast_timeseries.py @@ -8,8 +8,8 @@ class TestAnywhereFreightPricingForecastTimeseries(TestCaseUsingRealAPI): def test_search_returns_data(self): routes = [ { - "origin_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - "destination_port": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + "origin": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + "destination": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", "product": "clean", "vessel_class": "oil_handymax_mr2", } @@ -25,8 +25,8 @@ def test_search_returns_data(self): result_list = result.to_list() assert len(result_list) > 0 - assert "origin_port" in result_list[0] - assert "destination_port" in result_list[0] + assert "origin" in result_list[0] + assert "destination" in result_list[0] assert "prices" in result_list[0] assert "lumpsums" in result_list[0] assert "suggested_tonnage" in result_list[0] @@ -34,8 +34,8 @@ def test_search_returns_data(self): def test_search_to_df(self): routes = [ { - "origin_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - "destination_port": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + "origin": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + "destination": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", "product": "clean", "vessel_class": "oil_handymax_mr2", } @@ -51,22 +51,22 @@ def test_search_to_df(self): df = result.to_df() assert len(df) > 0 - assert "origin_port" in df.columns - assert "destination_port" in df.columns + assert "origin" in df.columns + assert "destination" in df.columns assert "vessel_class" in df.columns assert "suggested_tonnage" in df.columns def test_search_multiple_routes(self): routes = [ { - "origin_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - "destination_port": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + "origin": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + "destination": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", "vessel_class": "oil_handymax_mr2", "product": "clean", }, { - "origin_port": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", - "destination_port": "57a5c821cdc0d9e7187ffc242cd8afd8e86e287b725c1949c65396b575cb5d1e", + "origin": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + "destination": "57a5c821cdc0d9e7187ffc242cd8afd8e86e287b725c1949c65396b575cb5d1e", "vessel_class": "oil_handymax_mr2", "product": "clean", }, diff --git a/tests/endpoints/test_anywhere_freight_pricing_get_price_details.py b/tests/endpoints/test_anywhere_freight_pricing_get_price_details.py index 3905558d..cbb043bb 100644 --- a/tests/endpoints/test_anywhere_freight_pricing_get_price_details.py +++ b/tests/endpoints/test_anywhere_freight_pricing_get_price_details.py @@ -9,8 +9,8 @@ def test_search_returns_data(self): result = AnywhereFreightPricingGetPriceDetails().search( time_min=datetime(2024, 1, 1), time_max=datetime(2024, 1, 31), - origin_port="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", - destination_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + origin="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + destination="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", vessel_class="oil_aframax_lr2", product="crude", unit="usd_per_tonne", @@ -18,8 +18,8 @@ def test_search_returns_data(self): result_list = result.to_list() assert len(result_list) > 0 - assert "origin_port" in result_list[0] - assert "destination_port" in result_list[0] + assert "origin" in result_list[0] + assert "destination" in result_list[0] assert "vessel_class" in result_list[0] assert "rates" in result_list[0] @@ -27,8 +27,8 @@ def test_search_to_df(self): result = AnywhereFreightPricingGetPriceDetails().search( time_min=datetime(2024, 1, 1), time_max=datetime(2024, 1, 31), - origin_port="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", - destination_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + origin="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + destination="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", vessel_class="oil_aframax_lr2", product="crude", unit="usd_per_tonne", @@ -37,16 +37,16 @@ def test_search_to_df(self): df = result.to_df() assert len(df) > 0 # pd.json_normalize uses dot notation for nested keys - assert "origin_port.id" in df.columns - assert "destination_port.id" in df.columns + assert "origin.id" in df.columns + assert "destination.id" in df.columns assert "vessel_class" in df.columns def test_search_with_avoid_zone(self): result = AnywhereFreightPricingGetPriceDetails().search( time_min=datetime(2024, 1, 1), time_max=datetime(2024, 1, 31), - origin_port="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", - destination_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + origin="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + destination="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", vessel_class="oil_aframax_lr2", product="crude", unit="usd_per_tonne", diff --git a/tests/endpoints/test_anywhere_freight_pricing_post_price_details.py b/tests/endpoints/test_anywhere_freight_pricing_post_price_details.py index 20423acf..a816ef93 100644 --- a/tests/endpoints/test_anywhere_freight_pricing_post_price_details.py +++ b/tests/endpoints/test_anywhere_freight_pricing_post_price_details.py @@ -8,8 +8,8 @@ class TestAnywhereFreightPricingPostPriceDetails(TestCaseUsingRealAPI): def test_search_returns_data(self): routes = [ { - "origin_port": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", - "destination_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + "origin": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + "destination": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", "product": "crude", "vessel_class": "oil_aframax_lr2", } @@ -24,16 +24,16 @@ def test_search_returns_data(self): result_list = result.to_list() assert len(result_list) > 0 - assert "origin_port" in result_list[0] - assert "destination_port" in result_list[0] + assert "origin" in result_list[0] + assert "destination" in result_list[0] assert "vessel_class" in result_list[0] assert "rates" in result_list[0] def test_search_to_df(self): routes = [ { - "origin_port": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", - "destination_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + "origin": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + "destination": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", "product": "crude", "vessel_class": "oil_aframax_lr2", } @@ -49,21 +49,21 @@ def test_search_to_df(self): df = result.to_df() assert len(df) > 0 # pd.json_normalize uses dot notation for nested keys - assert "origin_port.id" in df.columns - assert "destination_port.id" in df.columns + assert "origin.id" in df.columns + assert "destination.id" in df.columns assert "vessel_class" in df.columns def test_search_multiple_routes(self): routes = [ { - "origin_port": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", - "destination_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + "origin": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + "destination": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", "product": "crude", "vessel_class": "oil_aframax_lr2", }, { - "origin_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - "destination_port": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + "origin": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + "destination": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", "product": "clean", "vessel_class": "oil_handymax_mr2", }, @@ -82,8 +82,8 @@ def test_search_multiple_routes(self): def test_search_with_avoid_zone(self): routes = [ { - "origin_port": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", - "destination_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + "origin": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + "destination": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", "product": "crude", "vessel_class": "oil_aframax_lr2", "avoid_zone": ["Suez Canal"], diff --git a/tests/endpoints/test_anywhere_freight_pricing_price_timeseries.py b/tests/endpoints/test_anywhere_freight_pricing_price_timeseries.py index 6355ac53..c3696043 100644 --- a/tests/endpoints/test_anywhere_freight_pricing_price_timeseries.py +++ b/tests/endpoints/test_anywhere_freight_pricing_price_timeseries.py @@ -8,8 +8,8 @@ class TestAnywhereFreightPricingPriceTimeseries(TestCaseUsingRealAPI): def test_search_returns_data(self): routes = [ { - "origin_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - "destination_port": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + "origin": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + "destination": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", "product": "clean", "vessel_class": "oil_handymax_mr2", } @@ -25,15 +25,15 @@ def test_search_returns_data(self): result_list = result.to_list() assert len(result_list) > 0 - assert "origin_port" in result_list[0] - assert "destination_port" in result_list[0] + assert "origin" in result_list[0] + assert "destination" in result_list[0] assert "prices" in result_list[0] def test_search_to_df(self): routes = [ { - "origin_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - "destination_port": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + "origin": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + "destination": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", "product": "clean", "vessel_class": "oil_handymax_mr2", } @@ -50,6 +50,6 @@ def test_search_to_df(self): df = result.to_df() assert len(df) > 0 # Top-level keys preserved, nested arrays like prices stay as lists - assert "origin_port" in df.columns - assert "destination_port" in df.columns + assert "origin" in df.columns + assert "destination" in df.columns assert "vessel_class" in df.columns diff --git a/tests/endpoints/test_anywhere_freight_pricing_top_ports_destination.py b/tests/endpoints/test_anywhere_freight_pricing_top_ports_destination.py index 2955f047..2bf29675 100644 --- a/tests/endpoints/test_anywhere_freight_pricing_top_ports_destination.py +++ b/tests/endpoints/test_anywhere_freight_pricing_top_ports_destination.py @@ -5,7 +5,7 @@ class TestAnywhereFreightPricingTopPortsDestination(TestCaseUsingRealAPI): def test_search_returns_data(self): result = AnywhereFreightPricingTopPortsDestination().search( - origin_id="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + origin="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", vessel_class="oil_handymax_mr2", product="clean", unit="usd_per_tonne", @@ -20,7 +20,7 @@ def test_search_returns_data(self): def test_search_to_df(self): result = AnywhereFreightPricingTopPortsDestination().search( - origin_id="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + origin="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", vessel_class="oil_handymax_mr2", product="clean", unit="usd_per_tonne", @@ -34,7 +34,7 @@ def test_search_to_df(self): def test_search_with_avoid_zone(self): result = AnywhereFreightPricingTopPortsDestination().search( - origin_id="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + origin="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", vessel_class="oil_handymax_mr2", product="clean", unit="usd_per_tonne", diff --git a/tests/endpoints/test_anywhere_freight_pricing_top_ports_origin.py b/tests/endpoints/test_anywhere_freight_pricing_top_ports_origin.py index 7e698ab1..e6c0c772 100644 --- a/tests/endpoints/test_anywhere_freight_pricing_top_ports_origin.py +++ b/tests/endpoints/test_anywhere_freight_pricing_top_ports_origin.py @@ -5,7 +5,7 @@ class TestAnywhereFreightPricingTopPortsOrigin(TestCaseUsingRealAPI): def test_search_returns_data(self): result = AnywhereFreightPricingTopPortsOrigin().search( - destination_id="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + destination="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", vessel_class="oil_handymax_mr2", product="clean", unit="usd_per_tonne", @@ -20,7 +20,7 @@ def test_search_returns_data(self): def test_search_to_df(self): result = AnywhereFreightPricingTopPortsOrigin().search( - destination_id="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + destination="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", vessel_class="oil_handymax_mr2", product="clean", unit="usd_per_tonne", @@ -34,7 +34,7 @@ def test_search_to_df(self): def test_search_with_avoid_zone(self): result = AnywhereFreightPricingTopPortsOrigin().search( - destination_id="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + destination="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", vessel_class="oil_handymax_mr2", product="clean", unit="usd_per_tonne", diff --git a/vortexasdk/endpoints/anywhere_freight_pricing_forecast_explanation.py b/vortexasdk/endpoints/anywhere_freight_pricing_forecast_explanation.py index 63ecd640..538a42fe 100644 --- a/vortexasdk/endpoints/anywhere_freight_pricing_forecast_explanation.py +++ b/vortexasdk/endpoints/anywhere_freight_pricing_forecast_explanation.py @@ -44,8 +44,8 @@ def __init__(self) -> None: def search( self, - origin_port: str, - destination_port: str, + origin: str, + destination: str, vessel_class: AfpForecastVesselClass, product: AfpProduct, frequency: AfpExplanationFrequency = "month_fixed", @@ -60,9 +60,9 @@ def search( # Arguments - origin_port: Geographic ID of the origin port. + origin: Geographic ID of the origin port. - destination_port: Geographic ID of the destination port. + destination: Geographic ID of the destination port. vessel_class: The vessel class for the route. Must be one of: `'oil_coastal'`, `'oil_specialised'`, `'oil_handysize_mr1'`, @@ -91,8 +91,8 @@ def search( ```python >>> from vortexasdk import AnywhereFreightPricingForecastExplanation >>> result = AnywhereFreightPricingForecastExplanation().search( - ... origin_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - ... destination_port="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + ... origin="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + ... destination="ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", ... vessel_class="oil_handymax_mr2", ... product="clean", ... frequency="month", @@ -115,12 +115,12 @@ def search( """ logger.info( f"Fetching Anywhere Freight Pricing forecast explanation for route " - f"{origin_port} -> {destination_port}" + f"{origin} -> {destination}" ) params: Dict[str, Any] = { - "origin_port": origin_port, - "destination_port": destination_port, + "origin": origin, + "destination": destination, "vessel_class": vessel_class, "product": product, "frequency": frequency, diff --git a/vortexasdk/endpoints/anywhere_freight_pricing_forecast_timeseries.py b/vortexasdk/endpoints/anywhere_freight_pricing_forecast_timeseries.py index fcf5fa1c..6bdd5ca3 100644 --- a/vortexasdk/endpoints/anywhere_freight_pricing_forecast_timeseries.py +++ b/vortexasdk/endpoints/anywhere_freight_pricing_forecast_timeseries.py @@ -53,8 +53,8 @@ def search( # Arguments routes: A list of route dictionaries. Each route must contain: - - `origin_port` (str, required): Geographical ID of the origin port. - - `destination_port` (str, required): Geographical ID of the destination port. + - `origin` (str, required): Geographical ID of the origin port. + - `destination` (str, required): Geographical ID of the destination port. - `product` (str, required): One of `'clean'`, `'dirty'`, `'crude'`. - `vessel_class` (str, required): One of `'oil_coastal'`, `'oil_specialised'`, `'oil_handysize_mr1'`, `'oil_handymax_mr2'`, `'oil_panamax_lr1'`, @@ -89,8 +89,8 @@ def search( >>> from datetime import datetime >>> routes = [ ... { - ... "origin_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - ... "destination_port": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + ... "origin": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + ... "destination": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", ... "product": "clean", ... "vessel_class": "oil_handymax_mr2", ... } @@ -108,7 +108,7 @@ def search( Returns a DataFrame with columns: - | | origin_port | destination_port | vessel_class | product | prices | lumpsums | suggested_tonnage | + | | origin | destination | vessel_class | product | prices | lumpsums | suggested_tonnage | |---:|:------------|:-----------------|:-----------------|:--------|:----------------------------|:----------------------------|------------------:| | 0 | 68faf65a... | ea4921c8... | oil_handymax_mr2 | clean | [{'date': '2026-06-01', ...}] | [{'date': '2026-06-01', ...}] | 37000.0 | diff --git a/vortexasdk/endpoints/anywhere_freight_pricing_get_price_details.py b/vortexasdk/endpoints/anywhere_freight_pricing_get_price_details.py index a9487f7f..29ac42fa 100644 --- a/vortexasdk/endpoints/anywhere_freight_pricing_get_price_details.py +++ b/vortexasdk/endpoints/anywhere_freight_pricing_get_price_details.py @@ -44,8 +44,8 @@ def search( self, time_min: datetime, time_max: datetime, - origin_port: str, - destination_port: str, + origin: str, + destination: str, vessel_class: AfpVesselClass, product: AfpProduct, unit: AfpUnit = "usd_per_tonne", @@ -64,9 +64,9 @@ def search( time_max: The UTC end date of the time filter. - origin_port: Geographic ID of the origin port. + origin: Geographic ID of the origin port. - destination_port: Geographic ID of the destination port. + destination: Geographic ID of the destination port. vessel_class: The vessel class for the route. Must be one of: `'oil_coastal'`, `'oil_specialised'`, `'oil_handysize_mr1'`, @@ -96,8 +96,8 @@ def search( >>> result = AnywhereFreightPricingGetPriceDetails().search( ... time_min=datetime(2024, 1, 1), ... time_max=datetime(2024, 12, 31), - ... origin_port="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", - ... destination_port="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + ... origin="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + ... destination="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", ... vessel_class="oil_aframax_lr2", ... product="crude", ... unit="usd_per_tonne", @@ -116,14 +116,14 @@ def search( """ logger.info( f"Fetching Anywhere Freight Pricing price details for route " - f"{origin_port} -> {destination_port}" + f"{origin} -> {destination}" ) params: Dict[str, Any] = { "time_min": to_date_string(time_min), "time_max": to_date_string(time_max), - "origin_port": origin_port, - "destination_port": destination_port, + "origin": origin, + "destination": destination, "vessel_class": vessel_class, "product": product, "unit": unit, diff --git a/vortexasdk/endpoints/anywhere_freight_pricing_post_price_details.py b/vortexasdk/endpoints/anywhere_freight_pricing_post_price_details.py index 5e5cf58d..37f5daf0 100644 --- a/vortexasdk/endpoints/anywhere_freight_pricing_post_price_details.py +++ b/vortexasdk/endpoints/anywhere_freight_pricing_post_price_details.py @@ -53,8 +53,8 @@ def search( # Arguments routes: A list of route dictionaries. Each route must contain: - - `origin_port` (str, required): Geographical ID of the origin port. - - `destination_port` (str, required): Geographical ID of the destination port. + - `origin` (str, required): Geographical ID of the origin port. + - `destination` (str, required): Geographical ID of the destination port. - `product` (str, required): One of `'clean'`, `'dirty'`, `'crude'`. - `vessel_class` (str, required): One of `'oil_coastal'`, `'oil_specialised'`, `'oil_handysize_mr1'`, `'oil_handymax_mr2'`, `'oil_panamax_lr1'`, @@ -81,14 +81,14 @@ def search( >>> from datetime import datetime >>> routes = [ ... { - ... "origin_port": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", - ... "destination_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + ... "origin": "7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + ... "destination": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", ... "product": "crude", ... "vessel_class": "oil_aframax_lr2", ... }, ... { - ... "origin_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - ... "destination_port": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + ... "origin": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + ... "destination": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", ... "product": "clean", ... "vessel_class": "oil_handymax_mr2", ... } diff --git a/vortexasdk/endpoints/anywhere_freight_pricing_price_timeseries.py b/vortexasdk/endpoints/anywhere_freight_pricing_price_timeseries.py index a68a38ea..40b14ce5 100644 --- a/vortexasdk/endpoints/anywhere_freight_pricing_price_timeseries.py +++ b/vortexasdk/endpoints/anywhere_freight_pricing_price_timeseries.py @@ -53,8 +53,8 @@ def search( # Arguments routes: A list of route dictionaries. Each route must contain: - - `origin_port` (str, required): Geographical ID of the origin port. - - `destination_port` (str, required): Geographical ID of the destination port. + - `origin` (str, required): Geographical ID of the origin port. + - `destination` (str, required): Geographical ID of the destination port. - `product` (str, required): One of `'clean'`, `'dirty'`, `'crude'`. - `vessel_class` (str, required): One of `'oil_coastal'`, `'oil_specialised'`, `'oil_handysize_mr1'`, `'oil_handymax_mr2'`, `'oil_panamax_lr1'`, @@ -85,8 +85,8 @@ def search( >>> from datetime import datetime >>> routes = [ ... { - ... "origin_port": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", - ... "destination_port": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", + ... "origin": "68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + ... "destination": "ea4921c8ad4fddb5fe3e7a4f834c1aa5863e43283c73da5f02d93bbc5dba72eb", ... "product": "clean", ... "vessel_class": "oil_handymax_mr2", ... } @@ -104,7 +104,7 @@ def search( Returns a DataFrame with columns: - | | origin_port | destination_port | vessel_class | product | date | price | price_lower | price_upper | voyage_price | + | | origin | destination | vessel_class | product | date | price | price_lower | price_upper | voyage_price | |---:|:------------|:-----------------|:---------------------|:--------|:-----------|------:|------------:|------------:|-------------- :| | 0 | 68faf65a... | ea4921c8... | oil_handymax_mr2 | clean | 2026-02-20 | 15.50 | 14.00 | 17.00 | 16.223888 | | 1 | 68faf65a... | ea4921c8... | oil_handymax_mr2 | clean | 2026-02-21 | 16.20 | 14.80 | 17.60 | 16.223888 | diff --git a/vortexasdk/endpoints/anywhere_freight_pricing_top_ports_destination.py b/vortexasdk/endpoints/anywhere_freight_pricing_top_ports_destination.py index 31b618e7..83164ebf 100644 --- a/vortexasdk/endpoints/anywhere_freight_pricing_top_ports_destination.py +++ b/vortexasdk/endpoints/anywhere_freight_pricing_top_ports_destination.py @@ -40,7 +40,7 @@ def __init__(self) -> None: def search( self, - origin_id: str, + origin: str, vessel_class: AfpVesselClass, product: AfpProduct, unit: AfpUnit = "usd_per_tonne", @@ -54,7 +54,7 @@ def search( # Arguments - origin_id: Geographical ID of the origin port. + origin: Geographical ID of the origin port. vessel_class: The vessel class for the route. Must be one of: `'oil_coastal'`, `'oil_specialised'`, `'oil_handysize_mr1'`, @@ -77,7 +77,7 @@ def search( ```python >>> from vortexasdk import AnywhereFreightPricingTopPortsDestination >>> result = AnywhereFreightPricingTopPortsDestination().search( - ... origin_id="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", + ... origin="7f314ba0a498c36359b1c88781e94a73e19dcc9bbb030ec6b82f944a73d4da2f", ... vessel_class="oil_handymax_mr2", ... product="clean", ... unit="usd_per_tonne", @@ -95,11 +95,11 @@ def search( """ logger.info( - f"Fetching Anywhere Freight Pricing top destination ports for origin {origin_id}" + f"Fetching Anywhere Freight Pricing top destination ports for origin {origin}" ) payload: Dict[str, Any] = { - "origin_id": origin_id, + "origin": origin, "vessel_class": vessel_class, "product": product, "unit": unit, diff --git a/vortexasdk/endpoints/anywhere_freight_pricing_top_ports_origin.py b/vortexasdk/endpoints/anywhere_freight_pricing_top_ports_origin.py index 323cc07a..51ef66c5 100644 --- a/vortexasdk/endpoints/anywhere_freight_pricing_top_ports_origin.py +++ b/vortexasdk/endpoints/anywhere_freight_pricing_top_ports_origin.py @@ -40,7 +40,7 @@ def __init__(self) -> None: def search( self, - destination_id: str, + destination: str, vessel_class: AfpVesselClass, product: AfpProduct, unit: AfpUnit = "usd_per_tonne", @@ -54,7 +54,7 @@ def search( # Arguments - destination_id: Geographical ID of the destination port. + destination: Geographical ID of the destination port. vessel_class: The vessel class for the route. Must be one of: `'oil_coastal'`, `'oil_specialised'`, `'oil_handysize_mr1'`, @@ -77,7 +77,7 @@ def search( ```python >>> from vortexasdk import AnywhereFreightPricingTopPortsOrigin >>> result = AnywhereFreightPricingTopPortsOrigin().search( - ... destination_id="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", + ... destination="68faf65af1345067f11dc6723b8da32f00e304a6f33c000118fccd81947deb4e", ... vessel_class="oil_handymax_mr2", ... product="clean", ... unit="usd_per_tonne", @@ -95,11 +95,11 @@ def search( """ logger.info( - f"Fetching Anywhere Freight Pricing top origin ports for destination {destination_id}" + f"Fetching Anywhere Freight Pricing top origin ports for destination {destination}" ) payload: Dict[str, Any] = { - "destination_id": destination_id, + "destination": destination, "vessel_class": vessel_class, "product": product, "unit": unit, diff --git a/vortexasdk/endpoints/anywhere_freight_pricing_types.py b/vortexasdk/endpoints/anywhere_freight_pricing_types.py index 0a0343bf..04d0b4b1 100644 --- a/vortexasdk/endpoints/anywhere_freight_pricing_types.py +++ b/vortexasdk/endpoints/anywhere_freight_pricing_types.py @@ -50,12 +50,12 @@ class AfpRoute(TypedDict, total=False): """ Route specification for AFP POST endpoints. - Required keys: origin_port, destination_port, product, vessel_class. + Required keys: origin, destination, product, vessel_class. Optional keys: avoid_zone, suggested_tonnage. """ - origin_port: str - destination_port: str + origin: str + destination: str product: AfpProduct vessel_class: AfpVesselClass avoid_zone: List[AfpAvoidZone] @@ -65,8 +65,8 @@ class AfpRoute(TypedDict, total=False): class AfpRouteRequired(TypedDict): """Required fields for AfpRoute.""" - origin_port: str - destination_port: str + origin: str + destination: str product: AfpProduct vessel_class: AfpVesselClass @@ -75,12 +75,12 @@ class AfpForecastRoute(TypedDict, total=False): """ Route specification for AFP Forecast endpoints. - Required keys: origin_port, destination_port, product, vessel_class. + Required keys: origin, destination, product, vessel_class. Optional keys: avoid_zone, suggested_tonnage. """ - origin_port: str - destination_port: str + origin: str + destination: str product: AfpProduct vessel_class: AfpForecastVesselClass avoid_zone: List[AfpAvoidZone] @@ -90,7 +90,7 @@ class AfpForecastRoute(TypedDict, total=False): class AfpForecastRouteRequired(TypedDict): """Required fields for AfpForecastRoute.""" - origin_port: str - destination_port: str + origin: str + destination: str product: AfpProduct vessel_class: AfpForecastVesselClass diff --git a/vortexasdk/version.py b/vortexasdk/version.py index 8c79b2ef..65d99ece 100644 --- a/vortexasdk/version.py +++ b/vortexasdk/version.py @@ -1 +1 @@ -__version__ = "1.0.26" +__version__ = "1.0.27"