processout 2.29.0 → 2.30.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_create_request.rb +18 -3
- data/lib/processout/card_update_request.rb +4 -3
- 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 +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9daae4f6b38dea2683271dd9a4bbb57d54ce2cb08e457c8a62f19536e3ab3d37
|
4
|
+
data.tar.gz: 9b47f6293d6c347b5a5cc6a6cf9372ee4d9a97e2dc35f63c5666764f6635f327
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43e1abcc1b8ab960f28889a95a157c97d66b400b72d44cecddf1724fea1658a2e79aab2cb067dcc9890fe5e7257b17b8577815a0bca64ad2f43754cc30c8c644
|
7
|
+
data.tar.gz: 6c36a1140484dfe0c759afb150cf76a63dcc35a342f1d39d18ac0137f6f87377514277bae7f32aec3f6fe3d3cadeb06729ee73dffeffeb06be6771e5f1ad3642
|
@@ -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
|
|
@@ -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.30.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.30.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-03
|
11
|
+
date: 2024-04-03 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
|