Skip to content

Commit

Permalink
fix: use staging waybiller
Browse files Browse the repository at this point in the history
Live waybiller does not validate
some of the data that waybiller
responds with.
  • Loading branch information
iharthi committed Nov 7, 2023
1 parent 7bcf890 commit 5835323
Show file tree
Hide file tree
Showing 24 changed files with 463 additions and 102 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
OPENAPI_GENERATOR_VERSION ?= v7.0.1
API_HOST ?= app.waybiller.com
API_HOST ?= staging.app.waybiller.com

.PHONY:
lint:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ start_date = end_date - datetime.timedelta(days=7)

client = pywaybiller.WaybillerClient(
api_key="xxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
host="https://app.staging.waybiller.com/external-api",
host="https://staging.app.waybiller.com/external-api",
)

for waybill in client.waybills.all(
Expand Down
6 changes: 3 additions & 3 deletions pywaybiller/docs/DestinationsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# openapi_client.DestinationsApi

All URIs are relative to *https://app.waybiller.com/external-api*
All URIs are relative to *https://staging.app.waybiller.com/external-api*

Method | HTTP request | Description
------------- | ------------- | -------------
Expand All @@ -25,10 +25,10 @@ from openapi_client.models.destinations_list200_response import DestinationsList
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down
6 changes: 3 additions & 3 deletions pywaybiller/docs/EmploymentsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# openapi_client.EmploymentsApi

All URIs are relative to *https://app.waybiller.com/external-api*
All URIs are relative to *https://staging.app.waybiller.com/external-api*

Method | HTTP request | Description
------------- | ------------- | -------------
Expand All @@ -25,10 +25,10 @@ from openapi_client.models.employments_list200_response import EmploymentsList20
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down
29 changes: 29 additions & 0 deletions pywaybiller/docs/ExternalAPIWaybillComment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# ExternalAPIWaybillComment


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**comment_by_user_id** | **int** | The ID of the user that adds the comment to the waybill. Use GET Employments endpoint to query all available employments and get necessary `user_id` values. |
**comment** | **str** | Text of the comment. |

## Example

```python
from openapi_client.models.external_api_waybill_comment import ExternalAPIWaybillComment

# TODO update the JSON string below
json = "{}"
# create an instance of ExternalAPIWaybillComment from a JSON string
external_api_waybill_comment_instance = ExternalAPIWaybillComment.from_json(json)
# print the JSON string representation of the object
print ExternalAPIWaybillComment.to_json()

# convert the object into a dict
external_api_waybill_comment_dict = external_api_waybill_comment_instance.to_dict()
# create an instance of ExternalAPIWaybillComment from a dict
external_api_waybill_comment_form_dict = external_api_waybill_comment.from_dict(external_api_waybill_comment_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


4 changes: 2 additions & 2 deletions pywaybiller/docs/ExternalAPIWaybillRow.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Waybill rows.
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**assortment_id** | **int** | The external ID of the assortment. Usually `null` if waybill was created in Waybiller UI and not over Waybiller External API. | [optional]
**assortment_ids** | **int** | The external IDs of the assortment. Usually `null` if waybill was created in Waybiller UI and not over Waybiller External API. | [optional] [readonly]
**assortment_id** | **str** | The external ID of the assortment. Usually `null` if waybill was created in Waybiller UI and not over Waybiller External API. | [optional]
**assortment_ids** | **List[str]** | The external IDs of the assortment. Usually `null` if waybill was created in Waybiller UI and not over Waybiller External API. | [optional] [readonly]
**assortment_raw_id** | **int** | The ID of the assortment. | [optional]
**assortment_name** | **str** | The name of the assortment. | [optional]
**dispatched_amount** | **decimal.Decimal** | Saadetud materjali kogus | [optional]
Expand Down
4 changes: 2 additions & 2 deletions pywaybiller/docs/ExternalAPIWaybillRowAcceptedAmount.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Accepted amounts
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**assortment_id** | **int** | The ID of the accepted assortment (eg 1). Use Querying of a single waybill endpoint to see the available assortments inside rows field using the assortment_raw_id value. |
**assortment_ids** | **int** | The external IDs of the assortment. Usually `null` if waybill was created in Waybiller UI and not over Waybiller External API. | [optional] [readonly]
**assortment_id** | **str** | The ID of the accepted assortment (eg 1). Use Querying of a single waybill endpoint to see the available assortments inside rows field using the assortment_raw_id value. |
**assortment_ids** | **List[str]** | The external IDs of the assortment. Usually `null` if waybill was created in Waybiller UI and not over Waybiller External API. | [optional] [readonly]
**accepted_gross_weight** | **decimal.Decimal** | The accepted gross weight in tonnes. | [optional]
**accepted_tare_weight** | **decimal.Decimal** | The accepted tare weight in tonnes. | [optional]
**accepted_amount** | **decimal.Decimal** | The accepted amount in the unit that is attached to the assortment. | [optional]
Expand Down
4 changes: 2 additions & 2 deletions pywaybiller/docs/ExternalAPIWaybillRowDispatchedAmount.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Dispatched amounts
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**assortment_id** | **int** | The ID of the accepted assortment (eg 1). Use Querying of a single waybill endpoint to see the available assortments inside rows field using the assortment_raw_id value. |
**assortment_ids** | **int** | The external IDs of the assortment. Usually `null` if waybill was created in Waybiller UI and not over Waybiller External API. | [optional] [readonly]
**assortment_id** | **str** | The ID of the accepted assortment (eg 1). Use Querying of a single waybill endpoint to see the available assortments inside rows field using the assortment_raw_id value. |
**assortment_ids** | **List[str]** | The external IDs of the assortment. Usually `null` if waybill was created in Waybiller UI and not over Waybiller External API. | [optional] [readonly]
**dispatched_gross_weight** | **decimal.Decimal** | The dispatched gross weight in tonnes. | [optional]
**dispatched_tare_weight** | **decimal.Decimal** | The dispatched tare weight in tonnes. | [optional]
**dispatched_amount** | **decimal.Decimal** | The dispatched amount in the unit that is attached to the assortment. | [optional]
Expand Down
6 changes: 3 additions & 3 deletions pywaybiller/docs/LoaderActionLogsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# openapi_client.LoaderActionLogsApi

All URIs are relative to *https://app.waybiller.com/external-api*
All URIs are relative to *https://staging.app.waybiller.com/external-api*

Method | HTTP request | Description
------------- | ------------- | -------------
Expand All @@ -25,10 +25,10 @@ from openapi_client.models.loader_action_logs_list200_response import LoaderActi
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down
22 changes: 11 additions & 11 deletions pywaybiller/docs/OrdersApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# openapi_client.OrdersApi

All URIs are relative to *https://app.waybiller.com/external-api*
All URIs are relative to *https://staging.app.waybiller.com/external-api*

Method | HTTP request | Description
------------- | ------------- | -------------
Expand Down Expand Up @@ -29,10 +29,10 @@ from openapi_client.models.external_api_order_create import ExternalAPIOrderCrea
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -107,10 +107,10 @@ from openapi_client.models.orders_list200_response import OrdersList200Response
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -187,10 +187,10 @@ from openapi_client.models.external_api_order import ExternalAPIOrder
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -265,10 +265,10 @@ from openapi_client.models.external_api_partial_order_update import ExternalAPIP
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -345,10 +345,10 @@ from openapi_client.models.external_api_order_update import ExternalAPIOrderUpda
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down
10 changes: 5 additions & 5 deletions pywaybiller/docs/OriginAssortmentsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# openapi_client.OriginAssortmentsApi

All URIs are relative to *https://app.waybiller.com/external-api*
All URIs are relative to *https://staging.app.waybiller.com/external-api*

Method | HTTP request | Description
------------- | ------------- | -------------
Expand All @@ -26,10 +26,10 @@ from openapi_client.models.origin_assortments_list200_response import OriginAsso
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -150,10 +150,10 @@ from openapi_client.models.external_api_origin_assortment import ExternalAPIOrig
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down
18 changes: 9 additions & 9 deletions pywaybiller/docs/OriginsApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# openapi_client.OriginsApi

All URIs are relative to *https://app.waybiller.com/external-api*
All URIs are relative to *https://staging.app.waybiller.com/external-api*

Method | HTTP request | Description
------------- | ------------- | -------------
Expand Down Expand Up @@ -28,10 +28,10 @@ from openapi_client.models.ext_api_origin_create import ExtAPIOriginCreate
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -106,10 +106,10 @@ from openapi_client.models.origins_list200_response import OriginsList200Respons
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -212,10 +212,10 @@ from openapi_client.models.ext_api_origin_read import ExtAPIOriginRead
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -290,10 +290,10 @@ from openapi_client.models.ext_api_origin_update import ExtAPIOriginUpdate
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down
22 changes: 11 additions & 11 deletions pywaybiller/docs/TransportOrdersApi.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# openapi_client.TransportOrdersApi

All URIs are relative to *https://app.waybiller.com/external-api*
All URIs are relative to *https://staging.app.waybiller.com/external-api*

Method | HTTP request | Description
------------- | ------------- | -------------
Expand Down Expand Up @@ -29,10 +29,10 @@ from openapi_client.models.external_api_transport_order_cancel import ExternalAP
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -109,10 +109,10 @@ from openapi_client.models.external_api_transport_order import ExternalAPITransp
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -187,10 +187,10 @@ from openapi_client.models.transport_orders_list200_response import TransportOrd
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -301,10 +301,10 @@ from openapi_client.models.external_api_transport_order import ExternalAPITransp
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down Expand Up @@ -379,10 +379,10 @@ from openapi_client.models.external_api_transport_order_update import ExternalAP
from openapi_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.waybiller.com/external-api
# Defining the host is optional and defaults to https://staging.app.waybiller.com/external-api
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://app.waybiller.com/external-api"
host = "https://staging.app.waybiller.com/external-api"
)

# The client must configure the authentication and authorization parameters
Expand Down

0 comments on commit 5835323

Please sign in to comment.