amiando 0.3.9 → 0.3.10
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/amiando.rb +2 -0
- data/lib/amiando/ticket_type.rb +95 -0
- data/lib/amiando/version.rb +1 -1
- data/test/amiando/ticket_type_test.rb +93 -0
- data/test/fixtures/TicketType/300251efae116632a5c68176a6eae4af.yml +60 -0
- data/test/fixtures/TicketType/3fddc8221b0700fbd822212516e433f2.yml +60 -0
- data/test/fixtures/TicketType/42656d14df20971a9a85fd6568b5b2d5.yml +60 -0
- data/test/fixtures/TicketType/691a6b82a08302ca3adfb549e6b661f1.yml +60 -0
- data/test/fixtures/TicketType/9454d2eb8c100a9c5584b858fc608ec9.yml +62 -0
- data/test/fixtures/TicketType/98c2f99677f9091490e1757e7ca17ba3.yml +60 -0
- data/test/fixtures/TicketType/adbe8c5200cc684b766f28c140398f34.yml +60 -0
- data/test/fixtures/TicketType/bb237b60fc58506aede17a85497a1c66.yml +60 -0
- data/test/fixtures/TicketType/bbbdca24f66260547c6effe7bab1aa92.yml +62 -0
- metadata +25 -4
data/lib/amiando.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require "amiando/version"
|
2
2
|
require "typhoeus"
|
3
3
|
require "multi_json"
|
4
|
+
require "ostruct"
|
4
5
|
|
5
6
|
module Amiando
|
6
7
|
autoload :Request, 'amiando/request'
|
@@ -16,6 +17,7 @@ module Amiando
|
|
16
17
|
autoload :TicketCategory, 'amiando/ticket_category'
|
17
18
|
autoload :TicketShop, 'amiando/ticket_shop'
|
18
19
|
autoload :PaymentType, 'amiando/payment_type'
|
20
|
+
autoload :TicketType, 'amiando/ticket_type'
|
19
21
|
|
20
22
|
class Error < StandardError
|
21
23
|
class ServiceDown < Error; end
|
@@ -0,0 +1,95 @@
|
|
1
|
+
module Amiando
|
2
|
+
class TicketType < Resource
|
3
|
+
|
4
|
+
##
|
5
|
+
# Create a ticket type for an event
|
6
|
+
#
|
7
|
+
# @param event_id
|
8
|
+
# @param type string or symbol of the following:
|
9
|
+
# * TICKETTYPE_ETICKET
|
10
|
+
# * TICKETTYPE_PAPER
|
11
|
+
# * TICKETTYPE_BADGE
|
12
|
+
# * TICKETTYPE_CONFIRMATION
|
13
|
+
# * TICKETTYPE_ONSITE
|
14
|
+
#
|
15
|
+
# It will also accept :eticket, :paper, etc and convert them appropriately
|
16
|
+
#
|
17
|
+
def self.create(event_id, type)
|
18
|
+
type = type[:type] if type.is_a?(Hash)
|
19
|
+
|
20
|
+
unless type =~ /^tickettype_\w+/i
|
21
|
+
type = "tickettype_#{type}"
|
22
|
+
end
|
23
|
+
|
24
|
+
object = Result.new do |response_body, result|
|
25
|
+
result.errors = response_body['errors']
|
26
|
+
response_body['id'] || false
|
27
|
+
end
|
28
|
+
|
29
|
+
post object, "api/event/#{event_id}/ticketType/create", :params => { :type => type.upcase }
|
30
|
+
|
31
|
+
object
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Find all Ticket Types of an event
|
36
|
+
#
|
37
|
+
# @param event_id
|
38
|
+
#
|
39
|
+
# @return [Result] with the list of ticket types for that event.
|
40
|
+
def self.find_all_by_event_id(event_id)
|
41
|
+
object = Result.new do |response_body, result|
|
42
|
+
if response_body['success']
|
43
|
+
ticket_types = response_body['results']['ticketTypes'].map do |ticket_type|
|
44
|
+
new(ticket_type)
|
45
|
+
end
|
46
|
+
|
47
|
+
available = response_body['results']['availableTicketTypes']
|
48
|
+
|
49
|
+
OpenStruct.new(:ticket_types => ticket_types,
|
50
|
+
:available_ticket_types => available)
|
51
|
+
else
|
52
|
+
result.errors = response_body['errors']
|
53
|
+
false
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
get object, "api/event/#{event_id}/ticketTypes"
|
58
|
+
|
59
|
+
object
|
60
|
+
end
|
61
|
+
|
62
|
+
##
|
63
|
+
# Find a Ticket Type
|
64
|
+
#
|
65
|
+
# @param ticket_type_id
|
66
|
+
#
|
67
|
+
# @return [TicketType] the ticket type with that id
|
68
|
+
def self.find(ticket_type_id)
|
69
|
+
object = new
|
70
|
+
get object, "api/ticketType/#{ticket_type_id}"
|
71
|
+
|
72
|
+
object
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# Update a ticket type
|
77
|
+
#
|
78
|
+
# @param ticket_type_id
|
79
|
+
# @param [Hash] attributes attributes to be updated
|
80
|
+
#
|
81
|
+
# @return [Boolean] result of the operation
|
82
|
+
def self.update(ticket_type_id, attributes)
|
83
|
+
object = Boolean.new('success')
|
84
|
+
post object, "api/ticketType/#{ticket_type_id}", :params => attributes
|
85
|
+
|
86
|
+
object
|
87
|
+
end
|
88
|
+
|
89
|
+
protected
|
90
|
+
|
91
|
+
def populate(response_body)
|
92
|
+
extract_attributes_from(response_body, 'ticketType')
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
data/lib/amiando/version.rb
CHANGED
@@ -0,0 +1,93 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
describe Amiando::TicketType do
|
4
|
+
before do
|
5
|
+
HydraCache.prefix = 'TicketType'
|
6
|
+
end
|
7
|
+
|
8
|
+
after do
|
9
|
+
HydraCache.prefix = nil
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:event) { Amiando::Factory.create(:event, :country => 'de') }
|
13
|
+
|
14
|
+
describe 'create' do
|
15
|
+
it 'handles already existing types' do
|
16
|
+
ticket_type = Amiando::TicketType.create(event.id, :paper)
|
17
|
+
Amiando.run
|
18
|
+
|
19
|
+
ticket_type.result.must_equal false
|
20
|
+
ticket_type.errors.must_include "com.amiando.api.rest.ticketType.TicketTypeAlreadyExists"
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'handles non available ticket types' do
|
24
|
+
ticket_type = Amiando::TicketType.create(event.id, :badge)
|
25
|
+
Amiando.run
|
26
|
+
|
27
|
+
ticket_type.result.must_equal false
|
28
|
+
ticket_type.errors.must_include "com.amiando.api.rest.ticketType.TicketTypeNotAllowed"
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should accept a Hash as a param' do
|
32
|
+
ticket_type = Amiando::TicketType.create(event.id, :type => :eticket)
|
33
|
+
ticket_type.request.params.must_equal(:type => "TICKETTYPE_ETICKET")
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'should accept a ticket string as a param' do
|
37
|
+
ticket_type = Amiando::TicketType.create(event.id, :type => "TICKETTYPE_ETICKET")
|
38
|
+
ticket_type.request.params.must_equal(:type => "TICKETTYPE_ETICKET")
|
39
|
+
end
|
40
|
+
|
41
|
+
it 'should accept a short string as a param' do
|
42
|
+
ticket_type = Amiando::TicketType.create(event.id, "ETICKET")
|
43
|
+
ticket_type.request.params.must_equal(:type => "TICKETTYPE_ETICKET")
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'find' do
|
48
|
+
it 'finds a ticket type given the id' do
|
49
|
+
ticket_types = Amiando::TicketType.sync_find_all_by_event_id(event.id)
|
50
|
+
|
51
|
+
ticket_type_id = ticket_types.result.ticket_types.first.id
|
52
|
+
|
53
|
+
ticket_type = Amiando::TicketType.find(ticket_type_id)
|
54
|
+
Amiando.run
|
55
|
+
|
56
|
+
ticket_type.id.must_equal ticket_type_id
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
describe 'find_all_by_event_id' do
|
61
|
+
it 'finds the ticket types given an event' do
|
62
|
+
ticket_types = Amiando::TicketType.find_all_by_event_id(event.id)
|
63
|
+
Amiando.run
|
64
|
+
|
65
|
+
ticket_types.result.ticket_types.each { |t| t.must_be_kind_of(Amiando::TicketType) }
|
66
|
+
ticket_types.result.available_ticket_types.must_equal ["TICKETTYPE_PAPER", "TICKETTYPE_ETICKET"]
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe 'update' do
|
71
|
+
it 'updates the given attributes' do
|
72
|
+
event = Amiando::Factory.create(:event, :name => "ticket-type-update-#{HydraCache.revision}")
|
73
|
+
ticket_types = Amiando::TicketType.sync_find_all_by_event_id(event.id)
|
74
|
+
ticket_type_id = ticket_types.result.ticket_types.first.id
|
75
|
+
|
76
|
+
update = Amiando::TicketType.update(ticket_type_id, :active => false)
|
77
|
+
Amiando.run
|
78
|
+
|
79
|
+
update.result.must_equal true
|
80
|
+
|
81
|
+
ticket_type = Amiando::TicketType.sync_find(ticket_type_id)
|
82
|
+
ticket_type.active.must_equal false
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
describe 'type' do
|
87
|
+
it 'returns the amiando type string' do
|
88
|
+
ticket_type = Amiando::TicketType.new(:type => 'TICKETTYPE_ETICKET')
|
89
|
+
ticket_type.type.must_equal 'TICKETTYPE_ETICKET'
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
end
|
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 0.014318
|
3
|
+
body: "{\"success\":true}"
|
4
|
+
code: 200
|
5
|
+
connect_time: 0.014318
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/ticketType/302993?version=1&format=json&apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0
|
9
|
+
first_header_line: HTTP/1.1 200 OK
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 200 OK
|
12
|
+
Date: Mon, 30 Jan 2012 10:35:16 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=FCA5CE7C54541482D18643C7E6B65A71.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=FCA5CE7C54541482D18643C7E6B65A71.web01; Path=/
|
16
|
+
accept-charset: utf-8
|
17
|
+
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
18
|
+
Access-Control-Allow-Origin: *
|
19
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
20
|
+
Set-Cookie: ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=WXBzUnNvbDdIZkh1TDVEWjoxMzI5MTI5NjY2ODM4OjkwMWJmYWJjNTA4NmQxZWY0NTYxM2YzNGI2OTk2Njkx; Expires=Sat, 28-Jan-2017 10:41:06 GMT; Path=/
|
21
|
+
Accept-Ranges: bytes
|
22
|
+
Cache-Control: max-age=7200
|
23
|
+
Expires: Mon, 30 Jan 2012 12:35:16 GMT
|
24
|
+
Vary: User-Agent
|
25
|
+
Transfer-Encoding: chunked
|
26
|
+
Content-Type: application/json;charset=UTF-8
|
27
|
+
|
28
|
+
|
29
|
+
headers_hash: !map:Typhoeus::NormalizedHeaderHash
|
30
|
+
Vary: User-Agent
|
31
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
32
|
+
P3p: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
33
|
+
Transfer-Encoding: chunked
|
34
|
+
Access-Control-Allow-Origin: "*"
|
35
|
+
Content-Type: application/json;charset=UTF-8
|
36
|
+
Date: Mon, 30 Jan 2012 10:35:16 GMT
|
37
|
+
Accept-Ranges: bytes
|
38
|
+
Server: Apache/2.0.55 (Red Hat)
|
39
|
+
Set-Cookie:
|
40
|
+
- JSESSIONID=FCA5CE7C54541482D18643C7E6B65A71.web01; Path=/; Secure
|
41
|
+
- JSESSIONID=FCA5CE7C54541482D18643C7E6B65A71.web01; Path=/
|
42
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=WXBzUnNvbDdIZkh1TDVEWjoxMzI5MTI5NjY2ODM4OjkwMWJmYWJjNTA4NmQxZWY0NTYxM2YzNGI2OTk2Njkx; Expires=Sat, 28-Jan-2017 10:41:06 GMT; Path=/
|
43
|
+
Expires: Mon, 30 Jan 2012 12:35:16 GMT
|
44
|
+
Cache-Control: max-age=7200
|
45
|
+
Accept-Charset: utf-8
|
46
|
+
http_version:
|
47
|
+
mock: false
|
48
|
+
name_lookup_time: 0.014317
|
49
|
+
pretransfer_time: 0.014348
|
50
|
+
primary_ip: 213.61.176.214
|
51
|
+
request: |-
|
52
|
+
:method => :post,
|
53
|
+
:url => https://test.amiando.com/api/ticketType/302993?version=1&format=json&apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0,
|
54
|
+
:params => {:active=>false}
|
55
|
+
requested_http_method:
|
56
|
+
requested_url:
|
57
|
+
start_time:
|
58
|
+
start_transfer_time: 0.108987
|
59
|
+
status_message: OK
|
60
|
+
time: 0.109019
|
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 0.279198
|
3
|
+
body: "{\"id\":440340,\"success\":true}"
|
4
|
+
code: 201
|
5
|
+
connect_time: 0.060921
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/event/create?version=1&format=json&apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0
|
9
|
+
first_header_line: HTTP/1.1 201 Created
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 201 Created
|
12
|
+
Date: Mon, 30 Jan 2012 10:35:15 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=3050B5424438F8CF9CBCB66749DAECD6.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=3050B5424438F8CF9CBCB66749DAECD6.web01; Path=/
|
16
|
+
accept-charset: utf-8
|
17
|
+
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
18
|
+
Access-Control-Allow-Origin: *
|
19
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
20
|
+
Set-Cookie: ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=Y1RabHNqN29yeURvY3AzTjoxMzI5MTI5NjY1ODY1OjFjZDdlZDA5YTQwZjBjZjNlNjk4OTQxOTJhYzlkMjAw; Expires=Sat, 28-Jan-2017 10:41:05 GMT; Path=/
|
21
|
+
Accept-Ranges: bytes
|
22
|
+
Cache-Control: max-age=7200
|
23
|
+
Expires: Mon, 30 Jan 2012 12:35:15 GMT
|
24
|
+
Vary: User-Agent
|
25
|
+
Transfer-Encoding: chunked
|
26
|
+
Content-Type: application/json;charset=UTF-8
|
27
|
+
|
28
|
+
|
29
|
+
headers_hash: !map:Typhoeus::NormalizedHeaderHash
|
30
|
+
Vary: User-Agent
|
31
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
32
|
+
P3p: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
33
|
+
Transfer-Encoding: chunked
|
34
|
+
Access-Control-Allow-Origin: "*"
|
35
|
+
Content-Type: application/json;charset=UTF-8
|
36
|
+
Date: Mon, 30 Jan 2012 10:35:15 GMT
|
37
|
+
Accept-Ranges: bytes
|
38
|
+
Server: Apache/2.0.55 (Red Hat)
|
39
|
+
Set-Cookie:
|
40
|
+
- JSESSIONID=3050B5424438F8CF9CBCB66749DAECD6.web01; Path=/; Secure
|
41
|
+
- JSESSIONID=3050B5424438F8CF9CBCB66749DAECD6.web01; Path=/
|
42
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=Y1RabHNqN29yeURvY3AzTjoxMzI5MTI5NjY1ODY1OjFjZDdlZDA5YTQwZjBjZjNlNjk4OTQxOTJhYzlkMjAw; Expires=Sat, 28-Jan-2017 10:41:05 GMT; Path=/
|
43
|
+
Expires: Mon, 30 Jan 2012 12:35:15 GMT
|
44
|
+
Cache-Control: max-age=7200
|
45
|
+
Accept-Charset: utf-8
|
46
|
+
http_version:
|
47
|
+
mock: false
|
48
|
+
name_lookup_time: 0.002425
|
49
|
+
pretransfer_time: 0.279201
|
50
|
+
primary_ip: 213.61.176.214
|
51
|
+
request: |-
|
52
|
+
:method => :post,
|
53
|
+
:url => https://test.amiando.com/api/event/create?version=1&format=json&apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0,
|
54
|
+
:params => {:hostId=>256142421, :title=>"Secret title", :selectedDate=>"1970-01-01T00:00:00Z", :country=>"es", :name=>"ticket-type-update-2"}
|
55
|
+
requested_http_method:
|
56
|
+
requested_url:
|
57
|
+
start_time:
|
58
|
+
start_transfer_time: 1.057993
|
59
|
+
status_message: Created
|
60
|
+
time: 1.058044
|
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 2.6e-05
|
3
|
+
body: "{\"results\":{\"availableTicketTypes\":[\"TICKETTYPE_PAPER\",\"TICKETTYPE_ETICKET\"],\"ticketTypes\":[{\"id\":302993,\"active\":true,\"type\":\"TICKETTYPE_ETICKET\"},{\"id\":302992,\"active\":true,\"type\":\"TICKETTYPE_PAPER\"}]},\"success\":true}"
|
4
|
+
code: 200
|
5
|
+
connect_time: 2.5e-05
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/event/440340/ticketTypes?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&format=json&version=1
|
9
|
+
first_header_line: HTTP/1.1 200 OK
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 200 OK
|
12
|
+
Date: Mon, 30 Jan 2012 10:35:16 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=CFCCAFF6EB2485CCB79B0C1AE0BFB93E.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=CFCCAFF6EB2485CCB79B0C1AE0BFB93E.web01; Path=/
|
16
|
+
accept-charset: utf-8
|
17
|
+
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
18
|
+
Access-Control-Allow-Origin: *
|
19
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
20
|
+
Set-Cookie: ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=enBpcVVRUEZtWlJRd0lEdToxMzI5MTI5NjY2NzE4OmY0NzI0MTgwNjY3NjE0NmNlMGM4ZmVjNjI4MTBjZjEy; Expires=Sat, 28-Jan-2017 10:41:06 GMT; Path=/
|
21
|
+
Vary: Accept-Charset,Accept-Encoding,Accept-Language,Accept,User-Agent
|
22
|
+
Accept-Ranges: bytes
|
23
|
+
Cache-Control: max-age=7200
|
24
|
+
Expires: Mon, 30 Jan 2012 12:35:16 GMT
|
25
|
+
Transfer-Encoding: chunked
|
26
|
+
Content-Type: application/json;charset=UTF-8
|
27
|
+
|
28
|
+
|
29
|
+
headers_hash: !map:Typhoeus::NormalizedHeaderHash
|
30
|
+
Vary: Accept-Charset,Accept-Encoding,Accept-Language,Accept,User-Agent
|
31
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
32
|
+
P3p: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
33
|
+
Transfer-Encoding: chunked
|
34
|
+
Access-Control-Allow-Origin: "*"
|
35
|
+
Content-Type: application/json;charset=UTF-8
|
36
|
+
Date: Mon, 30 Jan 2012 10:35:16 GMT
|
37
|
+
Accept-Ranges: bytes
|
38
|
+
Server: Apache/2.0.55 (Red Hat)
|
39
|
+
Set-Cookie:
|
40
|
+
- JSESSIONID=CFCCAFF6EB2485CCB79B0C1AE0BFB93E.web01; Path=/; Secure
|
41
|
+
- JSESSIONID=CFCCAFF6EB2485CCB79B0C1AE0BFB93E.web01; Path=/
|
42
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=enBpcVVRUEZtWlJRd0lEdToxMzI5MTI5NjY2NzE4OmY0NzI0MTgwNjY3NjE0NmNlMGM4ZmVjNjI4MTBjZjEy; Expires=Sat, 28-Jan-2017 10:41:06 GMT; Path=/
|
43
|
+
Expires: Mon, 30 Jan 2012 12:35:16 GMT
|
44
|
+
Cache-Control: max-age=7200
|
45
|
+
Accept-Charset: utf-8
|
46
|
+
http_version:
|
47
|
+
mock: false
|
48
|
+
name_lookup_time: 2.5e-05
|
49
|
+
pretransfer_time: 0.063049
|
50
|
+
primary_ip: 213.61.176.214
|
51
|
+
request: |-
|
52
|
+
:method => :get,
|
53
|
+
:url => https://test.amiando.com/api/event/440340/ticketTypes?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&format=json&version=1,
|
54
|
+
:params => {:version=>1, :format=>:json, :apikey=>"EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0"}
|
55
|
+
requested_http_method:
|
56
|
+
requested_url:
|
57
|
+
start_time:
|
58
|
+
start_transfer_time: 0.143496
|
59
|
+
status_message: OK
|
60
|
+
time: 0.143546
|
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 0.23754
|
3
|
+
body: "{\"id\":440339,\"success\":true}"
|
4
|
+
code: 201
|
5
|
+
connect_time: 0.060323
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/event/create?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&version=1&format=json
|
9
|
+
first_header_line: HTTP/1.1 201 Created
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 201 Created
|
12
|
+
Date: Mon, 30 Jan 2012 10:14:02 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=EDBCD166C550F33FDD273AC0163359F0.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=EDBCD166C550F33FDD273AC0163359F0.web01; Path=/
|
16
|
+
accept-charset: utf-8
|
17
|
+
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
18
|
+
Access-Control-Allow-Origin: *
|
19
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
20
|
+
Set-Cookie: ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=R3UxUmx0YTg1R211MmpFajoxMzI5MTI4MzkyODcyOjYyMDllODY2NWY5OTE2MjgxNGY3ZDNlMWY2ZDViYzQ3; Expires=Sat, 28-Jan-2017 10:19:52 GMT; Path=/
|
21
|
+
Accept-Ranges: bytes
|
22
|
+
Cache-Control: max-age=7200
|
23
|
+
Expires: Mon, 30 Jan 2012 12:14:02 GMT
|
24
|
+
Vary: User-Agent
|
25
|
+
Transfer-Encoding: chunked
|
26
|
+
Content-Type: application/json;charset=UTF-8
|
27
|
+
|
28
|
+
|
29
|
+
headers_hash: !map:Typhoeus::NormalizedHeaderHash
|
30
|
+
Vary: User-Agent
|
31
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
32
|
+
P3p: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
33
|
+
Transfer-Encoding: chunked
|
34
|
+
Access-Control-Allow-Origin: "*"
|
35
|
+
Content-Type: application/json;charset=UTF-8
|
36
|
+
Date: Mon, 30 Jan 2012 10:14:02 GMT
|
37
|
+
Accept-Ranges: bytes
|
38
|
+
Server: Apache/2.0.55 (Red Hat)
|
39
|
+
Set-Cookie:
|
40
|
+
- JSESSIONID=EDBCD166C550F33FDD273AC0163359F0.web01; Path=/; Secure
|
41
|
+
- JSESSIONID=EDBCD166C550F33FDD273AC0163359F0.web01; Path=/
|
42
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=R3UxUmx0YTg1R211MmpFajoxMzI5MTI4MzkyODcyOjYyMDllODY2NWY5OTE2MjgxNGY3ZDNlMWY2ZDViYzQ3; Expires=Sat, 28-Jan-2017 10:19:52 GMT; Path=/
|
43
|
+
Expires: Mon, 30 Jan 2012 12:14:02 GMT
|
44
|
+
Cache-Control: max-age=7200
|
45
|
+
Accept-Charset: utf-8
|
46
|
+
http_version:
|
47
|
+
mock: false
|
48
|
+
name_lookup_time: 0.002525
|
49
|
+
pretransfer_time: 0.237544
|
50
|
+
primary_ip: 213.61.176.214
|
51
|
+
request: |-
|
52
|
+
:method => :post,
|
53
|
+
:url => https://test.amiando.com/api/event/create?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&version=1&format=json,
|
54
|
+
:params => {:hostId=>256142421, :selectedDate=>"1970-01-01T00:00:00Z", :country=>"de", :title=>"Secret title"}
|
55
|
+
requested_http_method:
|
56
|
+
requested_url:
|
57
|
+
start_time:
|
58
|
+
start_transfer_time: 1.045438
|
59
|
+
status_message: Created
|
60
|
+
time: 1.045514
|
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 0.235466
|
3
|
+
body: "{\"errors\":[\"com.amiando.api.rest.ticketType.TicketTypeAlreadyExists\"],\"success\":false}"
|
4
|
+
code: 400
|
5
|
+
connect_time: 0.061126
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/event/440339/ticketType/create?version=1&format=json&apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0
|
9
|
+
first_header_line: HTTP/1.1 400 Bad Request
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 400 Bad Request
|
12
|
+
Date: Mon, 30 Jan 2012 10:42:59 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=38781474845416CCE075AB8A4F6CB228.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=38781474845416CCE075AB8A4F6CB228.web01; Path=/
|
16
|
+
accept-charset: utf-8
|
17
|
+
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
18
|
+
Access-Control-Allow-Origin: *
|
19
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
20
|
+
Set-Cookie: ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=Y053U1p4OWNGNHdqU01mSzoxMzI5MTMwMTMwMTcyOjE3NjJkMDc5Mzc5NTAxNDRjNGEzNjMzM2ZjMzc5MmRh; Expires=Sat, 28-Jan-2017 10:48:50 GMT; Path=/
|
21
|
+
Accept-Ranges: bytes
|
22
|
+
Cache-Control: max-age=7200
|
23
|
+
Expires: Mon, 30 Jan 2012 12:42:59 GMT
|
24
|
+
Vary: User-Agent
|
25
|
+
Connection: close
|
26
|
+
Transfer-Encoding: chunked
|
27
|
+
Content-Type: application/json;charset=UTF-8
|
28
|
+
|
29
|
+
|
30
|
+
headers_hash: !map:Typhoeus::NormalizedHeaderHash
|
31
|
+
Vary: User-Agent
|
32
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
33
|
+
P3p: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
34
|
+
Transfer-Encoding: chunked
|
35
|
+
Access-Control-Allow-Origin: "*"
|
36
|
+
Content-Type: application/json;charset=UTF-8
|
37
|
+
Date: Mon, 30 Jan 2012 10:42:59 GMT
|
38
|
+
Accept-Ranges: bytes
|
39
|
+
Server: Apache/2.0.55 (Red Hat)
|
40
|
+
Set-Cookie:
|
41
|
+
- JSESSIONID=38781474845416CCE075AB8A4F6CB228.web01; Path=/; Secure
|
42
|
+
- JSESSIONID=38781474845416CCE075AB8A4F6CB228.web01; Path=/
|
43
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=Y053U1p4OWNGNHdqU01mSzoxMzI5MTMwMTMwMTcyOjE3NjJkMDc5Mzc5NTAxNDRjNGEzNjMzM2ZjMzc5MmRh; Expires=Sat, 28-Jan-2017 10:48:50 GMT; Path=/
|
44
|
+
Expires: Mon, 30 Jan 2012 12:42:59 GMT
|
45
|
+
Cache-Control: max-age=7200
|
46
|
+
Accept-Charset: utf-8
|
47
|
+
Connection: close
|
48
|
+
http_version:
|
49
|
+
mock: false
|
50
|
+
name_lookup_time: 0.002713
|
51
|
+
pretransfer_time: 0.235468
|
52
|
+
primary_ip: 213.61.176.214
|
53
|
+
request: |-
|
54
|
+
:method => :post,
|
55
|
+
:url => https://test.amiando.com/api/event/440339/ticketType/create?version=1&format=json&apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0,
|
56
|
+
:params => {:type=>"TICKETTYPE_PAPER"}
|
57
|
+
requested_http_method:
|
58
|
+
requested_url:
|
59
|
+
start_time:
|
60
|
+
start_transfer_time: 0.307298
|
61
|
+
status_message: Bad Request
|
62
|
+
time: 0.307331
|
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 0.552323
|
3
|
+
body: "{\"ticketType\":{\"id\":302991,\"active\":true,\"type\":\"TICKETTYPE_ETICKET\"},\"success\":true}"
|
4
|
+
code: 200
|
5
|
+
connect_time: 0.062146
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/ticketType/302991?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&format=json&version=1
|
9
|
+
first_header_line: HTTP/1.1 200 OK
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 200 OK
|
12
|
+
Date: Mon, 30 Jan 2012 10:32:30 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=5CE75BFB47AD21EF159E088A033DEF08.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=5CE75BFB47AD21EF159E088A033DEF08.web01; Path=/
|
16
|
+
accept-charset: utf-8
|
17
|
+
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
18
|
+
Access-Control-Allow-Origin: *
|
19
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
20
|
+
Set-Cookie: ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=YnlDM0czUEswOUxHaDhFYzoxMzI5MTI5NTAwNzUzOjhjYjQ5MDZmOTdhZjNkMmVmMjdhYzc3ZDU2NmEwNGMw; Expires=Sat, 28-Jan-2017 10:38:20 GMT; Path=/
|
21
|
+
Vary: Accept-Charset,Accept-Encoding,Accept-Language,Accept,User-Agent
|
22
|
+
Accept-Ranges: bytes
|
23
|
+
Cache-Control: max-age=7200
|
24
|
+
Expires: Mon, 30 Jan 2012 12:32:30 GMT
|
25
|
+
Transfer-Encoding: chunked
|
26
|
+
Content-Type: application/json;charset=UTF-8
|
27
|
+
|
28
|
+
|
29
|
+
headers_hash: !map:Typhoeus::NormalizedHeaderHash
|
30
|
+
Vary: Accept-Charset,Accept-Encoding,Accept-Language,Accept,User-Agent
|
31
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
32
|
+
P3p: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
33
|
+
Transfer-Encoding: chunked
|
34
|
+
Access-Control-Allow-Origin: "*"
|
35
|
+
Content-Type: application/json;charset=UTF-8
|
36
|
+
Date: Mon, 30 Jan 2012 10:32:30 GMT
|
37
|
+
Accept-Ranges: bytes
|
38
|
+
Server: Apache/2.0.55 (Red Hat)
|
39
|
+
Set-Cookie:
|
40
|
+
- JSESSIONID=5CE75BFB47AD21EF159E088A033DEF08.web01; Path=/; Secure
|
41
|
+
- JSESSIONID=5CE75BFB47AD21EF159E088A033DEF08.web01; Path=/
|
42
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=YnlDM0czUEswOUxHaDhFYzoxMzI5MTI5NTAwNzUzOjhjYjQ5MDZmOTdhZjNkMmVmMjdhYzc3ZDU2NmEwNGMw; Expires=Sat, 28-Jan-2017 10:38:20 GMT; Path=/
|
43
|
+
Expires: Mon, 30 Jan 2012 12:32:30 GMT
|
44
|
+
Cache-Control: max-age=7200
|
45
|
+
Accept-Charset: utf-8
|
46
|
+
http_version:
|
47
|
+
mock: false
|
48
|
+
name_lookup_time: 0.002555
|
49
|
+
pretransfer_time: 0.552326
|
50
|
+
primary_ip: 213.61.176.214
|
51
|
+
request: |-
|
52
|
+
:method => :get,
|
53
|
+
:url => https://test.amiando.com/api/ticketType/302991?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&format=json&version=1,
|
54
|
+
:params => {:version=>1, :format=>:json, :apikey=>"EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0"}
|
55
|
+
requested_http_method:
|
56
|
+
requested_url:
|
57
|
+
start_time:
|
58
|
+
start_transfer_time: 0.643782
|
59
|
+
status_message: OK
|
60
|
+
time: 0.643816
|
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 3.4e-05
|
3
|
+
body: "{\"ticketType\":{\"id\":302993,\"active\":false,\"type\":\"TICKETTYPE_ETICKET\"},\"success\":true}"
|
4
|
+
code: 200
|
5
|
+
connect_time: 3.4e-05
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/ticketType/302993?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&format=json&version=1
|
9
|
+
first_header_line: HTTP/1.1 200 OK
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 200 OK
|
12
|
+
Date: Mon, 30 Jan 2012 10:35:16 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=D3634188DDA22B44DF9BE6EEBF06EC12.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=D3634188DDA22B44DF9BE6EEBF06EC12.web01; Path=/
|
16
|
+
accept-charset: utf-8
|
17
|
+
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
18
|
+
Access-Control-Allow-Origin: *
|
19
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
20
|
+
Set-Cookie: ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=c0toMUxDblpvOGwzRjh6UzoxMzI5MTI5NjY2OTc2OmFhOWE2MjI1ZTEwYmU1Y2IyYTJkNTVhMWNjM2EzZWUw; Expires=Sat, 28-Jan-2017 10:41:06 GMT; Path=/
|
21
|
+
Vary: Accept-Charset,Accept-Encoding,Accept-Language,Accept,User-Agent
|
22
|
+
Accept-Ranges: bytes
|
23
|
+
Cache-Control: max-age=7200
|
24
|
+
Expires: Mon, 30 Jan 2012 12:35:16 GMT
|
25
|
+
Transfer-Encoding: chunked
|
26
|
+
Content-Type: application/json;charset=UTF-8
|
27
|
+
|
28
|
+
|
29
|
+
headers_hash: !map:Typhoeus::NormalizedHeaderHash
|
30
|
+
Vary: Accept-Charset,Accept-Encoding,Accept-Language,Accept,User-Agent
|
31
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
32
|
+
P3p: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
33
|
+
Transfer-Encoding: chunked
|
34
|
+
Access-Control-Allow-Origin: "*"
|
35
|
+
Content-Type: application/json;charset=UTF-8
|
36
|
+
Date: Mon, 30 Jan 2012 10:35:16 GMT
|
37
|
+
Accept-Ranges: bytes
|
38
|
+
Server: Apache/2.0.55 (Red Hat)
|
39
|
+
Set-Cookie:
|
40
|
+
- JSESSIONID=D3634188DDA22B44DF9BE6EEBF06EC12.web01; Path=/; Secure
|
41
|
+
- JSESSIONID=D3634188DDA22B44DF9BE6EEBF06EC12.web01; Path=/
|
42
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=c0toMUxDblpvOGwzRjh6UzoxMzI5MTI5NjY2OTc2OmFhOWE2MjI1ZTEwYmU1Y2IyYTJkNTVhMWNjM2EzZWUw; Expires=Sat, 28-Jan-2017 10:41:06 GMT; Path=/
|
43
|
+
Expires: Mon, 30 Jan 2012 12:35:16 GMT
|
44
|
+
Cache-Control: max-age=7200
|
45
|
+
Accept-Charset: utf-8
|
46
|
+
http_version:
|
47
|
+
mock: false
|
48
|
+
name_lookup_time: 3.4e-05
|
49
|
+
pretransfer_time: 0.036632
|
50
|
+
primary_ip: 213.61.176.214
|
51
|
+
request: |-
|
52
|
+
:method => :get,
|
53
|
+
:url => https://test.amiando.com/api/ticketType/302993?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&format=json&version=1,
|
54
|
+
:params => {:version=>1, :format=>:json, :apikey=>"EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0"}
|
55
|
+
requested_http_method:
|
56
|
+
requested_url:
|
57
|
+
start_time:
|
58
|
+
start_transfer_time: 0.104807
|
59
|
+
status_message: OK
|
60
|
+
time: 0.104847
|
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 0.114731
|
3
|
+
body: "{\"results\":{\"availableTicketTypes\":[\"TICKETTYPE_PAPER\",\"TICKETTYPE_ETICKET\"],\"ticketTypes\":[{\"id\":302991,\"active\":true,\"type\":\"TICKETTYPE_ETICKET\"},{\"id\":302990,\"active\":true,\"type\":\"TICKETTYPE_PAPER\"}]},\"success\":true}"
|
4
|
+
code: 200
|
5
|
+
connect_time: 0.059734
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/event/440339/ticketTypes?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&format=json&version=1
|
9
|
+
first_header_line: HTTP/1.1 200 OK
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 200 OK
|
12
|
+
Date: Mon, 30 Jan 2012 10:15:07 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=C5873E04AC7A7A49EEE8D51EF05956EB.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=C5873E04AC7A7A49EEE8D51EF05956EB.web01; Path=/
|
16
|
+
accept-charset: utf-8
|
17
|
+
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
18
|
+
Access-Control-Allow-Origin: *
|
19
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
20
|
+
Set-Cookie: ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=TDlud1o4RFFxR1dpNzB5ejoxMzI5MTI4NDU4MjMzOmYxYWFkMjI2YjlmOTQyZmY0OTY5Y2IwNDc3MDdlZGE0; Expires=Sat, 28-Jan-2017 10:20:58 GMT; Path=/
|
21
|
+
Vary: Accept-Charset,Accept-Encoding,Accept-Language,Accept,User-Agent
|
22
|
+
Accept-Ranges: bytes
|
23
|
+
Cache-Control: max-age=7200
|
24
|
+
Expires: Mon, 30 Jan 2012 12:15:07 GMT
|
25
|
+
Transfer-Encoding: chunked
|
26
|
+
Content-Type: application/json;charset=UTF-8
|
27
|
+
|
28
|
+
|
29
|
+
headers_hash: !map:Typhoeus::NormalizedHeaderHash
|
30
|
+
Vary: Accept-Charset,Accept-Encoding,Accept-Language,Accept,User-Agent
|
31
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
32
|
+
P3p: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
33
|
+
Transfer-Encoding: chunked
|
34
|
+
Access-Control-Allow-Origin: "*"
|
35
|
+
Content-Type: application/json;charset=UTF-8
|
36
|
+
Date: Mon, 30 Jan 2012 10:15:07 GMT
|
37
|
+
Accept-Ranges: bytes
|
38
|
+
Server: Apache/2.0.55 (Red Hat)
|
39
|
+
Set-Cookie:
|
40
|
+
- JSESSIONID=C5873E04AC7A7A49EEE8D51EF05956EB.web01; Path=/; Secure
|
41
|
+
- JSESSIONID=C5873E04AC7A7A49EEE8D51EF05956EB.web01; Path=/
|
42
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=TDlud1o4RFFxR1dpNzB5ejoxMzI5MTI4NDU4MjMzOmYxYWFkMjI2YjlmOTQyZmY0OTY5Y2IwNDc3MDdlZGE0; Expires=Sat, 28-Jan-2017 10:20:58 GMT; Path=/
|
43
|
+
Expires: Mon, 30 Jan 2012 12:15:07 GMT
|
44
|
+
Cache-Control: max-age=7200
|
45
|
+
Accept-Charset: utf-8
|
46
|
+
http_version:
|
47
|
+
mock: false
|
48
|
+
name_lookup_time: 0.002571
|
49
|
+
pretransfer_time: 0.114735
|
50
|
+
primary_ip: 213.61.176.214
|
51
|
+
request: |-
|
52
|
+
:method => :get,
|
53
|
+
:url => https://test.amiando.com/api/event/440339/ticketTypes?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&format=json&version=1,
|
54
|
+
:params => {:apikey=>"EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0", :version=>1, :format=>:json}
|
55
|
+
requested_http_method:
|
56
|
+
requested_url:
|
57
|
+
start_time:
|
58
|
+
start_transfer_time: 0.289408
|
59
|
+
status_message: OK
|
60
|
+
time: 0.289459
|
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 3.6e-05
|
3
|
+
body: "{\"errors\":[\"com.amiando.api.rest.ticketType.TicketTypeNotAllowed\"],\"success\":false}"
|
4
|
+
code: 400
|
5
|
+
connect_time: 3.6e-05
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/event/440339/ticketType/create?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&version=1&format=json
|
9
|
+
first_header_line: HTTP/1.1 400 Bad Request
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 400 Bad Request
|
12
|
+
Date: Mon, 30 Jan 2012 10:14:03 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=A17816EB873C3E3861CBF355426DA392.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=A17816EB873C3E3861CBF355426DA392.web01; Path=/
|
16
|
+
accept-charset: utf-8
|
17
|
+
P3P: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
18
|
+
Access-Control-Allow-Origin: *
|
19
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
20
|
+
Set-Cookie: ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=Yloza25MdUhOQnlhMjZGZjoxMzI5MTI4MzkzNzM0OjNjMjk2NjYwMTY2Mjc0MDJlOGNiNDNhOTNlZGIzNTM4; Expires=Sat, 28-Jan-2017 10:19:53 GMT; Path=/
|
21
|
+
Accept-Ranges: bytes
|
22
|
+
Cache-Control: max-age=7200
|
23
|
+
Expires: Mon, 30 Jan 2012 12:14:03 GMT
|
24
|
+
Vary: User-Agent
|
25
|
+
Connection: close
|
26
|
+
Transfer-Encoding: chunked
|
27
|
+
Content-Type: application/json;charset=UTF-8
|
28
|
+
|
29
|
+
|
30
|
+
headers_hash: !map:Typhoeus::NormalizedHeaderHash
|
31
|
+
Vary: User-Agent
|
32
|
+
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE, PUT
|
33
|
+
P3p: policyref="/w3c/p3p.xml", CP="CAO DSP COR CUR ADM DEV TAI PSA PSD CON OUR IND UNI PUR COM CNT"
|
34
|
+
Transfer-Encoding: chunked
|
35
|
+
Access-Control-Allow-Origin: "*"
|
36
|
+
Content-Type: application/json;charset=UTF-8
|
37
|
+
Date: Mon, 30 Jan 2012 10:14:03 GMT
|
38
|
+
Accept-Ranges: bytes
|
39
|
+
Server: Apache/2.0.55 (Red Hat)
|
40
|
+
Set-Cookie:
|
41
|
+
- JSESSIONID=A17816EB873C3E3861CBF355426DA392.web01; Path=/; Secure
|
42
|
+
- JSESSIONID=A17816EB873C3E3861CBF355426DA392.web01; Path=/
|
43
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=Yloza25MdUhOQnlhMjZGZjoxMzI5MTI4MzkzNzM0OjNjMjk2NjYwMTY2Mjc0MDJlOGNiNDNhOTNlZGIzNTM4; Expires=Sat, 28-Jan-2017 10:19:53 GMT; Path=/
|
44
|
+
Expires: Mon, 30 Jan 2012 12:14:03 GMT
|
45
|
+
Cache-Control: max-age=7200
|
46
|
+
Accept-Charset: utf-8
|
47
|
+
Connection: close
|
48
|
+
http_version:
|
49
|
+
mock: false
|
50
|
+
name_lookup_time: 3.6e-05
|
51
|
+
pretransfer_time: 0.041973
|
52
|
+
primary_ip: 213.61.176.214
|
53
|
+
request: |-
|
54
|
+
:method => :post,
|
55
|
+
:url => https://test.amiando.com/api/event/440339/ticketType/create?apikey=EHynu2WfcVkkO3VRce0ZWtWKplIpXjlhCuQuDn7s1MgKF9ztR0&version=1&format=json,
|
56
|
+
:params => {:type=>"TICKETTYPE_BADGE"}
|
57
|
+
requested_http_method:
|
58
|
+
requested_url:
|
59
|
+
start_time:
|
60
|
+
start_transfer_time: 0.111691
|
61
|
+
status_message: Bad Request
|
62
|
+
time: 0.11176
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amiando
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 10
|
10
|
+
version: 0.3.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jorge Dias
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2012-01-
|
19
|
+
date: 2012-01-30 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: typhoeus
|
@@ -123,6 +123,7 @@ files:
|
|
123
123
|
- lib/amiando/result.rb
|
124
124
|
- lib/amiando/ticket_category.rb
|
125
125
|
- lib/amiando/ticket_shop.rb
|
126
|
+
- lib/amiando/ticket_type.rb
|
126
127
|
- lib/amiando/user.rb
|
127
128
|
- lib/amiando/version.rb
|
128
129
|
- test/amiando/amiando_test.rb
|
@@ -135,6 +136,7 @@ files:
|
|
135
136
|
- test/amiando/result_test.rb
|
136
137
|
- test/amiando/ticket_category_test.rb
|
137
138
|
- test/amiando/ticket_shop_test.rb
|
139
|
+
- test/amiando/ticket_type_test.rb
|
138
140
|
- test/amiando/user_test.rb
|
139
141
|
- test/fixtures/ApiKey/1d8e3d55d45a77d6eb7796e5abb70281.yml
|
140
142
|
- test/fixtures/ApiKey/1f62195e173114773b3ec2613582ece9.yml
|
@@ -204,6 +206,15 @@ files:
|
|
204
206
|
- test/fixtures/TicketShop/98af95fbe3b6921d446c8ad57f476683.yml
|
205
207
|
- test/fixtures/TicketShop/dc18e2818f5b86f9e6609703d4165c80.yml
|
206
208
|
- test/fixtures/TicketShop/f8b2b6ca29914576989fa3c2fc21d516.yml
|
209
|
+
- test/fixtures/TicketType/300251efae116632a5c68176a6eae4af.yml
|
210
|
+
- test/fixtures/TicketType/3fddc8221b0700fbd822212516e433f2.yml
|
211
|
+
- test/fixtures/TicketType/42656d14df20971a9a85fd6568b5b2d5.yml
|
212
|
+
- test/fixtures/TicketType/691a6b82a08302ca3adfb549e6b661f1.yml
|
213
|
+
- test/fixtures/TicketType/9454d2eb8c100a9c5584b858fc608ec9.yml
|
214
|
+
- test/fixtures/TicketType/98c2f99677f9091490e1757e7ca17ba3.yml
|
215
|
+
- test/fixtures/TicketType/adbe8c5200cc684b766f28c140398f34.yml
|
216
|
+
- test/fixtures/TicketType/bb237b60fc58506aede17a85497a1c66.yml
|
217
|
+
- test/fixtures/TicketType/bbbdca24f66260547c6effe7bab1aa92.yml
|
207
218
|
- test/fixtures/User/01fec3bc2a1e516b338622c402243255.yml
|
208
219
|
- test/fixtures/User/05317b0072cb1096bfb6967b6ed8d3f6.yml
|
209
220
|
- test/fixtures/User/0d0a11e4a50e0c07c5a9ea57d82b0f73.yml
|
@@ -269,6 +280,7 @@ test_files:
|
|
269
280
|
- test/amiando/result_test.rb
|
270
281
|
- test/amiando/ticket_category_test.rb
|
271
282
|
- test/amiando/ticket_shop_test.rb
|
283
|
+
- test/amiando/ticket_type_test.rb
|
272
284
|
- test/amiando/user_test.rb
|
273
285
|
- test/fixtures/ApiKey/1d8e3d55d45a77d6eb7796e5abb70281.yml
|
274
286
|
- test/fixtures/ApiKey/1f62195e173114773b3ec2613582ece9.yml
|
@@ -338,6 +350,15 @@ test_files:
|
|
338
350
|
- test/fixtures/TicketShop/98af95fbe3b6921d446c8ad57f476683.yml
|
339
351
|
- test/fixtures/TicketShop/dc18e2818f5b86f9e6609703d4165c80.yml
|
340
352
|
- test/fixtures/TicketShop/f8b2b6ca29914576989fa3c2fc21d516.yml
|
353
|
+
- test/fixtures/TicketType/300251efae116632a5c68176a6eae4af.yml
|
354
|
+
- test/fixtures/TicketType/3fddc8221b0700fbd822212516e433f2.yml
|
355
|
+
- test/fixtures/TicketType/42656d14df20971a9a85fd6568b5b2d5.yml
|
356
|
+
- test/fixtures/TicketType/691a6b82a08302ca3adfb549e6b661f1.yml
|
357
|
+
- test/fixtures/TicketType/9454d2eb8c100a9c5584b858fc608ec9.yml
|
358
|
+
- test/fixtures/TicketType/98c2f99677f9091490e1757e7ca17ba3.yml
|
359
|
+
- test/fixtures/TicketType/adbe8c5200cc684b766f28c140398f34.yml
|
360
|
+
- test/fixtures/TicketType/bb237b60fc58506aede17a85497a1c66.yml
|
361
|
+
- test/fixtures/TicketType/bbbdca24f66260547c6effe7bab1aa92.yml
|
341
362
|
- test/fixtures/User/01fec3bc2a1e516b338622c402243255.yml
|
342
363
|
- test/fixtures/User/05317b0072cb1096bfb6967b6ed8d3f6.yml
|
343
364
|
- test/fixtures/User/0d0a11e4a50e0c07c5a9ea57d82b0f73.yml
|