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.
Files changed (149) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +193 -0
  4. data/lib/merged_api/api_helper.rb +10 -0
  5. data/lib/merged_api/client.rb +97 -0
  6. data/lib/merged_api/configuration.rb +127 -0
  7. data/lib/merged_api/controllers/authentication_controller.rb +36 -0
  8. data/lib/merged_api/controllers/base_controller.rb +65 -0
  9. data/lib/merged_api/controllers/insured_risk_controller.rb +47 -0
  10. data/lib/merged_api/controllers/o_auth_authorization_controller.rb +42 -0
  11. data/lib/merged_api/controllers/policy_controller.rb +66 -0
  12. data/lib/merged_api/controllers/quoting_controller.rb +41 -0
  13. data/lib/merged_api/controllers/simple_calculator_controller.rb +33 -0
  14. data/lib/merged_api/exceptions/api_exception.rb +10 -0
  15. data/lib/merged_api/exceptions/auth_oauth2_token400_error1_exception.rb +32 -0
  16. data/lib/merged_api/exceptions/insured_risks400_error1_exception.rb +41 -0
  17. data/lib/merged_api/exceptions/insured_risks401_error1_exception.rb +32 -0
  18. data/lib/merged_api/exceptions/insured_risks403_error1_exception.rb +41 -0
  19. data/lib/merged_api/exceptions/insured_risks415_error1_exception.rb +41 -0
  20. data/lib/merged_api/exceptions/insured_risks500_error1_exception.rb +41 -0
  21. data/lib/merged_api/exceptions/o_auth_provider_exception.rb +48 -0
  22. data/lib/merged_api/exceptions/policies400_error1_exception.rb +41 -0
  23. data/lib/merged_api/exceptions/policies401_error1_exception.rb +32 -0
  24. data/lib/merged_api/exceptions/policies403_error1_exception.rb +41 -0
  25. data/lib/merged_api/exceptions/policies500_error1_exception.rb +41 -0
  26. data/lib/merged_api/exceptions/quotes400_error1_exception.rb +41 -0
  27. data/lib/merged_api/exceptions/quotes401_error1_exception.rb +32 -0
  28. data/lib/merged_api/exceptions/quotes500_error1_exception.rb +41 -0
  29. data/lib/merged_api/http/auth/o_auth2.rb +63 -0
  30. data/lib/merged_api/http/http_call_back.rb +10 -0
  31. data/lib/merged_api/http/http_method_enum.rb +10 -0
  32. data/lib/merged_api/http/http_request.rb +10 -0
  33. data/lib/merged_api/http/http_response.rb +10 -0
  34. data/lib/merged_api/models/accept_enum.rb +14 -0
  35. data/lib/merged_api/models/additional_insured.rb +68 -0
  36. data/lib/merged_api/models/additional_interests.rb +68 -0
  37. data/lib/merged_api/models/agent.rb +48 -0
  38. data/lib/merged_api/models/agent3.rb +48 -0
  39. data/lib/merged_api/models/agent6.rb +48 -0
  40. data/lib/merged_api/models/attributes.rb +87 -0
  41. data/lib/merged_api/models/attributes1.rb +80 -0
  42. data/lib/merged_api/models/attributes10.rb +86 -0
  43. data/lib/merged_api/models/attributes11.rb +137 -0
  44. data/lib/merged_api/models/attributes12.rb +48 -0
  45. data/lib/merged_api/models/attributes2.rb +80 -0
  46. data/lib/merged_api/models/attributes3.rb +412 -0
  47. data/lib/merged_api/models/attributes4.rb +126 -0
  48. data/lib/merged_api/models/attributes5.rb +80 -0
  49. data/lib/merged_api/models/attributes6.rb +422 -0
  50. data/lib/merged_api/models/attributes9.rb +284 -0
  51. data/lib/merged_api/models/auth_oauth2_token_response.rb +70 -0
  52. data/lib/merged_api/models/base_model.rb +58 -0
  53. data/lib/merged_api/models/billing_address.rb +86 -0
  54. data/lib/merged_api/models/content_type1_enum.rb +14 -0
  55. data/lib/merged_api/models/content_type_enum.rb +14 -0
  56. data/lib/merged_api/models/coverage.rb +48 -0
  57. data/lib/merged_api/models/coverages.rb +68 -0
  58. data/lib/merged_api/models/coverages2.rb +57 -0
  59. data/lib/merged_api/models/coverages3.rb +57 -0
  60. data/lib/merged_api/models/customer.rb +48 -0
  61. data/lib/merged_api/models/customer2.rb +48 -0
  62. data/lib/merged_api/models/customer3.rb +48 -0
  63. data/lib/merged_api/models/data.rb +77 -0
  64. data/lib/merged_api/models/data1.rb +57 -0
  65. data/lib/merged_api/models/data11.rb +57 -0
  66. data/lib/merged_api/models/data12.rb +57 -0
  67. data/lib/merged_api/models/data18.rb +57 -0
  68. data/lib/merged_api/models/data19.rb +57 -0
  69. data/lib/merged_api/models/data2.rb +57 -0
  70. data/lib/merged_api/models/data20.rb +57 -0
  71. data/lib/merged_api/models/data21.rb +57 -0
  72. data/lib/merged_api/models/data24.rb +87 -0
  73. data/lib/merged_api/models/data3.rb +75 -0
  74. data/lib/merged_api/models/data39.rb +66 -0
  75. data/lib/merged_api/models/data40.rb +58 -0
  76. data/lib/merged_api/models/data41.rb +58 -0
  77. data/lib/merged_api/models/data42.rb +58 -0
  78. data/lib/merged_api/models/data43.rb +57 -0
  79. data/lib/merged_api/models/data44.rb +57 -0
  80. data/lib/merged_api/models/data45.rb +76 -0
  81. data/lib/merged_api/models/data46.rb +57 -0
  82. data/lib/merged_api/models/data47.rb +57 -0
  83. data/lib/merged_api/models/data6.rb +66 -0
  84. data/lib/merged_api/models/data7.rb +57 -0
  85. data/lib/merged_api/models/data8.rb +57 -0
  86. data/lib/merged_api/models/data9.rb +76 -0
  87. data/lib/merged_api/models/endorsement.rb +48 -0
  88. data/lib/merged_api/models/entity_type_enum.rb +17 -0
  89. data/lib/merged_api/models/errors.rb +61 -0
  90. data/lib/merged_api/models/errors1.rb +60 -0
  91. data/lib/merged_api/models/expires_in_enum.rb +14 -0
  92. data/lib/merged_api/models/grant_type_enum.rb +14 -0
  93. data/lib/merged_api/models/included.rb +75 -0
  94. data/lib/merged_api/models/included1.rb +75 -0
  95. data/lib/merged_api/models/included3.rb +76 -0
  96. data/lib/merged_api/models/included31.rb +67 -0
  97. data/lib/merged_api/models/included32.rb +67 -0
  98. data/lib/merged_api/models/included4.rb +85 -0
  99. data/lib/merged_api/models/included41.rb +85 -0
  100. data/lib/merged_api/models/included42.rb +85 -0
  101. data/lib/merged_api/models/installment_plan.rb +49 -0
  102. data/lib/merged_api/models/installment_plan2.rb +85 -0
  103. data/lib/merged_api/models/insured_risk.rb +48 -0
  104. data/lib/merged_api/models/insured_risk2.rb +48 -0
  105. data/lib/merged_api/models/insured_risk3.rb +48 -0
  106. data/lib/merged_api/models/insured_risks_request.rb +48 -0
  107. data/lib/merged_api/models/insured_risks_response.rb +48 -0
  108. data/lib/merged_api/models/mailing_address.rb +86 -0
  109. data/lib/merged_api/models/meta.rb +50 -0
  110. data/lib/merged_api/models/o_auth_provider_error_enum.rb +39 -0
  111. data/lib/merged_api/models/o_auth_token.rb +100 -0
  112. data/lib/merged_api/models/operation_type_enum.rb +23 -0
  113. data/lib/merged_api/models/parent.rb +48 -0
  114. data/lib/merged_api/models/policies_request.rb +48 -0
  115. data/lib/merged_api/models/policies_response.rb +59 -0
  116. data/lib/merged_api/models/policies_response1.rb +57 -0
  117. data/lib/merged_api/models/policy.rb +48 -0
  118. data/lib/merged_api/models/policy_state2_enum.rb +164 -0
  119. data/lib/merged_api/models/policy_state_enum.rb +165 -0
  120. data/lib/merged_api/models/product.rb +49 -0
  121. data/lib/merged_api/models/product2.rb +49 -0
  122. data/lib/merged_api/models/product3.rb +48 -0
  123. data/lib/merged_api/models/product6.rb +50 -0
  124. data/lib/merged_api/models/product_coverage.rb +48 -0
  125. data/lib/merged_api/models/quotes_request.rb +57 -0
  126. data/lib/merged_api/models/quotes_response.rb +57 -0
  127. data/lib/merged_api/models/relationships.rb +61 -0
  128. data/lib/merged_api/models/relationships1.rb +59 -0
  129. data/lib/merged_api/models/relationships10.rb +49 -0
  130. data/lib/merged_api/models/relationships11.rb +90 -0
  131. data/lib/merged_api/models/relationships13.rb +48 -0
  132. data/lib/merged_api/models/relationships14.rb +60 -0
  133. data/lib/merged_api/models/relationships2.rb +61 -0
  134. data/lib/merged_api/models/relationships3.rb +127 -0
  135. data/lib/merged_api/models/relationships4.rb +66 -0
  136. data/lib/merged_api/models/relationships5.rb +57 -0
  137. data/lib/merged_api/models/relationships9.rb +81 -0
  138. data/lib/merged_api/models/state_enum.rb +164 -0
  139. data/lib/merged_api/models/status2_enum.rb +26 -0
  140. data/lib/merged_api/models/status_enum.rb +32 -0
  141. data/lib/merged_api/models/token_type_enum.rb +14 -0
  142. data/lib/merged_api/utilities/date_time_helper.rb +11 -0
  143. data/lib/merged_api/utilities/file_wrapper.rb +16 -0
  144. data/lib/merged_api.rb +165 -0
  145. data/test/controllers/controller_test_base.rb +33 -0
  146. data/test/controllers/test_policy_controller.rb +36 -0
  147. data/test/controllers/test_simple_calculator_controller.rb +34 -0
  148. data/test/http_response_catcher.rb +19 -0
  149. metadata +267 -0
