killbill-client 0.5.8 → 0.5.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da78c8a330d129d63ba5f337efd7ff15a5b6c5c9
4
- data.tar.gz: 50d849ae40756988d006c445127d63569317ffed
3
+ metadata.gz: 3990b297c63c90cdcaef50fdd36fc999976db15d
4
+ data.tar.gz: c373818e0e196aace27b0fa31f0fef6aa807ecba
5
5
  SHA512:
6
- metadata.gz: 58b25cdd5c6e03ed8998baf4cbff4827f831d12ff3922932dea9ac0c7bf2c4b45dfae197386e0aab3ee06f02a9ceb3318d28fc064abacef28441a46454b1d048
7
- data.tar.gz: 9cbab2e22045842d896b7c14a7922a4e3327217e2f3f6142e7ebaa757d79cf4f62b0e96c81c232213f1576a2f1d0df074a83845763ff9fe68c00dc786421bd3b
6
+ metadata.gz: aaca9fe0dbad554ed90e9ab2bc6238173f1b003b6b1cb92aafce2779a516d933148bc4e75b52689b24b292b6eafdc057589e765df034a8d4cf45cc24832c2469
7
+ data.tar.gz: b9c3215ed788b641f677df24de0b23db99f20fe05b06f65749f5ce068d37691da4145844e05eedb223d63c40b99aad081e63fa2b7218a27fa5a96d2e1dd1ebb9
@@ -0,0 +1,38 @@
1
+ module KillBillClient
2
+ module Model
3
+ class CustomField < CustomFieldAttributes
4
+ KILLBILL_API_CUSTOM_FIELDS_PREFIX = "#{KILLBILL_API_PREFIX}/customFields"
5
+
6
+ has_many :audit_logs, KillBillClient::Model::AuditLog
7
+
8
+ class << self
9
+ def find_all_by_account_id(account_id, included_deleted = false, audit = "NONE", options = {})
10
+ get "#{Account::KILLBILL_API_ACCOUNTS_PREFIX}/#{account_id}/customFields",
11
+ {
12
+ :includedDeleted => included_deleted,
13
+ :audit => audit
14
+ },
15
+ options
16
+ end
17
+
18
+ def find_in_batches(offset = 0, limit = 100, options = {})
19
+ get "#{KILLBILL_API_CUSTOM_FIELDS_PREFIX}/#{Resource::KILLBILL_API_PAGINATION_PREFIX}",
20
+ {
21
+ :offset => offset,
22
+ :limit => limit
23
+ },
24
+ options
25
+ end
26
+
27
+ def find_in_batches_by_search_key(search_key, offset = 0, limit = 100, options = {})
28
+ get "#{KILLBILL_API_CUSTOM_FIELDS_PREFIX}/search/#{search_key}",
29
+ {
30
+ :offset => offset,
31
+ :limit => limit
32
+ },
33
+ options
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -19,6 +19,15 @@ module KillBillClient
19
19
  options
20
20
  end
21
21
 
22
+ def find_in_batches(offset = 0, limit = 100, options = {})
23
+ get "#{KILLBILL_API_INVOICES_PREFIX}/#{Resource::KILLBILL_API_PAGINATION_PREFIX}",
24
+ {
25
+ :offset => offset,
26
+ :limit => limit
27
+ },
28
+ options
29
+ end
30
+
22
31
  def trigger_invoice(account_id, target_date, dry_run, user = nil, reason = nil, comment = nil, options = {})
23
32
  query_map = {:accountId => account_id}
24
33
  query_map[:targetDate] = target_date if !target_date.nil?
@@ -8,6 +8,7 @@ require 'killbill_client/models/event_subscription'
8
8
  require 'killbill_client/models/credit'
9
9
  require 'killbill_client/models/invoice_item'
10
10
  require 'killbill_client/models/chargeback'
11
+ require 'killbill_client/models/custom_field'
11
12
  require 'killbill_client/models/subscription'
12
13
  require 'killbill_client/models/bundle'
13
14
  require 'killbill_client/models/refund'
@@ -3,6 +3,8 @@ module KillBillClient
3
3
  class PaymentMethod < PaymentMethodAttributes
