killbill-client 0.11.0 → 0.11.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f8bbf81f00632dafea137b5d67ac6fdb675c63c1
4
- data.tar.gz: 90c80956db2001466143f65080cc5fc8c736c381
3
+ metadata.gz: b92f0d9cc2283108856cd2222996a339e0b88e22
4
+ data.tar.gz: 78a52d32a195e311dcfa3203d7d5a01cad55e47b
5
5
  SHA512:
6
- metadata.gz: 397a5dc633d90086fb3b765d6ff709c99e8fce41671a46ea4f3b769ffa5202126a26581e4781cc9c19dac6e4ef73c8b1b7f3833a6890affa7d487bd8e377b39d
7
- data.tar.gz: 0c06adc74ffd961a268008de64078706f9f2b320bbb32487287ef06427b827bd9af263dd9cbe8a6f667ef46c1dae5e7e146b3bb46c27ebdbc1910b1816a4adee
6
+ metadata.gz: dbe439b504bf311cde4bea182d3185362b9e7045de4c1d083b48d0245a75c51b50c1fe564b41eaf97c856c34ba516c10a5c78e78ac29522835a48ac47678955a
7
+ data.tar.gz: 4cdd6897dd3b895cb201b42f47a427017779e1e18ed4b5759d84f4da39bebc7bb630481020d3f3e36903e5361d07c72439c2776e28f124a5921e223732e6a6a9
@@ -19,10 +19,35 @@ module KillBillClient
19
19
  end
20
20
 
21
21
  def get_tenant_plugin_config(plugin_name, options = {})
22
+ get_tenant_key_value(plugin_name, "uploadPluginConfig", "plugin config", options)
23
+ end
24
+
25
+ def upload_tenant_plugin_config(plugin_name, plugin_config, user = nil, reason = nil, comment = nil, options = {})
26
+ upload_tenant_key_value(plugin_name, plugin_config, "uploadPluginConfig", "get_tenant_plugin_config", "plugin config", user, reason, comment, options)
27
+ end
28
+
29
+ def delete_tenant_plugin_config(plugin_name, user = nil, reason = nil, comment = nil, options = {})
30
+ delete_tenant_user_key_value(plugin_name, "uploadPluginConfig", "plugin config", user, reason, comment, options)
31
+ end
32
+
33
+ def get_tenant_user_key_value(key_name, options = {})
34
+ get_tenant_key_value(key_name, "userKeyValue", "tenant key/value", options)
35
+ end
36
+
37
+ def upload_tenant_user_key_value(key_name, key_value, user = nil, reason = nil, comment = nil, options = {})
38
+ upload_tenant_key_value(key_name, key_value, "userKeyValue", "get_tenant_user_key_value", "tenant key/value", user, reason, comment, options)
39
+ end
40
+
41
+
42
+ def delete_tenant_user_key_value(key_name, user = nil, reason = nil, comment = nil, options = {})
43
+ delete_tenant_user_key_value(key_name, "userKeyValue", "tenant key/value", user, reason, comment, options)
44
+ end
22
45
 
23
- require_multi_tenant_options!(options, "Retrieving a plugin config is only supported in multi-tenant mode")
46
+ def get_tenant_key_value(key_name, key_path, error_id_str, options = {})
24
47
 
25
- uri = KILLBILL_API_TENANTS_PREFIX + "/uploadPluginConfig/" + plugin_name
48
+ require_multi_tenant_options!(options, "Retrieving a #{error_id_str} is only supported in multi-tenant mode")
49
+
50
+ uri = KILLBILL_API_TENANTS_PREFIX + "/#{key_path}/" + key_name
26
51
  get uri,
27
52
  {},
28
53
  {
@@ -30,13 +55,14 @@ module KillBillClient
30
55
  KillBillClient::Model::TenantKeyAttributes
31
56
  end
32
57
 
33
- def upload_tenant_plugin_config(plugin_name, plugin_config, user = nil, reason = nil, comment = nil, options = {})
34
58
 
35
- require_multi_tenant_options!(options, "Uploading a plugin config is only supported in multi-tenant mode")
59
+ def upload_tenant_key_value(key_name, key_value, key_path, get_method, error_id_str, user = nil, reason = nil, comment = nil, options = {})
36
60
 
37
- uri = KILLBILL_API_TENANTS_PREFIX + "/uploadPluginConfig/" + plugin_name
61
+ require_multi_tenant_options!(options, "Uploading a #{error_id_str} is only supported in multi-tenant mode")
62
+
63
+ uri = KILLBILL_API_TENANTS_PREFIX + "/#{key_path}/" + key_name
38
64
  post uri,
39
- plugin_config,
65
+ key_value,
40
66
  {
41
67
  },
42
68
  {
@@ -45,27 +71,27 @@ module KillBillClient
45
71
  :reason => reason,
46
72
  :comment => comment,
47
73
  }.merge(options)
48
- get_tenant_plugin_config(plugin_name, options)
74
+ send(get_method.to_sym, key_name, options)
49
75
  end
50
76
 
51
- def delete_tenant_plugin_config(plugin_name, user = nil, reason = nil, comment = nil, options = {})
52
77
 
53
- require_multi_tenant_options!(options, "Uploading a plugin config is only supported in multi-tenant mode")
78
+ def delete_tenant_user_key_value(key_name, key_path, error_id_str, user = nil, reason = nil, comment = nil, options = {})
54
79
 
55
- uri = KILLBILL_API_TENANTS_PREFIX + "/uploadPluginConfig/" + plugin_name
80
+ require_multi_tenant_options!(options, "Deleting a #{error_id_str} is only supported in multi-tenant mode")
81
+
82
+ uri = KILLBILL_API_TENANTS_PREFIX + "/#{key_path}/" + key_name
56
83
  delete uri,
57
- {},
58
- {
59
- },
60
- {
61
- :content_type => 'text/plain',
62
- :user => user,
63
- :reason => reason,
64
- :comment => comment,
65
- }.merge(options)
84
+ {},
85
+ {
86
+ },
87
+ {
88
+ :content_type => 'text/plain',
89
+ :user => user,
90
+ :reason => reason,
91
+ :comment => comment,
92
+ }.merge(options)
66
93
 
67
94
  end
68
-
69
95
  end
70
96
 
71
97
 
@@ -2,7 +2,7 @@ module KillBillClient
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 11
5
- PATCH = 0
5
+ PATCH = 1
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
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-03-30 00:00:00.000000000 Z
11
+ date: 2015-04-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json