tickethub 0.3.20 → 0.3.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/tickethub/supplier/payment.rb +5 -8
- data/lib/tickethub/supplier/refund.rb +18 -0
- data/lib/tickethub/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9e8a89948125c8d6d784e70ca72baf416140339
|
4
|
+
data.tar.gz: 3a2a848b68a9a4c2e9d52e1502db8a9544cac0b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c454b463a8b651f9e5f4daf0388960eb9c03a57ae50a5a648c79a239fc3b93e68c270667c88cba5393e7650c8379d495a3b9e0bbb83e3ff23eb9440fbf324837
|
7
|
+
data.tar.gz: df1bad7968a18dd322fd23ca71061bb4e5a135a33388372e5b56d3ebb4ad0fc79d4c4a8d19f457dea8863ffa05bb9d3ea9f3095382e67cb790458a797e9d606d
|
@@ -5,6 +5,7 @@ module Tickethub
|
|
5
5
|
path '/supplier/payments'
|
6
6
|
|
7
7
|
require_relative 'charge'
|
8
|
+
require_relative 'refund'
|
8
9
|
|
9
10
|
require_relative 'payment/cash'
|
10
11
|
require_relative 'payment/credit'
|
@@ -18,20 +19,16 @@ module Tickethub
|
|
18
19
|
association :order, Supplier::Order
|
19
20
|
association :user, Supplier::User
|
20
21
|
|
22
|
+
collection :refunds, Supplier::Refund
|
23
|
+
|
24
|
+
attribute :balance, type: :money
|
21
25
|
attribute :amount, type: :money
|
22
26
|
attribute :refunded, type: :money
|
23
27
|
attribute :currency, type: :currency
|
24
28
|
attribute :refunded_at, type: :datetime
|
25
29
|
attribute :confirmed_at, type: :datetime
|
30
|
+
|
26
31
|
attribute :created_at, type: :datetime
|
27
32
|
attribute :updated_at, type: :datetime
|
28
|
-
|
29
|
-
def refund(attributes)
|
30
|
-
self.load @endpoint[:refund].post(attributes).decoded
|
31
|
-
return true
|
32
|
-
rescue Tickethub::ResourceInvalid => err
|
33
|
-
self.load Tickethub::Response.new(err.response).decoded
|
34
|
-
return false
|
35
|
-
end
|
36
33
|
end
|
37
34
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require_relative '../resource'
|
2
|
+
|
3
|
+
module Tickethub
|
4
|
+
class Supplier::Refund < Resource
|
5
|
+
path '/supplier/refunds'
|
6
|
+
|
7
|
+
require_relative 'payment'
|
8
|
+
|
9
|
+
association :payment, Supplier::Payment
|
10
|
+
association :user, Supplier::User
|
11
|
+
|
12
|
+
attribute :amount, type: :money
|
13
|
+
attribute :currency, type: :currency
|
14
|
+
|
15
|
+
attribute :created_at, type: :datetime
|
16
|
+
attribute :updated_at, type: :datetime
|
17
|
+
end
|
18
|
+
end
|
data/lib/tickethub/version.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.21
|
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-04-
|
11
|
+
date: 2015-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- lib/tickethub/supplier/question.rb
|
143
143
|
- lib/tickethub/supplier/rate.rb
|
144
144
|
- lib/tickethub/supplier/receipt.rb
|
145
|
+
- lib/tickethub/supplier/refund.rb
|
145
146
|
- lib/tickethub/supplier/reseller.rb
|
146
147
|
- lib/tickethub/supplier/scan.rb
|
147
148
|
- lib/tickethub/supplier/season.rb
|
@@ -185,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
185
186
|
version: '0'
|
186
187
|
requirements: []
|
187
188
|
rubyforge_project:
|
188
|
-
rubygems_version: 2.
|
189
|
+
rubygems_version: 2.2.1
|
189
190
|
signing_key:
|
190
191
|
specification_version: 4
|
191
192
|
summary: API client for tickethub.io
|