tickethub 0.3.55 → 0.3.56
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tickethub/request.rb +2 -2
- data/lib/tickethub/supplier/channel.rb +1 -1
- data/lib/tickethub/supplier/product.rb +2 -0
- data/lib/tickethub/version.rb +1 -1
- data/lib/tickethub.rb +0 -1
- metadata +2 -28
- data/lib/tickethub/channel/answer.rb +0 -11
- data/lib/tickethub/channel/booking/ticket.rb +0 -13
- data/lib/tickethub/channel/booking/voucher.rb +0 -13
- data/lib/tickethub/channel/booking.rb +0 -38
- data/lib/tickethub/channel/coupon.rb +0 -14
- data/lib/tickethub/channel/customer.rb +0 -11
- data/lib/tickethub/channel/discount.rb +0 -12
- data/lib/tickethub/channel/extra.rb +0 -12
- data/lib/tickethub/channel/fee.rb +0 -15
- data/lib/tickethub/channel/option.rb +0 -14
- data/lib/tickethub/channel/order.rb +0 -38
- data/lib/tickethub/channel/payment/paypal.rb +0 -8
- data/lib/tickethub/channel/payment/stripe.rb +0 -8
- data/lib/tickethub/channel/payment.rb +0 -27
- data/lib/tickethub/channel/product.rb +0 -35
- data/lib/tickethub/channel/purchase.rb +0 -19
- data/lib/tickethub/channel/question.rb +0 -11
- data/lib/tickethub/channel/refund.rb +0 -16
- data/lib/tickethub/channel/session.rb +0 -10
- data/lib/tickethub/channel/supplier.rb +0 -19
- data/lib/tickethub/channel/tax.rb +0 -14
- data/lib/tickethub/channel/ticket.rb +0 -23
- data/lib/tickethub/channel/tier.rb +0 -15
- data/lib/tickethub/channel/variant.rb +0 -7
- data/lib/tickethub/channel/voucher.rb +0 -19
- data/lib/tickethub/channel.rb +0 -50
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2faf725e33ff7442bfe95986bd0c2237660556a7
|
4
|
+
data.tar.gz: 284bc2745dfaaf7d02f1c4b2c559d6d471355702
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d3ea5294bfea89414c0873bde6b54a7faf9422b447ff470c32e874e850b113ad7903c86017682f29cd21145ab5eb7c6643c8407da26f69fc9817218434d21323
|
7
|
+
data.tar.gz: 35518440f8471ea1966f7aee12f29f0f315b898b583d46fc73c541f6aea54aaa98445fde97a4af75f08195f5108aa586db991e9bd5d6b072e672b35194f94a7a
|
data/lib/tickethub/request.rb
CHANGED
@@ -11,6 +11,7 @@ module Tickethub
|
|
11
11
|
|
12
12
|
require_relative 'booking'
|
13
13
|
require_relative 'voucher'
|
14
|
+
require_relative 'channel'
|
14
15
|
require_relative 'ticket'
|
15
16
|
require_relative 'extra'
|
16
17
|
require_relative 'fee'
|
@@ -30,6 +31,7 @@ module Tickethub
|
|
30
31
|
|
31
32
|
collection :bookings, Supplier::Booking
|
32
33
|
collection :vouchers, Supplier::Voucher
|
34
|
+
collection :channels, Supplier::Channel
|
33
35
|
collection :tickets, Supplier::Ticket
|
34
36
|
collection :extras, Supplier::Extra
|
35
37
|
collection :fees, Supplier::Fee
|
data/lib/tickethub/version.rb
CHANGED
data/lib/tickethub.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tickethub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.56
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,32 +94,6 @@ files:
|
|
94
94
|
- lib/tickethub/app.rb
|
95
95
|
- lib/tickethub/app/category.rb
|
96
96
|
- lib/tickethub/app/subscription.rb
|
97
|
-
- lib/tickethub/channel.rb
|
98
|
-
- lib/tickethub/channel/answer.rb
|
99
|
-
- lib/tickethub/channel/booking.rb
|
100
|
-
- lib/tickethub/channel/booking/ticket.rb
|
101
|
-
- lib/tickethub/channel/booking/voucher.rb
|
102
|
-
- lib/tickethub/channel/coupon.rb
|
103
|
-
- lib/tickethub/channel/customer.rb
|
104
|
-
- lib/tickethub/channel/discount.rb
|
105
|
-
- lib/tickethub/channel/extra.rb
|
106
|
-
- lib/tickethub/channel/fee.rb
|
107
|
-
- lib/tickethub/channel/option.rb
|
108
|
-
- lib/tickethub/channel/order.rb
|
109
|
-
- lib/tickethub/channel/payment.rb
|
110
|
-
- lib/tickethub/channel/payment/paypal.rb
|
111
|
-
- lib/tickethub/channel/payment/stripe.rb
|
112
|
-
- lib/tickethub/channel/product.rb
|
113
|
-
- lib/tickethub/channel/purchase.rb
|
114
|
-
- lib/tickethub/channel/question.rb
|
115
|
-
- lib/tickethub/channel/refund.rb
|
116
|
-
- lib/tickethub/channel/session.rb
|
117
|
-
- lib/tickethub/channel/supplier.rb
|
118
|
-
- lib/tickethub/channel/tax.rb
|
119
|
-
- lib/tickethub/channel/ticket.rb
|
120
|
-
- lib/tickethub/channel/tier.rb
|
121
|
-
- lib/tickethub/channel/variant.rb
|
122
|
-
- lib/tickethub/channel/voucher.rb
|
123
97
|
- lib/tickethub/collection.rb
|
124
98
|
- lib/tickethub/connection.rb
|
125
99
|
- lib/tickethub/contact.rb
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require_relative '../booking'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Booking::Ticket < Channel::Booking
|
5
|
-
polymorphic 'ticket'
|
6
|
-
|
7
|
-
require_relative '../ticket'
|
8
|
-
|
9
|
-
collection :tickets, Channel::Ticket
|
10
|
-
|
11
|
-
attribute :valid_from, type: :datetime
|
12
|
-
end
|
13
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require_relative '../booking'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Booking::Voucher < Channel::Booking
|
5
|
-
polymorphic 'voucher'
|
6
|
-
|
7
|
-
require_relative '../voucher'
|
8
|
-
|
9
|
-
collection :vouchers, Channel::Voucher
|
10
|
-
|
11
|
-
attribute :expires_on, type: :date
|
12
|
-
end
|
13
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Booking < Resource
|
5
|
-
path '/channel/bookings'
|
6
|
-
|
7
|
-
require_relative 'booking/ticket'
|
8
|
-
require_relative 'booking/voucher'
|
9
|
-
|
10
|
-
require_relative 'order'
|
11
|
-
require_relative 'answer'
|
12
|
-
require_relative 'product'
|
13
|
-
require_relative 'variant'
|
14
|
-
require_relative 'purchase'
|
15
|
-
require_relative 'discount'
|
16
|
-
require_relative 'fee'
|
17
|
-
require_relative 'tier'
|
18
|
-
|
19
|
-
collection :answers, Channel::Answer
|
20
|
-
collection :purchases, Channel::Purchase
|
21
|
-
collection :fees, Channel::Fee
|
22
|
-
collection :tiers, Channel::Tier
|
23
|
-
collection :discounts, Channel::Discount
|
24
|
-
|
25
|
-
association :order, Channel::Order
|
26
|
-
association :product, Channel::Product
|
27
|
-
association :variant, Channel::Variant
|
28
|
-
|
29
|
-
attribute :amount, type: :money
|
30
|
-
attribute :discount, type: :money
|
31
|
-
attribute :tax, type: :money
|
32
|
-
attribute :total, type: :money
|
33
|
-
|
34
|
-
attribute :created_at, type: :datetime
|
35
|
-
attribute :updated_at, type: :datetime
|
36
|
-
attribute :cancelled_at, type: :datetime
|
37
|
-
end
|
38
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Coupon < Resource
|
5
|
-
path '/channel/coupons'
|
6
|
-
|
7
|
-
require_relative 'booking'
|
8
|
-
|
9
|
-
collection :bookings, Channel::Booking
|
10
|
-
|
11
|
-
attribute :valid_from, type: :date
|
12
|
-
attribute :expires_on, type: :date
|
13
|
-
end
|
14
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Fee < Resource
|
5
|
-
path '/channel/fees'
|
6
|
-
|
7
|
-
require_relative 'tax'
|
8
|
-
require_relative 'booking'
|
9
|
-
|
10
|
-
association :tax, Channel::Tax
|
11
|
-
association :booking, Channel::Booking
|
12
|
-
|
13
|
-
attribute :amount, type: :money
|
14
|
-
end
|
15
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Option < Resource
|
5
|
-
path '/channel/options'
|
6
|
-
|
7
|
-
scope :dates, -> (params) { @endpoint[:dates].get(params).decoded }
|
8
|
-
|
9
|
-
attribute :date_time, type: :datetime
|
10
|
-
|
11
|
-
attribute :time, type: :time
|
12
|
-
attribute :total, type: :money
|
13
|
-
end
|
14
|
-
end
|
@@ -1,38 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Order < Resource
|
5
|
-
path '/channel/orders'
|
6
|
-
|
7
|
-
require_relative 'customer'
|
8
|
-
require_relative 'booking'
|
9
|
-
require_relative 'payment'
|
10
|
-
|
11
|
-
require_relative 'customer'
|
12
|
-
require_relative 'session'
|
13
|
-
|
14
|
-
require_relative 'answer'
|
15
|
-
require_relative '../address'
|
16
|
-
|
17
|
-
collection :bookings, Channel::Booking
|
18
|
-
collection :payments, Channel::Payment
|
19
|
-
collection :answers, Channel::Answer
|
20
|
-
|
21
|
-
association :customer, Channel::Customer
|
22
|
-
association :session, Channel::Session
|
23
|
-
association :address, Tickethub::Address
|
24
|
-
|
25
|
-
attribute :total, type: :money
|
26
|
-
attribute :balance, type: :money
|
27
|
-
attribute :currency, type: :currency
|
28
|
-
|
29
|
-
attribute :expires_at, type: :datetime
|
30
|
-
attribute :confirmed_at, type: :datetime
|
31
|
-
attribute :created_at, type: :datetime
|
32
|
-
attribute :updated_at, type: :datetime
|
33
|
-
|
34
|
-
def confirm(params = {})
|
35
|
-
self.load @endpoint[:confirm].post(params)
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Payment < Resource
|
5
|
-
path '/channel/payments'
|
6
|
-
|
7
|
-
require_relative 'refund'
|
8
|
-
|
9
|
-
require_relative 'payment/paypal'
|
10
|
-
require_relative 'payment/stripe'
|
11
|
-
|
12
|
-
require_relative 'order'
|
13
|
-
|
14
|
-
association :order, Channel::Order
|
15
|
-
|
16
|
-
collection :refunds, Channel::Refund
|
17
|
-
|
18
|
-
attribute :amount, type: :money
|
19
|
-
attribute :refunded, type: :money
|
20
|
-
attribute :balance, type: :money
|
21
|
-
attribute :refunded_at, type: :datetime
|
22
|
-
attribute :confirmed_at, type: :datetime
|
23
|
-
|
24
|
-
attribute :created_at, type: :datetime
|
25
|
-
attribute :updated_at, type: :datetime
|
26
|
-
end
|
27
|
-
end
|
@@ -1,35 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Product < Resource
|
5
|
-
path '/channel/products'
|
6
|
-
|
7
|
-
require_relative 'booking'
|
8
|
-
require_relative 'extra'
|
9
|
-
require_relative 'option'
|
10
|
-
require_relative 'tier'
|
11
|
-
require_relative 'variant'
|
12
|
-
require_relative 'question'
|
13
|
-
require_relative 'tax'
|
14
|
-
|
15
|
-
require_relative '../contact'
|
16
|
-
require_relative '../address'
|
17
|
-
|
18
|
-
association :contact, Tickethub::Contact
|
19
|
-
association :address, Tickethub::Address
|
20
|
-
|
21
|
-
collection :bookings, Channel::Booking
|
22
|
-
collection :extras, Channel::Extra
|
23
|
-
collection :options, Channel::Option
|
24
|
-
collection :tiers, Channel::Tier
|
25
|
-
collection :variants, Channel::Variant
|
26
|
-
collection :questions, Channel::Question
|
27
|
-
collection :taxes, Channel::Tax
|
28
|
-
|
29
|
-
attribute :time_zone, type: :timezone
|
30
|
-
attribute :currency, type: :currency
|
31
|
-
|
32
|
-
attribute :created_at, type: :datetime
|
33
|
-
attribute :updated_at, type: :datetime
|
34
|
-
end
|
35
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Purchase < Resource
|
5
|
-
path '/channel/purchases'
|
6
|
-
|
7
|
-
require_relative 'booking'
|
8
|
-
require_relative 'extra'
|
9
|
-
|
10
|
-
association :booking, Channel::Booking
|
11
|
-
association :extra, Channel::Extra
|
12
|
-
|
13
|
-
attribute :price, type: :money
|
14
|
-
attribute :total, type: :money
|
15
|
-
|
16
|
-
attribute :updated_at, type: :datetime
|
17
|
-
attribute :created_at, type: :datetime
|
18
|
-
end
|
19
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Refund < Resource
|
5
|
-
path '/channel/refunds'
|
6
|
-
|
7
|
-
require_relative 'payment'
|
8
|
-
|
9
|
-
association :payment, Channel::Payment
|
10
|
-
|
11
|
-
attribute :amount, type: :money
|
12
|
-
|
13
|
-
attribute :created_at, type: :datetime
|
14
|
-
attribute :updated_at, type: :datetime
|
15
|
-
end
|
16
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Supplier < Resource
|
5
|
-
path '/channel/suppliers'
|
6
|
-
|
7
|
-
require_relative '../contact'
|
8
|
-
require_relative '../address'
|
9
|
-
|
10
|
-
association :contact, Tickethub::Contact
|
11
|
-
association :address, Tickethub::Address
|
12
|
-
|
13
|
-
attribute :time_zone, type: :timezone
|
14
|
-
attribute :currency, type: :currency
|
15
|
-
|
16
|
-
attribute :created_at, type: :datetime
|
17
|
-
attribute :updated_at, type: :datetime
|
18
|
-
end
|
19
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Tax < Resource
|
5
|
-
path '/channel/taxes'
|
6
|
-
|
7
|
-
require_relative 'fee'
|
8
|
-
|
9
|
-
collection :fees, Channel::Fee
|
10
|
-
|
11
|
-
attribute :updated_at, type: :datetime
|
12
|
-
attribute :created_at, type: :datetime
|
13
|
-
end
|
14
|
-
end
|
@@ -1,23 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Ticket < Resource
|
5
|
-
path '/channel/tickets'
|
6
|
-
|
7
|
-
require_relative 'booking'
|
8
|
-
require_relative 'tier'
|
9
|
-
require_relative 'voucher'
|
10
|
-
|
11
|
-
association :booking, Channel::Booking
|
12
|
-
association :tier, Channel::Tier
|
13
|
-
association :voucher, Channel::Voucher
|
14
|
-
|
15
|
-
attribute :price, type: :money
|
16
|
-
attribute :interval, type: :duration
|
17
|
-
|
18
|
-
attribute :last_scan_at, type: :datetime
|
19
|
-
attribute :expires_at, type: :datetime
|
20
|
-
attribute :updated_at, type: :datetime
|
21
|
-
attribute :created_at, type: :datetime
|
22
|
-
end
|
23
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Tier < Resource
|
5
|
-
path '/channel/tiers'
|
6
|
-
|
7
|
-
attribute :price, type: :money
|
8
|
-
|
9
|
-
attribute :notice, type: :duration
|
10
|
-
attribute :period, type: :duration
|
11
|
-
|
12
|
-
attribute :interval, type: :duration
|
13
|
-
attribute :duration, type: :duration
|
14
|
-
end
|
15
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
require_relative '../resource'
|
2
|
-
|
3
|
-
module Tickethub
|
4
|
-
class Channel::Voucher < Resource
|
5
|
-
path '/channel/vouchers'
|
6
|
-
|
7
|
-
require_relative 'tier'
|
8
|
-
require_relative 'booking'
|
9
|
-
|
10
|
-
association :tier, Channel::Tier
|
11
|
-
association :booking, Channel::Booking
|
12
|
-
|
13
|
-
attribute :price, type: :money
|
14
|
-
attribute :total, type: :money
|
15
|
-
|
16
|
-
attribute :created_at, type: :datetime
|
17
|
-
attribute :updated_at, type: :datetime
|
18
|
-
end
|
19
|
-
end
|
data/lib/tickethub/channel.rb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
module Tickethub
|
2
|
-
class Channel < Resource
|
3
|
-
path '/channel', singleton: true
|
4
|
-
|
5
|
-
require_relative 'channel/voucher'
|
6
|
-
require_relative 'channel/coupon'
|
7
|
-
require_relative 'channel/tier'
|
8
|
-
require_relative 'channel/variant'
|
9
|
-
require_relative 'channel/extra'
|
10
|
-
require_relative 'channel/question'
|
11
|
-
require_relative 'channel/booking'
|
12
|
-
require_relative 'channel/order'
|
13
|
-
require_relative 'channel/payment'
|
14
|
-
require_relative 'channel/option'
|
15
|
-
|
16
|
-
require_relative 'channel/product'
|
17
|
-
require_relative 'channel/supplier'
|
18
|
-
|
19
|
-
collection :vouchers, Voucher
|
20
|
-
collection :coupons, Coupon
|
21
|
-
collection :tiers, Tier
|
22
|
-
collection :variants, Variant
|
23
|
-
collection :extras, Extra
|
24
|
-
collection :questions, Question
|
25
|
-
collection :bookings, Booking
|
26
|
-
collection :orders, Order
|
27
|
-
collection :payments, Payment
|
28
|
-
collection :options, Option
|
29
|
-
|
30
|
-
association :product, Product
|
31
|
-
association :supplier, Supplier
|
32
|
-
|
33
|
-
def self.[](attributes)
|
34
|
-
token = attributes[:token].is_a?(String) ? attributes[:token]
|
35
|
-
: attributes[:token][:access_token]
|
36
|
-
self.call Tickethub.endpoint(auth_type: :bearer, password: token)[path]
|
37
|
-
end
|
38
|
-
|
39
|
-
def initialize(endpoint, attributes = nil)
|
40
|
-
attributes ||= endpoint.get
|
41
|
-
|
42
|
-
if attributes['token']
|
43
|
-
endpoint = Tickethub.endpoint(auth_type: :bearer,
|
44
|
-
password: attributes['token']['access_token'])[self.class.path]
|
45
|
-
end
|
46
|
-
|
47
|
-
super(endpoint, attributes)
|
48
|
-
end
|
49
|
-
end
|
50
|
-
end
|