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,200 @@
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 DuplicateAd200Response < ApiModelBase
18
+ # Platform ID of the new ad
19
+ attr_accessor :copied_ad_id
20
+
21
+ attr_accessor :discovery
22
+
23
+ attr_accessor :raw
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'copied_ad_id' => :'copiedAdId',
51
+ :'discovery' => :'discovery',
52
+ :'raw' => :'raw'
53
+ }
54
+ end
55
+
56
+ # Returns attribute mapping this model knows about
57
+ def self.acceptable_attribute_map
58
+ attribute_map
59
+ end
60
+
61
+ # Returns all the JSON keys this model knows about
62
+ def self.acceptable_attributes
63
+ acceptable_attribute_map.values
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'copied_ad_id' => :'String',
70
+ :'discovery' => :'String',
71
+ :'raw' => :'Object'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DuplicateAd200Response` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ acceptable_attribute_map = self.class.acceptable_attribute_map
90
+ attributes = attributes.each_with_object({}) { |(k, v), h|
91
+ if (!acceptable_attribute_map.key?(k.to_sym))
92
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DuplicateAd200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
93
+ end
94
+ h[k.to_sym] = v
95
+ }
96
+
97
+ if attributes.key?(:'copied_ad_id')
98
+ self.copied_ad_id = attributes[:'copied_ad_id']
99
+ end
100
+
101
+ if attributes.key?(:'discovery')
102
+ self.discovery = attributes[:'discovery']
103
+ end
104
+
105
+ if attributes.key?(:'raw')
106
+ self.raw = attributes[:'raw']
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
114
+ invalid_properties = Array.new
115
+ invalid_properties
116
+ end
117
+
118
+ # Check to see if the all the properties in the model are valid
119
+ # @return true if the model is valid
120
+ def valid?
121
+ warn '[DEPRECATED] the `valid?` method is obsolete'
122
+ discovery_validator = EnumAttributeValidator.new('String', ["triggered", "skipped", "failed"])
123
+ return false unless discovery_validator.valid?(@discovery)
124
+ true
125
+ end
126
+
127
+ # Custom attribute writer method checking allowed values (enum).
128
+ # @param [Object] discovery Object to be assigned
129
+ def discovery=(discovery)
130
+ validator = EnumAttributeValidator.new('String', ["triggered", "skipped", "failed"])
131
+ unless validator.valid?(discovery)
132
+ fail ArgumentError, "invalid value for \"discovery\", must be one of #{validator.allowable_values}."
133
+ end
134
+ @discovery = discovery
135
+ end
136
+
137
+ # Checks equality by comparing each attribute.
138
+ # @param [Object] Object to be compared
139
+ def ==(o)
140
+ return true if self.equal?(o)
141
+ self.class == o.class &&
142
+ copied_ad_id == o.copied_ad_id &&
143
+ discovery == o.discovery &&
144
+ raw == o.raw
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [copied_ad_id, discovery, raw].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ return nil unless attributes.is_a?(Hash)
164
+ attributes = attributes.transform_keys(&:to_sym)
165
+ transformed_hash = {}
166
+ openapi_types.each_pair do |key, type|
167
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
168
+ transformed_hash["#{key}"] = nil
169
+ elsif type =~ /\AArray<(.*)>/i
170
+ # check to ensure the input is an array given that the attribute
171
+ # is documented as an array but the input is not
172
+ if attributes[attribute_map[key]].is_a?(Array)
173
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
174
+ end
175
+ elsif !attributes[attribute_map[key]].nil?
176
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
177
+ end
178
+ end
179
+ new(transformed_hash)
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.openapi_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ end
199
+
200
+ end
@@ -0,0 +1,243 @@
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 DuplicateAdRequest < ApiModelBase
18
+ # Destination platform ad set id (defaults to the source's ad set)
19
+ attr_accessor :ad_set_id
20
+
21
+ attr_accessor :status_option
22
+
23
+ attr_accessor :rename_strategy
24
+
25
+ attr_accessor :rename_prefix
26
+
27
+ attr_accessor :rename_suffix
28
+
29
+ attr_accessor :sync_after
30
+
31
+ class EnumAttributeValidator
32
+ attr_reader :datatype
33
+ attr_reader :allowable_values
34
+
35
+ def initialize(datatype, allowable_values)
36
+ @allowable_values = allowable_values.map do |value|
37
+ case datatype.to_s
38
+ when /Integer/i
39
+ value.to_i
40
+ when /Float/i
41
+ value.to_f
42
+ else
43
+ value
44
+ end
45
+ end
46
+ end
47
+
48
+ def valid?(value)
49
+ !value || allowable_values.include?(value)
50
+ end
51
+ end
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ {
56
+ :'ad_set_id' => :'adSetId',
57
+ :'status_option' => :'statusOption',
58
+ :'rename_strategy' => :'renameStrategy',
59
+ :'rename_prefix' => :'renamePrefix',
60
+ :'rename_suffix' => :'renameSuffix',
61
+ :'sync_after' => :'syncAfter'
62
+ }
63
+ end
64
+
65
+ # Returns attribute mapping this model knows about
66
+ def self.acceptable_attribute_map
67
+ attribute_map
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ acceptable_attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'ad_set_id' => :'String',
79
+ :'status_option' => :'String',
80
+ :'rename_strategy' => :'String',
81
+ :'rename_prefix' => :'String',
82
+ :'rename_suffix' => :'String',
83
+ :'sync_after' => :'Boolean'
84
+ }
85
+ end
86
+
87
+ # List of attributes with nullable: true
88
+ def self.openapi_nullable
89
+ Set.new([
90
+ ])
91
+ end
92
+
93
+ # Initializes the object
94
+ # @param [Hash] attributes Model attributes in the form of hash
95
+ def initialize(attributes = {})
96
+ if (!attributes.is_a?(Hash))
97
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::DuplicateAdRequest` initialize method"
98
+ end
99
+
100
+ # check to see if the attribute exists and convert string to symbol for hash key
101
+ acceptable_attribute_map = self.class.acceptable_attribute_map
102
+ attributes = attributes.each_with_object({}) { |(k, v), h|
103
+ if (!acceptable_attribute_map.key?(k.to_sym))
104
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::DuplicateAdRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
105
+ end
106
+ h[k.to_sym] = v
107
+ }
108
+
109
+ if attributes.key?(:'ad_set_id')
110
+ self.ad_set_id = attributes[:'ad_set_id']
111
+ end
112
+
113
+ if attributes.key?(:'status_option')
114
+ self.status_option = attributes[:'status_option']
115
+ else
116
+ self.status_option = 'PAUSED'
117
+ end
118
+
119
+ if attributes.key?(:'rename_strategy')
120
+ self.rename_strategy = attributes[:'rename_strategy']
121
+ end
122
+
123
+ if attributes.key?(:'rename_prefix')
124
+ self.rename_prefix = attributes[:'rename_prefix']
125
+ end
126
+
127
+ if attributes.key?(:'rename_suffix')
128
+ self.rename_suffix = attributes[:'rename_suffix']
129
+ end
130
+
131
+ if attributes.key?(:'sync_after')
132
+ self.sync_after = attributes[:'sync_after']
133
+ else
134
+ self.sync_after = true
135
+ end
136
+ end
137
+
138
+ # Show invalid properties with the reasons. Usually used together with valid?
139
+ # @return Array for valid properties with the reasons
140
+ def list_invalid_properties
141
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
142
+ invalid_properties = Array.new
143
+ invalid_properties
144
+ end
145
+
146
+ # Check to see if the all the properties in the model are valid
147
+ # @return true if the model is valid
148
+ def valid?
149
+ warn '[DEPRECATED] the `valid?` method is obsolete'
150
+ status_option_validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED", "INHERITED_FROM_SOURCE"])
151
+ return false unless status_option_validator.valid?(@status_option)
152
+ rename_strategy_validator = EnumAttributeValidator.new('String', ["DEEP_RENAME", "ONLY_TOP_LEVEL_RENAME", "NO_RENAME"])
153
+ return false unless rename_strategy_validator.valid?(@rename_strategy)
154
+ true
155
+ end
156
+
157
+ # Custom attribute writer method checking allowed values (enum).
158
+ # @param [Object] status_option Object to be assigned
159
+ def status_option=(status_option)
160
+ validator = EnumAttributeValidator.new('String', ["ACTIVE", "PAUSED", "INHERITED_FROM_SOURCE"])
161
+ unless validator.valid?(status_option)
162
+ fail ArgumentError, "invalid value for \"status_option\", must be one of #{validator.allowable_values}."
163
+ end
164
+ @status_option = status_option
165
+ end
166
+
167
+ # Custom attribute writer method checking allowed values (enum).
168
+ # @param [Object] rename_strategy Object to be assigned
169
+ def rename_strategy=(rename_strategy)
170
+ validator = EnumAttributeValidator.new('String', ["DEEP_RENAME", "ONLY_TOP_LEVEL_RENAME", "NO_RENAME"])
171
+ unless validator.valid?(rename_strategy)
172
+ fail ArgumentError, "invalid value for \"rename_strategy\", must be one of #{validator.allowable_values}."
173
+ end
174
+ @rename_strategy = rename_strategy
175
+ end
176
+
177
+ # Checks equality by comparing each attribute.
178
+ # @param [Object] Object to be compared
179
+ def ==(o)
180
+ return true if self.equal?(o)
181
+ self.class == o.class &&
182
+ ad_set_id == o.ad_set_id &&
183
+ status_option == o.status_option &&
184
+ rename_strategy == o.rename_strategy &&
185
+ rename_prefix == o.rename_prefix &&
186
+ rename_suffix == o.rename_suffix &&
187
+ sync_after == o.sync_after
188
+ end
189
+
190
+ # @see the `==` method
191
+ # @param [Object] Object to be compared
192
+ def eql?(o)
193
+ self == o
194
+ end
195
+
196
+ # Calculates hash code according to all attributes.
197
+ # @return [Integer] Hash code
198
+ def hash
199
+ [ad_set_id, status_option, rename_strategy, rename_prefix, rename_suffix, sync_after].hash
200
+ end
201
+
202
+ # Builds the object from hash
203
+ # @param [Hash] attributes Model attributes in the form of hash
204
+ # @return [Object] Returns the model itself
205
+ def self.build_from_hash(attributes)
206
+ return nil unless attributes.is_a?(Hash)
207
+ attributes = attributes.transform_keys(&:to_sym)
208
+ transformed_hash = {}
209
+ openapi_types.each_pair do |key, type|
210
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
211
+ transformed_hash["#{key}"] = nil
212
+ elsif type =~ /\AArray<(.*)>/i
213
+ # check to ensure the input is an array given that the attribute
214
+ # is documented as an array but the input is not
215
+ if attributes[attribute_map[key]].is_a?(Array)
216
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
217
+ end
218
+ elsif !attributes[attribute_map[key]].nil?
219
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
220
+ end
221
+ end
222
+ new(transformed_hash)
223
+ end
224
+
225
+ # Returns the object in the form of hash
226
+ # @return [Hash] Returns the object in the form of hash
227
+ def to_hash
228
+ hash = {}
229
+ self.class.attribute_map.each_pair do |attr, param|
230
+ value = self.send(attr)
231
+ if value.nil?
232
+ is_nullable = self.class.openapi_nullable.include?(attr)
233
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
234
+ end
235
+
236
+ hash[param] = _to_hash(value)
237
+ end
238
+ hash
239
+ end
240
+
241
+ end
242
+
243
+ 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 DuplicateAdSet200Response < ApiModelBase
18
+ # Platform ID of the new ad set
19
+ attr_accessor :copied_ad_set_id
20
+
21
+ attr_accessor :discovery
22
+
23
+ # Meta's native copy response (includes ad_object_ids for child copies)
24
+ attr_accessor :raw
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
+ :'copied_ad_set_id' => :'copiedAdSetId',
52
+ :'discovery' => :'discovery',
53
+ :'raw' => :'raw'
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
+ :'copied_ad_set_id' => :'String',
71
+ :'discovery' => :'String',
72
+ :'raw' => :'Object'
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::DuplicateAdSet200Response` 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::DuplicateAdSet200Response`. 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?(:'copied_ad_set_id')
99
+ self.copied_ad_set_id = attributes[:'copied_ad_set_id']
100
+ end
101
+
102
+ if attributes.key?(:'discovery')
103
+ self.discovery = attributes[:'discovery']
104
+ end
105
+
106
+ if attributes.key?(:'raw')
107
+ self.raw = attributes[:'raw']
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
+ discovery_validator = EnumAttributeValidator.new('String', ["triggered", "skipped", "failed"])
124
+ return false unless discovery_validator.valid?(@discovery)
125
+ true
126
+ end
127
+
128
+ # Custom attribute writer method checking allowed values (enum).
129
+ # @param [Object] discovery Object to be assigned
130
+ def discovery=(discovery)
131
+ validator = EnumAttributeValidator.new('String', ["triggered", "skipped", "failed"])
132
+ unless validator.valid?(discovery)
133
+ fail ArgumentError, "invalid value for \"discovery\", must be one of #{validator.allowable_values}."
134
+ end
135
+ @discovery = discovery
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
+ copied_ad_set_id == o.copied_ad_set_id &&
144
+ discovery == o.discovery &&
145
+ raw == o.raw
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
+ [copied_ad_set_id, discovery, raw].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