killbill-client 3.3.1 → 4.0.1

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: 03e77573407a78aef2165e380bc7e1d0f672b53d
4
- data.tar.gz: 27e12ebd3c57f128cdd181c16e77e19d4be9daa5
3
+ metadata.gz: b5092e81bd027f03e605324305a7d002e500af57
4
+ data.tar.gz: 132d0769150bfdaa56913ac9363a826e25a4787b
5
5
  SHA512:
6
- metadata.gz: 88715661ffaa19c983d3c0ba9a091cbd4c8cd9a242675de0e44a43c8d9cbf6aad172620a1902d545c6d6ec0964cf161bcb5793b7f69f7a2cb50cc8315db2994b
7
- data.tar.gz: 5d199dffd09feffc3a02c83b9e886c29ba84c6d8317603146eff9e931d708cb69aed72c763b9ac5c38de46ac6632ad697c9c4ce94ceee83128fe2cfbdddf3ad1
6
+ metadata.gz: 2898a7932bd29750e97aebbb2d814e850a8f0991a7be153d3cbb0da8d90d0880fc31852b704b893d733ee7be0f60e49576ddbda4860ceadcb1bfa2f4d0abdff4
7
+ data.tar.gz: f8710f1d73525c46938e6dceb3b81a2d7bf1795c02532b567f9fa94990540cdea4baf24f2a283be12ac86fa7144ddfaaf788b994aa55cb0ca8b226ac9bbc2adf
@@ -0,0 +1,7 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "daily"
7
+ target-branch: "work-for-release-0.23.x"
@@ -0,0 +1,29 @@
1
+ name: "CodeQL"
2
+
3
+ on:
4
+ - push
5
+ - workflow_dispatch
6
+
7
+ jobs:
8
+ analyze:
9
+ name: Analyze
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ actions: read
13
+ contents: read
14
+ security-events: write
15
+ strategy:
16
+ fail-fast: false
17
+ matrix:
18
+ language: [ 'ruby' ]
19
+ steps:
20
+ - name: Checkout repository
21
+ uses: actions/checkout@v2
22
+ - name: Initialize CodeQL
23
+ uses: github/codeql-action/init@v1
24
+ with:
25
+ languages: ${{ matrix.language }}
26
+ - name: Autobuild
27
+ uses: github/codeql-action/autobuild@v1
28
+ - name: Perform CodeQL Analysis
29
+ uses: github/codeql-action/analyze@v1
data/README.md CHANGED
@@ -12,6 +12,7 @@ Kill Bill compatibility
12
12
  | 1.x.y | 0.18.z |
13
13
  | 2.x.y | 0.20.z |
14
14
  | 3.x.y | 0.22.z |
15
+ | 4.x.y | 0.24.z |
15
16
 
16
17
  Installation
17
18
  ------------
@@ -25,7 +26,7 @@ gem install killbill-client
25
26
  Alternatively, add the dependency in your Gemfile:
26
27
 
27
28
  ```
28
- gem 'killbill-client', '~> 1.0'
29
+ gem 'killbill-client'
29
30
  ```
30
31
 
31
32
  Authentication
@@ -25,7 +25,7 @@ Gem::Specification.new do |s|
25
25
 
26
26
  s.required_ruby_version = '>= 1.8.6'
27
27
 
28
- s.license = 'Apache License (2.0)'
28
+ s.license = 'Apache-2.0'
29
29
 
30
30
  s.author = 'Killbill core team'
31
31
  s.email = 'killbilling-users@googlegroups.com'
@@ -39,11 +39,7 @@ Gem::Specification.new do |s|
39
39
 
40
40
  s.rdoc_options << '--exclude' << '.'
41
41
 
42
- if RUBY_VERSION < '2.0.0'
43
- s.add_dependency 'json', '>= 1.2.0', '< 2.0.0'
44
- end
45
-
46
42
  s.add_development_dependency 'gem-release', '~> 2.2'
