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

Update readme to point to tinker. (bunq/sdk_php#140) #142

Merged
merged 7 commits into from
Apr 10, 2018

Conversation

OGKevin
Copy link
Contributor

@OGKevin OGKevin commented Apr 9, 2018

References #140

@OGKevin OGKevin added this to the 0.13.5 milestone Apr 9, 2018
@OGKevin OGKevin self-assigned this Apr 9, 2018
@OGKevin OGKevin added this to To do in 1.0.0 - SDK via automation Apr 9, 2018
@OGKevin OGKevin moved this from To do to open PR in 1.0.0 - SDK Apr 9, 2018
@OGKevin
Copy link
Contributor Author

OGKevin commented Apr 9, 2018

@sandervdo all yours buddy.

@OGKevin OGKevin requested a review from sandervdo April 9, 2018 10:21
Copy link
Contributor

@sandervdo sandervdo left a 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);
Copy link
Contributor

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.
Copy link
Contributor

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()
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation seems off.

Copy link
Contributor Author

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.
Copy link
Contributor

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)
Copy link
Contributor

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Semicolon at the end.

@OGKevin
Copy link
Contributor Author

OGKevin commented Apr 10, 2018

@sandervdo pushed.

Copy link
Contributor

@sandervdo sandervdo left a 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()
)
Copy link
Contributor

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.
Copy link
Contributor

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

@sandervdo
Copy link
Contributor

@OGKevin -ping-. 💡

@OGKevin
Copy link
Contributor Author

OGKevin commented Apr 10, 2018

@sandervdo pushed

@sandervdo
Copy link
Contributor

LGTM. 👍

@OGKevin
Copy link
Contributor Author

OGKevin commented Apr 10, 2018

@sandervdo 🙏

@OGKevin OGKevin merged commit a9b71a2 into develop Apr 10, 2018
1.0.0 - SDK automation moved this from open PR to merged Apr 10, 2018
@OGKevin OGKevin deleted the update_read_me_bunq/sdk_php#140 branch April 10, 2018 10:51
@OGKevin
Copy link
Contributor Author

OGKevin commented Apr 10, 2018

@andrederoos

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
1.0.0 - SDK
  
merged
Development

Successfully merging this pull request may close these issues.

None yet

2 participants