late-sdk 0.0.544 → 0.0.545

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 (127) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +52 -3
  3. data/docs/AdAudiencesApi.md +5 -5
  4. data/docs/AdCampaignsApi.md +142 -0
  5. data/docs/AdsApi.md +795 -37
  6. data/docs/CreateAdCampaign201Response.md +24 -0
  7. data/docs/CreateAdCampaignRequest.md +32 -0
  8. data/docs/CreateAdCreative201Response.md +20 -0
  9. data/docs/CreateAdCreativeRequest.md +40 -0
  10. data/docs/CreateAdCreativeRequestCarouselCardsInner.md +26 -0
  11. data/docs/CreateSmsSenderId200Response.md +22 -0
  12. data/docs/CreateSmsSenderIdRequest.md +18 -0
  13. data/docs/CreateStandaloneAd200Response.md +22 -0
  14. data/docs/CreateStandaloneAd200ResponseResultsInner.md +22 -0
  15. data/docs/CreateStandaloneAdRequest.md +4 -0
  16. data/docs/DeleteAdCreative200Response.md +20 -0
  17. data/docs/DeleteSmsSenderId200Response.md +18 -0
  18. data/docs/DiscordApi.md +153 -1
  19. data/docs/{ListDiscordGuildMembers200ResponseDataInner.md → DiscordGuildMember.md} +3 -3
  20. data/docs/{ListDiscordGuildMembers200ResponseDataInnerUser.md → DiscordGuildMemberUser.md} +2 -2
  21. data/docs/DuplicateAd200Response.md +22 -0
  22. data/docs/DuplicateAdRequest.md +28 -0
  23. data/docs/DuplicateAdSet200Response.md +22 -0
  24. data/docs/DuplicateAdSetRequest.md +36 -0
  25. data/docs/GetAdCreative200Response.md +18 -0
  26. data/docs/GetDiscordGuildMember200Response.md +18 -0
  27. data/docs/ListAdCreatives200Response.md +22 -0
  28. data/docs/ListAdImages200Response.md +22 -0
  29. data/docs/ListAdLabels200Response.md +22 -0
  30. data/docs/ListDiscordGuildMembers200Response.md +1 -1
  31. data/docs/ListHighDemandPeriods200Response.md +22 -0
  32. data/docs/ListMetaBusinesses200Response.md +20 -0
  33. data/docs/ListSmsSenderIds200Response.md +20 -0
  34. data/docs/ListSmsSenderIds200ResponseBudget.md +24 -0
  35. data/docs/ListSmsSenderIds200ResponseBudgetPendingRequest.md +22 -0
  36. data/docs/ListSmsSenderIds200ResponseSenderIdsInner.md +24 -0
  37. data/docs/RequestSmsSenderIdLimitIncrease200Response.md +20 -0
  38. data/docs/RequestSmsSenderIdLimitIncreaseRequest.md +20 -0
  39. data/docs/SMSApi.md +275 -0
  40. data/docs/SearchDiscordGuildMembers200Response.md +18 -0
  41. data/docs/UpdateAdCreative200Response.md +22 -0
  42. data/docs/UpdateAdCreativeRequest.md +20 -0
  43. data/lib/zernio-sdk/api/ad_audiences_api.rb +4 -4
  44. data/lib/zernio-sdk/api/ad_campaigns_api.rb +142 -0
  45. data/lib/zernio-sdk/api/ads_api.rb +829 -51
  46. data/lib/zernio-sdk/api/discord_api.rb +174 -2
  47. data/lib/zernio-sdk/api/sms_api.rb +254 -0
  48. data/lib/zernio-sdk/models/create_ad_campaign201_response.rb +210 -0
  49. data/lib/zernio-sdk/models/create_ad_campaign_request.rb +343 -0
  50. data/lib/zernio-sdk/models/create_ad_creative201_response.rb +157 -0
  51. data/lib/zernio-sdk/models/create_ad_creative_request.rb +424 -0
  52. data/lib/zernio-sdk/models/create_ad_creative_request_carousel_cards_inner.rb +255 -0
  53. data/lib/zernio-sdk/models/create_sms_sender_id200_response.rb +166 -0
  54. data/lib/zernio-sdk/models/create_sms_sender_id_request.rb +183 -0
  55. data/lib/zernio-sdk/models/create_standalone_ad200_response.rb +201 -0
  56. data/lib/zernio-sdk/models/create_standalone_ad200_response_results_inner.rb +212 -0
  57. data/lib/zernio-sdk/models/create_standalone_ad_request.rb +23 -1
  58. data/lib/zernio-sdk/models/delete_ad_creative200_response.rb +156 -0
  59. data/lib/zernio-sdk/models/delete_sms_sender_id200_response.rb +147 -0
  60. data/lib/zernio-sdk/models/{list_discord_guild_members200_response_data_inner.rb → discord_guild_member.rb} +5 -4
  61. data/lib/zernio-sdk/models/{list_discord_guild_members200_response_data_inner_user.rb → discord_guild_member_user.rb} +3 -3
  62. data/lib/zernio-sdk/models/duplicate_ad200_response.rb +200 -0
  63. data/lib/zernio-sdk/models/duplicate_ad_request.rb +243 -0
  64. data/lib/zernio-sdk/models/duplicate_ad_set200_response.rb +201 -0
  65. data/lib/zernio-sdk/models/duplicate_ad_set_request.rb +302 -0
  66. data/lib/zernio-sdk/models/get_ad_creative200_response.rb +148 -0
  67. data/lib/zernio-sdk/models/get_discord_guild_member200_response.rb +147 -0
  68. data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +167 -0
  69. data/lib/zernio-sdk/models/list_ad_images200_response.rb +167 -0
  70. data/lib/zernio-sdk/models/list_ad_labels200_response.rb +167 -0
  71. data/lib/zernio-sdk/models/list_discord_guild_members200_response.rb +1 -1
  72. data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +168 -0
  73. data/lib/zernio-sdk/models/list_meta_businesses200_response.rb +158 -0
  74. data/lib/zernio-sdk/models/list_sms_sender_ids200_response.rb +158 -0
  75. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget.rb +178 -0
  76. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_budget_pending_request.rb +167 -0
  77. data/lib/zernio-sdk/models/list_sms_sender_ids200_response_sender_ids_inner.rb +175 -0
  78. data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase200_response.rb +156 -0
  79. data/lib/zernio-sdk/models/request_sms_sender_id_limit_increase_request.rb +210 -0
  80. data/lib/zernio-sdk/models/search_discord_guild_members200_response.rb +149 -0
  81. data/lib/zernio-sdk/models/update_ad_creative200_response.rb +165 -0
  82. data/lib/zernio-sdk/models/update_ad_creative_request.rb +200 -0
  83. data/lib/zernio-sdk/version.rb +1 -1
  84. data/lib/zernio-sdk.rb +33 -2
  85. data/openapi.yaml +740 -27
  86. data/spec/api/ad_audiences_api_spec.rb +2 -2
  87. data/spec/api/ad_campaigns_api_spec.rb +25 -0
  88. data/spec/api/ads_api_spec.rb +143 -1
  89. data/spec/api/discord_api_spec.rb +30 -1
  90. data/spec/api/sms_api_spec.rb +46 -0
  91. data/spec/models/create_ad_campaign201_response_spec.rb +58 -0
  92. data/spec/models/create_ad_campaign_request_spec.rb +94 -0
  93. data/spec/models/create_ad_creative201_response_spec.rb +42 -0
  94. data/spec/models/create_ad_creative_request_carousel_cards_inner_spec.rb +60 -0
  95. data/spec/models/create_ad_creative_request_spec.rb +106 -0
  96. data/spec/models/create_sms_sender_id200_response_spec.rb +48 -0
  97. data/spec/models/create_sms_sender_id_request_spec.rb +36 -0
  98. data/spec/models/create_standalone_ad200_response_results_inner_spec.rb +56 -0
  99. data/spec/models/create_standalone_ad200_response_spec.rb +52 -0
  100. data/spec/models/create_standalone_ad_request_spec.rb +16 -0
  101. data/spec/models/delete_ad_creative200_response_spec.rb +42 -0
  102. data/spec/models/delete_sms_sender_id200_response_spec.rb +36 -0
  103. data/spec/models/{list_discord_guild_members200_response_data_inner_spec.rb → discord_guild_member_spec.rb} +6 -6
  104. data/spec/models/{list_discord_guild_members200_response_data_inner_user_spec.rb → discord_guild_member_user_spec.rb} +6 -6
  105. data/spec/models/duplicate_ad200_response_spec.rb +52 -0
  106. data/spec/models/duplicate_ad_request_spec.rb +74 -0
  107. data/spec/models/duplicate_ad_set200_response_spec.rb +52 -0
  108. data/spec/models/duplicate_ad_set_request_spec.rb +102 -0
  109. data/spec/models/get_ad_creative200_response_spec.rb +36 -0
  110. data/spec/models/get_discord_guild_member200_response_spec.rb +36 -0
  111. data/spec/models/list_ad_creatives200_response_spec.rb +48 -0
  112. data/spec/models/list_ad_images200_response_spec.rb +48 -0
  113. data/spec/models/list_ad_labels200_response_spec.rb +48 -0
  114. data/spec/models/list_high_demand_periods200_response_spec.rb +48 -0
  115. data/spec/models/list_meta_businesses200_response_spec.rb +42 -0
  116. data/spec/models/list_sms_sender_ids200_response_budget_pending_request_spec.rb +48 -0
  117. data/spec/models/list_sms_sender_ids200_response_budget_spec.rb +54 -0
  118. data/spec/models/list_sms_sender_ids200_response_sender_ids_inner_spec.rb +54 -0
  119. data/spec/models/list_sms_sender_ids200_response_spec.rb +42 -0
  120. data/spec/models/request_sms_sender_id_limit_increase200_response_spec.rb +42 -0
  121. data/spec/models/request_sms_sender_id_limit_increase_request_spec.rb +42 -0
  122. data/spec/models/search_discord_guild_members200_response_spec.rb +36 -0
  123. data/spec/models/update_ad_creative200_response_spec.rb +48 -0
  124. data/spec/models/update_ad_creative_request_spec.rb +42 -0
  125. data/zernio-sdk-0.0.545.gem +0 -0
  126. metadata +134 -10
  127. data/zernio-sdk-0.0.544.gem +0 -0
