yotpo 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDQ2MjFmYTQ4ZTQ4Zjc0ZDU5ZDUwYTQyM2YzZjdmZTIyMjQzNzg1OA==
4
+ ZDZiMDVjNWFmNjgxMGMzZmE0M2IyMjM2ZTZjNTI3NGQxZDA3ZTFlMg==
5
5
  data.tar.gz: !binary |-
6
- ZDk4ODZhYTJlYjE2NGI3YmI0MTQ1OGE3ZTc2NzM3NzhlZTUwNzg4YQ==
6
+ NWVjYWY5MzJmOGIwZTA5ZWE1ZjRkZWE4Y2RlYTM1ZGU2MjAxZjJiOA==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- NzhkMjJiMWFhNDZlMDY4Y2UzNjE1N2Y1ZWFhYThhYThmMmE1YjAwOTU3MjU5
10
- N2UwNjRmYmY3Y2Y3YTk4NjlhZDM4MjFiZDhlN2Q1NmQzOGE2YWYwMGU1NDEx
11
- ZjM0ZjI3NTI3Mjg4YmE5NjM2OTI2NjQxNTcxMjZjNjdlMTVmY2E=
9
+ YTllNmE1MzYxZTc0Nzc4ZTY2ZGI4MjMyNDA3NDVmYzdiNzgwOWYxNjYzZWU4
10
+ ZWY0Y2U2ODhmNzEyYzNjNDdiYTNhMmU1NmYxYzJmMTA4MmEyZTc3MjA3MDIw
11
+ YjBjYjIxMThjNDM2MTBjNmQzMDRkNDgwYTQ1N2RhMGE5ZjdmZWE=
12
12
  data.tar.gz: !binary |-
13
- NWI2YTU3NmQ0NDI3MTFiZmY0OGM5YWQ2ZjZkYjI5ZDVlZmM1ZjE1N2Q5NTMw
14
- ZDIzNTAzZjZjOWU0MzEwMDFiOGI4ZGM0OWU3YTA5NmRiZDYyM2Y2OTIyNGEw
15
- MDNhMmE1YjAwZjdkMDUyZGEyM2YzZGVhYzc1ODNkZTFmNjFiNWY=
13
+ NjMxZWVlZmUxNzRlMTJiNzhmYTQ0ZDlmM2U1MjA4YjBiODM0NTljYzk3Mzgw
14
+ MTE3MjhkZjcxN2E5ZmEwZjAyNGQzZGZmNjBlZTE2ZDQzMTcwMjc5NTI2NDU2
15
+ ZDM2MTFiMTBiODBiOTZmZDRiODdiMWQ4MGZmNDlmNjY2YzY3MjI=
data/Gemfile CHANGED
@@ -10,6 +10,7 @@ group :test do
10
10
  gem 'simplecov', :require => false
11
11
  gem 'webmock'
12
12
  gem 'ffaker'
13
+ gem 'vcr'
13
14
  end
14
15
 
15
16
  # Specify your gem's dependencies in yotpo-api-connector.gemspec
@@ -34,14 +34,14 @@ module Yotpo
34
34
  # Retrieves an oauth bearer token from Yotpo
35
35
  #
36
36
  # @param params [Hash] the request details
37
- # @option params [String] :client_id the app key received at the registration
38
- # @option params [String] :client_secret app secret received at the registration
37
+ # @option params [String] :app_key the app key received at the registration
38
+ # @option params [String] :secret app secret received at the registration
39
39
  # @return [Hash] that includes access_token and the token_type
40
40
  def get_oauth_token(params)
41
41
  request = {
42
42
  client_id: params[:app_key],
43
43
  client_secret: params[:secret],
44
- grant_type: "client_credentials"
44
+ grant_type: 'client_credentials'
45
45
  }
46
46
 
47
47
  response = post('/oauth/token', request)
@@ -58,7 +58,7 @@ module Yotpo
58
58
  app_key: params[:app_key],
59
59
  secret: params[:secret]
60
60
  }
61
- get('/users/b2blogin', request)
61
+ get('/users/b2blogin.json', request)
62
62
  end
63
63
  end
64
64
  end
data/lib/yotpo/client.rb CHANGED
@@ -41,6 +41,7 @@ module Yotpo
41
41
  # @param url [String] the relative path in the Yotpo API
42
42
  # @param params [Hash] the url params that should be passed in the request
43
43
  def get(url, params = {})
44
+ params = params.inject({}){|memo,(k,v)| memo[k.to_s] = v; memo}
44
45
  preform(url, :get, params: params) do
45
46
  return connection.get(url, params)
46
47
  end
@@ -52,6 +53,7 @@ module Yotpo
52
53
  # @param url [String] the relative path in the Yotpo API
53
54
  # @param params [Hash] the body of the request
54
55
  def post(url, params)
56
+ params = convert_hash_keys(params)
55
57
  preform(url, :post, params: params) do
56
58
  return connection.post(url, params)
57
59
  end
@@ -63,6 +65,7 @@ module Yotpo
63
65
  # @param url [String] the relative path in the Yotpo API
64
66
  # @param params [Hash] the body of the request
65
67
  def put(url, params)
68
+ params = convert_hash_keys(params)
66
69
  preform(url, :put, params: params) do
67
70
  return connection.put(url, params)
68
71
  end
@@ -130,5 +133,16 @@ module Yotpo
130
133
  conn.adapter :typhoeus
131
134
  end
132
135
  end
136
+ private
137
+ def convert_hash_keys(value)
138
+ case value
139
+ when Array
140
+ value.map { |v| convert_hash_keys(v) }
141
+ when Hash
142
+ Hash[value.map { |k, v| [k.to_s, convert_hash_keys(v)] }]
143
+ else
144
+ value
145
+ end
146
+ end
133
147
  end
134
148
  end
data/lib/yotpo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Yotpo
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.5'
3
3
  end
@@ -9,13 +9,12 @@ describe Yotpo::AccountPlatform do
9
9
  plan_name: 'test plan',
10
10
  platform_type_id: 1,
11
11
  deleted: false,
12
- utoken: 'asdeuh1di1udifn1309fn09',
13
- app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'
12
+ utoken: @utoken,
13
+ app_key: @app_key
14
14
  }
