killbill-client 0.21.0 → 0.22.0

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: c6ba172b6c3e28884c9939ef560379b58a773af2
4
- data.tar.gz: 5803a7af74f703770e0310e6c2d36e9b71408db3
3
+ metadata.gz: 34b37123519c3054a175647dbd0f5ae34ec0bc61
4
+ data.tar.gz: f7370410c38b3140cbce3e4369f5adbe5dc210a2
5
5
  SHA512:
6
- metadata.gz: cea82d0386f1b297b0b2cdc9bac0f417b26bdb818970dcf118e7051ed93c1b78658890a666e324f4291fd8f20303bb770962fcdd00a4cc1cc437fd7c96ab3cf0
7
- data.tar.gz: 79b7fb7cb89280568a3cbaa4fc09970675116951fcbf62712e5846b93b1693fafcabc7cd79c7c24f335ef357faf5b6d18a1d6ca25ccb87c779fac8f824562ad2
6
+ metadata.gz: ae3496fe3cd9df265e8ef25b5cde0d3e72ba4cf692bd6c7e6520383a2320da4812a8b5b568b60050476cd1a82d83c90064b49b7d529ab0b58fe5fcb0808e84e7
7
+ data.tar.gz: d124946e01657b2e3d2b20016e824815ab6e40e2b88f33fd47a6afbdcbe539c7d367902d139bf985ff4529a49e46145a975fe5f46182d38f61ac973bce5ad2b2
@@ -121,6 +121,9 @@ module KillBillClient
121
121
  cur_thread_profiling_data = options[:profilingData]
122
122
  end
123
123
 
124
+ if options[:request_id]
125
+ request['X-Request-Id'] = options[:request_id]
126
+ end
124
127
 
125
128
  http = ::Net::HTTP.new uri.host, uri.port
126
129
  http.use_ssl = uri.scheme == 'https'
@@ -156,7 +159,7 @@ module KillBillClient
156
159
  end
157
160
  cur_thread_profiling_data[key] << jaxrs_profiling_header['durationUsec']
158
161
  end
159
-
162
+
160
163
  if KillBillClient.logger
161
164
  #noinspection RubyScope
162
165
  latency = (Time.now - start_time) * 1_000
@@ -0,0 +1,38 @@
1
+ #############################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # Copyright 2014 Groupon, Inc. #
5
+ # Copyright 2014 The Billing Project, LLC #
6
+ # #
7
+ # The Billing Project licenses this file to you under the Apache License, version 2.0 #
8
+ # (the "License"); you may not use this file except in compliance with the #
9
+ # License. You may obtain a copy of the License at: #
10
+ # #
11
+ # http://www.apache.org/licenses/LICENSE-2.0 #
12
+ # #
13
+ # Unless required by applicable law or agreed to in writing, software #
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
16
+ # License for the specific language governing permissions and limitations #
17
+ # under the License. #
18
+ # #
19
+ #############################################################################################
20
+
21
+
22
+ #
23
+ # DO NOT EDIT!!!
24
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
25
+ #
26
+
27
+
28
+ module KillBillClient
29
+ module Model
30
+ class PluginInfoAttributes < Resource
31
+ attribute :bundle_symbolic_name
32
+ attribute :plugin_name
33
+ attribute :version
34
+ attribute :running
35
+ attribute :services
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,35 @@
1
+ #############################################################################################
2
+ # #
3
+ # Copyright 2010-2013 Ning, Inc. #
4
+ # Copyright 2014 Groupon, Inc. #
5
+ # Copyright 2014 The Billing Project, LLC #
6
+ # #
7
+ # The Billing Project licenses this file to you under the Apache License, version 2.0 #
8
+ # (the "License"); you may not use this file except in compliance with the #
9
+ # License. You may obtain a copy of the License at: #
10
+ # #
11
+ # http://www.apache.org/licenses/LICENSE-2.0 #
12
+ # #
13
+ # Unless required by applicable law or agreed to in writing, software #
14
+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT #
15
+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the #
16
+ # License for the specific language governing permissions and limitations #
17
+ # under the License. #
18
+ # #
19
+ #############################################################################################
20
+
21
+
22
+ #
23
+ # DO NOT EDIT!!!
24
+ # File automatically generated by killbill-java-parser (git@github.com:killbill/killbill-java-parser.git)
25
+ #
26
+
27
+
28
+ module KillBillClient
29
+ module Model
30
+ class PluginServiceInfoAttributes < Resource
31
+ attribute :service_type_name
32
+ attribute :registration_name
33
+ end
34
+ end
35
+ end
@@ -62,6 +62,8 @@ require 'killbill_client/models/gen/payment_method_attributes'
62
62
  require 'killbill_client/models/gen/payment_transaction_attributes'
