killbill-client 0.5.2 → 0.5.3

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.
@@ -27,7 +27,59 @@ module KillBillClient
27
27
  {},
28
28
  options
29
29
  end
30
+
31
+ end
32
+
33
+
34
+ # Transfer the bundle to the new account. the new account_id should be set in this object
35
+ def transfer(bundle_id, requested_date = nil, user = nil, reason = nil, comment = nil, options = {})
36
+
37
+ params = {}
38
+ params[:requestedDate] = requested_date unless requested_date.nil?
39
+ result = self.class.put "#{KILLBILL_API_BUNDLES_PREFIX}/#{bundle_id}",
40
+ to_json,
41
+ params,
42
+ {
43
+ :user => user,
44
+ :reason => reason,
45
+ :comment => comment,
46
+ }.merge(options)
47
+
48
+ result.refresh(options)
30
49
  end
50
+
51
+
52
+ # Pause the bundle (and all its subscription)
53
+ def pause(requested_date = nil, user = nil, reason = nil, comment = nil, options = {})
54
+
55
+ params = {}
56
+ params[:requestedDate] = requested_date unless requested_date.nil?
57
+ self.class.put "#{KILLBILL_API_BUNDLES_PREFIX}/#{@bundle_id}/pause",
58
+ {},
59
+ params,
60
+ {
61
+ :user => user,
62
+ :reason => reason,
63
+ :comment => comment,
64
+ }.merge(options)
65
+ end
66
+
67
+
68
+ # Resume the bundle (and all its subscription)
69
+ def resume(requested_date = nil, user = nil, reason = nil, comment = nil, options = {})
70
+
71
+ params = {}
72
+ params[:requestedDate] = requested_date unless requested_date.nil?
73
+ self.class.put "#{KILLBILL_API_BUNDLES_PREFIX}/#{@bundle_id}/resume",
74
+ {},
75
+ params,
76
+ {
77
+ :user => user,
78
+ :reason => reason,
79
+ :comment => comment,
80
+ }.merge(options)
81
+ end
82
+
31
83
  end
32
84
  end
33
85
  end
@@ -0,0 +1,76 @@
1
+ ###################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # #
5
+ # Ning licenses this file to you under the Apache License, version 2.0 #
6
+ # (the "License"); you may not use this file except in compliance with the #
7
+ # License. You may obtain a copy of the License at: #
8
+ # #
9
+ # http://www.apache.org/licenses/LICENSE-2.0 #
10
+ # #
11
+ # Unless required by applicable law or agreed to in writing, software #
12
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
13
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
14
+ # License for the specific language governing permissions and limitations #
15
+ # under the License. #
16
+ # #
17
+ ###################################################################################
18
+
19
+
20
+ #
21
+ # DO NOT EDIT!!!
22
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
23
+ #
24
+
25
+
26
+ module Killbill
27
+ module Plugin
28
+ module Model
29
+
30
+ java_package 'java.util'
31
+
32
+ include java.util.Iterator
33
+ class EnumeratorIterator
34
+
35
+ def initialize(delegate)
36
+ @buffer = []
37
+ # We expect an Enumerable or Enumerator
38
+ @delegate = delegate.is_a?(Enumerable) ? delegate.to_enum : delegate
39
+ _next
40
+ end
41
+
42
+ def has_next
43
+ !@next.nil?
44
+ end
45
+
46
+ def next
47
+ prev = @next
48
+ _next
49
+ prev
50
+ end
51
+
52
+ def remove
53
+ raise NotImplementedError.new
54
+ end
55
+
56
+ private
57
+
58
+ def _next
59
+ @next = @buffer.shift
60
+ return unless @next.nil?
61
+
62
+ @next = @delegate.next rescue nil
63
+ return if @next.nil?
64
+
65
+ if @next.is_a? Enumerable
66
+ @buffer += @next.to_a
67
+ else
68
+ @buffer << @next
69
+ end
70
+ _next
71
+ end
72
+
73
+ end
74
+ end
75
+ end
76
+ end
@@ -77,6 +77,23 @@ module KillBillClient
77
77
  }.merge(options)
78
78
  end
79
79
 
80
+ #
81
+ # Uncancel a future cancelled entitlement
82
+ #
83
+ #
84
+ def uncancel(user = nil, reason = nil, comment = nil, options = {})
85
+
86
+ params = {}
87
+ return self.class.put "#{KILLBILL_API_ENTITLEMENT_PREFIX}/#{@subscription_id}/uncancel",
88
+ nil,
89
+ params,
90
+ {
91
+ :user => user,
92
+ :reason => reason,
93
+ :comment => comment,
94
+ }.merge(options)
95
+ end
96
+
80
97
  end
