rose-nielsen-sdk 0.0.6 → 0.0.7

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 (59) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -60
  3. data/lib/{swagger_petstore → cypress_test_api}/api_helper.rb +2 -2
  4. data/lib/cypress_test_api/client.rb +47 -0
  5. data/lib/{swagger_petstore → cypress_test_api}/configuration.rb +17 -41
  6. data/lib/cypress_test_api/controllers/api_controller.rb +102 -0
  7. data/lib/{swagger_petstore → cypress_test_api}/controllers/base_controller.rb +2 -2
  8. data/lib/{swagger_petstore → cypress_test_api}/exceptions/api_exception.rb +2 -2
  9. data/lib/{swagger_petstore → cypress_test_api}/http/http_call_back.rb +2 -2
  10. data/lib/{swagger_petstore → cypress_test_api}/http/http_method_enum.rb +2 -2
  11. data/lib/{swagger_petstore → cypress_test_api}/http/http_request.rb +2 -2
  12. data/lib/{swagger_petstore → cypress_test_api}/http/http_response.rb +2 -2
  13. data/lib/{swagger_petstore → cypress_test_api}/http/proxy_settings.rb +2 -2
  14. data/lib/{swagger_petstore → cypress_test_api}/models/base_model.rb +2 -2
  15. data/lib/cypress_test_api/models/custom_enum.rb +26 -0
  16. data/lib/{swagger_petstore/models/category.rb → cypress_test_api/models/deer.rb} +18 -21
  17. data/lib/cypress_test_api/models/item.rb +166 -0
  18. data/lib/{swagger_petstore/models/category2.rb → cypress_test_api/models/item_response.rb} +19 -10
  19. data/lib/cypress_test_api/models/lion.rb +68 -0
  20. data/lib/cypress_test_api/models/message.rb +68 -0
  21. data/lib/{swagger_petstore/models/api_response.rb → cypress_test_api/models/message2.rb} +14 -24
  22. data/lib/cypress_test_api/models/multiple_arrays_request.rb +70 -0
  23. data/lib/cypress_test_api/models/nac_tag.rb +265 -0
  24. data/lib/cypress_test_api/models/o_auth_scope_o_auth_acg_enum.rb +29 -0
  25. data/lib/cypress_test_api/models/response_http400.rb +62 -0
  26. data/lib/{swagger_petstore/models/tag.rb → cypress_test_api/models/response_http404.rb} +9 -18
  27. data/lib/cypress_test_api/models/status11_enum.rb +26 -0
  28. data/lib/cypress_test_api/models/status1_enum.rb +26 -0
  29. data/lib/{swagger_petstore → cypress_test_api}/models/status_enum.rb +9 -9
  30. data/lib/cypress_test_api/models/tokens_request.rb +60 -0
  31. data/lib/{swagger_petstore → cypress_test_api}/utilities/date_time_helper.rb +2 -2
  32. data/lib/{swagger_petstore → cypress_test_api}/utilities/file_wrapper.rb +2 -2
  33. data/lib/cypress_test_api.rb +55 -0
  34. data/test/controllers/controller_test_base.rb +5 -13
  35. data/test/controllers/test_api_controller.rb +40 -0
  36. data/test/http_response_catcher.rb +2 -2
  37. metadata +33 -40
  38. data/lib/swagger_petstore/client.rb +0 -84
  39. data/lib/swagger_petstore/controllers/pet_controller.rb +0 -206
  40. data/lib/swagger_petstore/controllers/store_controller.rb +0 -94
  41. data/lib/swagger_petstore/controllers/user_controller.rb +0 -165
  42. data/lib/swagger_petstore/exceptions/o_auth_provider_exception.rb +0 -64
  43. data/lib/swagger_petstore/http/auth/api_key.rb +0 -42
  44. data/lib/swagger_petstore/http/auth/http_basic.rb +0 -50
  45. data/lib/swagger_petstore/http/auth/petstore_auth.rb +0 -98
  46. data/lib/swagger_petstore/models/content_type_enum.rb +0 -20
  47. data/lib/swagger_petstore/models/o_auth_provider_error_enum.rb +0 -45
  48. data/lib/swagger_petstore/models/o_auth_scope_petstore_auth_enum.rb +0 -23
  49. data/lib/swagger_petstore/models/o_auth_token.rb +0 -96
  50. data/lib/swagger_petstore/models/order.rb +0 -120
  51. data/lib/swagger_petstore/models/pet.rb +0 -117
  52. data/lib/swagger_petstore/models/pet_request.rb +0 -117
  53. data/lib/swagger_petstore/models/status1_enum.rb +0 -26
  54. data/lib/swagger_petstore/models/status2_enum.rb +0 -26
  55. data/lib/swagger_petstore/models/store_order_request.rb +0 -120
  56. data/lib/swagger_petstore/models/user.rb +0 -132
  57. data/lib/swagger_petstore/models/user_request.rb +0 -132
  58. data/lib/swagger_petstore.rb +0 -62
  59. data/test/controllers/test_store_controller.rb +0 -31
@@ -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
@@ -1,27 +1,32 @@
1
- # swagger_petstore
1
+ # cypress_test_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v3.0
4
4
  # ( https://www.apimatic.io ).
5
5
 
6
- module SwaggerPetstore
7
- # Category2 Model.
8
- class Category2 < BaseModel
6
+ module CypressTestApi
7
+ # ItemResponse Model.
8
+ class ItemResponse < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
12
12
  # TODO: Write general description for this method
13
- # @return [Integer]
13
+ # @return [String]
14
14
  attr_accessor :id
15
15
 
16
16
  # TODO: Write general description for this method
17
17
  # @return [String]
