sdksio-apimatic-sdk 3.0.0 → 3.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 +165 -77
- data/bin/console +15 -0
- data/lib/apimatic_api/api_helper.rb +10 -10
- data/lib/apimatic_api/client.rb +108 -96
- data/lib/apimatic_api/configuration.rb +198 -125
- data/lib/apimatic_api/controllers/api_validation_external_apis_controller.rb +90 -84
- data/lib/apimatic_api/controllers/api_validation_v2_external_apis_controller.rb +89 -0
- data/lib/apimatic_api/controllers/base_controller.rb +55 -66
- data/lib/apimatic_api/controllers/code_generation_external_apis_controller.rb +201 -178
- data/lib/apimatic_api/controllers/docs_portal_generation_async_controller.rb +110 -0
- data/lib/apimatic_api/controllers/docs_portal_management_controller.rb +56 -198
- data/lib/apimatic_api/controllers/sdk_generation_async_controller.rb +112 -0
- data/lib/apimatic_api/controllers/transformation_controller.rb +180 -174
- data/lib/apimatic_api/exceptions/api_exception.rb +21 -10
- data/lib/apimatic_api/exceptions/bad_request_response_sdk_exception.rb +46 -0
- data/lib/apimatic_api/exceptions/internal_server_error_response_exception.rb +46 -0
- data/lib/apimatic_api/exceptions/problem_details_exception.rb +74 -0
- data/lib/apimatic_api/exceptions/unauthorized_response_exception.rb +46 -0
- data/lib/apimatic_api/http/api_response.rb +19 -0
- data/lib/apimatic_api/http/auth/custom_header_authentication.rb +48 -38
- data/lib/apimatic_api/http/http_call_back.rb +10 -10
- data/lib/apimatic_api/http/http_method_enum.rb +10 -10
- data/lib/apimatic_api/http/http_request.rb +10 -10
- data/lib/apimatic_api/http/http_response.rb +10 -10
- data/lib/apimatic_api/http/proxy_settings.rb +22 -0
- data/lib/apimatic_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/apimatic_api/logging/sdk_logger.rb +17 -0
- data/lib/apimatic_api/models/accept.rb +26 -0
- data/lib/apimatic_api/models/api_validation_summary.rb +100 -75
- data/lib/apimatic_api/models/base_model.rb +110 -62
- data/lib/apimatic_api/models/content_type.rb +26 -0
- data/lib/apimatic_api/models/export_formats.rb +85 -60
- data/lib/apimatic_api/models/generate_sdk_via_url_request.rb +85 -59
- data/lib/apimatic_api/models/line_info.rb +105 -0
- data/lib/apimatic_api/models/links.rb +82 -0
- data/lib/apimatic_api/models/platforms.rb +57 -39
- data/lib/apimatic_api/models/portal_generation_async_response.rb +68 -0
- data/lib/apimatic_api/models/portal_generation_status_response.rb +70 -0
- data/lib/apimatic_api/models/sdk_generation_async_response.rb +68 -0
- data/lib/apimatic_api/models/sdk_generation_status_response.rb +70 -0
- data/lib/apimatic_api/models/sdk_languages.rb +56 -0
- data/lib/apimatic_api/models/status.rb +48 -0
- data/lib/apimatic_api/models/transform_via_url_request.rb +85 -60
- data/lib/apimatic_api/models/transformation.rb +180 -152
- data/lib/apimatic_api/models/user_code_generation.rb +167 -140
- data/lib/apimatic_api/models/validate_api_result.rb +82 -0
- data/lib/apimatic_api/models/validation_entry.rb +143 -0
- data/lib/apimatic_api/models/validation_summary.rb +145 -0
- data/lib/apimatic_api/utilities/date_time_helper.rb +11 -11
- data/lib/apimatic_api/utilities/file_wrapper.rb +28 -16
- data/lib/apimatic_api.rb +79 -86
- metadata +39 -89
- data/lib/apimatic_api/controllers/api_validation_imported_apis_controller.rb +0 -74
- data/lib/apimatic_api/controllers/apis_management_controller.rb +0 -260
- data/lib/apimatic_api/controllers/code_generation_imported_apis_controller.rb +0 -136
- data/lib/apimatic_api/models/api_entity.rb +0 -220
- data/lib/apimatic_api/models/api_entity_code_generation.rb +0 -131
- data/lib/apimatic_api/models/api_entity_identifier.rb +0 -48
- data/lib/apimatic_api/models/attributes.rb +0 -48
- data/lib/apimatic_api/models/auth_scope.rb +0 -75
- data/lib/apimatic_api/models/authentication.rb +0 -112
- data/lib/apimatic_api/models/code_gen_settings.rb +0 -541
- data/lib/apimatic_api/models/code_generation.rb +0 -122
- data/lib/apimatic_api/models/docs_validation_summary.rb +0 -75
- data/lib/apimatic_api/models/endpoints_group.rb +0 -57
- data/lib/apimatic_api/models/environment.rb +0 -79
- data/lib/apimatic_api/models/field.rb +0 -156
- data/lib/apimatic_api/models/generate_on_prem_portal_via_build_input_request_body.rb +0 -48
- data/lib/apimatic_api/models/generate_sdk_via_file_request_body.rb +0 -61
- data/lib/apimatic_api/models/import_api_version_via_url_request.rb +0 -64
- data/lib/apimatic_api/models/import_api_via_file_request_body.rb +0 -51
- data/lib/apimatic_api/models/import_api_via_url_request.rb +0 -49
- data/lib/apimatic_api/models/import_new_api_version_via_file_request_body.rb +0 -66
- data/lib/apimatic_api/models/import_validation_summary.rb +0 -75
- data/lib/apimatic_api/models/inplace_api_import_binary_file.rb +0 -51
- data/lib/apimatic_api/models/inplace_import_api_via_url_request.rb +0 -49
- data/lib/apimatic_api/models/meta_data.rb +0 -70
- data/lib/apimatic_api/models/parameter.rb +0 -165
- data/lib/apimatic_api/models/paramter_format_details.rb +0 -48
- data/lib/apimatic_api/models/platforms_template.rb +0 -49
- data/lib/apimatic_api/models/server.rb +0 -69
- data/lib/apimatic_api/models/server_configuration.rb +0 -105
- data/lib/apimatic_api/models/test_gen_settings.rb +0 -70
- data/lib/apimatic_api/models/transform_via_file_request_body.rb +0 -61
- data/lib/apimatic_api/models/user_code_generation_requirements.rb +0 -57
- data/lib/apimatic_api/models/validate_api_via_file_request_body.rb +0 -51
- data/test/controllers/controller_test_base.rb +0 -29
- data/test/controllers/test_api_validation_external_apis_controller.rb +0 -144
- data/test/controllers/test_api_validation_imported_apis_controller.rb +0 -2971
- data/test/controllers/test_code_generation_external_apis_controller.rb +0 -32
- data/test/controllers/test_docs_portal_management_controller.rb +0 -94
- data/test/controllers/test_transformation_controller.rb +0 -32
- data/test/http_response_catcher.rb +0 -19
|
@@ -1,39 +1,57 @@
|
|
|
1
|
-
# apimatic_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by APIMATIC
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
module ApimaticApi
|
|
7
|
-
# The structure contains platforms that APIMatic CodeGen can generate SDKs and
|
|
8
|
-
# Docs in.
|
|
9
|
-
class Platforms
|
|
10
|
-
PLATFORMS = [
|
|
11
|
-
# .NET Standard Library
|
|
12
|
-
CS_NET_STANDARD_LIB = 'CS_NET_STANDARD_LIB'.freeze,
|
|
13
|
-
|
|
14
|
-
# JAVA
|
|
15
|
-
JAVA_ECLIPSE_JRE_LIB = 'JAVA_ECLIPSE_JRE_LIB'.freeze,
|
|
16
|
-
|
|
17
|
-
# PHP
|
|
18
|
-
PHP_GENERIC_LIB_V2 = '
|
|
19
|
-
|
|
20
|
-
# Python
|
|
21
|
-
PYTHON_GENERIC_LIB = 'PYTHON_GENERIC_LIB'.freeze,
|
|
22
|
-
|
|
23
|
-
# Ruby
|
|
24
|
-
RUBY_GENERIC_LIB = 'RUBY_GENERIC_LIB'.freeze,
|
|
25
|
-
|
|
26
|
-
# Typescript
|
|
27
|
-
TS_GENERIC_LIB = 'TS_GENERIC_LIB'.freeze,
|
|
28
|
-
|
|
29
|
-
# Go
|
|
30
|
-
GO_GENERIC_LIB = 'GO_GENERIC_LIB'.freeze
|
|
31
|
-
].freeze
|
|
32
|
-
|
|
33
|
-
def self.validate(value)
|
|
34
|
-
return false if value.nil?
|
|
35
|
-
|
|
36
|
-
PLATFORMS.include?(value)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# The structure contains platforms that APIMatic CodeGen can generate SDKs and
|
|
8
|
+
# Docs in.
|
|
9
|
+
class Platforms
|
|
10
|
+
PLATFORMS = [
|
|
11
|
+
# .NET Standard Library
|
|
12
|
+
CS_NET_STANDARD_LIB = 'CS_NET_STANDARD_LIB'.freeze,
|
|
13
|
+
|
|
14
|
+
# JAVA
|
|
15
|
+
JAVA_ECLIPSE_JRE_LIB = 'JAVA_ECLIPSE_JRE_LIB'.freeze,
|
|
16
|
+
|
|
17
|
+
# PHP
|
|
18
|
+
PHP_GENERIC_LIB_V2 = 'PHP_GENERIC_LIB_V2'.freeze,
|
|
19
|
+
|
|
20
|
+
# Python
|
|
21
|
+
PYTHON_GENERIC_LIB = 'PYTHON_GENERIC_LIB'.freeze,
|
|
22
|
+
|
|
23
|
+
# Ruby
|
|
24
|
+
RUBY_GENERIC_LIB = 'RUBY_GENERIC_LIB'.freeze,
|
|
25
|
+
|
|
26
|
+
# Typescript
|
|
27
|
+
TS_GENERIC_LIB = 'TS_GENERIC_LIB'.freeze,
|
|
28
|
+
|
|
29
|
+
# Go
|
|
30
|
+
GO_GENERIC_LIB = 'GO_GENERIC_LIB'.freeze
|
|
31
|
+
].freeze
|
|
32
|
+
|
|
33
|
+
def self.validate(value)
|
|
34
|
+
return false if value.nil?
|
|
35
|
+
|
|
36
|
+
PLATFORMS.include?(value)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.from_value(value, default_value = CS_NET_STANDARD_LIB)
|
|
40
|
+
return default_value if value.nil?
|
|
41
|
+
|
|
42
|
+
str = value.to_s.strip
|
|
43
|
+
|
|
44
|
+
case str.downcase
|
|
45
|
+
when 'cs_net_standard_lib' then CS_NET_STANDARD_LIB
|
|
46
|
+
when 'java_eclipse_jre_lib' then JAVA_ECLIPSE_JRE_LIB
|
|
47
|
+
when 'php_generic_lib_v2' then PHP_GENERIC_LIB_V2
|
|
48
|
+
when 'python_generic_lib' then PYTHON_GENERIC_LIB
|
|
49
|
+
when 'ruby_generic_lib' then RUBY_GENERIC_LIB
|
|
50
|
+
when 'ts_generic_lib' then TS_GENERIC_LIB
|
|
51
|
+
when 'go_generic_lib' then GO_GENERIC_LIB
|
|
52
|
+
else
|
|
53
|
+
default_value
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# PortalGenerationAsyncResponse Model.
|
|
8
|
+
class PortalGenerationAsyncResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [UUID | String]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Links]
|
|
18
|
+
attr_accessor :links
|
|
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['links'] = 'links'
|
|
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:, links:)
|
|
39
|
+
@id = id
|
|
40
|
+
@links = links
|
|
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
|
+
links = Links.from_hash(hash['links']) if hash['links']
|
|
50
|
+
|
|
51
|
+
# Create object from extracted values.
|
|
52
|
+
PortalGenerationAsyncResponse.new(id: id,
|
|
53
|
+
links: links)
|
|
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}, links: #{@links}>"
|
|
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}, links: #{@links.inspect}>"
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# PortalGenerationStatusResponse Model.
|
|
8
|
+
class PortalGenerationStatusResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Status]
|
|
14
|
+
attr_accessor :status
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Hash[String, Object]]
|
|
18
|
+
attr_accessor :errors
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['status'] = 'status'
|
|
24
|
+
@_hash['errors'] = 'errors'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
errors
|
|
32
|
+
]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for nullable fields
|
|
36
|
+
def self.nullables
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(status:, errors: SKIP)
|
|
41
|
+
@status = status
|
|
42
|
+
@errors = errors unless errors == 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
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
51
|
+
errors = hash.key?('errors') ? hash['errors'] : SKIP
|
|
52
|
+
|
|
53
|
+
# Create object from extracted values.
|
|
54
|
+
PortalGenerationStatusResponse.new(status: status,
|
|
55
|
+
errors: errors)
|
|
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} status: #{@status}, errors: #{@errors}>"
|
|
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} status: #{@status.inspect}, errors: #{@errors.inspect}>"
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# SdkGenerationAsyncResponse Model.
|
|
8
|
+
class SdkGenerationAsyncResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [UUID | String]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Links]
|
|
18
|
+
attr_accessor :links
|
|
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['links'] = 'links'
|
|
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:, links:)
|
|
39
|
+
@id = id
|
|
40
|
+
@links = links
|
|
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
|
+
links = Links.from_hash(hash['links']) if hash['links']
|
|
50
|
+
|
|
51
|
+
# Create object from extracted values.
|
|
52
|
+
SdkGenerationAsyncResponse.new(id: id,
|
|
53
|
+
links: links)
|
|
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}, links: #{@links}>"
|
|
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}, links: #{@links.inspect}>"
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# SdkGenerationStatusResponse Model.
|
|
8
|
+
class SdkGenerationStatusResponse < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# TODO: Write general description for this method
|
|
13
|
+
# @return [Status]
|
|
14
|
+
attr_accessor :status
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for this method
|
|
17
|
+
# @return [Hash[String, Object]]
|
|
18
|
+
attr_accessor :errors
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['status'] = 'status'
|
|
24
|
+
@_hash['errors'] = 'errors'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
errors
|
|
32
|
+
]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# An array for nullable fields
|
|
36
|
+
def self.nullables
|
|
37
|
+
[]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def initialize(status:, errors: SKIP)
|
|
41
|
+
@status = status
|
|
42
|
+
@errors = errors unless errors == 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
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
51
|
+
errors = hash.key?('errors') ? hash['errors'] : SKIP
|
|
52
|
+
|
|
53
|
+
# Create object from extracted values.
|
|
54
|
+
SdkGenerationStatusResponse.new(status: status,
|
|
55
|
+
errors: errors)
|
|
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} status: #{@status}, errors: #{@errors}>"
|
|
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} status: #{@status.inspect}, errors: #{@errors.inspect}>"
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
end
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# Languages for which SDKs can be generated.
|
|
8
|
+
class SdkLanguages
|
|
9
|
+
SDK_LANGUAGES = [
|
|
10
|
+
# C#
|
|
11
|
+
CSHARP = 'csharp'.freeze,
|
|
12
|
+
|
|
13
|
+
# Java
|
|
14
|
+
JAVA = 'java'.freeze,
|
|
15
|
+
|
|
16
|
+
# PHP
|
|
17
|
+
PHP = 'php'.freeze,
|
|
18
|
+
|
|
19
|
+
# Python
|
|
20
|
+
PYTHON = 'python'.freeze,
|
|
21
|
+
|
|
22
|
+
# Ruby
|
|
23
|
+
RUBY = 'ruby'.freeze,
|
|
24
|
+
|
|
25
|
+
# Typescript
|
|
26
|
+
TYPESCRIPT = 'typescript'.freeze,
|
|
27
|
+
|
|
28
|
+
# Go
|
|
29
|
+
GO = 'go'.freeze
|
|
30
|
+
].freeze
|
|
31
|
+
|
|
32
|
+
def self.validate(value)
|
|
33
|
+
return false if value.nil?
|
|
34
|
+
|
|
35
|
+
SDK_LANGUAGES.include?(value)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.from_value(value, default_value = CSHARP)
|
|
39
|
+
return default_value if value.nil?
|
|
40
|
+
|
|
41
|
+
str = value.to_s.strip
|
|
42
|
+
|
|
43
|
+
case str.downcase
|
|
44
|
+
when 'csharp' then CSHARP
|
|
45
|
+
when 'java' then JAVA
|
|
46
|
+
when 'php' then PHP
|
|
47
|
+
when 'python' then PYTHON
|
|
48
|
+
when 'ruby' then RUBY
|
|
49
|
+
when 'typescript' then TYPESCRIPT
|
|
50
|
+
when 'go' then GO
|
|
51
|
+
else
|
|
52
|
+
default_value
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# Status.
|
|
8
|
+
class Status
|
|
9
|
+
STATUS = [
|
|
10
|
+
# TODO: Write general description for COMPLETED
|
|
11
|
+
COMPLETED = 'Completed'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for INPROGRESS
|
|
14
|
+
INPROGRESS = 'InProgress'.freeze,
|
|
15
|
+
|
|
16
|
+
# TODO: Write general description for VALIDATIONERROR
|
|
17
|
+
VALIDATIONERROR = 'ValidationError'.freeze,
|
|
18
|
+
|
|
19
|
+
# TODO: Write general description for SUBSCRIPTIONERROR
|
|
20
|
+
SUBSCRIPTIONERROR = 'SubscriptionError'.freeze,
|
|
21
|
+
|
|
22
|
+
# TODO: Write general description for FAILED
|
|
23
|
+
FAILED = 'Failed'.freeze
|
|
24
|
+
].freeze
|
|
25
|
+
|
|
26
|
+
def self.validate(value)
|
|
27
|
+
return false if value.nil?
|
|
28
|
+
|
|
29
|
+
STATUS.include?(value)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.from_value(value, default_value = COMPLETED)
|
|
33
|
+
return default_value if value.nil?
|
|
34
|
+
|
|
35
|
+
str = value.to_s.strip
|
|
36
|
+
|
|
37
|
+
case str.downcase
|
|
38
|
+
when 'completed' then COMPLETED
|
|
39
|
+
when 'inprogress' then INPROGRESS
|
|
40
|
+
when 'validationerror' then VALIDATIONERROR
|
|
41
|
+
when 'subscriptionerror' then SUBSCRIPTIONERROR
|
|
42
|
+
when 'failed' then FAILED
|
|
43
|
+
else
|
|
44
|
+
default_value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -1,60 +1,85 @@
|
|
|
1
|
-
# apimatic_api
|
|
2
|
-
#
|
|
3
|
-
# This file was automatically generated by APIMATIC
|
|
4
|
-
#
|
|
5
|
-
|
|
6
|
-
module ApimaticApi
|
|
7
|
-
# This structure puts together the URL of the file to be transformed, along
|
|
8
|
-
# with the desired export format.
|
|
9
|
-
class TransformViaUrlRequest < BaseModel
|
|
10
|
-
SKIP = Object.new
|
|
11
|
-
private_constant :SKIP
|
|
12
|
-
|
|
13
|
-
# The URL for the API specification file.<br><br>**Note:** This URL should
|
|
14
|
-
# be publicly accessible.
|
|
15
|
-
# @return [String]
|
|
16
|
-
attr_accessor :url
|
|
17
|
-
|
|
18
|
-
# The structure contains API specification formats that Transformer can
|
|
19
|
-
# convert to.
|
|
20
|
-
# @return [ExportFormats]
|
|
21
|
-
attr_accessor :export_format
|
|
22
|
-
|
|
23
|
-
# A mapping from model property names to API property names.
|
|
24
|
-
def self.names
|
|
25
|
-
@_hash = {} if @_hash.nil?
|
|
26
|
-
@_hash['url'] = 'url'
|
|
27
|
-
@_hash['export_format'] = 'export_format'
|
|
28
|
-
@_hash
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# An array for optional fields
|
|
32
|
-
def self.optionals
|
|
33
|
-
[]
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# An array for nullable fields
|
|
37
|
-
def self.nullables
|
|
38
|
-
[]
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def initialize(url
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
1
|
+
# apimatic_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module ApimaticApi
|
|
7
|
+
# This structure puts together the URL of the file to be transformed, along
|
|
8
|
+
# with the desired export format.
|
|
9
|
+
class TransformViaUrlRequest < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The URL for the API specification file.<br><br>**Note:** This URL should
|
|
14
|
+
# be publicly accessible.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :url
|
|
17
|
+
|
|
18
|
+
# The structure contains API specification formats that Transformer can
|
|
19
|
+
# convert to.
|
|
20
|
+
# @return [ExportFormats]
|
|
21
|
+
attr_accessor :export_format
|
|
22
|
+
|
|
23
|
+
# A mapping from model property names to API property names.
|
|
24
|
+
def self.names
|
|
25
|
+
@_hash = {} if @_hash.nil?
|
|
26
|
+
@_hash['url'] = 'url'
|
|
27
|
+
@_hash['export_format'] = 'export_format'
|
|
28
|
+
@_hash
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# An array for optional fields
|
|
32
|
+
def self.optionals
|
|
33
|
+
[]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(url:, export_format:, additional_properties: nil)
|
|
42
|
+
# Add additional model properties to the instance
|
|
43
|
+
additional_properties = {} if additional_properties.nil?
|
|
44
|
+
|
|
45
|
+
@url = url
|
|
46
|
+
@export_format = export_format
|
|
47
|
+
@additional_properties = additional_properties
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
url = hash.key?('url') ? hash['url'] : nil
|
|
56
|
+
export_format = hash.key?('export_format') ? hash['export_format'] : nil
|
|
57
|
+
|
|
58
|
+
# Create a new hash for additional properties, removing known properties.
|
|
59
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
60
|
+
|
|
61
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
62
|
+
new_hash, proc { |value| value }
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# Create object from extracted values.
|
|
66
|
+
TransformViaUrlRequest.new(url: url,
|
|
67
|
+
export_format: export_format,
|
|
68
|
+
additional_properties: additional_properties)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Provides a human-readable string representation of the object.
|
|
72
|
+
def to_s
|
|
73
|
+
class_name = self.class.name.split('::').last
|
|
74
|
+
"<#{class_name} url: #{@url}, export_format: #{@export_format}, additional_properties:"\
|
|
75
|
+
" #{@additional_properties}>"
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
79
|
+
def inspect
|
|
80
|
+
class_name = self.class.name.split('::').last
|
|
81
|
+
"<#{class_name} url: #{@url.inspect}, export_format: #{@export_format.inspect},"\
|
|
82
|
+
" additional_properties: #{@additional_properties}>"
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|