killbill-client 1.5.0 → 1.6.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 10268e4d9404712f0572d159b8919240a46a061a
|
4
|
+
data.tar.gz: 2232446598249d9e78a705a440680efa854d86ce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 04f61d6037581aab7f21eab45ea581523e2c307cac12dd17cf86dd2801b760a8a82891b77034d31c105ab0e4223bc2bf2c46de501cdc77b12e2b0ddb48cc2e79
|
7
|
+
data.tar.gz: e0e068fb0fcd6d3962336abb69ef25fd925ec1faa57a9c1bebe20c033924b8b293c40f2fc90602c119a93f8c416f37b7013be0fdcccd808608c5d4803377698e
|
@@ -77,7 +77,7 @@ module KillBillClient
|
|
77
77
|
head.delete_if { |_, value| value.nil? }
|
78
78
|
|
79
79
|
# Need to encode in case of spaces (e.g. /1.0/kb/security/users/Mad Max/roles)
|
80
|
-
encoded_relative_uri = URI.
|
80
|
+
encoded_relative_uri = URI::DEFAULT_PARSER.escape(relative_uri)
|
81
81
|
if URI(encoded_relative_uri).scheme.nil?
|
82
82
|
uri = (options[:base_uri] || base_uri)
|
83
83
|
uri = URI.parse(uri) unless uri.is_a?(URI)
|
@@ -0,0 +1,26 @@
|
|
1
|
+
module KillBillClient
|
2
|
+
module Model
|
3
|
+
class Export < Resource
|
4
|
+
|
5
|
+
KILLBILL_API_EXPORT_PREFIX = "#{KILLBILL_API_PREFIX}/export"
|
6
|
+
|
7
|
+
class << self
|
8
|
+
|
9
|
+
def find_by_account_id(account_id, user = 'Ruby_Client', options = {}, reason = nil, comment = nil)
|
10
|
+
|
11
|
+
get "#{KILLBILL_API_EXPORT_PREFIX}/#{account_id}",
|
12
|
+
{},
|
13
|
+
{
|
14
|
+
:accept => 'text/plain',
|
15
|
+
:user => user,
|
16
|
+
:reason => reason,
|
17
|
+
:comment => comment
|
18
|
+
}.merge(options)
|
19
|
+
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -291,6 +291,10 @@ describe KillBillClient::Model do
|
|
291
291
|
bundles = KillBillClient::Model::Bundle.find_all_by_account_id_and_external_key(account.account_id, bundle.external_key)
|
292
292
|
expect(bundles.size).to eq(1)
|
293
293
|
expect(bundles[0]).to eq(bundle)
|
294
|
+
|
295
|
+
# Try to export it
|
296
|
+
export = KillBillClient::Model::Export.find_by_account_id(account.account_id, 'KillBill Spec test')
|
297
|
+
expect(export).to include(account.account_id)
|
294
298
|
end
|
295
299
|
|
296
300
|
it 'should manipulate tag definitions' do
|
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: 1.
|
4
|
+
version: 1.6.0
|
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: 2017-
|
11
|
+
date: 2017-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- lib/killbill_client/models/credit.rb
|
93
93
|
- lib/killbill_client/models/custom_field.rb
|
94
94
|
- lib/killbill_client/models/event_subscription.rb
|
95
|
+
- lib/killbill_client/models/export.rb
|
95
96
|
- lib/killbill_client/models/gen/account_attributes.rb
|
96
97
|
- lib/killbill_client/models/gen/account_email_attributes.rb
|
97
98
|
- lib/killbill_client/models/gen/account_timeline_attributes.rb
|