Commit graph

29 commits

Author SHA1 Message Date
Oliver Davies 343852ac8a Add a base README file 2020-06-11 20:30:09 +01:00
Oliver Davies b238e6655a Re-organise the src and tests directories 2020-06-11 20:21:51 +01:00
Oliver Davies ae766763b2 Allow for easily sending multiple order items
This allows for the sending of multiple items in a single order, by
adding a new `OrderItem` class and moving all of the order item specific
fields from the `Order` to an individual item.

These can then be assigned to an order using the `withOrderItems()`
method as an array of order items.

Fixes #19
2020-06-08 19:50:13 +01:00
Oliver Davies 0ed99797f5 Add Psalm to GitHub Actions 2020-06-05 22:32:04 +01:00
Oliver Davies 259946d961 Fix Psalm issues 2020-06-05 21:58:35 +01:00
Oliver Davies ce05172932 Add Psalm for static analysis 2020-06-05 21:58:24 +01:00
Oliver Davies 73160563b3 Use a decimal float price to ensure that works 2020-06-05 21:04:17 +01:00
Oliver Davies f2478e62a4 Use new mock method for auth token request 2020-06-05 21:04:17 +01:00
Oliver Davies 2ba89e1c6a Make the Client parameter optional for requests
Make the Client parameter optional when creating auth token, customer or
order requests, and create a new Client instance within the abstract
request if one isn't passed in.
2020-06-05 21:04:17 +01:00
Oliver Davies 532dfd43a1 Add order and order request classes
References #3
2020-06-05 00:04:49 +01:00
Oliver Davies e83c6e59e4 Add CustomerRequestInterface 2020-05-31 00:54:02 +01:00
Oliver Davies 0426632a08 Refactor, add traits 2020-05-31 00:45:56 +01:00
Oliver Davies 506b5689fe Remove unused imports 2020-05-30 22:33:26 +01:00
Oliver Davies 0650795d60 Add CustomerRequest request type
References #2
2020-05-30 21:35:25 +01:00
Oliver Davies 7162438837 Extract a base test case, move mock config 2020-05-30 13:40:52 +01:00
Oliver Davies 79c4d9e5fd Fix typo in test 2020-05-30 13:29:20 +01:00
Oliver Davies 7d8a2dffc5 Fix PHPCS errors
References #6
2020-05-30 13:01:12 +01:00
Oliver Davies e9d6878899 Add phpcs to Makefile
References #6
2020-05-30 12:56:34 +01:00
Oliver Davies a988d53da0 Add .editorconfig 2020-05-30 12:51:14 +01:00
Oliver Davies c4340706b1 Use Makefile in CI 2020-05-30 03:44:18 +01:00
Oliver Davies 8069ccb750 Add Makefile
Add a Makefile with commands for 'phpunit' and 'test'.

This can be expanded later for PHPCS etc.
2020-05-30 03:44:18 +01:00
Oliver Davies b042256e45 Declare strict types in existing files 2020-05-30 03:18:43 +01:00
Oliver Davies 3b8b8995f4 Fix class name 2020-05-30 03:08:48 +01:00
Oliver Davies 352ef9d14f Add the auth token request
References #1
2020-05-30 03:04:29 +01:00
Oliver Davies 1c6a7c2ee4 Use testdox and force colours 2020-05-29 14:16:37 +01:00
Oliver Davies 009e770ae2 Add GitHub Actions to automatically run tests 2020-05-29 13:58:46 +01:00
Oliver Davies e5268e9707 Add the Config class
Add a Config class for storing configuration values such as the
Glassboxx username, password and vendor ID.
2020-05-29 13:45:56 +01:00
Oliver Davies 4db74ad058 Add composer.json 2020-05-29 13:01:03 +01:00
Oliver Davies e5df1071d6 Initial commit 2020-05-29 12:58:46 +01:00