late-sdk 0.0.97 → 0.0.99

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 (128) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +53 -0
  3. data/docs/Ad.md +58 -0
  4. data/docs/AdAudiencesApi.md +365 -0
  5. data/docs/AdBudget.md +20 -0
  6. data/docs/AdCampaign.md +40 -0
  7. data/docs/AdCampaignsApi.md +165 -0
  8. data/docs/AdMetrics.md +34 -0
  9. data/docs/AdSchedule.md +20 -0
  10. data/docs/AddUsersToAdAudience200Response.md +22 -0
  11. data/docs/AddUsersToAdAudienceRequest.md +18 -0
  12. data/docs/AddUsersToAdAudienceRequestUsersInner.md +20 -0
  13. data/docs/AdsApi.md +726 -0
  14. data/docs/BoostPostRequest.md +36 -0
  15. data/docs/BoostPostRequestBudget.md +20 -0
  16. data/docs/BoostPostRequestSchedule.md +20 -0
  17. data/docs/BoostPostRequestTargeting.md +24 -0
  18. data/docs/CreateAdAudience201Response.md +20 -0
  19. data/docs/CreateAdAudienceRequest.md +36 -0
  20. data/docs/CreateStandaloneAdRequest.md +56 -0
  21. data/docs/GetAd200Response.md +18 -0
  22. data/docs/GetAdAnalytics200Response.md +20 -0
  23. data/docs/GetAdAnalytics200ResponseAd.md +24 -0
  24. data/docs/GetAdAnalytics200ResponseAnalytics.md +22 -0
  25. data/docs/GetAdAnalytics200ResponseAnalyticsDailyInner.md +36 -0
  26. data/docs/GetAdAudience200Response.md +20 -0
  27. data/docs/ListAdAccounts200Response.md +18 -0
  28. data/docs/ListAdAccounts200ResponseAccountsInner.md +24 -0
  29. data/docs/ListAdAudiences200Response.md +18 -0
  30. data/docs/ListAdAudiences200ResponseAudiencesInner.md +32 -0
  31. data/docs/ListAdCampaigns200Response.md +20 -0
  32. data/docs/ListAds200Response.md +20 -0
  33. data/docs/SearchAdInterests200Response.md +18 -0
  34. data/docs/SearchAdInterests200ResponseInterestsInner.md +22 -0
  35. data/docs/SyncExternalAds200Response.md +24 -0
  36. data/docs/UpdateAd200Response.md +20 -0
  37. data/docs/UpdateAdCampaignStatus200Response.md +22 -0
  38. data/docs/UpdateAdCampaignStatusRequest.md +20 -0
  39. data/docs/UpdateAdRequest.md +24 -0
  40. data/docs/UpdateAdRequestBudget.md +20 -0
  41. data/docs/UpdateAdRequestTargeting.md +24 -0
  42. data/docs/UpdatePostMetadataRequest.md +7 -1
  43. data/lib/late-sdk/api/ad_audiences_api.rb +368 -0
  44. data/lib/late-sdk/api/ad_campaigns_api.rb +201 -0
  45. data/lib/late-sdk/api/ads_api.rb +719 -0
  46. data/lib/late-sdk/models/ad.rb +399 -0
  47. data/lib/late-sdk/models/ad_budget.rb +190 -0
  48. data/lib/late-sdk/models/ad_campaign.rb +293 -0
  49. data/lib/late-sdk/models/ad_metrics.rb +222 -0
  50. data/lib/late-sdk/models/ad_schedule.rb +156 -0
  51. data/lib/late-sdk/models/add_users_to_ad_audience200_response.rb +165 -0
  52. data/lib/late-sdk/models/add_users_to_ad_audience_request.rb +175 -0
  53. data/lib/late-sdk/models/add_users_to_ad_audience_request_users_inner.rb +157 -0
  54. data/lib/late-sdk/models/boost_post_request.rb +350 -0
  55. data/lib/late-sdk/models/boost_post_request_budget.rb +215 -0
  56. data/lib/late-sdk/models/boost_post_request_schedule.rb +157 -0
  57. data/lib/late-sdk/models/boost_post_request_targeting.rb +234 -0
  58. data/lib/late-sdk/models/create_ad_audience201_response.rb +156 -0
  59. data/lib/late-sdk/models/create_ad_audience_request.rb +391 -0
  60. data/lib/late-sdk/models/create_standalone_ad_request.rb +585 -0
  61. data/lib/late-sdk/models/get_ad200_response.rb +147 -0
  62. data/lib/late-sdk/models/get_ad_analytics200_response.rb +156 -0
  63. data/lib/late-sdk/models/get_ad_analytics200_response_ad.rb +174 -0
  64. data/lib/late-sdk/models/get_ad_analytics200_response_analytics.rb +169 -0
  65. data/lib/late-sdk/models/get_ad_analytics200_response_analytics_daily_inner.rb +238 -0
  66. data/lib/late-sdk/models/get_ad_audience200_response.rb +157 -0
  67. data/lib/late-sdk/models/list_ad_accounts200_response.rb +149 -0
  68. data/lib/late-sdk/models/list_ad_accounts200_response_accounts_inner.rb +175 -0
  69. data/lib/late-sdk/models/list_ad_audiences200_response.rb +149 -0
  70. data/lib/late-sdk/models/list_ad_audiences200_response_audiences_inner.rb +244 -0
  71. data/lib/late-sdk/models/list_ad_campaigns200_response.rb +158 -0
  72. data/lib/late-sdk/models/list_ads200_response.rb +158 -0
  73. data/lib/late-sdk/models/search_ad_interests200_response.rb +149 -0
  74. data/lib/late-sdk/models/search_ad_interests200_response_interests_inner.rb +165 -0
  75. data/lib/late-sdk/models/sync_external_ads200_response.rb +177 -0
  76. data/lib/late-sdk/models/update_ad200_response.rb +156 -0
  77. data/lib/late-sdk/models/update_ad_campaign_status200_response.rb +169 -0
  78. data/lib/late-sdk/models/update_ad_campaign_status_request.rb +216 -0
  79. data/lib/late-sdk/models/update_ad_request.rb +208 -0
  80. data/lib/late-sdk/models/update_ad_request_budget.rb +191 -0
  81. data/lib/late-sdk/models/update_ad_request_targeting.rb +235 -0
  82. data/lib/late-sdk/models/update_post_metadata_request.rb +34 -4
  83. data/lib/late-sdk/version.rb +1 -1
  84. data/lib/late-sdk.rb +39 -0
  85. data/openapi.yaml +693 -0
  86. data/spec/api/ad_audiences_api_spec.rb +98 -0
  87. data/spec/api/ad_campaigns_api_spec.rb +67 -0
  88. data/spec/api/ads_api_spec.rb +163 -0
  89. data/spec/models/ad_budget_spec.rb +46 -0
  90. data/spec/models/ad_campaign_spec.rb +110 -0
  91. data/spec/models/ad_metrics_spec.rb +84 -0
  92. data/spec/models/ad_schedule_spec.rb +42 -0
  93. data/spec/models/ad_spec.rb +172 -0
  94. data/spec/models/add_users_to_ad_audience200_response_spec.rb +48 -0
  95. data/spec/models/add_users_to_ad_audience_request_spec.rb +36 -0
  96. data/spec/models/add_users_to_ad_audience_request_users_inner_spec.rb +42 -0
  97. data/spec/models/boost_post_request_budget_spec.rb +46 -0
  98. data/spec/models/boost_post_request_schedule_spec.rb +42 -0
  99. data/spec/models/boost_post_request_spec.rb +94 -0
  100. data/spec/models/boost_post_request_targeting_spec.rb +54 -0
  101. data/spec/models/create_ad_audience201_response_spec.rb +42 -0
  102. data/spec/models/create_ad_audience_request_spec.rb +94 -0
  103. data/spec/models/create_standalone_ad_request_spec.rb +166 -0
  104. data/spec/models/get_ad200_response_spec.rb +36 -0
  105. data/spec/models/get_ad_analytics200_response_ad_spec.rb +54 -0
  106. data/spec/models/get_ad_analytics200_response_analytics_daily_inner_spec.rb +90 -0
  107. data/spec/models/get_ad_analytics200_response_analytics_spec.rb +48 -0
  108. data/spec/models/get_ad_analytics200_response_spec.rb +42 -0
  109. data/spec/models/get_ad_audience200_response_spec.rb +42 -0
  110. data/spec/models/list_ad_accounts200_response_accounts_inner_spec.rb +54 -0
  111. data/spec/models/list_ad_accounts200_response_spec.rb +36 -0
  112. data/spec/models/list_ad_audiences200_response_audiences_inner_spec.rb +82 -0
  113. data/spec/models/list_ad_audiences200_response_spec.rb +36 -0
  114. data/spec/models/list_ad_campaigns200_response_spec.rb +42 -0
  115. data/spec/models/list_ads200_response_spec.rb +42 -0
  116. data/spec/models/search_ad_interests200_response_interests_inner_spec.rb +48 -0
  117. data/spec/models/search_ad_interests200_response_spec.rb +36 -0
  118. data/spec/models/sync_external_ads200_response_spec.rb +54 -0
  119. data/spec/models/update_ad200_response_spec.rb +42 -0
  120. data/spec/models/update_ad_campaign_status200_response_spec.rb +48 -0
  121. data/spec/models/update_ad_campaign_status_request_spec.rb +50 -0
  122. data/spec/models/update_ad_request_budget_spec.rb +46 -0
  123. data/spec/models/update_ad_request_spec.rb +58 -0
  124. data/spec/models/update_ad_request_targeting_spec.rb +54 -0
  125. data/spec/models/update_post_metadata_request_spec.rb +18 -0
  126. data/zernio-sdk-0.0.99.gem +0 -0
  127. metadata +159 -3
  128. data/zernio-sdk-0.0.97.gem +0 -0
