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

REST API Docs v3 #13

Merged
merged 18 commits into from
Aug 10, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ trim_trailing_whitespace = false
[*.txt]
trim_trailing_whitespace = false

[*.json]
insert_final_newline = false
[*.{rb,scss,json}]
indent_size = 2
tab_width = 2
indent_style = space

[*.scss]
indent_size = 2
tab_width = 2
[*.json]
insert_final_newline = false

[*.py]
indent_size = 4
tab_width = 4
indent_style = space
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ build/
_yardoc
doc/
.idea/

test.*
4 changes: 2 additions & 2 deletions source/includes/v2/_coupons.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ WooCommerce.post('coupons', data, function(err, data, res) {
```python
data = {
"coupon": {
"code": "new-coupon3",
"code": "new-coupon",
"type": "percent",
"amount": "10",
"individual_use": True,
Expand Down Expand Up @@ -130,7 +130,7 @@ print(wcapi.post("coupons", data).json())
<?php
$data = array(
'coupon' => array(
'code' => 'new-coupon3',
'code' => 'new-coupon',
'type' => 'percent',
'amount' => '10',
'individual_use' => true,
Expand Down
32 changes: 16 additions & 16 deletions source/includes/v2/_customers.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,22 @@ This section lists all API that can be used to create, edit or otherwise manipul

## Customers Properties ##

| Attribute | Type | Description |
| ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id` | integer | Customer ID (user ID) <i class="label label-info">read-only</i> |
| `created_at` | string | UTC DateTime when the customer was created <i class="label label-info">read-only</i> |
| `email` | string | Customer email address <i class="label label-info">mandatory</i> |
| `first_name` | string | Customer first name |
| `last_name` | string | Customer last name |
| `username` | string | Customer username, can be generated automatically from the customer's email addrees if the option `woocommerce_registration_generate_username` is equal to `yes` <i class="label label-info">cannot be changed</i> |
| `password` | string | Customer password, can be generated automatically with [`wp_generate_password()`](http://codex.wordpress.org/Function_Reference/wp_generate_password) <i class="label label-info">write-only</i> |
| `last_order_id` | integer | Last order ID <i class="label label-info">read-only</i> |
| `last_order_date` | string | UTC DateTime of the customer last order <i class="label label-info">read-only</i> |
| `orders_count` | integer | Quantity of orders that the customer have <i class="label label-info">read-only</i> |
| `total_spent` | integer | Total amount spent <i class="label label-info">read-only</i> |
| `avatar_url` | string | Gravatar URL |
| `billing_address` | array | List of Billing Address fields. See [Billing Address Properties](#billing-address-properties) |
| `shipping_address` | array | List of Shipping Address fields. See [Shipping Address Properties](#shipping-address-properties) |
| Attribute | Type | Description |
| ------------------ | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `id` | integer | Customer ID (user ID) <i class="label label-info">read-only</i> |
| `created_at` | string | UTC DateTime when the customer was created <i class="label label-info">read-only</i> |
| `email` | string | Customer email address <i class="label label-info">mandatory</i> |
| `first_name` | string | Customer first name |
| `last_name` | string | Customer last name |
| `username` | string | Customer username, can be generated automatically from the customer's email addrees if the option `woocommerce_registration_generate_username` is equal to `yes` <i class="label label-info">cannot be changed</i> |
| `password` | string | Customer password, can be generated automatically with [`wp_generate_password()`](http://codex.wordpress.org/Function_Reference/wp_generate_password) if the "Automatically generate customer password" option is enabled, check the index meta for `generate_password` <i class="label label-info">write-only</i> |
| `last_order_id` | integer | Last order ID <i class="label label-info">read-only</i> |
| `last_order_date` | string | UTC DateTime of the customer last order <i class="label label-info">read-only</i> |
| `orders_count` | integer | Quantity of orders that the customer have <i class="label label-info">read-only</i> |
| `total_spent` | integer | Total amount spent <i class="label label-info">read-only</i> |
| `avatar_url` | string | Gravatar URL |
| `billing_address` | array | List of Billing Address fields. See [Billing Address Properties](#billing-address-properties) |
| `shipping_address` | array | List of Shipping Address fields. See [Shipping Address Properties](#shipping-address-properties) |

### Billing Address Properties ###

Expand Down
Loading