processout 2.16.0 → 2.19.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/alternative_merchant_certificate.rb +94 -0
- data/lib/processout/apple_pay_alternative_merchant_certificates.rb +110 -0
- data/lib/processout/invoice_detail.rb +11 -0
- data/lib/processout/networking/request.rb +1 -1
- data/lib/processout/refund.rb +13 -1
- data/lib/processout/token.rb +22 -0
- data/lib/processout/transaction.rb +11 -0
- data/lib/processout/version.rb +1 -1
- data/lib/processout.rb +12 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f065ffc8b4c4906b9e43a303634ff8b7616bca300ea665d96467505d88c3bc9f
|
4
|
+
data.tar.gz: a44221558588b9c1708c1af5762b8bca9635302bd4c07b479dab254552d0f9bc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4c560759d1c4a0fa15f026a13023844f3e8b0d60e2dfc4e2fc8f06fc8f671463d9825d03b22b64ab941ffa15a3c593e30207d92d612455c45fef1364f3acc24
|
7
|
+
data.tar.gz: 0751fb06011fa6d53dbe37f34263bd28a5f29906a6cb7ce1a265ef130b8af7bc45fca555d05680f51a0a175e110c651b1e0cca11374ce31b46702c9d00e7a824
|
@@ -0,0 +1,94 @@
|
|
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 AlternativeMerchantCertificate
|
10
|
+
|
11
|
+
attr_reader :id
|
12
|
+
|
13
|
+
|
14
|
+
def id=(val)
|
15
|
+
@id = val
|
16
|
+
end
|
17
|
+
|
18
|
+
|
19
|
+
# Initializes the AlternativeMerchantCertificate object
|
20
|
+
# Params:
|
21
|
+
# +client+:: +ProcessOut+ client instance
|
22
|
+
# +data+:: data that can be used to fill the object
|
23
|
+
def initialize(client, data = {})
|
24
|
+
@client = client
|
25
|
+
|
26
|
+
self.id = data.fetch(:id, nil)
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
# Create a new AlternativeMerchantCertificate using the current client
|
31
|
+
def new(data = {})
|
32
|
+
AlternativeMerchantCertificate.new(@client, data)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Overrides the JSON marshaller to only send the fields we want
|
36
|
+
def to_json(options)
|
37
|
+
{
|
38
|
+
"id": self.id,
|
39
|
+
}.to_json
|
40
|
+
end
|
41
|
+
|
42
|
+
# Fills the object with data coming from the API
|
43
|
+
# Params:
|
44
|
+
# +data+:: +Hash+ of data coming from the API
|
45
|
+
def fill_with_data(data)
|
46
|
+
if data.nil?
|
47
|
+
return self
|
48
|
+
end
|
49
|
+
if data.include? "id"
|
50
|
+
self.id = data["id"]
|
51
|
+
end
|
52
|
+
|
53
|
+
self
|
54
|
+
end
|
55
|
+
|
56
|
+
# Prefills the object with the data passed as parameters
|
57
|
+
# Params:
|
58
|
+
# +data+:: +Hash+ of data
|
59
|
+
def prefill(data)
|
60
|
+
if data.nil?
|
61
|
+
return self
|
62
|
+
end
|
63
|
+
self.id = data.fetch(:id, self.id)
|
64
|
+
|
65
|
+
self
|
66
|
+
end
|
67
|
+
|
68
|
+
# Save new alternative apple pay certificates
|
69
|
+
# Params:
|
70
|
+
# +options+:: +Hash+ of options
|
71
|
+
def save(options = {})
|
72
|
+
self.prefill(options)
|
73
|
+
|
74
|
+
request = Request.new(@client)
|
75
|
+
path = "/projects/applepay/alternative-merchant-certificates"
|
76
|
+
data = {
|
77
|
+
|
78
|
+
}
|
79
|
+
|
80
|
+
response = Response.new(request.post(path, data, options))
|
81
|
+
return_values = Array.new
|
82
|
+
|
83
|
+
body = response.body
|
84
|
+
body = body["alternative_merchant_certificate"]
|
85
|
+
alternative_merchant_certificate = AlternativeMerchantCertificate.new(@client)
|
86
|
+
return_values.push(alternative_merchant_certificate.fill_with_data(body))
|
87
|
+
|
88
|
+
|
89
|
+
return_values[0]
|
90
|
+
end
|
91
|
+
|
92
|
+
|
93
|
+
end
|
94
|
+
end
|
@@ -0,0 +1,110 @@
|
|
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 ApplePayAlternativeMerchantCertificates
|
10
|
+
|
11
|
+
attr_reader :alternative_merchant_certificates
|
12
|
+
|
13
|
+
|
14
|
+
def alternative_merchant_certificates=(val)
|
15
|
+
if val.nil?
|
16
|
+
@alternative_merchant_certificates = []
|
17
|
+
return
|
18
|
+
end
|
19
|
+
|
20
|
+
if val.length > 0 and val[0].instance_of? AlternativeMerchantCertificate
|
21
|
+
@alternative_merchant_certificates = val
|
22
|
+
else
|
23
|
+
l = Array.new
|
24
|
+
for v in val
|
25
|
+
obj = AlternativeMerchantCertificate.new(@client)
|
26
|
+
obj.fill_with_data(v)
|
27
|
+
l.push(obj)
|
28
|
+
end
|
29
|
+
@alternative_merchant_certificates = l
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
|
35
|
+
# Initializes the ApplePayAlternativeMerchantCertificates object
|
36
|
+
# Params:
|
37
|
+
# +client+:: +ProcessOut+ client instance
|
38
|
+
# +data+:: data that can be used to fill the object
|
39
|
+
def initialize(client, data = {})
|
40
|
+
@client = client
|
41
|
+
|
42
|
+
self.alternative_merchant_certificates = data.fetch(:alternative_merchant_certificates, nil)
|
43
|
+
|
44
|
+
end
|
45
|
+
|
46
|
+
# Create a new ApplePayAlternativeMerchantCertificates using the current client
|
47
|
+
def new(data = {})
|
48
|
+
ApplePayAlternativeMerchantCertificates.new(@client, data)
|
49
|
+
end
|
50
|
+
|
51
|
+
# Overrides the JSON marshaller to only send the fields we want
|
52
|
+
def to_json(options)
|
53
|
+
{
|
54
|
+
"alternative_merchant_certificates": self.alternative_merchant_certificates,
|
55
|
+
}.to_json
|
56
|
+
end
|
57
|
+
|
58
|
+
# Fills the object with data coming from the API
|
59
|
+
# Params:
|
60
|
+
# +data+:: +Hash+ of data coming from the API
|
61
|
+
def fill_with_data(data)
|
62
|
+
if data.nil?
|
63
|
+
return self
|
64
|
+
end
|
65
|
+
if data.include? "alternative_merchant_certificates"
|
66
|
+
self.alternative_merchant_certificates = data["alternative_merchant_certificates"]
|
67
|
+
end
|
68
|
+
|
69
|
+
self
|
70
|
+
end
|
71
|
+
|
72
|
+
# Prefills the object with the data passed as parameters
|
73
|
+
# Params:
|
74
|
+
# +data+:: +Hash+ of data
|
75
|
+
def prefill(data)
|
76
|
+
if data.nil?
|
77
|
+
return self
|
78
|
+
end
|
79
|
+
self.alternative_merchant_certificates = data.fetch(:alternative_merchant_certificates, self.alternative_merchant_certificates)
|
80
|
+
|
81
|
+
self
|
82
|
+
end
|
83
|
+
|
84
|
+
# Fetch the project's alternative certificates by ID
|
85
|
+
# Params:
|
86
|
+
# +options+:: +Hash+ of options
|
87
|
+
def fetch(options = {})
|
88
|
+
self.prefill(options)
|
89
|
+
|
90
|
+
request = Request.new(@client)
|
91
|
+
path = "/projects/applepay/alternative-merchant-certificates"
|
92
|
+
data = {
|
93
|
+
|
94
|
+
}
|
95
|
+
|
96
|
+
response = Response.new(request.get(path, data, options))
|
97
|
+
return_values = Array.new
|
98
|
+
|
99
|
+
body = response.body
|
100
|
+
body = body["applepay_certificates"]
|
101
|
+
apple_pay_alternative_merchant_certificates = ApplePayAlternativeMerchantCertificates.new(@client)
|
102
|
+
return_values.push(apple_pay_alternative_merchant_certificates.fill_with_data(body))
|
103
|
+
|
104
|
+
|
105
|
+
return_values[0]
|
106
|
+
end
|
107
|
+
|
108
|
+
|
109
|
+
end
|
110
|
+
end
|
@@ -8,6 +8,7 @@ require "processout/networking/response"
|
|
8
8
|
module ProcessOut
|
9
9
|
class InvoiceDetail
|
10
10
|
|
11
|
+
attr_reader :id
|
11
12
|
attr_reader :name
|
12
13
|
attr_reader :type
|
13
14
|
attr_reader :amount
|
@@ -25,6 +26,10 @@ module ProcessOut
|
|
25
26
|
attr_reader :category
|
26
27
|
|
27
28
|
|
29
|
+
def id=(val)
|
30
|
+
@id = val
|
31
|
+
end
|
32
|
+
|
28
33
|
def name=(val)
|
29
34
|
@name = val
|
30
35
|
end
|
@@ -93,6 +98,7 @@ module ProcessOut
|
|
93
98
|
def initialize(client, data = {})
|
94
99
|
@client = client
|
95
100
|
|
101
|
+
self.id = data.fetch(:id, nil)
|
96
102
|
self.name = data.fetch(:name, nil)
|
97
103
|
self.type = data.fetch(:type, nil)
|
98
104
|
self.amount = data.fetch(:amount, nil)
|
@@ -119,6 +125,7 @@ module ProcessOut
|
|
119
125
|
# Overrides the JSON marshaller to only send the fields we want
|
120
126
|
def to_json(options)
|
121
127
|
{
|
128
|
+
"id": self.id,
|
122
129
|
"name": self.name,
|
123
130
|
"type": self.type,
|
124
131
|
"amount": self.amount,
|
@@ -144,6 +151,9 @@ module ProcessOut
|
|
144
151
|
if data.nil?
|
145
152
|
return self
|
146
153
|
end
|
154
|
+
if data.include? "id"
|
155
|
+
self.id = data["id"]
|
156
|
+
end
|
147
157
|
if data.include? "name"
|
148
158
|
self.name = data["name"]
|
149
159
|
end
|
@@ -200,6 +210,7 @@ module ProcessOut
|
|
200
210
|
if data.nil?
|
201
211
|
return self
|
202
212
|
end
|
213
|
+
self.id = data.fetch(:id, self.id)
|
203
214
|
self.name = data.fetch(:name, self.name)
|
204
215
|
self.type = data.fetch(:type, self.type)
|
205
216
|
self.amount = data.fetch(:amount, self.amount)
|
@@ -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/2.
|
16
|
+
req["User-Agent"] = "ProcessOut Ruby-Bindings/2.19.0"
|
17
17
|
|
18
18
|
unless options.nil?
|
19
19
|
req["Idempotency-Key"] = options.fetch(:idempotency_key, "")
|
data/lib/processout/refund.rb
CHANGED
@@ -18,6 +18,7 @@ module ProcessOut
|
|
18
18
|
attr_reader :metadata
|
19
19
|
attr_reader :sandbox
|
20
20
|
attr_reader :created_at
|
21
|
+
attr_reader :invoice_detail_ids
|
21
22
|
|
22
23
|
|
23
24
|
def id=(val)
|
@@ -72,6 +73,10 @@ module ProcessOut
|
|
72
73
|
@created_at = val
|
73
74
|
end
|
74
75
|
|
76
|
+
def invoice_detail_ids=(val)
|
77
|
+
@invoice_detail_ids = val
|
78
|
+
end
|
79
|
+
|
75
80
|
|
76
81
|
# Initializes the Refund object
|
77
82
|
# Params:
|
@@ -90,6 +95,7 @@ module ProcessOut
|
|
90
95
|
self.metadata = data.fetch(:metadata, nil)
|
91
96
|
self.sandbox = data.fetch(:sandbox, nil)
|
92
97
|
self.created_at = data.fetch(:created_at, nil)
|
98
|
+
self.invoice_detail_ids = data.fetch(:invoice_detail_ids, nil)
|
93
99
|
|
94
100
|
end
|
95
101
|
|
@@ -111,6 +117,7 @@ module ProcessOut
|
|
111
117
|
"metadata": self.metadata,
|
112
118
|
"sandbox": self.sandbox,
|
113
119
|
"created_at": self.created_at,
|
120
|
+
"invoice_detail_ids": self.invoice_detail_ids,
|
114
121
|
}.to_json
|
115
122
|
end
|
116
123
|
|
@@ -151,6 +158,9 @@ module ProcessOut
|
|
151
158
|
if data.include? "created_at"
|
152
159
|
self.created_at = data["created_at"]
|
153
160
|
end
|
161
|
+
if data.include? "invoice_detail_ids"
|
162
|
+
self.invoice_detail_ids = data["invoice_detail_ids"]
|
163
|
+
end
|
154
164
|
|
155
165
|
self
|
156
166
|
end
|
@@ -172,6 +182,7 @@ module ProcessOut
|
|
172
182
|
self.metadata = data.fetch(:metadata, self.metadata)
|
173
183
|
self.sandbox = data.fetch(:sandbox, self.sandbox)
|
174
184
|
self.created_at = data.fetch(:created_at, self.created_at)
|
185
|
+
self.invoice_detail_ids = data.fetch(:invoice_detail_ids, self.invoice_detail_ids)
|
175
186
|
|
176
187
|
self
|
177
188
|
end
|
@@ -248,7 +259,8 @@ module ProcessOut
|
|
248
259
|
"amount" => @amount,
|
249
260
|
"metadata" => @metadata,
|
250
261
|
"reason" => @reason,
|
251
|
-
"information" => @information
|
262
|
+
"information" => @information,
|
263
|
+
"invoice_detail_ids" => @invoice_detail_ids
|
252
264
|
}
|
253
265
|
|
254
266
|
response = Response.new(request.post(path, data, options))
|
data/lib/processout/token.rb
CHANGED
@@ -28,6 +28,8 @@ module ProcessOut
|
|
28
28
|
attr_reader :invoice
|
29
29
|
attr_reader :invoice_id
|
30
30
|
attr_reader :manual_invoice_cancellation
|
31
|
+
attr_reader :verification_status
|
32
|
+
attr_reader :can_get_balance
|
31
33
|
|
32
34
|
|
33
35
|
def id=(val)
|
@@ -158,6 +160,14 @@ module ProcessOut
|
|
158
160
|
@manual_invoice_cancellation = val
|
159
161
|
end
|
160
162
|
|
163
|
+
def verification_status=(val)
|
164
|
+
@verification_status = val
|
165
|
+
end
|
166
|
+
|
167
|
+
def can_get_balance=(val)
|
168
|
+
@can_get_balance = val
|
169
|
+
end
|
170
|
+
|
161
171
|
|
162
172
|
# Initializes the Token object
|
163
173
|
# Params:
|
@@ -186,6 +196,8 @@ module ProcessOut
|
|
186
196
|
self.invoice = data.fetch(:invoice, nil)
|
187
197
|
self.invoice_id = data.fetch(:invoice_id, nil)
|
188
198
|
self.manual_invoice_cancellation = data.fetch(:manual_invoice_cancellation, nil)
|
199
|
+
self.verification_status = data.fetch(:verification_status, nil)
|
200
|
+
self.can_get_balance = data.fetch(:can_get_balance, nil)
|
189
201
|
|
190
202
|
end
|
191
203
|
|
@@ -217,6 +229,8 @@ module ProcessOut
|
|
217
229
|
"invoice": self.invoice,
|
218
230
|
"invoice_id": self.invoice_id,
|
219
231
|
"manual_invoice_cancellation": self.manual_invoice_cancellation,
|
232
|
+
"verification_status": self.verification_status,
|
233
|
+
"can_get_balance": self.can_get_balance,
|
220
234
|
}.to_json
|
221
235
|
end
|
222
236
|
|
@@ -287,6 +301,12 @@ module ProcessOut
|
|
287
301
|
if data.include? "manual_invoice_cancellation"
|
288
302
|
self.manual_invoice_cancellation = data["manual_invoice_cancellation"]
|
289
303
|
end
|
304
|
+
if data.include? "verification_status"
|
305
|
+
self.verification_status = data["verification_status"]
|
306
|
+
end
|
307
|
+
if data.include? "can_get_balance"
|
308
|
+
self.can_get_balance = data["can_get_balance"]
|
309
|
+
end
|
290
310
|
|
291
311
|
self
|
292
312
|
end
|
@@ -318,6 +338,8 @@ module ProcessOut
|
|
318
338
|
self.invoice = data.fetch(:invoice, self.invoice)
|
319
339
|
self.invoice_id = data.fetch(:invoice_id, self.invoice_id)
|
320
340
|
self.manual_invoice_cancellation = data.fetch(:manual_invoice_cancellation, self.manual_invoice_cancellation)
|
341
|
+
self.verification_status = data.fetch(:verification_status, self.verification_status)
|
342
|
+
self.can_get_balance = data.fetch(:can_get_balance, self.can_get_balance)
|
321
343
|
|
322
344
|
self
|
323
345
|
end
|
@@ -39,6 +39,7 @@ module ProcessOut
|
|
39
39
|
attr_reader :currency
|
40
40
|
attr_reader :error_code
|
41
41
|
attr_reader :error_message
|
42
|
+
attr_reader :acquirer_name
|
42
43
|
attr_reader :gateway_name
|
43
44
|
attr_reader :three_d_s_status
|
44
45
|
attr_reader :status
|
@@ -304,6 +305,10 @@ module ProcessOut
|
|
304
305
|
@error_message = val
|
305
306
|
end
|
306
307
|
|
308
|
+
def acquirer_name=(val)
|
309
|
+
@acquirer_name = val
|
310
|
+
end
|
311
|
+
|
307
312
|
def gateway_name=(val)
|
308
313
|
@gateway_name = val
|
309
314
|
end
|
@@ -447,6 +452,7 @@ module ProcessOut
|
|
447
452
|
self.currency = data.fetch(:currency, nil)
|
448
453
|
self.error_code = data.fetch(:error_code, nil)
|
449
454
|
self.error_message = data.fetch(:error_message, nil)
|
455
|
+
self.acquirer_name = data.fetch(:acquirer_name, nil)
|
450
456
|
self.gateway_name = data.fetch(:gateway_name, nil)
|
451
457
|
self.three_d_s_status = data.fetch(:three_d_s_status, nil)
|
452
458
|
self.status = data.fetch(:status, nil)
|
@@ -512,6 +518,7 @@ module ProcessOut
|
|
512
518
|
"currency": self.currency,
|
513
519
|
"error_code": self.error_code,
|
514
520
|
"error_message": self.error_message,
|
521
|
+
"acquirer_name": self.acquirer_name,
|
515
522
|
"gateway_name": self.gateway_name,
|
516
523
|
"three_d_s_status": self.three_d_s_status,
|
517
524
|
"status": self.status,
|
@@ -638,6 +645,9 @@ module ProcessOut
|
|
638
645
|
if data.include? "error_message"
|
639
646
|
self.error_message = data["error_message"]
|
640
647
|
end
|
648
|
+
if data.include? "acquirer_name"
|
649
|
+
self.acquirer_name = data["acquirer_name"]
|
650
|
+
end
|
641
651
|
if data.include? "gateway_name"
|
642
652
|
self.gateway_name = data["gateway_name"]
|
643
653
|
end
|
@@ -749,6 +759,7 @@ module ProcessOut
|
|
749
759
|
self.currency = data.fetch(:currency, self.currency)
|
750
760
|
self.error_code = data.fetch(:error_code, self.error_code)
|
751
761
|
self.error_message = data.fetch(:error_message, self.error_message)
|
762
|
+
self.acquirer_name = data.fetch(:acquirer_name, self.acquirer_name)
|
752
763
|
self.gateway_name = data.fetch(:gateway_name, self.gateway_name)
|
753
764
|
self.three_d_s_status = data.fetch(:three_d_s_status, self.three_d_s_status)
|
754
765
|
self.status = data.fetch(:status, self.status)
|
data/lib/processout/version.rb
CHANGED
data/lib/processout.rb
CHANGED
@@ -4,6 +4,8 @@ require "processout/activity"
|
|
4
4
|
require "processout/addon"
|
5
5
|
require "processout/api_request"
|
6
6
|
require "processout/api_version"
|
7
|
+
require "processout/apple_pay_alternative_merchant_certificates"
|
8
|
+
require "processout/alternative_merchant_certificate"
|
7
9
|
require "processout/balances"
|
8
10
|
require "processout/balance"
|
9
11
|
require "processout/card"
|
@@ -71,6 +73,16 @@ module ProcessOut
|
|
71
73
|
obj = APIVersion.new(self, data)
|
72
74
|
end
|
73
75
|
|
76
|
+
# Create a new ApplePayAlternativeMerchantCertificates instance
|
77
|
+
def apple_pay_alternative_merchant_certificates(data = {})
|
78
|
+
obj = ApplePayAlternativeMerchantCertificates.new(self, data)
|
79
|
+
end
|
80
|
+
|
81
|
+
# Create a new AlternativeMerchantCertificate instance
|
82
|
+
def alternative_merchant_certificate(data = {})
|
83
|
+
obj = AlternativeMerchantCertificate.new(self, data)
|
84
|
+
end
|
85
|
+
|
74
86
|
# Create a new Balances instance
|
75
87
|
def balances(data = {})
|
76
88
|
obj = Balances.new(self, data)
|
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: 2.
|
4
|
+
version: 2.19.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: 2022-
|
11
|
+
date: 2022-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -73,8 +73,10 @@ files:
|
|
73
73
|
- lib/processout.rb
|
74
74
|
- lib/processout/activity.rb
|
75
75
|
- lib/processout/addon.rb
|
76
|
+
- lib/processout/alternative_merchant_certificate.rb
|
76
77
|
- lib/processout/api_request.rb
|
77
78
|
- lib/processout/api_version.rb
|
79
|
+
- lib/processout/apple_pay_alternative_merchant_certificates.rb
|
78
80
|
- lib/processout/balance.rb
|
79
81
|
- lib/processout/balances.rb
|
80
82
|
- lib/processout/card.rb
|