Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
xxswingxx committed Sep 29, 2016
1 parent 125348e commit a62cbbf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,14 @@ $contact->first_name = 'Joey';
$contact->save();
```

#### Retrieve a contact by payment gateway ID
```php
$gateway = 'stripe';
$customer_id = 'cus_Av4LiDPayM3nt_ID';

$contact = QuadernoContact::retrieve($id, $gateway); // returns a QuadernoContact (success) or false (error)
```

### Documents
A document is either an _invoice_, an _expense_, a _credit_ or an _estimate_.

Expand All @@ -76,6 +84,21 @@ Note: In order to looking up for number, contact name or P.O. number fields, you
$invoices = QuadernoInvoice::find(array('q' => $my_po_number)); // Search filtering
```


#### Retrieve a document by payment gateway ID
```php
$gateway = 'stripe';
$payment_id = 'ch_Av4LiDPayM3nt_ID';
$refund_id = 'ch_Av4LiDR3fuNd_ID';


$invoice = QuadernoInvoice::retrieve($payment_id, $gateway); // returns a QuadernoInvoice (success) or false (error)

$credit_note = QuadernoCredit::retrieve($refund_id, $gateway); // returns a QuadernoCredit (success) or false (error)

```


#### Create and update a document
```php
$estimate = new QuadernoEstimate(array(
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "quaderno/quaderno",
"type": "library",
"description": "PHP wrapper for the Quaderno REST API",
"version": "1.3.2",
"version": "1.4.0",
"keywords": ["billing","receipts", "invoices", "stripe", "paypal", "braintree", "gocardless", "vat", "gst"],
"homepage": "https://github.com/quaderno/quaderno-php",
"license": "MIT",
Expand Down

0 comments on commit a62cbbf

Please sign in to comment.