Skip to content

Commit

Permalink
Add startStoreCard to the 'Methods at a Glance' section and fix alpha…
Browse files Browse the repository at this point in the history
…betization of methods list (#31)
  • Loading branch information
goblinhorde committed Apr 8, 2019
1 parent 0782641 commit b1c3ab0
Showing 1 changed file with 38 additions and 35 deletions.
73 changes: 38 additions & 35 deletions doc/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ plugin for Reader SDK. For detailed documentation on Reader SDK, please see
Method | Return Object | Description
----------------------------------------------- | --------------------------------- | ---
[authorize](#authorize) | [Location](#location) | Authorizes Reader SDK to collect payments.
[authorizedLocation](#authorizedlocation) | [Location](#location) | Returns the currently authorized location
[canDeauthorize](#candeauthorize) | bool | Verifies Reader SDK can be deauthorized.
[deauthorize](#deauthorize) | void | Deauthorizes Reader SDK.
[authorizedLocation](#authorizedlocation) | [Location](#location) | Returns the currently authorized location
[isAuthorized](#isauthorized) | bool | Verifies Reader SDK is currently authorized for payment collection.
[startCheckout](#startcheckout) | [CheckoutResult](#checkoutresult) | Begins the checkout workflow.
[startReaderSettings](#startreadersettings) | void | Starts the Reader settings flow for connecting Square Reader

[startStoreCard](#startstorecard) | [Card](#card) | Starts the checkout flow for saving a card on file


## Method details
Expand Down Expand Up @@ -73,6 +73,36 @@ try {
```


---

### authorizedLocation

Used to fetch information about the location currently authorized for Reader
SDK.

* **On success**: returns information about the currently authorized location as a
[Location](#location) object.
* **On failure**: throws [`usageError`](#e1).

#### Example usage

```dart
import 'package:square_reader_sdk/reader_sdk.dart';
try {
var location = await ReaderSdk.authorizedLocation;
// Start using the location object
} on ReaderSdkException catch (e) {
var errorMessage = e.message;
if (_debug) {
errorMessage += '\n\nDebug Message: ${e.debugMessage}';
print('${e.code}:${e.debugCode}:${e.debugMessage}');
}
displayErrorModal(context, errorMessage);
}
```


---

### canDeauthorize
Expand Down Expand Up @@ -127,36 +157,6 @@ try {
```


---

### authorizedLocation

Used to fetch information about the location currently authorized for Reader
SDK.

* **On success**: returns information about the currently authorized location as a
[Location](#location) object.
* **On failure**: throws [`usageError`](#e1).

#### Example usage

```dart
import 'package:square_reader_sdk/reader_sdk.dart';
try {
var location = await ReaderSdk.authorizedLocation;
// Start using the location object
} on ReaderSdkException catch (e) {
var errorMessage = e.message;
if (_debug) {
errorMessage += '\n\nDebug Message: ${e.debugMessage}';
print('${e.code}:${e.debugCode}:${e.debugMessage}');
}
displayErrorModal(context, errorMessage);
}
```


---

### isAuthorized
Expand Down Expand Up @@ -271,10 +271,13 @@ try {

Used to start the store a card for a customer flow.

Card information is only stored on Square servers, not on the mobile device running Reader SDK, which means cards cannot be saved while the device is offline. Saved card information can be requested using Square APIs and the associated customer ID.
Card information is only stored on Square servers, not on the mobile device
running Reader SDK, which means cards cannot be saved while the device is
offline. Saved card information can be requested using Square APIs and the
associated customer ID.

* **On success**: returns information about the stored card as a
[Card](#card) object.
* **On success**: returns information about the stored card as a [Card](#card)
object.
* **On failure**: throws [`usageError`](#e1),
[`storeCustomerErrorCanceled`](#e6),
[`storeCustomerErrorInvalidCustomerId`](#e7),
Expand Down

0 comments on commit b1c3ab0

Please sign in to comment.