processout 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/deploy.sh +6 -1
- data/lib/processout/authorization_request.rb +6 -6
- data/lib/processout/coupon.rb +9 -9
- data/lib/processout/customer.rb +23 -23
- data/lib/processout/discount.rb +7 -7
- data/lib/processout/invoice.rb +20 -20
- data/lib/processout/plan.rb +14 -14
- data/lib/processout/product.rb +16 -16
- data/lib/processout/refund.rb +4 -4
- data/lib/processout/subscription.rb +29 -29
- data/lib/processout/token.rb +5 -5
- data/lib/processout/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: ef2db4e3cb1e54d9a2b2587c8ea89681d8e6c08c
|
4
|
+
data.tar.gz: 7a3bc88eba7727c33711618b573d7770985c24f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4e32d1d6ba8c0b8a71dc473017ddd39223f65596ff1231b53e17d3a8740f8621f6ebe9433fa5849abcba5865dea10d3e57473308c260f9ee4bb9f5428e3da6a
|
7
|
+
data.tar.gz: 4191cac3933e4fd2b207f3a00df1b1d565c62bd76414270d920a9dda52345fe668c29d8a5a7c3105a8824bfc5e2b6ba686e3bd8d80472e4ed09c3262688c9494
|
data/deploy.sh
CHANGED
@@ -18,8 +18,13 @@ rm -rf ../tmp
|
|
18
18
|
echo " > Committing new library"
|
19
19
|
git add -A
|
20
20
|
git commit -m "$COMMITMESSAGE"
|
21
|
-
git tag -f "0.2.
|
21
|
+
git tag -f "0.2.1"
|
22
22
|
echo " > Publishing the new version to github"
|
23
23
|
git push origin master --tags
|
24
24
|
|
25
|
+
echo " > Publishing to Rubygems"
|
26
|
+
gem build processout.gemspec
|
27
|
+
gem push processout-0.2.1.gem
|
28
|
+
|
29
|
+
|
25
30
|
echo " >> Done!"
|
@@ -195,12 +195,12 @@ module ProcessOut
|
|
195
195
|
request = Request.new(@client)
|
196
196
|
path = "/authorization-requests"
|
197
197
|
data = {
|
198
|
-
"name"
|
199
|
-
"currency"
|
200
|
-
"return_url"
|
201
|
-
"cancel_url"
|
202
|
-
"custom"
|
203
|
-
|
198
|
+
"name" => @name,
|
199
|
+
"currency" => @currency,
|
200
|
+
"return_url" => @return_url,
|
201
|
+
"cancel_url" => @cancel_url,
|
202
|
+
"custom" => @custom,
|
203
|
+
"customer_id" => customer_id
|
204
204
|
}
|
205
205
|
|
206
206
|
response = Response.new(request.post(path, data, options))
|
data/lib/processout/coupon.rb
CHANGED
@@ -186,14 +186,14 @@ module ProcessOut
|
|
186
186
|
request = Request.new(@client)
|
187
187
|
path = "/coupons"
|
188
188
|
data = {
|
189
|
-
"id"
|
190
|
-
"amount_off"
|
191
|
-
"percent_off"
|
192
|
-
"currency"
|
193
|
-
"iteration_count"
|
194
|
-
"max_redemptions"
|
195
|
-
"expires_at"
|
196
|
-
"metadata"
|
189
|
+
"id" => @id,
|
190
|
+
"amount_off" => @amount_off,
|
191
|
+
"percent_off" => @percent_off,
|
192
|
+
"currency" => @currency,
|
193
|
+
"iteration_count" => @iteration_count,
|
194
|
+
"max_redemptions" => @max_redemptions,
|
195
|
+
"expires_at" => @expires_at,
|
196
|
+
"metadata" => @metadata
|
197
197
|
}
|
198
198
|
|
199
199
|
response = Response.new(request.post(path, data, options))
|
@@ -243,7 +243,7 @@ module ProcessOut
|
|
243
243
|
request = Request.new(@client)
|
244
244
|
path = "/coupons/" + CGI.escape(@id) + ""
|
245
245
|
data = {
|
246
|
-
"metadata"
|
246
|
+
"metadata" => @metadata
|
247
247
|
}
|
248
248
|
|
249
249
|
response = Response.new(request.put(path, data, options))
|
data/lib/processout/customer.rb
CHANGED
@@ -306,18 +306,18 @@ module ProcessOut
|
|
306
306
|
request = Request.new(@client)
|
307
307
|
path = "/customers"
|
308
308
|
data = {
|
309
|
-
"balance"
|
310
|
-
"currency"
|
311
|
-
"email"
|
312
|
-
"first_name"
|
313
|
-
"last_name"
|
314
|
-
"address1"
|
315
|
-
"address2"
|
316
|
-
"city"
|
317
|
-
"state"
|
318
|
-
"zip"
|
319
|
-
"country_code"
|
320
|
-
"metadata"
|
309
|
+
"balance" => @balance,
|
310
|
+
"currency" => @currency,
|
311
|
+
"email" => @email,
|
312
|
+
"first_name" => @first_name,
|
313
|
+
"last_name" => @last_name,
|
314
|
+
"address1" => @address1,
|
315
|
+
"address2" => @address2,
|
316
|
+
"city" => @city,
|
317
|
+
"state" => @state,
|
318
|
+
"zip" => @zip,
|
319
|
+
"country_code" => @country_code,
|
320
|
+
"metadata" => @metadata
|
321
321
|
}
|
322
322
|
|
323
323
|
response = Response.new(request.post(path, data, options))
|
@@ -367,17 +367,17 @@ module ProcessOut
|
|
367
367
|
request = Request.new(@client)
|
368
368
|
path = "/customers/" + CGI.escape(@id) + ""
|
369
369
|
data = {
|
370
|
-
"balance"
|
371
|
-
"email"
|
372
|
-
"first_name"
|
373
|
-
"last_name"
|
374
|
-
"address1"
|
375
|
-
"address2"
|
376
|
-
"city"
|
377
|
-
"state"
|
378
|
-
"zip"
|
379
|
-
"country_code"
|
380
|
-
"metadata"
|
370
|
+
"balance" => @balance,
|
371
|
+
"email" => @email,
|
372
|
+
"first_name" => @first_name,
|
373
|
+
"last_name" => @last_name,
|
374
|
+
"address1" => @address1,
|
375
|
+
"address2" => @address2,
|
376
|
+
"city" => @city,
|
377
|
+
"state" => @state,
|
378
|
+
"zip" => @zip,
|
379
|
+
"country_code" => @country_code,
|
380
|
+
"metadata" => @metadata
|
381
381
|
}
|
382
382
|
|
383
383
|
response = Response.new(request.put(path, data, options))
|
data/lib/processout/discount.rb
CHANGED
@@ -137,9 +137,9 @@ module ProcessOut
|
|
137
137
|
request = Request.new(@client)
|
138
138
|
path = "/subscriptions/" + CGI.escape(subscription_id) + "/discounts"
|
139
139
|
data = {
|
140
|
-
"amount"
|
141
|
-
"expires_at"
|
142
|
-
"metadata"
|
140
|
+
"amount" => @amount,
|
141
|
+
"expires_at" => @expires_at,
|
142
|
+
"metadata" => @metadata
|
143
143
|
}
|
144
144
|
|
145
145
|
response = Response.new(request.post(path, data, options))
|
@@ -165,10 +165,10 @@ module ProcessOut
|
|
165
165
|
request = Request.new(@client)
|
166
166
|
path = "/subscriptions/" + CGI.escape(subscription_id) + "/discounts"
|
167
167
|
data = {
|
168
|
-
"amount"
|
169
|
-
"expires_at"
|
170
|
-
"metadata"
|
171
|
-
|
168
|
+
"amount" => @amount,
|
169
|
+
"expires_at" => @expires_at,
|
170
|
+
"metadata" => @metadata,
|
171
|
+
"coupon_id" => coupon_id
|
172
172
|
}
|
173
173
|
|
174
174
|
response = Response.new(request.post(path, data, options))
|
data/lib/processout/invoice.rb
CHANGED
@@ -207,7 +207,7 @@ module ProcessOut
|
|
207
207
|
request = Request.new(@client)
|
208
208
|
path = "/invoices/" + CGI.escape(@id) + "/authorize"
|
209
209
|
data = {
|
210
|
-
|
210
|
+
"source" => source
|
211
211
|
}
|
212
212
|
|
213
213
|
response = Response.new(request.post(path, data, options))
|
@@ -230,7 +230,7 @@ module ProcessOut
|
|
230
230
|
request = Request.new(@client)
|
231
231
|
path = "/invoices/" + CGI.escape(@id) + "/capture"
|
232
232
|
data = {
|
233
|
-
|
233
|
+
"source" => source
|
234
234
|
}
|
235
235
|
|
236
236
|
response = Response.new(request.post(path, data, options))
|
@@ -275,7 +275,7 @@ module ProcessOut
|
|
275
275
|
request = Request.new(@client)
|
276
276
|
path = "/invoices/" + CGI.escape(@id) + "/customers"
|
277
277
|
data = {
|
278
|
-
|
278
|
+
"customer_id" => customer_id
|
279
279
|
}
|
280
280
|
|
281
281
|
response = Response.new(request.post(path, data, options))
|
@@ -369,14 +369,14 @@ module ProcessOut
|
|
369
369
|
request = Request.new(@client)
|
370
370
|
path = "/invoices"
|
371
371
|
data = {
|
372
|
-
"name"
|
373
|
-
"amount"
|
374
|
-
"currency"
|
375
|
-
"metadata"
|
376
|
-
"request_email"
|
377
|
-
"request_shipping"
|
378
|
-
"return_url"
|
379
|
-
"cancel_url"
|
372
|
+
"name" => @name,
|
373
|
+
"amount" => @amount,
|
374
|
+
"currency" => @currency,
|
375
|
+
"metadata" => @metadata,
|
376
|
+
"request_email" => @request_email,
|
377
|
+
"request_shipping" => @request_shipping,
|
378
|
+
"return_url" => @return_url,
|
379
|
+
"cancel_url" => @cancel_url
|
380
380
|
}
|
381
381
|
|
382
382
|
response = Response.new(request.post(path, data, options))
|
@@ -401,15 +401,15 @@ module ProcessOut
|
|
401
401
|
request = Request.new(@client)
|
402
402
|
path = "/invoices"
|
403
403
|
data = {
|
404
|
-
"name"
|
405
|
-
"amount"
|
406
|
-
"currency"
|
407
|
-
"metadata"
|
408
|
-
"request_email"
|
409
|
-
"request_shipping"
|
410
|
-
"return_url"
|
411
|
-
"cancel_url"
|
412
|
-
|
404
|
+
"name" => @name,
|
405
|
+
"amount" => @amount,
|
406
|
+
"currency" => @currency,
|
407
|
+
"metadata" => @metadata,
|
408
|
+
"request_email" => @request_email,
|
409
|
+
"request_shipping" => @request_shipping,
|
410
|
+
"return_url" => @return_url,
|
411
|
+
"cancel_url" => @cancel_url,
|
412
|
+
"customer_id" => customer_id
|
413
413
|
}
|
414
414
|
|
415
415
|
response = Response.new(request.post(path, data, options))
|
data/lib/processout/plan.rb
CHANGED
@@ -177,15 +177,15 @@ module ProcessOut
|
|
177
177
|
request = Request.new(@client)
|
178
178
|
path = "/plans"
|
179
179
|
data = {
|
180
|
-
"id"
|
181
|
-
"name"
|
182
|
-
"amount"
|
183
|
-
"currency"
|
184
|
-
"interval"
|
185
|
-
"trial_period"
|
186
|
-
"metadata"
|
187
|
-
"return_url"
|
188
|
-
"cancel_url"
|
180
|
+
"id" => @id,
|
181
|
+
"name" => @name,
|
182
|
+
"amount" => @amount,
|
183
|
+
"currency" => @currency,
|
184
|
+
"interval" => @interval,
|
185
|
+
"trial_period" => @trial_period,
|
186
|
+
"metadata" => @metadata,
|
187
|
+
"return_url" => @return_url,
|
188
|
+
"cancel_url" => @cancel_url
|
189
189
|
}
|
190
190
|
|
191
191
|
response = Response.new(request.post(path, data, options))
|
@@ -235,11 +235,11 @@ module ProcessOut
|
|
235
235
|
request = Request.new(@client)
|
236
236
|
path = "/plans/" + CGI.escape(@id) + ""
|
237
237
|
data = {
|
238
|
-
"name"
|
239
|
-
"trial_period"
|
240
|
-
"metadata"
|
241
|
-
"return_url"
|
242
|
-
"cancel_url"
|
238
|
+
"name" => @name,
|
239
|
+
"trial_period" => @trial_period,
|
240
|
+
"metadata" => @metadata,
|
241
|
+
"return_url" => @return_url,
|
242
|
+
"cancel_url" => @cancel_url
|
243
243
|
}
|
244
244
|
|
245
245
|
response = Response.new(request.put(path, data, options))
|
data/lib/processout/product.rb
CHANGED
@@ -208,14 +208,14 @@ module ProcessOut
|
|
208
208
|
request = Request.new(@client)
|
209
209
|
path = "/products"
|
210
210
|
data = {
|
211
|
-
"name"
|
212
|
-
"amount"
|
213
|
-
"currency"
|
214
|
-
"metadata"
|
215
|
-
"request_email"
|
216
|
-
"request_shipping"
|
217
|
-
"return_url"
|
218
|
-
"cancel_url"
|
211
|
+
"name" => @name,
|
212
|
+
"amount" => @amount,
|
213
|
+
"currency" => @currency,
|
214
|
+
"metadata" => @metadata,
|
215
|
+
"request_email" => @request_email,
|
216
|
+
"request_shipping" => @request_shipping,
|
217
|
+
"return_url" => @return_url,
|
218
|
+
"cancel_url" => @cancel_url
|
219
219
|
}
|
220
220
|
|
221
221
|
response = Response.new(request.post(path, data, options))
|
@@ -265,14 +265,14 @@ module ProcessOut
|
|
265
265
|
request = Request.new(@client)
|
266
266
|
path = "/products/" + CGI.escape(@id) + ""
|
267
267
|
data = {
|
268
|
-
"name"
|
269
|
-
"amount"
|
270
|
-
"currency"
|
271
|
-
"metadata"
|
272
|
-
"request_email"
|
273
|
-
"request_shipping"
|
274
|
-
"return_url"
|
275
|
-
"cancel_url"
|
268
|
+
"name" => @name,
|
269
|
+
"amount" => @amount,
|
270
|
+
"currency" => @currency,
|
271
|
+
"metadata" => @metadata,
|
272
|
+
"request_email" => @request_email,
|
273
|
+
"request_shipping" => @request_shipping,
|
274
|
+
"return_url" => @return_url,
|
275
|
+
"cancel_url" => @cancel_url
|
276
276
|
}
|
277
277
|
|
278
278
|
response = Response.new(request.put(path, data, options))
|
data/lib/processout/refund.rb
CHANGED
@@ -141,10 +141,10 @@ module ProcessOut
|
|
141
141
|
request = Request.new(@client)
|
142
142
|
path = "/transactions/" + CGI.escape(transaction_id) + "/refunds"
|
143
143
|
data = {
|
144
|
-
"amount"
|
145
|
-
"metadata"
|
146
|
-
"reason"
|
147
|
-
"information"
|
144
|
+
"amount" => @amount,
|
145
|
+
"metadata" => @metadata,
|
146
|
+
"reason" => @reason,
|
147
|
+
"information" => @information
|
148
148
|
}
|
149
149
|
|
150
150
|
response = Response.new(request.post(path, data, options))
|
@@ -410,16 +410,16 @@ module ProcessOut
|
|
410
410
|
request = Request.new(@client)
|
411
411
|
path = "/subscriptions"
|
412
412
|
data = {
|
413
|
-
"cancel_at"
|
414
|
-
"name"
|
415
|
-
"amount"
|
416
|
-
"currency"
|
417
|
-
"metadata"
|
418
|
-
"interval"
|
419
|
-
"trial_end_at"
|
420
|
-
"return_url"
|
421
|
-
"cancel_url"
|
422
|
-
|
413
|
+
"cancel_at" => @cancel_at,
|
414
|
+
"name" => @name,
|
415
|
+
"amount" => @amount,
|
416
|
+
"currency" => @currency,
|
417
|
+
"metadata" => @metadata,
|
418
|
+
"interval" => @interval,
|
419
|
+
"trial_end_at" => @trial_end_at,
|
420
|
+
"return_url" => @return_url,
|
421
|
+
"cancel_url" => @cancel_url,
|
422
|
+
"customer_id" => customer_id
|
423
423
|
}
|
424
424
|
|
425
425
|
response = Response.new(request.post(path, data, options))
|
@@ -445,17 +445,17 @@ module ProcessOut
|
|
445
445
|
request = Request.new(@client)
|
446
446
|
path = "/subscriptions"
|
447
447
|
data = {
|
448
|
-
"cancel_at"
|
449
|
-
"name"
|
450
|
-
"amount"
|
451
|
-
"currency"
|
452
|
-
"metadata"
|
453
|
-
"interval"
|
454
|
-
"trial_end_at"
|
455
|
-
"return_url"
|
456
|
-
"cancel_url"
|
457
|
-
|
458
|
-
|
448
|
+
"cancel_at" => @cancel_at,
|
449
|
+
"name" => @name,
|
450
|
+
"amount" => @amount,
|
451
|
+
"currency" => @currency,
|
452
|
+
"metadata" => @metadata,
|
453
|
+
"interval" => @interval,
|
454
|
+
"trial_end_at" => @trial_end_at,
|
455
|
+
"return_url" => @return_url,
|
456
|
+
"cancel_url" => @cancel_url,
|
457
|
+
"customer_id" => customer_id,
|
458
|
+
"plan_id" => plan_id
|
459
459
|
}
|
460
460
|
|
461
461
|
response = Response.new(request.post(path, data, options))
|
@@ -506,8 +506,8 @@ module ProcessOut
|
|
506
506
|
request = Request.new(@client)
|
507
507
|
path = "/subscriptions/" + CGI.escape(@id) + ""
|
508
508
|
data = {
|
509
|
-
"trial_end_at"
|
510
|
-
|
509
|
+
"trial_end_at" => @trial_end_at,
|
510
|
+
"prorate" => prorate
|
511
511
|
}
|
512
512
|
|
513
513
|
response = Response.new(request.put(path, data, options))
|
@@ -533,8 +533,8 @@ module ProcessOut
|
|
533
533
|
request = Request.new(@client)
|
534
534
|
path = "/subscriptions/" + CGI.escape(@id) + ""
|
535
535
|
data = {
|
536
|
-
|
537
|
-
|
536
|
+
"plan_id" => plan_id,
|
537
|
+
"prorate" => prorate
|
538
538
|
}
|
539
539
|
|
540
540
|
response = Response.new(request.put(path, data, options))
|
@@ -559,7 +559,7 @@ module ProcessOut
|
|
559
559
|
request = Request.new(@client)
|
560
560
|
path = "/subscriptions/" + CGI.escape(@id) + ""
|
561
561
|
data = {
|
562
|
-
|
562
|
+
"source" => source
|
563
563
|
}
|
564
564
|
|
565
565
|
response = Response.new(request.put(path, data, options))
|
@@ -584,7 +584,7 @@ module ProcessOut
|
|
584
584
|
request = Request.new(@client)
|
585
585
|
path = "/subscriptions/" + CGI.escape(@id) + ""
|
586
586
|
data = {
|
587
|
-
|
587
|
+
"cancellation_reason" => cancellation_reason
|
588
588
|
}
|
589
589
|
|
590
590
|
response = Response.new(request.delete(path, data, options))
|
@@ -610,8 +610,8 @@ module ProcessOut
|
|
610
610
|
request = Request.new(@client)
|
611
611
|
path = "/subscriptions/" + CGI.escape(@id) + ""
|
612
612
|
data = {
|
613
|
-
|
614
|
-
|
613
|
+
"cancel_at" => cancel_at,
|
614
|
+
"cancellation_reason" => cancellation_reason
|
615
615
|
}
|
616
616
|
|
617
617
|
response = Response.new(request.delete(path, data, options))
|
data/lib/processout/token.rb
CHANGED
@@ -115,8 +115,8 @@ module ProcessOut
|
|
115
115
|
request = Request.new(@client)
|
116
116
|
path = "/customers/" + CGI.escape(customer_id) + "/tokens"
|
117
117
|
data = {
|
118
|
-
"metadata"
|
119
|
-
|
118
|
+
"metadata" => @metadata,
|
119
|
+
"source" => source
|
120
120
|
}
|
121
121
|
|
122
122
|
response = Response.new(request.post(path, data, options))
|
@@ -143,9 +143,9 @@ module ProcessOut
|
|
143
143
|
request = Request.new(@client)
|
144
144
|
path = "/customers/" + CGI.escape(customer_id) + "/tokens"
|
145
145
|
data = {
|
146
|
-
"metadata"
|
147
|
-
|
148
|
-
|
146
|
+
"metadata" => @metadata,
|
147
|
+
"source" => source,
|
148
|
+
"target" => target
|
149
149
|
}
|
150
150
|
|
151
151
|
response = Response.new(request.post(path, data, options))
|
data/lib/processout/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: processout
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel HUEZ
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|