processout 2.31.0 → 3.1.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/card_shipping.rb +33 -0
- data/lib/processout/card_update_request.rb +0 -24
- data/lib/processout/export_layout.rb +337 -0
- data/lib/processout/export_layout_configuration.rb +132 -0
- data/lib/processout/export_layout_configuration_amount.rb +81 -0
- data/lib/processout/export_layout_configuration_column.rb +81 -0
- data/lib/processout/export_layout_configuration_configuration_options_amount.rb +81 -0
- data/lib/processout/export_layout_configuration_configuration_options_time.rb +70 -0
- data/lib/processout/export_layout_configuration_options.rb +144 -0
- data/lib/processout/export_layout_configuration_time.rb +70 -0
- data/lib/processout/external_three_ds.rb +136 -0
- data/lib/processout/invoice.rb +68 -6
- data/lib/processout/invoice_external_fraud_tools.rb +3 -0
- data/lib/processout/invoice_shipping.rb +33 -0
- data/lib/processout/networking/request.rb +1 -1
- data/lib/processout/project.rb +2 -1
- data/lib/processout/token.rb +7 -2
- data/lib/processout/transaction.rb +30 -0
- data/lib/processout/version.rb +1 -1
- data/lib/processout.rb +60 -12
- metadata +12 -4
- data/lib/processout/invoices_process_native_payment_response.rb +0 -105
data/lib/processout/invoice.rb
CHANGED
@@ -21,6 +21,7 @@ module ProcessOut
|
|
21
21
|
attr_reader :token_id
|
22
22
|
attr_reader :details
|
23
23
|
attr_reader :url
|
24
|
+
attr_reader :url_qrcode
|
24
25
|
attr_reader :name
|
25
26
|
attr_reader :order_id
|
26
27
|
attr_reader :amount
|
@@ -39,6 +40,7 @@ module ProcessOut
|
|
39
40
|
attr_reader :require_backend_capture
|
40
41
|
attr_reader :sandbox
|
41
42
|
attr_reader :created_at
|
43
|
+
attr_reader :expires_at
|
42
44
|
attr_reader :risk
|
43
45
|
attr_reader :shipping
|
44
46
|
attr_reader :device
|
@@ -186,6 +188,10 @@ module ProcessOut
|
|
186
188
|
@url = val
|
187
189
|
end
|
188
190
|
|
191
|
+
def url_qrcode=(val)
|
192
|
+
@url_qrcode = val
|
193
|
+
end
|
194
|
+
|
189
195
|
def name=(val)
|
190
196
|
@name = val
|
191
197
|
end
|
@@ -258,6 +264,10 @@ module ProcessOut
|
|
258
264
|
@created_at = val
|
259
265
|
end
|
260
266
|
|
267
|
+
def expires_at=(val)
|
268
|
+
@expires_at = val
|
269
|
+
end
|
270
|
+
|
261
271
|
def risk=(val)
|
262
272
|
if val.nil?
|
263
273
|
@risk = val
|
@@ -443,6 +453,7 @@ module ProcessOut
|
|
443
453
|
self.token_id = data.fetch(:token_id, nil)
|
444
454
|
self.details = data.fetch(:details, nil)
|
445
455
|
self.url = data.fetch(:url, nil)
|
456
|
+
self.url_qrcode = data.fetch(:url_qrcode, nil)
|
446
457
|
self.name = data.fetch(:name, nil)
|
447
458
|
self.order_id = data.fetch(:order_id, nil)
|
448
459
|
self.amount = data.fetch(:amount, nil)
|
@@ -461,6 +472,7 @@ module ProcessOut
|
|
461
472
|
self.require_backend_capture = data.fetch(:require_backend_capture, nil)
|
462
473
|
self.sandbox = data.fetch(:sandbox, nil)
|
463
474
|
self.created_at = data.fetch(:created_at, nil)
|
475
|
+
self.expires_at = data.fetch(:expires_at, nil)
|
464
476
|
self.risk = data.fetch(:risk, nil)
|
465
477
|
self.shipping = data.fetch(:shipping, nil)
|
466
478
|
self.device = data.fetch(:device, nil)
|
@@ -502,6 +514,7 @@ module ProcessOut
|
|
502
514
|
"token_id": self.token_id,
|
503
515
|
"details": self.details,
|
504
516
|
"url": self.url,
|
517
|
+
"url_qrcode": self.url_qrcode,
|
505
518
|
"name": self.name,
|
506
519
|
"order_id": self.order_id,
|
507
520
|
"amount": self.amount,
|
@@ -520,6 +533,7 @@ module ProcessOut
|
|
520
533
|
"require_backend_capture": self.require_backend_capture,
|
521
534
|
"sandbox": self.sandbox,
|
522
535
|
"created_at": self.created_at,
|
536
|
+
"expires_at": self.expires_at,
|
523
537
|
"risk": self.risk,
|
524
538
|
"shipping": self.shipping,
|
525
539
|
"device": self.device,
|
@@ -586,6 +600,9 @@ module ProcessOut
|
|
586
600
|
if data.include? "url"
|
587
601
|
self.url = data["url"]
|
588
602
|
end
|
603
|
+
if data.include? "url_qrcode"
|
604
|
+
self.url_qrcode = data["url_qrcode"]
|
605
|
+
end
|
589
606
|
if data.include? "name"
|
590
607
|
self.name = data["name"]
|
591
608
|
end
|
@@ -640,6 +657,9 @@ module ProcessOut
|
|
640
657
|
if data.include? "created_at"
|
641
658
|
self.created_at = data["created_at"]
|
642
659
|
end
|
660
|
+
if data.include? "expires_at"
|
661
|
+
self.expires_at = data["expires_at"]
|
662
|
+
end
|
643
663
|
if data.include? "risk"
|
644
664
|
self.risk = data["risk"]
|
645
665
|
end
|
@@ -715,6 +735,7 @@ module ProcessOut
|
|
715
735
|
self.token_id = data.fetch(:token_id, self.token_id)
|
716
736
|
self.details = data.fetch(:details, self.details)
|
717
737
|
self.url = data.fetch(:url, self.url)
|
738
|
+
self.url_qrcode = data.fetch(:url_qrcode, self.url_qrcode)
|
718
739
|
self.name = data.fetch(:name, self.name)
|
719
740
|
self.order_id = data.fetch(:order_id, self.order_id)
|
720
741
|
self.amount = data.fetch(:amount, self.amount)
|
@@ -733,6 +754,7 @@ module ProcessOut
|
|
733
754
|
self.require_backend_capture = data.fetch(:require_backend_capture, self.require_backend_capture)
|
734
755
|
self.sandbox = data.fetch(:sandbox, self.sandbox)
|
735
756
|
self.created_at = data.fetch(:created_at, self.created_at)
|
757
|
+
self.expires_at = data.fetch(:expires_at, self.expires_at)
|
736
758
|
self.risk = data.fetch(:risk, self.risk)
|
737
759
|
self.shipping = data.fetch(:shipping, self.shipping)
|
738
760
|
self.device = data.fetch(:device, self.device)
|
@@ -800,6 +822,8 @@ module ProcessOut
|
|
800
822
|
"auto_capture_at" => options.fetch(:auto_capture_at, nil),
|
801
823
|
"metadata" => options.fetch(:metadata, nil),
|
802
824
|
"override_mac_blocking" => options.fetch(:override_mac_blocking, nil),
|
825
|
+
"external_three_d_s" => options.fetch(:external_three_d_s, nil),
|
826
|
+
"save_source" => options.fetch(:save_source, nil),
|
803
827
|
"source" => source
|
804
828
|
}
|
805
829
|
|
@@ -810,9 +834,13 @@ module ProcessOut
|
|
810
834
|
body = body["transaction"]
|
811
835
|
transaction = Transaction.new(@client)
|
812
836
|
return_values.push(transaction.fill_with_data(body))
|
837
|
+
body = response.body
|
838
|
+
body = body["customer_action"]
|
839
|
+
customer_action = CustomerAction.new(@client)
|
840
|
+
return_values.push(customer_action.fill_with_data(body))
|
813
841
|
|
814
842
|
|
815
|
-
return_values
|
843
|
+
return_values
|
816
844
|
end
|
817
845
|
|
818
846
|
# Capture the invoice using the given source (customer or token)
|
@@ -836,6 +864,8 @@ module ProcessOut
|
|
836
864
|
"metadata" => options.fetch(:metadata, nil),
|
837
865
|
"capture_statement_descriptor" => options.fetch(:capture_statement_descriptor, nil),
|
838
866
|
"override_mac_blocking" => options.fetch(:override_mac_blocking, nil),
|
867
|
+
"external_three_d_s" => options.fetch(:external_three_d_s, nil),
|
868
|
+
"save_source" => options.fetch(:save_source, nil),
|
839
869
|
"source" => source
|
840
870
|
}
|
841
871
|
|
@@ -846,9 +876,13 @@ module ProcessOut
|
|
846
876
|
body = body["transaction"]
|
847
877
|
transaction = Transaction.new(@client)
|
848
878
|
return_values.push(transaction.fill_with_data(body))
|
879
|
+
body = response.body
|
880
|
+
body = body["customer_action"]
|
881
|
+
customer_action = CustomerAction.new(@client)
|
882
|
+
return_values.push(customer_action.fill_with_data(body))
|
849
883
|
|
850
884
|
|
851
|
-
return_values
|
885
|
+
return_values
|
852
886
|
end
|
853
887
|
|
854
888
|
# Get the customer linked to the invoice.
|
@@ -972,11 +1006,16 @@ module ProcessOut
|
|
972
1006
|
return_values = Array.new
|
973
1007
|
|
974
1008
|
body = response.body
|
975
|
-
|
976
|
-
|
1009
|
+
body = body["transaction"]
|
1010
|
+
transaction = Transaction.new(@client)
|
1011
|
+
return_values.push(transaction.fill_with_data(body))
|
1012
|
+
body = response.body
|
1013
|
+
body = body["native_apm"]
|
1014
|
+
native_apm_response = NativeAPMResponse.new(@client)
|
1015
|
+
return_values.push(native_apm_response.fill_with_data(body))
|
977
1016
|
|
978
1017
|
|
979
|
-
return_values
|
1018
|
+
return_values
|
980
1019
|
end
|
981
1020
|
|
982
1021
|
# Initiate a 3-D Secure authentication
|
@@ -1125,7 +1164,8 @@ module ProcessOut
|
|
1125
1164
|
"billing" => @billing,
|
1126
1165
|
"unsupported_feature_bypass" => @unsupported_feature_bypass,
|
1127
1166
|
"verification" => @verification,
|
1128
|
-
"auto_capture_at" => @auto_capture_at
|
1167
|
+
"auto_capture_at" => @auto_capture_at,
|
1168
|
+
"expires_at" => @expires_at
|
1129
1169
|
}
|
1130
1170
|
|
1131
1171
|
response = Response.new(request.post(path, data, options))
|
@@ -1167,6 +1207,28 @@ module ProcessOut
|
|
1167
1207
|
|
1168
1208
|
|
1169
1209
|
|
1210
|
+
return_values[0]
|
1211
|
+
end
|
1212
|
+
|
1213
|
+
# Delete an invoice by its ID. Only invoices that have not been used yet can be deleted.
|
1214
|
+
# Params:
|
1215
|
+
# +invoice_id+:: ID of the invoice
|
1216
|
+
# +options+:: +Hash+ of options
|
1217
|
+
def delete(invoice_id, options = {})
|
1218
|
+
self.prefill(options)
|
1219
|
+
|
1220
|
+
request = Request.new(@client)
|
1221
|
+
path = "/invoices/" + CGI.escape(invoice_id) + ""
|
1222
|
+
data = {
|
1223
|
+
|
1224
|
+
}
|
1225
|
+
|
1226
|
+
response = Response.new(request.delete(path, data, options))
|
1227
|
+
return_values = Array.new
|
1228
|
+
|
1229
|
+
return_values.push(response.success)
|
1230
|
+
|
1231
|
+
|
1170
1232
|
return_values[0]
|
1171
1233
|
end
|
1172
1234
|
|
@@ -22,6 +22,9 @@ module ProcessOut
|
|
22
22
|
attr_reader :phone
|
23
23
|
attr_reader :expects_shipping_at
|
24
24
|
attr_reader :relay_store_name
|
25
|
+
attr_reader :first_name
|
26
|
+
attr_reader :last_name
|
27
|
+
attr_reader :email
|
25
28
|
|
26
29
|
|
27
30
|
def amount=(val)
|
@@ -92,6 +95,18 @@ module ProcessOut
|
|
92
95
|
@relay_store_name = val
|
93
96
|
end
|
94
97
|
|
98
|
+
def first_name=(val)
|
99
|
+
@first_name = val
|
100
|
+
end
|
101
|
+
|
102
|
+
def last_name=(val)
|
103
|
+
@last_name = val
|
104
|
+
end
|
105
|
+
|
106
|
+
def email=(val)
|
107
|
+
@email = val
|
108
|
+
end
|
109
|
+
|
95
110
|
|
96
111
|
# Initializes the InvoiceShipping object
|
97
112
|
# Params:
|
@@ -114,6 +129,9 @@ module ProcessOut
|
|
114
129
|
self.phone = data.fetch(:phone, nil)
|
115
130
|
self.expects_shipping_at = data.fetch(:expects_shipping_at, nil)
|
116
131
|
self.relay_store_name = data.fetch(:relay_store_name, nil)
|
132
|
+
self.first_name = data.fetch(:first_name, nil)
|
133
|
+
self.last_name = data.fetch(:last_name, nil)
|
134
|
+
self.email = data.fetch(:email, nil)
|
117
135
|
|
118
136
|
end
|
119
137
|
|
@@ -139,6 +157,9 @@ module ProcessOut
|
|
139
157
|
"phone": self.phone,
|
140
158
|
"expects_shipping_at": self.expects_shipping_at,
|
141
159
|
"relay_store_name": self.relay_store_name,
|
160
|
+
"first_name": self.first_name,
|
161
|
+
"last_name": self.last_name,
|
162
|
+
"email": self.email,
|
142
163
|
}.to_json
|
143
164
|
end
|
144
165
|
|
@@ -191,6 +212,15 @@ module ProcessOut
|
|
191
212
|
if data.include? "relay_store_name"
|
192
213
|
self.relay_store_name = data["relay_store_name"]
|
193
214
|
end
|
215
|
+
if data.include? "first_name"
|
216
|
+
self.first_name = data["first_name"]
|
217
|
+
end
|
218
|
+
if data.include? "last_name"
|
219
|
+
self.last_name = data["last_name"]
|
220
|
+
end
|
221
|
+
if data.include? "email"
|
222
|
+
self.email = data["email"]
|
223
|
+
end
|
194
224
|
|
195
225
|
self
|
196
226
|
end
|
@@ -216,6 +246,9 @@ module ProcessOut
|
|
216
246
|
self.phone = data.fetch(:phone, self.phone)
|
217
247
|
self.expects_shipping_at = data.fetch(:expects_shipping_at, self.expects_shipping_at)
|
218
248
|
self.relay_store_name = data.fetch(:relay_store_name, self.relay_store_name)
|
249
|
+
self.first_name = data.fetch(:first_name, self.first_name)
|
250
|
+
self.last_name = data.fetch(:last_name, self.last_name)
|
251
|
+
self.email = data.fetch(:email, self.email)
|
219
252
|
|
220
253
|
self
|
221
254
|
end
|
@@ -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/3.1.0"
|
17
17
|
|
18
18
|
unless options.nil?
|
19
19
|
req["Idempotency-Key"] = options.fetch(:idempotency_key, "")
|
data/lib/processout/project.rb
CHANGED
@@ -331,7 +331,8 @@ module ProcessOut
|
|
331
331
|
"name" => @name,
|
332
332
|
"default_currency" => @default_currency,
|
333
333
|
"dunning_configuration" => @dunning_configuration,
|
334
|
-
"applepay_settings" => options.fetch(:applepay_settings, nil)
|
334
|
+
"applepay_settings" => options.fetch(:applepay_settings, nil),
|
335
|
+
"public_metadata" => options.fetch(:public_metadata, nil)
|
335
336
|
}
|
336
337
|
|
337
338
|
response = Response.new(request.post(path, data, options))
|
data/lib/processout/token.rb
CHANGED
@@ -426,7 +426,8 @@ module ProcessOut
|
|
426
426
|
"verify_metadata" => options.fetch(:verify_metadata, nil),
|
427
427
|
"set_default" => options.fetch(:set_default, nil),
|
428
428
|
"verify_statement_descriptor" => options.fetch(:verify_statement_descriptor, nil),
|
429
|
-
"invoice_return_url" => options.fetch(:invoice_return_url, nil)
|
429
|
+
"invoice_return_url" => options.fetch(:invoice_return_url, nil),
|
430
|
+
"summary" => options.fetch(:summary, nil)
|
430
431
|
}
|
431
432
|
|
432
433
|
response = Response.new(request.post(path, data, options))
|
@@ -438,9 +439,13 @@ module ProcessOut
|
|
438
439
|
|
439
440
|
return_values.push(self.fill_with_data(body))
|
440
441
|
|
442
|
+
body = response.body
|
443
|
+
body = body["customer_action"]
|
444
|
+
customer_action = CustomerAction.new(@client)
|
445
|
+
return_values.push(customer_action.fill_with_data(body))
|
441
446
|
|
442
447
|
|
443
|
-
return_values
|
448
|
+
return_values
|
444
449
|
end
|
445
450
|
|
446
451
|
# Save the updated customer attributes.
|
@@ -1026,6 +1026,36 @@ module ProcessOut
|
|
1026
1026
|
|
1027
1027
|
|
1028
1028
|
|
1029
|
+
return_values[0]
|
1030
|
+
end
|
1031
|
+
|
1032
|
+
# Get full transactions data for specified list of ids.
|
1033
|
+
# Params:
|
1034
|
+
# +options+:: +Hash+ of options
|
1035
|
+
def list(options = {})
|
1036
|
+
self.prefill(options)
|
1037
|
+
|
1038
|
+
request = Request.new(@client)
|
1039
|
+
path = "/transactions"
|
1040
|
+
data = {
|
1041
|
+
|
1042
|
+
}
|
1043
|
+
|
1044
|
+
response = Response.new(request.post(path, data, options))
|
1045
|
+
return_values = Array.new
|
1046
|
+
|
1047
|
+
a = Array.new
|
1048
|
+
body = response.body
|
1049
|
+
for v in body['transactions']
|
1050
|
+
tmp = Transaction.new(@client)
|
1051
|
+
tmp.fill_with_data(v)
|
1052
|
+
a.push(tmp)
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
return_values.push(a)
|
1056
|
+
|
1057
|
+
|
1058
|
+
|
1029
1059
|
return_values[0]
|
1030
1060
|
end
|
1031
1061
|
|
data/lib/processout/version.rb
CHANGED
data/lib/processout.rb
CHANGED
@@ -16,6 +16,14 @@ require "processout/customer_phone"
|
|
16
16
|
require "processout/token"
|
17
17
|
require "processout/discount"
|
18
18
|
require "processout/event"
|
19
|
+
require "processout/export_layout"
|
20
|
+
require "processout/export_layout_configuration"
|
21
|
+
require "processout/export_layout_configuration_column"
|
22
|
+
require "processout/export_layout_configuration_time"
|
23
|
+
require "processout/export_layout_configuration_amount"
|
24
|
+
require "processout/export_layout_configuration_options"
|
25
|
+
require "processout/export_layout_configuration_configuration_options_time"
|
26
|
+
require "processout/export_layout_configuration_configuration_options_amount"
|
19
27
|
require "processout/gateway"
|
20
28
|
require "processout/gateway_configuration"
|
21
29
|
require "processout/invoice"
|
@@ -60,10 +68,10 @@ require "processout/card_shipping"
|
|
60
68
|
require "processout/card_update_request"
|
61
69
|
require "processout/error_codes"
|
62
70
|
require "processout/category_error_codes"
|
71
|
+
require "processout/external_three_ds"
|
72
|
+
require "processout/native_apm_transaction_details"
|
63
73
|
require "processout/native_apm_transaction_details_gateway"
|
64
74
|
require "processout/native_apm_transaction_details_invoice"
|
65
|
-
require "processout/native_apm_transaction_details"
|
66
|
-
require "processout/invoices_process_native_payment_response"
|
67
75
|
|
68
76
|
module ProcessOut
|
69
77
|
class Client
|
@@ -156,6 +164,46 @@ module ProcessOut
|
|
156
164
|
obj = Event.new(self, data)
|
157
165
|
end
|
158
166
|
|
167
|
+
# Create a new ExportLayout instance
|
168
|
+
def export_layout(data = {})
|
169
|
+
obj = ExportLayout.new(self, data)
|
170
|
+
end
|
171
|
+
|
172
|
+
# Create a new ExportLayoutConfiguration instance
|
173
|
+
def export_layout_configuration(data = {})
|
174
|
+
obj = ExportLayoutConfiguration.new(self, data)
|
175
|
+
end
|
176
|
+
|
177
|
+
# Create a new ExportLayoutConfigurationColumn instance
|
178
|
+
def export_layout_configuration_column(data = {})
|
179
|
+
obj = ExportLayoutConfigurationColumn.new(self, data)
|
180
|
+
end
|
181
|
+
|
182
|
+
# Create a new ExportLayoutConfigurationTime instance
|
183
|
+
def export_layout_configuration_time(data = {})
|
184
|
+
obj = ExportLayoutConfigurationTime.new(self, data)
|
185
|
+
end
|
186
|
+
|
187
|
+
# Create a new ExportLayoutConfigurationAmount instance
|
188
|
+
def export_layout_configuration_amount(data = {})
|
189
|
+
obj = ExportLayoutConfigurationAmount.new(self, data)
|
190
|
+
end
|
191
|
+
|
192
|
+
# Create a new ExportLayoutConfigurationOptions instance
|
193
|
+
def export_layout_configuration_options(data = {})
|
194
|
+
obj = ExportLayoutConfigurationOptions.new(self, data)
|
195
|
+
end
|
196
|
+
|
197
|
+
# Create a new ExportLayoutConfigurationConfigurationOptionsTime instance
|
198
|
+
def export_layout_configuration_configuration_options_time(data = {})
|
199
|
+
obj = ExportLayoutConfigurationConfigurationOptionsTime.new(self, data)
|
200
|
+
end
|
201
|
+
|
202
|
+
# Create a new ExportLayoutConfigurationConfigurationOptionsAmount instance
|
203
|
+
def export_layout_configuration_configuration_options_amount(data = {})
|
204
|
+
obj = ExportLayoutConfigurationConfigurationOptionsAmount.new(self, data)
|
205
|
+
end
|
206
|
+
|
159
207
|
# Create a new Gateway instance
|
160
208
|
def gateway(data = {})
|
161
209
|
obj = Gateway.new(self, data)
|
@@ -376,6 +424,16 @@ module ProcessOut
|
|
376
424
|
obj = CategoryErrorCodes.new(self, data)
|
377
425
|
end
|
378
426
|
|
427
|
+
# Create a new ExternalThreeDS instance
|
428
|
+
def external_three_ds(data = {})
|
429
|
+
obj = ExternalThreeDS.new(self, data)
|
430
|
+
end
|
431
|
+
|
432
|
+
# Create a new NativeAPMTransactionDetails instance
|
433
|
+
def native_apm_transaction_details(data = {})
|
434
|
+
obj = NativeAPMTransactionDetails.new(self, data)
|
435
|
+
end
|
436
|
+
|
379
437
|
# Create a new NativeAPMTransactionDetailsGateway instance
|
380
438
|
def native_apm_transaction_details_gateway(data = {})
|
381
439
|
obj = NativeAPMTransactionDetailsGateway.new(self, data)
|
@@ -386,16 +444,6 @@ module ProcessOut
|
|
386
444
|
obj = NativeAPMTransactionDetailsInvoice.new(self, data)
|
387
445
|
end
|
388
446
|
|
389
|
-
# Create a new NativeAPMTransactionDetails instance
|
390
|
-
def native_apm_transaction_details(data = {})
|
391
|
-
obj = NativeAPMTransactionDetails.new(self, data)
|
392
|
-
end
|
393
|
-
|
394
|
-
# Create a new InvoicesProcessNativePaymentResponse instance
|
395
|
-
def invoices_process_native_payment_response(data = {})
|
396
|
-
obj = InvoicesProcessNativePaymentResponse.new(self, data)
|
397
|
-
end
|
398
|
-
|
399
447
|
|
400
448
|
end
|
401
449
|
end
|
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: 3.1.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: 2024-
|
11
|
+
date: 2024-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -102,6 +102,15 @@ files:
|
|
102
102
|
- lib/processout/errors/notfound_error.rb
|
103
103
|
- lib/processout/errors/validation_error.rb
|
104
104
|
- lib/processout/event.rb
|
105
|
+
- lib/processout/export_layout.rb
|
106
|
+
- lib/processout/export_layout_configuration.rb
|
107
|
+
- lib/processout/export_layout_configuration_amount.rb
|
108
|
+
- lib/processout/export_layout_configuration_column.rb
|
109
|
+
- lib/processout/export_layout_configuration_configuration_options_amount.rb
|
110
|
+
- lib/processout/export_layout_configuration_configuration_options_time.rb
|
111
|
+
- lib/processout/export_layout_configuration_options.rb
|
112
|
+
- lib/processout/export_layout_configuration_time.rb
|
113
|
+
- lib/processout/external_three_ds.rb
|
105
114
|
- lib/processout/gateway.rb
|
106
115
|
- lib/processout/gateway_configuration.rb
|
107
116
|
- lib/processout/gateway_request.rb
|
@@ -114,7 +123,6 @@ files:
|
|
114
123
|
- lib/processout/invoice_shipping.rb
|
115
124
|
- lib/processout/invoice_shipping_phone.rb
|
116
125
|
- lib/processout/invoice_tax.rb
|
117
|
-
- lib/processout/invoices_process_native_payment_response.rb
|
118
126
|
- lib/processout/native_apm_parameter_definition.rb
|
119
127
|
- lib/processout/native_apm_parameter_value.rb
|
120
128
|
- lib/processout/native_apm_parameter_value_definition.rb
|
@@ -167,7 +175,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
175
|
- !ruby/object:Gem::Version
|
168
176
|
version: '0'
|
169
177
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
178
|
+
rubygems_version: 3.0.3.1
|
171
179
|
signing_key:
|
172
180
|
specification_version: 4
|
173
181
|
summary: Ruby bindings for the ProcessOut API
|
@@ -1,105 +0,0 @@
|
|
1
|
-
# The content of this file was automatically generated
|
2
|
-
|
3
|
-
require "cgi"
|
4
|
-
require "json"
|
5
|
-
require "processout/networking/request"
|
6
|
-
require "processout/networking/response"
|
7
|
-
|
8
|
-
module ProcessOut
|
9
|
-
class InvoicesProcessNativePaymentResponse
|
10
|
-
|
11
|
-
attr_reader :transaction
|
12
|
-
attr_reader :native_apm
|
13
|
-
|
14
|
-
|
15
|
-
def transaction=(val)
|
16
|
-
if val.nil?
|
17
|
-
@transaction = val
|
18
|
-
return
|
19
|
-
end
|
20
|
-
|
21
|
-
if val.instance_of? Transaction
|
22
|
-
@transaction = val
|
23
|
-
else
|
24
|
-
obj = Transaction.new(@client)
|
25
|
-
obj.fill_with_data(val)
|
26
|
-
@transaction = obj
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
|
31
|
-
def native_apm=(val)
|
32
|
-
if val.nil?
|
33
|
-
@native_apm = val
|
34
|
-
return
|
35
|
-
end
|
36
|
-
|
37
|
-
if val.instance_of? NativeAPMResponse
|
38
|
-
@native_apm = val
|
39
|
-
else
|
40
|
-
obj = NativeAPMResponse.new(@client)
|
41
|
-
obj.fill_with_data(val)
|
42
|
-
@native_apm = obj
|
43
|
-
end
|
44
|
-
|
45
|
-
end
|
46
|
-
|
47
|
-
|
48
|
-
# Initializes the InvoicesProcessNativePaymentResponse object
|
49
|
-
# Params:
|
50
|
-
# +client+:: +ProcessOut+ client instance
|
51
|
-
# +data+:: data that can be used to fill the object
|
52
|
-
def initialize(client, data = {})
|
53
|
-
@client = client
|
54
|
-
|
55
|
-
self.transaction = data.fetch(:transaction, nil)
|
56
|
-
self.native_apm = data.fetch(:native_apm, nil)
|
57
|
-
|
58
|
-
end
|
59
|
-
|
60
|
-
# Create a new InvoicesProcessNativePaymentResponse using the current client
|
61
|
-
def new(data = {})
|
62
|
-
InvoicesProcessNativePaymentResponse.new(@client, data)
|
63
|
-
end
|
64
|
-
|
65
|
-
# Overrides the JSON marshaller to only send the fields we want
|
66
|
-
def to_json(options)
|
67
|
-
{
|
68
|
-
"transaction": self.transaction,
|
69
|
-
"native_apm": self.native_apm,
|
70
|
-
}.to_json
|
71
|
-
end
|
72
|
-
|
73
|
-
# Fills the object with data coming from the API
|
74
|
-
# Params:
|
75
|
-
# +data+:: +Hash+ of data coming from the API
|
76
|
-
def fill_with_data(data)
|
77
|
-
if data.nil?
|
78
|
-
return self
|
79
|
-
end
|
80
|
-
if data.include? "transaction"
|
81
|
-
self.transaction = data["transaction"]
|
82
|
-
end
|
83
|
-
if data.include? "native_apm"
|
84
|
-
self.native_apm = data["native_apm"]
|
85
|
-
end
|
86
|
-
|
87
|
-
self
|
88
|
-
end
|
89
|
-
|
90
|
-
# Prefills the object with the data passed as parameters
|
91
|
-
# Params:
|
92
|
-
# +data+:: +Hash+ of data
|
93
|
-
def prefill(data)
|
94
|
-
if data.nil?
|
95
|
-
return self
|
96
|
-
end
|
97
|
-
self.transaction = data.fetch(:transaction, self.transaction)
|
98
|
-
self.native_apm = data.fetch(:native_apm, self.native_apm)
|
99
|
-
|
100
|
-
self
|
101
|
-
end
|
102
|
-
|
103
|
-
|
104
|
-
end
|
105
|
-
end
|