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,48 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# Insured risk attached to the quote.
|
8
|
+
class InsuredRisk3 < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Provided data for this customer relationship.
|
13
|
+
# @return [Data47]
|
14
|
+
attr_accessor :data
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['data'] = 'data'
|
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(data = nil)
|
34
|
+
@data = data
|
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
|
+
data = Data47.from_hash(hash['data']) if hash['data']
|
43
|
+
|
44
|
+
# Create object from extracted values.
|
45
|
+
InsuredRisk3.new(data)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
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
|
+
# InsuredRisksRequest Model.
|
8
|
+
class InsuredRisksRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# All values that describe this Insured Risk resource.
|
13
|
+
# @return [Data]
|
14
|
+
attr_accessor :data
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['data'] = 'data'
|
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(data = nil)
|
34
|
+
@data = data
|
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
|
+
data = Data.from_hash(hash['data']) if hash['data']
|
43
|
+
|
44
|
+
# Create object from extracted values.
|
45
|
+
InsuredRisksRequest.new(data)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
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
|
+
# InsuredRisksResponse Model.
|
8
|
+
class InsuredRisksResponse < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Data3]
|
14
|
+
attr_accessor :data
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['data'] = 'data'
|
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(data = nil)
|
34
|
+
@data = data
|
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
|
+
data = Data3.from_hash(hash['data']) if hash['data']
|
43
|
+
|
44
|
+
# Create object from extracted values.
|
45
|
+
InsuredRisksResponse.new(data)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# The mailing address of this customer.
|
8
|
+
class MailingAddress < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The first line of the address.
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :address1
|
15
|
+
|
16
|
+
# The second line of the address.
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :address2
|
19
|
+
|
20
|
+
# The city of the address.
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :city
|
23
|
+
|
24
|
+
# Two letter state code of the address.
|
25
|
+
# @return [StateEnum]
|
26
|
+
attr_accessor :state
|
27
|
+
|
28
|
+
# 5 or 10 character postal code of the address.
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :zip
|
31
|
+
|
32
|
+
# A mapping from model property names to API property names.
|
33
|
+
def self.names
|
34
|
+
@_hash = {} if @_hash.nil?
|
35
|
+
@_hash['address1'] = 'address1'
|
36
|
+
@_hash['address2'] = 'address2'
|
37
|
+
@_hash['city'] = 'city'
|
38
|
+
@_hash['state'] = 'state'
|
39
|
+
@_hash['zip'] = 'zip'
|
40
|
+
@_hash
|
41
|
+
end
|
42
|
+
|
43
|
+
# An array for optional fields
|
44
|
+
def self.optionals
|
45
|
+
%w[
|
46
|
+
address2
|
47
|
+
]
|
48
|
+
end
|
49
|
+
|
50
|
+
# An array for nullable fields
|
51
|
+
def self.nullables
|
52
|
+
[]
|
53
|
+
end
|
54
|
+
|
55
|
+
def initialize(address1 = nil,
|
56
|
+
city = nil,
|
57
|
+
state = nil,
|
58
|
+
zip = nil,
|
59
|
+
address2 = SKIP)
|
60
|
+
@address1 = address1
|
61
|
+
@address2 = address2 unless address2 == SKIP
|
62
|
+
@city = city
|
63
|
+
@state = state
|
64
|
+
@zip = zip
|
65
|
+
end
|
66
|
+
|
67
|
+
# Creates an instance of the object from a hash.
|
68
|
+
def self.from_hash(hash)
|
69
|
+
return nil unless hash
|
70
|
+
|
71
|
+
# Extract variables from the hash.
|
72
|
+
address1 = hash.key?('address1') ? hash['address1'] : nil
|
73
|
+
city = hash.key?('city') ? hash['city'] : nil
|
74
|
+
state = hash.key?('state') ? hash['state'] : nil
|
75
|
+
zip = hash.key?('zip') ? hash['zip'] : nil
|
76
|
+
address2 = hash.key?('address2') ? hash['address2'] : SKIP
|
77
|
+
|
78
|
+
# Create object from extracted values.
|
79
|
+
MailingAddress.new(address1,
|
80
|
+
city,
|
81
|
+
state,
|
82
|
+
zip,
|
83
|
+
address2)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# Additional meta information about this data.
|
8
|
+
class Meta < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# The number of related objects of this type.
|
13
|
+
# @return [Integer]
|
14
|
+
attr_accessor :count
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['count'] = 'count'
|
20
|
+
@_hash
|
21
|
+
end
|
22
|
+
|
23
|
+
# An array for optional fields
|
24
|
+
def self.optionals
|
25
|
+
%w[
|
26
|
+
count
|
27
|
+
]
|
28
|
+
end
|
29
|
+
|
30
|
+
# An array for nullable fields
|
31
|
+
def self.nullables
|
32
|
+
[]
|
33
|
+
end
|
34
|
+
|
35
|
+
def initialize(count = SKIP)
|
36
|
+
@count = count unless count == 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
|
+
count = hash.key?('count') ? hash['count'] : SKIP
|
45
|
+
|
46
|
+
# Create object from extracted values.
|
47
|
+
Meta.new(count)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,39 @@
|
|
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 error codes
|
8
|
+
class OAuthProviderErrorEnum
|
9
|
+
O_AUTH_PROVIDER_ERROR_ENUM = [
|
10
|
+
# The request is missing a required parameter, includes an unsupported
|
11
|
+
# parameter value (other than grant type), repeats a parameter, includes
|
12
|
+
# multiple credentials, utilizes more than one mechanism for
|
13
|
+
# authenticating the client, or is otherwise malformed.
|
14
|
+
INVALID_REQUEST = 'invalid_request'.freeze,
|
15
|
+
|
16
|
+
# Client authentication failed (e.g., unknown client, no client
|
17
|
+
# authentication included, or unsupported authentication method).
|
18
|
+
INVALID_CLIENT = 'invalid_client'.freeze,
|
19
|
+
|
20
|
+
# The provided authorization grant (e.g., authorization code, resource
|
21
|
+
# owner credentials) or refresh token is invalid, expired, revoked, does
|
22
|
+
# not match the redirection URI used in the authorization request, or was
|
23
|
+
# issued to another client.
|
24
|
+
INVALID_GRANT = 'invalid_grant'.freeze,
|
25
|
+
|
26
|
+
# The authenticated client is not authorized to use this authorization
|
27
|
+
# grant type.
|
28
|
+
UNAUTHORIZED_CLIENT = 'unauthorized_client'.freeze,
|
29
|
+
|
30
|
+
# The authorization grant type is not supported by the authorization
|
31
|
+
# server.
|
32
|
+
UNSUPPORTED_GRANT_TYPE = 'unsupported_grant_type'.freeze,
|
33
|
+
|
34
|
+
# The requested scope is invalid, unknown, malformed, or exceeds the scope
|
35
|
+
# granted by the resource owner.
|
36
|
+
INVALID_SCOPE = 'invalid_scope'.freeze
|
37
|
+
].freeze
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,100 @@
|
|
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 response
|
8
|
+
class OAuthToken < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Access token
|
13
|
+
# @return [String]
|
14
|
+
attr_accessor :access_token
|
15
|
+
|
16
|
+
# Type of access token
|
17
|
+
# @return [String]
|
18
|
+
attr_accessor :token_type
|
19
|
+
|
20
|
+
# Time in seconds before the access token expires
|
21
|
+
# @return [Integer]
|
22
|
+
attr_accessor :expires_in
|
23
|
+
|
24
|
+
# List of scopes granted
|
25
|
+
# This is a space-delimited list of strings.
|
26
|
+
# @return [String]
|
27
|
+
attr_accessor :scope
|
28
|
+
|
29
|
+
# Time of token expiry as unix timestamp (UTC)
|
30
|
+
# @return [Integer]
|
31
|
+
attr_accessor :expiry
|
32
|
+
|
33
|
+
# Refresh token
|
34
|
+
# Used to get a new access token when it expires.
|
35
|
+
# @return [String]
|
36
|
+
attr_accessor :refresh_token
|
37
|
+
|
38
|
+
# A mapping from model property names to API property names.
|
39
|
+
def self.names
|
40
|
+
@_hash = {} if @_hash.nil?
|
41
|
+
@_hash['access_token'] = 'access_token'
|
42
|
+
@_hash['token_type'] = 'token_type'
|
43
|
+
@_hash['expires_in'] = 'expires_in'
|
44
|
+
@_hash['scope'] = 'scope'
|
45
|
+
@_hash['expiry'] = 'expiry'
|
46
|
+
@_hash['refresh_token'] = 'refresh_token'
|
47
|
+
@_hash
|
48
|
+
end
|
49
|
+
|
50
|
+
# An array for optional fields
|
51
|
+
def self.optionals
|
52
|
+
%w[
|
53
|
+
expires_in
|
54
|
+
scope
|
55
|
+
expiry
|
56
|
+
refresh_token
|
57
|
+
]
|
58
|
+
end
|
59
|
+
|
60
|
+
# An array for nullable fields
|
61
|
+
def self.nullables
|
62
|
+
[]
|
63
|
+
end
|
64
|
+
|
65
|
+
def initialize(access_token = nil,
|
66
|
+
token_type = nil,
|
67
|
+
expires_in = SKIP,
|
68
|
+
scope = SKIP,
|
69
|
+
expiry = SKIP,
|
70
|
+
refresh_token = SKIP)
|
71
|
+
@access_token = access_token
|
72
|
+
@token_type = token_type
|
73
|
+
@expires_in = expires_in unless expires_in == SKIP
|
74
|
+
@scope = scope unless scope == SKIP
|
75
|
+
@expiry = expiry unless expiry == SKIP
|
76
|
+
@refresh_token = refresh_token unless refresh_token == SKIP
|
77
|
+
end
|
78
|
+
|
79
|
+
# Creates an instance of the object from a hash.
|
80
|
+
def self.from_hash(hash)
|
81
|
+
return nil unless hash
|
82
|
+
|
83
|
+
# Extract variables from the hash.
|
84
|
+
access_token = hash.key?('access_token') ? hash['access_token'] : nil
|
85
|
+
token_type = hash.key?('token_type') ? hash['token_type'] : nil
|
86
|
+
expires_in = hash.key?('expires_in') ? hash['expires_in'] : SKIP
|
87
|
+
scope = hash.key?('scope') ? hash['scope'] : SKIP
|
88
|
+
expiry = hash.key?('expiry') ? hash['expiry'] : SKIP
|
89
|
+
refresh_token = hash.key?('refresh_token') ? hash['refresh_token'] : SKIP
|
90
|
+
|
91
|
+
# Create object from extracted values.
|
92
|
+
OAuthToken.new(access_token,
|
93
|
+
token_type,
|
94
|
+
expires_in,
|
95
|
+
scope,
|
96
|
+
expiry,
|
97
|
+
refresh_token)
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# Possible operators are sum, subtract, multiply, divide
|
8
|
+
class OperationTypeEnum
|
9
|
+
OPERATION_TYPE_ENUM = [
|
10
|
+
# Represents the sum operator
|
11
|
+
SUM = 'SUM'.freeze,
|
12
|
+
|
13
|
+
# Represents the subtract operator
|
14
|
+
SUBTRACT = 'SUBTRACT'.freeze,
|
15
|
+
|
16
|
+
# Represents the multiply operator
|
17
|
+
MULTIPLY = 'MULTIPLY'.freeze,
|
18
|
+
|
19
|
+
# Represents the divide operator
|
20
|
+
DIVIDE = 'DIVIDE'.freeze
|
21
|
+
].freeze
|
22
|
+
end
|
23
|
+
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
|
+
# ID of parent policy. Product must also be a parent product.
|
8
|
+
class Parent < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Provided data for this parent policy relationship.
|
13
|
+
# @return [Data8]
|
14
|
+
attr_accessor :data
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['data'] = 'data'
|
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(data = nil)
|
34
|
+
@data = data
|
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
|
+
data = Data8.from_hash(hash['data']) if hash['data']
|
43
|
+
|
44
|
+
# Create object from extracted values.
|
45
|
+
Parent.new(data)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
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
|
+
# PoliciesRequest Model.
|
8
|
+
class PoliciesRequest < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Data for creating a policy from a quote requiring a stripe token.
|
13
|
+
# @return [Data6]
|
14
|
+
attr_accessor :data
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['data'] = 'data'
|
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(data = nil)
|
34
|
+
@data = data
|
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
|
+
data = Data6.from_hash(hash['data']) if hash['data']
|
43
|
+
|
44
|
+
# Create object from extracted values.
|
45
|
+
PoliciesRequest.new(data)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# PoliciesResponse Model.
|
8
|
+
class PoliciesResponse < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# TODO: Write general description for this method
|
13
|
+
# @return [Data9]
|
14
|
+
attr_accessor :data
|
15
|
+
|
16
|
+
# Array of included objects which provide additional data about an object
|
17
|
+
# from the
|
18
|
+
# above `data.relationships`.
|
19
|
+
# @return [List of Object]
|
20
|
+
attr_accessor :included
|
21
|
+
|
22
|
+
# A mapping from model property names to API property names.
|
23
|
+
def self.names
|
24
|
+
@_hash = {} if @_hash.nil?
|
25
|
+
@_hash['data'] = 'data'
|
26
|
+
@_hash['included'] = 'included'
|
27
|
+
@_hash
|
28
|
+
end
|
29
|
+
|
30
|
+
# An array for optional fields
|
31
|
+
def self.optionals
|
32
|
+
[]
|
33
|
+
end
|
34
|
+
|
35
|
+
# An array for nullable fields
|
36
|
+
def self.nullables
|
37
|
+
[]
|
38
|
+
end
|
39
|
+
|
40
|
+
def initialize(data = nil,
|
41
|
+
included = nil)
|
42
|
+
@data = data
|
43
|
+
@included = included
|
44
|
+
end
|
45
|
+
|
46
|
+
# Creates an instance of the object from a hash.
|
47
|
+
def self.from_hash(hash)
|
48
|
+
return nil unless hash
|
49
|
+
|
50
|
+
# Extract variables from the hash.
|
51
|
+
data = Data9.from_hash(hash['data']) if hash['data']
|
52
|
+
included = hash.key?('included') ? hash['included'] : nil
|
53
|
+
|
54
|
+
# Create object from extracted values.
|
55
|
+
PoliciesResponse.new(data,
|
56
|
+
included)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# merged_api
|
2
|
+
#
|
3
|
+
# This file was automatically generated by APIMATIC v2.0
|
4
|
+
# ( https://apimatic.io ).
|
5
|
+
|
6
|
+
module MergedApi
|
7
|
+
# PoliciesResponse1 Model.
|
8
|
+
class PoliciesResponse1 < BaseModel
|
9
|
+
SKIP = Object.new
|
10
|
+
private_constant :SKIP
|
11
|
+
|
12
|
+
# Array of policy objects.
|
13
|
+
# @return [List of Data24]
|
14
|
+
attr_accessor :data
|
15
|
+
|
16
|
+
# A mapping from model property names to API property names.
|
17
|
+
def self.names
|
18
|
+
@_hash = {} if @_hash.nil?
|
19
|
+
@_hash['data'] = 'data'
|
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(data = nil)
|
34
|
+
@data = data
|
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
|
+
# Parameter is an array, so we need to iterate through it
|
43
|
+
data = nil
|
44
|
+
unless hash['data'].nil?
|
45
|
+
data = []
|
46
|
+
hash['data'].each do |structure|
|
47
|
+
data << (Data24.from_hash(structure) if structure)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
data = nil unless hash.key?('data')
|
52
|
+
|
53
|
+
# Create object from extracted values.
|
54
|
+
PoliciesResponse1.new(data)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|