wesley-key-sdk 1.1.3 → 2.0.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.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +110 -18
- data/bin/console +15 -0
- data/lib/{cypress_test_api → swagger_petstore}/api_helper.rb +2 -2
- data/lib/swagger_petstore/client.rb +95 -0
- data/lib/swagger_petstore/configuration.rb +197 -0
- data/lib/{cypress_test_api → swagger_petstore}/controllers/base_controller.rb +2 -2
- data/lib/swagger_petstore/controllers/pet_controller.rb +206 -0
- data/lib/swagger_petstore/controllers/store_controller.rb +94 -0
- data/lib/swagger_petstore/controllers/user_controller.rb +165 -0
- data/lib/{cypress_test_api → swagger_petstore}/exceptions/api_exception.rb +2 -2
- data/lib/swagger_petstore/exceptions/o_auth_provider_exception.rb +64 -0
- data/lib/swagger_petstore/http/auth/api_key.rb +52 -0
- data/lib/swagger_petstore/http/auth/http_basic.rb +62 -0
- data/lib/swagger_petstore/http/auth/petstore_auth.rb +113 -0
- data/lib/{cypress_test_api → swagger_petstore}/http/http_call_back.rb +2 -2
- data/lib/{cypress_test_api → swagger_petstore}/http/http_method_enum.rb +2 -2
- data/lib/{cypress_test_api → swagger_petstore}/http/http_request.rb +2 -2
- data/lib/{cypress_test_api → swagger_petstore}/http/http_response.rb +2 -2
- data/lib/swagger_petstore/http/proxy_settings.rb +22 -0
- data/lib/{cypress_test_api/models/message2.rb → swagger_petstore/models/api_response.rb} +24 -14
- data/lib/{cypress_test_api → swagger_petstore}/models/base_model.rb +2 -2
- data/lib/{cypress_test_api/models/item_response.rb → swagger_petstore/models/category.rb} +10 -19
- data/lib/{cypress_test_api/models/deer.rb → swagger_petstore/models/category2.rb} +21 -18
- data/lib/swagger_petstore/models/content_type_enum.rb +26 -0
- data/lib/swagger_petstore/models/o_auth_provider_error_enum.rb +62 -0
- data/lib/swagger_petstore/models/o_auth_scope_petstore_auth_enum.rb +36 -0
- data/lib/swagger_petstore/models/o_auth_token.rb +96 -0
- data/lib/swagger_petstore/models/order.rb +120 -0
- data/lib/swagger_petstore/models/pet.rb +117 -0
- data/lib/swagger_petstore/models/pet_request.rb +117 -0
- data/lib/swagger_petstore/models/status1_enum.rb +40 -0
- data/lib/swagger_petstore/models/status2_enum.rb +40 -0
- data/lib/swagger_petstore/models/status_enum.rb +40 -0
- data/lib/swagger_petstore/models/store_order_request.rb +120 -0
- data/lib/{cypress_test_api/models/response_http404.rb → swagger_petstore/models/tag.rb} +18 -9
- data/lib/swagger_petstore/models/user.rb +132 -0
- data/lib/swagger_petstore/models/user_request.rb +132 -0
- data/lib/{cypress_test_api → swagger_petstore}/utilities/date_time_helper.rb +2 -2
- data/lib/{cypress_test_api → swagger_petstore}/utilities/file_wrapper.rb +2 -2
- data/lib/swagger_petstore.rb +62 -0
- data/test/controllers/controller_test_base.rb +14 -11
- data/test/controllers/test_store_controller.rb +31 -0
- data/test/http_response_catcher.rb +2 -2
- metadata +46 -38
- data/lib/cypress_test_api/client.rb +0 -47
- data/lib/cypress_test_api/configuration.rb +0 -103
- data/lib/cypress_test_api/controllers/api_controller.rb +0 -102
- data/lib/cypress_test_api/http/proxy_settings.rb +0 -13
- data/lib/cypress_test_api/models/custom_enum.rb +0 -26
- data/lib/cypress_test_api/models/item.rb +0 -166
- data/lib/cypress_test_api/models/lion.rb +0 -68
- data/lib/cypress_test_api/models/message.rb +0 -68
- data/lib/cypress_test_api/models/multiple_arrays_request.rb +0 -70
- data/lib/cypress_test_api/models/nac_tag.rb +0 -265
- data/lib/cypress_test_api/models/o_auth_scope_o_auth_acg_enum.rb +0 -29
- data/lib/cypress_test_api/models/response_http400.rb +0 -62
- data/lib/cypress_test_api/models/status11_enum.rb +0 -26
- data/lib/cypress_test_api/models/status1_enum.rb +0 -26
- data/lib/cypress_test_api/models/status_enum.rb +0 -26
- data/lib/cypress_test_api/models/tokens_request.rb +0 -60
- data/lib/cypress_test_api.rb +0 -55
- data/test/controllers/test_api_controller.rb +0 -40
|
@@ -1,47 +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
|
-
# cypress_test_api client class.
|
|
8
|
-
class Client
|
|
9
|
-
include CoreLibrary
|
|
10
|
-
attr_reader :config
|
|
11
|
-
|
|
12
|
-
# Access to client controller.
|
|
13
|
-
# @return [APIController] Returns the controller instance.
|
|
14
|
-
def client
|
|
15
|
-
@client ||= APIController.new @global_configuration
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def initialize(
|
|
19
|
-
connection: nil, adapter: :net_http_persistent, timeout: 60,
|
|
20
|
-
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
|
21
|
-
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
|
22
|
-
retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
|
|
23
|
-
environment: Environment::PRODUCTION, default_host: 'www.example.com',
|
|
24
|
-
config: nil
|
|
25
|
-
)
|
|
26
|
-
@config = if config.nil?
|
|
27
|
-
Configuration.new(connection: connection, adapter: adapter,
|
|
28
|
-
timeout: timeout, max_retries: max_retries,
|
|
29
|
-
retry_interval: retry_interval,
|
|
30
|
-
backoff_factor: backoff_factor,
|
|
31
|
-
retry_statuses: retry_statuses,
|
|
32
|
-
retry_methods: retry_methods,
|
|
33
|
-
http_callback: http_callback,
|
|
34
|
-
proxy_settings: proxy_settings,
|
|
35
|
-
environment: environment,
|
|
36
|
-
default_host: default_host)
|
|
37
|
-
else
|
|
38
|
-
config
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
@global_configuration = GlobalConfiguration.new(client_configuration: @config)
|
|
42
|
-
.base_uri_executor(@config.method(:get_base_uri))
|
|
43
|
-
.global_errors(BaseController::GLOBAL_ERRORS)
|
|
44
|
-
.user_agent(BaseController.user_agent)
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
@@ -1,103 +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
|
-
# An enum for SDK environments.
|
|
8
|
-
class Environment
|
|
9
|
-
ENVIRONMENT = [
|
|
10
|
-
PRODUCTION = 'production'.freeze
|
|
11
|
-
].freeze
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
# An enum for API servers.
|
|
15
|
-
class Server
|
|
16
|
-
SERVER = [
|
|
17
|
-
DEFAULT = 'default'.freeze
|
|
18
|
-
].freeze
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
# All configuration including auth info and base URI for the API access
|
|
22
|
-
# are configured in this class.
|
|
23
|
-
class Configuration < CoreLibrary::HttpClientConfiguration
|
|
24
|
-
# The attribute readers for properties.
|
|
25
|
-
attr_reader :environment, :default_host
|
|
26
|
-
|
|
27
|
-
class << self
|
|
28
|
-
attr_reader :environments
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def initialize(
|
|
32
|
-
connection: nil, adapter: :net_http_persistent, timeout: 60,
|
|
33
|
-
max_retries: 0, retry_interval: 1, backoff_factor: 2,
|
|
34
|
-
retry_statuses: [408, 413, 429, 500, 502, 503, 504, 521, 522, 524],
|
|
35
|
-
retry_methods: %i[get put], http_callback: nil, proxy_settings: nil,
|
|
36
|
-
environment: Environment::PRODUCTION, default_host: 'www.example.com'
|
|
37
|
-
)
|
|
38
|
-
super connection: connection, adapter: adapter, timeout: timeout,
|
|
39
|
-
max_retries: max_retries, retry_interval: retry_interval,
|
|
40
|
-
backoff_factor: backoff_factor, retry_statuses: retry_statuses,
|
|
41
|
-
retry_methods: retry_methods, http_callback: http_callback,
|
|
42
|
-
proxy_settings: proxy_settings
|
|
43
|
-
|
|
44
|
-
# Current API environment
|
|
45
|
-
@environment = String(environment)
|
|
46
|
-
|
|
47
|
-
# defaultHost value
|
|
48
|
-
@default_host = default_host
|
|
49
|
-
|
|
50
|
-
# The Http Client to use for making requests.
|
|
51
|
-
set_http_client CoreLibrary::FaradayClient.new(self)
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def clone_with(connection: nil, adapter: nil, timeout: nil,
|
|
55
|
-
max_retries: nil, retry_interval: nil, backoff_factor: nil,
|
|
56
|
-
retry_statuses: nil, retry_methods: nil, http_callback: nil,
|
|
57
|
-
proxy_settings: nil, environment: nil, default_host: nil)
|
|
58
|
-
connection ||= self.connection
|
|
59
|
-
adapter ||= self.adapter
|
|
60
|
-
timeout ||= self.timeout
|
|
61
|
-
max_retries ||= self.max_retries
|
|
62
|
-
retry_interval ||= self.retry_interval
|
|
63
|
-
backoff_factor ||= self.backoff_factor
|
|
64
|
-
retry_statuses ||= self.retry_statuses
|
|
65
|
-
retry_methods ||= self.retry_methods
|
|
66
|
-
http_callback ||= self.http_callback
|
|
67
|
-
proxy_settings ||= self.proxy_settings
|
|
68
|
-
environment ||= self.environment
|
|
69
|
-
default_host ||= self.default_host
|
|
70
|
-
|
|
71
|
-
Configuration.new(connection: connection, adapter: adapter,
|
|
72
|
-
timeout: timeout, max_retries: max_retries,
|
|
73
|
-
retry_interval: retry_interval,
|
|
74
|
-
backoff_factor: backoff_factor,
|
|
75
|
-
retry_statuses: retry_statuses,
|
|
76
|
-
retry_methods: retry_methods,
|
|
77
|
-
http_callback: http_callback,
|
|
78
|
-
proxy_settings: proxy_settings,
|
|
79
|
-
environment: environment, default_host: default_host)
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
# All the environments the SDK can run in.
|
|
84
|
-
ENVIRONMENTS = {
|
|
85
|
-
Environment::PRODUCTION => {
|
|
86
|
-
Server::DEFAULT => 'https://{defaultHost}'
|
|
87
|
-
}
|
|
88
|
-
}.freeze
|
|
89
|
-
|
|
90
|
-
# Generates the appropriate base URI for the environment and the server.
|
|
91
|
-
# @param [Configuration::Server] server The server enum for which the base URI is
|
|
92
|
-
# required.
|
|
93
|
-
# @return [String] The base URI.
|
|
94
|
-
def get_base_uri(server = Server::DEFAULT)
|
|
95
|
-
parameters = {
|
|
96
|
-
'defaultHost' => { 'value' => default_host, 'encode' => false }
|
|
97
|
-
}
|
|
98
|
-
APIHelper.append_url_with_template_parameters(
|
|
99
|
-
ENVIRONMENTS[environment][server], parameters
|
|
100
|
-
)
|
|
101
|
-
end
|
|
102
|
-
end
|
|
103
|
-
end
|
|
@@ -1,102 +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
|
-
# APIController
|
|
8
|
-
class APIController < BaseController
|
|
9
|
-
# Creates a new resource in the system.
|
|
10
|
-
# @param [Status11Enum] status Required parameter: The status of the items
|
|
11
|
-
# to filter by.
|
|
12
|
-
# @param [Item] body Optional parameter: Custom model with additional
|
|
13
|
-
# properties
|
|
14
|
-
# @return [Object] Response from the API call.
|
|
15
|
-
def createanitem(status,
|
|
16
|
-
body: nil)
|
|
17
|
-
@api_call
|
|
18
|
-
.request(new_request_builder(HttpMethodEnum::POST,
|
|
19
|
-
'/items/{status}',
|
|
20
|
-
Server::DEFAULT)
|
|
21
|
-
.template_param(new_parameter(status, key: 'status')
|
|
22
|
-
.should_encode(true))
|
|
23
|
-
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
24
|
-
.body_param(new_parameter(body))
|
|
25
|
-
.header_param(new_parameter('application/json', key: 'accept'))
|
|
26
|
-
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
27
|
-
.response(new_response_handler
|
|
28
|
-
.deserializer(APIHelper.method(:json_deserialize))
|
|
29
|
-
.local_error('400',
|
|
30
|
-
'Bad Syntax',
|
|
31
|
-
APIException)
|
|
32
|
-
.local_error('401',
|
|
33
|
-
'Unauthorized',
|
|
34
|
-
APIException)
|
|
35
|
-
.local_error('403',
|
|
36
|
-
'Permission Denied',
|
|
37
|
-
APIException))
|
|
38
|
-
.execute
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
# TODO: type endpoint description here
|
|
42
|
-
# @param [String] id Required parameter: The ID of the item to retrieve
|
|
43
|
-
# @param [String] value Required parameter: The value of the item to
|
|
44
|
-
# retrieve
|
|
45
|
-
# @return [Item] Response from the API call.
|
|
46
|
-
def getanitemby_id(id,
|
|
47
|
-
value)
|
|
48
|
-
@api_call
|
|
49
|
-
.request(new_request_builder(HttpMethodEnum::GET,
|
|
50
|
-
'/items/{id}',
|
|
51
|
-
Server::DEFAULT)
|
|
52
|
-
.template_param(new_parameter(id, key: 'id')
|
|
53
|
-
.should_encode(true))
|
|
54
|
-
.query_param(new_parameter(value, key: 'value'))
|
|
55
|
-
.header_param(new_parameter('application/json', key: 'accept')))
|
|
56
|
-
.response(new_response_handler
|
|
57
|
-
.deserializer(APIHelper.method(:custom_type_deserializer))
|
|
58
|
-
.deserialize_into(Item.method(:from_hash)))
|
|
59
|
-
.execute
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# Generates a new OAuth token with the specified scopes.
|
|
63
|
-
# @param [TokensRequest] body Optional parameter: TODO: type description
|
|
64
|
-
# here
|
|
65
|
-
# @return [void] Response from the API call.
|
|
66
|
-
def create_o_auth_token(body: nil)
|
|
67
|
-
@api_call
|
|
68
|
-
.request(new_request_builder(HttpMethodEnum::POST,
|
|
69
|
-
'/tokens',
|
|
70
|
-
Server::DEFAULT)
|
|
71
|
-
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
72
|
-
.body_param(new_parameter(body))
|
|
73
|
-
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
74
|
-
.response(new_response_handler
|
|
75
|
-
.is_response_void(true)
|
|
76
|
-
.local_error('400',
|
|
77
|
-
'Bad request',
|
|
78
|
-
APIException))
|
|
79
|
-
.execute
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
# This endpoint accepts a complex structure with multiple arrays.
|
|
83
|
-
# @param [MultipleArraysRequest] body Optional parameter: TODO: type
|
|
84
|
-
# description here
|
|
85
|
-
# @return [void] Response from the API call.
|
|
86
|
-
def test_endpointwith_arrays(body: nil)
|
|
87
|
-
@api_call
|
|
88
|
-
.request(new_request_builder(HttpMethodEnum::POST,
|
|
89
|
-
'/multiple-arrays',
|
|
90
|
-
Server::DEFAULT)
|
|
91
|
-
.header_param(new_parameter('application/json', key: 'Content-Type'))
|
|
92
|
-
.body_param(new_parameter(body))
|
|
93
|
-
.body_serializer(proc do |param| param.to_json unless param.nil? end))
|
|
94
|
-
.response(new_response_handler
|
|
95
|
-
.is_response_void(true)
|
|
96
|
-
.local_error('400',
|
|
97
|
-
'Bad request',
|
|
98
|
-
APIException))
|
|
99
|
-
.execute
|
|
100
|
-
end
|
|
101
|
-
end
|
|
102
|
-
end
|
|
@@ -1,13 +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
|
-
##
|
|
8
|
-
# ProxySettings encapsulates HTTP proxy configuration for Faraday,
|
|
9
|
-
# including optional basic authentication.
|
|
10
|
-
#
|
|
11
|
-
class ProxySettings < CoreLibrary::ProxySettings
|
|
12
|
-
end
|
|
13
|
-
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
|
-
# CustomEnum.
|
|
8
|
-
class CustomEnum
|
|
9
|
-
CUSTOM_ENUM = [
|
|
10
|
-
# TODO: Write general description for VALUE1
|
|
11
|
-
VALUE1 = 'VALUE1'.freeze,
|
|
12
|
-
|
|
13
|
-
# TODO: Write general description for VALUE2
|
|
14
|
-
VALUE2 = 'VALUE2'.freeze,
|
|
15
|
-
|
|
16
|
-
# TODO: Write general description for VALUE3
|
|
17
|
-
VALUE3 = 'VALUE3'.freeze
|
|
18
|
-
].freeze
|
|
19
|
-
|
|
20
|
-
def self.validate(value)
|
|
21
|
-
return false if value.nil?
|
|
22
|
-
|
|
23
|
-
CUSTOM_ENUM.include?(value)
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
@@ -1,166 +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
|
-
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,68 +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
|
-
# 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
|
|
@@ -1,68 +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
|
-
# 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,70 +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
|
-
# 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
|