63
63
  require 'killbill_client/models/gen/phase_price_override_attributes'
64
64
  require 'killbill_client/models/gen/plan_detail_attributes'
65
+ require 'killbill_client/models/gen/plugin_service_info_attributes'
66
+ require 'killbill_client/models/gen/plugin_info_attributes'
65
67
  require 'killbill_client/models/gen/plugin_property_attributes'
66
68
  require 'killbill_client/models/gen/profiling_data_attributes_item'
67
69
  require 'killbill_client/models/gen/profiling_data_attributes'
@@ -29,9 +29,12 @@ require 'killbill_client/models/payment_method'
29
29
  require 'killbill_client/models/hosted_payment_page'
30
30
  require 'killbill_client/models/combo_hosted_payment_page'
31
31
  require 'killbill_client/models/security'
32
+ require 'killbill_client/models/user_roles'
33
+ require 'killbill_client/models/role_definition'
32
34
  require 'killbill_client/models/tag'
33
35
  require 'killbill_client/models/tag_definition'
34
36
  require 'killbill_client/models/tenant'
37
+ require 'killbill_client/models/plugin_info'
35
38
  require 'killbill_client/models/usage_record'
36
39
  require 'killbill_client/models/rolled_up_usage'
37
40
  require 'killbill_client/models/account_timeline'
@@ -0,0 +1,21 @@
1
+ module KillBillClient
2
+ module Model
3
+ class PluginInfo < PluginInfoAttributes
4
+
5
+ KILLBILL_API_TENANTS_PREFIX = "#{KILLBILL_API_PREFIX}/pluginsInfo"
6
+
7
+ has_many :services, KillBillClient::Model::PluginServiceInfoAttributes
8
+
9
+ class << self
10
+
11
+ def plugins_info(options = {})
12
+ get KILLBILL_API_TENANTS_PREFIX,
13
+ {},
14
+ options
15
+ end
16
+
17
+ end
18
+
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,18 @@
1
+ module KillBillClient
2
+ module Model
3
+ class RoleDefinition < RoleDefinitionAttributes
4
+
5
+ def create(user = nil, reason = nil, comment = nil, options = {})
6
+ created_role = self.class.post "#{Security::KILLBILL_API_SECURITY_PREFIX}/roles",
7
+ to_json,
8
+ {},
9
+ {
10
+ :user => user,
11
+ :reason => reason,
12
+ :comment => comment,
13
+ }.merge(options)
14
+ created_role.refresh(options)
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,42 @@
1
+ module KillBillClient
2
+ module Model
3
+ class UserRoles < UserRolesAttributes
4
+
5
+ def create(user = nil, reason = nil, comment = nil, options = {})
6
+ created_user = self.class.post "#{Security::KILLBILL_API_SECURITY_PREFIX}/users",
7
+ to_json,
8
+ {},
9
+ {
10
+ :user => user,
11
+ :reason => reason,
12
+ :comment => comment,
13
+ }.merge(options)
14
+ created_user.refresh(options)
15
+ end
16
+
17
+ def update(user = nil, reason = nil, comment = nil, options = {})
18
+ url = password.nil? ? "#{Security::KILLBILL_API_SECURITY_PREFIX}/users/#{username}/roles" : "#{Security::KILLBILL_API_SECURITY_PREFIX}/users/#{username}/password"
19
+ updated_user = self.class.put url,
20
+ to_json,
21
+ {},
22
+ {
23
+ :user => user,
24
+ :reason => reason,
25
+ :comment => comment,
26
+ }.merge(options)
27
+ updated_user.refresh(options)
28
+ end
29
+
30
+ def destroy(user = nil, reason = nil, comment = nil, options = {})
31
+ self.class.delete "#{Security::KILLBILL_API_SECURITY_PREFIX}/users/#{username}",
32
+ {},
33
+ {},
34
+ {
35
+ :user => user,
36
+ :reason => reason,
37
+ :comment => comment,
38
+ }.merge(options)
39
+ end
40
+ end
41
+ end
42
+ end
@@ -1,7 +1,7 @@
1
1
  module KillBillClient
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 21
4
+ MINOR = 22
5
5
  PATCH = 0
6
6
  PRE = nil
7
7
 
metadata CHANGED
@@ -1,65 +1,65 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Killbill core team
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-11 00:00:00.000000000 Z
11
+ date: 2015-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
15
- requirement: !ruby/object:Gem::Requirement
15
+ version_requirements: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.2.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
20
+ requirement: !ruby/object:Gem::Requirement
23
21
  requirements:
24
- - - ">="
22
+ - - '>='
25
23
  - !ruby/object:Gem::Version
26
24
  version: 1.2.0
25
+ prerelease: false
26
+ type: :runtime
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
- requirement: !ruby/object:Gem::Requirement
29
+ version_requirements: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 10.0.0
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
34
+ requirement: !ruby/object:Gem::Requirement
37
35
  requirements:
38
- - - ">="
36
+ - - '>='
39
37
  - !ruby/object:Gem::Version
40
38
  version: 10.0.0
39
+ prerelease: false
40
+ type: :development
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
- requirement: !ruby/object:Gem::Requirement
43
+ version_requirements: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.12.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
51
49
  requirements:
52
- - - "~>"
50
+ - - ~>
53
51
  - !ruby/object:Gem::Version
54
52
  version: 2.12.0
53
+ prerelease: false
54
+ type: :development
55
55
  description: An API client library for Kill Bill.
56
56
  email: killbilling-users@googlegroups.com
57
57
  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
@@ -114,7 +114,9 @@ files:
114
114
  - lib/killbill_client/models/gen/phase_price_override_attributes.rb
115
115
  - lib/killbill_client/models/gen/plan_attributes.rb
116
116
  - lib/killbill_client/models/gen/plan_detail_attributes.rb
117
+ - lib/killbill_client/models/gen/plugin_info_attributes.rb
117
118
  - lib/killbill_client/models/gen/plugin_property_attributes.rb
119
+ - lib/killbill_client/models/gen/plugin_service_info_attributes.rb
118
120
  - lib/killbill_client/models/gen/price_attributes.rb
119
121
  - lib/killbill_client/models/gen/product_attributes.rb
120
122
  - lib/killbill_client/models/gen/profiling_data_attributes.rb
@@ -148,9 +150,11 @@ files:
148
150
  - lib/killbill_client/models/phase.rb
149
151
  - lib/killbill_client/models/plan.rb
150
152
  - lib/killbill_client/models/plan_detail.rb
153
+ - lib/killbill_client/models/plugin_info.rb
151
154
  - lib/killbill_client/models/product.rb
152
155
  - lib/killbill_client/models/resource.rb
153
156
  - lib/killbill_client/models/resources.rb
157
+ - lib/killbill_client/models/role_definition.rb
154
158
  - lib/killbill_client/models/rolled_up_usage.rb
155
159
  - lib/killbill_client/models/security.rb
156
160
  - lib/killbill_client/models/subscription.rb
@@ -159,6 +163,7 @@ files:
159
163
  - lib/killbill_client/models/tenant.rb
160
164
  - lib/killbill_client/models/transaction.rb
161
165
  - lib/killbill_client/models/usage_record.rb
166
+ - lib/killbill_client/models/user_roles.rb
162
167
  - lib/killbill_client/utils.rb
163
168
  - lib/killbill_client/version.rb
164
169
  - lib/rails/generators/killbill_client/config_generator.rb
@@ -174,33 +179,26 @@ homepage: http://www.killbilling.org
174
179
  licenses:
175
180
  - Apache License (2.0)
176
181
  metadata: {}
177
- post_install_message:
182
+ post_install_message:
178
183
  rdoc_options:
179
- - "--exclude"
180
- - "."
184
+ - --exclude
185
+ - .
181
186
  require_paths:
182
187
  - lib
183
188
  required_ruby_version: !ruby/object:Gem::Requirement
184
189
  requirements:
185
- - - ">="
190
+ - - '>='
186
191
  - !ruby/object:Gem::Version
187
192
  version: 1.8.6
188
193
  required_rubygems_version: !ruby/object:Gem::Requirement
189
194
  requirements:
190
- - - ">="
195
+ - - '>='
191
196
  - !ruby/object:Gem::Version
192
197
  version: '0'
193
198
  requirements: []
194
- rubyforge_project:
195
- rubygems_version: 2.2.2
196
- signing_key:
199
+ rubyforge_project:
200
+ rubygems_version: 2.1.9
201
+ signing_key:
197
202
  specification_version: 4
198
203
  summary: Kill Bill client library.
199
- test_files:
200
- - spec/killbill_client/base_uri_spec.rb
201
- - spec/killbill_client/model_relation_spec.rb
202
- - spec/killbill_client/remote/api_spec.rb
203
- - spec/killbill_client/remote/model_spec.rb
204
- - spec/killbill_client/resource_spec.rb
205
- - spec/killbill_client/resources_spec.rb
206
- - spec/spec_helper.rb
204
+ test_files: []