ticketevolution-ruby 0.5.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.
Files changed (146) hide show
  1. data/.gitignore +8 -0
  2. data/.rdebugrc +1 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +6 -0
  5. data/Gemfile +7 -0
  6. data/LICENSE +23 -0
  7. data/README.markdown +237 -0
  8. data/Rakefile +124 -0
  9. data/examples/events.rb +64 -0
  10. data/lib/docs/endpoints.markdown +47 -0
  11. data/lib/docs/installation.markdown +5 -0
  12. data/lib/docs/introduction.markdown +16 -0
  13. data/lib/docs/objects.markdown +40 -0
  14. data/lib/ticket_evolution/account.rb +4 -0
  15. data/lib/ticket_evolution/accounts.rb +6 -0
  16. data/lib/ticket_evolution/address.rb +4 -0
  17. data/lib/ticket_evolution/brokerage.rb +4 -0
  18. data/lib/ticket_evolution/brokerages.rb +7 -0
  19. data/lib/ticket_evolution/categories.rb +7 -0
  20. data/lib/ticket_evolution/category.rb +4 -0
  21. data/lib/ticket_evolution/client.rb +4 -0
  22. data/lib/ticket_evolution/clients/addresses.rb +10 -0
  23. data/lib/ticket_evolution/clients/credit_cards.rb +8 -0
  24. data/lib/ticket_evolution/clients/email_addresses.rb +10 -0
  25. data/lib/ticket_evolution/clients/phone_numbers.rb +10 -0
  26. data/lib/ticket_evolution/clients.rb +8 -0
  27. data/lib/ticket_evolution/configuration.rb +4 -0
  28. data/lib/ticket_evolution/configurations.rb +6 -0
  29. data/lib/ticket_evolution/core/api_error.rb +11 -0
  30. data/lib/ticket_evolution/core/base.rb +12 -0
  31. data/lib/ticket_evolution/core/builder.rb +74 -0
  32. data/lib/ticket_evolution/core/collection.rb +32 -0
  33. data/lib/ticket_evolution/core/connection.rb +99 -0
  34. data/lib/ticket_evolution/core/datum.rb +7 -0
  35. data/lib/ticket_evolution/core/endpoint/request_handler.rb +46 -0
  36. data/lib/ticket_evolution/core/endpoint.rb +51 -0
  37. data/lib/ticket_evolution/core/model.rb +64 -0
  38. data/lib/ticket_evolution/core/models/samples.rb +8 -0
  39. data/lib/ticket_evolution/core/samples.rb +6 -0
  40. data/lib/ticket_evolution/core/singular_class.rb +7 -0
  41. data/lib/ticket_evolution/core/time.rb +19 -0
  42. data/lib/ticket_evolution/credit_card.rb +4 -0
  43. data/lib/ticket_evolution/email_address.rb +4 -0
  44. data/lib/ticket_evolution/errors/connection_not_found.rb +4 -0
  45. data/lib/ticket_evolution/errors/endpoint_configuration_error.rb +5 -0
  46. data/lib/ticket_evolution/errors/invalid_configuration.rb +4 -0
  47. data/lib/ticket_evolution/errors/method_unavailable_error.rb +4 -0
  48. data/lib/ticket_evolution/event.rb +4 -0
  49. data/lib/ticket_evolution/events.rb +7 -0
  50. data/lib/ticket_evolution/modules/create.rb +18 -0
  51. data/lib/ticket_evolution/modules/deleted.rb +13 -0
  52. data/lib/ticket_evolution/modules/list.rb +15 -0
  53. data/lib/ticket_evolution/modules/search.rb +13 -0
  54. data/lib/ticket_evolution/modules/show.rb +20 -0
  55. data/lib/ticket_evolution/modules/update.rb +24 -0
  56. data/lib/ticket_evolution/office.rb +4 -0
  57. data/lib/ticket_evolution/offices.rb +7 -0
  58. data/lib/ticket_evolution/order.rb +15 -0
  59. data/lib/ticket_evolution/orders.rb +30 -0
  60. data/lib/ticket_evolution/performer.rb +4 -0
  61. data/lib/ticket_evolution/performers.rb +8 -0
  62. data/lib/ticket_evolution/phone_number.rb +4 -0
  63. data/lib/ticket_evolution/quote.rb +4 -0
  64. data/lib/ticket_evolution/quotes.rb +7 -0
  65. data/lib/ticket_evolution/search.rb +22 -0
  66. data/lib/ticket_evolution/shipment.rb +4 -0
  67. data/lib/ticket_evolution/shipments.rb +8 -0
  68. data/lib/ticket_evolution/ticket_group.rb +4 -0
  69. data/lib/ticket_evolution/ticket_groups.rb +6 -0
  70. data/lib/ticket_evolution/user.rb +4 -0
  71. data/lib/ticket_evolution/users.rb +7 -0
  72. data/lib/ticket_evolution/venue.rb +4 -0
  73. data/lib/ticket_evolution/venues.rb +8 -0
  74. data/lib/ticket_evolution/version.rb +3 -0
  75. data/lib/ticket_evolution.rb +108 -0
  76. data/spec/fixtures/fake.rb +97 -0
  77. data/spec/fixtures/net/endpoints/accounts.yml +175 -0
  78. data/spec/fixtures/net/endpoints/brokerages.yml +257 -0
  79. data/spec/fixtures/net/endpoints/categories.yml +85 -0
  80. data/spec/fixtures/net/endpoints/clients.yml +243 -0
  81. data/spec/fixtures/net/endpoints/search.yml +93 -0
  82. data/spec/lib/ticket_evolution/account_spec.rb +7 -0
  83. data/spec/lib/ticket_evolution/accounts_spec.rb +45 -0
  84. data/spec/lib/ticket_evolution/address_spec.rb +7 -0
  85. data/spec/lib/ticket_evolution/brokerage_spec.rb +7 -0
  86. data/spec/lib/ticket_evolution/brokerages_spec.rb +50 -0
  87. data/spec/lib/ticket_evolution/categories_spec.rb +27 -0
  88. data/spec/lib/ticket_evolution/category_spec.rb +7 -0
  89. data/spec/lib/ticket_evolution/client_spec.rb +7 -0
  90. data/spec/lib/ticket_evolution/clients/addresses_spec.rb +13 -0
  91. data/spec/lib/ticket_evolution/clients/credit_cards_spec.rb +11 -0
  92. data/spec/lib/ticket_evolution/clients/email_addresses_spec.rb +13 -0
  93. data/spec/lib/ticket_evolution/clients/phone_numbers_spec.rb +13 -0
  94. data/spec/lib/ticket_evolution/clients_spec.rb +37 -0
  95. data/spec/lib/ticket_evolution/configuration_spec.rb +7 -0
  96. data/spec/lib/ticket_evolution/configurations_spec.rb +10 -0
  97. data/spec/lib/ticket_evolution/core/api_error_spec.rb +13 -0
  98. data/spec/lib/ticket_evolution/core/base_spec.rb +29 -0
  99. data/spec/lib/ticket_evolution/core/builder_spec.rb +95 -0
  100. data/spec/lib/ticket_evolution/core/collection_spec.rb +23 -0
  101. data/spec/lib/ticket_evolution/core/connection_spec.rb +220 -0
  102. data/spec/lib/ticket_evolution/core/datum_spec.rb +15 -0
  103. data/spec/lib/ticket_evolution/core/endpoint_spec.rb +12 -0
  104. data/spec/lib/ticket_evolution/core/model_spec.rb +167 -0
  105. data/spec/lib/ticket_evolution/core/time_spec.rb +28 -0
  106. data/spec/lib/ticket_evolution/credit_card_spec.rb +7 -0
  107. data/spec/lib/ticket_evolution/email_address_spec.rb +7 -0
  108. data/spec/lib/ticket_evolution/errors/connection_not_found_spec.rb +7 -0
  109. data/spec/lib/ticket_evolution/errors/endpoint_configuration_error_spec.rb +8 -0
  110. data/spec/lib/ticket_evolution/errors/invalid_configuration_spec.rb +8 -0
  111. data/spec/lib/ticket_evolution/errors/method_unavailable_error_spec.rb +7 -0
  112. data/spec/lib/ticket_evolution/event_spec.rb +7 -0
  113. data/spec/lib/ticket_evolution/events_spec.rb +11 -0
  114. data/spec/lib/ticket_evolution/office_spec.rb +7 -0
  115. data/spec/lib/ticket_evolution/offices_spec.rb +11 -0
  116. data/spec/lib/ticket_evolution/order_spec.rb +44 -0
  117. data/spec/lib/ticket_evolution/orders_spec.rb +123 -0
  118. data/spec/lib/ticket_evolution/performer_spec.rb +7 -0
  119. data/spec/lib/ticket_evolution/performers_spec.rb +12 -0
  120. data/spec/lib/ticket_evolution/phone_number_spec.rb +7 -0
  121. data/spec/lib/ticket_evolution/quote_spec.rb +7 -0
  122. data/spec/lib/ticket_evolution/quotes_spec.rb +11 -0
  123. data/spec/lib/ticket_evolution/search_spec.rb +31 -0
  124. data/spec/lib/ticket_evolution/shipment_spec.rb +7 -0
  125. data/spec/lib/ticket_evolution/shipments_spec.rb +13 -0
  126. data/spec/lib/ticket_evolution/ticket_group_spec.rb +7 -0
  127. data/spec/lib/ticket_evolution/ticket_groups_spec.rb +14 -0
  128. data/spec/lib/ticket_evolution/user_spec.rb +7 -0
  129. data/spec/lib/ticket_evolution/users_spec.rb +15 -0
  130. data/spec/lib/ticket_evolution/venue_spec.rb +7 -0
  131. data/spec/lib/ticket_evolution/venues_spec.rb +12 -0
  132. data/spec/lib/ticket_evolution_spec.rb +20 -0
  133. data/spec/shared_examples/endpoints/class.rb +241 -0
  134. data/spec/shared_examples/endpoints/create.rb +41 -0
  135. data/spec/shared_examples/endpoints/deleted.rb +41 -0
  136. data/spec/shared_examples/endpoints/list.rb +41 -0
  137. data/spec/shared_examples/endpoints/search.rb +42 -0
  138. data/spec/shared_examples/endpoints/show.rb +38 -0
  139. data/spec/shared_examples/endpoints/update.rb +59 -0
  140. data/spec/shared_examples/errors.rb +5 -0
  141. data/spec/shared_examples/models.rb +29 -0
  142. data/spec/spec_helper.rb +21 -0
  143. data/spec/support/connection.rb +10 -0
  144. data/spec/support/vcr.rb +12 -0
  145. data/ticketevolution-ruby.gemspec +33 -0
  146. metadata +384 -0
