amiando 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE.txt +20 -0
- data/lib/amiando.rb +9 -0
- data/lib/amiando/payment_type.rb +72 -0
- data/lib/amiando/resource.rb +10 -0
- data/lib/amiando/ticket_shop.rb +1 -1
- data/lib/amiando/version.rb +1 -1
- data/test/amiando/api_key_test.rb +1 -1
- data/test/amiando/event_test.rb +0 -2
- data/test/amiando/payment_type_test.rb +54 -0
- data/test/amiando/resource_test.rb +15 -1
- data/test/amiando/ticket_category_test.rb +0 -2
- data/test/amiando/ticket_shop_test.rb +0 -2
- data/test/amiando/user_test.rb +8 -6
- data/test/fixtures/PaymentType/0ad10cb8031c0c8b2c2787ca5c390667.yml +60 -0
- data/test/fixtures/PaymentType/0e4e3995f9ecd10f11b50270c326f23b.yml +60 -0
- data/test/fixtures/PaymentType/46a58274e28425eeab73c573ea2a3236.yml +60 -0
- data/test/fixtures/PaymentType/49877df5f8c251e3364a3560ab1ab46c.yml +60 -0
- data/test/fixtures/PaymentType/c1ea7b9755738d0bdc9336955cd4fa52.yml +62 -0
- data/test/fixtures/PaymentType/cd61062dafdb2b4f2a08364482901e49.yml +62 -0
- data/test/fixtures/PaymentType/fb24238618b16cb664a5277279e14ff0.yml +62 -0
- data/test/test_helper.rb +3 -11
- metadata +22 -4
data/MIT-LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Jorge Dias, Albert Llop
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/lib/amiando.rb
CHANGED
@@ -12,6 +12,7 @@ module Amiando
|
|
12
12
|
autoload :Event, 'amiando/event'
|
13
13
|
autoload :TicketCategory, 'amiando/ticket_category'
|
14
14
|
autoload :TicketShop, 'amiando/ticket_shop'
|
15
|
+
autoload :PaymentType, 'amiando/payment_type'
|
15
16
|
|
16
17
|
module Error
|
17
18
|
class ServiceDown < Exception; end
|
@@ -55,5 +56,13 @@ module Amiando
|
|
55
56
|
def hydra
|
56
57
|
@hydra ||= Typhoeus::Hydra.new
|
57
58
|
end
|
59
|
+
|
60
|
+
def with_key(key)
|
61
|
+
old_key = Amiando.api_key
|
62
|
+
Amiando.api_key = key
|
63
|
+
yield
|
64
|
+
ensure
|
65
|
+
Amiando.api_key = old_key
|
66
|
+
end
|
58
67
|
end
|
59
68
|
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
module Amiando
|
2
|
+
class PaymentType < Resource
|
3
|
+
|
4
|
+
# /event/{id}/paymentTypes <-- all paymentTypes of the event
|
5
|
+
# /event/{id}/paymentType/create <-- creating a new paymentType
|
6
|
+
# /paymentType/{id} <-- returns the paymentType (used for udpates etc)
|
7
|
+
|
8
|
+
# PaymentType has just the following three variables:
|
9
|
+
|
10
|
+
# Id
|
11
|
+
# Type (String of the following: {PAYMENT_TYPE_ELV, PAYMENT_TYPE_CC, PAYMENT_TYPE_INVOICE, PAYMENT_TYPE_PREPAYMENT, PAYMENT_TYPE_PP, PAYMENT_TYPE_ONLOCATION}) [CC = CreditCard, PP = PayPal]
|
12
|
+
# Active (boolean)
|
13
|
+
##
|
14
|
+
# Create a payment type for an event
|
15
|
+
#
|
16
|
+
# @param event id
|
17
|
+
# @param [Type] Type (String of the following:
|
18
|
+
# PAYMENT_TYPE_ELV, PAYMENT_TYPE_CC, PAYMENT_TYPE_INVOICE, PAYMENT_TYPE_PREPAYMENT,
|
19
|
+
# PAYMENT_TYPE_PP, PAYMENT_TYPE_ONLOCATION) [CC = CreditCard, PP = PayPal]
|
20
|
+
# It will also accept :cc, :invoice, etc and convert them appropiately
|
21
|
+
#
|
22
|
+
def self.create(event_id, type)
|
23
|
+
unless type =~ /payment_type_\w+/i
|
24
|
+
type = "payment_type_#{type}"
|
25
|
+
end
|
26
|
+
|
27
|
+
object = Result.new do |response_body, result|
|
28
|
+
if response_body['success']
|
29
|
+
response_body['id']
|
30
|
+
else
|
31
|
+
result.errors = response_body['errors']
|
32
|
+
false
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
post object, "api/event/#{event_id}/paymentType/create", :params => { :type => type.upcase }
|
37
|
+
|
38
|
+
object
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.find_all_by_event_id(event_id)
|
42
|
+
object = Result.new do |response_body, result|
|
43
|
+
if response_body['success']
|
44
|
+
response_body['results']['paymentTypes'].map do |payment_type|
|
45
|
+
new(payment_type)
|
46
|
+
end
|
47
|
+
else
|
48
|
+
result.errors = response_body['errors']
|
49
|
+
false
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
get object, "api/event/#{event_id}/paymentTypes"
|
54
|
+
|
55
|
+
object
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.find(payment_type_id)
|
59
|
+
object = new
|
60
|
+
|
61
|
+
get object, "api/paymentType/#{payment_type_id}"
|
62
|
+
|
63
|
+
object
|
64
|
+
end
|
65
|
+
|
66
|
+
protected
|
67
|
+
|
68
|
+
def populate(response_body)
|
69
|
+
extract_attributes_from(response_body, 'paymentType')
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
data/lib/amiando/resource.rb
CHANGED
@@ -40,6 +40,16 @@ module Amiando
|
|
40
40
|
Hash[mapped_attributes]
|
41
41
|
end
|
42
42
|
|
43
|
+
def method_missing(method_name, *args, &block)
|
44
|
+
if match = /sync_(.*)/.match(method_name.to_s)
|
45
|
+
res = self.send(match[1], *args, &block)
|
46
|
+
Amiando.run
|
47
|
+
res
|
48
|
+
else
|
49
|
+
super
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
43
53
|
private
|
44
54
|
|
45
55
|
def do_request(object, verb, path, options = {})
|
data/lib/amiando/ticket_shop.rb
CHANGED
data/lib/amiando/version.rb
CHANGED
data/test/amiando/event_test.rb
CHANGED
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
describe Amiando::PaymentType do
|
4
|
+
before do
|
5
|
+
HydraCache.prefix = 'PaymentType'
|
6
|
+
end
|
7
|
+
|
8
|
+
after do
|
9
|
+
HydraCache.prefix = nil
|
10
|
+
end
|
11
|
+
|
12
|
+
let(:event) { Amiando::Factory.create(:event) }
|
13
|
+
|
14
|
+
describe 'create' do
|
15
|
+
it 'creates a payment type given valid attributes' do
|
16
|
+
payment_type = Amiando::PaymentType.create(event.id, :invoice)
|
17
|
+
|
18
|
+
Amiando.run
|
19
|
+
|
20
|
+
payment_type.result.wont_be_nil
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'handles errors properly' do
|
24
|
+
payment_type = Amiando::PaymentType.create(event.id, :cc)
|
25
|
+
Amiando.run
|
26
|
+
|
27
|
+
payment_type.result.must_equal false
|
28
|
+
payment_type.errors.must_include "com.amiando.api.rest.paymentType.PaymentTypeAlreadyExists"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe 'find' do
|
33
|
+
it 'finds a payment type given the id' do
|
34
|
+
payment_id = Amiando::PaymentType.sync_create(event.id, :invoice).result
|
35
|
+
|
36
|
+
payment = Amiando::PaymentType.find(payment_id)
|
37
|
+
Amiando.run
|
38
|
+
|
39
|
+
payment.id.must_equal payment_id
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
describe 'find_all_by_event_id' do
|
44
|
+
it 'finds the payment types given an event' do
|
45
|
+
payment_id = Amiando::PaymentType.sync_create(event.id, :invoice).result
|
46
|
+
payment_type = Amiando::PaymentType.sync_find(payment_id)
|
47
|
+
|
48
|
+
payment_types = Amiando::PaymentType.find_all_by_event_id(event.id)
|
49
|
+
Amiando.run
|
50
|
+
|
51
|
+
payment_types.result.must_include payment_type
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -7,8 +7,15 @@ describe Amiando::Resource do
|
|
7
7
|
map :creation, :creation, :type => :time
|
8
8
|
|
9
9
|
def self.create
|
10
|
-
|
10
|
+
object = new
|
11
|
+
post object, 'somewhere', :populate_method => :populate_create
|
12
|
+
object
|
11
13
|
end
|
14
|
+
|
15
|
+
def populate_create(response_body)
|
16
|
+
@success = response_body['success']
|
17
|
+
end
|
18
|
+
|
12
19
|
end
|
13
20
|
|
14
21
|
it 'raises error when amiando is down' do
|
@@ -65,4 +72,11 @@ describe Amiando::Resource do
|
|
65
72
|
expected = { :creation => time }
|
66
73
|
Wadus.reverse_map_params(:creation => '1970-01-01T01:00:00+01:00').must_equal expected
|
67
74
|
end
|
75
|
+
|
76
|
+
describe 'synchronous calls' do
|
77
|
+
it 'accepts synchronous calls' do
|
78
|
+
stub_request(:post, /somewhere/).to_return(:status => 200, :body => '{"success":true}')
|
79
|
+
Wadus.sync_create.success.must_equal true
|
80
|
+
end
|
81
|
+
end
|
68
82
|
end
|
data/test/amiando/user_test.rb
CHANGED
@@ -2,12 +2,10 @@ require 'test_helper'
|
|
2
2
|
|
3
3
|
describe Amiando::User do
|
4
4
|
before do
|
5
|
-
Amiando.api_key = Amiando::TEST_KEY
|
6
5
|
HydraCache.prefix = 'User'
|
7
6
|
end
|
8
7
|
|
9
8
|
after do
|
10
|
-
Amiando.api_key = nil
|
11
9
|
HydraCache.prefix = nil
|
12
10
|
end
|
13
11
|
|
@@ -106,8 +104,10 @@ describe Amiando::User do
|
|
106
104
|
key = Amiando::Factory(:api_key)
|
107
105
|
Amiando.run
|
108
106
|
|
109
|
-
|
110
|
-
|
107
|
+
permission = Amiando.with_key(key.key) do
|
108
|
+
Amiando::User.request_permission(user.id, '12345')
|
109
|
+
end
|
110
|
+
|
111
111
|
Amiando.run
|
112
112
|
|
113
113
|
permission.result.must_equal true
|
@@ -119,8 +119,10 @@ describe Amiando::User do
|
|
119
119
|
key = Amiando::Factory(:api_key)
|
120
120
|
Amiando.run
|
121
121
|
|
122
|
-
|
123
|
-
|
122
|
+
permission = Amiando.with_key(key.key) do
|
123
|
+
Amiando::User.request_permission(user.id, 'wrong password')
|
124
|
+
end
|
125
|
+
|
124
126
|
Amiando.run
|
125
127
|
|
126
128
|
permission.result.must_equal false
|
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 0.403686
|
3
|
+
body: "{\"results\":{\"availablePaymentTypes\":[\"PAYMENT_TYPE_PREPAYMENT\",\"PAYMENT_TYPE_PP\",\"PAYMENT_TYPE_INVOICE\",\"PAYMENT_TYPE_CC\",\"PAYMENT_TYPE_ONLOCATION\"],\"paymentTypes\":[{\"id\":867853,\"active\":true,\"type\":\"PAYMENT_TYPE_INVOICE\"},{\"id\":867852,\"active\":true,\"type\":\"PAYMENT_TYPE_PP\"},{\"id\":867851,\"active\":true,\"type\":\"PAYMENT_TYPE_CC\"},{\"id\":867850,\"active\":true,\"type\":\"PAYMENT_TYPE_PREPAYMENT\"}]},\"success\":true}"
|
4
|
+
code: 200
|
5
|
+
connect_time: 0.209204
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/event/349047/paymentTypes?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1
|
9
|
+
first_header_line: HTTP/1.1 200 OK
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 200 OK
|
12
|
+
Date: Tue, 25 Oct 2011 10:47:53 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=733BD1223961BC990DA16E97CE4018EF.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=733BD1223961BC990DA16E97CE4018EF.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=ZnV0YjcyRDF3anRrcndsVzoxMzIwNzQ5NDYxNzg3OmQ1MWIxYThjOThkZWZiYjU2MjIwZmUyZjRlNGJhZDc0; Expires=Sun, 23-Oct-2016 10:51:01 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: Tue, 25 Oct 2011 12:47:53 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: Tue, 25 Oct 2011 10:47:53 GMT
|
37
|
+
Accept-Ranges: bytes
|
38
|
+
Server: Apache/2.0.55 (Red Hat)
|
39
|
+
Set-Cookie:
|
40
|
+
- JSESSIONID=733BD1223961BC990DA16E97CE4018EF.web01; Path=/; Secure
|
41
|
+
- JSESSIONID=733BD1223961BC990DA16E97CE4018EF.web01; Path=/
|
42
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=ZnV0YjcyRDF3anRrcndsVzoxMzIwNzQ5NDYxNzg3OmQ1MWIxYThjOThkZWZiYjU2MjIwZmUyZjRlNGJhZDc0; Expires=Sun, 23-Oct-2016 10:51:01 GMT; Path=/
|
43
|
+
Expires: Tue, 25 Oct 2011 12:47:53 GMT
|
44
|
+
Cache-Control: max-age=7200
|
45
|
+
Accept-Charset: utf-8
|
46
|
+
http_version:
|
47
|
+
mock: false
|
48
|
+
name_lookup_time: 1.8e-05
|
49
|
+
pretransfer_time: 0.40369
|
50
|
+
request: |-
|
51
|
+
:method => :get,
|
52
|
+
:url => https://test.amiando.com/api/event/349047/paymentTypes?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1,
|
53
|
+
:params => {:apikey=>"5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3", :format=>:json, :version=>1},
|
54
|
+
:headers => {"User-Agent"=>"Typhoeus - http://github.com/dbalatero/typhoeus/tree/master"}
|
55
|
+
requested_http_method:
|
56
|
+
requested_url:
|
57
|
+
start_time:
|
58
|
+
start_transfer_time: 0.887189
|
59
|
+
status_message: OK
|
60
|
+
time: 0.887235
|
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 1.458314
|
3
|
+
body: "{\"id\":867853,\"success\":true}"
|
4
|
+
code: 201
|
5
|
+
connect_time: 0.554472
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/event/349047/paymentType/create?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1
|
9
|
+
first_header_line: HTTP/1.1 201 Created
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 201 Created
|
12
|
+
Date: Tue, 25 Oct 2011 09:51:40 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=BE9B1CDD7B96A5275247FE72AE7BCFD7.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=BE9B1CDD7B96A5275247FE72AE7BCFD7.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=WFlrbnpsTEZjQnBPVE1kZDoxMzIwNzQ2MDg4NjYwOmQ4MWUyOWYwMTZlNThlOWFmNWM1ZTQ3M2I4M2ViOTUz; Expires=Sun, 23-Oct-2016 09:54:48 GMT; Path=/
|
21
|
+
Accept-Ranges: bytes
|
22
|
+
Cache-Control: max-age=7200
|
23
|
+
Expires: Tue, 25 Oct 2011 11:51:40 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: Tue, 25 Oct 2011 09:51:40 GMT
|
37
|
+
Accept-Ranges: bytes
|
38
|
+
Server: Apache/2.0.55 (Red Hat)
|
39
|
+
Set-Cookie:
|
40
|
+
- JSESSIONID=BE9B1CDD7B96A5275247FE72AE7BCFD7.web01; Path=/; Secure
|
41
|
+
- JSESSIONID=BE9B1CDD7B96A5275247FE72AE7BCFD7.web01; Path=/
|
42
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=WFlrbnpsTEZjQnBPVE1kZDoxMzIwNzQ2MDg4NjYwOmQ4MWUyOWYwMTZlNThlOWFmNWM1ZTQ3M2I4M2ViOTUz; Expires=Sun, 23-Oct-2016 09:54:48 GMT; Path=/
|
43
|
+
Expires: Tue, 25 Oct 2011 11:51:40 GMT
|
44
|
+
Cache-Control: max-age=7200
|
45
|
+
Accept-Charset: utf-8
|
46
|
+
http_version:
|
47
|
+
mock: false
|
48
|
+
name_lookup_time: 0.406387
|
49
|
+
pretransfer_time: 1.458317
|
50
|
+
request: |-
|
51
|
+
:method => :post,
|
52
|
+
:url => https://test.amiando.com/api/event/349047/paymentType/create?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1,
|
53
|
+
:params => {:type=>"PAYMENT_TYPE_INVOICE"},
|
54
|
+
:headers => {"User-Agent"=>"Typhoeus - http://github.com/dbalatero/typhoeus/tree/master"}
|
55
|
+
requested_http_method:
|
56
|
+
requested_url:
|
57
|
+
start_time:
|
58
|
+
start_transfer_time: 2.384929
|
59
|
+
status_message: Created
|
60
|
+
time: 2.385008
|
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 0.487218
|
3
|
+
body: "{\"paymentType\":{\"id\":867853,\"active\":true,\"type\":\"PAYMENT_TYPE_INVOICE\"},\"success\":true}"
|
4
|
+
code: 200
|
5
|
+
connect_time: 0.152943
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/paymentType/867853?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1
|
9
|
+
first_header_line: HTTP/1.1 200 OK
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 200 OK
|
12
|
+
Date: Tue, 25 Oct 2011 10:43:37 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=BDB53166DDC7A6E4031EB48288E9FA88.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=BDB53166DDC7A6E4031EB48288E9FA88.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=dDAySklMREVrNXdQRzdzbToxMzIwNzQ5MjA2NDMwOjNlMTgzNzI2ODliOWI2OGY4MTNkZjcwMmMyYzc1OWQ5; Expires=Sun, 23-Oct-2016 10:46:46 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: Tue, 25 Oct 2011 12:43:37 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: Tue, 25 Oct 2011 10:43:37 GMT
|
37
|
+
Accept-Ranges: bytes
|
38
|
+
Server: Apache/2.0.55 (Red Hat)
|
39
|
+
Set-Cookie:
|
40
|
+
- JSESSIONID=BDB53166DDC7A6E4031EB48288E9FA88.web01; Path=/; Secure
|
41
|
+
- JSESSIONID=BDB53166DDC7A6E4031EB48288E9FA88.web01; Path=/
|
42
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=dDAySklMREVrNXdQRzdzbToxMzIwNzQ5MjA2NDMwOjNlMTgzNzI2ODliOWI2OGY4MTNkZjcwMmMyYzc1OWQ5; Expires=Sun, 23-Oct-2016 10:46:46 GMT; Path=/
|
43
|
+
Expires: Tue, 25 Oct 2011 12:43:37 GMT
|
44
|
+
Cache-Control: max-age=7200
|
45
|
+
Accept-Charset: utf-8
|
46
|
+
http_version:
|
47
|
+
mock: false
|
48
|
+
name_lookup_time: 0.083382
|
49
|
+
pretransfer_time: 0.487223
|
50
|
+
request: |-
|
51
|
+
:method => :get,
|
52
|
+
:url => https://test.amiando.com/api/paymentType/867853?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1,
|
53
|
+
:params => {:format=>:json, :apikey=>"5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3", :version=>1},
|
54
|
+
:headers => {"User-Agent"=>"Typhoeus - http://github.com/dbalatero/typhoeus/tree/master"}
|
55
|
+
requested_http_method:
|
56
|
+
requested_url:
|
57
|
+
start_time:
|
58
|
+
start_transfer_time: 0.595659
|
59
|
+
status_message: OK
|
60
|
+
time: 0.595723
|
@@ -0,0 +1,60 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 2.489202
|
3
|
+
body: "{\"id\":349047,\"success\":true}"
|
4
|
+
code: 201
|
5
|
+
connect_time: 0.552809
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/event/create?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1
|
9
|
+
first_header_line: HTTP/1.1 201 Created
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 201 Created
|
12
|
+
Date: Tue, 25 Oct 2011 09:50:13 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=B9CE19CBA52B1157A980F8E3E1311B79.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=B9CE19CBA52B1157A980F8E3E1311B79.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=VjRjVjdLYVh1MDVvUktJNjoxMzIwNzQ2MDAxNzk1OjA4YTk4NzNkYjJlM2E2MDdjNTEwNDRiZGQxZGNkZDUy; Expires=Sun, 23-Oct-2016 09:53:21 GMT; Path=/
|
21
|
+
Accept-Ranges: bytes
|
22
|
+
Cache-Control: max-age=7200
|
23
|
+
Expires: Tue, 25 Oct 2011 11:50:13 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: Tue, 25 Oct 2011 09:50:13 GMT
|
37
|
+
Accept-Ranges: bytes
|
38
|
+
Server: Apache/2.0.55 (Red Hat)
|
39
|
+
Set-Cookie:
|
40
|
+
- JSESSIONID=B9CE19CBA52B1157A980F8E3E1311B79.web01; Path=/; Secure
|
41
|
+
- JSESSIONID=B9CE19CBA52B1157A980F8E3E1311B79.web01; Path=/
|
42
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=VjRjVjdLYVh1MDVvUktJNjoxMzIwNzQ2MDAxNzk1OjA4YTk4NzNkYjJlM2E2MDdjNTEwNDRiZGQxZGNkZDUy; Expires=Sun, 23-Oct-2016 09:53:21 GMT; Path=/
|
43
|
+
Expires: Tue, 25 Oct 2011 11:50:13 GMT
|
44
|
+
Cache-Control: max-age=7200
|
45
|
+
Accept-Charset: utf-8
|
46
|
+
http_version:
|
47
|
+
mock: false
|
48
|
+
name_lookup_time: 0.002414
|
49
|
+
pretransfer_time: 2.489206
|
50
|
+
request: |-
|
51
|
+
:method => :post,
|
52
|
+
:url => https://test.amiando.com/api/event/create?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1,
|
53
|
+
:params => {:hostId=>256142272, :title=>"Secret title", :selectedDate=>"1970-01-01T01:00:00+01:00", :country=>"es"},
|
54
|
+
:headers => {"User-Agent"=>"Typhoeus - http://github.com/dbalatero/typhoeus/tree/master"}
|
55
|
+
requested_http_method:
|
56
|
+
requested_url:
|
57
|
+
start_time:
|
58
|
+
start_transfer_time: 6.925452
|
59
|
+
status_message: Created
|
60
|
+
time: 6.925515
|
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 0.235204
|
3
|
+
body: "{\"errors\":[\"com.amiando.api.rest.InvalidResourceId\"],\"success\":false}"
|
4
|
+
code: 400
|
5
|
+
connect_time: 0.096349
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/paymentType/false?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1
|
9
|
+
first_header_line: HTTP/1.1 400 Bad Request
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 400 Bad Request
|
12
|
+
Date: Tue, 25 Oct 2011 10:47:21 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=5898C665565943F2640F7650E9E0DEBC.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=5898C665565943F2640F7650E9E0DEBC.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=czFKQ0hpY1lLQTZHNDVaZjoxMzIwNzQ5NDMwNTc1OjM2YTMxYTViYjU5ZThhNWJkMGMzZDRmZTEwYzZkMTA4; Expires=Sun, 23-Oct-2016 10:50:30 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: Tue, 25 Oct 2011 12:47:21 GMT
|
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: Accept-Charset,Accept-Encoding,Accept-Language,Accept,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: Tue, 25 Oct 2011 10:47:21 GMT
|
38
|
+
Accept-Ranges: bytes
|
39
|
+
Server: Apache/2.0.55 (Red Hat)
|
40
|
+
Set-Cookie:
|
41
|
+
- JSESSIONID=5898C665565943F2640F7650E9E0DEBC.web01; Path=/; Secure
|
42
|
+
- JSESSIONID=5898C665565943F2640F7650E9E0DEBC.web01; Path=/
|
43
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=czFKQ0hpY1lLQTZHNDVaZjoxMzIwNzQ5NDMwNTc1OjM2YTMxYTViYjU5ZThhNWJkMGMzZDRmZTEwYzZkMTA4; Expires=Sun, 23-Oct-2016 10:50:30 GMT; Path=/
|
44
|
+
Expires: Tue, 25 Oct 2011 12:47:21 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: 1.9e-05
|
51
|
+
pretransfer_time: 0.235208
|
52
|
+
request: |-
|
53
|
+
:method => :get,
|
54
|
+
:url => https://test.amiando.com/api/paymentType/false?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1,
|
55
|
+
:params => {:apikey=>"5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3", :format=>:json, :version=>1},
|
56
|
+
:headers => {"User-Agent"=>"Typhoeus - http://github.com/dbalatero/typhoeus/tree/master"}
|
57
|
+
requested_http_method:
|
58
|
+
requested_url:
|
59
|
+
start_time:
|
60
|
+
start_transfer_time: 0.480779
|
61
|
+
status_message: Bad Request
|
62
|
+
time: 0.480849
|
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 3.9e-05
|
3
|
+
body: "{\"errors\":[\"com.amiando.api.rest.paymentType.PaymentTypeAlreadyExists\"],\"success\":false}"
|
4
|
+
code: 400
|
5
|
+
connect_time: 3.8e-05
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/event/349047/paymentType/create?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1
|
9
|
+
first_header_line: HTTP/1.1 400 Bad Request
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 400 Bad Request
|
12
|
+
Date: Tue, 25 Oct 2011 09:50:17 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=EB780E96822E766EDA92F4FE62A841D2.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=EB780E96822E766EDA92F4FE62A841D2.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=OFluN0hOQ0plTUxFTjdOYToxMzIwNzQ2MDA2MjMzOmNjYzYxODZlYzVjNTBkOTQ0Mzc0OTAxNWJkZTE5OWE4; Expires=Sun, 23-Oct-2016 09:53:26 GMT; Path=/
|
21
|
+
Accept-Ranges: bytes
|
22
|
+
Cache-Control: max-age=7200
|
23
|
+
Expires: Tue, 25 Oct 2011 11:50:17 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: Tue, 25 Oct 2011 09:50:17 GMT
|
38
|
+
Accept-Ranges: bytes
|
39
|
+
Server: Apache/2.0.55 (Red Hat)
|
40
|
+
Set-Cookie:
|
41
|
+
- JSESSIONID=EB780E96822E766EDA92F4FE62A841D2.web01; Path=/; Secure
|
42
|
+
- JSESSIONID=EB780E96822E766EDA92F4FE62A841D2.web01; Path=/
|
43
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=OFluN0hOQ0plTUxFTjdOYToxMzIwNzQ2MDA2MjMzOmNjYzYxODZlYzVjNTBkOTQ0Mzc0OTAxNWJkZTE5OWE4; Expires=Sun, 23-Oct-2016 09:53:26 GMT; Path=/
|
44
|
+
Expires: Tue, 25 Oct 2011 11:50:17 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.8e-05
|
51
|
+
pretransfer_time: 4.4e-05
|
52
|
+
request: |-
|
53
|
+
:method => :post,
|
54
|
+
:url => https://test.amiando.com/api/event/349047/paymentType/create?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1,
|
55
|
+
:params => {:type=>"PAYMENT_TYPE_CC"},
|
56
|
+
:headers => {"User-Agent"=>"Typhoeus - http://github.com/dbalatero/typhoeus/tree/master"}
|
57
|
+
requested_http_method:
|
58
|
+
requested_url:
|
59
|
+
start_time:
|
60
|
+
start_transfer_time: 0.093137
|
61
|
+
status_message: Bad Request
|
62
|
+
time: 0.093173
|
@@ -0,0 +1,62 @@
|
|
1
|
+
--- !ruby/object:Typhoeus::Response
|
2
|
+
app_connect_time: 0.955692
|
3
|
+
body: "{\"errors\":[\"com.amiando.api.rest.paymentType.PaymentTypeAlreadyExists\"],\"success\":false}"
|
4
|
+
code: 400
|
5
|
+
connect_time: 0.653345
|
6
|
+
curl_error_message: No error
|
7
|
+
curl_return_code: 0
|
8
|
+
effective_url: https://test.amiando.com/api/event/349047/paymentType/create?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1
|
9
|
+
first_header_line: HTTP/1.1 400 Bad Request
|
10
|
+
headers: |
|
11
|
+
HTTP/1.1 400 Bad Request
|
12
|
+
Date: Tue, 25 Oct 2011 10:47:21 GMT
|
13
|
+
Server: Apache/2.0.55 (Red Hat)
|
14
|
+
Set-Cookie: JSESSIONID=7AA4941985B5D4EA8E3D0A3A8F1B8C61.web01; Path=/; Secure
|
15
|
+
Set-Cookie: JSESSIONID=7AA4941985B5D4EA8E3D0A3A8F1B8C61.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=MnYzRGlDbXNHNjJtTmlPRzoxMzIwNzQ5NDMwMDU3Ojc2OWI0MTQ0MDkzMzBiNzgzNDMzYzlkYzE2Zjc5ZDI4; Expires=Sun, 23-Oct-2016 10:50:30 GMT; Path=/
|
21
|
+
Accept-Ranges: bytes
|
22
|
+
Cache-Control: max-age=7200
|
23
|
+
Expires: Tue, 25 Oct 2011 12:47:21 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: Tue, 25 Oct 2011 10:47:21 GMT
|
38
|
+
Accept-Ranges: bytes
|
39
|
+
Server: Apache/2.0.55 (Red Hat)
|
40
|
+
Set-Cookie:
|
41
|
+
- JSESSIONID=7AA4941985B5D4EA8E3D0A3A8F1B8C61.web01; Path=/; Secure
|
42
|
+
- JSESSIONID=7AA4941985B5D4EA8E3D0A3A8F1B8C61.web01; Path=/
|
43
|
+
- ANONYMOUS_HASHED_REMEMBER_ME_COOKIE_KEY=MnYzRGlDbXNHNjJtTmlPRzoxMzIwNzQ5NDMwMDU3Ojc2OWI0MTQ0MDkzMzBiNzgzNDMzYzlkYzE2Zjc5ZDI4; Expires=Sun, 23-Oct-2016 10:50:30 GMT; Path=/
|
44
|
+
Expires: Tue, 25 Oct 2011 12:47:21 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.525978
|
51
|
+
pretransfer_time: 0.955695
|
52
|
+
request: |-
|
53
|
+
:method => :post,
|
54
|
+
:url => https://test.amiando.com/api/event/349047/paymentType/create?apikey=5Tgoob95gX5WqjF0FIjxoJHLNp7YEgAlLuXZdzMuYXaxZZaah3&format=json&version=1,
|
55
|
+
:params => {:type=>"PAYMENT_TYPE_PP"},
|
56
|
+
:headers => {"User-Agent"=>"Typhoeus - http://github.com/dbalatero/typhoeus/tree/master"}
|
57
|
+
requested_http_method:
|
58
|
+
requested_url:
|
59
|
+
start_time:
|
60
|
+
start_transfer_time: 1.133284
|
61
|
+
status_message: Bad Request
|
62
|
+
time: 1.133319
|
data/test/test_helper.rb
CHANGED
@@ -20,17 +20,9 @@ WebMock.allow_net_connect!
|
|
20
20
|
HydraCache.prefix = 'Global'
|
21
21
|
|
22
22
|
module Amiando
|
23
|
-
TEST_KEY =
|
24
|
-
|
25
|
-
|
26
|
-
key.key
|
27
|
-
end
|
28
|
-
TEST_USER = begin
|
29
|
-
Amiando.api_key = TEST_KEY
|
30
|
-
user = Amiando::Factory.create(:user, :username => "jorgellop-base-#{HydraCache.revision}@example.com")
|
31
|
-
Amiando.api_key = nil
|
32
|
-
user
|
33
|
-
end
|
23
|
+
self.api_key = TEST_KEY = Amiando::Factory.create(:api_key, :name => 'test key').key
|
24
|
+
|
25
|
+
TEST_USER = Amiando::Factory.create(:user, :username => "jorgellop-base-#{HydraCache.revision}@example.com")
|
34
26
|
end
|
35
27
|
|
36
28
|
HydraCache.prefix = nil
|
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: 27
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
- 0
|
9
8
|
- 1
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 0.1.0
|
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: 2011-10-
|
19
|
+
date: 2011-10-25 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- .gitignore
|
108
108
|
- Gemfile
|
109
109
|
- Guardfile
|
110
|
+
- MIT-LICENSE.txt
|
110
111
|
- README.md
|
111
112
|
- Rakefile
|
112
113
|
- amiando.gemspec
|
@@ -114,6 +115,7 @@ files:
|
|
114
115
|
- lib/amiando/api_key.rb
|
115
116
|
- lib/amiando/boolean.rb
|
116
117
|
- lib/amiando/event.rb
|
118
|
+
- lib/amiando/payment_type.rb
|
117
119
|
- lib/amiando/request.rb
|
118
120
|
- lib/amiando/resource.rb
|
119
121
|
- lib/amiando/result.rb
|
@@ -125,6 +127,7 @@ files:
|
|
125
127
|
- test/amiando/api_key_test.rb
|
126
128
|
- test/amiando/boolean_test.rb
|
127
129
|
- test/amiando/event_test.rb
|
130
|
+
- test/amiando/payment_type_test.rb
|
128
131
|
- test/amiando/resource_test.rb
|
129
132
|
- test/amiando/result_test.rb
|
130
133
|
- test/amiando/ticket_category_test.rb
|
@@ -162,6 +165,13 @@ files:
|
|
162
165
|
- test/fixtures/Event/ef17351e4bbc84eb776fe16dda31e1e4.yml
|
163
166
|
- test/fixtures/Global/505952258352958b3b59a3812372ed02.yml
|
164
167
|
- test/fixtures/Global/d41a6ca323b5db99b4e3c06e108c52cc.yml
|
168
|
+
- test/fixtures/PaymentType/0ad10cb8031c0c8b2c2787ca5c390667.yml
|
169
|
+
- test/fixtures/PaymentType/0e4e3995f9ecd10f11b50270c326f23b.yml
|
170
|
+
- test/fixtures/PaymentType/46a58274e28425eeab73c573ea2a3236.yml
|
171
|
+
- test/fixtures/PaymentType/49877df5f8c251e3364a3560ab1ab46c.yml
|
172
|
+
- test/fixtures/PaymentType/c1ea7b9755738d0bdc9336955cd4fa52.yml
|
173
|
+
- test/fixtures/PaymentType/cd61062dafdb2b4f2a08364482901e49.yml
|
174
|
+
- test/fixtures/PaymentType/fb24238618b16cb664a5277279e14ff0.yml
|
165
175
|
- test/fixtures/TicketCategory/0412c9d453efd804e171c6ba57fd980a.yml
|
166
176
|
- test/fixtures/TicketCategory/49877df5f8c251e3364a3560ab1ab46c.yml
|
167
177
|
- test/fixtures/TicketCategory/4d3f8d9ff3fb728fc37aaa6e40355a00.yml
|
@@ -246,6 +256,7 @@ test_files:
|
|
246
256
|
- test/amiando/api_key_test.rb
|
247
257
|
- test/amiando/boolean_test.rb
|
248
258
|
- test/amiando/event_test.rb
|
259
|
+
- test/amiando/payment_type_test.rb
|
249
260
|
- test/amiando/resource_test.rb
|
250
261
|
- test/amiando/result_test.rb
|
251
262
|
- test/amiando/ticket_category_test.rb
|
@@ -283,6 +294,13 @@ test_files:
|
|
283
294
|
- test/fixtures/Event/ef17351e4bbc84eb776fe16dda31e1e4.yml
|
284
295
|
- test/fixtures/Global/505952258352958b3b59a3812372ed02.yml
|
285
296
|
- test/fixtures/Global/d41a6ca323b5db99b4e3c06e108c52cc.yml
|
297
|
+
- test/fixtures/PaymentType/0ad10cb8031c0c8b2c2787ca5c390667.yml
|
298
|
+
- test/fixtures/PaymentType/0e4e3995f9ecd10f11b50270c326f23b.yml
|
299
|
+
- test/fixtures/PaymentType/46a58274e28425eeab73c573ea2a3236.yml
|
300
|
+
- test/fixtures/PaymentType/49877df5f8c251e3364a3560ab1ab46c.yml
|
301
|
+
- test/fixtures/PaymentType/c1ea7b9755738d0bdc9336955cd4fa52.yml
|
302
|
+
- test/fixtures/PaymentType/cd61062dafdb2b4f2a08364482901e49.yml
|
303
|
+
- test/fixtures/PaymentType/fb24238618b16cb664a5277279e14ff0.yml
|
286
304
|
- test/fixtures/TicketCategory/0412c9d453efd804e171c6ba57fd980a.yml
|
287
305
|
- test/fixtures/TicketCategory/49877df5f8c251e3364a3560ab1ab46c.yml
|
288
306
|
- test/fixtures/TicketCategory/4d3f8d9ff3fb728fc37aaa6e40355a00.yml
|