processout 2.31.0 → 3.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/card_shipping.rb +33 -0
- data/lib/processout/card_update_request.rb +0 -24
- data/lib/processout/invoice.rb +64 -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 +2 -1
- data/lib/processout/transaction.rb +30 -0
- data/lib/processout/version.rb +1 -1
- data/lib/processout.rb +0 -6
- metadata +3 -4
- data/lib/processout/invoices_process_native_payment_response.rb +0 -105
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dbb9789f54c15d86ef3b22a868b8ad6009203fe0dde1d05e8b8a1fdda02c2b1
|
4
|
+
data.tar.gz: 41afc68147e44d58033688ffc8a41ffbb0a73d7c83e361dcabf7444dbfa8fcb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bfde4b669939b09f83b2cbf3317ccca829c1ba422bb9226a60ad386cae6955063f5f8afaba4dec1b479e77b589560edf2e0e13290fd6c641675d5546d64493f
|
7
|
+
data.tar.gz: ea7064edc8e1b5eba813a9815ecf3077a0ae58897ca47b7c50683db86a03e067f8bc1b3a4ae397c54574af220b889b0f8a1c8685b038b0ae2a0d5253d33d73cb
|
@@ -15,6 +15,9 @@ module ProcessOut
|
|
15
15
|
attr_reader :country_code
|
16
16
|
attr_reader :zip
|
17
17
|
attr_reader :phone
|
18
|
+
attr_reader :first_name
|
19
|
+
attr_reader :last_name
|
20
|
+
attr_reader :email
|
18
21
|
|
19
22
|
|
20
23
|
def address1=(val)
|
@@ -57,6 +60,18 @@ module ProcessOut
|
|
57
60
|
|
58
61
|
end
|
59
62
|
|
63
|
+
def first_name=(val)
|
64
|
+
@first_name = val
|
65
|
+
end
|
66
|
+
|
67
|
+
def last_name=(val)
|
68
|
+
@last_name = val
|
69
|
+
end
|
70
|
+
|
71
|
+
def email=(val)
|
72
|
+
@email = val
|
73
|
+
end
|
74
|
+
|
60
75
|
|
61
76
|
# Initializes the CardShipping object
|
62
77
|
# Params:
|
@@ -72,6 +87,9 @@ module ProcessOut
|
|
72
87
|
self.country_code = data.fetch(:country_code, nil)
|
73
88
|
self.zip = data.fetch(:zip, nil)
|
74
89
|
self.phone = data.fetch(:phone, nil)
|
90
|
+
self.first_name = data.fetch(:first_name, nil)
|
91
|
+
self.last_name = data.fetch(:last_name, nil)
|
92
|
+
self.email = data.fetch(:email, nil)
|
75
93
|
|
76
94
|
end
|
77
95
|
|
@@ -90,6 +108,9 @@ module ProcessOut
|
|
90
108
|
"country_code": self.country_code,
|
91
109
|
"zip": self.zip,
|
92
110
|
"phone": self.phone,
|
111
|
+
"first_name": self.first_name,
|
112
|
+
"last_name": self.last_name,
|
113
|
+
"email": self.email,
|
93
114
|
}.to_json
|
94
115
|
end
|
95
116
|
|
@@ -121,6 +142,15 @@ module ProcessOut
|
|
121
142
|
if data.include? "phone"
|
122
143
|
self.phone = data["phone"]
|
123
144
|
end
|
145
|
+
if data.include? "first_name"
|
146
|
+
self.first_name = data["first_name"]
|
147
|
+
end
|
148
|
+
if data.include? "last_name"
|
149
|
+
self.last_name = data["last_name"]
|
150
|
+
end
|
151
|
+
if data.include? "email"
|
152
|
+
self.email = data["email"]
|
153
|
+
end
|
124
154
|
|
125
155
|
self
|
126
156
|
end
|
@@ -139,6 +169,9 @@ module ProcessOut
|
|
139
169
|
self.country_code = data.fetch(:country_code, self.country_code)
|
140
170
|
self.zip = data.fetch(:zip, self.zip)
|
141
171
|
self.phone = data.fetch(:phone, self.phone)
|
172
|
+
self.first_name = data.fetch(:first_name, self.first_name)
|
173
|
+
self.last_name = data.fetch(:last_name, self.last_name)
|
174
|
+
self.email = data.fetch(:email, self.email)
|
142
175
|
|
143
176
|
self
|
144
177
|
end
|
@@ -8,19 +8,9 @@ require "processout/networking/response"
|
|
8
8
|
module ProcessOut
|
9
9
|
class CardUpdateRequest
|
10
10
|
|
11
|
-
attr_reader :update_type
|
12
|
-
attr_reader :update_reason
|
13
11
|
attr_reader :preferred_scheme
|
14
12
|
|
15
13
|
|
16
|
-
def update_type=(val)
|
17
|
-
@update_type = val
|
18
|
-
end
|
19
|
-
|
20
|
-
def update_reason=(val)
|
21
|
-
@update_reason = val
|
22
|
-
end
|
23
|
-
|
24
14
|
def preferred_scheme=(val)
|
25
15
|
@preferred_scheme = val
|
26
16
|
end
|
@@ -33,8 +23,6 @@ module ProcessOut
|
|
33
23
|
def initialize(client, data = {})
|
34
24
|
@client = client
|
35
25
|
|
36
|
-
self.update_type = data.fetch(:update_type, nil)
|
37
|
-
self.update_reason = data.fetch(:update_reason, nil)
|
38
26
|
self.preferred_scheme = data.fetch(:preferred_scheme, nil)
|
39
27
|
|
40
28
|
end
|
@@ -47,8 +35,6 @@ module ProcessOut
|
|
47
35
|
# Overrides the JSON marshaller to only send the fields we want
|
48
36
|
def to_json(options)
|
49
37
|
{
|
50
|
-
"update_type": self.update_type,
|
51
|
-
"update_reason": self.update_reason,
|
52
38
|
"preferred_scheme": self.preferred_scheme,
|
53
39
|
}.to_json
|
54
40
|
end
|
@@ -60,12 +46,6 @@ module ProcessOut
|
|
60
46
|
if data.nil?
|
61
47
|
return self
|
62
48
|
end
|
63
|
-
if data.include? "update_type"
|
64
|
-
self.update_type = data["update_type"]
|
65
|
-
end
|
66
|
-
if data.include? "update_reason"
|
67
|
-
self.update_reason = data["update_reason"]
|
68
|
-
end
|
69
49
|
if data.include? "preferred_scheme"
|
70
50
|
self.preferred_scheme = data["preferred_scheme"]
|
71
51
|
end
|
@@ -80,8 +60,6 @@ module ProcessOut
|
|
80
60
|
if data.nil?
|
81
61
|
return self
|
82
62
|
end
|
83
|
-
self.update_type = data.fetch(:update_type, self.update_type)
|
84
|
-
self.update_reason = data.fetch(:update_reason, self.update_reason)
|
85
63
|
self.preferred_scheme = data.fetch(:preferred_scheme, self.preferred_scheme)
|
86
64
|
|
87
65
|
self
|
@@ -97,8 +75,6 @@ module ProcessOut
|
|
97
75
|
request = Request.new(@client)
|
98
76
|
path = "/cards/" + CGI.escape(card_id) + ""
|
99
77
|
data = {
|
100
|
-
"update_type" => @update_type,
|
101
|
-
"update_reason" => @update_reason,
|
102
78
|
"preferred_scheme" => @preferred_scheme
|
103
79
|
}
|
104
80
|
|
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)
|
@@ -810,9 +832,13 @@ module ProcessOut
|
|
810
832
|
body = body["transaction"]
|
811
833
|
transaction = Transaction.new(@client)
|
812
834
|
return_values.push(transaction.fill_with_data(body))
|
835
|
+
body = response.body
|
836
|
+
body = body["customer_action"]
|
837
|
+
customer_action = CustomerAction.new(@client)
|
838
|
+
return_values.push(customer_action.fill_with_data(body))
|
813
839
|
|
814
840
|
|
815
|
-
return_values
|
841
|
+
return_values
|
816
842
|
end
|
817
843
|
|
818
844
|
# Capture the invoice using the given source (customer or token)
|
@@ -846,9 +872,13 @@ module ProcessOut
|
|
846
872
|
body = body["transaction"]
|
847
873
|
transaction = Transaction.new(@client)
|
848
874
|
return_values.push(transaction.fill_with_data(body))
|
875
|
+
body = response.body
|
876
|
+
body = body["customer_action"]
|
877
|
+
customer_action = CustomerAction.new(@client)
|
878
|
+
return_values.push(customer_action.fill_with_data(body))
|
849
879
|
|
850
880
|
|
851
|
-
return_values
|
881
|
+
return_values
|
852
882
|
end
|
853
883
|
|
854
884
|
# Get the customer linked to the invoice.
|
@@ -972,11 +1002,16 @@ module ProcessOut
|
|
972
1002
|
return_values = Array.new
|
973
1003
|
|
974
1004
|
body = response.body
|
975
|
-
|
976
|
-
|
1005
|
+
body = body["transaction"]
|
1006
|
+
transaction = Transaction.new(@client)
|
1007
|
+
return_values.push(transaction.fill_with_data(body))
|
1008
|
+
body = response.body
|
1009
|
+
body = body["native_apm"]
|
1010
|
+
native_apm_response = NativeAPMResponse.new(@client)
|
1011
|
+
return_values.push(native_apm_response.fill_with_data(body))
|
977
1012
|
|
978
1013
|
|
979
|
-
return_values
|
1014
|
+
return_values
|
980
1015
|
end
|
981
1016
|
|
982
1017
|
# Initiate a 3-D Secure authentication
|
@@ -1125,7 +1160,8 @@ module ProcessOut
|
|
1125
1160
|
"billing" => @billing,
|
1126
1161
|
"unsupported_feature_bypass" => @unsupported_feature_bypass,
|
1127
1162
|
"verification" => @verification,
|
1128
|
-
"auto_capture_at" => @auto_capture_at
|
1163
|
+
"auto_capture_at" => @auto_capture_at,
|
1164
|
+
"expires_at" => @expires_at
|
1129
1165
|
}
|
1130
1166
|
|
1131
1167
|
response = Response.new(request.post(path, data, options))
|
@@ -1167,6 +1203,28 @@ module ProcessOut
|
|
1167
1203
|
|
1168
1204
|
|
1169
1205
|
|
1206
|
+
return_values[0]
|
1207
|
+
end
|
1208
|
+
|
1209
|
+
# Delete an invoice by its ID. Only invoices that have not been used yet can be deleted.
|
1210
|
+
# Params:
|
1211
|
+
# +invoice_id+:: ID of the invoice
|
1212
|
+
# +options+:: +Hash+ of options
|
1213
|
+
def delete(invoice_id, options = {})
|
1214
|
+
self.prefill(options)
|
1215
|
+
|
1216
|
+
request = Request.new(@client)
|
1217
|
+
path = "/invoices/" + CGI.escape(invoice_id) + ""
|
1218
|
+
data = {
|
1219
|
+
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
response = Response.new(request.delete(path, data, options))
|
1223
|
+
return_values = Array.new
|
1224
|
+
|
1225
|
+
return_values.push(response.success)
|
1226
|
+
|
1227
|
+
|
1170
1228
|
return_values[0]
|
1171
1229
|
end
|
1172
1230
|
|
@@ -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.0.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))
|
@@ -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
@@ -63,7 +63,6 @@ require "processout/category_error_codes"
|
|
63
63
|
require "processout/native_apm_transaction_details_gateway"
|
64
64
|
require "processout/native_apm_transaction_details_invoice"
|
65
65
|
require "processout/native_apm_transaction_details"
|
66
|
-
require "processout/invoices_process_native_payment_response"
|
67
66
|
|
68
67
|
module ProcessOut
|
69
68
|
class Client
|
@@ -391,11 +390,6 @@ module ProcessOut
|
|
391
390
|
obj = NativeAPMTransactionDetails.new(self, data)
|
392
391
|
end
|
393
392
|
|
394
|
-
# Create a new InvoicesProcessNativePaymentResponse instance
|
395
|
-
def invoices_process_native_payment_response(data = {})
|
396
|
-
obj = InvoicesProcessNativePaymentResponse.new(self, data)
|
397
|
-
end
|
398
|
-
|
399
393
|
|
400
394
|
end
|
401
395
|
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.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: 2024-
|
11
|
+
date: 2024-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -114,7 +114,6 @@ files:
|
|
114
114
|
- lib/processout/invoice_shipping.rb
|
115
115
|
- lib/processout/invoice_shipping_phone.rb
|
116
116
|
- lib/processout/invoice_tax.rb
|
117
|
-
- lib/processout/invoices_process_native_payment_response.rb
|
118
117
|
- lib/processout/native_apm_parameter_definition.rb
|
119
118
|
- lib/processout/native_apm_parameter_value.rb
|
120
119
|
- lib/processout/native_apm_parameter_value_definition.rb
|
@@ -167,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
166
|
- !ruby/object:Gem::Version
|
168
167
|
version: '0'
|
169
168
|
requirements: []
|
170
|
-
rubygems_version: 3.
|
169
|
+
rubygems_version: 3.0.3.1
|
171
170
|
signing_key:
|
172
171
|
specification_version: 4
|
173
172
|
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
|