killbill-client 1.2.0 → 1.3.0

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: 3ecff9ddb8a004c7f93cebf6c52f681e3b50da95
4
- data.tar.gz: 25810dbd50142a29b5d6a34830a671f80786685b
3
+ metadata.gz: 2512da879d4f319ad4af8d1aac0b582555f60e35
4
+ data.tar.gz: 197bd8838c6f587c9f26e69dbcb592fd6af58abc
5
5
  SHA512:
6
- metadata.gz: 2602e259cc9473ed63774b79f99f06a011ef66252c43a6d6163668753f53d97f76dfdc76acb9a5514bd6f581f045f9c144e81460c4d428ce4c8d955fd3928367
7
- data.tar.gz: d2712f345c7a8e40cde35da76d5f0c4dc73d97fcc62bad1c61e9aa344eb2a3e29afeeed079e4e0cbda4e536cad1261097d619d93189d87645b68773c517fa843
6
+ metadata.gz: 9b24bd772578a41897e64745782c4ee2a338bb150b8dd8df92a54cb268ff65898a961f6adff564a9726165c4b01562763651d12c61a3eb7473b1bddce7f3d497
7
+ data.tar.gz: 73a8bcf6a96865889e2efcb8de9fe67e37d7428d31159f62c6d740c8fcdc7bbb1791c9b1522fe82e14d0e5a6252aa14264c1c416da9860b9c95f4ebacb25f15a
@@ -0,0 +1,37 @@
1
+ module KillBillClient
2
+ module Model
3
+ class BulkSubscription < BulkBaseSubscriptionAndAddOnsAttributes
4
+
5
+ include KillBillClient::Model::CustomFieldHelper
6
+
7
+ KILLBILL_API_BULK_ENTITLEMENT_PREFIX = "#{KILLBILL_API_PREFIX}/subscriptions/createEntitlementsWithAddOns"
8
+
9
+ has_many :base_entitlement_and_add_ons, KillBillClient::Model::SubscriptionAttributes
10
+
11
+ class << self
12
+
13
+ def create_bulk_subscriptions(bulk_subscription_list, user = nil, reason = nil, comment = nil, entitlement_date = nil, billing_date = nil, call_completion_sec = nil, options = {})
14
+
15
+ params = {}
16
+ params[:callCompletion] = true unless call_completion_sec.nil?
17
+ params[:callTimeoutSec] = call_completion_sec unless call_completion_sec.nil?
18
+ params[:entitlementDate] = entitlement_date unless entitlement_date.nil?
19
+ params[:billingDate] = billing_date unless billing_date.nil?
20
+
21
+ post KILLBILL_API_BULK_ENTITLEMENT_PREFIX,
22
+ bulk_subscription_list.to_json,
23
+ params,
24
+ {
25
+ :user => user,
26
+ :reason => reason,
27
+ :comment => comment,
28
+ }.merge(options)
29
+ end
30
+
31
+
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+
@@ -17,6 +17,7 @@ require 'killbill_client/models/credit'
17
17
  require 'killbill_client/models/invoice_item'
18
18
  require 'killbill_client/models/custom_field'
19
19
  require 'killbill_client/models/subscription'
20
+ require 'killbill_client/models/bulk_subscription'
20
21
  require 'killbill_client/models/bundle'
21
22
  require 'killbill_client/models/account'
22
23
  require 'killbill_client/models/invoice'
@@ -32,6 +32,15 @@ module KillBillClient
32
32
  options
33
33
  end
34
34
 
35
+ def find_by_transaction_id(transaction_id, with_plugin_info = false, with_attempts = false, options = {})
36
+ get "#{Transaction::KILLBILL_API_TRANSACTIONS_PREFIX}/#{transaction_id}",
37
+ {
38
+ :withAttempts => with_attempts,
39
+ :withPluginInfo => with_plugin_info
40
+ },
41
+ options
42
+ end
43
+
35
44
  def find_in_batches(offset = 0, limit = 100, options = {})
36
45
  get "#{KILLBILL_API_PAYMENTS_PREFIX}/#{Resource::KILLBILL_API_PAGINATION_PREFIX}",
37
46
  {
@@ -21,11 +21,15 @@ module KillBillClient
21
21
  #
22
22
  # Create a new entitlement
23
23
  #
24
+ #
25
+ #
24
26
  def create(user = nil, reason = nil, comment = nil, requested_date = nil, call_completion = false, options = {})
25
27
 
26
28
  params = {}
27
29
  params[:callCompletion] = call_completion
28
- params[:requestedDate] = requested_date unless requested_date.nil?
30
+ params[:entitlementDate] = requested_date unless requested_date.nil?
31
+ params[:billingDate] = requested_date unless requested_date.nil?
32
+
29
33
 
30
34
  created_entitlement = self.class.post KILLBILL_API_ENTITLEMENT_PREFIX,
31
35
  to_json,
@@ -106,6 +110,26 @@ module KillBillClient
106
110
  }.merge(options)
107
111
  end
108
112
 
113
+ #
114
+ # Update Subscription BCD
115
+ #
116
+ def update_bcd(user = nil, reason = nil, comment = nil, effective_from_date = nil, force_past_effective_date = nil, options = {})
117
+
118
+ params = {}
119
+ params[:effectiveFromDate] = effective_from_date unless effective_from_date.nil?
120
+ params[:forceNewBcdWithPastEffectiveDate] = force_past_effective_date unless force_past_effective_date.nil?
121
+
122
+ return self.class.put "#{KILLBILL_API_ENTITLEMENT_PREFIX}/#{subscription_id}/bcd",
123
+ self.to_json,
124
+ params,
125
+ {
126
+ :user => user,
127
+ :reason => reason,
128
+ :comment => comment,
129
+ }.merge(options)
130
+ end
131
+
132
+
109
133
  end
110
134
  end
111
135
  end
@@ -4,6 +4,8 @@ module KillBillClient
4
4
  module Model
5
5
  class Transaction < PaymentTransactionAttributes
6
6
 
7
+ KILLBILL_API_TRANSACTIONS_PREFIX = "#{KILLBILL_API_PREFIX}/paymentTransactions"
8
+
7
9
  has_many :properties, KillBillClient::Model::PluginPropertyAttributes
8
10
  has_many :audit_logs, KillBillClient::Model::AuditLog
9
11
 
@@ -1,7 +1,7 @@
1
1
  module KillBillClient
2
2
  module Version
3
3
  MAJOR = 1
4
- MINOR = 2
4
+ MINOR = 3
5
5
  PATCH = 0
6
6
  PRE = nil
7
7
 
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: 1.2.0
4
+ version: 1.3.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: 2016-12-27 00:00:00.000000000 Z
11
+ date: 2017-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -84,6 +84,7 @@ files:
84
84
  - lib/killbill_client/models/account.rb
85
85
  - lib/killbill_client/models/account_timeline.rb
86
86
  - lib/killbill_client/models/audit_log.rb
87
+ - lib/killbill_client/models/bulk_subscription.rb
87
88
  - lib/killbill_client/models/bundle.rb
88
89
  - lib/killbill_client/models/catalog.rb
89
90
  - lib/killbill_client/models/combo_hosted_payment_page.rb