@@ -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
+ # Provided data for this product coverage relationship.
8
+ class Data21 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of resource being represented.
13
+ # @return [String]
14
+ attr_accessor :type
15
+
16
+ # UUID that identifies this resource.
17
+ # @return [UUID | String]
18
+ attr_accessor :id
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['type'] = 'type'
24
+ @_hash['id'] = 'id'
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(type = 'product_coverage',
39
+ id = nil)
40
+ @type = type
41
+ @id = id
42
+ end
43
+
44
+ # Creates an instance of the object from a hash.
45
+ def self.from_hash(hash)
46
+ return nil unless hash
47
+
48
+ # Extract variables from the hash.
49
+ type = hash['type'] ||= 'product_coverage'
50
+ id = hash.key?('id') ? hash['id'] : nil
51
+
52
+ # Create object from extracted values.
53
+ Data21.new(type,
54
+ id)
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,87 @@
1
+ # merged_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module MergedApi
7
+ # All values that describe this policy resource are listed in here.
8
+ class Data24 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of resource being represented.
13
+ # @return [String]
14
+ attr_accessor :type
15
+
16
+ # The type of resource being represented.
17
+ # @return [UUID | String]
18
+ attr_accessor :id
19
+
20
+ # Attributes that describe a policy resource with optional writeable money
21
+ # fields.
22
+ # @return [Attributes6]
23
+ attr_accessor :attributes
24
+
25
+ # Items related to this policy.
26
+ # @return [Relationships3]
27
+ attr_accessor :relationships
28
+
29
+ # Array of included objects which provide additional data about an object
30
+ # from the
31
+ # above `data.relationships`.
32
+ # @return [List of Object]
33
+ attr_accessor :included
34
+
35
+ # A mapping from model property names to API property names.
36
+ def self.names
37
+ @_hash = {} if @_hash.nil?
38
+ @_hash['type'] = 'type'
39
+ @_hash['id'] = 'id'
40
+ @_hash['attributes'] = 'attributes'
41
+ @_hash['relationships'] = 'relationships'
42
+ @_hash['included'] = 'included'
43
+ @_hash
44
+ end
45
+
46
+ # An array for optional fields
47
+ def self.optionals
48
+ []
49
+ end
50
+
51
+ # An array for nullable fields
52
+ def self.nullables
53
+ []
54
+ end
55
+
56
+ def initialize(type = 'policy',
57
+ id = nil,
58
+ attributes = nil,
59
+ relationships = nil,
60
+ included = nil)
61
+ @type = type
62
+ @id = id
63
+ @attributes = attributes
64
+ @relationships = relationships
65
+ @included = included
66
+ end
67
+
68
+ # Creates an instance of the object from a hash.
69
+ def self.from_hash(hash)
70
+ return nil unless hash
71
+
72
+ # Extract variables from the hash.
73
+ type = hash['type'] ||= 'policy'
74
+ id = hash.key?('id') ? hash['id'] : nil
75
+ attributes = Attributes6.from_hash(hash['attributes']) if hash['attributes']
76
+ relationships = Relationships3.from_hash(hash['relationships']) if hash['relationships']
77
+ included = hash.key?('included') ? hash['included'] : nil
78
+
79
+ # Create object from extracted values.
80
+ Data24.new(type,
81
+ id,
82
+ attributes,
83
+ relationships,
84
+ included)
85
+ end
86
+ end
87
+ end
@@ -0,0 +1,75 @@
1
+ # merged_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module MergedApi
7
+ # Data3 Model.
8
+ class Data3 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of resource being represented.
13
+ # @return [String]
14
+ attr_accessor :type
15
+
16
+ # The type of resource being represented.
17
+ # @return [UUID | String]
18
+ attr_accessor :id
19
+
20
+ # Attributes that describe an Insured Risk.
21
+ # @return [Attributes1]
22
+ attr_accessor :attributes
23
+
24
+ # Related objects.
25
+ # @return [Relationships1]
26
+ attr_accessor :relationships
27
+
28
+ # A mapping from model property names to API property names.
29
+ def self.names
30
+ @_hash = {} if @_hash.nil?
31
+ @_hash['type'] = 'type'
32
+ @_hash['id'] = 'id'
33
+ @_hash['attributes'] = 'attributes'
34
+ @_hash['relationships'] = 'relationships'
35
+ @_hash
36
+ end
37
+
38
+ # An array for optional fields
39
+ def self.optionals
40
+ []
41
+ end
42
+
43
+ # An array for nullable fields
44
+ def self.nullables
45
+ []
46
+ end
47
+
48
+ def initialize(type = 'insured_risk',
49
+ id = nil,
50
+ attributes = nil,
51
+ relationships = nil)
52
+ @type = type
53
+ @id = id
54
+ @attributes = attributes
55
+ @relationships = relationships
56
+ end
57
+
58
+ # Creates an instance of the object from a hash.
59
+ def self.from_hash(hash)
60
+ return nil unless hash
61
+
62
+ # Extract variables from the hash.
63
+ type = hash['type'] ||= 'insured_risk'
64
+ id = hash.key?('id') ? hash['id'] : nil
65
+ attributes = Attributes1.from_hash(hash['attributes']) if hash['attributes']
66
+ relationships = Relationships1.from_hash(hash['relationships']) if hash['relationships']
67
+
68
+ # Create object from extracted values.
69
+ Data3.new(type,
70
+ id,
71
+ attributes,
72
+ relationships)
73
+ end
74
+ end
75
+ end
@@ -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
+ # All values for the request are in this top-level object.
8
+ class Data39 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of resource being represented.
13
+ # @return [String]
14
+ attr_accessor :type
15
+
16
+ # Attributes for this object.
17
+ # @return [Attributes9]
18
+ attr_accessor :attributes
19
+
20
+ # Related items.
21
+ # @return [Relationships9]
22
+ attr_accessor :relationships
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['type'] = 'type'
28
+ @_hash['attributes'] = 'attributes'
29
+ @_hash['relationships'] = 'relationships'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ []
36
+ end
37
+
38
+ # An array for nullable fields
39
+ def self.nullables
40
+ []
41
+ end
42
+
43
+ def initialize(type = 'quote',
44
+ attributes = nil,
45
+ relationships = nil)
46
+ @type = type
47
+ @attributes = attributes
48
+ @relationships = relationships
49
+ end
50
+
51
+ # Creates an instance of the object from a hash.
52
+ def self.from_hash(hash)
53
+ return nil unless hash
54
+
55
+ # Extract variables from the hash.
56
+ type = hash['type'] ||= 'quote'
57
+ attributes = Attributes9.from_hash(hash['attributes']) if hash['attributes']
58
+ relationships = Relationships9.from_hash(hash['relationships']) if hash['relationships']
59
+
60
+ # Create object from extracted values.
61
+ Data39.new(type,
62
+ attributes,
63
+ relationships)
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,58 @@
1
+ # merged_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module MergedApi
7
+ # Data40 Model.
8
+ class Data40 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of resource being represented.
13
+ # @return [String]
14
+ attr_accessor :type
15
+
16
+ # The local ID that ties this resource to a related object in
17
+ # `data.included`.
18
+ # @return [String]
19
+ attr_accessor :lid
20
+
21
+ # A mapping from model property names to API property names.
22
+ def self.names
23
+ @_hash = {} if @_hash.nil?
24
+ @_hash['type'] = 'type'
25
+ @_hash['lid'] = 'lid'
26
+ @_hash
27
+ end
28
+
29
+ # An array for optional fields
30
+ def self.optionals
31
+ []
32
+ end
33
+
34
+ # An array for nullable fields
35
+ def self.nullables
36
+ []
37
+ end
38
+
39
+ def initialize(type = 'coverage',
40
+ lid = nil)
41
+ @type = type
42
+ @lid = lid
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
+ type = hash['type'] ||= 'coverage'
51
+ lid = hash.key?('lid') ? hash['lid'] : nil
52
+
53
+ # Create object from extracted values.
54
+ Data40.new(type,
55
+ lid)
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,58 @@
1
+ # merged_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module MergedApi
7
+ # Provided data for this customer relationship with local ID.
8
+ class Data41 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of resource being represented.
13
+ # @return [String]
14
+ attr_accessor :type
15
+
16
+ # The local ID that ties this resource to a related object in
17
+ # `data.included`.
18
+ # @return [String]
19
+ attr_accessor :lid
20
+
21
+ # A mapping from model property names to API property names.
22
+ def self.names
23
+ @_hash = {} if @_hash.nil?
24
+ @_hash['type'] = 'type'
25
+ @_hash['lid'] = 'lid'
26
+ @_hash
27
+ end
28
+
29
+ # An array for optional fields
30
+ def self.optionals
31
+ []
32
+ end
33
+
34
+ # An array for nullable fields
35
+ def self.nullables
36
+ []
37
+ end
38
+
39
+ def initialize(type = 'customer',
40
+ lid = nil)
41
+ @type = type
42
+ @lid = lid
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
+ type = hash['type'] ||= 'customer'
51
+ lid = hash.key?('lid') ? hash['lid'] : nil
52
+
53
+ # Create object from extracted values.
54
+ Data41.new(type,
55
+ lid)
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,58 @@
1
+ # merged_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module MergedApi
7
+ # Provided data for this insured risk relationship with local ID.
8
+ class Data42 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of resource being represented.
13
+ # @return [String]
14
+ attr_accessor :type
15
+
16
+ # The local ID that ties this resource to a related object in
17
+ # `data.included`.
18
+ # @return [String]
19
+ attr_accessor :lid
20
+
21
+ # A mapping from model property names to API property names.
22
+ def self.names
23
+ @_hash = {} if @_hash.nil?
24
+ @_hash['type'] = 'type'
25
+ @_hash['lid'] = 'lid'
26
+ @_hash
27
+ end
28
+
29
+ # An array for optional fields
30
+ def self.optionals
31
+ []
32
+ end
33
+
34
+ # An array for nullable fields
35
+ def self.nullables
36
+ []
37
+ end
38
+
39
+ def initialize(type = 'insured_risk',
40
+ lid = nil)
41
+ @type = type
42
+ @lid = lid
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
+ type = hash['type'] ||= 'insured_risk'
51
+ lid = hash.key?('lid') ? hash['lid'] : nil
52
+
53
+ # Create object from extracted values.
54
+ Data42.new(type,
55
+ lid)
56
+ end
57
+ end
58
+ 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
+ # Provided data for this product relationship.
8
+ class Data43 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of resource being represented.
13
+ # @return [String]
14
+ attr_accessor :type
15
+
16
+ # Unique Boost-generated UUID that identifies this resource.
17
+ # @return [UUID | String]
18
+ attr_accessor :id
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['type'] = 'type'
24
+ @_hash['id'] = 'id'
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(type = 'product',
39
+ id = nil)
40
+ @type = type
41
+ @id = id
42
+ end
43
+
44
+ # Creates an instance of the object from a hash.
45
+ def self.from_hash(hash)
46
+ return nil unless hash
47
+
48
+ # Extract variables from the hash.
49
+ type = hash['type'] ||= 'product'
50
+ id = hash.key?('id') ? hash['id'] : nil
51
+
52
+ # Create object from extracted values.
53
+ Data43.new(type,
54
+ id)
55
+ end
56
+ end
57
+ 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
+ # Provided data for this product coverage relationship.
8
+ class Data44 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of resource being represented.
13
+ # @return [String]
14
+ attr_accessor :type
15
+
16
+ # Unique Boost-generated UUID that identifies this resource.
17
+ # @return [UUID | String]
18
+ attr_accessor :id
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['type'] = 'type'
24
+ @_hash['id'] = 'id'
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(type = 'product_coverage',
39
+ id = nil)
40
+ @type = type
41
+ @id = id
42
+ end
43
+
44
+ # Creates an instance of the object from a hash.
45
+ def self.from_hash(hash)
46
+ return nil unless hash
47
+
48
+ # Extract variables from the hash.
49
+ type = hash['type'] ||= 'product_coverage'
50
+ id = hash.key?('id') ? hash['id'] : nil
51
+
52
+ # Create object from extracted values.
53
+ Data44.new(type,
54
+ id)
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,76 @@
1
+ # merged_api
2
+ #
3
+ # This file was automatically generated by APIMATIC v2.0
4
+ # ( https://apimatic.io ).
5
+
6
+ module MergedApi
7
+ # All values for this quote are in this top-level object.
8
+ class Data45 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of resource being represented.
13
+ # @return [String]
14
+ attr_accessor :type
15
+
16
+ # Unique Boost generated identifier for this resource that adheres to the
17
+ # above pattern.
18
+ # @return [String]
19
+ attr_accessor :id
20
+
21
+ # Attributes for this object.
22
+ # @return [Attributes9]
23
+ attr_accessor :attributes
24
+
25
+ # Related items.
26
+ # @return [Relationships11]
27
+ attr_accessor :relationships
28
+
29
+ # A mapping from model property names to API property names.
30
+ def self.names
31
+ @_hash = {} if @_hash.nil?
32
+ @_hash['type'] = 'type'
33
+ @_hash['id'] = 'id'
34
+ @_hash['attributes'] = 'attributes'
35
+ @_hash['relationships'] = 'relationships'
36
+ @_hash
37
+ end
38
+
39
+ # An array for optional fields
40
+ def self.optionals
41
+ []
42
+ end
43
+
44
+ # An array for nullable fields
45
+ def self.nullables
46
+ []
47
+ end
48
+
49
+ def initialize(type = 'quote',
50
+ id = nil,
51
+ attributes = nil,
52
+ relationships = nil)
53
+ @type = type
54
+ @id = id
55
+ @attributes = attributes
56
+ @relationships = relationships
57
+ end
58
+
59
+ # Creates an instance of the object from a hash.
60
+ def self.from_hash(hash)
61
+ return nil unless hash
62
+
63
+ # Extract variables from the hash.
64
+ type = hash['type'] ||= 'quote'
65
+ id = hash.key?('id') ? hash['id'] : nil
66
+ attributes = Attributes9.from_hash(hash['attributes']) if hash['attributes']
67
+ relationships = Relationships11.from_hash(hash['relationships']) if hash['relationships']
68
+
69
+ # Create object from extracted values.
70
+ Data45.new(type,
71
+ id,
72
+ attributes,
73
+ relationships)
74
+ end
75
+ end
76
+ 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
+ # Data46 Model.
8
+ class Data46 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The type of resource being represented.
13
+ # @return [String]
14
+ attr_accessor :type
15
+
16
+ # Unique Boost-generated UUID that identifies this resource.
17
+ # @return [UUID | String]
18
+ attr_accessor :id
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['type'] = 'type'
24
+ @_hash['id'] = 'id'
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(type = 'coverage',
39
+ id = nil)
40
+ @type = type
41
+ @id = id
42
+ end
43
+
44
+ # Creates an instance of the object from a hash.
45
+ def self.from_hash(hash)
46
+ return nil unless hash
47
+
48
+ # Extract variables from the hash.
49
+ type = hash['type'] ||= 'coverage'
50
+ id = hash.key?('id') ? hash['id'] : nil
51
+
52
+ # Create object from extracted values.
53
+ Data46.new(type,
54
+ id)
55
+ end
56
+ end
57
+ end