@@ -0,0 +1,166 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
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 CreateSmsSenderId200Response < ApiModelBase
18
+ # Sender ID resource id.
19
+ attr_accessor :id
20
+
21
+ attr_accessor :sender_id
22
+
23
+ attr_accessor :is_active
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'id' => :'id',
29
+ :'sender_id' => :'senderId',
30
+ :'is_active' => :'isActive'
31
+ }
32
+ end
33
+
34
+ # Returns attribute mapping this model knows about
35
+ def self.acceptable_attribute_map
36
+ attribute_map
37
+ end
38
+
39
+ # Returns all the JSON keys this model knows about
40
+ def self.acceptable_attributes
41
+ acceptable_attribute_map.values
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'id' => :'String',
48
+ :'sender_id' => :'String',
49
+ :'is_active' => :'Boolean'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.openapi_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateSmsSenderId200Response` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ acceptable_attribute_map = self.class.acceptable_attribute_map
68
+ attributes = attributes.each_with_object({}) { |(k, v), h|
69
+ if (!acceptable_attribute_map.key?(k.to_sym))
70
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateSmsSenderId200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
71
+ end
72
+ h[k.to_sym] = v
73
+ }
74
+
75
+ if attributes.key?(:'id')
76
+ self.id = attributes[:'id']
77
+ end
78
+
79
+ if attributes.key?(:'sender_id')
80
+ self.sender_id = attributes[:'sender_id']
81
+ end
82
+
83
+ if attributes.key?(:'is_active')
84
+ self.is_active = attributes[:'is_active']
85
+ end
86
+ end
87
+
88
+ # Show invalid properties with the reasons. Usually used together with valid?
89
+ # @return Array for valid properties with the reasons
90
+ def list_invalid_properties
91
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
92
+ invalid_properties = Array.new
93
+ invalid_properties
94
+ end
95
+
96
+ # Check to see if the all the properties in the model are valid
97
+ # @return true if the model is valid
98
+ def valid?
99
+ warn '[DEPRECATED] the `valid?` method is obsolete'
100
+ true
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ id == o.id &&
109
+ sender_id == o.sender_id &&
110
+ is_active == o.is_active
111
+ end
112
+
113
+ # @see the `==` method
114
+ # @param [Object] Object to be compared
115
+ def eql?(o)
116
+ self == o
117
+ end
118
+
119
+ # Calculates hash code according to all attributes.
120
+ # @return [Integer] Hash code
121
+ def hash
122
+ [id, sender_id, is_active].hash
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def self.build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ attributes = attributes.transform_keys(&:to_sym)
131
+ transformed_hash = {}
132
+ openapi_types.each_pair do |key, type|
133
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
134
+ transformed_hash["#{key}"] = nil
135
+ elsif type =~ /\AArray<(.*)>/i
136
+ # check to ensure the input is an array given that the attribute
137
+ # is documented as an array but the input is not
138
+ if attributes[attribute_map[key]].is_a?(Array)
139
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
140
+ end
141
+ elsif !attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
143
+ end
144
+ end
145
+ new(transformed_hash)
146
+ end
147
+
148
+ # Returns the object in the form of hash
149
+ # @return [Hash] Returns the object in the form of hash
150
+ def to_hash
151
+ hash = {}
152
+ self.class.attribute_map.each_pair do |attr, param|
153
+ value = self.send(attr)
154
+ if value.nil?
155
+ is_nullable = self.class.openapi_nullable.include?(attr)
156
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
157
+ end
158
+
159
+ hash[param] = _to_hash(value)
160
+ end
161
+ hash
162
+ end
163
+
164
+ end
165
+
166
+ end
@@ -0,0 +1,183 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
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 CreateSmsSenderIdRequest < ApiModelBase
18
+ # The sender ID recipients will see (3-11 letters/digits/spaces, at least one letter, no leading/trailing space).
19
+ attr_accessor :sender_id
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'sender_id' => :'senderId'
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
+ :'sender_id' => :'String'
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::CreateSmsSenderIdRequest` 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::CreateSmsSenderIdRequest`. 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?(:'sender_id')
68
+ self.sender_id = attributes[:'sender_id']
69
+ else
70
+ self.sender_id = 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 @sender_id.nil?
80
+ invalid_properties.push('invalid value for "sender_id", sender_id cannot be nil.')
81
+ end
82
+
83
+ if @sender_id.to_s.length > 11
84
+ invalid_properties.push('invalid value for "sender_id", the character length must be smaller than or equal to 11.')
85
+ end
86
+
87
+ if @sender_id.to_s.length < 3
88
+ invalid_properties.push('invalid value for "sender_id", the character length must be greater than or equal to 3.')
89
+ end
90
+
91
+ invalid_properties
92
+ end
93
+
94
+ # Check to see if the all the properties in the model are valid
95
+ # @return true if the model is valid
96
+ def valid?
97
+ warn '[DEPRECATED] the `valid?` method is obsolete'
98
+ return false if @sender_id.nil?
99
+ return false if @sender_id.to_s.length > 11
100
+ return false if @sender_id.to_s.length < 3
101
+ true
102
+ end
103
+
104
+ # Custom attribute writer method with validation
105
+ # @param [Object] sender_id Value to be assigned
106
+ def sender_id=(sender_id)
107
+ if sender_id.nil?
108
+ fail ArgumentError, 'sender_id cannot be nil'
109
+ end
110
+
111
+ if sender_id.to_s.length > 11
112
+ fail ArgumentError, 'invalid value for "sender_id", the character length must be smaller than or equal to 11.'
113
+ end
114
+
115
+ if sender_id.to_s.length < 3
116
+ fail ArgumentError, 'invalid value for "sender_id", the character length must be greater than or equal to 3.'
117
+ end
118
+
119
+ @sender_id = sender_id
120
+ end
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param [Object] Object to be compared
124
+ def ==(o)
125
+ return true if self.equal?(o)
126
+ self.class == o.class &&
127
+ sender_id == o.sender_id
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] Object to be compared
132
+ def eql?(o)
133
+ self == o
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ def hash
139
+ [sender_id].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ return nil unless attributes.is_a?(Hash)
147
+ attributes = attributes.transform_keys(&:to_sym)
148
+ transformed_hash = {}
149
+ openapi_types.each_pair do |key, type|
150
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
151
+ transformed_hash["#{key}"] = nil
152
+ elsif type =~ /\AArray<(.*)>/i
153
+ # check to ensure the input is an array given that the attribute
154
+ # is documented as an array but the input is not
155
+ if attributes[attribute_map[key]].is_a?(Array)
156
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
157
+ end
158
+ elsif !attributes[attribute_map[key]].nil?
159
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
160
+ end
161
+ end
162
+ new(transformed_hash)
163
+ end
164
+
165
+ # Returns the object in the form of hash
166
+ # @return [Hash] Returns the object in the form of hash
167
+ def to_hash
168
+ hash = {}
169
+ self.class.attribute_map.each_pair do |attr, param|
170
+ value = self.send(attr)
171
+ if value.nil?
172
+ is_nullable = self.class.openapi_nullable.include?(attr)
173
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
174
+ end
175
+
176
+ hash[param] = _to_hash(value)
177
+ end
178
+ hash
179
+ end
180
+
181
+ end
182
+
183
+ end
@@ -0,0 +1,201 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
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 CreateStandaloneAd200Response < ApiModelBase
18
+ attr_accessor :validate_only
19
+
20
+ attr_accessor :results
21
+
22
+ attr_accessor :message
23
+
24
+ class EnumAttributeValidator
25
+ attr_reader :datatype
26
+ attr_reader :allowable_values
27
+
28
+ def initialize(datatype, allowable_values)
29
+ @allowable_values = allowable_values.map do |value|
30
+ case datatype.to_s
31
+ when /Integer/i
32
+ value.to_i
33
+ when /Float/i
34
+ value.to_f
35
+ else
36
+ value
37
+ end
38
+ end
39
+ end
40
+
41
+ def valid?(value)
42
+ !value || allowable_values.include?(value)
43
+ end
44
+ end
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'validate_only' => :'validateOnly',
50
+ :'results' => :'results',
51
+ :'message' => :'message'
52
+ }
53
+ end
54
+
55
+ # Returns attribute mapping this model knows about
56
+ def self.acceptable_attribute_map
57
+ attribute_map
58
+ end
59
+
60
+ # Returns all the JSON keys this model knows about
61
+ def self.acceptable_attributes
62
+ acceptable_attribute_map.values
63
+ end
64
+
65
+ # Attribute type mapping.
66
+ def self.openapi_types
67
+ {
68
+ :'validate_only' => :'Boolean',
69
+ :'results' => :'Array<CreateStandaloneAd200ResponseResultsInner>',
70
+ :'message' => :'String'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CreateStandaloneAd200Response` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ acceptable_attribute_map = self.class.acceptable_attribute_map
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!acceptable_attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CreateStandaloneAd200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'validate_only')
97
+ self.validate_only = attributes[:'validate_only']
98
+ end
99
+
100
+ if attributes.key?(:'results')
101
+ if (value = attributes[:'results']).is_a?(Array)
102
+ self.results = value
103
+ end
104
+ end
105
+
106
+ if attributes.key?(:'message')
107
+ self.message = attributes[:'message']
108
+ end
109
+ end
110
+
111
+ # Show invalid properties with the reasons. Usually used together with valid?
112
+ # @return Array for valid properties with the reasons
113
+ def list_invalid_properties
114
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
115
+ invalid_properties = Array.new
116
+ invalid_properties
117
+ end
118
+
119
+ # Check to see if the all the properties in the model are valid
120
+ # @return true if the model is valid
121
+ def valid?
122
+ warn '[DEPRECATED] the `valid?` method is obsolete'
123
+ validate_only_validator = EnumAttributeValidator.new('Boolean', ["true"])
124
+ return false unless validate_only_validator.valid?(@validate_only)
125
+ true
126
+ end
127
+
128
+ # Custom attribute writer method checking allowed values (enum).
129
+ # @param [Object] validate_only Object to be assigned
130
+ def validate_only=(validate_only)
131
+ validator = EnumAttributeValidator.new('Boolean', ["true"])
132
+ unless validator.valid?(validate_only)
133
+ fail ArgumentError, "invalid value for \"validate_only\", must be one of #{validator.allowable_values}."
134
+ end
135
+ @validate_only = validate_only
136
+ end
137
+
138
+ # Checks equality by comparing each attribute.
139
+ # @param [Object] Object to be compared
140
+ def ==(o)
141
+ return true if self.equal?(o)
142
+ self.class == o.class &&
143
+ validate_only == o.validate_only &&
144
+ results == o.results &&
145
+ message == o.message
146
+ end
147
+
148
+ # @see the `==` method
149
+ # @param [Object] Object to be compared
150
+ def eql?(o)
151
+ self == o
152
+ end
153
+
154
+ # Calculates hash code according to all attributes.
155
+ # @return [Integer] Hash code
156
+ def hash
157
+ [validate_only, results, message].hash
158
+ end
159
+
160
+ # Builds the object from hash
161
+ # @param [Hash] attributes Model attributes in the form of hash
162
+ # @return [Object] Returns the model itself
163
+ def self.build_from_hash(attributes)
164
+ return nil unless attributes.is_a?(Hash)
165
+ attributes = attributes.transform_keys(&:to_sym)
166
+ transformed_hash = {}
167
+ openapi_types.each_pair do |key, type|
168
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
169
+ transformed_hash["#{key}"] = nil
170
+ elsif type =~ /\AArray<(.*)>/i
171
+ # check to ensure the input is an array given that the attribute
172
+ # is documented as an array but the input is not
173
+ if attributes[attribute_map[key]].is_a?(Array)
174
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
175
+ end
176
+ elsif !attributes[attribute_map[key]].nil?
177
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
178
+ end
179
+ end
180
+ new(transformed_hash)
181
+ end
182
+
183
+ # Returns the object in the form of hash
184
+ # @return [Hash] Returns the object in the form of hash
185
+ def to_hash
186
+ hash = {}
187
+ self.class.attribute_map.each_pair do |attr, param|
188
+ value = self.send(attr)
189
+ if value.nil?
190
+ is_nullable = self.class.openapi_nullable.include?(attr)
191
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
192
+ end
193
+
194
+ hash[param] = _to_hash(value)
195
+ end
196
+ hash
197
+ end
198
+
199
+ end
200
+
201
+ end