killbill-client 0.16.0 → 0.17.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,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 64817bf59bb680ebdd7cd660cd31020995188c4e
4
- data.tar.gz: 4d05400957da60266c10e8aff09ed69f220f1ea2
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YzA3ZmU2NmI5ZDRlZTg3ZGRiZmMwZWIyNDMyZGRlNTFiYTFkM2NkMg==
5
+ data.tar.gz: !binary |-
6
+ ZDc4ZTM2OWQzNGFkYWYwOWFiZmU5ZTUzMDQ1YjdkNWFjYzI0ZjQ5MA==
5
7
  SHA512:
6
- metadata.gz: 6ff38fe77f14a2f0a0a67db44df7de29296e635336ef577425d9a013b632f31de767d09488ac8fc4a0be55748276ba0b7e946f34907984ff201215530a38de1d
7
- data.tar.gz: b87af730d59a1b05addb61815238dfc792e1fadbaf2b02f59d7ebd1beeeaf59b8bcfe1d0d18e9ab92eb2b3e52f216f9a7d49f54bd9e049b049b7ecfa7bb2e86a
8
+ metadata.gz: !binary |-
9
+ NmU3ODUyYzhjMDIzZTk3MTE2MmRkMWZmY2JkZTRkMzI4NjA0NjI3YmM3NWQw
10
+ OGQ4NWZiMTQxNGM5NTRmNTM1ZmU4OWEwMGY3NjExMDMwYjU2YTJkYmQyOTAx
11
+ ZDE4MTU2NmY5NTE2N2I5OGJkMTgxMjg3MzVhMjY4ZGQ5NWYyMjg=
12
+ data.tar.gz: !binary |-
13
+ MDJlNWExYmU5MmEzZWJjYTMwNWUyYzNkNWE3MDQ0OTIzMmY1NWFmNTNlNDI3
14
+ Y2NhNjk3MzNiNWRmYmNhZThkMTI4NWFlY2M5MWFlNjRhY2QxMzEzYjUyOWE2
15
+ OTJhZTk4YmQ5MDA3ZjUzYWNjYjIzMjlmYmVjY2UwODFkOTRkZGU=
data/.travis.yml CHANGED
@@ -5,6 +5,7 @@ notifications:
5
5
  - kill-bill-commits@googlegroups.com
6
6
 
7
7
  rvm:
8
+ - 1.8.7
8
9
  - 1.9.2
9
10
  - 1.9.3
10
11
  - 2.0.0
@@ -4,7 +4,11 @@ module KillBillClient
4
4
 
5
5
  module ClassMethods
6
6
  def has_custom_fields(url_prefix, id_alias)
7
- define_method('custom_fields') do |audit = 'NONE', options = {}|
7
+ define_method('custom_fields') do |*args|
8
+
9
+ audit = args[0] || 'NONE'
10
+ options = args[1] || {}
11
+
8
12
  self.class.get "#{url_prefix}/#{send(id_alias)}/customFields",
