killbill-client 1.5.0 → 1.6.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: af588a74667e14903ee145dfd23cd3ea1e39455e
4
- data.tar.gz: ccd3d09f2fc6904e2ab688fbbbf63b924610acbb
3
+ metadata.gz: 10268e4d9404712f0572d159b8919240a46a061a
4
+ data.tar.gz: 2232446598249d9e78a705a440680efa854d86ce
5
5
  SHA512:
6
- metadata.gz: c29ea6b799ba99d3a40b31b43efb2b6c6ff1aafe2c64ddb868f10096b90f2113d64bfd5fd3e0441eb7b0e7b5df66eecc2b40aff62320d396ffed45996edab236
7
- data.tar.gz: 5ef30ac236df22c9f86db03c2000182ced72ff3d3ecd28bb16923b654bfcd39490c88153aad5ef4f7dfb14febfe69bf84f658fe7d901f1bbc1c6fc66f7cdb5c2
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.encode(relative_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
@@ -42,6 +42,8 @@ require 'killbill_client/models/rolled_up_usage'
42
42
  require 'killbill_client/models/account_timeline'
43
43
  require 'killbill_client/models/nodes_info'
44
44
 
45
+ require 'killbill_client/models/export'
46
+
45
47
  module KillBillClient
46
48
  module Model
47
49
  end
@@ -1,7 +1,7 @@
1
1
  module KillBillClient
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 5
4
+ MINOR = 6
5
5
  PATCH = 0
6
6
  PRE = nil
7
7
 
@@ -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.5.0
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-04-06 00:00:00.000000000 Z
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