-
Notifications
You must be signed in to change notification settings - Fork 54
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
Update readme to point to tinker. (bunq/sdk_php#140) #142
Conversation
@sandervdo all yours buddy. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@OGKevin yours
README.md
Outdated
|
||
After saving the context, you can restore it at any time: | ||
|
||
```php | ||
$fileName = '/path/to/bunq.conf/file/'; | ||
$apiContext = ApiContext::restore($fileName); | ||
BunqContext:loadApiContext($apiContext); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be double colon.
README.md
Outdated
always also needs a reference to a `User`. These dependencies are required as arguments when performing API calls. | ||
Before you can start making calls, you must ensure that you have create an ApiContext and loaded in into BunqContext as shown in the examples above. | ||
|
||
The SDK will take care of your user Id, as this id wil never change per ApiContext. The SDK also uses your first active monetary account as primary monetary account. This is alsmot always the same as your billing account. This means, if you do not explicitly pass a monetary account id, the SDK will use the billing account id. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alsmot.
This means, if you do not explicitly pass a monetary account id, the SDK will use the billing account id.
➡️
This means that when you do not explicitly pass a Monetary Account ID, the SDK will use the Monetary Account ID of your billing account.
README.md
Outdated
new Pointer(self::POINTER_TYPE_EMAIL, $recipient), | ||
$description, | ||
$monetaryAccount->getId() | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation seems off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hold on ill turn it on :D
README.md
Outdated
Reading objects through the API requires an `ApiContext`, identifiers of all dependencies (such as User ID required for | ||
accessing a Monetary Account), and the identifier of the object to read (ID or UUID) Optionally, custom headers can be | ||
passed to requests. | ||
To use the read method you must pass the identifier of the object to read (ID or UUID) expect for the endpoints User, UserPerson, UserCompany and monetary account. As the SDK will use default ids if not passed. For all other endpoints you must pass the identifier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect
➡️ except
monetary account
➡️ Monetary Account
As the SDK will use default ids if not passed
➡️ The SDK will use the default IDs when none are passed.
README.md
Outdated
#### Updating objects | ||
Updating objects through the API goes the same way as creating objects, except that also the object to update identifier | ||
(ID or UUID) is needed. | ||
You can also retrieve this information from BunqContext, see [`tinker/setupCurrentUser`](https://github.com/bunq/tinker_php/blob/05a38a2660e6f6db1f7efc9b915f0131c172c230/src/BunqLib.php#L117-L120) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BunqContext
➡️ `BunqContext`
README.md
Outdated
|
||
##### Example | ||
See [`example/customer_statement_export_example.php`](./example/customer_statement_export_example.php) | ||
CustomerStatementExport::delete($customerStatementExportId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Semicolon at the end.
@sandervdo pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two more small comments, other than that lgtm.
README.md
Outdated
new Pointer(self::POINTER_TYPE_EMAIL, $recipient), | ||
$description, | ||
$monetaryAccount->getId() | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing ;
README.md
Outdated
``` | ||
|
||
##### Example | ||
See [`tinker/BunqLib`](https://github.com/bunq/tinker_php/blob/05a38a2660e6f6db1f7efc9b915f0131c172c230/src/BunqLib.php#L240-L245) | ||
|
||
#### Reading objects | ||
To use the read method you must pass the identifier of the object to read (ID or UUID) expect for the endpoints User, UserPerson, UserCompany and monetary account. As the SDK will use default ids if not passed. For all other endpoints you must pass the identifier. | ||
To use the read method you must pass the identifier of the object to read (ID or UUID) except for the endpoints `User`, `UserPerson`, `UserCompany` and `Monetary Account`. The SDK will use the default IDs when none are passed. For all other endpoints you must pass the identifier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We refer to UserPerson
and UserCompany
then I would also refer to MonetaryAccount
@OGKevin -ping-. 💡 |
@sandervdo pushed |
LGTM. 👍 |
References #140