9
13
  {
10
14
  :audit => audit
@@ -13,7 +17,14 @@ module KillBillClient
13
17
  CustomField
14
18
  end
15
19
 
16
- define_method('add_custom_field') do |custom_fields, user = nil, reason = nil, comment = nil, options = {}|
20
+ define_method('add_custom_field') do |*args|
21
+
22
+ custom_fields = args[0]
23
+ user = args[1]
24
+ reason = args[2]
25
+ comment = args[3]
26
+ options = args[4] || {}
27
+
17
28
  body = custom_fields.is_a?(Enumerable) ? custom_fields : [custom_fields]
18
29
  custom_field = self.class.post "#{url_prefix}/#{send(id_alias)}/customFields",
19
30
  body.to_json,
@@ -27,7 +38,14 @@ module KillBillClient
27
38
  custom_field.refresh(options)
28
39
  end
29
40
 
30
- define_method('remove_custom_field') do |custom_fields, user = nil, reason = nil, comment = nil, options = {}|
41
+ define_method('remove_custom_field') do |*args|
42
+
43
+ custom_fields = args[0]
44
+ user = args[1]
45
+ reason = args[2]
46
+ comment = args[3]
47
+ options = args[4] || {}
48
+
31
49
  custom_fields_param = custom_fields.is_a?(Enumerable) ? custom_fields.join(",") : custom_fields
32
50
  self.class.delete "#{url_prefix}/#{send(id_alias)}/customFields",
33
51
  {},
@@ -54,7 +54,12 @@ module KillBillClient
54
54
 
55
55
  module ClassMethods
56
56
  def has_tags(url_prefix, id_alias)
57
- define_method('tags') do |included_deleted = false, audit = 'NONE', options = {}|
57
+ define_method('tags') do |*args|
58
+
59
+ included_deleted = args[0] || false
60
+ audit = args[1] || 'NONE'
61
+ options = args[2] || {}
62
+
58
63
  self.class.get "#{url_prefix}/#{send(id_alias)}/tags",
59
64
  {
60
65
  :includedDeleted => included_deleted,
@@ -64,7 +69,14 @@ module KillBillClient
64
69
  Tag
65
70
  end
66
71
 
67
- define_method('add_tags_from_definition_ids') do |tag_definition_ids, user = nil, reason = nil, comment = nil, options = {}|
72
+ define_method('add_tags_from_definition_ids') do |*args|
73
+
74
+ tag_definition_ids = args[0]
75
+ user = args[1]
76
+ reason = args[2]
77
+ comment = args[3]
78
+ options = args[4] || {}
79
+
68
80
  created_tag = self.class.post "#{url_prefix}/#{send(id_alias)}/tags",
69
81
  {},
70
82
  {
@@ -79,7 +91,14 @@ module KillBillClient
79
91
  created_tag.refresh(options)
80
92
  end
81
93
 
82
- define_method('remove_tags_from_definition_ids') do |tag_definition_ids, user = nil, reason = nil, comment = nil, options = {}|
94
+ define_method('remove_tags_from_definition_ids') do |*args|
95
+
96
+ tag_definition_ids = args[0]
97
+ user = args[1]
98
+ reason = args[2]
99
+ comment = args[3]
100
+ options = args[4] || {}
101
+
83
102
  self.class.delete "#{url_prefix}/#{send(id_alias)}/tags",
84
103
  {},
85
104
  {
@@ -1,7 +1,7 @@
1
1
  module KillBillClient
2
2
  module Version
3
3
  MAJOR = 0
4
- MINOR = 16
4
+ MINOR = 17
5
5
  PATCH = 0
6
6
  PRE = nil
7
7
 
@@ -10,7 +10,7 @@ describe KillBillClient::Model::Resource do
10
10
  test_var = KillBillClient::Model::AccountTimeline.class_variable_defined? class_var_name
11
11
  test_var.should_not be_false
12
12
 
13
- var = KillBillClient::Model::AccountTimeline.class_variable_get class_var_name
13
+ var = KillBillClient::Model::AccountTimeline.send(:class_variable_get, class_var_name)
14
14
  var.size.should > 0
15
15
  var.should have_key "KillBillClient::Model::AccountTimeline"
16
16
  var["KillBillClient::Model::AccountTimeline"].should have_key :account
@@ -26,8 +26,8 @@ describe KillBillClient::Model::Resource do
26
26
  #should also be accessible by attr_accessors
27
27
 
28
28
  methods = KillBillClient::Model::AccountTimeline.instance_methods
29
- methods.should include :account # attr_reader
30
- methods.should include :account= #attr_writer
29
+ methods.map(&:to_sym).should include :account # attr_reader
30
+ methods.map(&:to_sym).should include :account= #attr_writer
31
31
  end
32
32
 
33
33
  it 'should test has_many property' do
@@ -38,7 +38,7 @@ describe KillBillClient::Model::Resource do
38
38
  test_var = KillBillClient::Model::EventSubscription.class_variable_defined? class_var_name
39
39
  test_var.should_not be_false
40
40
 
41
- var = KillBillClient::Model::EventSubscription.class_variable_get class_var_name
41
+ var = KillBillClient::Model::EventSubscription.send(:class_variable_get, class_var_name)
42
42
  var.size.should > 0
43
43
  var.should have_key "KillBillClient::Model::Subscription"
44
44
  var["KillBillClient::Model::Subscription"].should have_key :events
@@ -54,16 +54,16 @@ describe KillBillClient::Model::Resource do
54
54
  #should also be accessible by attr_accessors
55
55
 
56
56
  methods = KillBillClient::Model::EventSubscription.instance_methods
57
- methods.should include :audit_logs # attr_reader
58
- methods.should include :audit_logs= #attr_writer
57
+ methods.map(&:to_sym).should include :audit_logs # attr_reader
58
+ methods.map(&:to_sym).should include :audit_logs= #attr_writer
59
59
  end
60
60
 
61
61
  it 'should create alias attr accessors' do
62
62
  KillBillClient::Model::EventSubscription.create_alias :alias_date, :requested_dt
63
63
 
64
64
  methods = KillBillClient::Model::EventSubscription.instance_methods
65
- methods.should include :alias_date
66
- methods.should include :alias_date=
65
+ methods.map(&:to_sym).should include :alias_date
66
+ methods.map(&:to_sym).should include :alias_date=
67
67
 
68
68
  evt = KillBillClient::Model::EventSubscription.new
69
69
  evt.alias_date = "devaroop"
metadata CHANGED
@@ -1,57 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.17.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-08-21 00:00:00.000000000 Z
11
+ date: 2015-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
15
- version_requirements: !ruby/object:Gem::Requirement
15
+ requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.2.0
20
- requirement: !ruby/object:Gem::Requirement
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
21
23
  requirements:
22
- - - '>='
24
+ - - ! '>='
23
25
  - !ruby/object:Gem::Version
24
26
  version: 1.2.0
25
- prerelease: false
26
- type: :runtime
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
- version_requirements: !ruby/object:Gem::Requirement
29
+ requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 10.0.0
34
- requirement: !ruby/object:Gem::Requirement
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
35
37
  requirements:
36
- - - '>='
38
+ - - ! '>='
37
39
  - !ruby/object:Gem::Version
38
40
  version: 10.0.0
39
- prerelease: false
40
- type: :development
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
- version_requirements: !ruby/object:Gem::Requirement
43
+ requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: 2.12.0
48
- requirement: !ruby/object:Gem::Requirement
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
49
51
  requirements:
50
52
  - - ~>
51
53
  - !ruby/object:Gem::Version
52
54
  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: []
@@ -173,7 +173,7 @@ homepage: http://www.killbilling.org
173
173
  licenses:
174
174
  - Apache License (2.0)
175
175
  metadata: {}
176
- post_install_message:
176
+ post_install_message:
177
177
  rdoc_options:
178
178
  - --exclude
179
179
  - .
@@ -181,18 +181,24 @@ require_paths:
181
181
  - lib
182
182
  required_ruby_version: !ruby/object:Gem::Requirement
183
183
  requirements:
184
- - - '>='
184
+ - - ! '>='
185
185
  - !ruby/object:Gem::Version
186
186
  version: 1.8.6
187
187
  required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  requirements:
189
- - - '>='
189
+ - - ! '>='
190
190
  - !ruby/object:Gem::Version
191
191
  version: '0'
192
192
  requirements: []
193
- rubyforge_project:
194
- rubygems_version: 2.1.9
195
- signing_key:
193
+ rubyforge_project:
194
+ rubygems_version: 2.2.2
195
+ signing_key:
196
196
  specification_version: 4
197
197
  summary: Kill Bill client library.
198
- test_files: []
198
+ test_files:
199
+ - spec/killbill_client/model_relation_spec.rb
200
+ - spec/killbill_client/remote/api_spec.rb
201
+ - spec/killbill_client/remote/model_spec.rb
202
+ - spec/killbill_client/resource_spec.rb
203
+ - spec/killbill_client/resources_spec.rb
204
+ - spec/spec_helper.rb