Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Rewrite/Extend all resources #142

Open
wants to merge 409 commits into
base: master
Choose a base branch
from

Conversation

iranl
Copy link
Contributor

@iranl iranl commented May 9, 2019

Supersedes all earlier PR's by me. Implements all requested changes in those PR's.
Also fixes some other open issues.

Unfortunately, mainly because everything is moved to traits, it is now impossible to separate the changes into different PR's for each resource.

Changes (non exhaustive list, applies to alle resources)

  • All fields (including fields that are only used once) moved to traits in the Fields namespace. Re-use traits whenever possible (same exact element name and type in Twinfield API).
  • Created Enums for every field with an exhaustive list
  • Make a PhpTwinfield object of elements whenever possible (in the same way the office code field is turned into an Office object)
  • Implement all DOM attributes from element fields (name, shortname, dimensiontype, locked, inherit etc,)
  • Rewrote all ApiConnectors, Mappers and Documents to mimic Transactions
  • Added resources (see below)
Component get() listAll() send() delete() Mapper
Activities
Articles
Asset Methods
Browse Data
Cash and Bank Books
Cost Centers
Countries
Currencies
Customers
Dimension Groups
Dimension Types
Electronic Bank Statements
Fixed Assets
General Ledger Accounts
Matching
Offices
Paycodes
Projects
Rates
Sales Invoices
Sales Invoice Types
Suppliers
Transactions
Bank Transactions
Cash Transactions
Journal Transactions
Purchase Transactions
Sale Transactions
Users
User Roles
VAT
VAT Groups
VAT Group Countries

Breaking Changes

  • Basically breaks everything because instead of strings in a lot of cases PhpTwinfield Objects or Enums are now expected instead.

To Do

  • Document breaking changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants