gecko-ruby 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +19 -0
- data/.rubocop.yml +9 -0
- data/.travis.yml +5 -0
- data/CHANGELOG.md +41 -0
- data/CONTRIBUTING.md +0 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +144 -0
- data/Rakefile +19 -0
- data/gecko-ruby.gemspec +34 -0
- data/generate.thor +81 -0
- data/lib/gecko-ruby.rb +1 -0
- data/lib/gecko.rb +31 -0
- data/lib/gecko/client.rb +132 -0
- data/lib/gecko/helpers/association_helper.rb +69 -0
- data/lib/gecko/helpers/inspection_helper.rb +51 -0
- data/lib/gecko/helpers/record_helper.rb +29 -0
- data/lib/gecko/helpers/serialization_helper.rb +61 -0
- data/lib/gecko/helpers/validation_helper.rb +91 -0
- data/lib/gecko/record/account.rb +66 -0
- data/lib/gecko/record/address.rb +33 -0
- data/lib/gecko/record/base.rb +66 -0
- data/lib/gecko/record/base_adapter.rb +365 -0
- data/lib/gecko/record/company.rb +41 -0
- data/lib/gecko/record/contact.rb +25 -0
- data/lib/gecko/record/currency.rb +23 -0
- data/lib/gecko/record/exceptions.rb +15 -0
- data/lib/gecko/record/fulfillment.rb +42 -0
- data/lib/gecko/record/fulfillment_line_item.rb +26 -0
- data/lib/gecko/record/image.rb +38 -0
- data/lib/gecko/record/invoice.rb +29 -0
- data/lib/gecko/record/invoice_line_item.rb +18 -0
- data/lib/gecko/record/location.rb +23 -0
- data/lib/gecko/record/order.rb +50 -0
- data/lib/gecko/record/order_line_item.rb +35 -0
- data/lib/gecko/record/product.rb +27 -0
- data/lib/gecko/record/purchase_order.rb +43 -0
- data/lib/gecko/record/purchase_order_line_item.rb +29 -0
- data/lib/gecko/record/tax_type.rb +21 -0
- data/lib/gecko/record/user.rb +44 -0
- data/lib/gecko/record/variant.rb +96 -0
- data/lib/gecko/version.rb +3 -0
- data/test/client_test.rb +29 -0
- data/test/fixtures/vcr_cassettes/accounts.yml +57 -0
- data/test/fixtures/vcr_cassettes/accounts_current.yml +57 -0
- data/test/fixtures/vcr_cassettes/addresses.yml +68 -0
- data/test/fixtures/vcr_cassettes/addresses_count.yml +58 -0
- data/test/fixtures/vcr_cassettes/companies.yml +62 -0
- data/test/fixtures/vcr_cassettes/companies_count.yml +58 -0
- data/test/fixtures/vcr_cassettes/contacts.yml +60 -0
- data/test/fixtures/vcr_cassettes/contacts_count.yml +58 -0
- data/test/fixtures/vcr_cassettes/currencies.yml +62 -0
- data/test/fixtures/vcr_cassettes/currencies_count.yml +58 -0
- data/test/fixtures/vcr_cassettes/fulfillments.yml +59 -0
- data/test/fixtures/vcr_cassettes/fulfillments_count.yml +58 -0
- data/test/fixtures/vcr_cassettes/images.yml +59 -0
- data/test/fixtures/vcr_cassettes/images_count.yml +58 -0
- data/test/fixtures/vcr_cassettes/invoice_line_items.yml +63 -0
- data/test/fixtures/vcr_cassettes/invoice_line_items_count.yml +62 -0
- data/test/fixtures/vcr_cassettes/invoices.yml +63 -0
- data/test/fixtures/vcr_cassettes/invoices_count.yml +62 -0
- data/test/fixtures/vcr_cassettes/locations.yml +65 -0
- data/test/fixtures/vcr_cassettes/locations_count.yml +58 -0
- data/test/fixtures/vcr_cassettes/order_line_items.yml +63 -0
- data/test/fixtures/vcr_cassettes/order_line_items_count.yml +62 -0
- data/test/fixtures/vcr_cassettes/orders.yml +62 -0
- data/test/fixtures/vcr_cassettes/orders_count.yml +58 -0
- data/test/fixtures/vcr_cassettes/products.yml +79 -0
- data/test/fixtures/vcr_cassettes/products_count.yml +58 -0
- data/test/fixtures/vcr_cassettes/products_new_invalid.yml +54 -0
- data/test/fixtures/vcr_cassettes/products_new_valid.yml +58 -0
- data/test/fixtures/vcr_cassettes/purchase_order_line_items.yml +64 -0
- data/test/fixtures/vcr_cassettes/purchase_order_line_items_count.yml +62 -0
- data/test/fixtures/vcr_cassettes/purchase_orders.yml +63 -0
- data/test/fixtures/vcr_cassettes/purchase_orders_count.yml +62 -0
- data/test/fixtures/vcr_cassettes/tax_types.yml +74 -0
- data/test/fixtures/vcr_cassettes/tax_types_count.yml +62 -0
- data/test/fixtures/vcr_cassettes/users.yml +60 -0
- data/test/fixtures/vcr_cassettes/users_count.yml +58 -0
- data/test/fixtures/vcr_cassettes/users_current.yml +54 -0
- data/test/fixtures/vcr_cassettes/variants.yml +60 -0
- data/test/fixtures/vcr_cassettes/variants_count.yml +58 -0
- data/test/gecko_test.rb +7 -0
- data/test/helpers/association_helper_test.rb +56 -0
- data/test/helpers/inspection_helper_test.rb +27 -0
- data/test/helpers/serialization_helper_test.rb +30 -0
- data/test/helpers/validation_helper_test.rb +24 -0
- data/test/record/account_adapter_test.rb +43 -0
- data/test/record/address_adapter_test.rb +14 -0
- data/test/record/address_test.rb +18 -0
- data/test/record/company_adapter_test.rb +14 -0
- data/test/record/company_test.rb +18 -0
- data/test/record/contact_adapter_test.rb +14 -0
- data/test/record/contact_test.rb +18 -0
- data/test/record/currency_adapter_test.rb +14 -0
- data/test/record/currency_test.rb +18 -0
- data/test/record/fulfillment_adapter_test.rb +24 -0
- data/test/record/fulfillment_line_item_adapter_test.rb +21 -0
- data/test/record/fulfillment_line_item_test.rb +18 -0
- data/test/record/fulfillment_test.rb +27 -0
- data/test/record/image_adapter_test.rb +14 -0
- data/test/record/image_test.rb +25 -0
- data/test/record/invoice_adapter_test.rb +14 -0
- data/test/record/invoice_line_item_adapter_test.rb +20 -0
- data/test/record/invoice_line_item_test.rb +18 -0
- data/test/record/invoice_test.rb +18 -0
- data/test/record/location_adapter_test.rb +14 -0
- data/test/record/location_test.rb +18 -0
- data/test/record/order_adapter_test.rb +14 -0
- data/test/record/order_line_item_adapter_test.rb +14 -0
- data/test/record/order_line_item_test.rb +18 -0
- data/test/record/order_test.rb +18 -0
- data/test/record/product_adapter_test.rb +32 -0
- data/test/record/product_test.rb +18 -0
- data/test/record/purchase_order_adapter_test.rb +14 -0
- data/test/record/purchase_order_line_item_adapter_test.rb +14 -0
- data/test/record/purchase_order_line_item_test.rb +18 -0
- data/test/record/purchase_order_test.rb +18 -0
- data/test/record/tax_type_adapter_test.rb +14 -0
- data/test/record/tax_type_test.rb +18 -0
- data/test/record/user_adapter_test.rb +27 -0
- data/test/record/user_test.rb +18 -0
- data/test/record/variant_adapter_test.rb +14 -0
- data/test/record/variant_test.rb +44 -0
- data/test/support/let.rb +10 -0
- data/test/support/shared_adapter_examples.rb +159 -0
- data/test/support/shared_record_examples.rb +21 -0
- data/test/support/testing_adapter.rb +11 -0
- data/test/support/vcr_support.rb +7 -0
- data/test/test_helper.rb +21 -0
- metadata +430 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.lvh.me:3000/invoice_line_items?limit=5
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Gecko/0.0.3 OAuth2/1.0.0 Faraday/0.9.0 Ruby/2.0.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer e6d789de2b19273c9f42fb7c050022297ea3a2330746e704c02ec7b015cd1084
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Tue, 02 Sep 2014 02:09:34 GMT
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
Connection:
|
28
|
+
- close
|
29
|
+
X-Frame-Options:
|
30
|
+
- SAMEORIGIN
|
31
|
+
X-Xss-Protection:
|
32
|
+
- 1; mode=block
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
X-Rate-Limit-Limit:
|
36
|
+
- '300'
|
37
|
+
X-Rate-Limit-Remaining:
|
38
|
+
- '299'
|
39
|
+
X-Rate-Limit-Reset:
|
40
|
+
- '1409623800'
|
41
|
+
X-Pagination:
|
42
|
+
- '{"total_records":159,"total_pages":32,"first_page":true,"last_page":false,"out_of_bounds":false,"offset":0}'
|
43
|
+
Link:
|
44
|
+
- <http://api.lvh.me:3000/ajax/invoice_line_items?limit=5&page=2>; rel="next",
|
45
|
+
<http://api.lvh.me:3000/ajax/invoice_line_items?limit=5&page=32>; rel="last"
|
46
|
+
Content-Type:
|
47
|
+
- application/json; charset=utf-8
|
48
|
+
Etag:
|
49
|
+
- '"e7dcab514349a0a7a2467061f1603650"'
|
50
|
+
Cache-Control:
|
51
|
+
- max-age=0, private, must-revalidate
|
52
|
+
X-Request-Id:
|
53
|
+
- ba342f2b-2ad0-4fd3-aaf0-ca288d0b2393
|
54
|
+
X-Runtime:
|
55
|
+
- '0.145349'
|
56
|
+
Transfer-Encoding:
|
57
|
+
- chunked
|
58
|
+
body:
|
59
|
+
encoding: UTF-8
|
60
|
+
string: '{"invoice_line_items":[{"id":117,"quantity":"1.0","position":0,"invoice_id":63,"order_line_item_id":233,"ledger_account_id":null},{"id":116,"quantity":"1.0","position":0,"invoice_id":62,"order_line_item_id":232,"ledger_account_id":null},{"id":115,"quantity":"1.0","position":0,"invoice_id":61,"order_line_item_id":231,"ledger_account_id":null},{"id":114,"quantity":"1.0","position":0,"invoice_id":60,"order_line_item_id":230,"ledger_account_id":null},{"id":113,"quantity":"1.0","position":0,"invoice_id":59,"order_line_item_id":229,"ledger_account_id":null}]}'
|
61
|
+
http_version:
|
62
|
+
recorded_at: Tue, 02 Sep 2014 02:09:34 GMT
|
63
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.lvh.me:3000/invoice_line_items?limit=0
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Gecko/0.0.3 OAuth2/1.0.0 Faraday/0.9.0 Ruby/2.0.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer e6d789de2b19273c9f42fb7c050022297ea3a2330746e704c02ec7b015cd1084
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Tue, 02 Sep 2014 02:09:34 GMT
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
Connection:
|
28
|
+
- close
|
29
|
+
X-Frame-Options:
|
30
|
+
- SAMEORIGIN
|
31
|
+
X-Xss-Protection:
|
32
|
+
- 1; mode=block
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
X-Rate-Limit-Limit:
|
36
|
+
- '300'
|
37
|
+
X-Rate-Limit-Remaining:
|
38
|
+
- '298'
|
39
|
+
X-Rate-Limit-Reset:
|
40
|
+
- '1409623800'
|
41
|
+
X-Pagination:
|
42
|
+
- '{"total_records":159,"total_pages":1,"first_page":true,"last_page":true,"out_of_bounds":false,"offset":0}'
|
43
|
+
Link:
|
44
|
+
- <http://api.lvh.me:3000/ajax/invoice_line_items?limit=0&page=1>; rel="last"
|
45
|
+
Content-Type:
|
46
|
+
- application/json; charset=utf-8
|
47
|
+
Etag:
|
48
|
+
- '"7dcf5f14b31a6c1f15adfaf52ec0087d"'
|
49
|
+
Cache-Control:
|
50
|
+
- max-age=0, private, must-revalidate
|
51
|
+
X-Request-Id:
|
52
|
+
- 36638bec-f1c2-45a2-b4d1-6a63cd2bf22a
|
53
|
+
X-Runtime:
|
54
|
+
- '0.211778'
|
55
|
+
Transfer-Encoding:
|
56
|
+
- chunked
|
57
|
+
body:
|
58
|
+
encoding: UTF-8
|
59
|
+
string: '{"invoice_line_items":[]}'
|
60
|
+
http_version:
|
61
|
+
recorded_at: Tue, 02 Sep 2014 02:09:34 GMT
|
62
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.lvh.me:3000/invoices?limit=5
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Gecko/0.0.3 OAuth2/1.0.0 Faraday/0.9.0 Ruby/2.0.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer e6d789de2b19273c9f42fb7c050022297ea3a2330746e704c02ec7b015cd1084
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Tue, 02 Sep 2014 01:58:03 GMT
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
Connection:
|
28
|
+
- close
|
29
|
+
X-Frame-Options:
|
30
|
+
- SAMEORIGIN
|
31
|
+
X-Xss-Protection:
|
32
|
+
- 1; mode=block
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
X-Rate-Limit-Limit:
|
36
|
+
- '300'
|
37
|
+
X-Rate-Limit-Remaining:
|
38
|
+
- '294'
|
39
|
+
X-Rate-Limit-Reset:
|
40
|
+
- '1409623200'
|
41
|
+
X-Pagination:
|
42
|
+
- '{"total_records":58,"total_pages":12,"first_page":true,"last_page":false,"out_of_bounds":false,"offset":0}'
|
43
|
+
Link:
|
44
|
+
- <http://api.lvh.me:3000/ajax/invoices?limit=5&page=2>; rel="next", <http://api.lvh.me:3000/ajax/invoices?limit=5&page=12>;
|
45
|
+
rel="last"
|
46
|
+
Content-Type:
|
47
|
+
- application/json; charset=utf-8
|
48
|
+
Etag:
|
49
|
+
- '"1c698d4d8caf060daf3deac66060f2c2"'
|
50
|
+
Cache-Control:
|
51
|
+
- max-age=0, private, must-revalidate
|
52
|
+
X-Request-Id:
|
53
|
+
- d0bcd363-a036-49d4-8a15-44aed24bc95a
|
54
|
+
X-Runtime:
|
55
|
+
- '1.245256'
|
56
|
+
Transfer-Encoding:
|
57
|
+
- chunked
|
58
|
+
body:
|
59
|
+
encoding: UTF-8
|
60
|
+
string: '{"invoice_line_items":[{"id":128,"quantity":"1.0","position":1,"invoice_id":65,"order_line_item_id":794,"ledger_account_id":1},{"id":129,"quantity":"1.0","position":2,"invoice_id":65,"order_line_item_id":795,"ledger_account_id":1},{"id":130,"quantity":"1.0","position":3,"invoice_id":65,"order_line_item_id":797,"ledger_account_id":1},{"id":131,"quantity":"1.0","position":4,"invoice_id":65,"order_line_item_id":796,"ledger_account_id":1},{"id":132,"quantity":"1.0","position":5,"invoice_id":65,"order_line_item_id":799,"ledger_account_id":1},{"id":133,"quantity":"1.0","position":6,"invoice_id":65,"order_line_item_id":798,"ledger_account_id":1},{"id":134,"quantity":"1.0","position":7,"invoice_id":65,"order_line_item_id":800,"ledger_account_id":1},{"id":135,"quantity":"1.0","position":8,"invoice_id":65,"order_line_item_id":801,"ledger_account_id":1},{"id":136,"quantity":"1.0","position":9,"invoice_id":65,"order_line_item_id":802,"ledger_account_id":1},{"id":137,"quantity":"1.0","position":10,"invoice_id":65,"order_line_item_id":803,"ledger_account_id":1},{"id":138,"quantity":"1.0","position":11,"invoice_id":65,"order_line_item_id":804,"ledger_account_id":1},{"id":139,"quantity":"1.0","position":12,"invoice_id":65,"order_line_item_id":805,"ledger_account_id":1},{"id":140,"quantity":"1.0","position":13,"invoice_id":65,"order_line_item_id":806,"ledger_account_id":1},{"id":141,"quantity":"1.0","position":14,"invoice_id":65,"order_line_item_id":807,"ledger_account_id":1},{"id":142,"quantity":"1.0","position":15,"invoice_id":65,"order_line_item_id":808,"ledger_account_id":1},{"id":143,"quantity":"1.0","position":16,"invoice_id":65,"order_line_item_id":810,"ledger_account_id":1},{"id":144,"quantity":"1.0","position":17,"invoice_id":65,"order_line_item_id":809,"ledger_account_id":1},{"id":145,"quantity":"1.0","position":18,"invoice_id":65,"order_line_item_id":811,"ledger_account_id":1},{"id":146,"quantity":"1.0","position":19,"invoice_id":65,"order_line_item_id":812,"ledger_account_id":1},{"id":147,"quantity":"1.0","position":20,"invoice_id":65,"order_line_item_id":813,"ledger_account_id":1},{"id":148,"quantity":"1.0","position":21,"invoice_id":65,"order_line_item_id":814,"ledger_account_id":1},{"id":149,"quantity":"1.0","position":22,"invoice_id":65,"order_line_item_id":815,"ledger_account_id":1},{"id":150,"quantity":"1.0","position":23,"invoice_id":65,"order_line_item_id":816,"ledger_account_id":1},{"id":151,"quantity":"1.0","position":24,"invoice_id":65,"order_line_item_id":817,"ledger_account_id":1},{"id":152,"quantity":"1.0","position":25,"invoice_id":65,"order_line_item_id":818,"ledger_account_id":1},{"id":153,"quantity":"1.0","position":26,"invoice_id":65,"order_line_item_id":819,"ledger_account_id":1},{"id":154,"quantity":"1.0","position":27,"invoice_id":65,"order_line_item_id":820,"ledger_account_id":1},{"id":155,"quantity":"1.0","position":28,"invoice_id":65,"order_line_item_id":821,"ledger_account_id":1},{"id":156,"quantity":"1.0","position":29,"invoice_id":65,"order_line_item_id":822,"ledger_account_id":1},{"id":157,"quantity":"1.0","position":30,"invoice_id":65,"order_line_item_id":823,"ledger_account_id":1},{"id":158,"quantity":"1.0","position":31,"invoice_id":65,"order_line_item_id":824,"ledger_account_id":1},{"id":159,"quantity":"1.0","position":32,"invoice_id":65,"order_line_item_id":825,"ledger_account_id":1},{"id":160,"quantity":"1.0","position":33,"invoice_id":65,"order_line_item_id":826,"ledger_account_id":1},{"id":161,"quantity":"1.0","position":34,"invoice_id":65,"order_line_item_id":827,"ledger_account_id":1},{"id":162,"quantity":"1.0","position":35,"invoice_id":65,"order_line_item_id":828,"ledger_account_id":1},{"id":163,"quantity":"1.0","position":36,"invoice_id":65,"order_line_item_id":829,"ledger_account_id":1},{"id":164,"quantity":"1.0","position":37,"invoice_id":65,"order_line_item_id":830,"ledger_account_id":1},{"id":165,"quantity":"1.0","position":38,"invoice_id":65,"order_line_item_id":831,"ledger_account_id":1},{"id":166,"quantity":"1.0","position":39,"invoice_id":65,"order_line_item_id":832,"ledger_account_id":1},{"id":167,"quantity":"1.0","position":40,"invoice_id":65,"order_line_item_id":833,"ledger_account_id":1},{"id":168,"quantity":"1.0","position":41,"invoice_id":65,"order_line_item_id":834,"ledger_account_id":1},{"id":118,"quantity":"1.0","position":1,"invoice_id":64,"order_line_item_id":960,"ledger_account_id":null},{"id":120,"quantity":"1.0","position":3,"invoice_id":64,"order_line_item_id":961,"ledger_account_id":null},{"id":127,"quantity":"1.0","position":10,"invoice_id":64,"order_line_item_id":969,"ledger_account_id":null},{"id":117,"quantity":"1.0","position":0,"invoice_id":63,"order_line_item_id":233,"ledger_account_id":null},{"id":116,"quantity":"1.0","position":0,"invoice_id":62,"order_line_item_id":232,"ledger_account_id":null},{"id":115,"quantity":"1.0","position":0,"invoice_id":61,"order_line_item_id":231,"ledger_account_id":null}],"invoices":[{"id":65,"document_url":"http://api.lvh.me:3000/d/4Y0iA-QV1Kw1bWlDY12d1Jum","order_id":126,"shipping_address_id":347,"billing_address_id":347,"payment_term_id":3,"invoice_number":"GHINV-0065","invoiced_at":"2014-08-01","due_at":"2014-08-31","notes":null,"created_at":"2014-08-01T03:11:52.042Z","updated_at":"2014-08-01T03:11:52.042Z","exchange_rate":"1.0","destination_url":null,"invoice_line_item_ids":[128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168]},{"id":64,"document_url":"http://api.lvh.me:3000/d/5T3WulUpNKTy677N6QAEs6gi","order_id":136,"shipping_address_id":311,"billing_address_id":311,"payment_term_id":3,"invoice_number":"GHINV-0064","invoiced_at":"2014-07-09","due_at":"2014-08-08","notes":null,"created_at":"2014-07-09T03:27:06.085Z","updated_at":"2014-07-09T03:27:06.085Z","exchange_rate":"1.0","destination_url":null,"invoice_line_item_ids":[118,120,127]},{"id":63,"document_url":"http://api.lvh.me:3000/d/Vc6H9McQD8AxOaE2CecsqxnM","order_id":112,"shipping_address_id":336,"billing_address_id":336,"payment_term_id":3,"invoice_number":"GHINV-0063","invoiced_at":"2014-06-12","due_at":"2014-07-12","notes":null,"created_at":"2014-06-12T08:12:01.375Z","updated_at":"2014-06-12T08:12:01.375Z","exchange_rate":"2.0","destination_url":"https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=861a580e-4391-40a4-ad96-15da08da0687","invoice_line_item_ids":[117]},{"id":62,"document_url":"http://api.lvh.me:3000/d/dVbTdJyg1FqqmlYFI7OT1_Bk","order_id":111,"shipping_address_id":336,"billing_address_id":336,"payment_term_id":3,"invoice_number":"GHINV-0062","invoiced_at":"2014-06-12","due_at":"2014-07-12","notes":null,"created_at":"2014-06-12T08:10:33.059Z","updated_at":"2014-06-12T08:10:33.059Z","exchange_rate":"1.0","destination_url":"https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=1e6be457-4d4a-4c78-abf7-e79190d4b285","invoice_line_item_ids":[116]},{"id":61,"document_url":"http://api.lvh.me:3000/d/IGVkF0v75J_n9VLvLc9vCwBe","order_id":110,"shipping_address_id":336,"billing_address_id":336,"payment_term_id":3,"invoice_number":"GHINV-0061","invoiced_at":"2014-06-12","due_at":"2014-07-12","notes":null,"created_at":"2014-06-12T08:09:59.664Z","updated_at":"2014-06-12T08:09:59.664Z","exchange_rate":"0.9","destination_url":"https://go.xero.com/AccountsReceivable/View.aspx?InvoiceID=97993caa-0fc4-45eb-bc5f-2748157b30de","invoice_line_item_ids":[115]}]}'
|
61
|
+
http_version:
|
62
|
+
recorded_at: Tue, 02 Sep 2014 01:58:03 GMT
|
63
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.lvh.me:3000/invoices?limit=0
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Gecko/0.0.3 OAuth2/1.0.0 Faraday/0.9.0 Ruby/2.0.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer e6d789de2b19273c9f42fb7c050022297ea3a2330746e704c02ec7b015cd1084
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Tue, 02 Sep 2014 01:58:02 GMT
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
Connection:
|
28
|
+
- close
|
29
|
+
X-Frame-Options:
|
30
|
+
- SAMEORIGIN
|
31
|
+
X-Xss-Protection:
|
32
|
+
- 1; mode=block
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
X-Rate-Limit-Limit:
|
36
|
+
- '300'
|
37
|
+
X-Rate-Limit-Remaining:
|
38
|
+
- '295'
|
39
|
+
X-Rate-Limit-Reset:
|
40
|
+
- '1409623200'
|
41
|
+
X-Pagination:
|
42
|
+
- '{"total_records":58,"total_pages":1,"first_page":true,"last_page":true,"out_of_bounds":false,"offset":0}'
|
43
|
+
Link:
|
44
|
+
- <http://api.lvh.me:3000/ajax/invoices?limit=0&page=1>; rel="last"
|
45
|
+
Content-Type:
|
46
|
+
- application/json; charset=utf-8
|
47
|
+
Etag:
|
48
|
+
- '"33893aed6ce6dc420d9e398e859c61af"'
|
49
|
+
Cache-Control:
|
50
|
+
- max-age=0, private, must-revalidate
|
51
|
+
X-Request-Id:
|
52
|
+
- a8331dff-8da2-4c46-bc6d-db9a040a22df
|
53
|
+
X-Runtime:
|
54
|
+
- '0.406148'
|
55
|
+
Transfer-Encoding:
|
56
|
+
- chunked
|
57
|
+
body:
|
58
|
+
encoding: UTF-8
|
59
|
+
string: '{"invoices":[]}'
|
60
|
+
http_version:
|
61
|
+
recorded_at: Tue, 02 Sep 2014 01:58:02 GMT
|
62
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,65 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.lvh.me:3000/locations?limit=5
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Gecko/0.0.3 OAuth2/0.9.3 Faraday/0.9.0 Ruby/2.0.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer 0a45b6958b71a3d0dcfe1d0879a7ee777e04e0d646d005b06f96d328db783fea
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- '*/*'
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Mon, 05 May 2014 02:51:19 GMT
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
Connection:
|
28
|
+
- close
|
29
|
+
X-Frame-Options:
|
30
|
+
- SAMEORIGIN
|
31
|
+
X-Xss-Protection:
|
32
|
+
- 1; mode=block
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
X-Ua-Compatible:
|
36
|
+
- chrome=1
|
37
|
+
X-Pagination:
|
38
|
+
- '{"total_records":12,"total_pages":3,"first_page":true,"last_page":false,"out_of_bounds":false,"offset":0}'
|
39
|
+
Link:
|
40
|
+
- <http://api.lvh.me:3000/ajax/locations?limit=5&page=2>; rel="next", <http://api.lvh.me:3000/ajax/locations?limit=5&page=3>;
|
41
|
+
rel="last"
|
42
|
+
Content-Type:
|
43
|
+
- application/json; charset=utf-8
|
44
|
+
Etag:
|
45
|
+
- '"c4bd4231dfa34d3c4344a2783b1ba6e9"'
|
46
|
+
Cache-Control:
|
47
|
+
- max-age=0, private, must-revalidate
|
48
|
+
X-Request-Id:
|
49
|
+
- 31f73b8d-47cc-421c-9f50-3106a6dea619
|
50
|
+
X-Runtime:
|
51
|
+
- '0.285190'
|
52
|
+
Transfer-Encoding:
|
53
|
+
- chunked
|
54
|
+
body:
|
55
|
+
encoding: UTF-8
|
56
|
+
string: '{"locations":[{"id":18,"city":"Auckland","country":"NZ","label":"Primary
|
57
|
+
Location","state":"s","address1":"65 Tennyson St","address2":"","suburb":"Mt
|
58
|
+
Eden","zip_code":"123456","status":"active","holds_stock":true},{"id":153,"city":"Singapore","country":"SG","label":"Something
|
59
|
+
else","state":"Singapore","address1":"555 Loko Pako","address2":"#03-01","suburb":"Singapore","zip_code":"123456","status":"active","holds_stock":true},{"id":159,"city":"","country":"SG","label":"Head
|
60
|
+
Office","state":"","address1":"42b Hong Kong Street","address2":"Singapore","suburb":"059681","zip_code":"059681","status":"active","holds_stock":true},{"id":160,"city":"Singapore","country":"SG","label":"Warehouse","state":"SG","address1":"999
|
61
|
+
Beach Road","address2":"","suburb":"Singapore","zip_code":"999999","status":"active","holds_stock":true},{"id":1395,"city":"Singapore","country":"SG","label":"Adler
|
62
|
+
Retailers Consignment","state":"","address1":"42B Hong Kong St","address2":"","suburb":"","zip_code":null,"status":"active","holds_stock":true}]}'
|
63
|
+
http_version:
|
64
|
+
recorded_at: Mon, 05 May 2014 02:51:19 GMT
|
65
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,58 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.lvh.me:3000/locations?limit=0
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Gecko/0.0.3 OAuth2/0.9.3 Faraday/0.9.0 Ruby/2.0.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer 7d3ed5d622e3becc591f15132f07bb52f05fcbd899f6d9dce60409c0e2c712e5
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- '*/*'
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Date:
|
24
|
+
- Thu, 15 May 2014 09:55:42 GMT
|
25
|
+
Status:
|
26
|
+
- 200 OK
|
27
|
+
Connection:
|
28
|
+
- close
|
29
|
+
X-Frame-Options:
|
30
|
+
- SAMEORIGIN
|
31
|
+
X-Xss-Protection:
|
32
|
+
- 1; mode=block
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
X-Ua-Compatible:
|
36
|
+
- chrome=1
|
37
|
+
X-Pagination:
|
38
|
+
- '{"total_records":12,"total_pages":1,"first_page":true,"last_page":true,"out_of_bounds":false,"offset":0}'
|
39
|
+
Link:
|
40
|
+
- <http://api.lvh.me:3000/ajax/locations?limit=0&page=1>; rel="last"
|
41
|
+
Content-Type:
|
42
|
+
- application/json; charset=utf-8
|
43
|
+
Etag:
|
44
|
+
- '"7e34271b3c1a214580724568b71ac35d"'
|
45
|
+
Cache-Control:
|
46
|
+
- max-age=0, private, must-revalidate
|
47
|
+
X-Request-Id:
|
48
|
+
- 66d3f42a-4cae-45c7-893e-e1c995b551e4
|
49
|
+
X-Runtime:
|
50
|
+
- '0.125827'
|
51
|
+
Transfer-Encoding:
|
52
|
+
- chunked
|
53
|
+
body:
|
54
|
+
encoding: UTF-8
|
55
|
+
string: '{"locations":[]}'
|
56
|
+
http_version:
|
57
|
+
recorded_at: Thu, 15 May 2014 09:55:42 GMT
|
58
|
+
recorded_with: VCR 2.9.0
|
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.lvh.me:3000/order_line_items?limit=5
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Gecko/0.0.3 OAuth2/1.0.0 Faraday/0.9.0 Ruby/2.0.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer d7ebf96f5550d6ffc05474c4da3ce9d8e408ca2540ee0bbcb9e2140d47e64963
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: 'OK '
|
22
|
+
headers:
|
23
|
+
X-Frame-Options:
|
24
|
+
- SAMEORIGIN
|
25
|
+
X-Xss-Protection:
|
26
|
+
- 1; mode=block
|
27
|
+
X-Content-Type-Options:
|
28
|
+
- nosniff
|
29
|
+
X-Rate-Limit-Limit:
|
30
|
+
- '300'
|
31
|
+
X-Rate-Limit-Remaining:
|
32
|
+
- '298'
|
33
|
+
X-Rate-Limit-Reset:
|
34
|
+
- '1412079600'
|
35
|
+
X-Pagination:
|
36
|
+
- '{"total_records":2367,"total_pages":474,"first_page":true,"last_page":false,"out_of_bounds":false,"offset":0}'
|
37
|
+
Link:
|
38
|
+
- <http://api.lvh.me:3000/ajax/order_line_items?limit=5&page=2>; rel="next",
|
39
|
+
<http://api.lvh.me:3000/ajax/order_line_items?limit=5&page=474>; rel="last"
|
40
|
+
Content-Type:
|
41
|
+
- application/json; charset=utf-8
|
42
|
+
Etag:
|
43
|
+
- '"b98ffcf29ff45dd629fff2c22cecdb6f"'
|
44
|
+
Cache-Control:
|
45
|
+
- max-age=0, private, must-revalidate
|
46
|
+
X-Request-Id:
|
47
|
+
- 7932c0f9-aee4-44b4-af68-7da8078a4318
|
48
|
+
X-Runtime:
|
49
|
+
- '0.088467'
|
50
|
+
Server:
|
51
|
+
- WEBrick/1.3.1 (Ruby/2.0.0/2014-05-08)
|
52
|
+
Date:
|
53
|
+
- Tue, 30 Sep 2014 12:19:01 GMT
|
54
|
+
Content-Length:
|
55
|
+
- '1527'
|
56
|
+
Connection:
|
57
|
+
- Keep-Alive
|
58
|
+
body:
|
59
|
+
encoding: UTF-8
|
60
|
+
string: '{"order_line_items":[{"id":1662952,"order_id":537098,"variant_id":2090506,"tax_type_id":8,"discount":null,"quantity":"50.0","price":"20.0","tax_rate_override":null,"freeform":false,"label":null,"position":0,"line_type":null,"image_url":null,"tax_rate":null,"fulfillment_line_item_ids":[],"invoice_line_item_ids":[]},{"id":1662276,"order_id":536924,"variant_id":2144056,"tax_type_id":8,"discount":null,"quantity":"10.0","price":"120.0","tax_rate_override":null,"freeform":false,"label":null,"position":0,"line_type":null,"image_url":null,"tax_rate":null,"fulfillment_line_item_ids":[],"invoice_line_item_ids":[]},{"id":1643360,"order_id":532901,"variant_id":2133631,"tax_type_id":8,"discount":null,"quantity":"1200.0","price":"12.0","tax_rate_override":null,"freeform":false,"label":null,"position":0,"line_type":null,"image_url":null,"tax_rate":null,"fulfillment_line_item_ids":[1286455],"invoice_line_item_ids":[1063816]},{"id":1642996,"order_id":532841,"variant_id":2030661,"tax_type_id":8,"discount":null,"quantity":"50.0","price":"5.0","tax_rate_override":null,"freeform":false,"label":null,"position":0,"line_type":null,"image_url":null,"tax_rate":null,"fulfillment_line_item_ids":[1277051],"invoice_line_item_ids":[1062933]},{"id":1642847,"order_id":532796,"variant_id":2144057,"tax_type_id":8,"discount":null,"quantity":"9.0","price":"130.0","tax_rate_override":null,"freeform":false,"label":null,"position":0,"line_type":null,"image_url":null,"tax_rate":null,"fulfillment_line_item_ids":[],"invoice_line_item_ids":[]}]}'
|
61
|
+
http_version:
|
62
|
+
recorded_at: Tue, 30 Sep 2014 12:19:01 GMT
|
63
|
+
recorded_with: VCR 2.9.2
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: http://api.lvh.me:3000/order_line_items?limit=0
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Gecko/0.0.3 OAuth2/1.0.0 Faraday/0.9.0 Ruby/2.0.0
|
12
|
+
Authorization:
|
13
|
+
- Bearer d7ebf96f5550d6ffc05474c4da3ce9d8e408ca2540ee0bbcb9e2140d47e64963
|
14
|
+
Accept-Encoding:
|
15
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
16
|
+
Accept:
|
17
|
+
- "*/*"
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: 'OK '
|
22
|
+
headers:
|
23
|
+
X-Frame-Options:
|
24
|
+
- SAMEORIGIN
|
25
|
+
X-Xss-Protection:
|
26
|
+
- 1; mode=block
|
27
|
+
X-Content-Type-Options:
|
28
|
+
- nosniff
|
29
|
+
X-Rate-Limit-Limit:
|
30
|
+
- '300'
|
31
|
+
X-Rate-Limit-Remaining:
|
32
|
+
- '299'
|
33
|
+
X-Rate-Limit-Reset:
|
34
|
+
- '1412079600'
|
35
|
+
X-Pagination:
|
36
|
+
- '{"total_records":2367,"total_pages":1,"first_page":true,"last_page":true,"out_of_bounds":false,"offset":0}'
|
37
|
+
Link:
|
38
|
+
- <http://api.lvh.me:3000/ajax/order_line_items?limit=0&page=1>; rel="last"
|
39
|
+
Content-Type:
|
40
|
+
- application/json; charset=utf-8
|
41
|
+
Etag:
|
42
|
+
- '"fb96b558e33bb3ea0305714e0fde1c86"'
|
43
|
+
Cache-Control:
|
44
|
+
- max-age=0, private, must-revalidate
|
45
|
+
X-Request-Id:
|
46
|
+
- 9e5b6934-bd93-480c-b27c-d39158928070
|
47
|
+
X-Runtime:
|
48
|
+
- '0.068132'
|
49
|
+
Server:
|
50
|
+
- WEBrick/1.3.1 (Ruby/2.0.0/2014-05-08)
|
51
|
+
Date:
|
52
|
+
- Tue, 30 Sep 2014 12:19:01 GMT
|
53
|
+
Content-Length:
|
54
|
+
- '23'
|
55
|
+
Connection:
|
56
|
+
- Keep-Alive
|
57
|
+
body:
|
58
|
+
encoding: UTF-8
|
59
|
+
string: '{"order_line_items":[]}'
|
60
|
+
http_version:
|
61
|
+
recorded_at: Tue, 30 Sep 2014 12:19:01 GMT
|
62
|
+
recorded_with: VCR 2.9.2
|