killbill-client 0.19.0 → 0.20.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,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24a9cefd8fc392a9c9873bb18d836780e610b473
|
4
|
+
data.tar.gz: 16b90d26bc0be07caf516fd5f4e9c98671234a58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15c6ca721a7a034f2779e0236fa501ffbd0f5fc89a1f5f2124ec1b764aa130774b4a6cc8d4b73d09493dc61b3c9e5b62fe0ade3e445c2aa49652a2e1d825d1ab
|
7
|
+
data.tar.gz: 6805b2984556a842ee0848121103453e6a94f64b2643996f556961db8c1741ebd9f18aad0212bf4d028b012daac51d0a31ac6ed14fd43cd5cd867264e22b65e2
|
@@ -87,6 +87,7 @@ module KillBillClient
|
|
87
87
|
if options[:accept]
|
88
88
|
request['Accept'] = options[:accept]
|
89
89
|
end
|
90
|
+
|
90
91
|
if options[:body]
|
91
92
|
request['Content-Type'] = options[:content_type] || content_type
|
92
93
|
request.body = options[:body]
|
@@ -155,8 +156,7 @@ module KillBillClient
|
|
155
156
|
end
|
156
157
|
cur_thread_profiling_data[key] << jaxrs_profiling_header['durationUsec']
|
157
158
|
end
|
158
|
-
|
159
|
-
|
159
|
+
|
160
160
|
if KillBillClient.logger
|
161
161
|
#noinspection RubyScope
|
162
162
|
latency = (Time.now - start_time) * 1_000
|
@@ -74,16 +74,16 @@ module KillBillClient
|
|
74
74
|
end
|
75
75
|
|
76
76
|
def trigger_invoice_dry_run(account_id, target_date, upcoming_invoice_target_date, options = {})
|
77
|
+
|
78
|
+
dry_run = InvoiceDryRunAttributes.new
|
79
|
+
dry_run.dry_run_type = upcoming_invoice_target_date ? 'UPCOMING_INVOICE' : 'TARGET_DATE'
|
80
|
+
|
77
81
|
query_map = {:accountId => account_id}
|
78
|
-
if
|
79
|
-
query_map[:targetDate] = "upcomingInvoiceTargetDate"
|
80
|
-
elsif target_date != nil
|
81
|
-
query_map[:targetDate] = target_date
|
82
|
-
end
|
82
|
+
query_map[:targetDate] = target_date if target_date != nil
|
83
83
|
|
84
84
|
begin
|
85
85
|
res = post "#{KILLBILL_API_DRY_RUN_INVOICES_PREFIX}",
|
86
|
-
|
86
|
+
dry_run.to_json,
|
87
87
|
query_map,
|
88
88
|
{
|
89
89
|
:user => 'trigger_invoice_dry_run',
|
@@ -106,6 +106,7 @@ module KillBillClient
|
|
106
106
|
query_map[:targetDate] = target_date if !target_date.nil?
|
107
107
|
|
108
108
|
dry_run = InvoiceDryRunAttributes.new
|
109
|
+
dry_run.dry_run_type = 'SUBSCRIPTION_ACTION'
|
109
110
|
dry_run.dry_run_action = 'START_BILLING'
|
110
111
|
dry_run.product_name = product_name
|
111
112
|
dry_run.product_category = product_category
|
@@ -136,6 +137,7 @@ module KillBillClient
|
|
136
137
|
query_map[:targetDate] = target_date if !target_date.nil?
|
137
138
|
|
138
139
|
dry_run = InvoiceDryRunAttributes.new
|
140
|
+
dry_run.dry_run_type = 'SUBSCRIPTION_ACTION'
|
139
141
|
dry_run.dry_run_action = 'CHANGE'
|
140
142
|
dry_run.product_name = product_name
|
141
143
|
dry_run.product_category = product_category
|
@@ -170,6 +172,7 @@ module KillBillClient
|
|
170
172
|
query_map[:targetDate] = target_date if !target_date.nil?
|
171
173
|
|
172
174
|
dry_run = InvoiceDryRunAttributes.new
|
175
|
+
dry_run.dry_run_type = 'SUBSCRIPTION_ACTION'
|
173
176
|
dry_run.dry_run_action = 'STOP_BILLING'
|
174
177
|
dry_run.effective_date = effective_date
|
175
178
|
dry_run.billing_policy = billing_policy
|
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.
|
4
|
+
version: 0.20.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: 2015-
|
11
|
+
date: 2015-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|