spree-api-client 0.0.2 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +9 -0
  3. data/LICENSE.txt +674 -0
  4. data/README.md +31 -38
  5. data/lib/spree_client/api/v1/products.rb +23 -0
  6. data/lib/spree_client/api/v1/properties.rb +12 -0
  7. data/lib/spree_client/api/v1/resources.rb +142 -0
  8. data/lib/spree_client/api/v1/stock_items.rb +27 -0
  9. data/lib/spree_client/api/v1/stock_locations.rb +33 -0
  10. data/lib/spree_client/api/v1/stock_movements.rb +16 -0
  11. data/lib/spree_client/api/v1/taxonomies.rb +12 -0
  12. data/lib/spree_client/api/v1/variants.rb +13 -0
  13. data/lib/spree_client/api/v1.rb +53 -0
  14. data/lib/spree_client/api.rb +1 -0
  15. data/lib/spree_client/attributes.rb +28 -0
  16. data/lib/spree_client/models/product.rb +7 -0
  17. data/lib/spree_client/models/property.rb +6 -0
  18. data/lib/spree_client/models/stock_item.rb +7 -0
  19. data/lib/spree_client/models/stock_location.rb +7 -0
  20. data/lib/spree_client/models/stock_movement.rb +7 -0
  21. data/lib/spree_client/models/store.rb +7 -0
  22. data/lib/spree_client/models/taxonomy.rb +5 -0
  23. data/lib/spree_client/models/variant.rb +7 -0
  24. data/lib/spree_client/models.rb +5 -0
  25. data/lib/spree_client.rb +3 -0
  26. data/lib/spree_client.rb~ +71 -0
  27. metadata +73 -192
  28. data/.gitignore +0 -17
  29. data/.ruby-version +0 -1
  30. data/.travis.yml +0 -11
  31. data/CONTRIBUTING.md +0 -8
  32. data/Gemfile +0 -9
  33. data/LICENSE +0 -22
  34. data/Rakefile +0 -7
  35. data/fixtures/cassette_library/addresss.yml +0 -46
  36. data/fixtures/cassette_library/countries.yml +0 -52
  37. data/fixtures/cassette_library/orders.yml +0 -48
  38. data/fixtures/cassette_library/payments.yml +0 -48
  39. data/fixtures/cassette_library/products.yml +0 -66
  40. data/fixtures/cassette_library/properties.yml +0 -48
  41. data/fixtures/cassette_library/request.yml +0 -46
  42. data/fixtures/cassette_library/return_authorizations.yml +0 -48
  43. data/fixtures/cassette_library/shipment_ready.yml +0 -46
  44. data/fixtures/cassette_library/taxonomies.yml +0 -48
  45. data/fixtures/cassette_library/taxons.yml +0 -48
  46. data/fixtures/cassette_library/variants.yml +0 -63
  47. data/fixtures/cassette_library/zones.yml +0 -49
  48. data/lib/spree-api-client/addresses.rb +0 -15
  49. data/lib/spree-api-client/connection.rb +0 -31
  50. data/lib/spree-api-client/countries.rb +0 -15
  51. data/lib/spree-api-client/error.rb +0 -47
  52. data/lib/spree-api-client/line_items.rb +0 -19
  53. data/lib/spree-api-client/orders.rb +0 -32
  54. data/lib/spree-api-client/payments.rb +0 -43
  55. data/lib/spree-api-client/products.rb +0 -31
  56. data/lib/spree-api-client/properties.rb +0 -31
  57. data/lib/spree-api-client/request.rb +0 -56
  58. data/lib/spree-api-client/return_authorizations.rb +0 -31
  59. data/lib/spree-api-client/shipments.rb +0 -15
  60. data/lib/spree-api-client/taxonomies.rb +0 -31
  61. data/lib/spree-api-client/taxons.rb +0 -27
  62. data/lib/spree-api-client/variants.rb +0 -31
  63. data/lib/spree-api-client/version.rb +0 -7
  64. data/lib/spree-api-client/zones.rb +0 -31
  65. data/lib/spree-api-client.rb +0 -49
  66. data/spec/addresses_spec.rb +0 -12
  67. data/spec/client_spec.rb +0 -32
  68. data/spec/countries_spec.rb +0 -12
  69. data/spec/orders_spec.rb +0 -12
  70. data/spec/payments_spec.rb +0 -12
  71. data/spec/products_spec.rb +0 -12
  72. data/spec/properties_spec.rb +0 -12
  73. data/spec/return_authorizations_spec.rb +0 -12
  74. data/spec/shipments_spec.rb +0 -12
  75. data/spec/spec_helper.rb +0 -10
  76. data/spec/support/vcr.rb +0 -9
  77. data/spec/taxonomies_spec.rb +0 -12
  78. data/spec/taxons_spec.rb +0 -12
  79. data/spec/variants_spec.rb +0 -12
  80. data/spec/zones_spec.rb +0 -12
  81. data/spree-api-client.gemspec +0 -29
