killbill-client 2.3.0 → 2.4.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 +4 -4
- data/lib/killbill_client/models/invoice.rb +10 -0
- data/lib/killbill_client/models/invoice_item.rb +12 -0
- data/lib/killbill_client/models/payment.rb +11 -0
- data/lib/killbill_client/models/resource.rb +5 -1
- data/lib/killbill_client/version.rb +1 -1
- data/spec/killbill_client/remote/model_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 403d07c57a0a99bf52f0f217a1c4c7378e5294f7
|
4
|
+
data.tar.gz: 4370530c0ea0d936fd0eebaed4b18fa8e91a857a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be815f450d26601ab84be6df5772f5c04d6f4d2098fd6d0073cf755ddc63993e4cf4f2d538bfd179a95f1f21d66b65af572f975deacb6b001e6379d3dc3d5d8d
|
7
|
+
data.tar.gz: beb28a9976f35f6b33c43739a137a4904db99f40171d2bfff0f63a1f3048191883595b12d974cc6dce680943e507e48074977168f94a4396b66051db7ad7945e
|
@@ -34,6 +34,16 @@ module KillBillClient
|
|
34
34
|
options
|
35
35
|
end
|
36
36
|
|
37
|
+
def find_by_invoice_item_id(invoice_item_id, with_items = true, with_children_items = false, audit = "NONE", options = {})
|
38
|
+
get "#{KILLBILL_API_INVOICES_PREFIX}/byItemId/#{invoice_item_id}",
|
39
|
+
{
|
40
|
+
:withChildrenItems => with_children_items,
|
41
|
+
:withItems => with_items,
|
42
|
+
:audit => audit
|
43
|
+
},
|
44
|
+
options
|
45
|
+
end
|
46
|
+
|
37
47
|
def find_in_batches(offset = 0, limit = 100, options = {})
|
38
48
|
get "#{KILLBILL_API_INVOICES_PREFIX}/#{Resource::KILLBILL_API_PAGINATION_PREFIX}",
|
39
49
|
{
|
@@ -82,6 +82,18 @@ module KillBillClient
|
|
82
82
|
:comment => comment,
|
83
83
|
}.merge(options)
|
84
84
|
end
|
85
|
+
|
86
|
+
def create_tax_item(auto_commit = false, user = nil, reason = nil, comment = nil, options = {})
|
87
|
+
created_tax_item = self.class.post "#{Invoice::KILLBILL_API_INVOICES_PREFIX}/taxes/#{account_id}",
|
88
|
+
[to_hash].to_json,
|
89
|
+
{:autoCommit => auto_commit},
|
90
|
+
{
|
91
|
+
:user => user,
|
92
|
+
:reason => reason,
|
93
|
+
:comment => comment,
|
94
|
+
}.merge(options)
|
95
|
+
created_tax_item.first.refresh(options, Invoice)
|
96
|
+
end
|
85
97
|
end
|
86
98
|
end
|
87
99
|
end
|
@@ -45,6 +45,17 @@ module KillBillClient
|
|
45
45
|
options
|
46
46
|
end
|
47
47
|
|
48
|
+
def find_by_transaction_external_key(external_key, with_plugin_info = false, with_attempts = false, audit='NONE', options = {})
|
49
|
+
get "#{Transaction::KILLBILL_API_TRANSACTIONS_PREFIX}",
|
50
|
+
{
|
51
|
+
:audit => audit,
|
52
|
+
:transactionExternalKey => external_key,
|
53
|
+
:withAttempts => with_attempts,
|
54
|
+
:withPluginInfo => with_plugin_info
|
55
|
+
},
|
56
|
+
options
|
57
|
+
end
|
58
|
+
|
48
59
|
def find_in_batches(offset = 0, limit = 100, options = {})
|
49
60
|
get "#{KILLBILL_API_PAYMENTS_PREFIX}/#{Resource::KILLBILL_API_PAGINATION_PREFIX}",
|
50
61
|
{
|
@@ -253,7 +253,11 @@ module KillBillClient
|
|
253
253
|
|
254
254
|
def refresh(options = {}, clazz=self.class)
|
255
255
|
if @uri
|
256
|
-
|
256
|
+
# Need to decode in case an encoding is in place (e.g. /1.0/kb/security/users/Mad%20Max/roles) , since later on
|
257
|
+
# it will be encoded and can cause an undesired result on the call.
|
258
|
+
unecoded_uri = URI::DEFAULT_PARSER.unescape(@uri)
|
259
|
+
|
260
|
+
self.class.get unecoded_uri, {}, options, clazz
|
257
261
|
else
|
258
262
|
self
|
259
263
|
end
|
@@ -4,7 +4,7 @@ describe KillBillClient::Model do
|
|
4
4
|
before do
|
5
5
|
KillBillClient.return_full_stacktraces = true
|
6
6
|
|
7
|
-
KillBillClient.api_key =
|
7
|
+
KillBillClient.api_key = SecureRandom.uuid.to_s + rand(100).to_s
|
8
8
|
KillBillClient.api_secret = KillBillClient.api_key
|
9
9
|
|
10
10
|
tenant = KillBillClient::Model::Tenant.new
|
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: 2.
|
4
|
+
version: 2.4.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: 2018-06-
|
11
|
+
date: 2018-06-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|