rose-nielsen-sdk 0.0.2 → 0.0.3

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 +60 -18
  3. data/lib/{cypress_test_api → swagger_petstore}/api_helper.rb +2 -2
  4. data/lib/swagger_petstore/client.rb +84 -0
  5. data/lib/{cypress_test_api → swagger_petstore}/configuration.rb +41 -17
  6. data/lib/{cypress_test_api → swagger_petstore}/controllers/base_controller.rb +2 -2
  7. data/lib/swagger_petstore/controllers/pet_controller.rb +206 -0
  8. data/lib/swagger_petstore/controllers/store_controller.rb +94 -0
  9. data/lib/swagger_petstore/controllers/user_controller.rb +165 -0
  10. data/lib/{cypress_test_api → swagger_petstore}/exceptions/api_exception.rb +2 -2
  11. data/lib/swagger_petstore/exceptions/o_auth_provider_exception.rb +64 -0
  12. data/lib/swagger_petstore/http/auth/api_key.rb +42 -0
  13. data/lib/swagger_petstore/http/auth/http_basic.rb +50 -0
  14. data/lib/swagger_petstore/http/auth/petstore_auth.rb +98 -0
  15. data/lib/{cypress_test_api → swagger_petstore}/http/http_call_back.rb +2 -2
  16. data/lib/{cypress_test_api → swagger_petstore}/http/http_method_enum.rb +2 -2
  17. data/lib/{cypress_test_api → swagger_petstore}/http/http_request.rb +2 -2
  18. data/lib/{cypress_test_api → swagger_petstore}/http/http_response.rb +2 -2
  19. data/lib/{cypress_test_api → swagger_petstore}/http/proxy_settings.rb +2 -2
  20. data/lib/{cypress_test_api/models/message2.rb → swagger_petstore/models/api_response.rb} +24 -14
  21. data/lib/{cypress_test_api → swagger_petstore}/models/base_model.rb +2 -2
  22. data/lib/{cypress_test_api/models/item_response.rb → swagger_petstore/models/category.rb} +10 -19
  23. data/lib/{cypress_test_api/models/deer.rb → swagger_petstore/models/category2.rb} +21 -18
  24. data/lib/swagger_petstore/models/content_type_enum.rb +20 -0
  25. data/lib/swagger_petstore/models/o_auth_provider_error_enum.rb +45 -0
  26. data/lib/swagger_petstore/models/o_auth_scope_petstore_auth_enum.rb +23 -0
  27. data/lib/swagger_petstore/models/o_auth_token.rb +96 -0
  28. data/lib/swagger_petstore/models/order.rb +120 -0
  29. data/lib/swagger_petstore/models/pet.rb +117 -0
  30. data/lib/swagger_petstore/models/pet_request.rb +117 -0
  31. data/lib/swagger_petstore/models/status1_enum.rb +26 -0
  32. data/lib/swagger_petstore/models/status2_enum.rb +26 -0
  33. data/lib/{cypress_test_api → swagger_petstore}/models/status_enum.rb +9 -9
  34. data/lib/swagger_petstore/models/store_order_request.rb +120 -0
  35. data/lib/{cypress_test_api/models/response_http404.rb → swagger_petstore/models/tag.rb} +18 -9
  36. data/lib/swagger_petstore/models/user.rb +132 -0
  37. data/lib/swagger_petstore/models/user_request.rb +132 -0
  38. data/lib/{cypress_test_api → swagger_petstore}/utilities/date_time_helper.rb +2 -2
  39. data/lib/{cypress_test_api → swagger_petstore}/utilities/file_wrapper.rb +2 -2
  40. data/lib/swagger_petstore.rb +62 -0
  41. data/test/controllers/controller_test_base.rb +13 -5
  42. data/test/controllers/test_store_controller.rb +31 -0
  43. data/test/http_response_catcher.rb +2 -2
  44. metadata +40 -33
  45. data/lib/cypress_test_api/client.rb +0 -47
  46. data/lib/cypress_test_api/controllers/api_controller.rb +0 -102
  47. data/lib/cypress_test_api/models/custom_enum.rb +0 -26
  48. data/lib/cypress_test_api/models/item.rb +0 -166
  49. data/lib/cypress_test_api/models/lion.rb +0 -68
  50. data/lib/cypress_test_api/models/message.rb +0 -68
  51. data/lib/cypress_test_api/models/multiple_arrays_request.rb +0 -70
  52. data/lib/cypress_test_api/models/nac_tag.rb +0 -265
  53. data/lib/cypress_test_api/models/o_auth_scope_o_auth_acg_enum.rb +0 -29
  54. data/lib/cypress_test_api/models/response_http400.rb +0 -62
  55. data/lib/cypress_test_api/models/status11_enum.rb +0 -26
  56. data/lib/cypress_test_api/models/status1_enum.rb +0 -26
  57. data/lib/cypress_test_api/models/tokens_request.rb +0 -60
  58. data/lib/cypress_test_api.rb +0 -55
  59. data/test/controllers/test_api_controller.rb +0 -40
