ticketinghub 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ticketing_hub/client.rb +15 -11
- data/lib/ticketing_hub/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e97e21b1e188ecea18f1d9a4c5fe01ba83d02485
|
4
|
+
data.tar.gz: 97e94ae9c677bf65785b40d8c7ad04620f393925
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 257a2d73b1c03a3cc78fb8a3d6fac0b3a9afb94401e294550c0c488ea5722b46b3d4ecd4a8e60dfbac9b8cf73f6b4c4f053339b00a0394d905be90084df1fc35
|
7
|
+
data.tar.gz: 860b75d4b1a38f8cf167f22da7106e8bf5013c973058d04b8270cad148f9bb770298e30b20e3bac7ffa9ef3d5a2560b9975b55a5c7521d4f2bdf17dd6cc00db7
|
data/lib/ticketing_hub/client.rb
CHANGED
@@ -20,37 +20,41 @@ module TicketingHub
|
|
20
20
|
client_secret: client_secret, code: code, endpoint: oauth_endpoint)['access_token']
|
21
21
|
end
|
22
22
|
|
23
|
-
def venue
|
24
|
-
get 'venue'
|
23
|
+
def venue id=nil
|
24
|
+
id ? get("venues/#{id}") : get('venue')
|
25
25
|
end
|
26
26
|
|
27
27
|
def user
|
28
28
|
get 'user'
|
29
29
|
end
|
30
30
|
|
31
|
-
def orders
|
32
|
-
|
31
|
+
def orders venue_id=nil
|
32
|
+
venue_id ||= venue(venue_id).id
|
33
|
+
get "venues/#{venue_id}/orders"
|
33
34
|
end
|
34
35
|
|
35
36
|
def order order_id
|
36
37
|
get "orders/#{_normalize_object_id order_id}"
|
37
38
|
end
|
38
39
|
|
39
|
-
def tiers date,
|
40
|
-
|
40
|
+
def tiers date, time, venue_id=nil
|
41
|
+
venue_id ||= venue(venue_id).id
|
42
|
+
get "venues/#{venue_id}/tiers", { date: date, time: time }
|
41
43
|
end
|
42
44
|
|
43
|
-
def seasons
|
44
|
-
|
45
|
+
def seasons venue_id=nil
|
46
|
+
venue_id ||= venue(venue_id).id
|
47
|
+
get "venues/#{venue_id}/seasons"
|
45
48
|
end
|
46
49
|
|
47
|
-
def
|
50
|
+
def customer_fields order_id, ticket_id=nil
|
48
51
|
ticket_id.nil?? get("orders/#{_normalize_object_id order_id}/fields") :
|
49
52
|
get("tickets/#{_normalize_object_id ticket_id}/fields")
|
50
53
|
end
|
51
54
|
|
52
|
-
def create_order order_attributes
|
53
|
-
|
55
|
+
def create_order order_attributes, venue_id=nil
|
56
|
+
venue_id ||= venue(venue_id).id
|
57
|
+
post "venues/#{venue_id}/orders", order_attributes
|
54
58
|
end
|
55
59
|
|
56
60
|
def cancel_order order_id
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ticketinghub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|