buckybox-api 1.6.2 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.gitlab-ci.yml +20 -0
- data/.rubocop.yml +29 -0
- data/.simplecov +1 -0
- data/Gemfile +1 -1
- data/LICENSE.txt +1 -1
- data/README.md +1 -0
- data/Rakefile +1 -1
- data/buckybox-api.gemspec +12 -10
- data/fixtures/authenticate_customer.yml +60 -0
- data/fixtures/box.yml +63 -0
- data/fixtures/boxes.yml +70 -0
- data/fixtures/create_or_update_customer.yml +62 -0
- data/fixtures/create_order.yml +62 -0
- data/fixtures/customer.yml +60 -0
- data/fixtures/customers.yml +60 -0
- data/fixtures/delivery_service.yml +60 -0
- data/fixtures/delivery_services.yml +60 -0
- data/fixtures/webstore.yml +78 -0
- data/lib/buckybox/api.rb +70 -37
- data/spec/lib/buckybox/api_spec.rb +35 -25
- data/spec/spec_helper.rb +14 -6
- metadata +58 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3289394e57b2d38e0f15d2dfffcf410c1297cc0e
|
4
|
+
data.tar.gz: a881963823e67ae6888a05765b04fd31738888e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff99c53c2ecacc21635d80b98d96070e163b870b13004fe1ef3fe9a40e561736c12a7f8eb89c7f577a27d622e3c38ec7bb65e5dcfef1f7004190be60c6de1835
|
7
|
+
data.tar.gz: 8594c0ccf35be96affd1bfc97be6bc1cc470d7cdea839b1fc0396cedf73687612a86d0ef66ce8dac7ffddc4689fcedd225cf8d5b965f2efc26fa777ac6a1ee6b
|
data/.gitignore
CHANGED
data/.gitlab-ci.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Official language image. Look for the different tagged releases at:
|
2
|
+
# https://hub.docker.com/r/library/ruby/tags/
|
3
|
+
image: ruby:2.3
|
4
|
+
|
5
|
+
cache:
|
6
|
+
paths:
|
7
|
+
- vendor/ruby # cache gems in between builds
|
8
|
+
|
9
|
+
before_script:
|
10
|
+
- ruby -v
|
11
|
+
- gem install bundler --no-ri --no-rdoc
|
12
|
+
- bundle install -j $(nproc) --path vendor
|
13
|
+
|
14
|
+
rubocop:
|
15
|
+
script:
|
16
|
+
- rubocop
|
17
|
+
|
18
|
+
rspec:
|
19
|
+
script:
|
20
|
+
- rspec
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
Metrics:
|
2
|
+
Enabled: false
|
3
|
+
|
4
|
+
Lint/EndAlignment:
|
5
|
+
Enabled: false
|
6
|
+
|
7
|
+
Style/AccessModifierIndentation:
|
8
|
+
EnforcedStyle: outdent
|
9
|
+
|
10
|
+
Style/Documentation:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
Style/IndentationWidth:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Style/ParallelAssignment:
|
17
|
+
Enabled: false
|
18
|
+
|
19
|
+
Style/StringLiterals:
|
20
|
+
EnforcedStyle: double_quotes
|
21
|
+
|
22
|
+
Style/ElseAlignment:
|
23
|
+
Enabled: false
|
24
|
+
|
25
|
+
Style/TrailingCommaInArguments:
|
26
|
+
EnforcedStyleForMultiline: comma
|
27
|
+
|
28
|
+
Style/TrailingCommaInLiteral:
|
29
|
+
EnforcedStyleForMultiline: comma
|
data/.simplecov
CHANGED
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# BuckyBox::API
|
2
2
|
|
3
|
+
[![Build Status](https://gitlab.com/buckybox/buckybox-api-ruby/badges/master/build.svg)](https://gitlab.com/buckybox/buckybox-api-ruby/commits/master)
|
3
4
|
[![Dependency Status](http://img.shields.io/gemnasium/buckybox/buckybox-api-ruby.svg)](https://gemnasium.com/buckybox/buckybox-api-ruby)
|
4
5
|
[![Code Climate](http://img.shields.io/codeclimate/github/buckybox/buckybox-api-ruby.svg)](https://codeclimate.com/github/buckybox/buckybox-api-ruby)
|
5
6
|
[![Gem Version](http://img.shields.io/gem/v/buckybox-api.svg)](https://rubygems.org/gems/buckybox-api)
|
data/Rakefile
CHANGED
data/buckybox-api.gemspec
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# coding: utf-8
|
2
|
-
lib = File.expand_path(
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "buckybox-api"
|
7
|
-
spec.version = "1.
|
7
|
+
spec.version = "1.7.0"
|
8
8
|
spec.authors = ["Cédric Félizard"]
|
9
9
|
spec.email = ["cedric@felizard.fr"]
|
10
|
-
spec.summary =
|
10
|
+
spec.summary = "RubyGem wrapper for the Bucky Box API"
|
11
11
|
spec.description = "#{spec.summary} - https://api.buckybox.com/docs"
|
12
|
-
spec.homepage = ""
|
12
|
+
spec.homepage = "https://github.com/buckybox/buckybox-api-ruby"
|
13
13
|
spec.license = "LGPLv3"
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -17,14 +17,16 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
|
-
spec.add_dependency "
|
21
|
-
spec.add_dependency "
|
22
|
-
spec.add_dependency "crazy_money", ">= 1.
|
20
|
+
spec.add_dependency "typhoeus", ">= 1.1.0"
|
21
|
+
spec.add_dependency "hashie", ">= 3.4.4"
|
22
|
+
spec.add_dependency "crazy_money", ">= 1.4.0"
|
23
|
+
spec.add_dependency "oj"
|
23
24
|
|
24
25
|
spec.add_development_dependency "bundler"
|
25
26
|
spec.add_development_dependency "rake"
|
26
|
-
spec.add_development_dependency "rspec", ">= 3"
|
27
|
-
spec.add_development_dependency "vcr"
|
27
|
+
spec.add_development_dependency "rspec", ">= 3.5"
|
28
|
+
spec.add_development_dependency "vcr", ">= 3"
|
28
29
|
spec.add_development_dependency "webmock"
|
29
|
-
spec.add_development_dependency "simplecov", ">= 0.
|
30
|
+
spec.add_development_dependency "simplecov", ">= 0.11"
|
31
|
+
spec.add_development_dependency "rubocop"
|
30
32
|
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.buckybox.com/v1/customers/sign_in
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: email=joe%40buckybox.com&password=whatever
|
9
|
+
headers:
|
10
|
+
Api-Key:
|
11
|
+
- "<API-Key>"
|
12
|
+
Api-Secret:
|
13
|
+
- "<API-Secret>"
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Thu, 11 Aug 2016 11:17:13 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Transfer-Encoding:
|
24
|
+
- chunked
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- '"d751713988987e9331980363e24189ce"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
Vary:
|
34
|
+
- Origin
|
35
|
+
Content-Security-Policy:
|
36
|
+
- default-src 'none'; connect-src 'self' api.buckybox.com *.google-analytics.com
|
37
|
+
*.intercomcdn.com *.intercom.io wss://*.intercom.io; form-action 'self' www.paypal.com;
|
38
|
+
frame-ancestors 'none'; img-src 'self' *.google-analytics.com *.pingdom.net
|
39
|
+
*.pingdom.com *.intercomcdn.com *.intercomassets.com *.intercom.io *.tile.openstreetmap.org;
|
40
|
+
script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com *.pingdom.net
|
41
|
+
js-agent.newrelic.com bam.nr-data.net *.intercomcdn.com *.intercom.io; style-src
|
42
|
+
'self' 'unsafe-inline'; report-uri https://api.buckybox.com/v1/csp-report
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=631138519
|
45
|
+
X-Content-Type-Options:
|
46
|
+
- nosniff
|
47
|
+
X-Download-Options:
|
48
|
+
- noopen
|
49
|
+
X-Frame-Options:
|
50
|
+
- DENY
|
51
|
+
X-Permitted-Cross-Domain-Policies:
|
52
|
+
- none
|
53
|
+
X-Xss-Protection:
|
54
|
+
- 1; mode=block
|
55
|
+
body:
|
56
|
+
encoding: UTF-8
|
57
|
+
string: '[{"id":8859,"first_name":"Joe","last_name":"Dalton","name":"Joe Dalton","email":"joe@buckybox.com","delivery_service_id":91,"halted?":false,"discount?":false,"discount":0.0,"number":"0437","account_balance":"0.00","webstore_id":"fantastic-vege-people","webstore_name":"Fantastic Organic Demo"}]'
|
58
|
+
http_version:
|
59
|
+
recorded_at: Thu, 11 Aug 2016 11:17:13 GMT
|
60
|
+
recorded_with: VCR 3.0.3
|
data/fixtures/box.yml
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.buckybox.com/v1/boxes/217?embed=extras,images,box_items
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Api-Key:
|
11
|
+
- "<API-Key>"
|
12
|
+
Api-Secret:
|
13
|
+
- "<API-Secret>"
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Thu, 11 Aug 2016 11:17:09 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Transfer-Encoding:
|
24
|
+
- chunked
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- '"3700ae9295ab1e6ad673d0dfe473f0a0"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
Vary:
|
34
|
+
- Origin
|
35
|
+
Content-Security-Policy:
|
36
|
+
- default-src 'none'; connect-src 'self' api.buckybox.com *.google-analytics.com
|
37
|
+
*.intercomcdn.com *.intercom.io wss://*.intercom.io; form-action 'self' www.paypal.com;
|
38
|
+
frame-ancestors 'none'; img-src 'self' *.google-analytics.com *.pingdom.net
|
39
|
+
*.pingdom.com *.intercomcdn.com *.intercomassets.com *.intercom.io *.tile.openstreetmap.org;
|
40
|
+
script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com *.pingdom.net
|
41
|
+
js-agent.newrelic.com bam.nr-data.net *.intercomcdn.com *.intercom.io; style-src
|
42
|
+
'self' 'unsafe-inline'; report-uri https://api.buckybox.com/v1/csp-report
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=631138519
|
45
|
+
X-Content-Type-Options:
|
46
|
+
- nosniff
|
47
|
+
X-Download-Options:
|
48
|
+
- noopen
|
49
|
+
X-Frame-Options:
|
50
|
+
- DENY
|
51
|
+
X-Permitted-Cross-Domain-Policies:
|
52
|
+
- none
|
53
|
+
X-Xss-Protection:
|
54
|
+
- 1; mode=block
|
55
|
+
body:
|
56
|
+
encoding: UTF-8
|
57
|
+
string: '{"id":217,"name":"5kg Box","description":"Our delicious brekky box
|
58
|
+
is chocked full of tasty treats for the weekend! <a href=\"http://www.johnsfarm.com\"
|
59
|
+
target=\"_blank\">From John''s farm</a>\r\n\r\nIncluded:\r\nBacon, English
|
60
|
+
Muffins, Organic Free Range Eggs x6, Orange Juice, Milk & Coffee.","extras_limit":-1,"exclusions_limit":3,"dislikes":true,"substitutions_limit":2,"likes":true,"customizable":true,"extras_allowed":true,"extras_unlimited":true,"exclusions_unlimited":false,"substitutions_unlimited":false,"price":"30.00","updated_at":1466419390,"cache_key":"61a75c10ce6428d8f51cf7e40ee72738888e3f7b4c8d5cd588a70a61e92ad4b5","extras":[{"id":28,"name":"Apple Juice [IT]","unit":"4 litres","price":"7.50","with_price_per_unit":"Apple Juice [IT] (£7.50 per 4 litres)","with_unit":"Apple Juice [IT] (4 litres)","formatted_price":"£7.50"},{"id":836,"name":"Apples","unit":"200g","price":"0.90","with_price_per_unit":"Apples (£0.90 per 200g)","with_unit":"Apples (200g)","formatted_price":"£0.90"}],"images":{"thumb":"//my.buckybox.com/system/uploads/box/box_image/217/thumb_breakfast-box.jpg","small_thumb":"//my.buckybox.com/system/uploads/box/box_image/217/small_thumb_breakfast-box.jpg","tiny_thumb":"//my.buckybox.com/system/uploads/box/box_image/217/tiny_thumb_breakfast-box.jpg","webstore":"//my.buckybox.com/system/uploads/box/box_image/217/webstore_breakfast-box.jpg"},"box_items":[{"id":2497,"name":"Apple (Pacific Rose)"},{"id":240,"name":"Apple (Red)"},{"id":237,"name":"Banana (Fairtrade)"}]}'
|
61
|
+
http_version:
|
62
|
+
recorded_at: Thu, 11 Aug 2016 11:17:09 GMT
|
63
|
+
recorded_with: VCR 3.0.3
|
data/fixtures/boxes.yml
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://api.buckybox.com/v1/boxes?embed=images
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Api-Key:
|
11
|
+
- "<API-Key>"
|
12
|
+
Api-Secret:
|
13
|
+
- "<API-Secret>"
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Thu, 11 Aug 2016 11:17:09 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Transfer-Encoding:
|
24
|
+
- chunked
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
X-Ua-Compatible:
|
28
|
+
- IE=Edge,chrome=1
|
29
|
+
Etag:
|
30
|
+
- '"41b0d7b196ebccd57b151f244edf665e"'
|
31
|
+
Cache-Control:
|
32
|
+
- max-age=0, private, must-revalidate
|
33
|
+
Vary:
|
34
|
+
- Origin
|
35
|
+
Content-Security-Policy:
|
36
|
+
- default-src 'none'; connect-src 'self' api.buckybox.com *.google-analytics.com
|
37
|
+
*.intercomcdn.com *.intercom.io wss://*.intercom.io; form-action 'self' www.paypal.com;
|
38
|
+
frame-ancestors 'none'; img-src 'self' *.google-analytics.com *.pingdom.net
|
39
|
+
*.pingdom.com *.intercomcdn.com *.intercomassets.com *.intercom.io *.tile.openstreetmap.org;
|
40
|
+
script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com *.pingdom.net
|
41
|
+
js-agent.newrelic.com bam.nr-data.net *.intercomcdn.com *.intercom.io; style-src
|
42
|
+
'self' 'unsafe-inline'; report-uri https://api.buckybox.com/v1/csp-report
|
43
|
+
Strict-Transport-Security:
|
44
|
+
- max-age=631138519
|
45
|
+
X-Content-Type-Options:
|
46
|
+
- nosniff
|
47
|
+
X-Download-Options:
|
48
|
+
- noopen
|
49
|
+
X-Frame-Options:
|
50
|
+
- DENY
|
51
|
+
X-Permitted-Cross-Domain-Policies:
|
52
|
+
- none
|
53
|
+
X-Xss-Protection:
|
54
|
+
- 1; mode=block
|
55
|
+
body:
|
56
|
+
encoding: UTF-8
|
57
|
+
string: '[{"id":217,"name":"5kg Box","description":"Our delicious brekky box
|
58
|
+
is chocked full of tasty treats for the weekend! <a href=\"http://www.johnsfarm.com\"
|
59
|
+
target=\"_blank\">From John''s farm</a>\r\n\r\nIncluded:\r\nBacon, English
|
60
|
+
Muffins, Organic Free Range Eggs x6, Orange Juice, Milk & Coffee.","extras_limit":-1,"exclusions_limit":3,"dislikes":true,"substitutions_limit":2,"likes":true,"customizable":true,"extras_allowed":true,"extras_unlimited":true,"exclusions_unlimited":false,"substitutions_unlimited":false,"price":"30.00","updated_at":1466419390,"cache_key":"61a75c10ce6428d8f51cf7e40ee72738888e3f7b4c8d5cd588a70a61e92ad4b5","images":{"thumb":"//my.buckybox.com/system/uploads/box/box_image/217/thumb_breakfast-box.jpg","small_thumb":"//my.buckybox.com/system/uploads/box/box_image/217/small_thumb_breakfast-box.jpg","tiny_thumb":"//my.buckybox.com/system/uploads/box/box_image/217/tiny_thumb_breakfast-box.jpg","webstore":"//my.buckybox.com/system/uploads/box/box_image/217/webstore_breakfast-box.jpg"}},{"id":98,"name":"Cheap
|
61
|
+
Box","description":"A box of seasonal veges for 4-5 adults, for a week","extras_limit":0,"exclusions_limit":0,"dislikes":false,"substitutions_limit":0,"likes":false,"customizable":false,"extras_allowed":false,"extras_unlimited":false,"exclusions_unlimited":true,"substitutions_unlimited":true,"price":"0.01","updated_at":1432207567,"cache_key":"e729343943fc8221939b2493e0c36b0c9b2e47fcfdd631d71cc08b616a3e3781","images":{"thumb":"//my.buckybox.com/system/uploads/box/box_image/98/thumb_medium-box.jpg","small_thumb":"//my.buckybox.com/system/uploads/box/box_image/98/small_thumb_medium-box.jpg","tiny_thumb":"//my.buckybox.com/system/uploads/box/box_image/98/tiny_thumb_medium-box.jpg","webstore":"//my.buckybox.com/system/uploads/box/box_image/98/webstore_medium-box.jpg"}},{"id":101,"name":"Couples
|
62
|
+
Box","description":"This box is perfect for couples for a week!\r\n\r\nChocked
|
63
|
+
full of tasty fruit & vegetables - we''ll throw in a recipe card too.","extras_limit":-1,"exclusions_limit":2,"dislikes":false,"substitutions_limit":3,"likes":false,"customizable":true,"extras_allowed":true,"extras_unlimited":true,"exclusions_unlimited":false,"substitutions_unlimited":false,"price":"11.50","updated_at":1428363049,"cache_key":"5936997bb60885745476f149177d8c25c4e9ca0e9366fe8571f77d414e1cb25d","images":{"thumb":"//my.buckybox.com/system/uploads/box/box_image/101/thumb_couples-box.jpg","small_thumb":"//my.buckybox.com/system/uploads/box/box_image/101/small_thumb_couples-box.jpg","tiny_thumb":"//my.buckybox.com/system/uploads/box/box_image/101/tiny_thumb_couples-box.jpg","webstore":"//my.buckybox.com/system/uploads/box/box_image/101/webstore_couples-box.jpg"}},{"id":1364,"name":"Custom
|
64
|
+
Order","description":"Desc","extras_limit":-1,"exclusions_limit":0,"dislikes":false,"substitutions_limit":0,"likes":false,"customizable":true,"extras_allowed":true,"extras_unlimited":true,"exclusions_unlimited":true,"substitutions_unlimited":true,"price":"0.00","updated_at":1470581164,"cache_key":"9e248a349358dea423867bf9fe6fc96140601b53e8e54047be22d2df23d99ee8","images":{"thumb":"//my.buckybox.com/system/uploads/box/box_image/1364/thumb_custom-order.jpg","small_thumb":"//my.buckybox.com/system/uploads/box/box_image/1364/small_thumb_custom-order.jpg","tiny_thumb":"//my.buckybox.com/system/uploads/box/box_image/1364/tiny_thumb_custom-order.jpg","webstore":"//my.buckybox.com/system/uploads/box/box_image/1364/webstore_custom-order.jpg"}},{"id":99,"name":"John''s
|
65
|
+
Farm Box - Premium","description":"Build your own custom box by adding individual
|
66
|
+
dry goods or produce from the extra items list in the checkout process.","extras_limit":-1,"exclusions_limit":0,"dislikes":false,"substitutions_limit":0,"likes":false,"customizable":true,"extras_allowed":true,"extras_unlimited":true,"exclusions_unlimited":true,"substitutions_unlimited":true,"price":"20.00","updated_at":1466418867,"cache_key":"d59599da6a5580046efb3db41ed603d366c71f2fee94a1d679394952049cfb63","images":{"thumb":"//my.buckybox.com/system/uploads/box/box_image/99/thumb_empty-box.jpg","small_thumb":"//my.buckybox.com/system/uploads/box/box_image/99/small_thumb_empty-box.jpg","tiny_thumb":"//my.buckybox.com/system/uploads/box/box_image/99/tiny_thumb_empty-box.jpg","webstore":"//my.buckybox.com/system/uploads/box/box_image/99/webstore_empty-box.jpg"}},{"id":673,"name":"Salad","description":"The
|
67
|
+
CSA Box","extras_limit":-1,"exclusions_limit":0,"dislikes":false,"substitutions_limit":0,"likes":false,"customizable":true,"extras_allowed":true,"extras_unlimited":true,"exclusions_unlimited":true,"substitutions_unlimited":true,"price":"10.00","updated_at":1432088450,"cache_key":"a4ee339cc7393d4ce93153a812e730b2bf94cb73609f78cf5d1fd5689fd0b32e","images":{"thumb":"//my.buckybox.com/assets/fallbacks/box/box_image/thumb_default-9a1778f89248d2e42cc36f229b1b2370.png","small_thumb":"//my.buckybox.com/assets/fallbacks/box/box_image/small_thumb_default-129666d5f862f9f0f2f949bcd3f2d21d.png","tiny_thumb":"//my.buckybox.com/assets/fallbacks/box/box_image/tiny_thumb_default-3e896a7d7a20f28bb42cc21ae5de6258.png","webstore":"//my.buckybox.com/assets/fallbacks/box/box_image/webstore_default-784f6b539e5921969db32e020711848c.png"}}]'
|
68
|
+
http_version:
|
69
|
+
recorded_at: Thu, 11 Aug 2016 11:17:09 GMT
|
70
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: put
|
5
|
+
uri: https://api.buckybox.com/v1/customers/8859
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"id":"8859","first_name":"Joe"}'
|
9
|
+
headers:
|
10
|
+
Api-Key:
|
11
|
+
- "<API-Key>"
|
12
|
+
Api-Secret:
|
13
|
+
- "<API-Secret>"
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 200
|
17
|
+
message: OK
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Thu, 11 Aug 2016 11:17:10 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Transfer-Encoding:
|
24
|
+
- chunked
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Location:
|
28
|
+
- https://api.buckybox.com/v1/customers/8859
|
29
|
+
X-Ua-Compatible:
|
30
|
+
- IE=Edge,chrome=1
|
31
|
+
Etag:
|
32
|
+
- '"c5a90bcbc9b7c787061a869fa26a0566"'
|
33
|
+
Cache-Control:
|
34
|
+
- max-age=0, private, must-revalidate
|
35
|
+
Vary:
|
36
|
+
- Origin
|
37
|
+
Content-Security-Policy:
|
38
|
+
- default-src 'none'; connect-src 'self' api.buckybox.com *.google-analytics.com
|
39
|
+
*.intercomcdn.com *.intercom.io wss://*.intercom.io; form-action 'self' www.paypal.com;
|
40
|
+
frame-ancestors 'none'; img-src 'self' *.google-analytics.com *.pingdom.net
|
41
|
+
*.pingdom.com *.intercomcdn.com *.intercomassets.com *.intercom.io *.tile.openstreetmap.org;
|
42
|
+
script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com *.pingdom.net
|
43
|
+
js-agent.newrelic.com bam.nr-data.net *.intercomcdn.com *.intercom.io; style-src
|
44
|
+
'self' 'unsafe-inline'; report-uri https://api.buckybox.com/v1/csp-report
|
45
|
+
Strict-Transport-Security:
|
46
|
+
- max-age=631138519
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Download-Options:
|
50
|
+
- noopen
|
51
|
+
X-Frame-Options:
|
52
|
+
- DENY
|
53
|
+
X-Permitted-Cross-Domain-Policies:
|
54
|
+
- none
|
55
|
+
X-Xss-Protection:
|
56
|
+
- 1; mode=block
|
57
|
+
body:
|
58
|
+
encoding: UTF-8
|
59
|
+
string: '{"id":8859,"first_name":"Joe","last_name":"Dalton","name":"Joe Dalton","email":"joe@buckybox.com","delivery_service_id":492,"halted?":false,"discount?":false,"discount":0.0,"number":"0437","account_balance":"-153.40","webstore_id":"fantastic-vege-people","webstore_name":"Fantastic Organic Demo"}'
|
60
|
+
http_version:
|
61
|
+
recorded_at: Thu, 11 Aug 2016 11:17:10 GMT
|
62
|
+
recorded_with: VCR 3.0.3
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://api.buckybox.com/v1/orders
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"customer_id":"8859","box_id":"217","start_date":"2016-08-09","week_days":[2],"frequency":"single","payment_method":"cash_on_delivery"}'
|
9
|
+
headers:
|
10
|
+
Api-Key:
|
11
|
+
- "<API-Key>"
|
12
|
+
Api-Secret:
|
13
|
+
- "<API-Secret>"
|
14
|
+
response:
|
15
|
+
status:
|
16
|
+
code: 201
|
17
|
+
message: Created
|
18
|
+
headers:
|
19
|
+
Date:
|
20
|
+
- Thu, 11 Aug 2016 11:17:17 GMT
|
21
|
+
Content-Type:
|
22
|
+
- application/json; charset=utf-8
|
23
|
+
Transfer-Encoding:
|
24
|
+
- chunked
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Location:
|
28
|
+
- https://api.buckybox.com/v1/orders/73174
|
29
|
+
X-Ua-Compatible:
|
30
|
+
- IE=Edge,chrome=1
|
31
|
+
Etag:
|
32
|
+
- '"fd853c596a992292567e86ce83726588"'
|
33
|
+
Cache-Control:
|
34
|
+
- max-age=0, private, must-revalidate
|
35
|
+
Vary:
|
36
|
+
- Origin
|
37
|
+
Content-Security-Policy:
|
38
|
+
- default-src 'none'; connect-src 'self' api.buckybox.com *.google-analytics.com
|
39
|
+
*.intercomcdn.com *.intercom.io wss://*.intercom.io; form-action 'self' www.paypal.com;
|
40
|
+
frame-ancestors 'none'; img-src 'self' *.google-analytics.com *.pingdom.net
|
41
|
+
*.pingdom.com *.intercomcdn.com *.intercomassets.com *.intercom.io *.tile.openstreetmap.org;
|
42
|
+
script-src 'self' 'unsafe-inline' 'unsafe-eval' *.google-analytics.com *.pingdom.net
|
43
|
+
js-agent.newrelic.com bam.nr-data.net *.intercomcdn.com *.intercom.io; style-src
|
44
|
+
'self' 'unsafe-inline'; report-uri https://api.buckybox.com/v1/csp-report
|
45
|
+
Strict-Transport-Security:
|
46
|
+
- max-age=631138519
|
47
|
+
X-Content-Type-Options:
|
48
|
+
- nosniff
|
49
|
+
X-Download-Options:
|
50
|
+
- noopen
|
51
|
+
X-Frame-Options:
|
52
|
+
- DENY
|
53
|
+
X-Permitted-Cross-Domain-Policies:
|
54
|
+
- none
|
55
|
+
X-Xss-Protection:
|
56
|
+
- 1; mode=block
|
57
|
+
body:
|
58
|
+
encoding: UTF-8
|
59
|
+
string: '{"id":73174,"box_id":217,"extras_one_off":null,"extras":null,"customer_id":8859,"frequency":"single","week_days":[2],"start_date":"2016-08-09","exclusions":[],"substitutions":[]}'
|
60
|
+
http_version:
|
61
|
+
recorded_at: Thu, 11 Aug 2016 11:17:17 GMT
|
62
|
+
recorded_with: VCR 3.0.3
|