47
- s.add_development_dependency 'rake', '>= 10.0.0', '< 11.0.0'
43
+ s.add_development_dependency 'rake', '~> 13.0'
48
44
  s.add_development_dependency 'rspec', '~> 3.4'
49
45
  end
@@ -146,6 +146,7 @@ module KillBillClient
146
146
  def invoices(options = {})
147
147
  self.class.get "#{KILLBILL_API_ACCOUNTS_PREFIX}/#{account_id}/invoices",
148
148
  {
149
+ :includeInvoiceComponents => true
149
150
  },
150
151
  options,
151
152
  Invoice
@@ -7,43 +7,51 @@ module KillBillClient
7
7
  KILLBILL_API_CATALOG_PREFIX = "#{KILLBILL_API_PREFIX}/catalog"
8
8
 
9
9
  class << self
10
- def simple_catalog(options = {})
10
+ def simple_catalog(account_id = nil, options = {})
11
11
  get "#{KILLBILL_API_CATALOG_PREFIX}",
12
- {},
12
+ {
13
+ :accountId => account_id
14
+ },
13
15
  options
14
16
  end
15
17
 
16
- def available_addons(base_product_name, options = {})
18
+ def available_addons(base_product_name, account_id = nil, options = {})
17
19
  get "#{KILLBILL_API_CATALOG_PREFIX}/availableAddons",
18
20
  {
19
- :baseProductName => base_product_name
21
+ :baseProductName => base_product_name,
22
+ :accountId => account_id
20
23
  },
21
24
  options,
22
25
  PlanDetail
23
26
  end
24
27
 
25
- def available_base_plans(options = {})
28
+ def available_base_plans(account_id = nil, options = {})
26
29
  get "#{KILLBILL_API_CATALOG_PREFIX}/availableBasePlans",
27
- {},
30
+ {
31
+ :accountId => account_id
32
+ },
28
33
  options,
29
34
  PlanDetail
30
35
  end
31
36
 
32
- def get_tenant_catalog_versions(options = {})
37
+ def get_tenant_catalog_versions(account_id = nil, options = {})
33
38
 
34
39
  require_multi_tenant_options!(options, "Retrieving catalog versions is only supported in multi-tenant mode")
35
40
 
36
41
  get "#{KILLBILL_API_CATALOG_PREFIX}/versions",
37
- {},
42
+ {
43
+ :accountId => account_id
44
+ },
38
45
  options
39
46
  end
40
47
 
41
- def get_tenant_catalog_xml(requested_date = nil, options = {})
48
+ def get_tenant_catalog_xml(requested_date = nil, account_id = nil, options = {})
42
49
 
43
50
  require_multi_tenant_options!(options, "Retrieving a catalog is only supported in multi-tenant mode")
44
51
 
45
52
  params = {}
46
53
  params[:requestedDate] = requested_date if requested_date
54
+ params[:account_id] = account_id if account_id
47
55
 
48
56
  get "#{KILLBILL_API_CATALOG_PREFIX}/xml",
49
57
  params,
@@ -55,12 +63,13 @@ module KillBillClient
55
63
 
56
64
  end
57
65
 
58
- def get_tenant_catalog_json(requested_date = nil, options = {})
66
+ def get_tenant_catalog_json(requested_date = nil, account_id = nil, options = {})
59
67
 
60
68
  require_multi_tenant_options!(options, "Retrieving a catalog is only supported in multi-tenant mode")
61
69
 
62
70
  params = {}
63
71
  params[:requestedDate] = requested_date if requested_date
72
+ params[:account_id] = account_id if account_id
64
73
 
65
74
  get KILLBILL_API_CATALOG_PREFIX,
66
75
  params,
@@ -139,7 +148,7 @@ module KillBillClient
139
148
  :reason => reason,
140
149
  :comment => comment,
141
150
  }.merge(options)
142
- get_tenant_catalog_json(nil, options)
151
+ get_tenant_catalog_json(nil, nil, options)
143
152
  end
144
153
 
145
154
 
@@ -1,3 +1,3 @@
1
1
  module KillBillClient
