python-terminusgps 20.7.0__tar.gz → 21.0.0__tar.gz

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 (56) hide show
  1. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/PKG-INFO +1 -1
  2. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/pyproject.toml +1 -1
  3. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/items/resource.py +52 -17
  4. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/uv.lock +1 -1
  5. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/.gitignore +0 -0
  6. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/.readthedocs.yaml +0 -0
  7. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/COPYING +0 -0
  8. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/README.md +0 -0
  9. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/Makefile +0 -0
  10. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/make.bat +0 -0
  11. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/authorizenet/auth.rst +0 -0
  12. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/authorizenet/index.rst +0 -0
  13. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/authorizenet/profiles.rst +0 -0
  14. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/aws/index.rst +0 -0
  15. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/aws/secrets.rst +0 -0
  16. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/conf.py +0 -0
  17. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/index.rst +0 -0
  18. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/settings.rst +0 -0
  19. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/twilio/caller.rst +0 -0
  20. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/twilio/index.rst +0 -0
  21. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/wialon/constants.rst +0 -0
  22. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/wialon/errors.rst +0 -0
  23. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/wialon/examples.rst +0 -0
  24. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/wialon/flags.rst +0 -0
  25. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/wialon/index.rst +0 -0
  26. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/wialon/items.rst +0 -0
  27. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/wialon/session.rst +0 -0
  28. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/docs/source/wialon/utils.rst +0 -0
  29. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/__init__.py +0 -0
  30. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/authorizenet/__init__.py +0 -0
  31. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/authorizenet/auth.py +0 -0
  32. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/authorizenet/profiles/__init__.py +0 -0
  33. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/authorizenet/profiles/addresses.py +0 -0
  34. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/authorizenet/profiles/base.py +0 -0
  35. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/authorizenet/profiles/customers.py +0 -0
  36. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/authorizenet/profiles/payments.py +0 -0
  37. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/authorizenet/subscriptions.py +0 -0
  38. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/aws/__init__.py +0 -0
  39. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/aws/secrets.py +0 -0
  40. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/aws/ses.py +0 -0
  41. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/settings.py +0 -0
  42. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/twilio/__init__.py +0 -0
  43. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/twilio/caller.py +0 -0
  44. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/__init__.py +0 -0
  45. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/constants.py +0 -0
  46. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/flags.py +0 -0
  47. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/items/__init__.py +0 -0
  48. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/items/base.py +0 -0
  49. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/items/retranslator.py +0 -0
  50. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/items/route.py +0 -0
  51. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/items/unit.py +0 -0
  52. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/items/unit_group.py +0 -0
  53. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/items/user.py +0 -0
  54. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/logger.py +0 -0
  55. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/session.py +0 -0
  56. {python_terminusgps-20.7.0 → python_terminusgps-21.0.0}/terminusgps/wialon/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-terminusgps
3
- Version: 20.7.0
3
+ Version: 21.0.0
4
4
  Summary: Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more.
5
5
  Project-URL: Documentation, https://app.terminusgps.com/docs/apps/python-terminusgps/index.html
6
6
  Project-URL: Repository, https://github.com/terminusgps/python-terminusgps
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "python-terminusgps"
3
- version = "20.7.0"
3
+ version = "21.0.0"
4
4
  description = "Provides abstractions/utilities for working with Wialon API, Authorize.NET API, AWS API, and more."
5
5
  readme = "README.md"
6
6
  authors = [ {name = "Blake Nall", email = "blake@terminusgps.com" } ]
@@ -287,8 +287,6 @@ class WialonResource(WialonBase):
287
287
  desc: str = "",
288
288
  phone: str = "",
289
289
  mobile_auth_code: str = "",
290
- image_checksum: str = "",
291
- image_ratio: str = "",
292
290
  custom_fields: dict[str, str] | None = None,
293
291
  ) -> None:
