processout 2.31.0 → 3.1.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.
@@ -0,0 +1,81 @@
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 ExportLayoutConfigurationColumn
10
+
11
+ attr_reader :name
12
+ attr_reader :rename
13
+
14
+
15
+ def name=(val)
16
+ @name = val
17
+ end
18
+
19
+ def rename=(val)
20
+ @rename = val
21
+ end
22
+
23
+
24
+ # Initializes the ExportLayoutConfigurationColumn object
25
+ # Params:
26
+ # +client+:: +ProcessOut+ client instance
27
+ # +data+:: data that can be used to fill the object
28
+ def initialize(client, data = {})
29
+ @client = client
30
+
31
+ self.name = data.fetch(:name, nil)
32
+ self.rename = data.fetch(:rename, nil)
33
+
34
+ end
35
+
36
+ # Create a new ExportLayoutConfigurationColumn using the current client
37
+ def new(data = {})
38
+ ExportLayoutConfigurationColumn.new(@client, data)
39
+ end
40
+
41
+ # Overrides the JSON marshaller to only send the fields we want
42
+ def to_json(options)
43
+ {
44
+ "name": self.name,
45
+ "rename": self.rename,
46
+ }.to_json
47
+ end
48
+
49
+ # Fills the object with data coming from the API
50
+ # Params:
51
+ # +data+:: +Hash+ of data coming from the API
52
+ def fill_with_data(data)
53
+ if data.nil?
54
+ return self
55
+ end
56
+ if data.include? "name"
57
+ self.name = data["name"]
58
+ end
59
+ if data.include? "rename"
60
+ self.rename = data["rename"]
61
+ end
62
+
63
+ self
64
+ end
65
+
66
+ # Prefills the object with the data passed as parameters
67
+ # Params:
68
+ # +data+:: +Hash+ of data
69
+ def prefill(data)
70
+ if data.nil?
71
+ return self
72
+ end
73
+ self.name = data.fetch(:name, self.name)
74
+ self.rename = data.fetch(:rename, self.rename)
75
+
76
+ self
77
+ end
78
+
79
+
80
+ end
81
+ end
@@ -0,0 +1,81 @@
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 ExportLayoutConfigurationConfigurationOptionsAmount
10
+
11
+ attr_reader :precision
12
+ attr_reader :separator
13
+
14
+
15
+ def precision=(val)
16
+ @precision = val
17
+ end
18
+
19
+ def separator=(val)
20
+ @separator = val
21
+ end
22
+
23
+
24
+ # Initializes the ExportLayoutConfigurationConfigurationOptionsAmount object
25
+ # Params:
26
+ # +client+:: +ProcessOut+ client instance
27
+ # +data+:: data that can be used to fill the object
28
+ def initialize(client, data = {})
29
+ @client = client
30
+
31
+ self.precision = data.fetch(:precision, nil)
32
+ self.separator = data.fetch(:separator, nil)
33
+
34
+ end
35
+
36
+ # Create a new ExportLayoutConfigurationConfigurationOptionsAmount using the current client
37
+ def new(data = {})
38
+ ExportLayoutConfigurationConfigurationOptionsAmount.new(@client, data)
39
+ end
40
+
41
+ # Overrides the JSON marshaller to only send the fields we want
42
+ def to_json(options)
43
+ {
44
+ "precision": self.precision,
45
+ "separator": self.separator,
46
+ }.to_json
47
+ end
48
+
49
+ # Fills the object with data coming from the API
50
+ # Params:
51
+ # +data+:: +Hash+ of data coming from the API
52
+ def fill_with_data(data)
53
+ if data.nil?
54
+ return self
55
+ end
56
+ if data.include? "precision"
57
+ self.precision = data["precision"]
58
+ end
59
+ if data.include? "separator"
60
+ self.separator = data["separator"]
61
+ end
62
+
63
+ self
64
+ end
65
+
66
+ # Prefills the object with the data passed as parameters
67
+ # Params:
68
+ # +data+:: +Hash+ of data
69
+ def prefill(data)
70
+ if data.nil?
71
+ return self
72
+ end
73
+ self.precision = data.fetch(:precision, self.precision)
74
+ self.separator = data.fetch(:separator, self.separator)
75
+
76
+ self
77
+ end
78
+
79
+
80
+ end
81
+ end
@@ -0,0 +1,70 @@
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 ExportLayoutConfigurationConfigurationOptionsTime
10
+
11
+ attr_reader :format
12
+
13
+
14
+ def format=(val)
15
+ @format = val
16
+ end
17
+
18
+
19
+ # Initializes the ExportLayoutConfigurationConfigurationOptionsTime 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.format = data.fetch(:format, nil)
27
+
28
+ end
29
+
30
+ # Create a new ExportLayoutConfigurationConfigurationOptionsTime using the current client
31
+ def new(data = {})
32
+ ExportLayoutConfigurationConfigurationOptionsTime.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
+ "format": self.format,
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? "format"
50
+ self.format = data["format"]
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.format = data.fetch(:format, self.format)
64
+
65
+ self
66
+ end
67
+
68
+
69
+ end
70
+ end
@@ -0,0 +1,144 @@
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 ExportLayoutConfigurationOptions
10
+
11
+ attr_reader :columns
12
+ attr_reader :time
13
+ attr_reader :amount
14
+
15
+
16
+ def columns=(val)
17
+ @columns = val
18
+ end
19
+
20
+ def time=(val)
21
+ if val.nil?
22
+ @time = val
23
+ return
24
+ end
25
+
26
+ if val.instance_of? ExportLayoutConfigurationConfigurationOptionsTime
27
+ @time = val
28
+ else
29
+ obj = ExportLayoutConfigurationConfigurationOptionsTime.new(@client)
30
+ obj.fill_with_data(val)
31
+ @time = obj
32
+ end
33
+
34
+ end
35
+
36
+ def amount=(val)
37
+ if val.nil?
38
+ @amount = val
39
+ return
40
+ end
41
+
42
+ if val.instance_of? ExportLayoutConfigurationConfigurationOptionsAmount
43
+ @amount = val
44
+ else
45
+ obj = ExportLayoutConfigurationConfigurationOptionsAmount.new(@client)
46
+ obj.fill_with_data(val)
47
+ @amount = obj
48
+ end
49
+
50
+ end
51
+
52
+
53
+ # Initializes the ExportLayoutConfigurationOptions object
54
+ # Params:
55
+ # +client+:: +ProcessOut+ client instance
56
+ # +data+:: data that can be used to fill the object
57
+ def initialize(client, data = {})
58
+ @client = client
59
+
60
+ self.columns = data.fetch(:columns, nil)
61
+ self.time = data.fetch(:time, nil)
62
+ self.amount = data.fetch(:amount, nil)
63
+
64
+ end
65
+
66
+ # Create a new ExportLayoutConfigurationOptions using the current client
67
+ def new(data = {})
68
+ ExportLayoutConfigurationOptions.new(@client, data)
69
+ end
70
+
71
+ # Overrides the JSON marshaller to only send the fields we want
72
+ def to_json(options)
73
+ {
74
+ "columns": self.columns,
75
+ "time": self.time,
76
+ "amount": self.amount,
77
+ }.to_json
78
+ end
79
+
80
+ # Fills the object with data coming from the API
81
+ # Params:
82
+ # +data+:: +Hash+ of data coming from the API
83
+ def fill_with_data(data)
84
+ if data.nil?
85
+ return self
86
+ end
87
+ if data.include? "columns"
88
+ self.columns = data["columns"]
89
+ end
90
+ if data.include? "time"
91
+ self.time = data["time"]
92
+ end
93
+ if data.include? "amount"
94
+ self.amount = data["amount"]
95
+ end
96
+
97
+ self
98
+ end
99
+
100
+ # Prefills the object with the data passed as parameters
101
+ # Params:
102
+ # +data+:: +Hash+ of data
103
+ def prefill(data)
104
+ if data.nil?
105
+ return self
106
+ end
107
+ self.columns = data.fetch(:columns, self.columns)
108
+ self.time = data.fetch(:time, self.time)
109
+ self.amount = data.fetch(:amount, self.amount)
110
+
111
+ self
112
+ end
113
+
114
+ # Fetch export layout configuration options.
115
+ # Params:
116
+ # +export_type+:: Export type
117
+ # +options+:: +Hash+ of options
118
+ def fetch(export_type, options = {})
119
+ self.prefill(options)
120
+
121
+ request = Request.new(@client)
122
+ path = "/exports/layouts/options/" + CGI.escape(export_type) + ""
123
+ data = {
124
+
125
+ }
126
+
127
+ response = Response.new(request.get(path, data, options))
128
+ return_values = Array.new
129
+
130
+ body = response.body
131
+ body = body["export_layout_configuration_options"]
132
+
133
+
134
+ obj = ExportLayoutConfigurationOptions.new(@client)
135
+ return_values.push(obj.fill_with_data(body))
136
+
137
+
138
+
139
+ return_values[0]
140
+ end
141
+
142
+
143
+ end
144
+ end
@@ -0,0 +1,70 @@
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 ExportLayoutConfigurationTime
10
+
11
+ attr_reader :format
12
+
13
+
14
+ def format=(val)
15
+ @format = val
16
+ end
17
+
18
+
19
+ # Initializes the ExportLayoutConfigurationTime 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.format = data.fetch(:format, nil)
27
+
28
+ end
29
+
30
+ # Create a new ExportLayoutConfigurationTime using the current client
31
+ def new(data = {})
32
+ ExportLayoutConfigurationTime.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
+ "format": self.format,
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? "format"
50
+ self.format = data["format"]
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.format = data.fetch(:format, self.format)
64
+
65
+ self
66
+ end
67
+
68
+
69
+ end
70
+ end
@@ -0,0 +1,136 @@
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 ExternalThreeDS
10
+
11
+ attr_reader :xid
12
+ attr_reader :trans_status
13
+ attr_reader :eci
14
+ attr_reader :cavv
15
+ attr_reader :ds_trans_id
16
+ attr_reader :version
17
+ attr_reader :authentication_flow
18
+
19
+
20
+ def xid=(val)
21
+ @xid = val
22
+ end
23
+
24
+ def trans_status=(val)
25
+ @trans_status = val
26
+ end
27
+
28
+ def eci=(val)
29
+ @eci = val
30
+ end
31
+
32
+ def cavv=(val)
33
+ @cavv = val
34
+ end
35
+
36
+ def ds_trans_id=(val)
37
+ @ds_trans_id = val
38
+ end
39
+
40
+ def version=(val)
41
+ @version = val
42
+ end
43
+
44
+ def authentication_flow=(val)
45
+ @authentication_flow = val
46
+ end
47
+
48
+
49
+ # Initializes the ExternalThreeDS object
50
+ # Params:
51
+ # +client+:: +ProcessOut+ client instance
52
+ # +data+:: data that can be used to fill the object
53
+ def initialize(client, data = {})
54
+ @client = client
55
+
56
+ self.xid = data.fetch(:xid, nil)
57
+ self.trans_status = data.fetch(:trans_status, nil)
58
+ self.eci = data.fetch(:eci, nil)
59
+ self.cavv = data.fetch(:cavv, nil)
60
+ self.ds_trans_id = data.fetch(:ds_trans_id, nil)
61
+ self.version = data.fetch(:version, nil)
62
+ self.authentication_flow = data.fetch(:authentication_flow, nil)
63
+
64
+ end
65
+
66
+ # Create a new ExternalThreeDS using the current client
67
+ def new(data = {})
68
+ ExternalThreeDS.new(@client, data)
69
+ end
70
+
71
+ # Overrides the JSON marshaller to only send the fields we want
72
+ def to_json(options)
73
+ {
74
+ "xid": self.xid,
75
+ "trans_status": self.trans_status,
76
+ "eci": self.eci,
77
+ "cavv": self.cavv,
78
+ "ds_trans_id": self.ds_trans_id,
79
+ "version": self.version,
80
+ "authentication_flow": self.authentication_flow,
81
+ }.to_json
82
+ end
83
+
84
+ # Fills the object with data coming from the API
85
+ # Params:
86
+ # +data+:: +Hash+ of data coming from the API
87
+ def fill_with_data(data)
88
+ if data.nil?
89
+ return self
90
+ end
91
+ if data.include? "xid"
92
+ self.xid = data["xid"]
93
+ end
94
+ if data.include? "trans_status"
95
+ self.trans_status = data["trans_status"]
96
+ end
97
+ if data.include? "eci"
98
+ self.eci = data["eci"]
99
+ end
100
+ if data.include? "cavv"
101
+ self.cavv = data["cavv"]
102
+ end
103
+ if data.include? "ds_trans_id"
104
+ self.ds_trans_id = data["ds_trans_id"]
105
+ end
106
+ if data.include? "version"
107
+ self.version = data["version"]
108
+ end
109
+ if data.include? "authentication_flow"
110
+ self.authentication_flow = data["authentication_flow"]
111
+ end
112
+
113
+ self
114
+ end
115
+
116
+ # Prefills the object with the data passed as parameters
117
+ # Params:
118
+ # +data+:: +Hash+ of data
119
+ def prefill(data)
120
+ if data.nil?
121
+ return self
122
+ end
123
+ self.xid = data.fetch(:xid, self.xid)
124
+ self.trans_status = data.fetch(:trans_status, self.trans_status)
125
+ self.eci = data.fetch(:eci, self.eci)
126
+ self.cavv = data.fetch(:cavv, self.cavv)
127
+ self.ds_trans_id = data.fetch(:ds_trans_id, self.ds_trans_id)
128
+ self.version = data.fetch(:version, self.version)
129
+ self.authentication_flow = data.fetch(:authentication_flow, self.authentication_flow)
130
+
131
+ self
132
+ end
133
+
134
+
135
+ end
136
+ end