2
- VERSION = '3.3.1'
2
+ VERSION = '4.0.1'
3
3
  end
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: 3.3.1
4
+ version: 4.0.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: 2021-08-06 00:00:00.000000000 Z
11
+ date: 2023-06-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gem-release
@@ -28,22 +28,16 @@ dependencies:
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 10.0.0
34
- - - "<"
31
+ - - "~>"
35
32
  - !ruby/object:Gem::Version
36
- version: 11.0.0
33
+ version: '13.0'
37
34
  type: :development
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- version: 10.0.0
44
- - - "<"
38
+ - - "~>"
45
39
  - !ruby/object:Gem::Version
46
- version: 11.0.0
40
+ version: '13.0'
47
41
  - !ruby/object:Gem::Dependency
48
42
  name: rspec
49
43
  requirement: !ruby/object:Gem::Requirement
@@ -65,10 +59,11 @@ executables:
65
59
  extensions: []
66
60
  extra_rdoc_files: []
67
61
  files:
68
- - ".circleci/config.yml"
69
62
  - ".github/CONTRIBUTING.md"
70
63
  - ".github/FUNDING.yml"
64
+ - ".github/dependabot.yml"
71
65
  - ".github/workflows/ci.yml"
66
+ - ".github/workflows/codeql-analysis.yml"
72
67
  - ".github/workflows/release.yml"
73
68
  - ".gitignore"
74
69
  - Gemfile
@@ -217,7 +212,7 @@ files:
217
212
  - spec/spec_helper.rb
218
213
  homepage: http://www.killbilling.org
219
214
  licenses:
220
- - Apache License (2.0)
215
+ - Apache-2.0
221
216
  metadata: {}
222
217
  post_install_message:
223
218
  rdoc_options:
data/.circleci/config.yml DELETED
@@ -1,277 +0,0 @@
1
- defaults: &defaults
2
- working_directory: ~/repo
3
- environment:
4
- JRUBY_OPTS: --2.0 -J-Xmx1024M
5
-
6
- version: 2
7
- jobs:
8
- build-ruby-2.2.2:
9
- <<: *defaults
10
- docker:
11
- - image: killbill/kbbuild:0.6.0
12
- steps:
13
- - checkout
14
- - restore_cache:
15
- key: v2-dependencies-ruby-2.2.2-{{ .Branch }}-{{ checksum "killbill_client.gemspec" }}
16
- - run:
17
- name: Install gem dependencies
18
- command: |
19
- source /usr/share/rvm/scripts/rvm
20
- rvm use ruby-2.2.2
21
- bundle install --jobs=4 --retry=3 --path=vendor/bundle
22
- - save_cache:
23
- paths:
24
- - Gemfile.lock
25
- - .bundle
26
- - vendor/bundle
27
- key: v2-dependencies-ruby-2.2.2-{{ .Branch }}-{{ checksum "killbill_client.gemspec" }}
28
-
29
- test-mysql-ruby-2.2.2:
30
- <<: *defaults
31
- docker:
32
- - image: killbill/kbbuild:0.6.0
33
- - image: killbill/killbill:0.21.9
34
- - image: killbill/mariadb:0.21
35
- environment:
36
- - MYSQL_ROOT_PASSWORD=root
37
- steps:
38
- - checkout
39
- - restore_cache:
40
- key: v2-dependencies-ruby-2.2.2-{{ .Branch }}-{{ checksum "killbill_client.gemspec" }}
41
- - run:
42
- name: Setup DDL
43
- command: |
44
- set +e
45
- count=0
46
- until mysqladmin ping -h 127.0.0.1 -u root --password=root --silent; do
47
- if [[ "$count" == "25" ]]; then
48
- exit 1
49
- fi
50
- (( count++ ))
51
- printf '.'
52
- sleep 5
53
- done
54
- set -e
55
- - run:
56
- name: Setup Kill Bill
57
- command: |
58
- set +e
59
- count=0
60
- until $(curl --output /dev/null --silent --fail http://127.0.0.1:8080/1.0/healthcheck); do
61
- if [[ "$count" == "25" ]]; then
62
- exit 1
63
- fi
64
- (( count++ ))
65
-
66
- printf '.'
67
- sleep 5
68
- done
69
- set -e
70
- curl -v \
71
- -X POST \
72
- -u admin:password \
73
- -H 'Content-Type: application/json' \
74
- -H 'X-Killbill-CreatedBy: CircleCI' \
75
- -d '{"apiKey": "bob", "apiSecret": "lazar"}' \
76
- "http://127.0.0.1:8080/1.0/kb/tenants?useGlobalDefault=true"
77
- - run:
78
- name: Run tests
79
- command: |
80
- mkdir /tmp/test-results
81
- source /usr/share/rvm/scripts/rvm
82
- rvm use ruby-2.2.2
83
- bundle exec rspec --format documentation \
84
- --out /tmp/test-results/rspec.txt \
85
- $(circleci tests glob "spec/**/*_spec.rb")
86
- - store_test_results:
87
- path: /tmp/test-results
88
- - store_artifacts:
89
- path: /tmp/test-results
90
- destination: test-results
91
-
92
- build-ruby-2.4.2:
93
- <<: *defaults
94
- docker:
95
- - image: killbill/kbbuild:0.6.0
96
- steps:
97
- - checkout
98
- - restore_cache:
99
- key: v2-dependencies-ruby-2.4.2-{{ .Branch }}-{{ checksum "killbill_client.gemspec" }}
100
- - run:
101
- name: Install gem dependencies
102
- command: |
103
- source /usr/share/rvm/scripts/rvm
104
- rvm use ruby-2.4.2
105
- bundle install --jobs=4 --retry=3 --path=vendor/bundle
106
- - save_cache:
107
- paths:
108
- - Gemfile.lock
109
- - .bundle
110
- - vendor/bundle
111
- key: v2-dependencies-ruby-2.4.2-{{ .Branch }}-{{ checksum "killbill_client.gemspec" }}
112
-
113
- test-mysql-ruby-2.4.2:
114
- <<: *defaults
115
- docker:
116
- - image: killbill/kbbuild:0.6.0
117
- - image: killbill/killbill:0.21.9
118
- - image: killbill/mariadb:0.21
119
- environment:
120
- - MYSQL_ROOT_PASSWORD=root
121
- steps:
122
- - checkout
123
- - restore_cache:
124
- key: v2-dependencies-ruby-2.4.2-{{ .Branch }}-{{ checksum "killbill_client.gemspec" }}
125
- - run:
126
- name: Setup DDL
127
- command: |
128
- set +e
129
- count=0
130
- until mysqladmin ping -h 127.0.0.1 -u root --password=root --silent; do
131
- if [[ "$count" == "25" ]]; then
132
- exit 1
133
- fi
134
- (( count++ ))
135
- printf '.'
136
- sleep 5
137
- done
138
- set -e
139
- - run:
140
- name: Setup Kill Bill
141
- command: |
142
- set +e
143
- count=0
144
- until $(curl --output /dev/null --silent --fail http://127.0.0.1:8080/1.0/healthcheck); do
145
- if [[ "$count" == "25" ]]; then
146
- exit 1
147
- fi
148
- (( count++ ))
149
-
150
- printf '.'
151
- sleep 5
152
- done
153
- set -e
154
- curl -v \
155
- -X POST \
156
- -u admin:password \
157
- -H 'Content-Type: application/json' \
158
- -H 'X-Killbill-CreatedBy: CircleCI' \
159
- -d '{"apiKey": "bob", "apiSecret": "lazar"}' \
160
- "http://127.0.0.1:8080/1.0/kb/tenants?useGlobalDefault=true"
161
- - run:
162
- name: Run tests
163
- command: |
164
- mkdir /tmp/test-results
165
- source /usr/share/rvm/scripts/rvm
166
- rvm use ruby-2.4.2
167
- bundle exec rspec --format documentation \
168
- --out /tmp/test-results/rspec.txt \
169
- $(circleci tests glob "spec/**/*_spec.rb")
170
- - store_test_results:
171
- path: /tmp/test-results
172
- - store_artifacts:
173
- path: /tmp/test-results
174
- destination: test-results
175
-
176
- build-jruby-9.1.14.0:
177
- <<: *defaults
178
- docker:
179
- - image: killbill/kbbuild:0.6.0
180
- steps:
181
- - checkout
182
- - restore_cache:
183
- key: v2-dependencies-jruby-9.1.14.0-{{ .Branch }}-{{ checksum "killbill_client.gemspec" }}
184
- - run:
185
- name: Install gem dependencies
186
- command: |
187
- source /usr/share/rvm/scripts/rvm
188
- rvm use jruby-9.1.14.0
189
- bundle install --jobs=4 --retry=3 --path=vendor/bundle
190
- - save_cache:
191
- paths:
192
- - Gemfile.lock
193
- - .bundle
194
- - vendor/bundle
195
- key: v2-dependencies-jruby-9.1.14.0-{{ .Branch }}-{{ checksum "killbill_client.gemspec" }}
196
-
197
- test-mysql-jruby-9.1.14.0:
198
- <<: *defaults
199
- docker:
200
- - image: killbill/kbbuild:0.6.0
201
- - image: killbill/killbill:0.21.9
202
- - image: killbill/mariadb:0.21
203
- environment:
204
- - MYSQL_ROOT_PASSWORD=root
205
- steps:
206
- - checkout
207
- - restore_cache:
208
- key: v2-dependencies-jruby-9.1.14.0-{{ .Branch }}-{{ checksum "killbill_client.gemspec" }}
209
- - run:
210
- name: Setup DDL
211
- command: |
212
- set +e
213
- count=0
214
- until mysqladmin ping -h 127.0.0.1 -u root --password=root --silent; do
215
- if [[ "$count" == "25" ]]; then
216
- exit 1
217
- fi
218
- (( count++ ))
219
- printf '.'
220
- sleep 5
221
- done
222
- set -e
223
- - run:
224
- name: Setup Kill Bill
225
- command: |
226
- set +e
227
- count=0
228
- until $(curl --output /dev/null --silent --fail http://127.0.0.1:8080/1.0/healthcheck); do
229
- if [[ "$count" == "25" ]]; then
230
- exit 1
231
- fi
232
- (( count++ ))
233
-
234
- printf '.'
235
- sleep 5
236
- done
237
- set -e
238
- curl -v \
239
- -X POST \
240
- -u admin:password \
241
- -H 'Content-Type: application/json' \
242
- -H 'X-Killbill-CreatedBy: CircleCI' \
243
- -d '{"apiKey": "bob", "apiSecret": "lazar"}' \
244
- "http://127.0.0.1:8080/1.0/kb/tenants?useGlobalDefault=true"
245
- - run:
246
- name: Run tests
247
- command: |
248
- mkdir /tmp/test-results
249
- source /usr/share/rvm/scripts/rvm
250
- rvm use jruby-9.1.14.0
251
- bundle exec rspec --format documentation \
252
- --out /tmp/test-results/rspec.txt \
253
- $(circleci tests glob "spec/**/*_spec.rb")
254
- - store_test_results:
255
- path: /tmp/test-results
256
- - store_artifacts:
257
- path: /tmp/test-results
258
- destination: test-results
259
- workflows:
260
- version: 2
261
- build-and-test:
262
- jobs:
263
- # Self-contained KPM
264
- - build-ruby-2.2.2
265
- # Kaui and other gems
266
- - build-ruby-2.4.2
267
- # Self-contained Kaui
268
- - build-jruby-9.1.14.0
269
- - test-mysql-ruby-2.2.2:
270
- requires:
271
- - build-ruby-2.2.2
272
- - test-mysql-ruby-2.4.2:
273
- requires:
274
- - build-ruby-2.4.2
275
- - test-mysql-jruby-9.1.14.0:
276
- requires:
277
- - build-jruby-9.1.14.0