processout 3.4.0 → 4.0.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 +4 -4
- data/lib/processout/activity.rb +1 -1
- data/lib/processout/addon.rb +3 -3
- data/lib/processout/alternative_merchant_certificate.rb +5 -3
- data/lib/processout/apple_pay_alternative_merchant_certificates.rb +5 -3
- data/lib/processout/balances.rb +5 -3
- data/lib/processout/card.rb +1 -1
- data/lib/processout/card_create_request.rb +1 -1
- data/lib/processout/card_information.rb +1 -1
- data/lib/processout/card_update_request.rb +1 -1
- data/lib/processout/coupon.rb +3 -3
- data/lib/processout/customer.rb +8 -6
- data/lib/processout/discount.rb +2 -2
- data/lib/processout/event.rb +1 -1
- data/lib/processout/export_layout.rb +4 -4
- data/lib/processout/export_layout_configuration_options.rb +1 -1
- data/lib/processout/gateway_configuration.rb +3 -3
- data/lib/processout/invoice.rb +74 -46
- data/lib/processout/networking/request.rb +1 -1
- data/lib/processout/payout.rb +1 -1
- data/lib/processout/plan.rb +3 -3
- data/lib/processout/product.rb +8 -6
- data/lib/processout/project.rb +3 -3
- data/lib/processout/project_sftp_settings_public.rb +1 -1
- data/lib/processout/refund.rb +1 -1
- data/lib/processout/subscription.rb +19 -13
- data/lib/processout/token.rb +7 -5
- data/lib/processout/transaction.rb +6 -4
- data/lib/processout/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5cca154d785d4ab7d1e60045fac97155a5ff15d75c57c0d23e6f0dfcce51605d
|
4
|
+
data.tar.gz: 5c832d14a0ffb515c64fd6c8be214da96a854caf5807c301e3e0310a095039a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 154af01e3524d295aeb9a9ee8b3217466d36e1adabc681f9f5d1d3be1d894827543c9cd810bc5317f4cbbdddf2b71b3ffe2999de0f0f231a74c3d1ec1faecaba
|
7
|
+
data.tar.gz: 5b7ca8873a882e0647e6ff7e9b6c0bc2e12f96a5046ee131c4649d01023662c647b4030a53b1a722f21e265032b513824abb397ef1017c9f9e434cb8c0c7edc4
|
data/lib/processout/activity.rb
CHANGED
data/lib/processout/addon.rb
CHANGED
@@ -299,7 +299,7 @@ module ProcessOut
|
|
299
299
|
return_values = Array.new
|
300
300
|
|
301
301
|
body = response.body
|
302
|
-
body = body["addon"]
|
302
|
+
body = body.key?("addon") ? body["addon"] : nil
|
303
303
|
|
304
304
|
|
305
305
|
return_values.push(self.fill_with_data(body))
|
@@ -327,7 +327,7 @@ module ProcessOut
|
|
327
327
|
return_values = Array.new
|
328
328
|
|
329
329
|
body = response.body
|
330
|
-
body = body["addon"]
|
330
|
+
body = body.key?("addon") ? body["addon"] : nil
|
331
331
|
|
332
332
|
|
333
333
|
obj = Addon.new(@client)
|
@@ -363,7 +363,7 @@ module ProcessOut
|
|
363
363
|
return_values = Array.new
|
364
364
|
|
365
365
|
body = response.body
|
366
|
-
body = body["addon"]
|
366
|
+
body = body.key?("addon") ? body["addon"] : nil
|
367
367
|
|
368
368
|
|
369
369
|
return_values.push(self.fill_with_data(body))
|
@@ -81,9 +81,11 @@ module ProcessOut
|
|
81
81
|
return_values = Array.new
|
82
82
|
|
83
83
|
body = response.body
|
84
|
-
body = body["alternative_merchant_certificate"]
|
85
|
-
|
86
|
-
|
84
|
+
body = body.key?("alternative_merchant_certificate") ? body["alternative_merchant_certificate"] : nil
|
85
|
+
if !body.nil?
|
86
|
+
alternative_merchant_certificate = AlternativeMerchantCertificate.new(@client)
|
87
|
+
return_values.push(alternative_merchant_certificate.fill_with_data(body))
|
88
|
+
end
|
87
89
|
|
88
90
|
|
89
91
|
return_values[0]
|
@@ -108,9 +108,11 @@ module ProcessOut
|
|
108
108
|
return_values = Array.new
|
109
109
|
|
110
110
|
body = response.body
|
111
|
-
body = body["applepay_certificates"]
|
112
|
-
|
113
|
-
|
111
|
+
body = body.key?("applepay_certificates") ? body["applepay_certificates"] : nil
|
112
|
+
if !body.nil?
|
113
|
+
apple_pay_alternative_merchant_certificates = ApplePayAlternativeMerchantCertificates.new(@client)
|
114
|
+
return_values.push(apple_pay_alternative_merchant_certificates.fill_with_data(body))
|
115
|
+
end
|
114
116
|
|
115
117
|
|
116
118
|
return_values[0]
|
data/lib/processout/balances.rb
CHANGED
@@ -144,9 +144,11 @@ module ProcessOut
|
|
144
144
|
return_values = Array.new
|
145
145
|
|
146
146
|
body = response.body
|
147
|
-
body = body["balances"]
|
148
|
-
|
149
|
-
|
147
|
+
body = body.key?("balances") ? body["balances"] : nil
|
148
|
+
if !body.nil?
|
149
|
+
balances = Balances.new(@client)
|
150
|
+
return_values.push(balances.fill_with_data(body))
|
151
|
+
end
|
150
152
|
|
151
153
|
|
152
154
|
return_values[0]
|
data/lib/processout/card.rb
CHANGED
data/lib/processout/coupon.rb
CHANGED
@@ -262,7 +262,7 @@ module ProcessOut
|
|
262
262
|
return_values = Array.new
|
263
263
|
|
264
264
|
body = response.body
|
265
|
-
body = body["coupon"]
|
265
|
+
body = body.key?("coupon") ? body["coupon"] : nil
|
266
266
|
|
267
267
|
|
268
268
|
return_values.push(self.fill_with_data(body))
|
@@ -289,7 +289,7 @@ module ProcessOut
|
|
289
289
|
return_values = Array.new
|
290
290
|
|
291
291
|
body = response.body
|
292
|
-
body = body["coupon"]
|
292
|
+
body = body.key?("coupon") ? body["coupon"] : nil
|
293
293
|
|
294
294
|
|
295
295
|
obj = Coupon.new(@client)
|
@@ -316,7 +316,7 @@ module ProcessOut
|
|
316
316
|
return_values = Array.new
|
317
317
|
|
318
318
|
body = response.body
|
319
|
-
body = body["coupon"]
|
319
|
+
body = body.key?("coupon") ? body["coupon"] : nil
|
320
320
|
|
321
321
|
|
322
322
|
return_values.push(self.fill_with_data(body))
|
data/lib/processout/customer.rb
CHANGED
@@ -567,9 +567,11 @@ module ProcessOut
|
|
567
567
|
return_values = Array.new
|
568
568
|
|
569
569
|
body = response.body
|
570
|
-
body = body["token"]
|
571
|
-
|
572
|
-
|
570
|
+
body = body.key?("token") ? body["token"] : nil
|
571
|
+
if !body.nil?
|
572
|
+
token = Token.new(@client)
|
573
|
+
return_values.push(token.fill_with_data(body))
|
574
|
+
end
|
573
575
|
|
574
576
|
|
575
577
|
return_values[0]
|
@@ -695,7 +697,7 @@ module ProcessOut
|
|
695
697
|
return_values = Array.new
|
696
698
|
|
697
699
|
body = response.body
|
698
|
-
body = body["customer"]
|
700
|
+
body = body.key?("customer") ? body["customer"] : nil
|
699
701
|
|
700
702
|
|
701
703
|
return_values.push(self.fill_with_data(body))
|
@@ -722,7 +724,7 @@ module ProcessOut
|
|
722
724
|
return_values = Array.new
|
723
725
|
|
724
726
|
body = response.body
|
725
|
-
body = body["customer"]
|
727
|
+
body = body.key?("customer") ? body["customer"] : nil
|
726
728
|
|
727
729
|
|
728
730
|
obj = Customer.new(@client)
|
@@ -769,7 +771,7 @@ module ProcessOut
|
|
769
771
|
return_values = Array.new
|
770
772
|
|
771
773
|
body = response.body
|
772
|
-
body = body["customer"]
|
774
|
+
body = body.key?("customer") ? body["customer"] : nil
|
773
775
|
|
774
776
|
|
775
777
|
return_values.push(self.fill_with_data(body))
|
data/lib/processout/discount.rb
CHANGED
@@ -295,7 +295,7 @@ module ProcessOut
|
|
295
295
|
return_values = Array.new
|
296
296
|
|
297
297
|
body = response.body
|
298
|
-
body = body["discount"]
|
298
|
+
body = body.key?("discount") ? body["discount"] : nil
|
299
299
|
|
300
300
|
|
301
301
|
return_values.push(self.fill_with_data(body))
|
@@ -323,7 +323,7 @@ module ProcessOut
|
|
323
323
|
return_values = Array.new
|
324
324
|
|
325
325
|
body = response.body
|
326
|
-
body = body["discount"]
|
326
|
+
body = body.key?("discount") ? body["discount"] : nil
|
327
327
|
|
328
328
|
|
329
329
|
obj = Discount.new(@client)
|
data/lib/processout/event.rb
CHANGED
@@ -213,7 +213,7 @@ module ProcessOut
|
|
213
213
|
return_values = Array.new
|
214
214
|
|
215
215
|
body = response.body
|
216
|
-
body = body["export_layout"]
|
216
|
+
body = body.key?("export_layout") ? body["export_layout"] : nil
|
217
217
|
|
218
218
|
|
219
219
|
obj = ExportLayout.new(@client)
|
@@ -241,7 +241,7 @@ module ProcessOut
|
|
241
241
|
return_values = Array.new
|
242
242
|
|
243
243
|
body = response.body
|
244
|
-
body = body["export_layout"]
|
244
|
+
body = body.key?("export_layout") ? body["export_layout"] : nil
|
245
245
|
|
246
246
|
|
247
247
|
obj = ExportLayout.new(@client)
|
@@ -271,7 +271,7 @@ module ProcessOut
|
|
271
271
|
return_values = Array.new
|
272
272
|
|
273
273
|
body = response.body
|
274
|
-
body = body["export_layout"]
|
274
|
+
body = body.key?("export_layout") ? body["export_layout"] : nil
|
275
275
|
|
276
276
|
|
277
277
|
return_values.push(self.fill_with_data(body))
|
@@ -300,7 +300,7 @@ module ProcessOut
|
|
300
300
|
return_values = Array.new
|
301
301
|
|
302
302
|
body = response.body
|
303
|
-
body = body["export_layout"]
|
303
|
+
body = body.key?("export_layout") ? body["export_layout"] : nil
|
304
304
|
|
305
305
|
|
306
306
|
return_values.push(self.fill_with_data(body))
|
@@ -128,7 +128,7 @@ module ProcessOut
|
|
128
128
|
return_values = Array.new
|
129
129
|
|
130
130
|
body = response.body
|
131
|
-
body = body["export_layout_configuration_options"]
|
131
|
+
body = body.key?("export_layout_configuration_options") ? body["export_layout_configuration_options"] : nil
|
132
132
|
|
133
133
|
|
134
134
|
obj = ExportLayoutConfigurationOptions.new(@client)
|
@@ -268,7 +268,7 @@ module ProcessOut
|
|
268
268
|
return_values = Array.new
|
269
269
|
|
270
270
|
body = response.body
|
271
|
-
body = body["gateway_configuration"]
|
271
|
+
body = body.key?("gateway_configuration") ? body["gateway_configuration"] : nil
|
272
272
|
|
273
273
|
|
274
274
|
obj = GatewayConfiguration.new(@client)
|
@@ -302,7 +302,7 @@ module ProcessOut
|
|
302
302
|
return_values = Array.new
|
303
303
|
|
304
304
|
body = response.body
|
305
|
-
body = body["gateway_configuration"]
|
305
|
+
body = body.key?("gateway_configuration") ? body["gateway_configuration"] : nil
|
306
306
|
|
307
307
|
|
308
308
|
return_values.push(self.fill_with_data(body))
|
@@ -357,7 +357,7 @@ module ProcessOut
|
|
357
357
|
return_values = Array.new
|
358
358
|
|
359
359
|
body = response.body
|
360
|
-
body = body["gateway_configuration"]
|
360
|
+
body = body.key?("gateway_configuration") ? body["gateway_configuration"] : nil
|
361
361
|
|
362
362
|
|
363
363
|
return_values.push(self.fill_with_data(body))
|
data/lib/processout/invoice.rb
CHANGED
@@ -828,9 +828,11 @@ module ProcessOut
|
|
828
828
|
return_values = Array.new
|
829
829
|
|
830
830
|
body = response.body
|
831
|
-
body = body["transaction"]
|
832
|
-
|
833
|
-
|
831
|
+
body = body.key?("transaction") ? body["transaction"] : nil
|
832
|
+
if !body.nil?
|
833
|
+
transaction = Transaction.new(@client)
|
834
|
+
return_values.push(transaction.fill_with_data(body))
|
835
|
+
end
|
834
836
|
|
835
837
|
|
836
838
|
return_values[0]
|
@@ -865,13 +867,17 @@ module ProcessOut
|
|
865
867
|
return_values = Array.new
|
866
868
|
|
867
869
|
body = response.body
|
868
|
-
body = body["transaction"]
|
869
|
-
|
870
|
-
|
870
|
+
body = body.key?("transaction") ? body["transaction"] : nil
|
871
|
+
if !body.nil?
|
872
|
+
transaction = Transaction.new(@client)
|
873
|
+
return_values.push(transaction.fill_with_data(body))
|
874
|
+
end
|
871
875
|
body = response.body
|
872
|
-
body = body["customer_action"]
|
873
|
-
|
874
|
-
|
876
|
+
body = body.key?("customer_action") ? body["customer_action"] : nil
|
877
|
+
if !body.nil?
|
878
|
+
customer_action = CustomerAction.new(@client)
|
879
|
+
return_values.push(customer_action.fill_with_data(body))
|
880
|
+
end
|
875
881
|
|
876
882
|
|
877
883
|
return_values
|
@@ -907,13 +913,17 @@ module ProcessOut
|
|
907
913
|
return_values = Array.new
|
908
914
|
|
909
915
|
body = response.body
|
910
|
-
body = body["transaction"]
|
911
|
-
|
912
|
-
|
916
|
+
body = body.key?("transaction") ? body["transaction"] : nil
|
917
|
+
if !body.nil?
|
918
|
+
transaction = Transaction.new(@client)
|
919
|
+
return_values.push(transaction.fill_with_data(body))
|
920
|
+
end
|
913
921
|
body = response.body
|
914
|
-
body = body["customer_action"]
|
915
|
-
|
916
|
-
|
922
|
+
body = body.key?("customer_action") ? body["customer_action"] : nil
|
923
|
+
if !body.nil?
|
924
|
+
customer_action = CustomerAction.new(@client)
|
925
|
+
return_values.push(customer_action.fill_with_data(body))
|
926
|
+
end
|
917
927
|
|
918
928
|
|
919
929
|
return_values
|
@@ -935,9 +945,11 @@ module ProcessOut
|
|
935
945
|
return_values = Array.new
|
936
946
|
|
937
947
|
body = response.body
|
938
|
-
body = body["customer"]
|
939
|
-
|
940
|
-
|
948
|
+
body = body.key?("customer") ? body["customer"] : nil
|
949
|
+
if !body.nil?
|
950
|
+
customer = Customer.new(@client)
|
951
|
+
return_values.push(customer.fill_with_data(body))
|
952
|
+
end
|
941
953
|
|
942
954
|
|
943
955
|
return_values[0]
|
@@ -960,9 +972,11 @@ module ProcessOut
|
|
960
972
|
return_values = Array.new
|
961
973
|
|
962
974
|
body = response.body
|
963
|
-
body = body["customer"]
|
964
|
-
|
965
|
-
|
975
|
+
body = body.key?("customer") ? body["customer"] : nil
|
976
|
+
if !body.nil?
|
977
|
+
customer = Customer.new(@client)
|
978
|
+
return_values.push(customer.fill_with_data(body))
|
979
|
+
end
|
966
980
|
|
967
981
|
|
968
982
|
return_values[0]
|
@@ -988,9 +1002,11 @@ module ProcessOut
|
|
988
1002
|
return_values = Array.new
|
989
1003
|
|
990
1004
|
body = response.body
|
991
|
-
body = body["transaction"]
|
992
|
-
|
993
|
-
|
1005
|
+
body = body.key?("transaction") ? body["transaction"] : nil
|
1006
|
+
if !body.nil?
|
1007
|
+
transaction = Transaction.new(@client)
|
1008
|
+
return_values.push(transaction.fill_with_data(body))
|
1009
|
+
end
|
994
1010
|
|
995
1011
|
|
996
1012
|
return_values[0]
|
@@ -1014,9 +1030,11 @@ module ProcessOut
|
|
1014
1030
|
return_values = Array.new
|
1015
1031
|
|
1016
1032
|
body = response.body
|
1017
|
-
body = body["native_apm"]
|
1018
|
-
|
1019
|
-
|
1033
|
+
body = body.key?("native_apm") ? body["native_apm"] : nil
|
1034
|
+
if !body.nil?
|
1035
|
+
native_apm_transaction_details = NativeAPMTransactionDetails.new(@client)
|
1036
|
+
return_values.push(native_apm_transaction_details.fill_with_data(body))
|
1037
|
+
end
|
1020
1038
|
|
1021
1039
|
|
1022
1040
|
return_values[0]
|
@@ -1040,13 +1058,17 @@ module ProcessOut
|
|
1040
1058
|
return_values = Array.new
|
1041
1059
|
|
1042
1060
|
body = response.body
|
1043
|
-
body = body["transaction"]
|
1044
|
-
|
1045
|
-
|
1061
|
+
body = body.key?("transaction") ? body["transaction"] : nil
|
1062
|
+
if !body.nil?
|
1063
|
+
transaction = Transaction.new(@client)
|
1064
|
+
return_values.push(transaction.fill_with_data(body))
|
1065
|
+
end
|
1046
1066
|
body = response.body
|
1047
|
-
body = body["native_apm"]
|
1048
|
-
|
1049
|
-
|
1067
|
+
body = body.key?("native_apm") ? body["native_apm"] : nil
|
1068
|
+
if !body.nil?
|
1069
|
+
native_apm_response = NativeAPMResponse.new(@client)
|
1070
|
+
return_values.push(native_apm_response.fill_with_data(body))
|
1071
|
+
end
|
1050
1072
|
|
1051
1073
|
|
1052
1074
|
return_values
|
@@ -1070,9 +1092,11 @@ module ProcessOut
|
|
1070
1092
|
return_values = Array.new
|
1071
1093
|
|
1072
1094
|
body = response.body
|
1073
|
-
body = body["customer_action"]
|
1074
|
-
|
1075
|
-
|
1095
|
+
body = body.key?("customer_action") ? body["customer_action"] : nil
|
1096
|
+
if !body.nil?
|
1097
|
+
customer_action = CustomerAction.new(@client)
|
1098
|
+
return_values.push(customer_action.fill_with_data(body))
|
1099
|
+
end
|
1076
1100
|
|
1077
1101
|
|
1078
1102
|
return_values[0]
|
@@ -1094,9 +1118,11 @@ module ProcessOut
|
|
1094
1118
|
return_values = Array.new
|
1095
1119
|
|
1096
1120
|
body = response.body
|
1097
|
-
body = body["transaction"]
|
1098
|
-
|
1099
|
-
|
1121
|
+
body = body.key?("transaction") ? body["transaction"] : nil
|
1122
|
+
if !body.nil?
|
1123
|
+
transaction = Transaction.new(@client)
|
1124
|
+
return_values.push(transaction.fill_with_data(body))
|
1125
|
+
end
|
1100
1126
|
|
1101
1127
|
|
1102
1128
|
return_values[0]
|
@@ -1119,9 +1145,11 @@ module ProcessOut
|
|
1119
1145
|
return_values = Array.new
|
1120
1146
|
|
1121
1147
|
body = response.body
|
1122
|
-
body = body["transaction"]
|
1123
|
-
|
1124
|
-
|
1148
|
+
body = body.key?("transaction") ? body["transaction"] : nil
|
1149
|
+
if !body.nil?
|
1150
|
+
transaction = Transaction.new(@client)
|
1151
|
+
return_values.push(transaction.fill_with_data(body))
|
1152
|
+
end
|
1125
1153
|
|
1126
1154
|
|
1127
1155
|
return_values[0]
|
@@ -1208,7 +1236,7 @@ module ProcessOut
|
|
1208
1236
|
return_values = Array.new
|
1209
1237
|
|
1210
1238
|
body = response.body
|
1211
|
-
body = body["invoice"]
|
1239
|
+
body = body.key?("invoice") ? body["invoice"] : nil
|
1212
1240
|
|
1213
1241
|
|
1214
1242
|
return_values.push(self.fill_with_data(body))
|
@@ -1235,7 +1263,7 @@ module ProcessOut
|
|
1235
1263
|
return_values = Array.new
|
1236
1264
|
|
1237
1265
|
body = response.body
|
1238
|
-
body = body["invoice"]
|
1266
|
+
body = body.key?("invoice") ? body["invoice"] : nil
|
1239
1267
|
|
1240
1268
|
|
1241
1269
|
obj = Invoice.new(@client)
|
@@ -1285,7 +1313,7 @@ module ProcessOut
|
|
1285
1313
|
return_values = Array.new
|
1286
1314
|
|
1287
1315
|
body = response.body
|
1288
|
-
body = body["invoice"]
|
1316
|
+
body = body.key?("invoice") ? body["invoice"] : nil
|
1289
1317
|
|
1290
1318
|
|
1291
1319
|
obj = Invoice.new(@client)
|
@@ -1316,7 +1344,7 @@ module ProcessOut
|
|
1316
1344
|
return_values = Array.new
|
1317
1345
|
|
1318
1346
|
body = response.body
|
1319
|
-
body = body["invoice"]
|
1347
|
+
body = body.key?("invoice") ? body["invoice"] : nil
|
1320
1348
|
|
1321
1349
|
|
1322
1350
|
return_values.push(self.fill_with_data(body))
|
@@ -13,7 +13,7 @@ module ProcessOut
|
|
13
13
|
req.basic_auth @client.project_id, @client.project_secret
|
14
14
|
req.content_type = "application/json"
|
15
15
|
req["API-Version"] = "1.4.0.0"
|
16
|
-
req["User-Agent"] = "ProcessOut Ruby-Bindings/
|
16
|
+
req["User-Agent"] = "ProcessOut Ruby-Bindings/4.0.0"
|
17
17
|
|
18
18
|
unless options.nil?
|
19
19
|
req["Idempotency-Key"] = options.fetch(:idempotency_key, "")
|
data/lib/processout/payout.rb
CHANGED
data/lib/processout/plan.rb
CHANGED
@@ -274,7 +274,7 @@ module ProcessOut
|
|
274
274
|
return_values = Array.new
|
275
275
|
|
276
276
|
body = response.body
|
277
|
-
body = body["plan"]
|
277
|
+
body = body.key?("plan") ? body["plan"] : nil
|
278
278
|
|
279
279
|
|
280
280
|
return_values.push(self.fill_with_data(body))
|
@@ -301,7 +301,7 @@ module ProcessOut
|
|
301
301
|
return_values = Array.new
|
302
302
|
|
303
303
|
body = response.body
|
304
|
-
body = body["plan"]
|
304
|
+
body = body.key?("plan") ? body["plan"] : nil
|
305
305
|
|
306
306
|
|
307
307
|
obj = Plan.new(@client)
|
@@ -332,7 +332,7 @@ module ProcessOut
|
|
332
332
|
return_values = Array.new
|
333
333
|
|
334
334
|
body = response.body
|
335
|
-
body = body["plan"]
|
335
|
+
body = body.key?("plan") ? body["plan"] : nil
|
336
336
|
|
337
337
|
|
338
338
|
return_values.push(self.fill_with_data(body))
|
data/lib/processout/product.rb
CHANGED
@@ -214,9 +214,11 @@ module ProcessOut
|
|
214
214
|
return_values = Array.new
|
215
215
|
|
216
216
|
body = response.body
|
217
|
-
body = body["invoice"]
|
218
|
-
|
219
|
-
|
217
|
+
body = body.key?("invoice") ? body["invoice"] : nil
|
218
|
+
if !body.nil?
|
219
|
+
invoice = Invoice.new(@client)
|
220
|
+
return_values.push(invoice.fill_with_data(body))
|
221
|
+
end
|
220
222
|
|
221
223
|
|
222
224
|
return_values[0]
|
@@ -273,7 +275,7 @@ module ProcessOut
|
|
273
275
|
return_values = Array.new
|
274
276
|
|
275
277
|
body = response.body
|
276
|
-
body = body["product"]
|
278
|
+
body = body.key?("product") ? body["product"] : nil
|
277
279
|
|
278
280
|
|
279
281
|
return_values.push(self.fill_with_data(body))
|
@@ -300,7 +302,7 @@ module ProcessOut
|
|
300
302
|
return_values = Array.new
|
301
303
|
|
302
304
|
body = response.body
|
303
|
-
body = body["product"]
|
305
|
+
body = body.key?("product") ? body["product"] : nil
|
304
306
|
|
305
307
|
|
306
308
|
obj = Product.new(@client)
|
@@ -332,7 +334,7 @@ module ProcessOut
|
|
332
334
|
return_values = Array.new
|
333
335
|
|
334
336
|
body = response.body
|
335
|
-
body = body["product"]
|
337
|
+
body = body.key?("product") ? body["product"] : nil
|
336
338
|
|
337
339
|
|
338
340
|
return_values.push(self.fill_with_data(body))
|
data/lib/processout/project.rb
CHANGED
@@ -231,7 +231,7 @@ module ProcessOut
|
|
231
231
|
return_values = Array.new
|
232
232
|
|
233
233
|
body = response.body
|
234
|
-
body = body["project"]
|
234
|
+
body = body.key?("project") ? body["project"] : nil
|
235
235
|
|
236
236
|
|
237
237
|
return_values.push(self.fill_with_data(body))
|
@@ -257,7 +257,7 @@ module ProcessOut
|
|
257
257
|
return_values = Array.new
|
258
258
|
|
259
259
|
body = response.body
|
260
|
-
body = body["project"]
|
260
|
+
body = body.key?("project") ? body["project"] : nil
|
261
261
|
|
262
262
|
|
263
263
|
return_values.push(self.fill_with_data(body))
|
@@ -339,7 +339,7 @@ module ProcessOut
|
|
339
339
|
return_values = Array.new
|
340
340
|
|
341
341
|
body = response.body
|
342
|
-
body = body["project"]
|
342
|
+
body = body.key?("project") ? body["project"] : nil
|
343
343
|
|
344
344
|
|
345
345
|
return_values.push(self.fill_with_data(body))
|
data/lib/processout/refund.rb
CHANGED
@@ -582,9 +582,11 @@ module ProcessOut
|
|
582
582
|
return_values = Array.new
|
583
583
|
|
584
584
|
body = response.body
|
585
|
-
body = body["addon"]
|
586
|
-
|
587
|
-
|
585
|
+
body = body.key?("addon") ? body["addon"] : nil
|
586
|
+
if !body.nil?
|
587
|
+
addon = Addon.new(@client)
|
588
|
+
return_values.push(addon.fill_with_data(body))
|
589
|
+
end
|
588
590
|
|
589
591
|
|
590
592
|
return_values[0]
|
@@ -630,9 +632,11 @@ module ProcessOut
|
|
630
632
|
return_values = Array.new
|
631
633
|
|
632
634
|
body = response.body
|
633
|
-
body = body["customer"]
|
634
|
-
|
635
|
-
|
635
|
+
body = body.key?("customer") ? body["customer"] : nil
|
636
|
+
if !body.nil?
|
637
|
+
customer = Customer.new(@client)
|
638
|
+
return_values.push(customer.fill_with_data(body))
|
639
|
+
end
|
636
640
|
|
637
641
|
|
638
642
|
return_values[0]
|
@@ -685,9 +689,11 @@ module ProcessOut
|
|
685
689
|
return_values = Array.new
|
686
690
|
|
687
691
|
body = response.body
|
688
|
-
body = body["discount"]
|
689
|
-
|
690
|
-
|
692
|
+
body = body.key?("discount") ? body["discount"] : nil
|
693
|
+
if !body.nil?
|
694
|
+
discount = Discount.new(@client)
|
695
|
+
return_values.push(discount.fill_with_data(body))
|
696
|
+
end
|
691
697
|
|
692
698
|
|
693
699
|
return_values[0]
|
@@ -803,7 +809,7 @@ module ProcessOut
|
|
803
809
|
return_values = Array.new
|
804
810
|
|
805
811
|
body = response.body
|
806
|
-
body = body["subscription"]
|
812
|
+
body = body.key?("subscription") ? body["subscription"] : nil
|
807
813
|
|
808
814
|
|
809
815
|
return_values.push(self.fill_with_data(body))
|
@@ -830,7 +836,7 @@ module ProcessOut
|
|
830
836
|
return_values = Array.new
|
831
837
|
|
832
838
|
body = response.body
|
833
|
-
body = body["subscription"]
|
839
|
+
body = body.key?("subscription") ? body["subscription"] : nil
|
834
840
|
|
835
841
|
|
836
842
|
obj = Subscription.new(@client)
|
@@ -867,7 +873,7 @@ module ProcessOut
|
|
867
873
|
return_values = Array.new
|
868
874
|
|
869
875
|
body = response.body
|
870
|
-
body = body["subscription"]
|
876
|
+
body = body.key?("subscription") ? body["subscription"] : nil
|
871
877
|
|
872
878
|
|
873
879
|
return_values.push(self.fill_with_data(body))
|
@@ -895,7 +901,7 @@ module ProcessOut
|
|
895
901
|
return_values = Array.new
|
896
902
|
|
897
903
|
body = response.body
|
898
|
-
body = body["subscription"]
|
904
|
+
body = body.key?("subscription") ? body["subscription"] : nil
|
899
905
|
|
900
906
|
|
901
907
|
return_values.push(self.fill_with_data(body))
|
data/lib/processout/token.rb
CHANGED
@@ -404,7 +404,7 @@ module ProcessOut
|
|
404
404
|
return_values = Array.new
|
405
405
|
|
406
406
|
body = response.body
|
407
|
-
body = body["token"]
|
407
|
+
body = body.key?("token") ? body["token"] : nil
|
408
408
|
|
409
409
|
|
410
410
|
obj = Token.new(@client)
|
@@ -447,15 +447,17 @@ module ProcessOut
|
|
447
447
|
return_values = Array.new
|
448
448
|
|
449
449
|
body = response.body
|
450
|
-
body = body["token"]
|
450
|
+
body = body.key?("token") ? body["token"] : nil
|
451
451
|
|
452
452
|
|
453
453
|
return_values.push(self.fill_with_data(body))
|
454
454
|
|
455
455
|
body = response.body
|
456
|
-
body = body["customer_action"]
|
457
|
-
|
458
|
-
|
456
|
+
body = body.key?("customer_action") ? body["customer_action"] : nil
|
457
|
+
if !body.nil?
|
458
|
+
customer_action = CustomerAction.new(@client)
|
459
|
+
return_values.push(customer_action.fill_with_data(body))
|
460
|
+
end
|
459
461
|
|
460
462
|
|
461
463
|
return_values
|
@@ -991,9 +991,11 @@ module ProcessOut
|
|
991
991
|
return_values = Array.new
|
992
992
|
|
993
993
|
body = response.body
|
994
|
-
body = body["refund"]
|
995
|
-
|
996
|
-
|
994
|
+
body = body.key?("refund") ? body["refund"] : nil
|
995
|
+
if !body.nil?
|
996
|
+
refund = Refund.new(@client)
|
997
|
+
return_values.push(refund.fill_with_data(body))
|
998
|
+
end
|
997
999
|
|
998
1000
|
|
999
1001
|
return_values[0]
|
@@ -1076,7 +1078,7 @@ module ProcessOut
|
|
1076
1078
|
return_values = Array.new
|
1077
1079
|
|
1078
1080
|
body = response.body
|
1079
|
-
body = body["transaction"]
|
1081
|
+
body = body.key?("transaction") ? body["transaction"] : nil
|
1080
1082
|
|
1081
1083
|
|
1082
1084
|
obj = Transaction.new(@client)
|
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:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel HUEZ
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|