simpleapps-com-augur-api 0.8.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. augur_api/__init__.py +43 -0
  2. augur_api/client.py +453 -0
  3. augur_api/core/__init__.py +40 -0
  4. augur_api/core/config.py +75 -0
  5. augur_api/core/errors.py +173 -0
  6. augur_api/core/http_client.py +426 -0
  7. augur_api/core/schemas.py +105 -0
  8. augur_api/py.typed +0 -0
  9. augur_api/services/__init__.py +13 -0
  10. augur_api/services/agr_info/__init__.py +47 -0
  11. augur_api/services/agr_info/client.py +326 -0
  12. augur_api/services/agr_info/schemas.py +123 -0
  13. augur_api/services/agr_site/__init__.py +79 -0
  14. augur_api/services/agr_site/client.py +384 -0
  15. augur_api/services/agr_site/schemas.py +268 -0
  16. augur_api/services/agr_work/__init__.py +7 -0
  17. augur_api/services/agr_work/client.py +32 -0
  18. augur_api/services/agr_work/schemas.py +11 -0
  19. augur_api/services/avalara/__init__.py +17 -0
  20. augur_api/services/avalara/client.py +64 -0
  21. augur_api/services/avalara/schemas.py +34 -0
  22. augur_api/services/base.py +54 -0
  23. augur_api/services/basecamp2/__init__.py +65 -0
  24. augur_api/services/basecamp2/client.py +568 -0
  25. augur_api/services/basecamp2/schemas.py +227 -0
  26. augur_api/services/brand_folder/__init__.py +31 -0
  27. augur_api/services/brand_folder/client.py +206 -0
  28. augur_api/services/brand_folder/schemas.py +133 -0
  29. augur_api/services/commerce/__init__.py +56 -0
  30. augur_api/services/commerce/client.py +298 -0
  31. augur_api/services/commerce/schemas.py +167 -0
  32. augur_api/services/customers/__init__.py +69 -0
  33. augur_api/services/customers/client.py +437 -0
  34. augur_api/services/customers/schemas.py +273 -0
  35. augur_api/services/gregorovich/__init__.py +31 -0
  36. augur_api/services/gregorovich/client.py +151 -0
  37. augur_api/services/gregorovich/schemas.py +42 -0
  38. augur_api/services/items/__init__.py +302 -0
  39. augur_api/services/items/client.py +1223 -0
  40. augur_api/services/items/schemas.py +722 -0
  41. augur_api/services/joomla/__init__.py +59 -0
  42. augur_api/services/joomla/client.py +333 -0
  43. augur_api/services/joomla/schemas.py +286 -0
  44. augur_api/services/legacy/__init__.py +66 -0
  45. augur_api/services/legacy/client.py +391 -0
  46. augur_api/services/legacy/schemas.py +115 -0
  47. augur_api/services/logistics/__init__.py +34 -0
  48. augur_api/services/logistics/client.py +116 -0
  49. augur_api/services/logistics/schemas.py +65 -0
  50. augur_api/services/nexus/__init__.py +89 -0
  51. augur_api/services/nexus/client.py +589 -0
  52. augur_api/services/nexus/schemas.py +171 -0
  53. augur_api/services/open_search/__init__.py +58 -0
  54. augur_api/services/open_search/client.py +285 -0
  55. augur_api/services/open_search/schemas.py +146 -0
  56. augur_api/services/orders/__init__.py +51 -0
  57. augur_api/services/orders/client.py +299 -0
  58. augur_api/services/orders/schemas.py +195 -0
  59. augur_api/services/p21_apis/__init__.py +83 -0
  60. augur_api/services/p21_apis/client.py +420 -0
  61. augur_api/services/p21_apis/schemas.py +130 -0
  62. augur_api/services/p21_core/__init__.py +29 -0
  63. augur_api/services/p21_core/client.py +395 -0
  64. augur_api/services/p21_core/schemas.py +221 -0
  65. augur_api/services/p21_pim/__init__.py +51 -0
  66. augur_api/services/p21_pim/client.py +319 -0
  67. augur_api/services/p21_pim/schemas.py +128 -0
  68. augur_api/services/p21_sism/__init__.py +60 -0
  69. augur_api/services/p21_sism/client.py +334 -0
  70. augur_api/services/p21_sism/schemas.py +92 -0
  71. augur_api/services/payments/__init__.py +97 -0
  72. augur_api/services/payments/client.py +508 -0
  73. augur_api/services/payments/schemas.py +166 -0
  74. augur_api/services/pricing/__init__.py +43 -0
  75. augur_api/services/pricing/client.py +175 -0
  76. augur_api/services/pricing/schemas.py +146 -0
  77. augur_api/services/resource.py +141 -0
  78. augur_api/services/shipping/__init__.py +17 -0
  79. augur_api/services/shipping/client.py +68 -0
  80. augur_api/services/shipping/schemas.py +38 -0
  81. augur_api/services/slack/__init__.py +23 -0
  82. augur_api/services/slack/client.py +74 -0
  83. augur_api/services/slack/schemas.py +35 -0
  84. augur_api/services/smarty_streets/__init__.py +19 -0
  85. augur_api/services/smarty_streets/client.py +82 -0
  86. augur_api/services/smarty_streets/schemas.py +32 -0
  87. augur_api/services/ups/__init__.py +17 -0
  88. augur_api/services/ups/client.py +72 -0
  89. augur_api/services/ups/schemas.py +41 -0
  90. augur_api/services/vmi/__init__.py +157 -0
  91. augur_api/services/vmi/client.py +586 -0
  92. augur_api/services/vmi/schemas.py +285 -0
  93. simpleapps_com_augur_api-0.8.10.dist-info/METADATA +177 -0
  94. simpleapps_com_augur_api-0.8.10.dist-info/RECORD +96 -0
  95. simpleapps_com_augur_api-0.8.10.dist-info/WHEEL +4 -0
  96. simpleapps_com_augur_api-0.8.10.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,17 @@
