killbill-client 0.10.4 → 0.10.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/lib/killbill_client/models/account.rb +12 -0
- data/lib/killbill_client/models/tenant.rb +52 -0
- data/lib/killbill_client/version.rb +1 -1
- metadata +14 -14
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
ZDNmNWQyNDQwNTNjYjc4MTIyMzRiODljMzBlMTQ0ZDg2YjM0OTI2Nw==
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a994063768b26d9a7b03c3f13cababeaf7fb4514
|
4
|
+
data.tar.gz: c1fd0c432a3e6308aa84af6c13f84df53893f54f
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
NDI5MTdjMTMyZWQ0NmYyYzkxZjQ1YjQ0Y2E1ZjM3MmM0MzA1MjNlMTUxNGQw
|
11
|
-
NGUxZDI1NGRkMTQ1ZTdmYzQxN2VmOWQwMDc1NmJkODMwMWYxODI=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
M2UzODhkNDU1ZDc3ODZkMDEyOTRhZTkxYjM3Njg4MDFkODU4Njg5OWFhNThk
|
14
|
-
ODE4ODI1YjI2NWIxODI0MzRjNTFhYzMwNmI2ZGY3ZjlmNDg1Y2I5OGI0OGQ5
|
15
|
-
M2NlNTM5M2U0OTdkMjhmNmNmNmZkNzIzNTRjZjQ0NTY0MjQxMmE=
|
6
|
+
metadata.gz: 697e6139c8ed803cdbba9c06bbeeabbdf5f2a6e412cbd72ff15a628b4a7eef1f60bfed0efbfb970238b4d25fba2a33fdaeedd886f0bcb1c43a7490545bd8c05f
|
7
|
+
data.tar.gz: 6e8adeba7717eb345fb380eb265313f87902b445a84f8cc37cd467497ffe97a741288bb988f4c34fe8c743d0f1cf59dd60e03af749d4cfea4eedad67f5fb6fc9
|
@@ -67,6 +67,18 @@ module KillBillClient
|
|
67
67
|
created_account.refresh(options)
|
68
68
|
end
|
69
69
|
|
70
|
+
def update(user = nil, reason = nil, comment = nil, options = {})
|
71
|
+
updated_account = self.class.put "#{KILLBILL_API_ACCOUNTS_PREFIX}/#{account_id}",
|
72
|
+
to_json,
|
73
|
+
{},
|
74
|
+
{
|
75
|
+
:user => user,
|
76
|
+
:reason => reason,
|
77
|
+
:comment => comment,
|
78
|
+
}.merge(options)
|
79
|
+
updated_account.refresh(options)
|
80
|
+
end
|
81
|
+
|
70
82
|
def bundles(options = {})
|
71
83
|
self.class.get "#{KILLBILL_API_ACCOUNTS_PREFIX}/#{account_id}/bundles",
|
72
84
|
{},
|
@@ -17,8 +17,60 @@ module KillBillClient
|
|
17
17
|
{},
|
18
18
|
options
|
19
19
|
end
|
20
|
+
|
21
|
+
def get_tenant_plugin_config(plugin_name, options = {})
|
22
|
+
if options[:api_key].nil? || options[:api_secret].nil?
|
23
|
+
raise ArgumentError, "Retrieving a plugin config is only supported in multi-tenant mode"
|
24
|
+
end
|
25
|
+
|
26
|
+
uri = KILLBILL_API_TENANTS_PREFIX + "/uploadPluginConfig/" + plugin_name
|
27
|
+
get uri,
|
28
|
+
{},
|
29
|
+
{
|
30
|
+
}.merge(options),
|
31
|
+
KillBillClient::Model::TenantKeyAttributes
|
32
|
+
end
|
33
|
+
|
34
|
+
def upload_tenant_plugin_config(plugin_name, plugin_config, user = nil, reason = nil, comment = nil, options = {})
|
35
|
+
if options[:api_key].nil? || options[:api_secret].nil?
|
36
|
+
raise ArgumentError, "Uploading a plugin config is only supported in multi-tenant mode"
|
37
|
+
end
|
38
|
+
|
39
|
+
uri = KILLBILL_API_TENANTS_PREFIX + "/uploadPluginConfig/" + plugin_name
|
40
|
+
post uri,
|
41
|
+
plugin_config,
|
42
|
+
{
|
43
|
+
},
|
44
|
+
{
|
45
|
+
:content_type => 'text/plain',
|
46
|
+
:user => user,
|
47
|
+
:reason => reason,
|
48
|
+
:comment => comment,
|
49
|
+
}.merge(options)
|
50
|
+
get_tenant_plugin_config(plugin_name, options)
|
51
|
+
end
|
52
|
+
|
53
|
+
def delete_tenant_plugin_config(plugin_name, user = nil, reason = nil, comment = nil, options = {})
|
54
|
+
if options[:api_key].nil? || options[:api_secret].nil?
|
55
|
+
raise ArgumentError, "Uploading a plugin config is only supported in multi-tenant mode"
|
56
|
+
end
|
57
|
+
|
58
|
+
uri = KILLBILL_API_TENANTS_PREFIX + "/uploadPluginConfig/" + plugin_name
|
59
|
+
delete uri,
|
60
|
+
{},
|
61
|
+
{
|
62
|
+
},
|
63
|
+
{
|
64
|
+
:content_type => 'text/plain',
|
65
|
+
:user => user,
|
66
|
+
:reason => reason,
|
67
|
+
:comment => comment,
|
68
|
+
}.merge(options)
|
69
|
+
|
70
|
+
end
|
20
71
|
end
|
21
72
|
|
73
|
+
|
22
74
|
def create(user = nil, reason = nil, comment = nil, options = {})
|
23
75
|
created_tenant = self.class.post KILLBILL_API_TENANTS_PREFIX,
|
24
76
|
to_json,
|
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: killbill-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Killbill core team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 1.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: 10.0.0
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 10.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - ~>
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: 2.12.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - ~>
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: 2.12.0
|
55
55
|
description: An API client library for Kill Bill.
|
@@ -58,8 +58,8 @@ executables: []
|
|
58
58
|
extensions: []
|
59
59
|
extra_rdoc_files: []
|
60
60
|
files:
|
61
|
-
- .gitignore
|
62
|
-
- .travis.yml
|
61
|
+
- ".gitignore"
|
62
|
+
- ".travis.yml"
|
63
63
|
- Gemfile
|
64
64
|
- README.md
|
65
65
|
- Rakefile
|
@@ -166,18 +166,18 @@ licenses:
|
|
166
166
|
metadata: {}
|
167
167
|
post_install_message:
|
168
168
|
rdoc_options:
|
169
|
-
- --exclude
|
170
|
-
- .
|
169
|
+
- "--exclude"
|
170
|
+
- "."
|
171
171
|
require_paths:
|
172
172
|
- lib
|
173
173
|
required_ruby_version: !ruby/object:Gem::Requirement
|
174
174
|
requirements:
|
175
|
-
- -
|
175
|
+
- - ">="
|
176
176
|
- !ruby/object:Gem::Version
|
177
177
|
version: 1.8.6
|
178
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
179
|
requirements:
|
180
|
-
- -
|
180
|
+
- - ">="
|
181
181
|
- !ruby/object:Gem::Version
|
182
182
|
version: '0'
|
183
183
|
requirements: []
|