@@ -0,0 +1,4 @@
1
+ module TicketEvolution
2
+ class Office < Model
3
+ end
4
+ end
@@ -0,0 +1,7 @@
1
+ module TicketEvolution
2
+ class Offices < Endpoint
3
+ include TicketEvolution::Modules::List
4
+ include TicketEvolution::Modules::Search
5
+ include TicketEvolution::Modules::Show
6
+ end
7
+ end
@@ -0,0 +1,15 @@
1
+ module TicketEvolution
2
+ class Order < Model
3
+ def accept(params)
4
+ plural_class.new(:parent => @connection).accept_order(params)
5
+ end
6
+
7
+ def complete
8
+ plural_class.new(:parent => @connection).complete_order
9
+ end
10
+
11
+ def reject(params)
12
+ plural_class.new(:parent => @connection).reject_order(params)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,30 @@
1
+ module TicketEvolution
2
+ class Orders < Endpoint
3
+ include TicketEvolution::Modules::Create
4
+ include TicketEvolution::Modules::List
5
+ include TicketEvolution::Modules::Show
6
+ include TicketEvolution::Modules::Update
7
+
8
+ alias :create_brokerage_order :create
9
+ alias :create_customer_order :create
10
+
11
+ def accept_order(params = nil)
12
+ ensure_id
13
+ request(:POST, "/#{self.id}/accept", params, &method(:build_for_create))
14
+ end
15
+
16
+ def create_fulfillment_order(params = nil)
17
+ request(:POST, "/fulfillments", params, &method(:build_for_create))
18
+ end
19
+
20
+ def reject_order(params = nil)
21
+ ensure_id
22
+ request(:POST, "/#{self.id}/reject", params, &method(:build_for_create))
23
+ end
24
+
25
+ def complete_order
26
+ ensure_id
27
+ request(:POST, "/#{self.id}/complete", nil, &method(:build_for_create))
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,4 @@
1
+ module TicketEvolution
2
+ class Performer < Model
3
+ end
4
+ end
@@ -0,0 +1,8 @@
1
+ module TicketEvolution
2
+ class Performers < Endpoint
3
+ include TicketEvolution::Modules::Deleted
4
+ include TicketEvolution::Modules::List
5
+ include TicketEvolution::Modules::Search
6
+ include TicketEvolution::Modules::Show
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ module TicketEvolution
2
+ class PhoneNumber < Model
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module TicketEvolution
2
+ class Quote < Model
3
+ end
4
+ end
@@ -0,0 +1,7 @@
1
+ module TicketEvolution
2
+ class Quotes < Endpoint
3
+ include TicketEvolution::Modules::List
4
+ include TicketEvolution::Modules::Search
5
+ include TicketEvolution::Modules::Show
6
+ end
7
+ end
@@ -0,0 +1,22 @@
1
+ module TicketEvolution
2
+ class Search < Endpoint
3
+ def list(params = {})
4
+ request(:GET, nil, params, &method(:build_for_search))
5
+ end
6
+
7
+ def build_for_search(response)
8
+ collection = TicketEvolution::Collection.new(
9
+ :total_entries => response.body['total_entries'],
10
+ :per_page => response.body['per_page'],
11
+ :current_page => response.body['current_page']
12
+ )
13
+
14
+ response.body['results'].each do |result|
15
+ collection.entries << "TicketEvolution::#{result['_type']}".
16
+ constantize.new(result.merge({:connection => connection}))
17
+ end
18
+
19
+ collection
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,4 @@
1
+ module TicketEvolution
2
+ class Shipment < Model
3
+ end
4
+ end
@@ -0,0 +1,8 @@
1
+ module TicketEvolution
2
+ class Shipments < Endpoint
3
+ include TicketEvolution::Modules::Create
4
+ include TicketEvolution::Modules::List
5
+ include TicketEvolution::Modules::Show
6
+ include TicketEvolution::Modules::Update
7
+ end
8
+ end
@@ -0,0 +1,4 @@
1
+ module TicketEvolution
2
+ class TicketGroup < Model
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module TicketEvolution
2
+ class TicketGroups < Endpoint
3
+ include TicketEvolution::Modules::List
4
+ include TicketEvolution::Modules::Show
5
+ end
6
+ end
@@ -0,0 +1,4 @@
1
+ module TicketEvolution
2
+ class User < Model
3
+ end
4
+ end
@@ -0,0 +1,7 @@
1
+ module TicketEvolution
2
+ class Users < Endpoint
3
+ include TicketEvolution::Modules::List
4
+ include TicketEvolution::Modules::Search
5
+ include TicketEvolution::Modules::Show
6
+ end
7
+ end
@@ -0,0 +1,4 @@
1
+ module TicketEvolution
2
+ class Venue < Model
3
+ end
4
+ end
@@ -0,0 +1,8 @@
1
+ module TicketEvolution
2
+ class Venues < Endpoint
3
+ include TicketEvolution::Modules::Deleted
4
+ include TicketEvolution::Modules::List
5
+ include TicketEvolution::Modules::Search
6
+ include TicketEvolution::Modules::Show
7
+ end
8
+ end
@@ -0,0 +1,3 @@
1
+ module TicketEvolution
2
+ VERSION = '0.5.0'
3
+ end
@@ -0,0 +1,108 @@
1
+ require 'rubygems'
2
+ require 'yajl'
3
+ require 'multi_json'
4
+ require 'curb'
5
+
6
+ require 'ostruct'
7
+ require 'base64'
8
+ require 'digest/md5'
9
+ require 'openssl'
10
+ require 'pathname'
11
+ require 'cgi'
12
+ require 'uri'
13
+
14
+ require 'active_support/hash_with_indifferent_access'
15
+ require 'active_support/core_ext/class'
16
+ require 'active_support/core_ext/hash'
17
+ require 'active_support/core_ext/module'
18
+ require 'active_support/core_ext/object/blank'
19
+ require 'active_support/core_ext/object/to_param'
20
+ require 'active_support/core_ext/object/to_query'
21
+ require 'active_support/inflector'
22
+
23
+ module TicketEvolution
24
+ mattr_reader :root
25
+
26
+ @@root = Pathname.new(File.dirname(File.expand_path(__FILE__))) + 'ticket_evolution'
27
+ end
28
+
29
+ c = Module.new { def self.req(*parts); require TicketEvolution.root + 'core' + File.join(parts); end }
30
+ i = Module.new { def self.req(*parts); require TicketEvolution.root + File.join(parts); end }
31
+ m = Module.new { def self.req(*parts); require TicketEvolution.root + 'modules' + File.join(parts); end }
32
+
33
+ i.req 'version' unless defined?(TicketEvolution::VERSION)
34
+
35
+ # Core modules
36
+ c.req 'singular_class'
37
+
38
+ # Core classes
39
+ c.req 'api_error'
40
+ c.req 'base'
41
+ c.req 'builder'
42
+ c.req 'collection'
43
+ c.req 'connection'
44
+ c.req 'datum'
45
+ c.req 'endpoint', 'request_handler'
46
+ c.req 'endpoint'
47
+ c.req 'model'
48
+ c.req 'time'
49
+
50
+ # Sample classes for test support
51
+ c.req 'models', 'samples'
52
+ c.req 'samples'
53
+
54
+ # Errors
55
+ i.req 'errors', 'connection_not_found'
56
+ i.req 'errors', 'endpoint_configuration_error'
57
+ i.req 'errors', 'invalid_configuration'
58
+ i.req 'errors', 'method_unavailable_error'
59
+
60
+ # Endpoint modules
61
+ m.req 'create'
62
+ m.req 'deleted'
63
+ m.req 'list'
64
+ m.req 'search'
65
+ m.req 'show'
66
+ m.req 'update'
67
+
68
+ # Builder Classes
69
+ i.req 'account'
70
+ i.req 'address'
71
+ i.req 'brokerage'
72
+ i.req 'category'
73
+ i.req 'client'
74
+ i.req 'configuration'
75
+ i.req 'credit_card'
76
+ i.req 'email_address'
77
+ i.req 'event'
78
+ i.req 'office'
79
+ i.req 'order'
80
+ i.req 'performer'
81
+ i.req 'phone_number'
82
+ i.req 'quote'
83
+ i.req 'shipment'
84
+ i.req 'ticket_group'
85
+ i.req 'user'
86
+ i.req 'venue'
87
+
88
+ # Endpoint Classes
89
+ i.req 'accounts'
90
+ i.req 'brokerages'
91
+ i.req 'categories'
92
+ i.req 'clients'
93
+ i.req 'configurations'
94
+ i.req 'events'
95
+ i.req 'offices'
96
+ i.req 'orders'
97
+ i.req 'performers'
98
+ i.req 'quotes'
99
+ i.req 'shipments'
100
+ i.req 'ticket_groups'
101
+ i.req 'users'
102
+ i.req 'venues'
103
+ i.req 'search'
104
+
105
+ i.req 'clients', 'addresses'
106
+ i.req 'clients', 'credit_cards'
107
+ i.req 'clients', 'email_addresses'
108
+ i.req 'clients', 'phone_numbers'
@@ -0,0 +1,97 @@
1
+ class Fake
2
+ def self.token
3
+ Digest::MD5.hexdigest("fake_token")
4
+ end
5
+
6
+ def self.secret
7
+ Base64.encode64(OpenSSL::Random.random_bytes(30)).chomp
8
+ end
9
+
10
+ def self.connection
11
+ TicketEvolution::Connection.new({:token => Fake.token, :secret => Fake.secret})
12
+ end
13
+
14
+ def self.response_handler(response)
15
+ "called fake handler"
16
+ end
17
+
18
+ def self.response
19
+ OpenStruct.new.tap do |resp|
20
+ resp.header = 'fake header string (we don\'t currently process this)'
21
+ resp.response_code = 200
22
+ resp.body = {:body => "test"}
23
+ resp.server_message = TicketEvolution::Endpoint::RequestHandler::CODES[200].last
24
+ end
25
+ end
26
+
27
+ def self.show_response
28
+ r = self.response
29
+ r.body = {
30
+ :connection => Fake.connection,
31
+ "url" => "/brokerages/2",
32
+ "updated_at" => "2011-12-18T17:30:06Z",
33
+ "natb_member" => true,
34
+ "name" => "Golden Tickets",
35
+ "id" => "2",
36
+ "abbreviation" => "Golden Tickets"
37
+ }
38
+ r
39
+ end
40
+
41
+ def self.list_response
42
+ r = self.response
43
+ r.body = {
44
+ :connection => Fake.connection,
45
+ "current_page" => 1,
46
+ "per_page" => 2,
47
+ "brokerages" => [
48
+ {
49
+ "url" => "/brokerages/1",
50
+ "updated_at" => "2011-12-18T19:06:19Z",
51
+ "natb_member" => true,
52
+ "name" => "National Event Company",
53
+ "id" => "1",
54
+ "abbreviation" => "NECO"
55
+ },
56
+ {
57
+ "url" => "/brokerages/2",
58
+ "updated_at" => "2011-12-18T17:30:06Z",
59
+ "natb_member" => true,
60
+ "name" => "Golden Tickets",
61
+ "id" => "2",
62
+ "abbreviation" => "Golden Tickets"
63
+ }
64
+ ],
65
+ "total_entries" => 1379
66
+ }
67
+ r
68
+ end
69
+
70
+ def self.create_response(endpoint = nil, connection = Fake.connection)
71
+ r = self.response
72
+ r.body = {
73
+ :connection => connection,
74
+ endpoint.to_s => [
75
+ {
76
+ "url" => "/clients/2097",
77
+ "email_addresses" => [],
78
+ "updated_at"=>"2012-01-06T02:34:47Z",
79
+ "phone_numbers"=>[],
80
+ "addresses"=>[],
81
+ "name"=>"Morris Moe Szyslak",
82
+ "id"=>"2097"
83
+ }
84
+ ]
85
+ }
86
+ r
87
+ end
88
+
89
+ def self.error_response
90
+ OpenStruct.new.tap do |resp|
91
+ resp.header = ''
92
+ resp.response_code = 500
93
+ resp.body = {'error' => 'Internal Server Error'}
94
+ resp.server_message = TicketEvolution::Endpoint::RequestHandler::CODES[500].last
95
+ end
96
+ end
97
+ end
@@ -0,0 +1,175 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://api.sandbox.ticketevolution.com:443/accounts/62?
6
+ body: !!null
7
+ headers:
8
+ accept:
9
+ - application/vnd.ticketevolution.api+json; version=8
10
+ x-signature:
11
+ - pJI/Zi+UHr/bfyNIT2P604nnFQdEoC6CyuasOGhKP68=
12
+ x-token:
13
+ - b2b5a7a33b1a78896ed1b53d81c5c9cc
14
+ response: !ruby/struct:VCR::Response
15
+ status: !ruby/struct:VCR::ResponseStatus
16
+ code: 200
17
+ message: OK
18
+ headers:
19
+ content-type:
20
+ - application/vnd.ticketevolution.api+json; version=8; charset=utf-8
21
+ transfer-encoding:
22
+ - chunked
23
+ connection:
24
+ - keep-alive
25
+ status:
26
+ - '200'
27
+ x-powered-by:
28
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
29
+ etag:
30
+ - ! '"6330107c6219647d383c7277d9737b19"'
31
+ x-ua-compatible:
32
+ - IE=Edge,chrome=1
33
+ x-runtime:
34
+ - '0.034541'
35
+ cache-control:
36
+ - max-age=0, private, must-revalidate
37
+ strict-transport-security:
38
+ - max-age=31536000
39
+ server:
40
+ - nginx/1.0.11 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
41
+ body: ! '{"balance":"9922.71","currency":"USD","url":"/accounts/62","id":"62","updated_at":"2012-01-06T17:22:05Z","client":{"name":"Main
42
+ Office","url":"/clients/3","id":"3"}}'
43
+ http_version: '1.1'
44
+ - !ruby/struct:VCR::HTTPInteraction
45
+ request: !ruby/struct:VCR::Request
46
+ method: :get
47
+ uri: https://api.sandbox.ticketevolution.com:443/accounts/62?
48
+ body: !!null
49
+ headers:
50
+ accept:
51
+ - application/vnd.ticketevolution.api+json; version=8
52
+ x-signature:
53
+ - pJI/Zi+UHr/bfyNIT2P604nnFQdEoC6CyuasOGhKP68=
54
+ x-token:
55
+ - b2b5a7a33b1a78896ed1b53d81c5c9cc
56
+ response: !ruby/struct:VCR::Response
57
+ status: !ruby/struct:VCR::ResponseStatus
58
+ code: 200
59
+ message: OK
60
+ headers:
61
+ content-type:
62
+ - application/vnd.ticketevolution.api+json; version=8; charset=utf-8
63
+ transfer-encoding:
64
+ - chunked
65
+ connection:
66
+ - keep-alive
67
+ status:
68
+ - '200'
69
+ x-powered-by:
70
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
71
+ etag:
72
+ - ! '"6330107c6219647d383c7277d9737b19"'
73
+ x-ua-compatible:
74
+ - IE=Edge,chrome=1
75
+ x-runtime:
76
+ - '0.034541'
77
+ cache-control:
78
+ - max-age=0, private, must-revalidate
79
+ strict-transport-security:
80
+ - max-age=31536000
81
+ server:
82
+ - nginx/1.0.11 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
83
+ body: ! '{"balance":"9922.71","currency":"USD","url":"/accounts/62","id":"62","updated_at":"2012-01-06T17:22:05Z","client":{"name":"Main
84
+ Office","url":"/clients/3","id":"3"}}'
85
+ http_version: '1.1'
86
+ - !ruby/struct:VCR::HTTPInteraction
87
+ request: !ruby/struct:VCR::Request
88
+ method: :get
89
+ uri: https://api.sandbox.ticketevolution.com:443/accounts?page=5&per_page=4
90
+ body: !!null
91
+ headers:
92
+ accept:
93
+ - application/vnd.ticketevolution.api+json; version=8
94
+ x-signature:
95
+ - IRAV6eJssE7sFJuoO8Nj0DXWFq2JFdTE1hZnhLwPbnM=
96
+ x-token:
97
+ - b2b5a7a33b1a78896ed1b53d81c5c9cc
98
+ response: !ruby/struct:VCR::Response
99
+ status: !ruby/struct:VCR::ResponseStatus
100
+ code: 200
101
+ message: OK
102
+ headers:
103
+ content-type:
104
+ - application/vnd.ticketevolution.api+json; version=8; charset=utf-8
105
+ transfer-encoding:
106
+ - chunked
107
+ connection:
108
+ - keep-alive
109
+ status:
110
+ - '200'
111
+ x-powered-by:
112
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
113
+ etag:
114
+ - ! '"c727d2d64d106c2bf67305ecff7546ec"'
115
+ x-ua-compatible:
116
+ - IE=Edge,chrome=1
117
+ x-runtime:
118
+ - '0.055059'
119
+ cache-control:
120
+ - max-age=0, private, must-revalidate
121
+ strict-transport-security:
122
+ - max-age=31536000
123
+ server:
124
+ - nginx/1.0.11 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
125
+ body: ! '{"total_entries":88,"accounts":[{"balance":"0.0","currency":"USD","url":"/accounts/3016","id":"3016","updated_at":"2011-08-11T03:13:26Z","client":{"name":"Main
126
+ Office","url":"/clients/1441","id":"1441"}},{"balance":"0.0","currency":"USD","url":"/accounts/3017","id":"3017","updated_at":"2011-08-11T03:13:26Z","client":{"name":"Main
127
+ Office","url":"/clients/1442","id":"1442"}},{"balance":"0.0","currency":"USD","url":"/accounts/3018","id":"3018","updated_at":"2011-08-11T03:13:26Z","client":{"name":"Main
128
+ Office","url":"/clients/1443","id":"1443"}},{"balance":"0.0","currency":"USD","url":"/accounts/3019","id":"3019","updated_at":"2011-08-11T03:13:27Z","client":{"name":"Main
129
+ Office","url":"/clients/1444","id":"1444"}}],"current_page":5,"per_page":4}'
130
+ http_version: '1.1'
131
+ - !ruby/struct:VCR::HTTPInteraction
132
+ request: !ruby/struct:VCR::Request
133
+ method: :get
134
+ uri: https://api.sandbox.ticketevolution.com:443/accounts?page=5&per_page=4
135
+ body: !!null
136
+ headers:
137
+ accept:
138
+ - application/vnd.ticketevolution.api+json; version=8
139
+ x-signature:
140
+ - IRAV6eJssE7sFJuoO8Nj0DXWFq2JFdTE1hZnhLwPbnM=
141
+ x-token:
142
+ - b2b5a7a33b1a78896ed1b53d81c5c9cc
143
+ response: !ruby/struct:VCR::Response
144
+ status: !ruby/struct:VCR::ResponseStatus
145
+ code: 200
146
+ message: OK
147
+ headers:
148
+ content-type:
149
+ - application/vnd.ticketevolution.api+json; version=8; charset=utf-8
150
+ transfer-encoding:
151
+ - chunked
152
+ connection:
153
+ - keep-alive
154
+ status:
155
+ - '200'
156
+ x-powered-by:
157
+ - Phusion Passenger (mod_rails/mod_rack) 3.0.11
158
+ etag:
159
+ - ! '"c727d2d64d106c2bf67305ecff7546ec"'
160
+ x-ua-compatible:
161
+ - IE=Edge,chrome=1
162
+ x-runtime:
163
+ - '0.055059'
164
+ cache-control:
165
+ - max-age=0, private, must-revalidate
166
+ strict-transport-security:
167
+ - max-age=31536000
168
+ server:
169
+ - nginx/1.0.11 + Phusion Passenger 3.0.11 (mod_rails/mod_rack)
170
+ body: ! '{"total_entries":88,"accounts":[{"balance":"0.0","currency":"USD","url":"/accounts/3016","id":"3016","updated_at":"2011-08-11T03:13:26Z","client":{"name":"Main
171
+ Office","url":"/clients/1441","id":"1441"}},{"balance":"0.0","currency":"USD","url":"/accounts/3017","id":"3017","updated_at":"2011-08-11T03:13:26Z","client":{"name":"Main
172
+ Office","url":"/clients/1442","id":"1442"}},{"balance":"0.0","currency":"USD","url":"/accounts/3018","id":"3018","updated_at":"2011-08-11T03:13:26Z","client":{"name":"Main
173
+ Office","url":"/clients/1443","id":"1443"}},{"balance":"0.0","currency":"USD","url":"/accounts/3019","id":"3019","updated_at":"2011-08-11T03:13:27Z","client":{"name":"Main
174
+ Office","url":"/clients/1444","id":"1444"}}],"current_page":5,"per_page":4}'
175
+ http_version: '1.1'