tickethub 0.3.74 → 0.3.75

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80b92dac529875c8d3e14016c3b1b2fd0fd20848
4
- data.tar.gz: 6e2940b8a2576cc30073b222a7c0163e1bb2190c
3
+ metadata.gz: 1611de543cf02667a4ad82927d9301fa381e44e4
4
+ data.tar.gz: f4d3a0a6a25662dcc948a2e191adf5210482993d
5
5
  SHA512:
6
- metadata.gz: f5274bd429b2e8f0a0d644c583d09e0f0bd562bc17cc35646a20b099cfc39cad301accdf7fddb5d591d7605e7ff178b87c3ec5ed76f038e4c6e442dacf7a1d87
7
- data.tar.gz: 8774143f2ef3c2fcd64ab6cea5561420a25277b930f7da9fb4b99f7c41377a2c15d5bf18ced33da648c335f221ee738f231ebfc71791eccf1d7729fc2a4fedb5
6
+ metadata.gz: 12164889ca024a1865bf7b937e4cd11a7ba52c4d5e47c861f761c4b9c0351521ac17715a96bb1a5d80cacfbc36146ccc6fb0dd760fb7b4a5c694cdf3987cbf7d
7
+ data.tar.gz: 4828523176d8d89df4c1d36ceb4c4d29dc54bf20b7791d95b937da9a70a5bd771d774dcd2e9cd2edf5589bbd5f1beb0bf4c76a051e57746d46026486574cfe0d
@@ -11,11 +11,12 @@ module Tickethub
11
11
  attr_accessor :cache
12
12
  attr_reader :count, :endpoint, :params
13
13
 
14
- def initialize(endpoint, klass, params = {}, options = {})
14
+ def initialize(endpoint, klass, params = {}, options = {}, cache = nil)
15
15
  @params = params.dup
16
16
  @options = options.dup
17
17
  @endpoint = endpoint
18
18
  @klass = klass
19
+ @cache = cache
19
20
 
20
21
  klass.registered_types.each do |type, options|
21
22
  define_singleton_method type do
@@ -186,14 +186,8 @@ module Tickethub
186
186
 
187
187
  def self.collection(key, klass, options = {}, &block)
188
188
  define_method key do |params = {}|
189
- if @attributes[key.to_sym].is_a? Array
190
- @attributes[key.to_sym].collect do |attrs|
191
- klass.call(@endpoint[key], attrs, options)
192
- end
193
- else
194
- Tickethub::Collection.new(@endpoint[key], klass, params, options).tap do |collection|
195
- collection.instance_eval &block if block
196
- end
189
+ Tickethub::Collection.new(@endpoint[key], klass, params, options, @attributes[key.to_sym]).tap do |collection|
190
+ collection.instance_eval &block if block
197
191
  end
198
192
  end
199
193
  end
@@ -0,0 +1,7 @@
1
+ require_relative '../payment'
2
+
3
+ module Tickethub
4
+ class Supplier::Payment::External < Supplier::Payment
5
+ polymorphic 'ExternalPayment', :direct
6
+ end
7
+ end
@@ -12,6 +12,7 @@ module Tickethub
12
12
  require_relative 'payment/direct'
13
13
  require_relative 'payment/stripe'
14
14
  require_relative 'payment/paypal'
15
+ require_relative 'payment/external'
15
16
  require_relative 'payment/spreedly'
16
17
  require_relative 'payment/handpoint'
17
18
 
@@ -1,3 +1,3 @@
1
1
  module Tickethub
2
- VERSION = '0.3.74'
2
+ VERSION = '0.3.75'
3
3
  end
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.74
4
+ version: 0.3.75
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-12-27 00:00:00.000000000 Z
11
+ date: 2015-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -155,6 +155,7 @@ files:
155
155
  - lib/tickethub/supplier/payment/cash.rb
156
156
  - lib/tickethub/supplier/payment/credit.rb
157
157
  - lib/tickethub/supplier/payment/direct.rb
158
+ - lib/tickethub/supplier/payment/external.rb
158
159
  - lib/tickethub/supplier/payment/handpoint.rb
159
160
  - lib/tickethub/supplier/payment/paypal.rb
160
161
  - lib/tickethub/supplier/payment/spreedly.rb
@@ -204,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
204
205
  version: '0'
205
206
  requirements: []
206
207
  rubyforge_project:
207
- rubygems_version: 2.2.1
208
+ rubygems_version: 2.4.5
208
209
  signing_key:
209
210
  specification_version: 4
210
211
  summary: API client for tickethub.io