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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4b7f11372c7f167b46e042f62818a246344d818
4
- data.tar.gz: 78bb98c7ab424ba5a5129d00a3b81d774bd25da0
3
+ metadata.gz: e9e8a89948125c8d6d784e70ca72baf416140339
4
+ data.tar.gz: 3a2a848b68a9a4c2e9d52e1502db8a9544cac0b2
5
5
  SHA512:
6
- metadata.gz: cb72c87d0fa570b045cc718df7157ce11f50613d057848389efeabce8f8bd95662ecb17408feec5c9b2e9431ab4478f6640a641f84f72f2288fab4fa995cc231
7
- data.tar.gz: 70f07c913e4406e68c9bb75ca72cc39d87c601d8b428787eff72274ab321d61feb60ed73ff5793c03ae61c1636285b08ab78526e89ea4d12b8d8c7a9cd704bf7
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
@@ -1,3 +1,3 @@
1
1
  module Tickethub
2
- VERSION = '0.3.20'
2
+ VERSION = '0.3.21'
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.20
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-17 00:00:00.000000000 Z
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.4.5
189
+ rubygems_version: 2.2.1
189
190
  signing_key:
190
191
  specification_version: 4
191
192
  summary: API client for tickethub.io