294
292
  """
@@ -331,17 +329,13 @@ class WialonResource(WialonBase):
331
329
  params.update({"p": quote_plus(phone)})
332
330
  if custom_fields:
333
331
  params.update({"jp": custom_fields})
334
- response = self.session.wialon_api.resource_update_driver(**params)
335
- print(f"{response = }")
332
+ self.session.wialon_api.resource_update_driver(**params)
336
333
 
337
334
  def create_passenger(
338
335
  self,
339
336
  name: str,
340
337
  code: str,
341
338
  phone: str = "",
342
- timezone: int | None = None,
343
- image_checksum: str = "",
344
- image_ratio: float | None = None,
345
339
  custom_fields: dict[str, str] | None = None,
346
340
  ) -> None:
347
341
  """
@@ -353,12 +347,6 @@ class WialonResource(WialonBase):
353
347
  :type code: :py:obj:`str`
354
348
  :param phone: A phone number beginning in a country code. No spaces.
355
349
  :type phone: :py:obj:`str`
356
- :param timezone: A timezone integer.
357
- :type timezone: :py:obj:`int` | :py:obj:`None`
358
- :param image_checksum: Checksum for passenger image.
359
- :type image_checksum: :py:obj:`str`
360
- :param image_ratio: Passenger image aspect ratio.
361
- :type image_ratio: :py:obj:`float` | :py:obj:`None`
362
350
  :param custom_fields: Additional custom fields to add to the passenger.
363
351
  :type custom_fields: :py:obj:`dict` | :py:obj:`None`
364
352
  :raises WialonError: If something goes wrong calling the Wialon API.
@@ -371,14 +359,61 @@ class WialonResource(WialonBase):
371
359
  "id": 0,
372
360
  "callMode": "create",
373
361
  "c": code,
374
- "ck": image_checksum,
375
- "r": image_ratio,
376
362
  "n": name,
377
363
  }
378
364
  if phone:
379
365
  params.update({"p": quote_plus(phone)})
380
- if timezone:
381
- params.update({"tz": timezone})
382
366
  if custom_fields:
383
367
  params.update({"jp": custom_fields})
384
368
  self.session.wialon_api.resource_update_tag(**params)
369
+
370
+ def update_attachable_drivers(self, units: list[str | int]) -> None:
371
+ """Updates the pool of units for the resource to attach drivers to the new unit list."""
372
+ self.session.wialon_api.update_driver_units(
373
+ **{"itemId": self.id, "units": units}
374
+ )
375
+
376
+ def update_attachable_passengers(self, units: list[str | int]) -> None:
377
+ """Updates the pool of units for the resource to attach passengers to the new unit list."""
378
+ self.session.wialon_api.update_tag_units(**{"itemId": self.id, "units": units})
379
+
380
+ def create_trailer(
381
+ self,
382
+ name: str,
383
+ code: str,
384
+ desc: str = "",
385
+ phone: str = "",
386
+ custom_fields: dict[str, str] | None = None,
387
+ ) -> None:
388
+ """
389
+ Creates a trailer for the resource.
390
+
391
+ :param name: A name for the new trailer.
392
+ :type name: :py:obj:`str`
393
+ :param code: A unique code for the new trailer.
394
+ :type code: :py:obj:`str`
395
+ :param desc: A description for the trailer.
396
+ :type desc: :py:obj:`str`
397
+ :param phone: A phone number beginning in a country code. No spaces.
398
+ :type phone: :py:obj:`str`
399
+ :param custom_fields: Additional custom fields to add to the trailer.
400
+ :type custom_fields: :py:obj:`dict` | :py:obj:`None`
401
+ :raises WialonError: If something goes wrong calling the Wialon API.
402
+ :returns: Nothing.
403
+ :rtype: :py:obj:`None`
404
+
405
+ """
406
+ params = {
407
+ "itemId": self.id,
408
+ "id": 0,
409
+ "callMode": "create",
410
+ "c": code,
411
+ "ds": desc,
412
+ "n": name,
413
+ "f": 1,
414
+ }
415
+ if phone:
416
+ params.update({"p": quote_plus(phone)})
417
+ if custom_fields:
418
+ params.update({"jp": custom_fields})
419
+ self.session.wialon_api.resource_update_trailer(**params)
@@ -556,7 +556,7 @@ wheels = [
556
556
 
557
557
  [[package]]
558
558
  name = "python-terminusgps"
559
- version = "20.7.0"
559
+ version = "21.0.0"
560
560
  source = { editable = "." }
561
561
  dependencies = [
562
562
  { name = "argparse" },