processout 2.29.0 → 2.31.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/processout/card_create_request.rb +18 -3
- data/lib/processout/card_update_request.rb +4 -3
- data/lib/processout/invoice.rb +13 -1
- data/lib/processout/networking/request.rb +1 -1
- data/lib/processout/project_sftp_settings_public.rb +120 -0
- data/lib/processout/version.rb +1 -1
- data/lib/processout.rb +6 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13734f421a8c68478c51080f9b3f0a4c0224262fee2119b3b64dbd9624405ef7
|
4
|
+
data.tar.gz: a26a61b84735b1d9ede5a39770f92ae32575c8e333118aefc1ca4ade6d947345
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 297f5fbed27228dddcc8e4cccc61ca64779e0c0a0e2ef386a49aff2d489550e542405340560ffec8129c9b538b8c8dedfdc3638aaab37a5c76a6e6f5e96c26a9
|
7
|
+
data.tar.gz: 89ef663f6d2964c3026052ae82b986d6a02fa374e64a6a3ba020c635c575c759ee7640d7661ec1fb13ed194cc5c1f2709e51d3bd552d24395f8439483079717e
|
@@ -286,7 +286,23 @@ module ProcessOut
|
|
286
286
|
request = Request.new(@client)
|
287
287
|
path = "/cards"
|
288
288
|
data = {
|
289
|
-
|
289
|
+
"device" => @device,
|
290
|
+
"name" => @name,
|
291
|
+
"number" => @number,
|
292
|
+
"exp_day" => @exp_day,
|
293
|
+
"exp_month" => @exp_month,
|
294
|
+
"exp_year" => @exp_year,
|
295
|
+
"cvc2" => @cvc2,
|
296
|
+
"preferred_scheme" => @preferred_scheme,
|
297
|
+
"metadata" => @metadata,
|
298
|
+
"token_type" => @token_type,
|
299
|
+
"eci" => @eci,
|
300
|
+
"cryptogram" => @cryptogram,
|
301
|
+
"applepay_response" => @applepay_response,
|
302
|
+
"applepay_mid" => @applepay_mid,
|
303
|
+
"payment_token" => @payment_token,
|
304
|
+
"contact" => @contact,
|
305
|
+
"shipping" => @shipping
|
290
306
|
}
|
291
307
|
|
292
308
|
response = Response.new(request.post(path, data, options))
|
@@ -296,8 +312,7 @@ module ProcessOut
|
|
296
312
|
body = body["card"]
|
297
313
|
|
298
314
|
|
299
|
-
|
300
|
-
return_values.push(obj.fill_with_data(body))
|
315
|
+
return_values.push(self.fill_with_data(body))
|
301
316
|
|
302
317
|
|
303
318
|
|
@@ -97,7 +97,9 @@ module ProcessOut
|
|
97
97
|
request = Request.new(@client)
|
98
98
|
path = "/cards/" + CGI.escape(card_id) + ""
|
99
99
|
data = {
|
100
|
-
|
100
|
+
"update_type" => @update_type,
|
101
|
+
"update_reason" => @update_reason,
|
102
|
+
"preferred_scheme" => @preferred_scheme
|
101
103
|
}
|
102
104
|
|
103
105
|
response = Response.new(request.put(path, data, options))
|
@@ -107,8 +109,7 @@ module ProcessOut
|
|
107
109
|
body = body["card"]
|
108
110
|
|
109
111
|
|
110
|
-
|
111
|
-
return_values.push(obj.fill_with_data(body))
|
112
|
+
return_values.push(self.fill_with_data(body))
|
112
113
|
|
113
114
|
|
114
115
|
|
data/lib/processout/invoice.rb
CHANGED
@@ -55,6 +55,7 @@ module ProcessOut
|
|
55
55
|
attr_reader :billing
|
56
56
|
attr_reader :unsupported_feature_bypass
|
57
57
|
attr_reader :verification
|
58
|
+
attr_reader :auto_capture_at
|
58
59
|
|
59
60
|
|
60
61
|
def id=(val)
|
@@ -417,6 +418,10 @@ module ProcessOut
|
|
417
418
|
@verification = val
|
418
419
|
end
|
419
420
|
|
421
|
+
def auto_capture_at=(val)
|
422
|
+
@auto_capture_at = val
|
423
|
+
end
|
424
|
+
|
420
425
|
|
421
426
|
# Initializes the Invoice object
|
422
427
|
# Params:
|
@@ -472,6 +477,7 @@ module ProcessOut
|
|
472
477
|
self.billing = data.fetch(:billing, nil)
|
473
478
|
self.unsupported_feature_bypass = data.fetch(:unsupported_feature_bypass, nil)
|
474
479
|
self.verification = data.fetch(:verification, nil)
|
480
|
+
self.auto_capture_at = data.fetch(:auto_capture_at, nil)
|
475
481
|
|
476
482
|
end
|
477
483
|
|
@@ -530,6 +536,7 @@ module ProcessOut
|
|
530
536
|
"billing": self.billing,
|
531
537
|
"unsupported_feature_bypass": self.unsupported_feature_bypass,
|
532
538
|
"verification": self.verification,
|
539
|
+
"auto_capture_at": self.auto_capture_at,
|
533
540
|
}.to_json
|
534
541
|
end
|
535
542
|
|
@@ -681,6 +688,9 @@ module ProcessOut
|
|
681
688
|
if data.include? "verification"
|
682
689
|
self.verification = data["verification"]
|
683
690
|
end
|
691
|
+
if data.include? "auto_capture_at"
|
692
|
+
self.auto_capture_at = data["auto_capture_at"]
|
693
|
+
end
|
684
694
|
|
685
695
|
self
|
686
696
|
end
|
@@ -739,6 +749,7 @@ module ProcessOut
|
|
739
749
|
self.billing = data.fetch(:billing, self.billing)
|
740
750
|
self.unsupported_feature_bypass = data.fetch(:unsupported_feature_bypass, self.unsupported_feature_bypass)
|
741
751
|
self.verification = data.fetch(:verification, self.verification)
|
752
|
+
self.auto_capture_at = data.fetch(:auto_capture_at, self.auto_capture_at)
|
742
753
|
|
743
754
|
self
|
744
755
|
end
|
@@ -1113,7 +1124,8 @@ module ProcessOut
|
|
1113
1124
|
"payment_type" => @payment_type,
|
1114
1125
|
"billing" => @billing,
|
1115
1126
|
"unsupported_feature_bypass" => @unsupported_feature_bypass,
|
1116
|
-
"verification" => @verification
|
1127
|
+
"verification" => @verification,
|
1128
|
+
"auto_capture_at" => @auto_capture_at
|
1117
1129
|
}
|
1118
1130
|
|
1119
1131
|
response = Response.new(request.post(path, data, options))
|
@@ -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.31.0"
|
17
17
|
|
18
18
|
unless options.nil?
|
19
19
|
req["Idempotency-Key"] = options.fetch(:idempotency_key, "")
|
@@ -0,0 +1,120 @@
|
|
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 ProjectSFTPSettingsPublic
|
10
|
+
|
11
|
+
attr_reader :enabled
|
12
|
+
attr_reader :endpoint
|
13
|
+
attr_reader :username
|
14
|
+
|
15
|
+
|
16
|
+
def enabled=(val)
|
17
|
+
@enabled = val
|
18
|
+
end
|
19
|
+
|
20
|
+
def endpoint=(val)
|
21
|
+
@endpoint = val
|
22
|
+
end
|
23
|
+
|
24
|
+
def username=(val)
|
25
|
+
@username = val
|
26
|
+
end
|
27
|
+
|
28
|
+
|
29
|
+
# Initializes the ProjectSFTPSettingsPublic object
|
30
|
+
# Params:
|
31
|
+
# +client+:: +ProcessOut+ client instance
|
32
|
+
# +data+:: data that can be used to fill the object
|
33
|
+
def initialize(client, data = {})
|
34
|
+
@client = client
|
35
|
+
|
36
|
+
self.enabled = data.fetch(:enabled, nil)
|
37
|
+
self.endpoint = data.fetch(:endpoint, nil)
|
38
|
+
self.username = data.fetch(:username, nil)
|
39
|
+
|
40
|
+
end
|
41
|
+
|
42
|
+
# Create a new ProjectSFTPSettingsPublic using the current client
|
43
|
+
def new(data = {})
|
44
|
+
ProjectSFTPSettingsPublic.new(@client, data)
|
45
|
+
end
|
46
|
+
|
47
|
+
# Overrides the JSON marshaller to only send the fields we want
|
48
|
+
def to_json(options)
|
49
|
+
{
|
50
|
+
"enabled": self.enabled,
|
51
|
+
"endpoint": self.endpoint,
|
52
|
+
"username": self.username,
|
53
|
+
}.to_json
|
54
|
+
end
|
55
|
+
|
56
|
+
# Fills the object with data coming from the API
|
57
|
+
# Params:
|
58
|
+
# +data+:: +Hash+ of data coming from the API
|
59
|
+
def fill_with_data(data)
|
60
|
+
if data.nil?
|
61
|
+
return self
|
62
|
+
end
|
63
|
+
if data.include? "enabled"
|
64
|
+
self.enabled = data["enabled"]
|
65
|
+
end
|
66
|
+
if data.include? "endpoint"
|
67
|
+
self.endpoint = data["endpoint"]
|
68
|
+
end
|
69
|
+
if data.include? "username"
|
70
|
+
self.username = data["username"]
|
71
|
+
end
|
72
|
+
|
73
|
+
self
|
74
|
+
end
|
75
|
+
|
76
|
+
# Prefills the object with the data passed as parameters
|
77
|
+
# Params:
|
78
|
+
# +data+:: +Hash+ of data
|
79
|
+
def prefill(data)
|
80
|
+
if data.nil?
|
81
|
+
return self
|
82
|
+
end
|
83
|
+
self.enabled = data.fetch(:enabled, self.enabled)
|
84
|
+
self.endpoint = data.fetch(:endpoint, self.endpoint)
|
85
|
+
self.username = data.fetch(:username, self.username)
|
86
|
+
|
87
|
+
self
|
88
|
+
end
|
89
|
+
|
90
|
+
# Fetch the SFTP settings for the project.
|
91
|
+
# Params:
|
92
|
+
# +id+:: ID of the project
|
93
|
+
# +options+:: +Hash+ of options
|
94
|
+
def fetch_sftp_settings(id, options = {})
|
95
|
+
self.prefill(options)
|
96
|
+
|
97
|
+
request = Request.new(@client)
|
98
|
+
path = "/projects/" + CGI.escape(id) + "/sftp-settings"
|
99
|
+
data = {
|
100
|
+
|
101
|
+
}
|
102
|
+
|
103
|
+
response = Response.new(request.get(path, data, options))
|
104
|
+
return_values = Array.new
|
105
|
+
|
106
|
+
body = response.body
|
107
|
+
body = body["sftp_settings"]
|
108
|
+
|
109
|
+
|
110
|
+
obj = ProjectSFTPSettingsPublic.new(@client)
|
111
|
+
return_values.push(obj.fill_with_data(body))
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
return_values[0]
|
116
|
+
end
|
117
|
+
|
118
|
+
|
119
|
+
end
|
120
|
+
end
|
data/lib/processout/version.rb
CHANGED
data/lib/processout.rb
CHANGED
@@ -39,6 +39,7 @@ require "processout/plan"
|
|
39
39
|
require "processout/product"
|
40
40
|
require "processout/project"
|
41
41
|
require "processout/project_sftp_settings"
|
42
|
+
require "processout/project_sftp_settings_public"
|
42
43
|
require "processout/refund"
|
43
44
|
require "processout/subscription"
|
44
45
|
require "processout/transaction"
|
@@ -270,6 +271,11 @@ module ProcessOut
|
|
270
271
|
obj = ProjectSFTPSettings.new(self, data)
|
271
272
|
end
|
272
273
|
|
274
|
+
# Create a new ProjectSFTPSettingsPublic instance
|
275
|
+
def project_sftp_settings_public(data = {})
|
276
|
+
obj = ProjectSFTPSettingsPublic.new(self, data)
|
277
|
+
end
|
278
|
+
|
273
279
|
# Create a new Refund instance
|
274
280
|
def refund(data = {})
|
275
281
|
obj = Refund.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.31.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-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- lib/processout/product.rb
|
137
137
|
- lib/processout/project.rb
|
138
138
|
- lib/processout/project_sftp_settings.rb
|
139
|
+
- lib/processout/project_sftp_settings_public.rb
|
139
140
|
- lib/processout/refund.rb
|
140
141
|
- lib/processout/subscription.rb
|
141
142
|
- lib/processout/three_ds.rb
|
@@ -166,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
167
|
- !ruby/object:Gem::Version
|
167
168
|
version: '0'
|
168
169
|
requirements: []
|
169
|
-
rubygems_version: 3.
|
170
|
+
rubygems_version: 3.4.20
|
170
171
|
signing_key:
|
171
172
|
specification_version: 4
|
172
173
|
summary: Ruby bindings for the ProcessOut API
|