18
18
  attr_accessor :name
19
19
 
20
+ # TODO: Write general description for this method
21
+ # @return [String]
22
+ attr_accessor :message
23
+
20
24
  # A mapping from model property names to API property names.
21
25
  def self.names
22
26
  @_hash = {} if @_hash.nil?
23
27
  @_hash['id'] = 'id'
24
28
  @_hash['name'] = 'name'
29
+ @_hash['message'] = 'message'
25
30
  @_hash
26
31
  end
27
32
 
@@ -30,6 +35,7 @@ module SwaggerPetstore
30
35
  %w[
31
36
  id
32
37
  name
38
+ message
33
39
  ]
34
40
  end
35
41
 
@@ -38,9 +44,10 @@ module SwaggerPetstore
38
44
  []
39
45
  end
40
46
 
41
- def initialize(id = SKIP, name = SKIP)
47
+ def initialize(id = SKIP, name = SKIP, message = SKIP)
42
48
  @id = id unless id == SKIP
43
49
  @name = name unless name == SKIP
50
+ @message = message unless message == SKIP
44
51
  end
45
52
 
46
53
  # Creates an instance of the object from a hash.
@@ -50,22 +57,24 @@ module SwaggerPetstore
50
57
  # Extract variables from the hash.
51
58
  id = hash.key?('id') ? hash['id'] : SKIP
52
59
  name = hash.key?('name') ? hash['name'] : SKIP
60
+ message = hash.key?('message') ? hash['message'] : SKIP
53
61
 
54
62
  # Create object from extracted values.
55
- Category2.new(id,
56
- name)
63
+ ItemResponse.new(id,
64
+ name,
65
+ message)
57
66
  end
58
67
 
59
68
  # Provides a human-readable string representation of the object.
60
69
  def to_s
61
70
  class_name = self.class.name.split('::').last
62
- "<#{class_name} id: #{@id}, name: #{@name}>"
71
+ "<#{class_name} id: #{@id}, name: #{@name}, message: #{@message}>"
63
72
  end
64
73
 
65
74
  # Provides a debugging-friendly string with detailed object information.
66
75
  def inspect
67
76
  class_name = self.class.name.split('::').last
68
- "<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}>"
77
+ "<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}, message: #{@message.inspect}>"
69
78
  end
70
79
  end
71
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
@@ -1,11 +1,11 @@
1
- # swagger_petstore
1
+ # cypress_test_api
2
2
  #
3
3
  # This file was automatically generated by APIMATIC v3.0
4
4
  # ( https://www.apimatic.io ).
5
5
 
6
- module SwaggerPetstore
7
- # ApiResponse Model.
8
- class ApiResponse < BaseModel
6
+ module CypressTestApi
7
+ # Message2 Model.
8
+ class Message2 < BaseModel
9
9
  SKIP = Object.new
10
10
  private_constant :SKIP
11
11
 
@@ -15,18 +15,13 @@ module SwaggerPetstore
15
15
 
16
16
  # TODO: Write general description for this method
17
17
  # @return [String]
18
- attr_accessor :type
19
-
20
- # TODO: Write general description for this method
21
- # @return [String]
22
- attr_accessor :message
18
+ attr_accessor :text
23
19
 
24
20
  # A mapping from model property names to API property names.
25
21
  def self.names
26
22
  @_hash = {} if @_hash.nil?
27
23
  @_hash['code'] = 'code'
28
- @_hash['type'] = 'type'
29
- @_hash['message'] = 'message'
24
+ @_hash['text'] = 'text'
30
25
  @_hash
31
26
  end
32
27
 
@@ -34,8 +29,7 @@ module SwaggerPetstore
34
29
  def self.optionals
35
30
  %w[
36
31
  code
37
- type
38
- message
32
+ text
39
33
  ]
40
34
  end
41
35
 
@@ -44,10 +38,9 @@ module SwaggerPetstore
44
38
  []
45
39
  end
46
40
 
47
- def initialize(code = SKIP, type = SKIP, message = SKIP)
41
+ def initialize(code = SKIP, text = SKIP)
48
42
  @code = code unless code == SKIP
49
- @type = type unless type == SKIP
50
- @message = message unless message == SKIP
43
+ @text = text unless text == SKIP
51
44
  end
52
45
 
53
46
  # Creates an instance of the object from a hash.
@@ -56,26 +49,23 @@ module SwaggerPetstore
56
49
 
57
50
  # Extract variables from the hash.
58
51
  code = hash.key?('code') ? hash['code'] : SKIP
59
- type = hash.key?('type') ? hash['type'] : SKIP
60
- message = hash.key?('message') ? hash['message'] : SKIP
52
+ text = hash.key?('text') ? hash['text'] : SKIP
61
53
 
62
54
  # Create object from extracted values.
63
- ApiResponse.new(code,
64
- type,
65
- message)
55
+ Message2.new(code,
56
+ text)
66
57
  end
67
58
 
68
59
  # Provides a human-readable string representation of the object.
69
60
  def to_s
70
61
  class_name = self.class.name.split('::').last
71
- "<#{class_name} code: #{@code}, type: #{@type}, message: #{@message}>"
62
+ "<#{class_name} code: #{@code}, text: #{@text}>"
72
63
  end
73
64
 
74
65
  # Provides a debugging-friendly string with detailed object information.
75
66
  def inspect
76
67
  class_name = self.class.name.split('::').last
77
- "<#{class_name} code: #{@code.inspect}, type: #{@type.inspect}, message:"\
78
- " #{@message.inspect}>"
68
+ "<#{class_name} code: #{@code.inspect}, text: #{@text.inspect}>"
79
69
  end
80
70
  end
81
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