processout 2.28.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_contact.rb +125 -0
- data/lib/processout/card_create_request.rb +324 -0
- data/lib/processout/card_shipping.rb +148 -0
- data/lib/processout/card_update_request.rb +121 -0
- data/lib/processout/device.rb +202 -0
- data/lib/processout/networking/request.rb +1 -1
- data/lib/processout/payout_item.rb +23 -0
- data/lib/processout/payout_item_amount_breakdowns.rb +125 -0
- data/lib/processout/phone.rb +81 -0
- data/lib/processout/project_sftp_settings_public.rb +120 -0
- data/lib/processout/version.rb +1 -1
- data/lib/processout.rb +48 -0
- metadata +10 -2
@@ -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
@@ -9,6 +9,7 @@ require "processout/balances"
|
|
9
9
|
require "processout/balance"
|
10
10
|
require "processout/card"
|
11
11
|
require "processout/card_information"
|
12
|
+
require "processout/phone"
|
12
13
|
require "processout/coupon"
|
13
14
|
require "processout/customer"
|
14
15
|
require "processout/customer_phone"
|
@@ -33,10 +34,12 @@ require "processout/customer_action"
|
|
33
34
|
require "processout/dunning_action"
|
34
35
|
require "processout/payout"
|
35
36
|
require "processout/payout_item"
|
37
|
+
require "processout/payout_item_amount_breakdowns"
|
36
38
|
require "processout/plan"
|
37
39
|
require "processout/product"
|
38
40
|
require "processout/project"
|
39
41
|
require "processout/project_sftp_settings"
|
42
|
+
require "processout/project_sftp_settings_public"
|
40
43
|
require "processout/refund"
|
41
44
|
require "processout/subscription"
|
42
45
|
require "processout/transaction"
|
@@ -50,6 +53,11 @@ require "processout/payment_data_three_ds_authentication"
|
|
50
53
|
require "processout/transaction_operation"
|
51
54
|
require "processout/webhook"
|
52
55
|
require "processout/webhook_endpoint"
|
56
|
+
require "processout/card_create_request"
|
57
|
+
require "processout/device"
|
58
|
+
require "processout/card_contact"
|
59
|
+
require "processout/card_shipping"
|
60
|
+
require "processout/card_update_request"
|
53
61
|
require "processout/error_codes"
|
54
62
|
require "processout/category_error_codes"
|
55
63
|
require "processout/native_apm_transaction_details_gateway"
|
@@ -113,6 +121,11 @@ module ProcessOut
|
|
113
121
|
obj = CardInformation.new(self, data)
|
114
122
|
end
|
115
123
|
|
124
|
+
# Create a new Phone instance
|
125
|
+
def phone(data = {})
|
126
|
+
obj = Phone.new(self, data)
|
127
|
+
end
|
128
|
+
|
116
129
|
# Create a new Coupon instance
|
117
130
|
def coupon(data = {})
|
118
131
|
obj = Coupon.new(self, data)
|
@@ -233,6 +246,11 @@ module ProcessOut
|
|
233
246
|
obj = PayoutItem.new(self, data)
|
234
247
|
end
|
235
248
|
|
249
|
+
# Create a new PayoutItemAmountBreakdowns instance
|
250
|
+
def payout_item_amount_breakdowns(data = {})
|
251
|
+
obj = PayoutItemAmountBreakdowns.new(self, data)
|
252
|
+
end
|
253
|
+
|
236
254
|
# Create a new Plan instance
|
237
255
|
def plan(data = {})
|
238
256
|
obj = Plan.new(self, data)
|
@@ -253,6 +271,11 @@ module ProcessOut
|
|
253
271
|
obj = ProjectSFTPSettings.new(self, data)
|
254
272
|
end
|
255
273
|
|
274
|
+
# Create a new ProjectSFTPSettingsPublic instance
|
275
|
+
def project_sftp_settings_public(data = {})
|
276
|
+
obj = ProjectSFTPSettingsPublic.new(self, data)
|
277
|
+
end
|
278
|
+
|
256
279
|
# Create a new Refund instance
|
257
280
|
def refund(data = {})
|
258
281
|
obj = Refund.new(self, data)
|
@@ -318,6 +341,31 @@ module ProcessOut
|
|
318
341
|
obj = WebhookEndpoint.new(self, data)
|
319
342
|
end
|
320
343
|
|
344
|
+
# Create a new CardCreateRequest instance
|
345
|
+
def card_create_request(data = {})
|
346
|
+
obj = CardCreateRequest.new(self, data)
|
347
|
+
end
|
348
|
+
|
349
|
+
# Create a new Device instance
|
350
|
+
def device(data = {})
|
351
|
+
obj = Device.new(self, data)
|
352
|
+
end
|
353
|
+
|
354
|
+
# Create a new CardContact instance
|
355
|
+
def card_contact(data = {})
|
356
|
+
obj = CardContact.new(self, data)
|
357
|
+
end
|
358
|
+
|
359
|
+
# Create a new CardShipping instance
|
360
|
+
def card_shipping(data = {})
|
361
|
+
obj = CardShipping.new(self, data)
|
362
|
+
end
|
363
|
+
|
364
|
+
# Create a new CardUpdateRequest instance
|
365
|
+
def card_update_request(data = {})
|
366
|
+
obj = CardUpdateRequest.new(self, data)
|
367
|
+
end
|
368
|
+
|
321
369
|
# Create a new ErrorCodes instance
|
322
370
|
def error_codes(data = {})
|
323
371
|
obj = ErrorCodes.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-
|
11
|
+
date: 2024-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -82,12 +82,17 @@ files:
|
|
82
82
|
- lib/processout/balance.rb
|
83
83
|
- lib/processout/balances.rb
|
84
84
|
- lib/processout/card.rb
|
85
|
+
- lib/processout/card_contact.rb
|
86
|
+
- lib/processout/card_create_request.rb
|
85
87
|
- lib/processout/card_information.rb
|
88
|
+
- lib/processout/card_shipping.rb
|
89
|
+
- lib/processout/card_update_request.rb
|
86
90
|
- lib/processout/category_error_codes.rb
|
87
91
|
- lib/processout/coupon.rb
|
88
92
|
- lib/processout/customer.rb
|
89
93
|
- lib/processout/customer_action.rb
|
90
94
|
- lib/processout/customer_phone.rb
|
95
|
+
- lib/processout/device.rb
|
91
96
|
- lib/processout/discount.rb
|
92
97
|
- lib/processout/dunning_action.rb
|
93
98
|
- lib/processout/error_codes.rb
|
@@ -125,10 +130,13 @@ files:
|
|
125
130
|
- lib/processout/payment_data_three_ds_request.rb
|
126
131
|
- lib/processout/payout.rb
|
127
132
|
- lib/processout/payout_item.rb
|
133
|
+
- lib/processout/payout_item_amount_breakdowns.rb
|
134
|
+
- lib/processout/phone.rb
|
128
135
|
- lib/processout/plan.rb
|
129
136
|
- lib/processout/product.rb
|
130
137
|
- lib/processout/project.rb
|
131
138
|
- lib/processout/project_sftp_settings.rb
|
139
|
+
- lib/processout/project_sftp_settings_public.rb
|
132
140
|
- lib/processout/refund.rb
|
133
141
|
- lib/processout/subscription.rb
|
134
142
|
- lib/processout/three_ds.rb
|