wesley-key-sdk 1.1.1

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.
Files changed (38) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +84 -0
  4. data/lib/cypress_test_api/api_helper.rb +10 -0
  5. data/lib/cypress_test_api/client.rb +47 -0
  6. data/lib/cypress_test_api/configuration.rb +103 -0
  7. data/lib/cypress_test_api/controllers/api_controller.rb +102 -0
  8. data/lib/cypress_test_api/controllers/base_controller.rb +60 -0
  9. data/lib/cypress_test_api/exceptions/api_exception.rb +21 -0
  10. data/lib/cypress_test_api/http/http_call_back.rb +10 -0
  11. data/lib/cypress_test_api/http/http_method_enum.rb +10 -0
  12. data/lib/cypress_test_api/http/http_request.rb +10 -0
  13. data/lib/cypress_test_api/http/http_response.rb +10 -0
  14. data/lib/cypress_test_api/http/proxy_settings.rb +13 -0
  15. data/lib/cypress_test_api/models/base_model.rb +110 -0
  16. data/lib/cypress_test_api/models/custom_enum.rb +26 -0
  17. data/lib/cypress_test_api/models/deer.rb +68 -0
  18. data/lib/cypress_test_api/models/item.rb +166 -0
  19. data/lib/cypress_test_api/models/item_response.rb +80 -0
  20. data/lib/cypress_test_api/models/lion.rb +68 -0
  21. data/lib/cypress_test_api/models/message.rb +68 -0
  22. data/lib/cypress_test_api/models/message2.rb +71 -0
  23. data/lib/cypress_test_api/models/multiple_arrays_request.rb +70 -0
  24. data/lib/cypress_test_api/models/nac_tag.rb +265 -0
  25. data/lib/cypress_test_api/models/o_auth_scope_o_auth_acg_enum.rb +29 -0
  26. data/lib/cypress_test_api/models/response_http400.rb +62 -0
  27. data/lib/cypress_test_api/models/response_http404.rb +62 -0
  28. data/lib/cypress_test_api/models/status11_enum.rb +26 -0
  29. data/lib/cypress_test_api/models/status1_enum.rb +26 -0
  30. data/lib/cypress_test_api/models/status_enum.rb +26 -0
  31. data/lib/cypress_test_api/models/tokens_request.rb +60 -0
  32. data/lib/cypress_test_api/utilities/date_time_helper.rb +11 -0
  33. data/lib/cypress_test_api/utilities/file_wrapper.rb +28 -0
  34. data/lib/cypress_test_api.rb +55 -0
  35. data/test/controllers/controller_test_base.rb +29 -0
  36. data/test/controllers/test_api_controller.rb +40 -0
  37. data/test/http_response_catcher.rb +19 -0
  38. metadata +149 -0
