petstore-test-18052023 1.0.1.pre.alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +193 -0
- data/lib/merged_api/api_helper.rb +10 -0
- data/lib/merged_api/client.rb +97 -0
- data/lib/merged_api/configuration.rb +127 -0
- data/lib/merged_api/controllers/authentication_controller.rb +36 -0
- data/lib/merged_api/controllers/base_controller.rb +65 -0
- data/lib/merged_api/controllers/insured_risk_controller.rb +47 -0
- data/lib/merged_api/controllers/o_auth_authorization_controller.rb +42 -0
- data/lib/merged_api/controllers/policy_controller.rb +66 -0
- data/lib/merged_api/controllers/quoting_controller.rb +41 -0
- data/lib/merged_api/controllers/simple_calculator_controller.rb +33 -0
- data/lib/merged_api/exceptions/api_exception.rb +10 -0
- data/lib/merged_api/exceptions/auth_oauth2_token400_error1_exception.rb +32 -0
- data/lib/merged_api/exceptions/insured_risks400_error1_exception.rb +41 -0
- data/lib/merged_api/exceptions/insured_risks401_error1_exception.rb +32 -0
- data/lib/merged_api/exceptions/insured_risks403_error1_exception.rb +41 -0
- data/lib/merged_api/exceptions/insured_risks415_error1_exception.rb +41 -0
- data/lib/merged_api/exceptions/insured_risks500_error1_exception.rb +41 -0
- data/lib/merged_api/exceptions/o_auth_provider_exception.rb +48 -0
- data/lib/merged_api/exceptions/policies400_error1_exception.rb +41 -0
- data/lib/merged_api/exceptions/policies401_error1_exception.rb +32 -0
- data/lib/merged_api/exceptions/policies403_error1_exception.rb +41 -0
- data/lib/merged_api/exceptions/policies500_error1_exception.rb +41 -0
- data/lib/merged_api/exceptions/quotes400_error1_exception.rb +41 -0
- data/lib/merged_api/exceptions/quotes401_error1_exception.rb +32 -0
- data/lib/merged_api/exceptions/quotes500_error1_exception.rb +41 -0
- data/lib/merged_api/http/auth/o_auth2.rb +63 -0
- data/lib/merged_api/http/http_call_back.rb +10 -0
- data/lib/merged_api/http/http_method_enum.rb +10 -0
- data/lib/merged_api/http/http_request.rb +10 -0
- data/lib/merged_api/http/http_response.rb +10 -0
- data/lib/merged_api/models/accept_enum.rb +14 -0
- data/lib/merged_api/models/additional_insured.rb +68 -0
- data/lib/merged_api/models/additional_interests.rb +68 -0
- data/lib/merged_api/models/agent.rb +48 -0
- data/lib/merged_api/models/agent3.rb +48 -0
- data/lib/merged_api/models/agent6.rb +48 -0
- data/lib/merged_api/models/attributes.rb +87 -0
- data/lib/merged_api/models/attributes1.rb +80 -0
- data/lib/merged_api/models/attributes10.rb +86 -0
- data/lib/merged_api/models/attributes11.rb +137 -0
- data/lib/merged_api/models/attributes12.rb +48 -0
- data/lib/merged_api/models/attributes2.rb +80 -0
- data/lib/merged_api/models/attributes3.rb +412 -0
- data/lib/merged_api/models/attributes4.rb +126 -0
- data/lib/merged_api/models/attributes5.rb +80 -0
- data/lib/merged_api/models/attributes6.rb +422 -0
- data/lib/merged_api/models/attributes9.rb +284 -0
- data/lib/merged_api/models/auth_oauth2_token_response.rb +70 -0
- data/lib/merged_api/models/base_model.rb +58 -0
- data/lib/merged_api/models/billing_address.rb +86 -0
- data/lib/merged_api/models/content_type1_enum.rb +14 -0
- data/lib/merged_api/models/content_type_enum.rb +14 -0
- data/lib/merged_api/models/coverage.rb +48 -0
- data/lib/merged_api/models/coverages.rb +68 -0
- data/lib/merged_api/models/coverages2.rb +57 -0
- data/lib/merged_api/models/coverages3.rb +57 -0
- data/lib/merged_api/models/customer.rb +48 -0
- data/lib/merged_api/models/customer2.rb +48 -0
- data/lib/merged_api/models/customer3.rb +48 -0
- data/lib/merged_api/models/data.rb +77 -0
- data/lib/merged_api/models/data1.rb +57 -0
- data/lib/merged_api/models/data11.rb +57 -0
- data/lib/merged_api/models/data12.rb +57 -0
- data/lib/merged_api/models/data18.rb +57 -0
- data/lib/merged_api/models/data19.rb +57 -0
- data/lib/merged_api/models/data2.rb +57 -0
- data/lib/merged_api/models/data20.rb +57 -0
- data/lib/merged_api/models/data21.rb +57 -0
- data/lib/merged_api/models/data24.rb +87 -0
- data/lib/merged_api/models/data3.rb +75 -0
- data/lib/merged_api/models/data39.rb +66 -0
- data/lib/merged_api/models/data40.rb +58 -0
- data/lib/merged_api/models/data41.rb +58 -0
- data/lib/merged_api/models/data42.rb +58 -0
- data/lib/merged_api/models/data43.rb +57 -0
- data/lib/merged_api/models/data44.rb +57 -0
- data/lib/merged_api/models/data45.rb +76 -0
- data/lib/merged_api/models/data46.rb +57 -0
- data/lib/merged_api/models/data47.rb +57 -0
- data/lib/merged_api/models/data6.rb +66 -0
- data/lib/merged_api/models/data7.rb +57 -0
- data/lib/merged_api/models/data8.rb +57 -0
- data/lib/merged_api/models/data9.rb +76 -0
- data/lib/merged_api/models/endorsement.rb +48 -0
- data/lib/merged_api/models/entity_type_enum.rb +17 -0
- data/lib/merged_api/models/errors.rb +61 -0
- data/lib/merged_api/models/errors1.rb +60 -0
- data/lib/merged_api/models/expires_in_enum.rb +14 -0
- data/lib/merged_api/models/grant_type_enum.rb +14 -0
- data/lib/merged_api/models/included.rb +75 -0
- data/lib/merged_api/models/included1.rb +75 -0
- data/lib/merged_api/models/included3.rb +76 -0
- data/lib/merged_api/models/included31.rb +67 -0
- data/lib/merged_api/models/included32.rb +67 -0
- data/lib/merged_api/models/included4.rb +85 -0
- data/lib/merged_api/models/included41.rb +85 -0
- data/lib/merged_api/models/included42.rb +85 -0
- data/lib/merged_api/models/installment_plan.rb +49 -0
- data/lib/merged_api/models/installment_plan2.rb +85 -0
- data/lib/merged_api/models/insured_risk.rb +48 -0
- data/lib/merged_api/models/insured_risk2.rb +48 -0
- data/lib/merged_api/models/insured_risk3.rb +48 -0
- data/lib/merged_api/models/insured_risks_request.rb +48 -0
- data/lib/merged_api/models/insured_risks_response.rb +48 -0
- data/lib/merged_api/models/mailing_address.rb +86 -0
- data/lib/merged_api/models/meta.rb +50 -0
- data/lib/merged_api/models/o_auth_provider_error_enum.rb +39 -0
- data/lib/merged_api/models/o_auth_token.rb +100 -0
- data/lib/merged_api/models/operation_type_enum.rb +23 -0
- data/lib/merged_api/models/parent.rb +48 -0
- data/lib/merged_api/models/policies_request.rb +48 -0
- data/lib/merged_api/models/policies_response.rb +59 -0
- data/lib/merged_api/models/policies_response1.rb +57 -0
- data/lib/merged_api/models/policy.rb +48 -0
- data/lib/merged_api/models/policy_state2_enum.rb +164 -0
- data/lib/merged_api/models/policy_state_enum.rb +165 -0
- data/lib/merged_api/models/product.rb +49 -0
- data/lib/merged_api/models/product2.rb +49 -0
- data/lib/merged_api/models/product3.rb +48 -0
- data/lib/merged_api/models/product6.rb +50 -0
- data/lib/merged_api/models/product_coverage.rb +48 -0
- data/lib/merged_api/models/quotes_request.rb +57 -0
- data/lib/merged_api/models/quotes_response.rb +57 -0
- data/lib/merged_api/models/relationships.rb +61 -0
- data/lib/merged_api/models/relationships1.rb +59 -0
- data/lib/merged_api/models/relationships10.rb +49 -0
- data/lib/merged_api/models/relationships11.rb +90 -0
- data/lib/merged_api/models/relationships13.rb +48 -0
- data/lib/merged_api/models/relationships14.rb +60 -0
- data/lib/merged_api/models/relationships2.rb +61 -0
- data/lib/merged_api/models/relationships3.rb +127 -0
- data/lib/merged_api/models/relationships4.rb +66 -0
- data/lib/merged_api/models/relationships5.rb +57 -0
- data/lib/merged_api/models/relationships9.rb +81 -0
- data/lib/merged_api/models/state_enum.rb +164 -0
- data/lib/merged_api/models/status2_enum.rb +26 -0
- data/lib/merged_api/models/status_enum.rb +32 -0
- data/lib/merged_api/models/token_type_enum.rb +14 -0
- data/lib/merged_api/utilities/date_time_helper.rb +11 -0
- data/lib/merged_api/utilities/file_wrapper.rb +16 -0
- data/lib/merged_api.rb +165 -0
- data/test/controllers/controller_test_base.rb +33 -0
- data/test/controllers/test_policy_controller.rb +36 -0
- data/test/controllers/test_simple_calculator_controller.rb +34 -0
- data/test/http_response_catcher.rb +19 -0
- metadata +267 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# PolicyController
|
8
|
+
class PolicyController < BaseController
|
9
|
+
# List previously created policies
|
10
|
+
# @param [UUID | String] boost_user Required parameter: UUID that identifies
|
11
|
+
# the user.
|
12
|
+
# @param [ContentType1Enum] accept Optional parameter: Header to indicate
|
13
|
+
# that desired response type is JSON:API.
|
14
|
+
# @return [PoliciesResponse1] response from the API call
|
15
|
+
def list_policies(boost_user,
|
16
|
+
accept: nil)
|
17
|
+
new_api_call_builder
|
18
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
19
|
+
'/policies',
|
20
|
+
Server::DEFAULT)
|
21
|
+
.header_param(new_parameter(boost_user, key: 'Boost-User'))
|
22
|
+
.header_param(new_parameter(accept, key: 'Accept'))
|
23
|
+
.auth(Single.new('global')))
|
24
|
+
.response(new_response_handler
|
25
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
26
|
+
.deserialize_into(PoliciesResponse1.method(:from_hash)))
|
27
|
+
.execute
|
28
|
+
end
|
29
|
+
|
30
|
+
# Issues a new policy with the given the input data. Policy goes in force on
|
31
|
+
# the specified effective_date.
|
32
|
+
# @param [UUID | String] boost_user Required parameter: UUID that identifies
|
33
|
+
# the user.
|
34
|
+
# @param [PoliciesRequest] body Required parameter: Example:
|
35
|
+
# @return [PoliciesResponse] response from the API call
|
36
|
+
def post_policy(boost_user,
|
37
|
+
body)
|
38
|
+
new_api_call_builder
|
39
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
40
|
+
'/policies',
|
41
|
+
Server::DEFAULT)
|
42
|
+
.header_param(new_parameter(boost_user, key: 'Boost-User'))
|
43
|
+
.header_param(new_parameter('application/vnd.api+json', key: 'Content-Type'))
|
44
|
+
.body_param(new_parameter(body))
|
45
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
46
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
47
|
+
.auth(Single.new('global')))
|
48
|
+
.response(new_response_handler
|
49
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
50
|
+
.deserialize_into(PoliciesResponse.method(:from_hash))
|
51
|
+
.local_error('400',
|
52
|
+
'Request is invalid.',
|
53
|
+
Policies400Error1Exception)
|
54
|
+
.local_error('401',
|
55
|
+
'Unauthorized. The bearer authentication failed.',
|
56
|
+
Policies401Error1Exception)
|
57
|
+
.local_error('403',
|
58
|
+
'Forbidden. The operation is not allowed.',
|
59
|
+
Policies403Error1Exception)
|
60
|
+
.local_error('500',
|
61
|
+
'Internal Server Error.',
|
62
|
+
Policies500Error1Exception))
|
63
|
+
.execute
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# QuotingController
|
8
|
+
class QuotingController < BaseController
|
9
|
+
# Issues a new quote.
|
10
|
+
# @param [UUID | String] boost_user Required parameter: Boost provided agent
|
11
|
+
# UUID that identifies the user.
|
12
|
+
# @param [QuotesRequest] body Required parameter: Example:
|
13
|
+
# @return [QuotesResponse] response from the API call
|
14
|
+
def post_quote(boost_user,
|
15
|
+
body)
|
16
|
+
new_api_call_builder
|
17
|
+
.request(new_request_builder(HttpMethodEnum::POST,
|
18
|
+
'/quotes',
|
19
|
+
Server::DEFAULT)
|
20
|
+
.header_param(new_parameter(boost_user, key: 'Boost-User'))
|
21
|
+
.header_param(new_parameter('application/vnd.api+json', key: 'Content-Type'))
|
22
|
+
.body_param(new_parameter(body))
|
23
|
+
.header_param(new_parameter('application/json', key: 'accept'))
|
24
|
+
.body_serializer(proc do |param| param.to_json unless param.nil? end)
|
25
|
+
.auth(Single.new('global')))
|
26
|
+
.response(new_response_handler
|
27
|
+
.deserializer(APIHelper.method(:custom_type_deserializer))
|
28
|
+
.deserialize_into(QuotesResponse.method(:from_hash))
|
29
|
+
.local_error('400',
|
30
|
+
'Request is invalid.',
|
31
|
+
Quotes400Error1Exception)
|
32
|
+
.local_error('401',
|
33
|
+
'Unauthorized. The bearer authentication failed.',
|
34
|
+
Quotes401Error1Exception)
|
35
|
+
.local_error('500',
|
36
|
+
'Internal Server Error.',
|
37
|
+
Quotes500Error1Exception))
|
38
|
+
.execute
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# SimpleCalculatorController
|
8
|
+
class SimpleCalculatorController < BaseController
|
9
|
+
# Calculates the expression using the specified operation.
|
10
|
+
# @param [OperationTypeEnum] operation Required parameter: The operator to
|
11
|
+
# apply on the variables
|
12
|
+
# @param [Float] x Required parameter: The LHS value
|
13
|
+
# @param [Float] y Required parameter: The RHS value
|
14
|
+
# @return [Float] response from the API call
|
15
|
+
def calculate(operation,
|
16
|
+
x,
|
17
|
+
y)
|
18
|
+
new_api_call_builder
|
19
|
+
.request(new_request_builder(HttpMethodEnum::GET,
|
20
|
+
'/{operation}',
|
21
|
+
Server::CALCULATOR)
|
22
|
+
.template_param(new_parameter(operation, key: 'operation')
|
23
|
+
.should_encode(true))
|
24
|
+
.query_param(new_parameter(x, key: 'x'))
|
25
|
+
.query_param(new_parameter(y, key: 'y')))
|
26
|
+
.response(new_response_handler
|
27
|
+
.deserializer(APIHelper.method(:deserialize_primitive_types))
|
28
|
+
.deserialize_into(proc do |response| response.to_f end)
|
29
|
+
.is_primitive_response(true))
|
30
|
+
.execute
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# Class for exceptions when there is a network error, status code error, etc.
|
8
|
+
class APIException < CoreLibrary::ApiException
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# AuthOauth2Token400Error1 class.
|
8
|
+
class AuthOauth2Token400Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Errors]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
@errors = Errors.from_hash(hash['errors']) if hash['errors']
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# InsuredRisks400Error1 class.
|
8
|
+
class InsuredRisks400Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [List of Errors1]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
# Parameter is an array, so we need to iterate through it
|
30
|
+
@errors = nil
|
31
|
+
unless hash['errors'].nil?
|
32
|
+
@errors = []
|
33
|
+
hash['errors'].each do |structure|
|
34
|
+
@errors << (Errors1.from_hash(structure) if structure)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
@errors = SKIP unless hash.key?('errors')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# InsuredRisks401Error1 class.
|
8
|
+
class InsuredRisks401Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Errors]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
@errors = Errors.from_hash(hash['errors']) if hash['errors']
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# InsuredRisks403Error1 class.
|
8
|
+
class InsuredRisks403Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [List of Errors1]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
# Parameter is an array, so we need to iterate through it
|
30
|
+
@errors = nil
|
31
|
+
unless hash['errors'].nil?
|
32
|
+
@errors = []
|
33
|
+
hash['errors'].each do |structure|
|
34
|
+
@errors << (Errors1.from_hash(structure) if structure)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
@errors = SKIP unless hash.key?('errors')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# InsuredRisks415Error1 class.
|
8
|
+
class InsuredRisks415Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [List of Errors1]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
# Parameter is an array, so we need to iterate through it
|
30
|
+
@errors = nil
|
31
|
+
unless hash['errors'].nil?
|
32
|
+
@errors = []
|
33
|
+
hash['errors'].each do |structure|
|
34
|
+
@errors << (Errors1.from_hash(structure) if structure)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
@errors = SKIP unless hash.key?('errors')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# InsuredRisks500Error1 class.
|
8
|
+
class InsuredRisks500Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [List of Errors1]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
# Parameter is an array, so we need to iterate through it
|
30
|
+
@errors = nil
|
31
|
+
unless hash['errors'].nil?
|
32
|
+
@errors = []
|
33
|
+
hash['errors'].each do |structure|
|
34
|
+
@errors << (Errors1.from_hash(structure) if structure)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
@errors = SKIP unless hash.key?('errors')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# OAuth 2 Authorization endpoint exception.
|
8
|
+
class OAuthProviderException < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Gets or sets error code.
|
13
|
+
# @return [OAuthProviderErrorEnum]
|
14
|
+
attr_accessor :error
|
15
|
+
|
16
|
+
# Gets or sets human-readable text providing additional information on
|
17
|
+
# error.
|
18
|
+
# Used to assist the client developer in understanding the error that
|
19
|
+
# occurred.
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :error_description
|
22
|
+
|
23
|
+
# Gets or sets a URI identifying a human-readable web page with information
|
24
|
+
# about the error, used to provide the client developer with additional
|
25
|
+
# information about the error.
|
26
|
+
# @return [String]
|
27
|
+
attr_accessor :error_uri
|
28
|
+
|
29
|
+
# The constructor.
|
30
|
+
# @param [String] The reason for raising an exception.
|
31
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
32
|
+
def initialize(reason, response)
|
33
|
+
super(reason, response)
|
34
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
35
|
+
unbox(hash)
|
36
|
+
end
|
37
|
+
|
38
|
+
# Populates this object by extracting properties from a hash.
|
39
|
+
# @param [Hash] The deserialized response sent by the server in the
|
40
|
+
# response body.
|
41
|
+
def unbox(hash)
|
42
|
+
@error = hash.key?('error') ? hash['error'] : nil
|
43
|
+
@error_description =
|
44
|
+
hash.key?('error_description') ? hash['error_description'] : SKIP
|
45
|
+
@error_uri = hash.key?('error_uri') ? hash['error_uri'] : SKIP
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# Policies400Error1 class.
|
8
|
+
class Policies400Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [List of Errors1]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
# Parameter is an array, so we need to iterate through it
|
30
|
+
@errors = nil
|
31
|
+
unless hash['errors'].nil?
|
32
|
+
@errors = []
|
33
|
+
hash['errors'].each do |structure|
|
34
|
+
@errors << (Errors1.from_hash(structure) if structure)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
@errors = SKIP unless hash.key?('errors')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# Policies401Error1 class.
|
8
|
+
class Policies401Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Errors]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
@errors = Errors.from_hash(hash['errors']) if hash['errors']
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# Policies403Error1 class.
|
8
|
+
class Policies403Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [List of Errors1]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
# Parameter is an array, so we need to iterate through it
|
30
|
+
@errors = nil
|
31
|
+
unless hash['errors'].nil?
|
32
|
+
@errors = []
|
33
|
+
hash['errors'].each do |structure|
|
34
|
+
@errors << (Errors1.from_hash(structure) if structure)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
@errors = SKIP unless hash.key?('errors')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# Policies500Error1 class.
|
8
|
+
class Policies500Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [List of Errors1]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
# Parameter is an array, so we need to iterate through it
|
30
|
+
@errors = nil
|
31
|
+
unless hash['errors'].nil?
|
32
|
+
@errors = []
|
33
|
+
hash['errors'].each do |structure|
|
34
|
+
@errors << (Errors1.from_hash(structure) if structure)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
@errors = SKIP unless hash.key?('errors')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# Quotes400Error1 class.
|
8
|
+
class Quotes400Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [List of Errors1]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
# Parameter is an array, so we need to iterate through it
|
30
|
+
@errors = nil
|
31
|
+
unless hash['errors'].nil?
|
32
|
+
@errors = []
|
33
|
+
hash['errors'].each do |structure|
|
34
|
+
@errors << (Errors1.from_hash(structure) if structure)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
@errors = SKIP unless hash.key?('errors')
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# Quotes401Error1 class.
|
8
|
+
class Quotes401Error1Exception < APIException
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Errors]
|
14
|
+
attr_accessor :errors
|
15
|
+
|
16
|
+
# The constructor.
|
17
|
+
# @param [String] The reason for raising an exception.
|
18
|
+
# @param [HttpResponse] The HttpReponse of the API call.
|
19
|
+
def initialize(reason, response)
|
20
|
+
super(reason, response)
|
21
|
+
hash = APIHelper.json_deserialize(@response.raw_body)
|
22
|
+
unbox(hash)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Populates this object by extracting properties from a hash.
|
26
|
+
# @param [Hash] The deserialized response sent by the server in the
|
27
|
+
# response body.
|
28
|
+
def unbox(hash)
|
29
|
+
@errors = Errors.from_hash(hash['errors']) if hash['errors']
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|