cloudability 0.0.5 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,65 +1,30 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Cloudability::Budgets do
4
- describe '#initialize' do
5
- it 'should raise ArgumentError when auth_token is not provided' do
6
- expect { Cloudability::Budgets.new }.to raise_exception(ArgumentError)
7
- end
8
-
9
- it 'should not raise any exception when auth token is provided' do
10
- expect { Cloudability::Budgets.new(auth_token: 'token') }.not_to raise_exception
11
- end
12
- end
3
+ describe Cloudability::Client::Budgets do
13
4
 
14
5
  before do
15
- @cloudability = Cloudability::Budgets.new(auth_token: 'token')
6
+ @client = Cloudability::Client.new(auth_token: 'token')
16
7
  end
17
-
18
- describe '#find_all' do
8
+
9
+ describe '#budgets' do
19
10
  it 'should be an array' do
20
- stub_get('/1/budgets/index?auth_token=token', 'all_budgets')
21
- @cloudability.find_all.class.should == Array
11
+ stub_get('/1/budgets/index?auth_token=token', 'budgets')
12
+ @client.budgets.should be_kind_of Array
22
13
  end
23
14
 
24
15
  it 'should be an array of Hashie::Mashes' do
25
- stub_get('/1/budgets/index?auth_token=token', 'all_budgets')
26
- @cloudability.find_all.each{|budget| budget.class.should == Hashie::Mash }
27
- end
28
- end
29
-
30
- describe '#find_by_id' do
31
- it 'should be a Hashie::Mash' do
32
- stub_get('/1/budgets/index?auth_token=token', 'all_budgets')
33
- @cloudability.find_by_id(2039).class.should == Hashie::Mash
16
+ stub_get('/1/budgets/index?auth_token=token', 'budgets')
17
+ @client.budgets.each{|budget| budget.should be_kind_of Hashie::Mash }
34
18
  end
35
19
 
36
- it 'should accept a string as an argument' do
37
- stub_get('/1/budgets/index?auth_token=token', 'all_budgets')
38
- expect { @cloudability.find_by_id('2039') }.not_to raise_exception
39
- end
40
- end
41
-
42
- describe '#find_by_subject' do
43
- it 'should be a Hashie::Mash' do
44
- stub_get('/1/budgets/index?auth_token=token', 'all_budgets')
45
- @cloudability.find_by_subject('1111-1111-1111').class.should == Hashie::Mash
46
- end
47
-
48
- it 'should raise an ArgumentError when you give it a non valid key' do
49
- stub_get('/1/budgets/index?auth_token=token', 'all_budgets')
50
- expect { @cloudability.find_by_subject('1111-111-1111') }.to raise_exception(ArgumentError)
51
- end
52
- end
53
-
54
- describe '#find_by_key' do
55
- it 'should find a budget given a key value pair' do
56
- stub_get('/1/budgets/index?auth_token=token', 'all_budgets')
57
- @cloudability.find_by_key(key: :id, value: 2039).class.should == Hashie::Mash
20
+ it 'should be mappable by ID' do
21
+ stub_get('/1/budgets/index?auth_token=token', 'budgets')
22
+ @client.budgets.map(&:id).should be_kind_of Array
58
23
  end
59
24
 
60
- it 'should raise an ArgumentError when you give it a weirdass key' do
61
- stub_get('/1/budgets/index?auth_token=token', 'all_budgets')
62
- expect { @cloudability.find_by_key(key: :hipsterness, value: 2039) }.to raise_exception(ArgumentError)
25
+ it 'should be mappable by ID and not be empty' do
26
+ stub_get('/1/budgets/index?auth_token=token', 'budgets')
27
+ @client.budgets.map(&:id).should_not be_empty
63
28
  end
64
29
  end
65
30
  end
@@ -0,0 +1,79 @@
1
+ require 'spec_helper'
2
+
3
+ describe Cloudability::Client::CostReports do
4
+
5
+ before do
6
+ @client = Cloudability::Client.new(auth_token: 'token')
7
+ end
8
+
9
+ describe '#cost_reports' do
10
+ it 'should be an array' do
11
+ stub_get('/1/reporting/cost?auth_token=token', 'cost/reports')
12
+ @client.cost_reports.should be_kind_of Array
13
+ end
14
+
15
+ it 'should be mappable by ID' do
16
+ stub_get('/1/reporting/cost?auth_token=token', 'cost/reports')
17
+ @client.cost_reports.map(&:id).should be_kind_of Array
18
+ end
19
+
20
+ it 'should be mappable by ID and not be empty' do
21
+ stub_get('/1/reporting/cost?auth_token=token', 'cost/reports')
22
+ @client.cost_reports.map(&:id).should_not be_empty
23
+ end
24
+
25
+ it 'should be mappable by category and not be empty' do
26
+ stub_get('/1/reporting/cost?auth_token=token', 'cost/reports')
27
+ @client.cost_reports.map(&:category).should_not be_empty
28
+ end
29
+
30
+ it 'should be an array of Hashie::Mashes' do
31
+ stub_get('/1/reporting/cost?auth_token=token', 'cost/reports')
32
+ @client.cost_reports.each{|report| report.should be_kind_of Hashie::Mash }
33
+ end
34
+ end
35
+
36
+ describe '#cost_measures' do
37
+ it 'should be an array' do
38
+ stub_get('/1/reporting/cost/measures?auth_token=token', 'cost/measures')
39
+ @client.cost_measures.should be_kind_of Array
40
+ end
41
+
42
+ it 'should be mappable by type' do
43
+ stub_get('/1/reporting/cost/measures?auth_token=token', 'cost/measures')
44
+ @client.cost_measures.map(&:type).should be_kind_of Array
45
+ end
46
+
47
+ it 'should be mappable by type and not be empty' do
48
+ stub_get('/1/reporting/cost/measures?auth_token=token', 'cost/measures')
49
+ @client.cost_measures.map(&:type).should_not be_empty
50
+ end
51
+
52
+ it 'should be an array of Hashie::Mashes' do
53
+ stub_get('/1/reporting/cost/measures?auth_token=token', 'cost/measures')
54
+ @client.cost_measures.each{|measure| measure.should be_kind_of Hashie::Mash }
55
+ end
56
+ end
57
+
58
+ describe '#cost_filters' do
59
+ it 'should be an array' do
60
+ stub_get('/1/reporting/cost/filters?auth_token=token', 'cost/filters')
61
+ @client.cost_filters.should be_kind_of Array
62
+ end
63
+
64
+ it 'should not be an empty array' do
65
+ stub_get('/1/reporting/cost/filters?auth_token=token', 'cost/filters')
66
+ @client.cost_filters.should_not be_empty
67
+ end
68
+
69
+ it 'should not be an empty array' do
70
+ stub_get('/1/reporting/cost/filters?auth_token=token', 'cost/filters')
71
+ @client.cost_filters.should_not be_empty
72
+ end
73
+
74
+ it 'should be an array of strings' do
75
+ stub_get('/1/reporting/cost/filters?auth_token=token', 'cost/filters')
76
+ @client.cost_filters.each{|filter| filter.should be_kind_of String }
77
+ end
78
+ end
79
+ end
@@ -1,29 +1,20 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Cloudability::Credentials do
4
- describe '#initialize' do
5
- it 'should raise ArgumentError when auth_token is not provided' do
6
- expect { Cloudability::Credentials.new }.to raise_exception(ArgumentError)
7
- end
8
-
9
- it 'should not raise any exception when auth token is provided' do
10
- expect { Cloudability::Credentials.new(auth_token: 'token') }.not_to raise_exception
11
- end
12
- end
3
+ describe Cloudability::Client::Credentials do
13
4
 
14
5
  before do
15
- @cloudability = Cloudability::Credentials.new(auth_token: 'token')
6
+ @client = Cloudability::Client.new(auth_token: 'token')
16
7
  end
17
-
18
- describe '#find_all' do
8
+
9
+ describe '#credentials' do
19
10
  it 'should be an array' do
20
11
  stub_get('/0/credentials/index?auth_token=token', 'credentials')
21
- @cloudability.find_all.class.should == Array
12
+ @client.credentials.should be_kind_of Array
22
13
  end
23
14
 
24
15
  it 'should be an array of Hashie::Mashes' do
25
16
  stub_get('/0/credentials/index?auth_token=token', 'credentials')
26
- @cloudability.find_all.each{|credential| credential.class.should == Hashie::Mash }
17
+ @client.credentials.each{|report| report.should be_kind_of Hashie::Mash }
27
18
  end
28
19
  end
29
20
  end
@@ -1,64 +1,83 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Cloudability::Organizations do
4
- describe '#initialize' do
5
- it 'should raise ArgumentError when auth_token is not provided' do
6
- expect { Cloudability::Organizations.new }.to raise_exception(ArgumentError)
7
- end
8
-
9
- it 'should not raise any exception when auth token is provided' do
10
- expect { Cloudability::Organizations.new(auth_token: 'token') }.not_to raise_exception
11
- end
12
- end
3
+ describe Cloudability::Client::Organizations do
13
4
 
14
5
  before do
15
- @cloudability = Cloudability::Organizations.new(auth_token: 'token')
6
+ @client = Cloudability::Client.new(auth_token: 'token')
16
7
  end
17
8
 
18
9
  describe '#my_organization' do
19
10
  it 'should be a Hashie::Mashe' do
20
11
  stub_get('/1/organizations?auth_token=token', 'organization')
21
- @cloudability.my_organization.class.should == Hashie::Mash
12
+ @client.my_organization.should be_kind_of Hashie::Mash
22
13
  end
23
14
  end
24
15
 
25
- describe '#invitations' do
16
+ describe '#organization_invitations' do
26
17
  it 'should be an Array' do
27
18
  stub_get('/1/organizations/invitations?auth_token=token', 'organization_invitations')
28
- @cloudability.invitations.class.should == Array
19
+ @client.organization_invitations.should be_kind_of Array
29
20
  end
30
21
 
31
22
  it 'should be an array of Hashie::Mashes' do
32
23
  stub_get('/1/organizations/invitations?auth_token=token', 'organization_invitations')
33
- @cloudability.invitations.each{|invite| invite.class.should == Hashie::Mash }
24
+ @client.organization_invitations.each{|invite| invite.should be_kind_of Hashie::Mash }
25
+ end
26
+
27
+ it 'should be mappable by ID' do
28
+ stub_get('/1/organizations/invitations?auth_token=token', 'organization_invitations')
29
+ @client.organization_invitations.map(&:id).should be_kind_of Array
30
+ end
31
+
32
+ it 'should be mappable by ID and not be empty' do
33
+ stub_get('/1/organizations/invitations?auth_token=token', 'organization_invitations')
34
+ @client.organization_invitations.map(&:id).should_not be_empty
34
35
  end
35
36
  end
36
37
 
37
- describe '#roles' do
38
+ describe '#organization_roles' do
38
39
  it 'should be an Array' do
39
40
  stub_get('/1/organizations/roles?auth_token=token', 'organization_roles')
40
- @cloudability.roles.class.should == Array
41
+ @client.organization_roles.should be_kind_of Array
41
42
  end
42
43
 
43
44
  it 'should be an array of Hashie::Mashes' do
44
45
  stub_get('/1/organizations/roles?auth_token=token', 'organization_roles')
45
- @cloudability.roles.each{|role| role.class.should == Hashie::Mash }
46
+ @client.organization_roles.each{|role| role.should be_kind_of Hashie::Mash }
46
47
  end
47
48
  end
48
49
 
49
50
  describe '#invite_user' do
50
51
  it 'should be a Hashie::Mash' do
51
52
  stub_post('/1/organizations/invitations?auth_token=token&email=colbyaleyrb%40gmail.com', 'organization_invitation')
52
- @cloudability.invite_user(email: 'colbyaleyrb@gmail.com').class.should == Hashie::Mash
53
+ @client.invite_user('colbyaleyrb@gmail.com').should be_kind_of Hashie::Mash
53
54
  end
54
55
 
55
56
  it 'should accept a hash with email and name' do
56
57
  stub_post('/1/organizations/invitations?auth_token=token&email=colbyaleyrb%40gmail.com&name=colby', 'organization_invitation')
57
- expect { @cloudability.invite_user(email: 'colbyaleyrb@gmail.com', name: 'colby') }.not_to raise_exception
58
+ expect { @client.invite_user('colbyaleyrb@gmail.com', name: 'colby') }.not_to raise_exception
59
+ end
60
+ end
61
+
62
+ describe '#delete_invite' do
63
+ it 'should should not raise an exception when id is provided' do
64
+ stub_delete('/1/organizations/invitations/1?auth_token=token', 'organization_invitation')
65
+ expect { @client.delete_invite(1) }.not_to raise_exception
66
+ end
67
+
68
+ it 'should require id as an argument' do
69
+ expect { @client.delete_invite }.to raise_exception(ArgumentError)
70
+ end
71
+ end
72
+
73
+ describe '#update_invite' do
74
+ it 'should should not raise an exception when id and role_id are provided' do
75
+ stub_put('/1/organizations/invitations/1?role_id=1&auth_token=token', 'organization_invitation')
76
+ expect { @client.update_invite(1,1) }.not_to raise_exception
58
77
  end
59
78
 
60
- it 'should not accept requests without an email' do
61
- expect { @cloudability.invite_user(name: 'Colby Aley') }.to raise_exception(ArgumentError)
79
+ it 'should require id and role_id as arguments' do
80
+ expect { @client.update_invite }.to raise_exception(ArgumentError)
62
81
  end
63
82
  end
64
83
  end
@@ -0,0 +1,44 @@
1
+ require 'spec_helper'
2
+
3
+ describe Cloudability::Client::UsageReports do
4
+
5
+ before do
6
+ @client = Cloudability::Client.new(auth_token: 'token')
7
+ end
8
+
9
+ describe '#usage_reports' do
10
+ it 'should be an array' do
11
+ stub_get('/1/reporting?auth_token=token', 'usage/reports')
12
+ @client.usage_reports.should be_kind_of Array
13
+ end
14
+
15
+ it 'should be an array of Hashie::Mashes' do
16
+ stub_get('/1/reporting?auth_token=token', 'usage/reports')
17
+ @client.usage_reports.each{|report| report.should be_kind_of Hashie::Mash }
18
+ end
19
+ end
20
+
21
+ describe '#usage_measures' do
22
+ it 'should be an array' do
23
+ stub_get('/1/reporting/measures?auth_token=token', 'usage/measures')
24
+ @client.usage_measures.should be_kind_of Array
25
+ end
26
+
27
+ it 'should be an array of Hashie::Mashes' do
28
+ stub_get('/1/reporting/measures?auth_token=token', 'usage/measures')
29
+ @client.usage_measures.each{|measure| measure.should be_kind_of Hashie::Mash }
30
+ end
31
+ end
32
+
33
+ describe '#usage_filters' do
34
+ it 'should be an array' do
35
+ stub_get('/1/reporting/filters?auth_token=token', 'usage/filters')
36
+ @client.usage_filters.should be_kind_of Array
37
+ end
38
+
39
+ it 'should be an array of strings' do
40
+ stub_get('/1/reporting/filters?auth_token=token', 'usage/filters')
41
+ @client.usage_filters.each{|filter| filter.should be_kind_of String }
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,18 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Thu, 26 Dec 2013 07:07:35 GMT
4
+ Content-Type: application/json
5
+ Content-Length: 4325
6
+ Connection: keep-alive
7
+ Status: 200 OK
8
+ Strict-Transport-Security: max-age=31536000
9
+ Set-Cookie: _mkra_ctxt=3ffbcb8ced889a77eee33fc6e55f2f4f--200; path=/; secure
10
+ X-UA-Compatible: IE=Edge,chrome=1
11
+ ETag: "e1d3be175a896af8a2f5af1eab72f227"
12
+ Cache-Control: max-age=0, private, must-revalidate
13
+ X-Request-Id: 9fb37024fc9512947f1835a9f8477583
14
+ X-Runtime: 1.653713
15
+ X-Rack-Cache: miss
16
+ Origin: app.cloudability.com
17
+
18
+ [{"period":"2007-09-01","spend":577.42,"currency":"USD"},{"period":"2007-10-01","spend":1040.88,"currency":"USD"},{"period":"2007-11-01","spend":1089.0,"currency":"USD"},{"period":"2007-12-01","spend":1086.0,"currency":"USD"},{"period":"2008-01-01","spend":1103.59,"currency":"USD"},{"period":"2008-02-01","spend":1151.63,"currency":"USD"},{"period":"2008-03-01","spend":1343.76,"currency":"USD"},{"period":"2008-04-01","spend":1336.79,"currency":"USD"},{"period":"2008-05-01","spend":1336.79,"currency":"USD"},{"period":"2008-06-01","spend":1336.79,"currency":"USD"},{"period":"2008-07-01","spend":1931.27,"currency":"USD"},{"period":"2008-08-01","spend":1419.99,"currency":"USD"},{"period":"2008-09-01","spend":1419.99,"currency":"USD"},{"period":"2008-10-01","spend":1419.99,"currency":"USD"},{"period":"2008-11-01","spend":1423.19,"currency":"USD"},{"period":"2008-12-01","spend":1419.99,"currency":"USD"},{"period":"2009-01-01","spend":1419.99,"currency":"USD"},{"period":"2009-02-01","spend":1419.99,"currency":"USD"},{"period":"2009-03-01","spend":1678.93,"currency":"USD"},{"period":"2009-04-01","spend":1550.39,"currency":"USD"},{"period":"2009-05-01","spend":1550.39,"currency":"USD"},{"period":"2009-06-01","spend":1550.39,"currency":"USD"},{"period":"2009-07-01","spend":1550.39,"currency":"USD"},{"period":"2009-08-01","spend":1529.0,"currency":"USD"},{"period":"2009-09-01","spend":1529.0,"currency":"USD"},{"period":"2009-10-01","spend":1529.0,"currency":"USD"},{"period":"2009-11-01","spend":1532.2,"currency":"USD"},{"period":"2009-12-01","spend":1576.11,"currency":"USD"},{"period":"2010-01-01","spend":1906.34,"currency":"USD"},{"period":"2010-02-01","spend":1721.87,"currency":"USD"},{"period":"2010-03-01","spend":1675.0,"currency":"USD"},{"period":"2010-04-01","spend":1676.2,"currency":"USD"},{"period":"2010-05-01","spend":1700.25,"currency":"USD"},{"period":"2010-06-01","spend":1639.0,"currency":"USD"},{"period":"2010-07-01","spend":1926.39,"currency":"USD"},{"period":"2010-08-01","spend":1420.0,"currency":"USD"},{"period":"2010-09-01","spend":1420.0,"currency":"USD"},{"period":"2010-10-01","spend":1420.0,"currency":"USD"},{"period":"2010-11-01","spend":1534.8,"currency":"USD"},{"period":"2010-12-01","spend":1340.0,"currency":"USD"},{"period":"2011-01-01","spend":1362.92,"currency":"USD"},{"period":"2011-02-01","spend":1394.36,"currency":"USD"},{"period":"2011-03-01","spend":1113.0,"currency":"USD"},{"period":"2011-04-01","spend":1119.33,"currency":"USD"},{"period":"2011-05-01","spend":1060.91,"currency":"USD"},{"period":"2011-06-01","spend":1072.0,"currency":"USD"},{"period":"2011-07-01","spend":1449.69,"currency":"USD"},{"period":"2011-08-01","spend":1944.03,"currency":"USD"},{"period":"2011-09-01","spend":2310.35,"currency":"USD"},{"period":"2011-10-01","spend":2322.35,"currency":"USD"},{"period":"2011-11-01","spend":2385.37,"currency":"USD"},{"period":"2011-12-01","spend":2522.25,"currency":"USD"},{"period":"2012-01-01","spend":2059.59,"currency":"USD"},{"period":"2012-02-01","spend":1978.77,"currency":"USD"},{"period":"2012-03-01","spend":2025.13,"currency":"USD"},{"period":"2012-04-01","spend":1871.99,"currency":"USD"},{"period":"2012-05-01","spend":2155.67,"currency":"USD"},{"period":"2012-06-01","spend":2510.02,"currency":"USD"},{"period":"2012-07-01","spend":2698.46,"currency":"USD"},{"period":"2012-08-01","spend":2411.71,"currency":"USD"},{"period":"2012-09-01","spend":6457.44,"currency":"USD"},{"period":"2012-10-01","spend":8665.07,"currency":"USD"},{"period":"2012-11-01","spend":9503.68,"currency":"USD"},{"period":"2012-12-01","spend":11809.3,"currency":"USD"},{"period":"2013-01-01","spend":15392.17,"currency":"USD"},{"period":"2013-02-01","spend":14863.16,"currency":"USD"},{"period":"2013-03-01","spend":14544.94,"currency":"USD"},{"period":"2013-04-01","spend":12276.64,"currency":"USD"},{"period":"2013-05-01","spend":13375.0,"currency":"USD"},{"period":"2013-06-01","spend":14404.7,"currency":"USD"},{"period":"2013-07-01","spend":15060.31,"currency":"USD"},{"period":"2013-08-01","spend":13829.53,"currency":"USD"},{"period":"2013-09-01","spend":15918.8,"currency":"USD"},{"period":"2013-10-01","spend":20735.45,"currency":"USD"},{"period":"2013-11-01","spend":24589.83,"currency":"USD"},{"period":"2013-12-01","spend":10126.34,"currency":"USD"}]
@@ -0,0 +1,18 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Thu, 26 Dec 2013 07:21:11 GMT
4
+ Content-Type: application/json
5
+ Content-Length: 457
6
+ Connection: keep-alive
7
+ Status: 200 OK
8
+ Strict-Transport-Security: max-age=31536000
9
+ Set-Cookie: _mkra_ctxt=7c8b8e7eaf283b883c5bafacc5200436--200; path=/; secure
10
+ X-UA-Compatible: IE=Edge,chrome=1
11
+ ETag: "f337342c38dac852161666174d1514c8"
12
+ Cache-Control: max-age=0, private, must-revalidate
13
+ X-Request-Id: e9393a77a94b9047adec9b7a650a661a
14
+ X-Runtime: 0.194231
15
+ X-Rack-Cache: miss
16
+ Origin: app.cloudability.com
17
+
18
+ [{"predicted_monthly_spend":{"cents":1111111,"currency":{"id":111,"key":"usd","priority":1,"iso_code":"USD"}},"subject":"1111-1111-1111","type":"Account","currency":"USD","id":1111,"is_active":true,"threshold":"50000.0"},{"predicted_monthly_spend":{"cents":1111111,"currency":{"id":111,"key":"usd","priority":1,"iso_code":"USD"}},"subject":"colby@cloudability.com","type":"User","currency":"USD","id":1111,"is_active":true,"threshold":"100000.0"}]
@@ -1,18 +1,18 @@
1
1
  HTTP/1.1 200 OK
2
2
  Server: nginx/1.4.4
3
- Date: Wed, 25 Dec 2013 02:49:35 GMT
3
+ Date: Thu, 26 Dec 2013 07:51:33 GMT
4
4
  Content-Type: application/json
5
- Content-Length: 2
5
+ Content-Length: 39
6
6
  Connection: keep-alive
7
7
  Status: 200 OK
8
8
  Strict-Transport-Security: max-age=31536000
9
- Set-Cookie: _mkra_ctxt=cd4d354e0eff5733a115d60cc2cd8f7b--200; path=/; secure
9
+ Set-Cookie: _mkra_ctxt=a24420f6d8da00e86ed98242a94c5153--200; path=/; secure
10
10
  X-UA-Compatible: IE=Edge,chrome=1
11
- ETag: "d751713988987e9331980363e24189ce"
11
+ ETag: "8762e8222fbc8f34a7359e143314adab"
12
12
  Cache-Control: max-age=0, private, must-revalidate
13
- X-Request-Id: dcb2471ac74c614d429872ff8996c01c
14
- X-Runtime: 0.058661
13
+ X-Request-Id: ca2fcd7690fafc98c3875970e2e17347
14
+ X-Runtime: 0.009464
15
15
  X-Rack-Cache: miss
16
16
  Origin: app.cloudability.com
17
17
 
18
- []
18
+ ["==","!=","<=",">=","<",">","=@","=~"]
@@ -0,0 +1,18 @@
1
+ HTTP/1.1 200 OK
2
+ Server: nginx/1.4.4
3
+ Date: Thu, 26 Dec 2013 07:55:18 GMT
4
+ Content-Type: application/json
5
+ Content-Length: 10352
6
+ Connection: keep-alive
7
+ Status: 200 OK
8
+ Strict-Transport-Security: max-age=31536000
9
+ Set-Cookie: _mkra_ctxt=a862cf891fb1e25947304e8e69966249--200; path=/; secure
10
+ X-UA-Compatible: IE=Edge,chrome=1
11
+ ETag: "3029e59c8da38f12b82f81ffa780975a"
12
+ Cache-Control: max-age=0, private, must-revalidate
13
+ X-Request-Id: 28b5bd1f20212224078aab710431181b
14
+ X-Runtime: 0.153894
15
+ X-Rack-Cache: miss
16
+ Origin: app.cloudability.com
17
+
18
+ [{"type":"metric","name":"taxes","label":"Taxes","description":"Taxes applied to line items","data_type":"currency","group":{"key":"billing","name":"Billing"},"sub_group":{"key":"costs","name":"Costs"}},{"type":"metric","name":"credits","label":"Credits","description":"Credits applied to line items","data_type":"currency","group":{"key":"billing","name":"Billing"},"sub_group":{"key":"costs","name":"Costs"}}]
@@ -0,0 +1,16 @@
1
+ HTTP/1.1 401 Unauthorized
2
+ Server: nginx/1.4.4
3
+ Date: Thu, 26 Dec 2013 07:48:50 GMT
4
+ Content-Type: application/json
5
+ Content-Length: 28
6
+ Connection: keep-alive
7
+ Status: 401 Unauthorized
8
+ Strict-Transport-Security: max-age=31536000
9
+ Set-Cookie: _mkra_ctxt=45efbe219662899fe9775a3ce1cf34a6--401; path=/; secure
10
+ X-UA-Compatible: IE=Edge,chrome=1
11
+ Cache-Control: no-cache
12
+ X-Request-Id: f71f1c66237f1f9d2596dc7f21b4a0ca
13
+ X-Runtime: 0.012704
14
+ X-Rack-Cache: miss
15
+
16
+ {"error":"401 Unauthorized"}