@@ -0,0 +1,68 @@
1
+ # cypress_test_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ module CypressTestApi
7
+ # Deer Model.
8
+ class Deer < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :name
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :type
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['name'] = 'name'
24
+ @_hash['type'] = 'type'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(name = nil, type = nil)
39
+ @name = name
40
+ @type = type
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ name = hash.key?('name') ? hash['name'] : nil
49
+ type = hash.key?('type') ? hash['type'] : nil
50
+
51
+ # Create object from extracted values.
52
+ Deer.new(name,
53
+ type)
54
+ end
55
+
56
+ # Provides a human-readable string representation of the object.
57
+ def to_s
58
+ class_name = self.class.name.split('::').last
59
+ "<#{class_name} name: #{@name}, type: #{@type}>"
60
+ end
61
+
62
+ # Provides a debugging-friendly string with detailed object information.
63
+ def inspect
64
+ class_name = self.class.name.split('::').last
65
+ "<#{class_name} name: #{@name.inspect}, type: #{@type.inspect}>"
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,166 @@
1
+ # cypress_test_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module CypressTestApi
8
+ # Item Model.
9
+ class Item < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # TODO: Write general description for this method
14
+ # @return [UUID | String]
15
+ attr_accessor :id
16
+
17
+ # TODO: Write general description for this method
18
+ # @return [String]
19
+ attr_accessor :name
20
+
21
+ # TODO: Write general description for this method
22
+ # @return [Date]
23
+ attr_accessor :date
24
+
25
+ # TODO: Write general description for this method
26
+ # @return [DateTime]
27
+ attr_accessor :date_time
28
+
29
+ # TODO: Write general description for this method
30
+ # @return [Float]
31
+ attr_accessor :decimal
32
+
33
+ # TODO: Write general description for this method
34
+ # @return [Integer]
35
+ attr_accessor :long
36
+
37
+ # TODO: Write general description for this method
38
+ # @return [TrueClass | FalseClass]
39
+ attr_accessor :bool
40
+
41
+ # TODO: Write general description for this method
42
+ # @return [CustomEnum]
43
+ attr_accessor :custom_enum
44
+
45
+ # TODO: Write general description for this method
46
+ # @return [StatusEnum]
47
+ attr_accessor :status
48
+
49
+ # A generic JSON object
50
+ # @return [Object]
51
+ attr_accessor :json_object
52
+
53
+ # A generic JSON object
54
+ # @return [Object]
55
+ attr_accessor :animal
56
+
57
+ # A generic JSON object
58
+ # @return [Hash[String, Message]]
59
+ attr_accessor :map
60
+
61
+ # A mapping from model property names to API property names.
62
+ def self.names
63
+ @_hash = {} if @_hash.nil?
64
+ @_hash['id'] = 'id'
65
+ @_hash['name'] = 'name'
66
+ @_hash['date'] = 'date'
67
+ @_hash['date_time'] = 'dateTime'
68
+ @_hash['decimal'] = 'decimal'
69
+ @_hash['long'] = 'long'
70
+ @_hash['bool'] = 'bool'
71
+ @_hash['custom_enum'] = 'CustomEnum'
72
+ @_hash['status'] = 'status'
73
+ @_hash['json_object'] = 'jsonObject'
74
+ @_hash['animal'] = 'Animal'
75
+ @_hash['map'] = 'Map'
76
+ @_hash
77
+ end
78
+
79
+ # An array for optional fields
80
+ def self.optionals
81
+ %w[
82
+ status
83
+ ]
84
+ end
85
+
86
+ # An array for nullable fields
87
+ def self.nullables
88
+ []
89
+ end
90
+
91
+ def initialize(id = nil, name = nil, date = nil, date_time = nil,
92
+ decimal = nil, long = nil, bool = nil, custom_enum = nil,
93
+ json_object = nil, animal = nil, map = nil, status = SKIP)
94
+ @id = id
95
+ @name = name
96
+ @date = date
97
+ @date_time = date_time
98
+ @decimal = decimal
99
+ @long = long
100
+ @bool = bool
101
+ @custom_enum = custom_enum
102
+ @status = status unless status == SKIP
103
+ @json_object = json_object
104
+ @animal = animal
105
+ @map = map
106
+ end
107
+
108
+ # Creates an instance of the object from a hash.
109
+ def self.from_hash(hash)
110
+ return nil unless hash
111
+
112
+ # Extract variables from the hash.
113
+ id = hash.key?('id') ? hash['id'] : nil
114
+ name = hash.key?('name') ? hash['name'] : nil
115
+ date = hash.key?('date') ? hash['date'] : nil
116
+ date_time = if hash.key?('dateTime')
117
+ (DateTimeHelper.from_rfc3339(hash['dateTime']) if hash['dateTime'])
118
+ end
119
+ decimal = hash.key?('decimal') ? hash['decimal'] : nil
120
+ long = hash.key?('long') ? hash['long'] : nil
121
+ bool = hash.key?('bool') ? hash['bool'] : nil
122
+ custom_enum = hash.key?('CustomEnum') ? hash['CustomEnum'] : nil
123
+ json_object = hash.key?('jsonObject') ? hash['jsonObject'] : nil
124
+ animal = hash.key?('Animal') ? hash['Animal'] : nil
125
+ map = Message.from_hash(hash['Map']) if hash['Map']
126
+
127
+ map = nil unless hash.key?('Map')
128
+ status = hash.key?('status') ? hash['status'] : SKIP
129
+
130
+ # Create object from extracted values.
131
+ Item.new(id,
132
+ name,
133
+ date,
134
+ date_time,
135
+ decimal,
136
+ long,
137
+ bool,
138
+ custom_enum,
139
+ json_object,
140
+ animal,
141
+ map,
142
+ status)
143
+ end
144
+
145
+ def to_custom_date_time
146
+ DateTimeHelper.to_rfc3339(date_time)
147
+ end
148
+
149
+ # Provides a human-readable string representation of the object.
150
+ def to_s
151
+ class_name = self.class.name.split('::').last
152
+ "<#{class_name} id: #{@id}, name: #{@name}, date: #{@date}, date_time: #{@date_time},"\
153
+ " decimal: #{@decimal}, long: #{@long}, bool: #{@bool}, custom_enum: #{@custom_enum},"\
154
+ " status: #{@status}, json_object: #{@json_object}, animal: #{@animal}, map: #{@map}>"
155
+ end
156
+
157
+ # Provides a debugging-friendly string with detailed object information.
158
+ def inspect
159
+ class_name = self.class.name.split('::').last
160
+ "<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}, date: #{@date.inspect},"\
161
+ " date_time: #{@date_time.inspect}, decimal: #{@decimal.inspect}, long: #{@long.inspect},"\
162
+ " bool: #{@bool.inspect}, custom_enum: #{@custom_enum.inspect}, status: #{@status.inspect},"\
163
+ " json_object: #{@json_object.inspect}, animal: #{@animal.inspect}, map: #{@map.inspect}>"
164
+ end
165
+ end
166
+ end
@@ -0,0 +1,80 @@
1
+ # cypress_test_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ module CypressTestApi
7
+ # ItemResponse Model.
8
+ class ItemResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :id
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :name
19
+
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :message
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['id'] = 'id'
28
+ @_hash['name'] = 'name'
29
+ @_hash['message'] = 'message'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ id
37
+ name
38
+ message
39
+ ]
40
+ end
41
+
42
+ # An array for nullable fields
43
+ def self.nullables
44
+ []
45
+ end
46
+
47
+ def initialize(id = SKIP, name = SKIP, message = SKIP)
48
+ @id = id unless id == SKIP
49
+ @name = name unless name == SKIP
50
+ @message = message unless message == SKIP
51
+ end
52
+
53
+ # Creates an instance of the object from a hash.
54
+ def self.from_hash(hash)
55
+ return nil unless hash
56
+
57
+ # Extract variables from the hash.
58
+ id = hash.key?('id') ? hash['id'] : SKIP
59
+ name = hash.key?('name') ? hash['name'] : SKIP
60
+ message = hash.key?('message') ? hash['message'] : SKIP
61
+
62
+ # Create object from extracted values.
63
+ ItemResponse.new(id,
64
+ name,
65
+ message)
66
+ end
67
+
68
+ # Provides a human-readable string representation of the object.
69
+ def to_s
70
+ class_name = self.class.name.split('::').last
71
+ "<#{class_name} id: #{@id}, name: #{@name}, message: #{@message}>"
72
+ end
73
+
74
+ # Provides a debugging-friendly string with detailed object information.
75
+ def inspect
76
+ class_name = self.class.name.split('::').last
77
+ "<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}, message: #{@message.inspect}>"
78
+ end
79
+ end
80
+ end
@@ -0,0 +1,68 @@
1
+ # cypress_test_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ module CypressTestApi
7
+ # Lion Model.
8
+ class Lion < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [String]
14
+ attr_accessor :id
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :type
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['id'] = 'id'
24
+ @_hash['type'] = 'type'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(id = nil, type = nil)
39
+ @id = id
40
+ @type = type
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ id = hash.key?('id') ? hash['id'] : nil
49
+ type = hash.key?('type') ? hash['type'] : nil
50
+
51
+ # Create object from extracted values.
52
+ Lion.new(id,
53
+ type)
54
+ end
55
+
56
+ # Provides a human-readable string representation of the object.
57
+ def to_s
58
+ class_name = self.class.name.split('::').last
59
+ "<#{class_name} id: #{@id}, type: #{@type}>"
60
+ end
61
+
62
+ # Provides a debugging-friendly string with detailed object information.
63
+ def inspect
64
+ class_name = self.class.name.split('::').last
65
+ "<#{class_name} id: #{@id.inspect}, type: #{@type.inspect}>"
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,68 @@
1
+ # cypress_test_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ module CypressTestApi
7
+ # Message Model.
8
+ class Message < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Integer]
14
+ attr_accessor :code
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :text
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['code'] = 'code'
24
+ @_hash['text'] = 'text'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ []
31
+ end
32
+
33
+ # An array for nullable fields
34
+ def self.nullables
35
+ []
36
+ end
37
+
38
+ def initialize(code = nil, text = nil)
39
+ @code = code
40
+ @text = text
41
+ end
42
+
43
+ # Creates an instance of the object from a hash.
44
+ def self.from_hash(hash)
45
+ return nil unless hash
46
+
47
+ # Extract variables from the hash.
48
+ code = hash.key?('code') ? hash['code'] : nil
49
+ text = hash.key?('text') ? hash['text'] : nil
50
+
51
+ # Create object from extracted values.
52
+ Message.new(code,
53
+ text)
54
+ end
55
+
56
+ # Provides a human-readable string representation of the object.
57
+ def to_s
58
+ class_name = self.class.name.split('::').last
59
+ "<#{class_name} code: #{@code}, text: #{@text}>"
60
+ end
61
+
62
+ # Provides a debugging-friendly string with detailed object information.
63
+ def inspect
64
+ class_name = self.class.name.split('::').last
65
+ "<#{class_name} code: #{@code.inspect}, text: #{@text.inspect}>"
66
+ end
67
+ end
68
+ end
@@ -0,0 +1,71 @@
1
+ # cypress_test_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ module CypressTestApi
7
+ # Message2 Model.
8
+ class Message2 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # TODO: Write general description for this method
13
+ # @return [Integer]
14
+ attr_accessor :code
15
+
16
+ # TODO: Write general description for this method
17
+ # @return [String]
18
+ attr_accessor :text
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['code'] = 'code'
24
+ @_hash['text'] = 'text'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ code
32
+ text
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(code = SKIP, text = SKIP)
42
+ @code = code unless code == SKIP
43
+ @text = text unless text == SKIP
44
+ end
45
+
46
+ # Creates an instance of the object from a hash.
47
+ def self.from_hash(hash)
48
+ return nil unless hash
49
+
50
+ # Extract variables from the hash.
51
+ code = hash.key?('code') ? hash['code'] : SKIP
52
+ text = hash.key?('text') ? hash['text'] : SKIP
53
+
54
+ # Create object from extracted values.
55
+ Message2.new(code,
56
+ text)
57
+ end
58
+
59
+ # Provides a human-readable string representation of the object.
60
+ def to_s
61
+ class_name = self.class.name.split('::').last
62
+ "<#{class_name} code: #{@code}, text: #{@text}>"
63
+ end
64
+
65
+ # Provides a debugging-friendly string with detailed object information.
66
+ def inspect
67
+ class_name = self.class.name.split('::').last
68
+ "<#{class_name} code: #{@code.inspect}, text: #{@text.inspect}>"
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,70 @@
1
+ # cypress_test_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v3.0
4
+ # ( https://www.apimatic.io ).
5
+
6
+ module CypressTestApi
7
+ # MultipleArraysRequest Model.
8
+ class MultipleArraysRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # An array containing items of type string
13
+ # @return [Array[String]]
14
+ attr_accessor :array1
15
+
16
+ # An array containing items of type integer
17
+ # @return [Array[Integer]]
18
+ attr_accessor :array2
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['array1'] = 'Array1'
24
+ @_hash['array2'] = 'Array2'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ array2
32
+ ]
33
+ end
34
+
35
+ # An array for nullable fields
36
+ def self.nullables
37
+ []
38
+ end
39
+
40
+ def initialize(array1 = nil, array2 = SKIP)
41
+ @array1 = array1
42
+ @array2 = array2 unless array2 == SKIP
43
+ end
44
+
45
+ # Creates an instance of the object from a hash.
46
+ def self.from_hash(hash)
47
+ return nil unless hash
48
+
49
+ # Extract variables from the hash.
50
+ array1 = hash.key?('Array1') ? hash['Array1'] : nil
51
+ array2 = hash.key?('Array2') ? hash['Array2'] : SKIP
52
+
53
+ # Create object from extracted values.
54
+ MultipleArraysRequest.new(array1,
55
+ array2)
56
+ end
57
+
58
+ # Provides a human-readable string representation of the object.
59
+ def to_s
60
+ class_name = self.class.name.split('::').last
61
+ "<#{class_name} array1: #{@array1}, array2: #{@array2}>"
62
+ end
63
+
64
+ # Provides a debugging-friendly string with detailed object information.
65
+ def inspect
66
+ class_name = self.class.name.split('::').last
67
+ "<#{class_name} array1: #{@array1.inspect}, array2: #{@array2.inspect}>"
68
+ end
69
+ end
70
+ end