@@ -0,0 +1,147 @@
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.1
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 Late
17
+ class GetAd200Response < ApiModelBase
18
+ attr_accessor :ad
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'ad' => :'ad'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'ad' => :'Ad'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetAd200Response` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetAd200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'ad')
67
+ self.ad = attributes[:'ad']
68
+ end
69
+ end
70
+
71
+ # Show invalid properties with the reasons. Usually used together with valid?
72
+ # @return Array for valid properties with the reasons
73
+ def list_invalid_properties
74
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
75
+ invalid_properties = Array.new
76
+ invalid_properties
77
+ end
78
+
79
+ # Check to see if the all the properties in the model are valid
80
+ # @return true if the model is valid
81
+ def valid?
82
+ warn '[DEPRECATED] the `valid?` method is obsolete'
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ ad == o.ad
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Integer] Hash code
102
+ def hash
103
+ [ad].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def self.build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ attributes = attributes.transform_keys(&:to_sym)
112
+ transformed_hash = {}
113
+ openapi_types.each_pair do |key, type|
114
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
115
+ transformed_hash["#{key}"] = nil
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[attribute_map[key]].is_a?(Array)
120
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
121
+ end
122
+ elsif !attributes[attribute_map[key]].nil?
123
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
124
+ end
125
+ end
126
+ new(transformed_hash)
127
+ end
128
+
129
+ # Returns the object in the form of hash
130
+ # @return [Hash] Returns the object in the form of hash
131
+ def to_hash
132
+ hash = {}
133
+ self.class.attribute_map.each_pair do |attr, param|
134
+ value = self.send(attr)
135
+ if value.nil?
136
+ is_nullable = self.class.openapi_nullable.include?(attr)
137
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
138
+ end
139
+
140
+ hash[param] = _to_hash(value)
141
+ end
142
+ hash
143
+ end
144
+
145
+ end
146
+
147
+ end
@@ -0,0 +1,156 @@
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.1
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 Late
17
+ class GetAdAnalytics200Response < ApiModelBase
18
+ attr_accessor :ad
19
+
20
+ attr_accessor :analytics
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'ad' => :'ad',
26
+ :'analytics' => :'analytics'
27
+ }
28
+ end
29
+
30
+ # Returns attribute mapping this model knows about
31
+ def self.acceptable_attribute_map
32
+ attribute_map
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ acceptable_attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'ad' => :'GetAdAnalytics200ResponseAd',
44
+ :'analytics' => :'GetAdAnalytics200ResponseAnalytics'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetAdAnalytics200Response` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ acceptable_attribute_map = self.class.acceptable_attribute_map
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!acceptable_attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetAdAnalytics200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'ad')
71
+ self.ad = attributes[:'ad']
72
+ end
73
+
74
+ if attributes.key?(:'analytics')
75
+ self.analytics = attributes[:'analytics']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ warn '[DEPRECATED] the `valid?` method is obsolete'
91
+ true
92
+ end
93
+
94
+ # Checks equality by comparing each attribute.
95
+ # @param [Object] Object to be compared
96
+ def ==(o)
97
+ return true if self.equal?(o)
98
+ self.class == o.class &&
99
+ ad == o.ad &&
100
+ analytics == o.analytics
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] Object to be compared
105
+ def eql?(o)
106
+ self == o
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Integer] Hash code
111
+ def hash
112
+ [ad, analytics].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def self.build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ attributes = attributes.transform_keys(&:to_sym)
121
+ transformed_hash = {}
122
+ openapi_types.each_pair do |key, type|
123
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
124
+ transformed_hash["#{key}"] = nil
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[attribute_map[key]].is_a?(Array)
129
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
130
+ end
131
+ elsif !attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
133
+ end
134
+ end
135
+ new(transformed_hash)
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = self.send(attr)
144
+ if value.nil?
145
+ is_nullable = self.class.openapi_nullable.include?(attr)
146
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
147
+ end
148
+
149
+ hash[param] = _to_hash(value)
150
+ end
151
+ hash
152
+ end
153
+
154
+ end
155
+
156
+ end
@@ -0,0 +1,174 @@
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.1
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 Late
17
+ class GetAdAnalytics200ResponseAd < ApiModelBase
18
+ attr_accessor :id
19
+
20
+ attr_accessor :name
21
+
22
+ attr_accessor :platform
23
+
24
+ attr_accessor :status
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'id' => :'id',
30
+ :'name' => :'name',
31
+ :'platform' => :'platform',
32
+ :'status' => :'status'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'id' => :'String',
50
+ :'name' => :'String',
51
+ :'platform' => :'String',
52
+ :'status' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Late::GetAdAnalytics200ResponseAd` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ acceptable_attribute_map = self.class.acceptable_attribute_map
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!acceptable_attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Late::GetAdAnalytics200ResponseAd`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'id')
79
+ self.id = attributes[:'id']
80
+ end
81
+
82
+ if attributes.key?(:'name')
83
+ self.name = attributes[:'name']
84
+ end
85
+
86
+ if attributes.key?(:'platform')
87
+ self.platform = attributes[:'platform']
88
+ end
89
+
90
+ if attributes.key?(:'status')
91
+ self.status = attributes[:'status']
92
+ end
93
+ end
94
+
95
+ # Show invalid properties with the reasons. Usually used together with valid?
96
+ # @return Array for valid properties with the reasons
97
+ def list_invalid_properties
98
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ warn '[DEPRECATED] the `valid?` method is obsolete'
107
+ true
108
+ end
109
+
110
+ # Checks equality by comparing each attribute.
111
+ # @param [Object] Object to be compared
112
+ def ==(o)
113
+ return true if self.equal?(o)
114
+ self.class == o.class &&
115
+ id == o.id &&
116
+ name == o.name &&
117
+ platform == o.platform &&
118
+ status == o.status
119
+ end
120
+
121
+ # @see the `==` method
122
+ # @param [Object] Object to be compared
123
+ def eql?(o)
124
+ self == o
125
+ end
126
+
127
+ # Calculates hash code according to all attributes.
128
+ # @return [Integer] Hash code
129
+ def hash
130
+ [id, name, platform, status].hash
131
+ end
132
+
133
+ # Builds the object from hash
134
+ # @param [Hash] attributes Model attributes in the form of hash
135
+ # @return [Object] Returns the model itself
136
+ def self.build_from_hash(attributes)
137
+ return nil unless attributes.is_a?(Hash)
138
+ attributes = attributes.transform_keys(&:to_sym)
139
+ transformed_hash = {}
140
+ openapi_types.each_pair do |key, type|
141
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
142
+ transformed_hash["#{key}"] = nil
143
+ elsif type =~ /\AArray<(.*)>/i
144
+ # check to ensure the input is an array given that the attribute
145
+ # is documented as an array but the input is not
146
+ if attributes[attribute_map[key]].is_a?(Array)
147
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
148
+ end
149
+ elsif !attributes[attribute_map[key]].nil?
150
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
151
+ end
152
+ end
153
+ new(transformed_hash)
154
+ end
155
+
156
+ # Returns the object in the form of hash
157
+ # @return [Hash] Returns the object in the form of hash
158
+ def to_hash
159
+ hash = {}
160
+ self.class.attribute_map.each_pair do |attr, param|
161
+ value = self.send(attr)
162
+ if value.nil?
163
+ is_nullable = self.class.openapi_nullable.include?(attr)
164
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
165
+ end
166
+
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ end
173
+
174
+ end
@@ -0,0 +1,169 @@
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.1
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 Late
17
+ class GetAdAnalytics200ResponseAnalytics < ApiModelBase
18
+ attr_accessor :summary
19
+
20
+ attr_accessor :daily
21
+
22
+ attr_accessor :breakdowns
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'summary' => :'summary',
28
+ :'daily' => :'daily',
29
+ :'breakdowns' => :'breakdowns'
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
+ :'summary' => :'AdMetrics',
47
+ :'daily' => :'Array<GetAdAnalytics200ResponseAnalyticsDailyInner>',
48
+ :'breakdowns' => :'Hash<String, Array<Object>>'
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 `Late::GetAdAnalytics200ResponseAnalytics` 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 `Late::GetAdAnalytics200ResponseAnalytics`. 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?(:'summary')
75
+ self.summary = attributes[:'summary']
76
+ end
77
+
78
+ if attributes.key?(:'daily')
79
+ if (value = attributes[:'daily']).is_a?(Array)
80
+ self.daily = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'breakdowns')
85
+ if (value = attributes[:'breakdowns']).is_a?(Hash)
86
+ self.breakdowns = value
87
+ end
88
+ end
89
+ end
90
+
91
+ # Show invalid properties with the reasons. Usually used together with valid?
92
+ # @return Array for valid properties with the reasons
93
+ def list_invalid_properties
94
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
95
+ invalid_properties = Array.new
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ warn '[DEPRECATED] the `valid?` method is obsolete'
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ summary == o.summary &&
112
+ daily == o.daily &&
113
+ breakdowns == o.breakdowns
114
+ end
115
+
116
+ # @see the `==` method
117
+ # @param [Object] Object to be compared
118
+ def eql?(o)
119
+ self == o
120
+ end
121
+
122
+ # Calculates hash code according to all attributes.
123
+ # @return [Integer] Hash code
124
+ def hash
125
+ [summary, daily, breakdowns].hash
126
+ end
127
+
128
+ # Builds the object from hash
129
+ # @param [Hash] attributes Model attributes in the form of hash
130
+ # @return [Object] Returns the model itself
131
+ def self.build_from_hash(attributes)
132
+ return nil unless attributes.is_a?(Hash)
133
+ attributes = attributes.transform_keys(&:to_sym)
134
+ transformed_hash = {}
135
+ openapi_types.each_pair do |key, type|
136
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
137
+ transformed_hash["#{key}"] = nil
138
+ elsif type =~ /\AArray<(.*)>/i
139
+ # check to ensure the input is an array given that the attribute
140
+ # is documented as an array but the input is not
141
+ if attributes[attribute_map[key]].is_a?(Array)
142
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
143
+ end
144
+ elsif !attributes[attribute_map[key]].nil?
145
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
146
+ end
147
+ end
148
+ new(transformed_hash)
149
+ end
150
+
151
+ # Returns the object in the form of hash
152
+ # @return [Hash] Returns the object in the form of hash
153
+ def to_hash
154
+ hash = {}
155
+ self.class.attribute_map.each_pair do |attr, param|
156
+ value = self.send(attr)
157
+ if value.nil?
158
+ is_nullable = self.class.openapi_nullable.include?(attr)
159
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
160
+ end
161
+
162
+ hash[param] = _to_hash(value)
163
+ end
164
+ hash
165
+ end
166
+
167
+ end
168
+
169
+ end