late-sdk 0.0.899 → 0.0.900

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.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -2
  3. data/docs/AdAccountsApi.md +463 -3
  4. data/docs/AdCampaignsApi.md +4 -4
  5. data/docs/AdTracking.md +20 -0
  6. data/docs/CreateAdCampaign200Response.md +26 -0
  7. data/docs/CreateAdCampaignRequest.md +8 -0
  8. data/docs/CreateCallAdRequest.md +2 -0
  9. data/docs/CreateMessagingAdRequest.md +2 -0
  10. data/docs/CreateStandaloneAdRequest.md +11 -3
  11. data/docs/CtwaAdRequestBody.md +2 -0
  12. data/docs/GetAdComments200ResponseMeta.md +10 -4
  13. data/docs/GetIosFourteenCampaignLimits200Response.md +18 -0
  14. data/docs/GetIosFourteenCampaignLimits200ResponseLimits.md +22 -0
  15. data/docs/HideAdComment200Response.md +22 -0
  16. data/docs/HideAdCommentRequest.md +18 -0
  17. data/docs/ListAdsInstagramAccounts200Response.md +22 -0
  18. data/docs/ListAdsInstagramAccounts200ResponseAccountsInner.md +26 -0
  19. data/docs/ListAdsInstagramAccounts200ResponsePagesInner.md +24 -0
  20. data/docs/ListAdsInstagramAccounts200ResponseResolved.md +22 -0
  21. data/docs/ListAdvertisableApplications200Response.md +18 -0
  22. data/docs/ListAdvertisableApplications200ResponseApplicationsInner.md +24 -0
  23. data/docs/MetaInstagramIdentityRef.md +22 -0
  24. data/docs/ReplyToAdComment200Response.md +20 -0
  25. data/docs/ReplyToAdCommentRequest.md +18 -0
  26. data/docs/TargetingSpec.md +4 -0
  27. data/lib/zernio-sdk/api/ad_accounts_api.rb +512 -4
  28. data/lib/zernio-sdk/api/ad_campaigns_api.rb +3 -3
  29. data/lib/zernio-sdk/models/{create_standalone_ad_request_tracking.rb → ad_tracking.rb} +5 -5
  30. data/lib/zernio-sdk/models/create_ad_campaign200_response.rb +231 -0
  31. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +52 -1
  32. data/lib/zernio-sdk/models/create_call_ad_request.rb +10 -1
  33. data/lib/zernio-sdk/models/create_messaging_ad_request.rb +10 -1
  34. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +98 -4
  35. data/lib/zernio-sdk/models/ctwa_ad_request_body.rb +10 -1
  36. data/lib/zernio-sdk/models/get_ad_comments200_response_meta.rb +36 -46
  37. data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response.rb +164 -0
  38. data/lib/zernio-sdk/models/get_ios_fourteen_campaign_limits200_response_limits.rb +172 -0
  39. data/lib/zernio-sdk/models/hide_ad_comment200_response.rb +225 -0
  40. data/lib/zernio-sdk/models/hide_ad_comment_request.rb +165 -0
  41. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response.rb +220 -0
  42. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_accounts_inner.rb +287 -0
  43. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_pages_inner.rb +210 -0
  44. data/lib/zernio-sdk/models/list_ads_instagram_accounts200_response_resolved.rb +211 -0
  45. data/lib/zernio-sdk/models/list_advertisable_applications200_response.rb +166 -0
  46. data/lib/zernio-sdk/models/list_advertisable_applications200_response_applications_inner.rb +250 -0
  47. data/lib/zernio-sdk/models/meta_instagram_identity_ref.rb +202 -0
  48. data/lib/zernio-sdk/models/reply_to_ad_comment200_response.rb +215 -0
  49. data/lib/zernio-sdk/models/reply_to_ad_comment_request.rb +174 -0
  50. data/lib/zernio-sdk/models/targeting_spec.rb +63 -1
  51. data/lib/zernio-sdk/version.rb +1 -1
  52. data/lib/zernio-sdk.rb +15 -2
  53. data/openapi.yaml +618 -143
  54. data/spec/api/ad_accounts_api_spec.rb +91 -2
  55. data/spec/api/ad_campaigns_api_spec.rb +1 -1
  56. data/spec/models/{create_standalone_ad_request_tracking_spec.rb → ad_tracking_spec.rb} +6 -6
  57. data/spec/models/create_ad_campaign200_response_spec.rb +68 -0
  58. data/spec/models/create_ad_campaign_request_spec.rb +28 -0
  59. data/spec/models/create_call_ad_request_spec.rb +6 -0
  60. data/spec/models/create_messaging_ad_request_spec.rb +6 -0
  61. data/spec/models/create_standalone_ad_request_spec.rb +28 -0
  62. data/spec/models/ctwa_ad_request_body_spec.rb +6 -0
  63. data/spec/models/get_ad_comments200_response_meta_spec.rb +19 -1
  64. data/spec/models/get_ios_fourteen_campaign_limits200_response_limits_spec.rb +48 -0
  65. data/spec/models/get_ios_fourteen_campaign_limits200_response_spec.rb +36 -0
  66. data/spec/models/hide_ad_comment200_response_spec.rb +52 -0
  67. data/spec/models/hide_ad_comment_request_spec.rb +36 -0
  68. data/spec/models/list_ads_instagram_accounts200_response_accounts_inner_spec.rb +64 -0
  69. data/spec/models/list_ads_instagram_accounts200_response_pages_inner_spec.rb +54 -0
  70. data/spec/models/list_ads_instagram_accounts200_response_resolved_spec.rb +52 -0
  71. data/spec/models/list_ads_instagram_accounts200_response_spec.rb +48 -0
  72. data/spec/models/list_advertisable_applications200_response_applications_inner_spec.rb +54 -0
  73. data/spec/models/list_advertisable_applications200_response_spec.rb +36 -0
  74. data/spec/models/meta_instagram_identity_ref_spec.rb +48 -0
  75. data/spec/models/reply_to_ad_comment200_response_spec.rb +46 -0
  76. data/spec/models/reply_to_ad_comment_request_spec.rb +36 -0
  77. data/spec/models/targeting_spec_spec.rb +12 -0
  78. data/zernio-sdk-0.0.900.gem +0 -0
  79. metadata +62 -10
  80. data/docs/CreateStandaloneAdRequestPromotedObject.md +0 -38
  81. data/docs/CreateStandaloneAdRequestTracking.md +0 -20
  82. data/lib/zernio-sdk/models/create_standalone_ad_request_promoted_object.rb +0 -249
  83. data/spec/models/create_standalone_ad_request_promoted_object_spec.rb +0 -96
  84. data/zernio-sdk-0.0.899.gem +0 -0