1
+ """Avalara service exports."""
2
+
3
+ from augur_api.services.avalara.client import (
4
+ AvalaraClient,
5
+ RatesResource,
6
+ )
7
+ from augur_api.services.avalara.schemas import (
8
+ RatesParams,
9
+ TaxRate,
10
+ )
11
+
12
+ __all__ = [
13
+ "AvalaraClient",
14
+ "RatesParams",
15
+ "RatesResource",
16
+ "TaxRate",
17
+ ]
@@ -0,0 +1,64 @@
1
+ """Avalara service client for tax rate calculations."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING, Any
6
+
7
+ from augur_api.core.schemas import BaseResponse
8
+ from augur_api.services.avalara.schemas import (
9
+ TaxRate,
10
+ )
11
+ from augur_api.services.base import BaseServiceClient
12
+ from augur_api.services.resource import BaseResource
13
+
14
+ if TYPE_CHECKING:
15
+ from augur_api.core.http_client import HTTPClient
16
+
17
+
18
+ class RatesResource(BaseResource):
19
+ """Resource for /rates endpoints."""
20
+
21
+ def __init__(self, http: HTTPClient) -> None:
22
+ """Initialize the resource."""
23
+ super().__init__(http, "/rates")
24
+
25
+ def create(self, data: Any) -> BaseResponse[TaxRate]:
26
+ """Calculate tax rates for an address.
27
+
28
+ Args:
29
+ data: Address parameters for tax rate calculation.
30
+
31
+ Returns:
32
+ BaseResponse containing tax rate information.
33
+ """
34
+ response = self._post(data=data)
35
+ return BaseResponse[TaxRate].model_validate(response)
36
+
37
+
38
+ class AvalaraClient(BaseServiceClient):
39
+ """Client for the Avalara tax service.
40
+
41
+ Provides access to tax rate calculation endpoints.
42
+
43
+ Example:
44
+ >>> from augur_api import AugurAPI
45
+ >>> api = AugurAPI(token="...", site_id="...")
46
+ >>> rates = api.avalara.rates.create(RatesParams(postal_code="98101"))
47
+ >>> print(rates.data.total_rate)
48
+ """
49
+
50
+ def __init__(self, http_client: HTTPClient) -> None:
51
+ """Initialize the Avalara client.
52
+
53
+ Args:
54
+ http_client: HTTP client for making requests.
55
+ """
56
+ super().__init__(http_client)
57
+ self._rates: RatesResource | None = None
58
+
59
+ @property
60
+ def rates(self) -> RatesResource:
61
+ """Access tax rates endpoints."""
62
+ if self._rates is None:
63
+ self._rates = RatesResource(self._http)
64
+ return self._rates
@@ -0,0 +1,34 @@
1
+ """Schemas for the Avalara service."""
2
+
3
+ from augur_api.core.schemas import CamelCaseModel, EdgeCacheParams
4
+
5
+
6
+ # Health Check
7
+ class HealthCheckData(CamelCaseModel):
8
+ """Health check response data."""
9
+
10
+ site_hash: str | None = None
11
+ site_id: str | None = None
12
+
13
+
14
+ # Rates
15
+ class RatesParams(EdgeCacheParams):
16
+ """Parameters for tax rate lookup."""
17
+
18
+ line1: str | None = None
19
+ line2: str | None = None
20
+ line3: str | None = None
21
+ city: str | None = None
22
+ region: str | None = None
23
+ postal_code: str | None = None
24
+ country: str | None = None
25
+
26
+
27
+ class TaxRate(CamelCaseModel):
28
+ """Tax rate response."""
29
+
30
+ total_rate: float | None = None
31
+ state_rate: float | None = None
32
+ county_rate: float | None = None
33
+ city_rate: float | None = None
34
+ special_rate: float | None = None
@@ -0,0 +1,54 @@
1
+ """Base service client class for all Augur services."""
2
+
3
+ from typing import Any
4
+
5
+ from augur_api.core.http_client import HTTPClient
6
+ from augur_api.core.schemas import BaseResponse, HealthCheckData
7
+
8
+
9
+ class BaseServiceClient:
10
+ """Base client for Augur API services.
11
+
12
+ All service-specific clients inherit from this class to gain
13
+ common functionality like health checks and ping endpoints.
14
+
15
+ Attributes:
16
+ _http: The HTTP client for making requests.
17
+ service_name: Name of the service.
18
+ """
19
+
20
+ def __init__(self, http_client: HTTPClient) -> None:
21
+ """Initialize the service client.
22
+
23
+ Args:
24
+ http_client: The HTTP client for making requests.
25
+ """
26
+ self._http = http_client
27
+ self.service_name = http_client.service_name
28
+
29
+ def health_check(self) -> BaseResponse[HealthCheckData]:
30
+ """Check service health.
31
+
32
+ Returns:
33
+ BaseResponse containing HealthCheckData with site_hash and site_id.
34
+ """
35
+ response = self._http.get("/health-check")
36
+ return BaseResponse[HealthCheckData].model_validate(response)
37
+
38
+ def ping(self) -> BaseResponse[str]:
39
+ """Ping the service.
40
+
41
+ Returns:
42
+ BaseResponse containing 'pong' string.
43
+ """
44
+ response = self._http.get("/ping")
45
+ return BaseResponse[str].model_validate(response)
46
+
47
+ def whoami(self) -> BaseResponse[dict[str, Any]]:
48
+ """Get information about the authenticated user.
49
+
50
+ Returns:
51
+ BaseResponse containing user information.
52
+ """
53
+ response = self._http.get("/whoami")
54
+ return BaseResponse[dict[str, Any]].model_validate(response)
@@ -0,0 +1,65 @@
1
+ """Basecamp2 service exports."""
2
+
3
+ from augur_api.services.basecamp2.client import (
4
+ Basecamp2Client,
5
+ CommentsResource,
6
+ EventsResource,
7
+ MetricsResource,
8
+ PeopleResource,
9
+ ProjectsResource,
10
+ TodolistsResource,
11
+ TodosResource,
12
+ TodosSummaryResource,
13
+ )
14
+ from augur_api.services.basecamp2.schemas import (
15
+ Comment,
16
+ CommentCreateParams,
17
+ CommentListParams,
18
+ Event,
19
+ EventListParams,
20
+ Metric,
21
+ MetricsListParams,
22
+ Person,
23
+ PersonListParams,
24
+ Project,
25
+ ProjectListParams,
26
+ Todo,
27
+ TodoCreateParams,
28
+ Todolist,
29
+ TodolistListParams,
30
+ TodoListParams,
31
+ TodosSummary,
32
+ TodosSummaryListParams,
33
+ TodoUpdateParams,
34
+ )
35
+
36
+ __all__ = [
37
+ "Basecamp2Client",
38
+ "Comment",
39
+ "CommentCreateParams",
40
+ "CommentListParams",
41
+ "CommentsResource",
42
+ "Event",
43
+ "EventListParams",
44
+ "EventsResource",
45
+ "Metric",
46
+ "MetricsListParams",
47
+ "MetricsResource",
48
+ "PeopleResource",
49
+ "Person",
50
+ "PersonListParams",
51
+ "Project",
52
+ "ProjectListParams",
53
+ "ProjectsResource",
54
+ "Todo",
55
+ "TodoCreateParams",
56
+ "TodoListParams",
57
+ "Todolist",
58
+ "TodolistListParams",
59
+ "TodolistsResource",
60
+ "TodosResource",
61
+ "TodosSummary",
62
+ "TodosSummaryListParams",
63
+ "TodosSummaryResource",
64
+ "TodoUpdateParams",
65
+ ]