Refactor API client

Created on 11 March 2023, over 1 year ago
Updated 6 May 2023, about 1 year ago

Problem/Motivation

Within the Pei API client:

  • There are multiple duplicates code fragment scattered across the module that fetch and validate a authorization token. They can all but 1 be moved to the clients constructor (config save form validation still needs separate validation).
  • More robust exception handling.
  • Better logs for each method to make debugging easier.
  • Set appropriate access modifiers to properties and methods. All methods are current public, some of which unnecessarily. Some properties should also be made readonly
  • Remove unused properties.

Validation logic of the payment gateway config form needs to be updated with the aforementioned changes. The validation messages will also be updated while we're at it.

Steps to reproduce

Not relevant.

Proposed resolution

See Problem/Motivation section.

Remaining tasks

None.

User interface changes

Improved validation of the payment gateway config form.

API changes

Some access modifiers will change. Impact should be minimal as all methods and properties should be and currently are public will remain that way.

Some property and method names will also change, but again, the ones that are and should be public will not be changed.

Data model changes

None.

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇮🇸Iceland rokala

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024