@@ -0,0 +1,225 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class HideAdComment200Response < ApiModelBase
18
+ attr_accessor :status
19
+
20
+ # ID of the created reply or moderated comment.
21
+ attr_accessor :comment_id
22
+
23
+ # The requested visibility state.
24
+ attr_accessor :hidden
25
+
26
+ class EnumAttributeValidator
27
+ attr_reader :datatype
28
+ attr_reader :allowable_values
29
+
30
+ def initialize(datatype, allowable_values)
31
+ @allowable_values = allowable_values.map do |value|
32
+ case datatype.to_s
33
+ when /Integer/i
34
+ value.to_i
35
+ when /Float/i
36
+ value.to_f
37
+ else
38
+ value
39
+ end
40
+ end
41
+ end
42
+
43
+ def valid?(value)
44
+ !value || allowable_values.include?(value)
45
+ end
46
+ end
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'status' => :'status',
52
+ :'comment_id' => :'commentId',
53
+ :'hidden' => :'hidden'
54
+ }
55
+ end
56
+
57
+ # Returns attribute mapping this model knows about
58
+ def self.acceptable_attribute_map
59
+ attribute_map
60
+ end
61
+
62
+ # Returns all the JSON keys this model knows about
63
+ def self.acceptable_attributes
64
+ acceptable_attribute_map.values
65
+ end
66
+
67
+ # Attribute type mapping.
68
+ def self.openapi_types
69
+ {
70
+ :'status' => :'String',
71
+ :'comment_id' => :'String',
72
+ :'hidden' => :'Boolean'
73
+ }
74
+ end
75
+
76
+ # List of attributes with nullable: true
77
+ def self.openapi_nullable
78
+ Set.new([
79
+ ])
80
+ end
81
+
82
+ # Initializes the object
83
+ # @param [Hash] attributes Model attributes in the form of hash
84
+ def initialize(attributes = {})
85
+ if (!attributes.is_a?(Hash))
86
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::HideAdComment200Response` initialize method"
87
+ end
88
+
89
+ # check to see if the attribute exists and convert string to symbol for hash key
90
+ acceptable_attribute_map = self.class.acceptable_attribute_map
91
+ attributes = attributes.each_with_object({}) { |(k, v), h|
92
+ if (!acceptable_attribute_map.key?(k.to_sym))
93
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::HideAdComment200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
94
+ end
95
+ h[k.to_sym] = v
96
+ }
97
+
98
+ if attributes.key?(:'status')
99
+ self.status = attributes[:'status']
100
+ else
101
+ self.status = nil
102
+ end
103
+
104
+ if attributes.key?(:'comment_id')
105
+ self.comment_id = attributes[:'comment_id']
106
+ else
107
+ self.comment_id = nil
108
+ end
109
+
110
+ if attributes.key?(:'hidden')
111
+ self.hidden = attributes[:'hidden']
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
119
+ invalid_properties = Array.new
120
+ if @status.nil?
121
+ invalid_properties.push('invalid value for "status", status cannot be nil.')
122
+ end
123
+
124
+ if @comment_id.nil?
125
+ invalid_properties.push('invalid value for "comment_id", comment_id cannot be nil.')
126
+ end
127
+
128
+ invalid_properties
129
+ end
130
+
131
+ # Check to see if the all the properties in the model are valid
132
+ # @return true if the model is valid
133
+ def valid?
134
+ warn '[DEPRECATED] the `valid?` method is obsolete'
135
+ return false if @status.nil?
136
+ status_validator = EnumAttributeValidator.new('String', ["success"])
137
+ return false unless status_validator.valid?(@status)
138
+ return false if @comment_id.nil?
139
+ true
140
+ end
141
+
142
+ # Custom attribute writer method checking allowed values (enum).
143
+ # @param [Object] status Object to be assigned
144
+ def status=(status)
145
+ validator = EnumAttributeValidator.new('String', ["success"])
146
+ unless validator.valid?(status)
147
+ fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
148
+ end
149
+ @status = status
150
+ end
151
+
152
+ # Custom attribute writer method with validation
153
+ # @param [Object] comment_id Value to be assigned
154
+ def comment_id=(comment_id)
155
+ if comment_id.nil?
156
+ fail ArgumentError, 'comment_id cannot be nil'
157
+ end
158
+
159
+ @comment_id = comment_id
160
+ end
161
+
162
+ # Checks equality by comparing each attribute.
163
+ # @param [Object] Object to be compared
164
+ def ==(o)
165
+ return true if self.equal?(o)
166
+ self.class == o.class &&
167
+ status == o.status &&
168
+ comment_id == o.comment_id &&
169
+ hidden == o.hidden
170
+ end
171
+
172
+ # @see the `==` method
173
+ # @param [Object] Object to be compared
174
+ def eql?(o)
175
+ self == o
176
+ end
177
+
178
+ # Calculates hash code according to all attributes.
179
+ # @return [Integer] Hash code
180
+ def hash
181
+ [status, comment_id, hidden].hash
182
+ end
183
+
184
+ # Builds the object from hash
185
+ # @param [Hash] attributes Model attributes in the form of hash
186
+ # @return [Object] Returns the model itself
187
+ def self.build_from_hash(attributes)
188
+ return nil unless attributes.is_a?(Hash)
189
+ attributes = attributes.transform_keys(&:to_sym)
190
+ transformed_hash = {}
191
+ openapi_types.each_pair do |key, type|
192
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
193
+ transformed_hash["#{key}"] = nil
194
+ elsif type =~ /\AArray<(.*)>/i
195
+ # check to ensure the input is an array given that the attribute
196
+ # is documented as an array but the input is not
197
+ if attributes[attribute_map[key]].is_a?(Array)
198
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
199
+ end
200
+ elsif !attributes[attribute_map[key]].nil?
201
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
202
+ end
203
+ end
204
+ new(transformed_hash)
205
+ end
206
+
207
+ # Returns the object in the form of hash
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ if value.nil?
214
+ is_nullable = self.class.openapi_nullable.include?(attr)
215
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
+ end
217
+
218
+ hash[param] = _to_hash(value)
219
+ end
220
+ hash
221
+ end
222
+
223
+ end
224
+
225
+ end
@@ -0,0 +1,165 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class HideAdCommentRequest < ApiModelBase
18
+ # True to hide the comment; false to restore it.
19
+ attr_accessor :hidden
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'hidden' => :'hidden'
25
+ }
26
+ end
27
+
28
+ # Returns attribute mapping this model knows about
29
+ def self.acceptable_attribute_map
30
+ attribute_map
31
+ end
32
+
33
+ # Returns all the JSON keys this model knows about
34
+ def self.acceptable_attributes
35
+ acceptable_attribute_map.values
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'hidden' => :'Boolean'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::HideAdCommentRequest` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ acceptable_attribute_map = self.class.acceptable_attribute_map
60
+ attributes = attributes.each_with_object({}) { |(k, v), h|
61
+ if (!acceptable_attribute_map.key?(k.to_sym))
62
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::HideAdCommentRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
63
+ end
64
+ h[k.to_sym] = v
65
+ }
66
+
67
+ if attributes.key?(:'hidden')
68
+ self.hidden = attributes[:'hidden']
69
+ else
70
+ self.hidden = nil
71
+ end
72
+ end
73
+
74
+ # Show invalid properties with the reasons. Usually used together with valid?
75
+ # @return Array for valid properties with the reasons
76
+ def list_invalid_properties
77
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
78
+ invalid_properties = Array.new
79
+ if @hidden.nil?
80
+ invalid_properties.push('invalid value for "hidden", hidden cannot be nil.')
81
+ end
82
+
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ warn '[DEPRECATED] the `valid?` method is obsolete'
90
+ return false if @hidden.nil?
91
+ true
92
+ end
93
+
94
+ # Custom attribute writer method with validation
95
+ # @param [Object] hidden Value to be assigned
96
+ def hidden=(hidden)
97
+ if hidden.nil?
98
+ fail ArgumentError, 'hidden cannot be nil'
99
+ end
100
+
101
+ @hidden = hidden
102
+ end
103
+
104
+ # Checks equality by comparing each attribute.
105
+ # @param [Object] Object to be compared
106
+ def ==(o)
107
+ return true if self.equal?(o)
108
+ self.class == o.class &&
109
+ hidden == o.hidden
110
+ end
111
+
112
+ # @see the `==` method
113
+ # @param [Object] Object to be compared
114
+ def eql?(o)
115
+ self == o
116
+ end
117
+
118
+ # Calculates hash code according to all attributes.
119
+ # @return [Integer] Hash code
120
+ def hash
121
+ [hidden].hash
122
+ end
123
+
124
+ # Builds the object from hash
125
+ # @param [Hash] attributes Model attributes in the form of hash
126
+ # @return [Object] Returns the model itself
127
+ def self.build_from_hash(attributes)
128
+ return nil unless attributes.is_a?(Hash)
129
+ attributes = attributes.transform_keys(&:to_sym)
130
+ transformed_hash = {}
131
+ openapi_types.each_pair do |key, type|
132
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
133
+ transformed_hash["#{key}"] = nil
134
+ elsif type =~ /\AArray<(.*)>/i
135
+ # check to ensure the input is an array given that the attribute
136
+ # is documented as an array but the input is not
137
+ if attributes[attribute_map[key]].is_a?(Array)
138
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
139
+ end
140
+ elsif !attributes[attribute_map[key]].nil?
141
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
142
+ end
143
+ end
144
+ new(transformed_hash)
145
+ end
146
+
147
+ # Returns the object in the form of hash
148
+ # @return [Hash] Returns the object in the form of hash
149
+ def to_hash
150
+ hash = {}
151
+ self.class.attribute_map.each_pair do |attr, param|
152
+ value = self.send(attr)
153
+ if value.nil?
154
+ is_nullable = self.class.openapi_nullable.include?(attr)
155
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
156
+ end
157
+
158
+ hash[param] = _to_hash(value)
159
+ end
160
+ hash
161
+ end
162
+
163
+ end
164
+
165
+ end
@@ -0,0 +1,220 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
5
+
6
+ The version of the OpenAPI document: 1.0.4
7
+ Contact: support@zernio.com
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.19.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Zernio
17
+ class ListAdsInstagramAccounts200Response < ApiModelBase
18
+ attr_accessor :accounts
19
+
20
+ attr_accessor :pages
21
+
22
+ attr_accessor :resolved
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'accounts' => :'accounts',
28
+ :'pages' => :'pages',
29
+ :'resolved' => :'resolved'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'accounts' => :'Array<ListAdsInstagramAccounts200ResponseAccountsInner>',
47
+ :'pages' => :'Array<ListAdsInstagramAccounts200ResponsePagesInner>',
48
+ :'resolved' => :'ListAdsInstagramAccounts200ResponseResolved'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ ])
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ if (!attributes.is_a?(Hash))
62
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListAdsInstagramAccounts200Response` initialize method"
63
+ end
64
+
65
+ # check to see if the attribute exists and convert string to symbol for hash key
66
+ acceptable_attribute_map = self.class.acceptable_attribute_map
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!acceptable_attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListAdsInstagramAccounts200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'accounts')
75
+ if (value = attributes[:'accounts']).is_a?(Array)
76
+ self.accounts = value
77
+ end
78
+ else
79
+ self.accounts = nil
80
+ end
81
+
82
+ if attributes.key?(:'pages')
83
+ if (value = attributes[:'pages']).is_a?(Array)
84
+ self.pages = value
85
+ end
86
+ else
87
+ self.pages = nil
88
+ end
89
+
90
+ if attributes.key?(:'resolved')
91
+ self.resolved = attributes[:'resolved']
92
+ else
93
+ self.resolved = nil
94
+ end
95
+ end
96
+
97
+ # Show invalid properties with the reasons. Usually used together with valid?
98
+ # @return Array for valid properties with the reasons
99
+ def list_invalid_properties
100
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
101
+ invalid_properties = Array.new
102
+ if @accounts.nil?
103
+ invalid_properties.push('invalid value for "accounts", accounts cannot be nil.')
104
+ end
105
+
106
+ if @pages.nil?
107
+ invalid_properties.push('invalid value for "pages", pages cannot be nil.')
108
+ end
109
+
110
+ if @resolved.nil?
111
+ invalid_properties.push('invalid value for "resolved", resolved cannot be nil.')
112
+ end
113
+
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ warn '[DEPRECATED] the `valid?` method is obsolete'
121
+ return false if @accounts.nil?
122
+ return false if @pages.nil?
123
+ return false if @resolved.nil?
124
+ true
125
+ end
126
+
127
+ # Custom attribute writer method with validation
128
+ # @param [Object] accounts Value to be assigned
129
+ def accounts=(accounts)
130
+ if accounts.nil?
131
+ fail ArgumentError, 'accounts cannot be nil'
132
+ end
133
+
134
+ @accounts = accounts
135
+ end
136
+
137
+ # Custom attribute writer method with validation
138
+ # @param [Object] pages Value to be assigned
139
+ def pages=(pages)
140
+ if pages.nil?
141
+ fail ArgumentError, 'pages cannot be nil'
142
+ end
143
+
144
+ @pages = pages
145
+ end
146
+
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] resolved Value to be assigned
149
+ def resolved=(resolved)
150
+ if resolved.nil?
151
+ fail ArgumentError, 'resolved cannot be nil'
152
+ end
153
+
154
+ @resolved = resolved
155
+ end
156
+
157
+ # Checks equality by comparing each attribute.
158
+ # @param [Object] Object to be compared
159
+ def ==(o)
160
+ return true if self.equal?(o)
161
+ self.class == o.class &&
162
+ accounts == o.accounts &&
163
+ pages == o.pages &&
164
+ resolved == o.resolved
165
+ end
166
+
167
+ # @see the `==` method
168
+ # @param [Object] Object to be compared
169
+ def eql?(o)
170
+ self == o
171
+ end
172
+
173
+ # Calculates hash code according to all attributes.
174
+ # @return [Integer] Hash code
175
+ def hash
176
+ [accounts, pages, resolved].hash
177
+ end
178
+
179
+ # Builds the object from hash
180
+ # @param [Hash] attributes Model attributes in the form of hash
181
+ # @return [Object] Returns the model itself
182
+ def self.build_from_hash(attributes)
183
+ return nil unless attributes.is_a?(Hash)
184
+ attributes = attributes.transform_keys(&:to_sym)
185
+ transformed_hash = {}
186
+ openapi_types.each_pair do |key, type|
187
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
188
+ transformed_hash["#{key}"] = nil
189
+ elsif type =~ /\AArray<(.*)>/i
190
+ # check to ensure the input is an array given that the attribute
191
+ # is documented as an array but the input is not
192
+ if attributes[attribute_map[key]].is_a?(Array)
193
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
194
+ end
195
+ elsif !attributes[attribute_map[key]].nil?
196
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
197
+ end
198
+ end
199
+ new(transformed_hash)
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ end
219
+
220
+ end