@@ -1,66 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:4000/store/api/products?per_page=30
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json
12
- X-Spree-Token:
13
- - b56019f04b61a50553ee323f5ab68c6b435871971e79c987
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
20
- code: 200
21
- message: ! 'OK '
22
- headers:
23
- Content-Type:
24
- - application/json
25
- X-Ua-Compatible:
26
- - IE=Edge
27
- Etag:
28
- - ! '"f88b1efdc1f3677b0f8a57827b15d9b6"'
29
- Cache-Control:
30
- - max-age=0, private, must-revalidate
31
- X-Request-Id:
32
- - c8e26bdfe8a2149819540e7bc379e305
33
- X-Runtime:
34
- - '0.900670'
35
- Content-Length:
36
- - '16215'
37
- Server:
38
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)
39
- Date:
40
- - Fri, 07 Dec 2012 17:37:15 GMT
41
- Connection:
42
- - Keep-Alive
43
- body:
44
- encoding: US-ASCII
45
- string: ! '{"count":6,"total_count":6,"current_page":1,"pages":1,"products":[{"product":{"id":1,"name":"Bomb","description":"","price":"12.99","available_on":"2012-10-28T00:00:00Z","permalink":"bomb","count_on_hand":48,"meta_description":"","meta_keywords":"","taxon_ids":[1,3],"variants":[{"variant":{"id":1,"name":"Bomb","count_on_hand":0,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"12.99","permalink":"bomb","option_values":[]}},{"variant":{"id":2,"name":"Bomb","count_on_hand":8,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"bomb","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":3,"name":"Bomb","count_on_hand":20,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"bomb","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":4,"name":"Bomb","count_on_hand":14,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"bomb","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":13,"name":"Bomb","count_on_hand":5,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"12.99","permalink":"bomb","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"images":[{"image":{"id":10,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"bomb-large.jpg","type":"Spree::Image","attachment_updated_at":"2012-10-30T16:14:05Z","attachment_width":690,"attachment_height":797,"alt":"","viewable_type":"Spree::Variant","viewable_id":1}}],"option_types":[{"option_type":{"id":1,"name":"Size","presentation":"Size","position":0,"option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"product_properties":[{"product_property":{"id":1,"product_id":1,"property_id":2,"value":null,"property_name":"Brand"}}]}},{"product":{"id":2,"name":"Disobey","description":"","price":"12.99","available_on":"2012-10-30T00:00:00Z","permalink":"disobey","count_on_hand":49,"meta_description":"","meta_keywords":"","taxon_ids":[1,3],"variants":[{"variant":{"id":5,"name":"Disobey","count_on_hand":0,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"12.99","permalink":"disobey","option_values":[]}},{"variant":{"id":6,"name":"Disobey","count_on_hand":10,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"disobey","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":7,"name":"Disobey","count_on_hand":19,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"disobey","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":8,"name":"Disobey","count_on_hand":15,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"disobey","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":14,"name":"Disobey","count_on_hand":5,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"disobey","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"images":[{"image":{"id":3,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"disobey-large.jpg","type":"Spree::Image","attachment_updated_at":"2012-10-30T12:18:19Z","attachment_width":690,"attachment_height":797,"alt":"","viewable_type":"Spree::Variant","viewable_id":5}}],"option_types":[{"option_type":{"id":1,"name":"Size","presentation":"Size","position":0,"option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"product_properties":[{"product_property":{"id":2,"product_id":2,"property_id":2,"value":null,"property_name":"Brand"}}]}},{"product":{"id":3,"name":"POV","description":"","price":"12.99","available_on":"2012-10-30T00:00:00Z","permalink":"pov","count_on_hand":50,"meta_description":"","meta_keywords":"","taxon_ids":[1,3],"variants":[{"variant":{"id":9,"name":"POV","count_on_hand":0,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"12.99","permalink":"pov","option_values":[]}},{"variant":{"id":10,"name":"POV","count_on_hand":10,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"pov","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":11,"name":"POV","count_on_hand":19,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"pov","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":12,"name":"POV","count_on_hand":15,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"pov","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":15,"name":"POV","count_on_hand":5,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"pov","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"images":[{"image":{"id":4,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"pov-large.jpg","type":"Spree::Image","attachment_updated_at":"2012-10-30T12:18:33Z","attachment_width":690,"attachment_height":797,"alt":"","viewable_type":"Spree::Variant","viewable_id":9}}],"option_types":[{"option_type":{"id":1,"name":"Size","presentation":"Size","position":0,"option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"product_properties":[{"product_property":{"id":3,"product_id":3,"property_id":2,"value":null,"property_name":"Brand"}}]}},{"product":{"id":4,"name":"Whitelines
46
- 1","description":"","price":"14.0","available_on":"2012-11-05T00:00:00Z","permalink":"whitelines-1","count_on_hand":0,"meta_description":"","meta_keywords":"","taxon_ids":[2],"variants":[{"variant":{"id":16,"name":"Whitelines
47
- 1","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":null,"permalink":"whitelines-1","option_values":[]}},{"variant":{"id":17,"name":"Whitelines
48
- 1","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-1","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":18,"name":"Whitelines
49
- 1","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-1","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":19,"name":"Whitelines
50
- 1","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-1","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":20,"name":"Whitelines
51
- 1","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-1","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"images":[{"image":{"id":11,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"WL_2011_Tshirt2.jpg","type":"Spree::Image","attachment_updated_at":"2012-11-05T12:08:06Z","attachment_width":650,"attachment_height":580,"alt":"","viewable_type":"Spree::Variant","viewable_id":16}}],"option_types":[{"option_type":{"id":1,"name":"Size","presentation":"Size","position":0,"option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"product_properties":[{"product_property":{"id":4,"product_id":4,"property_id":2,"value":null,"property_name":"Brand"}}]}},{"product":{"id":5,"name":"Whitelines
52
- 2","description":"","price":"14.0","available_on":"2012-11-05T00:00:00Z","permalink":"whitelines-2","count_on_hand":0,"meta_description":"","meta_keywords":"","taxon_ids":[2],"variants":[{"variant":{"id":21,"name":"Whitelines
53
- 2","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":null,"permalink":"whitelines-2","option_values":[]}},{"variant":{"id":23,"name":"Whitelines
54
- 2","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-2","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":24,"name":"Whitelines
55
- 2","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-2","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":25,"name":"Whitelines
56
- 2","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-2","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":26,"name":"Whitelines
57
- 2","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-2","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"images":[{"image":{"id":13,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"WL_2011_Tshirt2_copy.jpg","type":"Spree::Image","attachment_updated_at":"2012-11-05T12:09:24Z","attachment_width":658,"attachment_height":580,"alt":"","viewable_type":"Spree::Variant","viewable_id":21}}],"option_types":[{"option_type":{"id":1,"name":"Size","presentation":"Size","position":0,"option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"product_properties":[{"product_property":{"id":5,"product_id":5,"property_id":2,"value":null,"property_name":"Brand"}}]}},{"product":{"id":6,"name":"Whitelines
58
- 3","description":"","price":"14.0","available_on":"2012-11-05T00:00:00Z","permalink":"whitelines-3","count_on_hand":0,"meta_description":"","meta_keywords":"","taxon_ids":[2],"variants":[{"variant":{"id":22,"name":"Whitelines
59
- 3","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":null,"permalink":"whitelines-3","option_values":[]}},{"variant":{"id":27,"name":"Whitelines
60
- 3","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-3","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":28,"name":"Whitelines
61
- 3","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-3","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":29,"name":"Whitelines
62
- 3","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-3","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":30,"name":"Whitelines
63
- 3","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-3","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"images":[{"image":{"id":14,"position":1,"attachment_content_type":"image/jpeg","attachment_file_name":"WL_2011_Tshirt2_copy_2.jpg","type":"Spree::Image","attachment_updated_at":"2012-11-05T12:10:02Z","attachment_width":652,"attachment_height":586,"alt":"","viewable_type":"Spree::Variant","viewable_id":22}}],"option_types":[{"option_type":{"id":1,"name":"Size","presentation":"Size","position":0,"option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}},{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}],"product_properties":[{"product_property":{"id":6,"product_id":6,"property_id":2,"value":null,"property_name":"Brand"}}]}}]}'
64
- http_version:
65
- recorded_at: Fri, 07 Dec 2012 17:37:15 GMT
66
- recorded_with: VCR 2.3.0
@@ -1,48 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:4000/store/api/products/1/product_properties?per_page=30
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json
12
- X-Spree-Token:
13
- - b56019f04b61a50553ee323f5ab68c6b435871971e79c987
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
20
- code: 200
21
- message: ! 'OK '
22
- headers:
23
- Content-Type:
24
- - application/json
25
- X-Ua-Compatible:
26
- - IE=Edge
27
- Etag:
28
- - ! '"6f9c87e8ee8667300cf802098fd88155"'
29
- Cache-Control:
30
- - max-age=0, private, must-revalidate
31
- X-Request-Id:
32
- - 7c789d8104188f51ee174eff0e5f90d3
33
- X-Runtime:
34
- - '0.126097'
35
- Content-Length:
36
- - '159'
37
- Server:
38
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)
39
- Date:
40
- - Fri, 07 Dec 2012 17:37:15 GMT
41
- Connection:
42
- - Keep-Alive
43
- body:
44
- encoding: US-ASCII
45
- string: ! '{"count":1,"current_page":1,"pages":1,"product_properties":[{"product_property":{"id":1,"product_id":1,"property_id":2,"value":null,"property_name":"Brand"}}]}'
46
- http_version:
47
- recorded_at: Fri, 07 Dec 2012 17:37:15 GMT
48
- recorded_with: VCR 2.3.0
@@ -1,46 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:4000/store/api/products?per_page=30
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json
12
- X-Spree-Token:
13
- - randomtokenstring
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
20
- code: 401
21
- message: ! 'Unauthorized '
22
- headers:
23
- Content-Type:
24
- - application/json
25
- X-Ua-Compatible:
26
- - IE=Edge
27
- Cache-Control:
28
- - no-cache
29
- X-Request-Id:
30
- - d798d1cce6abd8eabf52f1d7a35f2760
31
- X-Runtime:
32
- - '0.031217'
33
- Content-Length:
34
- - '64'
35
- Server:
36
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)
37
- Date:
38
- - Fri, 07 Dec 2012 17:37:14 GMT
39
- Connection:
40
- - Keep-Alive
41
- body:
42
- encoding: US-ASCII
43
- string: ! '{"error":"translation missing: en-GB.spree.api.invalid_api_key"}'
44
- http_version:
45
- recorded_at: Fri, 07 Dec 2012 17:37:14 GMT
46
- recorded_with: VCR 2.3.0
@@ -1,48 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:4000/store/api/orders/R781501551/return_authorizations?per_page=30
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json
12
- X-Spree-Token:
13
- - b56019f04b61a50553ee323f5ab68c6b435871971e79c987
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
20
- code: 200
21
- message: ! 'OK '
22
- headers:
23
- Content-Type:
24
- - application/json
25
- X-Ua-Compatible:
26
- - IE=Edge
27
- Etag:
28
- - ! '"6f071d405cceb3add2aa1ce45451ae0c"'
29
- Cache-Control:
30
- - max-age=0, private, must-revalidate
31
- X-Request-Id:
32
- - f0c2d041caa9e182c835e7dd10c1d87a
33
- X-Runtime:
34
- - '0.074531'
35
- Content-Length:
36
- - '256'
37
- Server:
38
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)
39
- Date:
40
- - Fri, 07 Dec 2012 17:37:15 GMT
41
- Connection:
42
- - Keep-Alive
43
- body:
44
- encoding: US-ASCII
45
- string: ! '{"count":1,"current_page":1,"pages":1,"return_authorizations":[{"return_authorization":{"id":1,"number":"RMA848788441","state":"authorized","amount":"0.0","order_id":80,"reason":"","created_at":"2012-12-06T11:49:07Z","updated_at":"2012-12-06T11:49:07Z"}}]}'
46
- http_version:
47
- recorded_at: Fri, 07 Dec 2012 17:37:15 GMT
48
- recorded_with: VCR 2.3.0
@@ -1,46 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: put
5
- uri: http://localhost:4000/store/api/orders/1/shipments/1/ready
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json
12
- X-Spree-Token:
13
- - b56019f04b61a50553ee323f5ab68c6b435871971e79c987
14
- Content-Length:
15
- - '0'
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
20
- code: 404
21
- message: ! 'Not Found '
22
- headers:
23
- Content-Type:
24
- - application/json
25
- X-Ua-Compatible:
26
- - IE=Edge
27
- Cache-Control:
28
- - no-cache
29
- X-Request-Id:
30
- - 10a1c5aac78cf46d9e1e115f95cdf0b2
31
- X-Runtime:
32
- - '0.036787'
33
- Content-Length:
34
- - '67'
35
- Server:
36
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)
37
- Date:
38
- - Fri, 07 Dec 2012 17:37:15 GMT
39
- Connection:
40
- - Keep-Alive
41
- body:
42
- encoding: US-ASCII
43
- string: ! '{"error":"translation missing: en-GB.spree.api.resource_not_found"}'
44
- http_version:
45
- recorded_at: Fri, 07 Dec 2012 17:37:15 GMT
46
- recorded_with: VCR 2.3.0
@@ -1,48 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:4000/store/api/taxonomies?per_page=30
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json
12
- X-Spree-Token:
13
- - b56019f04b61a50553ee323f5ab68c6b435871971e79c987
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
20
- code: 200
21
- message: ! 'OK '
22
- headers:
23
- Content-Type:
24
- - application/json
25
- X-Ua-Compatible:
26
- - IE=Edge
27
- Etag:
28
- - ! '"6d4a78870b076c5a43e1017631e3a2a5"'
29
- Cache-Control:
30
- - max-age=0, private, must-revalidate
31
- X-Request-Id:
32
- - 818109a0d62f745696fad81744dbfd74
33
- X-Runtime:
34
- - '0.141291'
35
- Content-Length:
36
- - '522'
37
- Server:
38
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)
39
- Date:
40
- - Fri, 07 Dec 2012 17:37:16 GMT
41
- Connection:
42
- - Keep-Alive
43
- body:
44
- encoding: US-ASCII
45
- string: ! '{"count":3,"current_page":1,"pages":1,"taxonomies":[{"taxonomy":{"id":3,"name":"ridebmx","root":{"id":3,"name":"ridebmx","permalink":"ridebmx","position":0,"parent_id":null,"taxonomy_id":3,"taxons":[]}}},{"taxonomy":{"id":1,"name":"rideukbmx","root":{"id":1,"name":"rideukbmx","permalink":"ridebmx","position":0,"parent_id":null,"taxonomy_id":1,"taxons":[]}}},{"taxonomy":{"id":2,"name":"whitelines","root":{"id":2,"name":"whitelines","permalink":"whitelines","position":0,"parent_id":null,"taxonomy_id":2,"taxons":[]}}}]}'
46
- http_version:
47
- recorded_at: Fri, 07 Dec 2012 17:37:16 GMT
48
- recorded_with: VCR 2.3.0
@@ -1,48 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:4000/store/api/taxonomies/1/taxons?per_page=30
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json
12
- X-Spree-Token:
13
- - b56019f04b61a50553ee323f5ab68c6b435871971e79c987
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
20
- code: 200
21
- message: ! 'OK '
22
- headers:
23
- Content-Type:
24
- - application/json
25
- X-Ua-Compatible:
26
- - IE=Edge
27
- Etag:
28
- - ! '"d751713988987e9331980363e24189ce"'
29
- Cache-Control:
30
- - max-age=0, private, must-revalidate
31
- X-Request-Id:
32
- - 92ea82cb431abd35b20ab737cd348ecd
33
- X-Runtime:
34
- - '0.033542'
35
- Content-Length:
36
- - '2'
37
- Server:
38
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)
39
- Date:
40
- - Fri, 07 Dec 2012 17:37:16 GMT
41
- Connection:
42
- - Keep-Alive
43
- body:
44
- encoding: US-ASCII
45
- string: ! '[]'
46
- http_version:
47
- recorded_at: Fri, 07 Dec 2012 17:37:16 GMT
48
- recorded_with: VCR 2.3.0
@@ -1,63 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:4000/store/api/products/1/variants?per_page=30
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json
12
- X-Spree-Token:
13
- - b56019f04b61a50553ee323f5ab68c6b435871971e79c987
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
20
- code: 200
21
- message: ! 'OK '
22
- headers:
23
- Content-Type:
24
- - application/json
25
- X-Ua-Compatible:
26
- - IE=Edge
27
- Etag:
28
- - ! '"7ebbeb3d86e3857a26aead46fd50dc24"'
29
- Cache-Control:
30
- - max-age=0, private, must-revalidate
31
- X-Request-Id:
32
- - 3ea623d6001a50456a17647ca427e6f5
33
- X-Runtime:
34
- - '0.100396'
35
- Content-Length:
36
- - '9097'
37
- Server:
38
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)
39
- Date:
40
- - Fri, 07 Dec 2012 17:37:16 GMT
41
- Connection:
42
- - Keep-Alive
43
- body:
44
- encoding: US-ASCII
45
- string: ! '{"count":30,"total_count":30,"current_page":1,"pages":1,"variants":[{"variant":{"id":1,"name":"Bomb","count_on_hand":0,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"12.99","permalink":"bomb","option_values":[]}},{"variant":{"id":2,"name":"Bomb","count_on_hand":8,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"bomb","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":3,"name":"Bomb","count_on_hand":20,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"bomb","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":4,"name":"Bomb","count_on_hand":14,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"bomb","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":5,"name":"Disobey","count_on_hand":0,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"12.99","permalink":"disobey","option_values":[]}},{"variant":{"id":6,"name":"Disobey","count_on_hand":10,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"disobey","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":7,"name":"Disobey","count_on_hand":19,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"disobey","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":8,"name":"Disobey","count_on_hand":15,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"disobey","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":9,"name":"POV","count_on_hand":0,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":"12.99","permalink":"pov","option_values":[]}},{"variant":{"id":10,"name":"POV","count_on_hand":10,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"pov","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":11,"name":"POV","count_on_hand":19,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"pov","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":12,"name":"POV","count_on_hand":15,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"pov","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":13,"name":"Bomb","count_on_hand":5,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":"12.99","permalink":"bomb","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":14,"name":"Disobey","count_on_hand":5,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"disobey","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":15,"name":"POV","count_on_hand":5,"sku":"","price":"12.99","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"pov","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":16,"name":"Whitelines
46
- 1","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":null,"permalink":"whitelines-1","option_values":[]}},{"variant":{"id":17,"name":"Whitelines
47
- 1","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-1","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":18,"name":"Whitelines
48
- 1","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-1","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":19,"name":"Whitelines
49
- 1","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-1","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":20,"name":"Whitelines
50
- 1","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-1","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":21,"name":"Whitelines
51
- 2","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":null,"permalink":"whitelines-2","option_values":[]}},{"variant":{"id":22,"name":"Whitelines
52
- 3","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":true,"cost_price":null,"permalink":"whitelines-3","option_values":[]}},{"variant":{"id":23,"name":"Whitelines
53
- 2","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-2","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":24,"name":"Whitelines
54
- 2","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-2","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":25,"name":"Whitelines
55
- 2","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-2","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":26,"name":"Whitelines
56
- 2","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-2","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":27,"name":"Whitelines
57
- 3","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-3","option_values":[{"option_value":{"id":1,"name":"Small","presentation":"Small","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":28,"name":"Whitelines
58
- 3","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-3","option_values":[{"option_value":{"id":2,"name":"Medium","presentation":"Medium","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":29,"name":"Whitelines
59
- 3","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-3","option_values":[{"option_value":{"id":3,"name":"Large","presentation":"Large","option_type_name":"Size","option_type_id":1}}]}},{"variant":{"id":30,"name":"Whitelines
60
- 3","count_on_hand":0,"sku":"","price":"14.0","weight":null,"height":null,"width":null,"depth":null,"is_master":false,"cost_price":null,"permalink":"whitelines-3","option_values":[{"option_value":{"id":4,"name":"XL","presentation":"XL","option_type_name":"Size","option_type_id":1}}]}}]}'
61
- http_version:
62
- recorded_at: Fri, 07 Dec 2012 17:37:16 GMT
63
- recorded_with: VCR 2.3.0
@@ -1,49 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: get
5
- uri: http://localhost:4000/store/api/zones?per_page=30
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- Accept:
11
- - application/json
12
- X-Spree-Token:
13
- - b56019f04b61a50553ee323f5ab68c6b435871971e79c987
14
- Accept-Encoding:
15
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- User-Agent:
17
- - Ruby
18
- response:
19
- status:
20
- code: 200
21
- message: ! 'OK '
22
- headers:
23
- Content-Type:
24
- - application/json
25
- X-Ua-Compatible:
26
- - IE=Edge
27
- Etag:
28
- - ! '"c92d758de9ce28cbf25aff60593d11ae"'
29
- Cache-Control:
30
- - max-age=0, private, must-revalidate
31
- X-Request-Id:
32
- - 10ac41a5c0639706a64786e46caa8352
33
- X-Runtime:
34
- - '0.199412'
35
- Content-Length:
36
- - '293'
37
- Server:
38
- - WEBrick/1.3.1 (Ruby/1.9.3/2012-02-16)
39
- Date:
40
- - Fri, 07 Dec 2012 17:37:16 GMT
41
- Connection:
42
- - Keep-Alive
43
- body:
44
- encoding: US-ASCII
45
- string: ! '{"count":2,"current_page":1,"pages":1,"zones":[{"zone":{"id":4,"name":"England","description":"","zone_members":[]}},{"zone":{"id":3,"name":"UK","description":"UK","zone_members":[{"zone_member":{"id":1017582645,"name":"United
46
- Kingdom","zoneable_type":"Spree::Country","zoneable_id":213}}]}}]}'
47
- http_version:
48
- recorded_at: Fri, 07 Dec 2012 17:37:16 GMT
49
- recorded_with: VCR 2.3.0
@@ -1,15 +0,0 @@
1
- module Spree
2
- module API
3
- class Client
4
- module Addresses
5
- def address(id, options={})
6
- get("addresses/#{id}", options)
7
- end
8
-
9
- def update_address(id, options={})
10
- put("addresses/#{id}", options)
11
- end
12
- end
13
- end
14
- end
15
- end
@@ -1,31 +0,0 @@
1
- module Spree
2
- module API
3
- class Client
4
- module Connection
5
- def connection(options={})
6
- options = {
7
- :authenticate => true,
8
- :force_urlencoded => false,
9
- :raw => false,
10
- :ssl => { :verify => false },
11
- :url => api_endpoint,
12
- :path_prefix => '/api'
13
- }.merge(options)
14
-
15
- connection = Faraday.new(options) do |builder|
16
- builder.request :json
17
-
18
- builder.use FaradayMiddleware::FollowRedirects
19
- builder.use FaradayMiddleware::Mashify
20
- builder.use Faraday::Response::RaiseError
21
-
22
- builder.use FaradayMiddleware::ParseJson, :content_type => /\bjson$/
23
-
24
- builder.adapter Faraday.default_adapter
25
- end
26
- connection
27
- end
28
- end
29
- end
30
- end
31
- end
@@ -1,15 +0,0 @@
1
- module Spree
2
- module API
3
- class Client
4
- module Countries
5
- def countries(options={})
6
- get("countries", options)['countries']
7
- end
8
-
9
- def country(id, options={})
10
- get("countries/#{id}", options)
11
- end
12
- end
13
- end
14
- end
15
- end