15
- stub_post("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/account_platform").
16
- to_return(:status => 200, :body => fixture('new_account_platform.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
17
-
18
- @response = Yotpo.create_account_platform(create_account_platform_request)
15
+ VCR.use_cassette('create_account_platform') do
16
+ @response = Yotpo.create_account_platform(create_account_platform_request)
17
+ end
19
18
  end
20
19
 
21
20
  subject { @response.body.account_platform }
@@ -23,7 +22,6 @@ describe Yotpo::AccountPlatform do
23
22
  it { should respond_to :id }
24
23
  it { should respond_to :shop_token }
25
24
  it { should respond_to :shop_domain }
26
- it { should respond_to :shop_api_url }
27
25
  it { should respond_to :plan_name }
28
26
  it { should respond_to :platform_type }
29
27
  it { should respond_to :deleted }
@@ -9,12 +9,12 @@ describe Yotpo::Account do
9
9
  minisite_subdomain: Faker::Internet.domain_name,
10
10
  minisite_cname: Faker::Internet.domain_name,
11
11
  minisite_subdomain_active: [true, false].sample,
12
- utoken: '12ei1rr1i3ufn23itfoijver903',
13
- app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'
12
+ utoken: @utoken,
13
+ app_key: @app_key
14
14
  }
15
- stub_put('/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG').
16
- to_return(:status => 200, :body => fixture('update_account.json'), :headers => {})
17
- @response = Yotpo.update_account(account_data)
15
+ VCR.use_cassette('update_account') do
16
+ @response = Yotpo.update_account(account_data)
17
+ end
18
18
  end
19
19
  subject { @response.body.app }
20
20
  it { should be_a ::Hashie::Rash }
@@ -25,14 +25,13 @@ describe Yotpo::Account do
25
25
  describe '#check_minisite_subdomain' do
26
26
  before(:all) do
27
27
  sub_domain_data = {
28
- app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG',
29
28
  subdomain: 'shalom1',
30
- utoken: '12ei1rr1i3ufn23itfoijver903'
29
+ utoken: @utoken,
30
+ app_key: @app_key
31
31
  }
32
- stub_get('/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/subomain_check/shalom1?utoken=12ei1rr1i3ufn23itfoijver903').
33
- to_return(:status => 200, :body => fixture('check_subdomain.json'), :headers => {})
34
-
35
- @response = Yotpo.check_minisite_subdomain(sub_domain_data)
32
+ VCR.use_cassette('check_minisite_subdomain') do
33
+ @response = Yotpo.check_minisite_subdomain(sub_domain_data)
34
+ end
36
35
  end
37
36
  subject { @response.body.subdomain }
38
37
  it { should be_a ::Hashie::Rash }
@@ -4,14 +4,12 @@ describe Yotpo::Product do
4
4
  describe '#get_all_bottom_lines' do
5
5
  before(:all) do
6
6
  get_app_bottom_lines_params = {
7
- utoken: 'asdeuh1di1udifn1309fn09',
8
- app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'
9
-
7
+ utoken: @utoken,
8
+ app_key: @app_key
10
9
  }
11
- stub_get("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/bottom_lines?utoken=asdeuh1di1udifn1309fn09").
12
- to_return(:status => 200, :body => fixture('get_all_bottom_lines.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
13
-
14
- @response = Yotpo.get_all_bottom_lines(get_app_bottom_lines_params)
10
+ VCR.use_cassette('check_minisite_subdomain') do
11
+ @response = Yotpo.get_all_bottom_lines(get_app_bottom_lines_params)
12
+ end
15
13
  end
16
14
 
17
15
  subject { @response.body.bottomlines[0] }
@@ -24,14 +22,12 @@ describe Yotpo::Product do
24
22
  describe '#get_product_bottom_line' do
25
23
  before(:all) do
26
24
  get_bottom_line_params = {
27
- app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG',
28
- product_id: 'A12'
25
+ product_id: 'D-4771',
26
+ app_key: @app_key
29
27
  }
30
-
31
- stub_get("/products/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/A12/bottomline").
32
- to_return(:status => 200, :body => fixture('get_product_bottom_line.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
33
-
34
- @response = Yotpo.get_product_bottom_line(get_bottom_line_params)
28
+ VCR.use_cassette('get_product_bottom_line') do
29
+ @response = Yotpo.get_product_bottom_line(get_bottom_line_params)
30
+ end
35
31
  end
36
32
 
37
33
  subject { @response.body.bottomline }
@@ -16,13 +16,13 @@ describe Yotpo::Purchase do
16
16
  description: 'this is the description of a product'
17
17
  }
18
18
  ],
19
- utoken: 'asdeuh1di1udifn1309fn09',
20
- app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'
19
+ utoken: @utoken,
20
+ app_key: @app_key
21
21
  }
22
- stub_post("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/purchases").
23
- to_return(:status => 200, :body => fixture('new_purchase.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
22
+ VCR.use_cassette('create_new_purchase') do
23
+ @response = Yotpo.create_new_purchase(create_new_purchase_request)
24
+ end
24
25
 
25
- @response = Yotpo.create_new_purchase(create_new_purchase_request)
26
26
  end
27
27
 
28
28
  subject { @response.body }
@@ -34,8 +34,6 @@ describe Yotpo::Purchase do
34
34
  describe '#create_new_purchases' do
35
35
  before(:all) do
36
36
  create_new_purchase_request = {
37
- app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG',
38
- utoken: 'asdeuh1di1udifn1309fn09',
39
37
  orders: [
40
38
  {
41
39
  email: Faker::Internet.email,
@@ -53,12 +51,13 @@ describe Yotpo::Purchase do
53
51
 
54
52
 
55
53
  }
56
- ]
54
+ ],
55
+ utoken: @utoken,
56
+ app_key: @app_key
57
57
  }
58
- stub_post("/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/purchases/mass_create").
59
- to_return(:status => 200, :body => fixture('new_purchase.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
60
-
61
- @response = Yotpo.create_new_purchases(create_new_purchase_request)
58
+ VCR.use_cassette('create_new_purchases') do
59
+ @response = Yotpo.create_new_purchases(create_new_purchase_request)
60
+ end
62
61
  end
63
62
 
64
63
  subject { @response.body }
@@ -70,13 +69,12 @@ describe Yotpo::Purchase do
70
69
  describe '#get_purchases' do
71
70
  before(:all) do
72
71
  get_purchases_request = {
73
- utoken: 'asdeuh1di1udifn1309fn09',
74
- app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'
72
+ utoken: @utoken,
73
+ app_key: @app_key
75
74
  }
76
- stub_get('/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/purchases?count=10&page=1&utoken=asdeuh1di1udifn1309fn09').
77
- to_return(:status => 200, :body => fixture('get_list_of_purchases.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
78
-
79
- @response = Yotpo.get_purchases(get_purchases_request)
75
+ VCR.use_cassette('get_purchases') do
76
+ @response = Yotpo.get_purchases(get_purchases_request)
77
+ end
80
78
  end
81
79
 
82
80
  subject { @response.body.purchases[0] }
@@ -5,14 +5,13 @@ describe Yotpo::Reminder do
5
5
  describe '#send_test_reminder' do
6
6
  before(:all) do
7
7
  request ={
8
- utoken: 'asdeuh1di1udifn1309fn09',
9
- app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG',
10
- email: 'vlad@yotpo.com'
8
+ email: 'vlad@yotpo.com',
9
+ utoken: @utoken,
10
+ app_key: @app_key
11
11
  }
12
- stub_post('/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/reminders/send_test_email').with(:body => Oj.dump({utoken: 'asdeuh1di1udifn1309fn09',
13
- email: 'vlad@yotpo.com'})).
14
- to_return(:body => fixture('send_test_email.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
15
- @response = Yotpo.send_test_reminder(request)
12
+ VCR.use_cassette('send_test_reminder') do
13
+ @response = Yotpo.send_test_reminder(request)
14
+ end
16
15
  end
17
16
  subject { @response.body }
18
17
  it { should be_a ::Hashie::Rash }
@@ -5,22 +5,22 @@ describe Yotpo::Review do
5
5
  describe '#create_review' do
6
6
  before(:all) do
7
7
  anonymous_review = {
8
- app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG',
9
- sku: Faker::Product.model,
8
+ product_id: 'D-4771',
10
9
  domain: Faker::Internet.domain_name,
11
10
  product_title: Faker::Product.product,
12
11
  product_description: Faker::Lorem.paragraph(3),
13
12
  product_url: Faker::Internet.http_url,
14
13
  product_image_url: 'https://www.google.com/images/srpr/logo4w.png',
15
- display_name: Faker::Internet.user_name,
16
- email: Faker::Internet.email,
17
- review_content: Faker::Lorem.paragraph(3),
14
+ user_display_name: Faker::Internet.user_name,
15
+ user_email: Faker::Internet.email,
16
+ review_body: Faker::Lorem.paragraph(3),
18
17
  review_title: Faker::Lorem.sentence(5),
19
- review_score: [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5].sample
18
+ review_score: [0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5].sample,
19
+ app_key: @app_key
20
20
  }
21
- stub_get('/reviews/dynamic_create').with(:query => hash_including({:appkey => 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG'})).to_return(:body => fixture('new_review.json'),
22
- :headers => {:content_type => 'application/json; charset=utf-8'})
23
- @response = Yotpo.create_review(anonymous_review)
21
+ VCR.use_cassette('create_review') do
22
+ @response = Yotpo.create_review(anonymous_review)
23
+ end
24
24
  end
25
25
 
26
26
  subject { @response.body.reviews[0] }
@@ -36,12 +36,12 @@ describe Yotpo::Review do
36
36
  get_reviews_params = {
37
37
  page: 1,
38
38
  count: 5,
39
- app_key: 'nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG',
40
- product_id: 'A12'
39
+ app_key: @app_key,
40
+ product_id: 'D-4771'
41
41
  }
42
- stub_get("/products/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/A12/reviews?count=5&page=1").
43
- to_return(:status => 200, :body => fixture('get_product_reviews.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
44
- @response = Yotpo.get_product_reviews(get_reviews_params)
42
+ VCR.use_cassette('get_product_reviews') do
43
+ @response = Yotpo.get_product_reviews(get_reviews_params)
44
+ end
45
45
  end
46
46
 
47
47
  subject { @response.body.reviews[0] }
@@ -15,8 +15,10 @@ describe Yotpo::User do
15
15
  callback_url: Faker::Internet.http_url,
16
16
  url: Faker::Internet.http_url
17
17
  }
18
- stub_post('/users').with(:body => Oj.dump({:user => @user_info})).to_return(:body => fixture('new_user.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
19
- @response = Yotpo.create_user(@user_info)
18
+
19
+ VCR.use_cassette('create_user') do
20
+ @response = Yotpo.create_user(@user_info)
21
+ end
20
22
  end
21
23
  subject { @response.body }
22
24
  it { should be_a ::Hashie::Rash }
@@ -29,14 +31,13 @@ describe Yotpo::User do
29
31
  describe '#get_oauth_token' do
30
32
  before(:all) do
31
33
  oauth_request = {
32
- app_key: 'a3lmMnC3u4SNmz0ZcHf3lODeIYM9LEQwtTWXRdDP',
33
- secret: 'NumuadvlCGOTwnCCvY5BRAhGib1LTCFptYxfvebm',
34
+ app_key: @app_key,
35
+ secret: @secret,
34
36
  grant_type: "client_credentials"
35
37
  }
36
- stub_request(:post, "https://api.yotpo.com/oauth/token").
37
- with(:body => "{\":client_id\":\"a3lmMnC3u4SNmz0ZcHf3lODeIYM9LEQwtTWXRdDP\",\":client_secret\":\"NumuadvlCGOTwnCCvY5BRAhGib1LTCFptYxfvebm\",\":grant_type\":\"client_credentials\"}").
38
- to_return(:status => 200, :body => fixture('bearer_token.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
39
- @response = Yotpo.get_oauth_token(oauth_request)
38
+ VCR.use_cassette('get_oauth_token') do
39
+ @response = Yotpo.get_oauth_token(oauth_request)
40
+ end
40
41
  end
41
42
  subject { @response.body }
42
43
  it { should be_a ::Hashie::Rash }
@@ -47,11 +48,12 @@ describe Yotpo::User do
47
48
  describe '#get_login_url' do
48
49
  before(:all) do
49
50
  request = {
50
- app_key: 'a3lmMnC3u4SNmz0ZcHf3lODeIYM9LEQwtTWXRdDP',
51
- secret: 'NumuadvlCGOTwnCCvY5BRAhGib1LTCFptYxfvebm'
51
+ app_key: @app_key,
52
+ secret: @secret
52
53
  }
53
- stub_get('/users/b2blogin').with(:query => hash_including(request)).to_return(:body => fixture('get_login_url.json'), :headers => {:content_type => 'application/json; charset=utf-8'})
54
- @response = Yotpo.get_login_url(request)
54
+ VCR.use_cassette('get_login_url') do
55
+ @response = Yotpo.get_login_url(request)
56
+ end
55
57
  end
56
58
  subject { @response.body }
57
59
  it { should be_a ::Hashie::Rash }
@@ -0,0 +1,99 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://api.yotpo.com/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/bottom_lines?utoken=mz3AdCKGsoxJB00u0gmq2usGE3HI8HDHFZC5dlLl
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.8.7
12
+ Yotpo-Api-Connector:
13
+ - 0.0.4
14
+ response:
15
+ status:
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ Server:
20
+ - nginx/1.2.1
21
+ Date:
22
+ - Thu, 23 May 2013 12:01:38 GMT
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Transfer-Encoding:
26
+ - chunked
27
+ Connection:
28
+ - keep-alive
29
+ Status:
30
+ - 200 OK
31
+ X-Ua-Compatible:
32
+ - IE=Edge,chrome=1
33
+ Etag:
34
+ - ! '"1098f768b6bbfd4e53e90ac3390a772e"'
35
+ Cache-Control:
36
+ - max-age=0, private, must-revalidate
37
+ X-Request-Id:
38
+ - 33f3945461b4c4062073959cad0f556b
39
+ X-Runtime:
40
+ - '0.061216'
41
+ Strict-Transport-Security:
42
+ - max-age=2592000; includeSubdomains
43
+ P3p:
44
+ - policyref="/w3c/p3p.xml", CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi
45
+ CONi HIS OUR IND CNT", CP="CAO PSA OUR"
46
+ body:
47
+ encoding: US-ASCII
48
+ string: ! '{"status":{"code":200,"message":"OK"},"response":{"bottomlines":[{"domain_key":"D-4771","product_score":"3.0","total_reviews":100},{"domain_key":"S5","product_score":"4.5","total_reviews":2},{"domain_key":"123","product_score":"5.0","total_reviews":4}]}}'
49
+ http_version:
50
+ recorded_at: Thu, 23 May 2013 12:01:38 GMT
51
+ - request:
52
+ method: get
53
+ uri: https://api.yotpo.com/apps/nNgGNA54ETOqaXQ7hRZymxqdtwwetJKDVs0v8qGG/subomain_check/shalom1?utoken=mz3AdCKGsoxJB00u0gmq2usGE3HI8HDHFZC5dlLl
54
+ body:
55
+ encoding: US-ASCII
56
+ string: ''
57
+ headers:
58
+ User-Agent:
59
+ - Faraday v0.8.7
60
+ Yotpo-Api-Connector:
61
+ - 0.0.4
62
+ response:
63
+ status:
64
+ code: 200
65
+ message: OK
66
+ headers:
67
+ Server:
68
+ - nginx/1.2.1
69
+ Date:
70
+ - Thu, 23 May 2013 12:05:12 GMT
71
+ Content-Type:
72
+ - application/json; charset=utf-8
73
+ Transfer-Encoding:
74
+ - chunked
75
+ Connection:
76
+ - keep-alive
77
+ Status:
78
+ - 200 OK
79
+ X-Ua-Compatible:
80
+ - IE=Edge,chrome=1
81
+ Etag:
82
+ - ! '"9c50c01193944b740719a84607eeaaa0"'
83
+ Cache-Control:
84
+ - max-age=0, private, must-revalidate
85
+ X-Request-Id:
86
+ - 162be4b9069fb1b3b59a5d48d88bce0c
87
+ X-Runtime:
88
+ - '0.091567'
89
+ Strict-Transport-Security:
90
+ - max-age=2592000; includeSubdomains
91
+ P3p:
92
+ - policyref="/w3c/p3p.xml", CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi
93
+ CONi HIS OUR IND CNT", CP="CAO PSA OUR"
94
+ body:
95
+ encoding: US-ASCII
96
+ string: ! '{"status":{"code":200,"message":"OK"},"response":{"subdomain":{"available":"true","subdomain":"shalom1"}}}'
97
+ http_version:
98
+ recorded_at: Thu, 23 May 2013 12:05:12 GMT
99
+ recorded_with: VCR 2.2.5