killbill-client 0.10.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/killbill_client/models/invoice.rb +103 -0
- data/lib/killbill_client/models/resource.rb +2 -0
- data/lib/killbill_client/version.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: 788d7065b7237d50be776ddc91dc1e3735e3d3bf
|
4
|
+
data.tar.gz: ae5f33685d7efd5bef9bc05d940769462706b45e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d261e396f79d562f0ac4b154d0b578389adf48a86e6fc6ff3ef286b44b622416e6f897b0d93539283c9b40a50dccc77a5bc7fb3169d91ada93e4a20a4c6cb4d
|
7
|
+
data.tar.gz: 2987504288ee8ef3958c3b531a2febe5a87ad01414a7768ed6a377a60fd75a43c7f7d51ed4389b35b5747913314394c08c4a8251312c995fc5c4425d9fc9767d
|
@@ -186,6 +186,109 @@ module KillBillClient
|
|
186
186
|
end
|
187
187
|
end
|
188
188
|
|
189
|
+
|
190
|
+
def get_invoice_template(is_manual_pay, options = {})
|
191
|
+
if options[:api_key].nil? || options[:api_secret].nil?
|
192
|
+
raise ArgumentError, "Retrieving an invoice template supported in multi-tenant mode"
|
193
|
+
end
|
194
|
+
|
195
|
+
get "#{KILLBILL_API_INVOICES_PREFIX}/#{is_manual_pay ? "manualPayTemplate" : "template"}",
|
196
|
+
{},
|
197
|
+
{
|
198
|
+
:head => {'Accept' => 'text/html'},
|
199
|
+
}.merge(options)
|
200
|
+
end
|
201
|
+
|
202
|
+
def upload_invoice_template(invoice_template, is_manual_pay, delete_if_exists, user = nil, reason = nil, comment = nil, options = {})
|
203
|
+
if options[:api_key].nil? || options[:api_secret].nil?
|
204
|
+
raise ArgumentError, "Uploading a invoice template is only supported in multi-tenant mode"
|
205
|
+
end
|
206
|
+
|
207
|
+
params = {}
|
208
|
+
params[:deleteIfExists] = delete_if_exists if delete_if_exists
|
209
|
+
|
210
|
+
post "#{KILLBILL_API_INVOICES_PREFIX}/#{is_manual_pay ? "manualPayTemplate" : "template"}",
|
211
|
+
invoice_template,
|
212
|
+
params,
|
213
|
+
{
|
214
|
+
:head => {'Accept' => 'text/html'},
|
215
|
+
:content_type => 'text/html',
|
216
|
+
:user => user,
|
217
|
+
:reason => reason,
|
218
|
+
:comment => comment,
|
219
|
+
}.merge(options)
|
220
|
+
get_invoice_template(is_manual_pay, options)
|
221
|
+
end
|
222
|
+
|
223
|
+
def get_invoice_translation(locale, options = {})
|
224
|
+
if options[:api_key].nil? || options[:api_secret].nil?
|
225
|
+
raise ArgumentError, "Retrieving an invoice template supported in multi-tenant mode"
|
226
|
+
end
|
227
|
+
|
228
|
+
get "#{KILLBILL_API_INVOICES_PREFIX}/translation/#{locale}",
|
229
|
+
{},
|
230
|
+
{
|
231
|
+
:head => {'Accept' => 'text/plain'},
|
232
|
+
}.merge(options)
|
233
|
+
end
|
234
|
+
|
235
|
+
def upload_invoice_translation(invoice_translation, locale, delete_if_exists, user = nil, reason = nil, comment = nil, options = {})
|
236
|
+
if options[:api_key].nil? || options[:api_secret].nil?
|
237
|
+
raise ArgumentError, "Uploading a invoice template is only supported in multi-tenant mode"
|
238
|
+
end
|
239
|
+
|
240
|
+
params = {}
|
241
|
+
params[:deleteIfExists] = delete_if_exists if delete_if_exists
|
242
|
+
|
243
|
+
post "#{KILLBILL_API_INVOICES_PREFIX}/translation/#{locale}",
|
244
|
+
invoice_translation,
|
245
|
+
params,
|
246
|
+
{
|
247
|
+
:head => {'Accept' => 'text/plain'},
|
248
|
+
:content_type => 'text/plain',
|
249
|
+
:user => user,
|
250
|
+
:reason => reason,
|
251
|
+
:comment => comment,
|
252
|
+
}.merge(options)
|
253
|
+
get_invoice_translation(locale, options)
|
254
|
+
end
|
255
|
+
|
256
|
+
|
257
|
+
def get_catalog_translation(locale, options = {})
|
258
|
+
if options[:api_key].nil? || options[:api_secret].nil?
|
259
|
+
raise ArgumentError, "Retrieving a catalog translation is only supported in multi-tenant mode"
|
260
|
+
end
|
261
|
+
|
262
|
+
get "#{KILLBILL_API_INVOICES_PREFIX}/catalogTranslation/#{locale}",
|
263
|
+
{},
|
264
|
+
{
|
265
|
+
:head => {'Accept' => 'text/plain'},
|
266
|
+
}.merge(options)
|
267
|
+
end
|
268
|
+
|
269
|
+
def upload_catalog_translation(catalog_translation, locale, delete_if_exists, user = nil, reason = nil, comment = nil, options = {})
|
270
|
+
if options[:api_key].nil? || options[:api_secret].nil?
|
271
|
+
raise ArgumentError, "Uploading a catalog translation is only supported in multi-tenant mode"
|
272
|
+
end
|
273
|
+
|
274
|
+
params = {}
|
275
|
+
params[:deleteIfExists] = delete_if_exists if delete_if_exists
|
276
|
+
|
277
|
+
post "#{KILLBILL_API_INVOICES_PREFIX}/catalogTranslation/#{locale}",
|
278
|
+
catalog_translation,
|
279
|
+
params,
|
280
|
+
{
|
281
|
+
:head => {'Accept' => 'text/plain'},
|
282
|
+
:content_type => 'text/plain',
|
283
|
+
:user => user,
|
284
|
+
:reason => reason,
|
285
|
+
:comment => comment,
|
286
|
+
}.merge(options)
|
287
|
+
get_catalog_translation(locale, options)
|
288
|
+
end
|
289
|
+
|
290
|
+
|
291
|
+
|
189
292
|
end
|
190
293
|
|
191
294
|
def payments(with_plugin_info = false, audit = 'NONE', options = {})
|
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.10.
|
4
|
+
version: 0.10.1
|
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: 2014-12-
|
11
|
+
date: 2014-12-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|