81
98
  end
82
99
  end
@@ -2,7 +2,7 @@ module KillBillClient
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
- PATCH = 2
5
+ PATCH = 3
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
metadata CHANGED
@@ -1,72 +1,72 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
5
- prerelease:
4
+ version: 0.5.3
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Killbill core team
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-11-14 00:00:00.000000000 Z
12
+ date: 2013-11-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json
16
- version_requirements: !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
17
18
  requirements:
18
- - - "~>"
19
+ - - ~>
19
20
  - !ruby/object:Gem::Version
20
21
  version: 1.8.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
21
25
  none: false
22
- requirement: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ~>
25
28
  - !ruby/object:Gem::Version
26
29
  version: 1.8.0
27
- none: false
28
- prerelease: false
29
- type: :runtime
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: rake
32
- version_requirements: !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
33
34
  requirements:
34
- - - ">="
35
+ - - ! '>='
35
36
  - !ruby/object:Gem::Version
36
37
  version: 10.0.0
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
37
41
  none: false
38
- requirement: !ruby/object:Gem::Requirement
39
42
  requirements:
40
- - - ">="
43
+ - - ! '>='
41
44
  - !ruby/object:Gem::Version
42
45
  version: 10.0.0
43
- none: false
44
- prerelease: false
45
- type: :development
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: rspec
48
- version_requirements: !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
49
50
  requirements:
50
- - - "~>"
51
+ - - ~>
51
52
  - !ruby/object:Gem::Version
52
53
  version: 2.12.0
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
53
57
  none: false
54
- requirement: !ruby/object:Gem::Requirement
55
58
  requirements:
56
- - - "~>"
59
+ - - ~>
57
60
  - !ruby/object:Gem::Version
58
61
  version: 2.12.0
59
- none: false
60
- prerelease: false
61
- type: :development
62
62
  description: An API client library for Kill Bill.
63
63
  email: killbilling-users@googlegroups.com
64
64
  executables: []
65
65
  extensions: []
66
66
  extra_rdoc_files: []
67
67
  files:
68
- - ".gitignore"
69
- - ".travis.yml"
68
+ - .gitignore
69
+ - .travis.yml
70
70
  - Gemfile
71
71
  - README.md
72
72
  - Rakefile
@@ -83,6 +83,7 @@ files:
83
83
  - lib/killbill_client/models/chargeback.rb
84
84
  - lib/killbill_client/models/credit.rb
85
85
  - lib/killbill_client/models/event_subscription.rb
86
+ - lib/killbill_client/models/foo.rb
86
87
  - lib/killbill_client/models/gen/account_attributes.rb
87
88
  - lib/killbill_client/models/gen/account_email_attributes.rb
88
89
  - lib/killbill_client/models/gen/account_timeline_attributes.rb
@@ -144,32 +145,31 @@ files:
144
145
  homepage: http://www.killbilling.org
145
146
  licenses:
146
147
  - Apache License (2.0)
147
- post_install_message:
148
+ post_install_message:
148
149
  rdoc_options:
149
- - "--exclude"
150
- - "."
150
+ - --exclude
151
+ - .
151
152
  require_paths:
152
153
  - lib
153
154
  required_ruby_version: !ruby/object:Gem::Requirement
155
+ none: false
154
156
  requirements:
155
- - - ">="
157
+ - - ! '>='
156
158
  - !ruby/object:Gem::Version
157
159
  version: 1.8.6
158
- none: false
159
160
  required_rubygems_version: !ruby/object:Gem::Requirement
161
+ none: false
160
162
  requirements:
161
- - - ">="
163
+ - - ! '>='
162
164
  - !ruby/object:Gem::Version
165
+ version: '0'
163
166
  segments:
164
167
  - 0
165
- version: !binary |-
166
- MA==
167
- hash: 2
168
- none: false
168
+ hash: 2216717962221643340
169
169
  requirements: []
170
- rubyforge_project:
171
- rubygems_version: 1.8.24
172
- signing_key:
170
+ rubyforge_project:
171
+ rubygems_version: 1.8.25
172
+ signing_key:
173
173
  specification_version: 3
174
174
  summary: Kill Bill client library.
175
175
  test_files: