processout 1.0.9 → 1.0.10
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/processout/discount.rb +2 -1
- data/lib/processout/invoice.rb +6 -1
- data/lib/processout/subscription.rb +10 -1
- data/lib/processout/token.rb +3 -0
- data/lib/processout/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 91568f94fbbbde39daed4271894d95fbff2c70eb
|
4
|
+
data.tar.gz: c12c9dc2ea971eb3efba6ac05d0910e251c9282b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 271f12c007a02332cfdcd3698b95fabc6ab9462d8fcdfcee02bc24d4aeaf4d8e97e0e0f795b1150ee2f030ff72cc021d0b195d02300cb4f8236e047a412730ef
|
7
|
+
data.tar.gz: 45d072130a20cda395f44e3e5292f9a5c4c2236d4da5f8836f05afbeae0f5b55da376e57adf864c8ee92488cfd52394693bcd768fb969c2682503567423321da
|
data/lib/processout/discount.rb
CHANGED
@@ -170,7 +170,8 @@ module ProcessOut
|
|
170
170
|
data = {
|
171
171
|
"amount" => @amount,
|
172
172
|
"expires_at" => @expires_at,
|
173
|
-
"metadata" => @metadata
|
173
|
+
"metadata" => @metadata,
|
174
|
+
"coupon_id" => options.fetch(:coupon_id, nil)
|
174
175
|
}
|
175
176
|
|
176
177
|
response = Response.new(request.post(path, data, options))
|
data/lib/processout/invoice.rb
CHANGED
@@ -295,6 +295,8 @@ module ProcessOut
|
|
295
295
|
request = Request.new(@client)
|
296
296
|
path = "/invoices/" + CGI.escape(@id) + "/authorize"
|
297
297
|
data = {
|
298
|
+
"authorize_only" => options.fetch(:authorize_only, nil),
|
299
|
+
"synchronous" => options.fetch(:synchronous, nil),
|
298
300
|
"source" => source
|
299
301
|
}
|
300
302
|
|
@@ -320,6 +322,8 @@ module ProcessOut
|
|
320
322
|
request = Request.new(@client)
|
321
323
|
path = "/invoices/" + CGI.escape(@id) + "/capture"
|
322
324
|
data = {
|
325
|
+
"authorize_only" => options.fetch(:authorize_only, nil),
|
326
|
+
"synchronous" => options.fetch(:synchronous, nil),
|
323
327
|
"source" => source
|
324
328
|
}
|
325
329
|
|
@@ -483,7 +487,8 @@ module ProcessOut
|
|
483
487
|
"request_email" => @request_email,
|
484
488
|
"request_shipping" => @request_shipping,
|
485
489
|
"return_url" => @return_url,
|
486
|
-
"cancel_url" => @cancel_url
|
490
|
+
"cancel_url" => @cancel_url,
|
491
|
+
"customer_id" => options.fetch(:customer_id, nil)
|
487
492
|
}
|
488
493
|
|
489
494
|
response = Response.new(request.post(path, data, options))
|
@@ -525,6 +525,9 @@ module ProcessOut
|
|
525
525
|
"trial_end_at" => @trial_end_at,
|
526
526
|
"return_url" => @return_url,
|
527
527
|
"cancel_url" => @cancel_url,
|
528
|
+
"plan_id" => options.fetch(:plan_id, nil),
|
529
|
+
"source" => options.fetch(:source, nil),
|
530
|
+
"prorate" => options.fetch(:prorate, nil),
|
528
531
|
"customer_id" => customer_id
|
529
532
|
}
|
530
533
|
|
@@ -562,6 +565,7 @@ module ProcessOut
|
|
562
565
|
"trial_end_at" => @trial_end_at,
|
563
566
|
"return_url" => @return_url,
|
564
567
|
"cancel_url" => @cancel_url,
|
568
|
+
"source" => options.fetch(:source, nil),
|
565
569
|
"customer_id" => customer_id,
|
566
570
|
"plan_id" => plan_id
|
567
571
|
}
|
@@ -678,7 +682,11 @@ module ProcessOut
|
|
678
682
|
"interval" => @interval,
|
679
683
|
"trial_end_at" => @trial_end_at,
|
680
684
|
"metadata" => @metadata,
|
681
|
-
"coupon_id" => options.fetch(:coupon_id, nil)
|
685
|
+
"coupon_id" => options.fetch(:coupon_id, nil),
|
686
|
+
"plan_id" => options.fetch(:plan_id, nil),
|
687
|
+
"source" => options.fetch(:source, nil),
|
688
|
+
"prorate" => options.fetch(:prorate, nil),
|
689
|
+
"proration_date" => options.fetch(:proration_date, nil)
|
682
690
|
}
|
683
691
|
|
684
692
|
response = Response.new(request.put(path, data, options))
|
@@ -733,6 +741,7 @@ module ProcessOut
|
|
733
741
|
request = Request.new(@client)
|
734
742
|
path = "/subscriptions/" + CGI.escape(@id) + ""
|
735
743
|
data = {
|
744
|
+
"cancel_at_end" => options.fetch(:cancel_at_end, nil),
|
736
745
|
"cancel_at" => cancel_at,
|
737
746
|
"cancellation_reason" => cancellation_reason
|
738
747
|
}
|
data/lib/processout/token.rb
CHANGED
@@ -182,6 +182,8 @@ module ProcessOut
|
|
182
182
|
path = "/customers/" + CGI.escape(customer_id) + "/tokens"
|
183
183
|
data = {
|
184
184
|
"metadata" => @metadata,
|
185
|
+
"settings" => options.fetch(:settings, nil),
|
186
|
+
"target" => options.fetch(:target, nil),
|
185
187
|
"replace" => options.fetch(:replace, nil),
|
186
188
|
"source" => source
|
187
189
|
}
|
@@ -213,6 +215,7 @@ module ProcessOut
|
|
213
215
|
path = "/customers/" + CGI.escape(customer_id) + "/tokens"
|
214
216
|
data = {
|
215
217
|
"metadata" => @metadata,
|
218
|
+
"settings" => options.fetch(:settings, nil),
|
216
219
|
"replace" => options.fetch(:replace, nil),
|
217
220
|
"source" => source,
|
218
221
|
"target" => target
|
data/lib/processout/version.rb
CHANGED