@@ -1,62 +0,0 @@
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
- # ResponseHttp400 Model.
8
- class ResponseHttp400 < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # TODO: Write general description for this method
13
- # @return [String]
14
- attr_accessor :detail
15
-
16
- # A mapping from model property names to API property names.
17
- def self.names
18
- @_hash = {} if @_hash.nil?
19
- @_hash['detail'] = 'detail'
20
- @_hash
21
- end
22
-
23
- # An array for optional fields
24
- def self.optionals
25
- %w[
26
- detail
27
- ]
28
- end
29
-
30
- # An array for nullable fields
31
- def self.nullables
32
- []
33
- end
34
-
35
- def initialize(detail = SKIP)
36
- @detail = detail unless detail == SKIP
37
- end
38
-
39
- # Creates an instance of the object from a hash.
40
- def self.from_hash(hash)
41
- return nil unless hash
42
-
43
- # Extract variables from the hash.
44
- detail = hash.key?('detail') ? hash['detail'] : SKIP
45
-
46
- # Create object from extracted values.
47
- ResponseHttp400.new(detail)
48
- end
49
-
50
- # Provides a human-readable string representation of the object.
51
- def to_s
52
- class_name = self.class.name.split('::').last
53
- "<#{class_name} detail: #{@detail}>"
54
- end
55
-
56
- # Provides a debugging-friendly string with detailed object information.
57
- def inspect
58
- class_name = self.class.name.split('::').last
59
- "<#{class_name} detail: #{@detail.inspect}>"
60
- end
61
- end
62
- end
@@ -1,26 +0,0 @@
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
- # The status of the items to filter by.
8
- class Status11Enum
9
- STATUS11_ENUM = [
10
- # TODO: Write general description for ENUMVALUE1
11
- ENUMVALUE1 = 'enumvalue1'.freeze,
12
-
13
- # TODO: Write general description for ENUMVALUE2
14
- ENUMVALUE2 = 'enumvalue2'.freeze,
15
-
16
- # TODO: Write general description for ENUMVALUE3
17
- ENUMVALUE3 = 'enumvalue3'.freeze
18
- ].freeze
19
-
20
- def self.validate(value)
21
- return false if value.nil?
22
-
23
- STATUS11_ENUM.include?(value)
24
- end
25
- end
26
- end
@@ -1,26 +0,0 @@
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
- # status1.
8
- class Status1Enum
9
- STATUS1_ENUM = [
10
- # TODO: Write general description for ENUMVALUE1
11
- ENUMVALUE1 = 'enumvalue1'.freeze,
12
-
13
- # TODO: Write general description for ENUMVALUE2
14
- ENUMVALUE2 = 'enumvalue2'.freeze,
15
-
16
- # TODO: Write general description for ENUMVALUE3
17
- ENUMVALUE3 = 'enumvalue3'.freeze
18
- ].freeze
19
-
20
- def self.validate(value)
21
- return false if value.nil?
22
-
23
- STATUS1_ENUM.include?(value)
24
- end
25
- end
26
- end
@@ -1,60 +0,0 @@
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
- # TokensRequest Model.
8
- class TokensRequest < BaseModel
9
- SKIP = Object.new
10
- private_constant :SKIP
11
-
12
- # List of scopes that apply to the OAuth token
13
- # @return [Array[OAuthScopeOAuthACGEnum]]
14
- attr_accessor :scopes
15
-
16
- # A mapping from model property names to API property names.
17
- def self.names
18
- @_hash = {} if @_hash.nil?
19
- @_hash['scopes'] = 'scopes'
20
- @_hash
21
- end
22
-
23
- # An array for optional fields
24
- def self.optionals
25
- []
26
- end
27
-
28
- # An array for nullable fields
29
- def self.nullables
30
- []
31
- end
32
-
33
- def initialize(scopes = nil)
34
- @scopes = scopes
35
- end
36
-
37
- # Creates an instance of the object from a hash.
38
- def self.from_hash(hash)
39
- return nil unless hash
40
-
41
- # Extract variables from the hash.
42
- scopes = hash.key?('scopes') ? hash['scopes'] : nil
43
-
44
- # Create object from extracted values.
45
- TokensRequest.new(scopes)
46
- end
47
-
48
- # Provides a human-readable string representation of the object.
49
- def to_s
50
- class_name = self.class.name.split('::').last
51
- "<#{class_name} scopes: #{@scopes}>"
52
- end
53
-
54
- # Provides a debugging-friendly string with detailed object information.
55
- def inspect
56
- class_name = self.class.name.split('::').last
57
- "<#{class_name} scopes: #{@scopes.inspect}>"
58
- end
59
- end
60
- end
@@ -1,55 +0,0 @@
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
- require 'json'
8
-
9
- require 'apimatic_core_interfaces'
10
- require 'apimatic_core'
11
- require 'apimatic_faraday_client_adapter'
12
-
13
- require_relative 'cypress_test_api/api_helper'
14
- require_relative 'cypress_test_api/client'
15
-
16
- # Utilities
17
- require_relative 'cypress_test_api/utilities/file_wrapper'
18
- require_relative 'cypress_test_api/utilities/date_time_helper'
19
-
20
- # Http
21
- require_relative 'cypress_test_api/http/http_call_back'
22
- require_relative 'cypress_test_api/http/http_method_enum'
23
- require_relative 'cypress_test_api/http/http_request'
24
- require_relative 'cypress_test_api/http/http_response'
25
- require_relative 'cypress_test_api/http/proxy_settings'
26
-
27
-
28
-
29
- # Models
30
- require_relative 'cypress_test_api/models/base_model'
31
- require_relative 'cypress_test_api/models/multiple_arrays_request'
32
- require_relative 'cypress_test_api/models/lion'
33
- require_relative 'cypress_test_api/models/deer'
34
- require_relative 'cypress_test_api/models/item'
35
- require_relative 'cypress_test_api/models/response_http400'
36
- require_relative 'cypress_test_api/models/message'
37
- require_relative 'cypress_test_api/models/response_http404'
38
- require_relative 'cypress_test_api/models/nac_tag'
39
- require_relative 'cypress_test_api/models/item_response'
40
- require_relative 'cypress_test_api/models/message2'
41
- require_relative 'cypress_test_api/models/tokens_request'
42
- require_relative 'cypress_test_api/models/o_auth_scope_o_auth_acg_enum'
43
- require_relative 'cypress_test_api/models/status_enum'
44
- require_relative 'cypress_test_api/models/status11_enum'
45
- require_relative 'cypress_test_api/models/custom_enum'
46
- require_relative 'cypress_test_api/models/status1_enum'
47
-
48
- # Exceptions
49
- require_relative 'cypress_test_api/exceptions/api_exception'
50
-
51
- require_relative 'cypress_test_api/configuration'
52
-
53
- # Controllers
54
- require_relative 'cypress_test_api/controllers/base_controller'
55
- require_relative 'cypress_test_api/controllers/api_controller'
@@ -1,40 +0,0 @@
1
- # cypress_test_api
2
- #
3
- # This file was automatically generated by APIMATIC v3.0
4
- # ( https://www.apimatic.io ).
5
-
6
- require_relative 'controller_test_base'
7
-
8
- class APIControllerTest < ControllerTestBase
9
- # Called only once for the class before any test has executed
10
- def setup
11
- setup_class
12
- @controller = @client.client
13
- @response_catcher = @controller.http_call_back
14
- end
15
-
16
- # Generates a new OAuth token with the specified scopes.
17
- def test_create_o_auth_token
18
- # Parameters for the API call
19
- body = nil
20
-
21
- # Perform the API call through the SDK function
22
- @controller.create_o_auth_token(body: body)
23
-
24
- # Test response code
25
- assert_equal(201, @response_catcher.response.status_code)
26
- end
27
-
28
- # This endpoint accepts a complex structure with multiple arrays.
29
- def test_test_endpointwith_arrays
30
- # Parameters for the API call
31
- body = nil
32
-
33
- # Perform the API call through the SDK function
34
- @controller.test_endpointwith_arrays(body: body)
35
-
36
- # Test response code
37
- assert_equal(200, @response_catcher.response.status_code)
38
- end
39
-
40
- end