killbill-client 0.4.1 → 0.4.2

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.
@@ -45,6 +45,13 @@ module KillBillClient
45
45
  Payment
46
46
  end
47
47
 
48
+ def overdue(options = {})
49
+ self.class.get "#{KILLBILL_API_ACCOUNTS_PREFIX}/#{account_id}/overdue",
50
+ {},
51
+ options,
52
+ OverdueStateAttributes
53
+ end
54
+
48
55
  def tags(audit = 'NONE', options = {})
49
56
  self.class.get "#{KILLBILL_API_ACCOUNTS_PREFIX}/#{account_id}/tags",
50
57
  {
@@ -2,6 +2,35 @@ module KillBillClient
2
2
  module Model
3
3
  class Chargeback < ChargebackAttributes
4
4
  has_many :audit_logs, KillBillClient::Model::AuditLog
5
+
6
+ KILLBILL_API_CHARGEBACKS_PREFIX = "#{KILLBILL_API_PREFIX}/chargebacks"
7
+ =begin
8
+
9
+ Missing id in the Kill Bill server Refund resource
10
+
11
+ class << self
12
+ def find_by_id(account_id, with_balance = false, with_balance_and_cba = false, options = {})
13
+ get "#{KILLBILL_API_CHARGEBACKS_PREFIX}/#{account_id}",
14
+ {
15
+ :accountWithBalance => with_balance,
16
+ :accountWithBalanceAndCBA => with_balance_and_cba
17
+ },
18
+ options
19
+ end
20
+ end
21
+ =end
22
+ def create(user = nil, reason = nil, comment = nil, options = {})
23
+ created_chargeback = self.class.post KILLBILL_API_CHARGEBACKS_PREFIX,
24
+ to_json,
25
+ {},
26
+ {
27
+ :user => user,
28
+ :reason => reason,
29
+ :comment => comment,
30
+ }.merge(options)
31
+ created_chargeback.refresh(options)
32
+ end
33
+
5
34
  end
6
35
  end
7
36
  end
@@ -22,8 +22,8 @@ module KillBillClient
22
22
 
23
23
  end #end class methods
24
24
 
25
- def create(payment_id, refunds, user = nil, reason = nil, comment = nil, options = {})
26
- created_refund = self.class.post "#{Payment::KILLBILL_API_PAYMENTS_PREFIX}/#{payment_id}/refunds",
25
+ def create(user = nil, reason = nil, comment = nil, options = {})
26
+ created_refund = self.class.post "#{Payment::KILLBILL_API_PAYMENTS_PREFIX}/#{@payment_id}/refunds",
27
27
  to_json,
28
28
  {},
29
29
  {
@@ -2,7 +2,7 @@ module KillBillClient
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- PATCH = 1
5
+ PATCH = 2
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  segments:
148
148
  - 0
149
- hash: -4507065036335039450
149
+ hash: -553160826528474314
150
150
  requirements: []
151
151
  rubyforge_project:
152
152
  rubygems_version: 1.8.25