killbill-client 0.17.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YzA3ZmU2NmI5ZDRlZTg3ZGRiZmMwZWIyNDMyZGRlNTFiYTFkM2NkMg==
4
+ MTJiMDNiZjBkYTg5OGMzNmJjMjY4MGE0YTM4ZDYyN2IyMTEzMTkyOA==
5
5
  data.tar.gz: !binary |-
6
- ZDc4ZTM2OWQzNGFkYWYwOWFiZmU5ZTUzMDQ1YjdkNWFjYzI0ZjQ5MA==
6
+ MTVjMjVhYjJjNTUyNDlhMDZlNDJlMzVmMjdiOTMyMzZmZWRiNDU3OA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmU3ODUyYzhjMDIzZTk3MTE2MmRkMWZmY2JkZTRkMzI4NjA0NjI3YmM3NWQw
10
- OGQ4NWZiMTQxNGM5NTRmNTM1ZmU4OWEwMGY3NjExMDMwYjU2YTJkYmQyOTAx
11
- ZDE4MTU2NmY5NTE2N2I5OGJkMTgxMjg3MzVhMjY4ZGQ5NWYyMjg=
9
+ NmRjYzEwMWVmOGM2YjAzODZlOTlkZjhhY2I1NTc0NWMyMmU0Yjg5YTRiZDU5
10
+ Y2FmZTRhNGZkYzUyMTA3ODI3ODI3NTBjYjc5MzExNjk1OThjNGUwYzJjMDVl
11
+ MWY2MGE2YjU3YmI5ZDMxN2ZiZTE0ZDIxMTg1YTUzMmVhNGM1ZGE=
12
12
  data.tar.gz: !binary |-
13
- MDJlNWExYmU5MmEzZWJjYTMwNWUyYzNkNWE3MDQ0OTIzMmY1NWFmNTNlNDI3
14
- Y2NhNjk3MzNiNWRmYmNhZThkMTI4NWFlY2M5MWFlNjRhY2QxMzEzYjUyOWE2
15
- OTJhZTk4YmQ5MDA3ZjUzYWNjYjIzMjlmYmVjY2UwODFkOTRkZGU=
13
+ ZWZjODRjOGVhODUwZTUxNTlmNWU1YTQ2NzE3YzhkNmU0YTJmYjgzMjY0ZjBi
14
+ YzdmM2IwMzY0ZjU0YzhmOWQxODYyNGI4ZDgwYmQ5NDk0MjQ0MGQzMjUwYzg0
15
+ NDJmM2IwZDY3MmQ4NGIzYzYxZWEyNDUxNjczM2E5ZGY2NTQ3ZGI=
@@ -61,9 +61,11 @@ module KillBillClient
61
61
  request :delete, uri, {:body => body.to_s}.merge({:params => params}).merge(options)
62
62
  end
63
63
 
64
- # @return [URI::Generic]
64
+ # @return [URI::HTTP]
65
65
  def base_uri
66
- URI.parse(KillBillClient.url)
66
+ parsed_uri = URI.parse(KillBillClient.url)
67
+ parsed_uri = URI.parse("http://" + KillBillClient.url) unless parsed_uri.is_a?(URI::HTTP)
68
+ parsed_uri
67
69
  end
68
70
 
69
71
  # @return [String]
@@ -3,7 +3,9 @@ module KillBillClient
3
3
  class ComboHostedPaymentPage < ComboHostedPaymentPageAttributes
4
4
 
5
5
  def build_form_descriptor(user = nil, reason = nil, comment = nil, options = {})
6
- query_map = {}
6
+ query_map = {
7
+ :controlPluginName => options.delete(:controlPluginNames)
8
+ }
7
9
 
8
10
  self.class.post "#{HostedPaymentPage::KILLBILL_API_HPP_PREFIX}/hosted/form",
9
11
  to_json,
@@ -23,7 +23,9 @@ module KillBillClient
23
23
  private
24
24
 
25
25
  def combo_payment(user, reason, comment, options)
26
- query_map = {}
26
+ query_map = {
27
+ :controlPluginName => options.delete(:controlPluginNames)
28
+ }
27
29
 
28
30
  created_transaction = self.class.post "#{Payment::KILLBILL_API_PAYMENTS_PREFIX}/combo",
29
31
  to_json,
@@ -1,7 +1,7 @@
1
1
  module KillBillClient
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 17
4
+ MINOR = 18
5
5
  PATCH = 0
6
6
  PRE = nil
7
7
 
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ describe KillBillClient do
4
+
5
+ it 'should be able to parse a url with http' do
6
+ KillBillClient.url = "http://example.com:8080"
7
+ KillBillClient::API.base_uri.scheme.should == "http"
8
+ KillBillClient::API.base_uri.host.should == "example.com"
9
+ KillBillClient::API.base_uri.port.should == 8080
10
+ end
11
+
12
+ it 'should be able to parse a url without http' do
13
+ KillBillClient.url = "example.com:8080"
14
+ KillBillClient::API.base_uri.scheme.should == "http"
15
+ KillBillClient::API.base_uri.host.should == "example.com"
16
+ KillBillClient::API.base_uri.port.should == 8080
17
+ end
18
+ 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: 0.17.0
4
+ version: 0.18.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: 2015-08-29 00:00:00.000000000 Z
11
+ date: 2015-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -163,6 +163,7 @@ files:
163
163
  - lib/killbill_client/version.rb
164
164
  - lib/rails/generators/killbill_client/config_generator.rb
165
165
  - lib/rails/killbill_client.rb
166
+ - spec/killbill_client/base_uri_spec.rb
166
167
  - spec/killbill_client/model_relation_spec.rb
167
168
  - spec/killbill_client/remote/api_spec.rb
168
169
  - spec/killbill_client/remote/model_spec.rb
@@ -196,6 +197,7 @@ signing_key:
196
197
  specification_version: 4
197
198
  summary: Kill Bill client library.
198
199
  test_files:
200
+ - spec/killbill_client/base_uri_spec.rb
199
201
  - spec/killbill_client/model_relation_spec.rb
200
202
  - spec/killbill_client/remote/api_spec.rb
201
203
  - spec/killbill_client/remote/model_spec.rb