4
4
  KILLBILL_API_PAYMENT_METHODS_PREFIX = "#{KILLBILL_API_PREFIX}/paymentMethods"
5
5
 
6
+ has_many :audit_logs, KillBillClient::Model::AuditLog
7
+
6
8
  class << self
7
9
  def find_by_id(payment_method_id, with_plugin_info = false, options = {})
8
10
  get "#{KILLBILL_API_PAYMENT_METHODS_PREFIX}/#{payment_method_id}",
@@ -19,7 +19,24 @@ module KillBillClient
19
19
  options
20
20
  end
21
21
 
22
- end #end class methods
22
+ def find_in_batches(offset = 0, limit = 100, options = {})
23
+ get "#{KILLBILL_API_REFUNDS_PREFIX}/#{Resource::KILLBILL_API_PAGINATION_PREFIX}",
24
+ {
25
+ :offset => offset,
26
+ :limit => limit
27
+ },
28
+ options
29
+ end
30
+
31
+ def find_in_batches_by_search_key(search_key, offset = 0, limit = 100, options = {})
32
+ get "#{KILLBILL_API_REFUNDS_PREFIX}/search/#{search_key}",
33
+ {
34
+ :offset => offset,
35
+ :limit => limit
36
+ },
37
+ options
38
+ end
39
+ end
23
40
 
24
41
  def create(user = nil, reason = nil, comment = nil, options = {})
25
42
  created_refund = self.class.post "#{Payment::KILLBILL_API_PAYMENTS_PREFIX}/#{@payment_id}/refunds",
@@ -1,11 +1,12 @@
1
1
  module KillBillClient
2
2
  module Model
3
3
  class Tag < TagAttributes
4
+ KILLBILL_API_TAGS_PREFIX = "#{KILLBILL_API_PREFIX}/tags"
4
5
 
5
6
  has_many :audit_logs, KillBillClient::Model::AuditLog
6
7
 
7
8
  class << self
8
- def find_all_by_account_id account_id, included_deleted = false, audit = "NONE", options = {}
9
+ def find_all_by_account_id(account_id, included_deleted = false, audit = "NONE", options = {})
9
10
  get "#{Account::KILLBILL_API_ACCOUNTS_PREFIX}/#{account_id}/tags",
10
11
  {
11
12
  :includedDeleted => included_deleted,
@@ -13,8 +14,25 @@ module KillBillClient
13
14
  },
14
15
  options
15
16
  end
16
- end
17
17
 
18
+ def find_in_batches(offset = 0, limit = 100, options = {})
19
+ get "#{KILLBILL_API_TAGS_PREFIX}/#{Resource::KILLBILL_API_PAGINATION_PREFIX}",
20
+ {
21
+ :offset => offset,
22
+ :limit => limit
23
+ },
24
+ options
25
+ end
26
+
27
+ def find_in_batches_by_search_key(search_key, offset = 0, limit = 100, options = {})
28
+ get "#{KILLBILL_API_TAGS_PREFIX}/search/#{search_key}",
29
+ {
30
+ :offset => offset,
31
+ :limit => limit
32
+ },
33
+ options
34
+ end
35
+ end
18
36
  end
19
37
  end
20
38
  end
@@ -2,7 +2,7 @@ module KillBillClient
2
2
  module Version
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
- PATCH = 8
5
+ PATCH = 9
6
6
  PRE = nil
7
7
 
8
8
  VERSION = [MAJOR, MINOR, PATCH, PRE].compact.join('.').freeze
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: killbill-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.8
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Killbill core team
@@ -75,6 +75,7 @@ files:
75
75
  - lib/killbill_client/models/bundle.rb
76
76
  - lib/killbill_client/models/chargeback.rb
77
77
  - lib/killbill_client/models/credit.rb
78
+ - lib/killbill_client/models/custom_field.rb
78
79
  - lib/killbill_client/models/event_subscription.rb
79
80
  - lib/killbill_client/models/gen/account_attributes.rb
80
81
  - lib/killbill_client/models/gen/account_email_attributes.rb