late-sdk 0.0.659 → 0.0.661
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.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/docs/APIKeysApi.md +67 -0
- data/docs/BoostPostRequest.md +3 -1
- data/docs/VerifyCredential200Response.md +24 -0
- data/lib/zernio-sdk/api/api_keys_api.rb +57 -0
- data/lib/zernio-sdk/models/boost_post_request.rb +14 -4
- data/lib/zernio-sdk/models/verify_credential200_response.rb +210 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +39 -0
- data/spec/api/api_keys_api_spec.rb +11 -0
- data/spec/models/boost_post_request_spec.rb +6 -0
- data/spec/models/verify_credential200_response_spec.rb +58 -0
- data/zernio-sdk-0.0.661.gem +0 -0
- metadata +6 -2
- data/zernio-sdk-0.0.659.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 37d0376a95480ce044f2c13176e787ba83481dfe78987b48f8a2a48b34f0411b
|
|
4
|
+
data.tar.gz: b1cc21ad8eaaa303885fd99331cbb7e97f2d89eaf321e51bdacd12f475aa487b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2082a43419dab31e0d2f4e4ef3e834f6aaab957f341dad8bd4841ceea57a18bd755c47f67d4e8e7fdd7a0a1d096bd6b80860713780c7434d62e301df8da16635
|
|
7
|
+
data.tar.gz: 5d0af3f094181516d6d72fe031ec4317ebed0fc617807d41766dc11461c5f12700e6ebc7464f0f2c12fb1f65673c24b1c5dc90d15f1af6857950d95259c9effc
|
data/README.md
CHANGED
|
@@ -69,6 +69,7 @@ Class | Method | HTTP request | Description
|
|
|
69
69
|
*Zernio::APIKeysApi* | [**create_api_key**](docs/APIKeysApi.md#create_api_key) | **POST** /v1/api-keys | Create key
|
|
70
70
|
*Zernio::APIKeysApi* | [**delete_api_key**](docs/APIKeysApi.md#delete_api_key) | **DELETE** /v1/api-keys/{keyId} | Delete key
|
|
71
71
|
*Zernio::APIKeysApi* | [**list_api_keys**](docs/APIKeysApi.md#list_api_keys) | **GET** /v1/api-keys | List keys
|
|
72
|
+
*Zernio::APIKeysApi* | [**verify_credential**](docs/APIKeysApi.md#verify_credential) | **GET** /v1/auth/verify | Verify credential
|
|
72
73
|
*Zernio::AccountGroupsApi* | [**create_account_group**](docs/AccountGroupsApi.md#create_account_group) | **POST** /v1/account-groups | Create group
|
|
73
74
|
*Zernio::AccountGroupsApi* | [**delete_account_group**](docs/AccountGroupsApi.md#delete_account_group) | **DELETE** /v1/account-groups/{groupId} | Delete group
|
|
74
75
|
*Zernio::AccountGroupsApi* | [**list_account_groups**](docs/AccountGroupsApi.md#list_account_groups) | **GET** /v1/account-groups | List groups
|
|
@@ -2063,6 +2064,7 @@ Class | Method | HTTP request | Description
|
|
|
2063
2064
|
- [Zernio::ValueRuleCriterion](docs/ValueRuleCriterion.md)
|
|
2064
2065
|
- [Zernio::ValueRuleSet](docs/ValueRuleSet.md)
|
|
2065
2066
|
- [Zernio::Verification](docs/Verification.md)
|
|
2067
|
+
- [Zernio::VerifyCredential200Response](docs/VerifyCredential200Response.md)
|
|
2066
2068
|
- [Zernio::VerifySmsRegistrationOtp200Response](docs/VerifySmsRegistrationOtp200Response.md)
|
|
2067
2069
|
- [Zernio::VerifySmsRegistrationOtpRequest](docs/VerifySmsRegistrationOtpRequest.md)
|
|
2068
2070
|
- [Zernio::VerifyWhatsAppCallerIdRequest](docs/VerifyWhatsAppCallerIdRequest.md)
|
data/docs/APIKeysApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
7
7
|
| [**create_api_key**](APIKeysApi.md#create_api_key) | **POST** /v1/api-keys | Create key |
|
|
8
8
|
| [**delete_api_key**](APIKeysApi.md#delete_api_key) | **DELETE** /v1/api-keys/{keyId} | Delete key |
|
|
9
9
|
| [**list_api_keys**](APIKeysApi.md#list_api_keys) | **GET** /v1/api-keys | List keys |
|
|
10
|
+
| [**verify_credential**](APIKeysApi.md#verify_credential) | **GET** /v1/auth/verify | Verify credential |
|
|
10
11
|
|
|
11
12
|
|
|
12
13
|
## create_api_key
|
|
@@ -212,3 +213,69 @@ This endpoint does not need any parameter.
|
|
|
212
213
|
- **Content-Type**: Not defined
|
|
213
214
|
- **Accept**: application/json
|
|
214
215
|
|
|
216
|
+
|
|
217
|
+
## verify_credential
|
|
218
|
+
|
|
219
|
+
> <VerifyCredential200Response> verify_credential
|
|
220
|
+
|
|
221
|
+
Verify credential
|
|
222
|
+
|
|
223
|
+
Checks whether the bearer credential on this request is valid, without reading any data. Accepts an API key or an OAuth access token. Intended for clients that must validate a credential before use (for example an MCP server verifying an incoming token) so they do not have to call a data endpoint to do it.
|
|
224
|
+
|
|
225
|
+
### Examples
|
|
226
|
+
|
|
227
|
+
```ruby
|
|
228
|
+
require 'time'
|
|
229
|
+
require 'zernio-sdk'
|
|
230
|
+
# setup authorization
|
|
231
|
+
Zernio.configure do |config|
|
|
232
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
233
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
api_instance = Zernio::APIKeysApi.new
|
|
237
|
+
|
|
238
|
+
begin
|
|
239
|
+
# Verify credential
|
|
240
|
+
result = api_instance.verify_credential
|
|
241
|
+
p result
|
|
242
|
+
rescue Zernio::ApiError => e
|
|
243
|
+
puts "Error when calling APIKeysApi->verify_credential: #{e}"
|
|
244
|
+
end
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
#### Using the verify_credential_with_http_info variant
|
|
248
|
+
|
|
249
|
+
This returns an Array which contains the response data, status code and headers.
|
|
250
|
+
|
|
251
|
+
> <Array(<VerifyCredential200Response>, Integer, Hash)> verify_credential_with_http_info
|
|
252
|
+
|
|
253
|
+
```ruby
|
|
254
|
+
begin
|
|
255
|
+
# Verify credential
|
|
256
|
+
data, status_code, headers = api_instance.verify_credential_with_http_info
|
|
257
|
+
p status_code # => 2xx
|
|
258
|
+
p headers # => { ... }
|
|
259
|
+
p data # => <VerifyCredential200Response>
|
|
260
|
+
rescue Zernio::ApiError => e
|
|
261
|
+
puts "Error when calling APIKeysApi->verify_credential_with_http_info: #{e}"
|
|
262
|
+
end
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
### Parameters
|
|
266
|
+
|
|
267
|
+
This endpoint does not need any parameter.
|
|
268
|
+
|
|
269
|
+
### Return type
|
|
270
|
+
|
|
271
|
+
[**VerifyCredential200Response**](VerifyCredential200Response.md)
|
|
272
|
+
|
|
273
|
+
### Authorization
|
|
274
|
+
|
|
275
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
276
|
+
|
|
277
|
+
### HTTP request headers
|
|
278
|
+
|
|
279
|
+
- **Content-Type**: Not defined
|
|
280
|
+
- **Accept**: application/json
|
|
281
|
+
|
data/docs/BoostPostRequest.md
CHANGED
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
| **spark_auth_code** | **String** | TikTok-only. Spark Code (creator's `auth_code`) authorizing cross-creator Spark Ads — the advertiser can boost a video owned by a DIFFERENT TikTok account. Without this, boosts are limited to videos owned by the same account running the ads (same-BC creators only). The creator generates the code in their TikTok app's Promote settings and shares it with the advertiser. Maps to `auth_code` on the creative entry of /v2/ad/create/. | [optional] |
|
|
28
28
|
| **dsa_beneficiary** | **String** | Legal entity that benefits from the ad. Required when targeting EU users (EU DSA, Article 26). Optional if the ad account has a default beneficiary: set it once via `PATCH /v1/ads/accounts` or in Meta Ads Manager, and Meta fills it in whenever the field is omitted. | [optional] |
|
|
29
29
|
| **dsa_payor** | **String** | Legal entity that pays for the ad. Can differ from `dsaBeneficiary` (for example, an agency paying for a client's ads). Same rules as `dsaBeneficiary`: required for EU targeting unless the ad account has a default payor. | [optional] |
|
|
30
|
+
| **optimization_goal** | **String** | Meta only. Explicit ad-set `optimization_goal` override. When omitted, defaults to the value derived from `goal`. The value must be compatible with the objective Meta derives from `goal`, not with the objective used by `POST /v1/ads/create` for the same `goal` name: boost maps `goal: \"engagement\"` to objective `OUTCOME_AWARENESS`, which accepts `REACH`, `IMPRESSIONS`, `AD_RECALL_LIFT`, or THRUPLAY-class values, and rejects `POST_ENGAGEMENT` (that value is only valid under `OUTCOME_ENGAGEMENT`, which create uses for the same goal name). | [optional] |
|
|
30
31
|
|
|
31
32
|
## Example
|
|
32
33
|
|
|
@@ -56,7 +57,8 @@ instance = Zernio::BoostPostRequest.new(
|
|
|
56
57
|
call_to_action: null,
|
|
57
58
|
spark_auth_code: null,
|
|
58
59
|
dsa_beneficiary: null,
|
|
59
|
-
dsa_payor: null
|
|
60
|
+
dsa_payor: null,
|
|
61
|
+
optimization_goal: null
|
|
60
62
|
)
|
|
61
63
|
```
|
|
62
64
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::VerifyCredential200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **valid** | **Boolean** | | [optional] |
|
|
8
|
+
| **user_id** | **String** | | [optional] |
|
|
9
|
+
| **auth_type** | **String** | | [optional] |
|
|
10
|
+
| **scope** | **String** | Granted OAuth scopes, space-separated. Null for API keys. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::VerifyCredential200Response.new(
|
|
18
|
+
valid: null,
|
|
19
|
+
user_id: null,
|
|
20
|
+
auth_type: null,
|
|
21
|
+
scope: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -206,5 +206,62 @@ module Zernio
|
|
|
206
206
|
end
|
|
207
207
|
return data, status_code, headers
|
|
208
208
|
end
|
|
209
|
+
|
|
210
|
+
# Verify credential
|
|
211
|
+
# Checks whether the bearer credential on this request is valid, without reading any data. Accepts an API key or an OAuth access token. Intended for clients that must validate a credential before use (for example an MCP server verifying an incoming token) so they do not have to call a data endpoint to do it.
|
|
212
|
+
# @param [Hash] opts the optional parameters
|
|
213
|
+
# @return [VerifyCredential200Response]
|
|
214
|
+
def verify_credential(opts = {})
|
|
215
|
+
data, _status_code, _headers = verify_credential_with_http_info(opts)
|
|
216
|
+
data
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Verify credential
|
|
220
|
+
# Checks whether the bearer credential on this request is valid, without reading any data. Accepts an API key or an OAuth access token. Intended for clients that must validate a credential before use (for example an MCP server verifying an incoming token) so they do not have to call a data endpoint to do it.
|
|
221
|
+
# @param [Hash] opts the optional parameters
|
|
222
|
+
# @return [Array<(VerifyCredential200Response, Integer, Hash)>] VerifyCredential200Response data, response status code and response headers
|
|
223
|
+
def verify_credential_with_http_info(opts = {})
|
|
224
|
+
if @api_client.config.debugging
|
|
225
|
+
@api_client.config.logger.debug 'Calling API: APIKeysApi.verify_credential ...'
|
|
226
|
+
end
|
|
227
|
+
# resource path
|
|
228
|
+
local_var_path = '/v1/auth/verify'
|
|
229
|
+
|
|
230
|
+
# query parameters
|
|
231
|
+
query_params = opts[:query_params] || {}
|
|
232
|
+
|
|
233
|
+
# header parameters
|
|
234
|
+
header_params = opts[:header_params] || {}
|
|
235
|
+
# HTTP header 'Accept' (if needed)
|
|
236
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
237
|
+
|
|
238
|
+
# form parameters
|
|
239
|
+
form_params = opts[:form_params] || {}
|
|
240
|
+
|
|
241
|
+
# http body (model)
|
|
242
|
+
post_body = opts[:debug_body]
|
|
243
|
+
|
|
244
|
+
# return_type
|
|
245
|
+
return_type = opts[:debug_return_type] || 'VerifyCredential200Response'
|
|
246
|
+
|
|
247
|
+
# auth_names
|
|
248
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
249
|
+
|
|
250
|
+
new_options = opts.merge(
|
|
251
|
+
:operation => :"APIKeysApi.verify_credential",
|
|
252
|
+
:header_params => header_params,
|
|
253
|
+
:query_params => query_params,
|
|
254
|
+
:form_params => form_params,
|
|
255
|
+
:body => post_body,
|
|
256
|
+
:auth_names => auth_names,
|
|
257
|
+
:return_type => return_type
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
261
|
+
if @api_client.config.debugging
|
|
262
|
+
@api_client.config.logger.debug "API called: APIKeysApi#verify_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
263
|
+
end
|
|
264
|
+
return data, status_code, headers
|
|
265
|
+
end
|
|
209
266
|
end
|
|
210
267
|
end
|
|
@@ -77,6 +77,9 @@ module Zernio
|
|
|
77
77
|
# Legal entity that pays for the ad. Can differ from `dsaBeneficiary` (for example, an agency paying for a client's ads). Same rules as `dsaBeneficiary`: required for EU targeting unless the ad account has a default payor.
|
|
78
78
|
attr_accessor :dsa_payor
|
|
79
79
|
|
|
80
|
+
# Meta only. Explicit ad-set `optimization_goal` override. When omitted, defaults to the value derived from `goal`. The value must be compatible with the objective Meta derives from `goal`, not with the objective used by `POST /v1/ads/create` for the same `goal` name: boost maps `goal: \"engagement\"` to objective `OUTCOME_AWARENESS`, which accepts `REACH`, `IMPRESSIONS`, `AD_RECALL_LIFT`, or THRUPLAY-class values, and rejects `POST_ENGAGEMENT` (that value is only valid under `OUTCOME_ENGAGEMENT`, which create uses for the same goal name).
|
|
81
|
+
attr_accessor :optimization_goal
|
|
82
|
+
|
|
80
83
|
class EnumAttributeValidator
|
|
81
84
|
attr_reader :datatype
|
|
82
85
|
attr_reader :allowable_values
|
|
@@ -124,7 +127,8 @@ module Zernio
|
|
|
124
127
|
:'call_to_action' => :'callToAction',
|
|
125
128
|
:'spark_auth_code' => :'sparkAuthCode',
|
|
126
129
|
:'dsa_beneficiary' => :'dsaBeneficiary',
|
|
127
|
-
:'dsa_payor' => :'dsaPayor'
|
|
130
|
+
:'dsa_payor' => :'dsaPayor',
|
|
131
|
+
:'optimization_goal' => :'optimizationGoal'
|
|
128
132
|
}
|
|
129
133
|
end
|
|
130
134
|
|
|
@@ -163,7 +167,8 @@ module Zernio
|
|
|
163
167
|
:'call_to_action' => :'String',
|
|
164
168
|
:'spark_auth_code' => :'String',
|
|
165
169
|
:'dsa_beneficiary' => :'String',
|
|
166
|
-
:'dsa_payor' => :'String'
|
|
170
|
+
:'dsa_payor' => :'String',
|
|
171
|
+
:'optimization_goal' => :'String'
|
|
167
172
|
}
|
|
168
173
|
end
|
|
169
174
|
|
|
@@ -296,6 +301,10 @@ module Zernio
|
|
|
296
301
|
if attributes.key?(:'dsa_payor')
|
|
297
302
|
self.dsa_payor = attributes[:'dsa_payor']
|
|
298
303
|
end
|
|
304
|
+
|
|
305
|
+
if attributes.key?(:'optimization_goal')
|
|
306
|
+
self.optimization_goal = attributes[:'optimization_goal']
|
|
307
|
+
end
|
|
299
308
|
end
|
|
300
309
|
|
|
301
310
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -464,7 +473,8 @@ module Zernio
|
|
|
464
473
|
call_to_action == o.call_to_action &&
|
|
465
474
|
spark_auth_code == o.spark_auth_code &&
|
|
466
475
|
dsa_beneficiary == o.dsa_beneficiary &&
|
|
467
|
-
dsa_payor == o.dsa_payor
|
|
476
|
+
dsa_payor == o.dsa_payor &&
|
|
477
|
+
optimization_goal == o.optimization_goal
|
|
468
478
|
end
|
|
469
479
|
|
|
470
480
|
# @see the `==` method
|
|
@@ -476,7 +486,7 @@ module Zernio
|
|
|
476
486
|
# Calculates hash code according to all attributes.
|
|
477
487
|
# @return [Integer] Hash code
|
|
478
488
|
def hash
|
|
479
|
-
[post_id, platform_post_id, account_id, ad_account_id, name, goal, budget, currency, schedule, targeting, raw_targeting, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, tracking, special_ad_categories, special_ad_category_country, link_url, call_to_action, spark_auth_code, dsa_beneficiary, dsa_payor].hash
|
|
489
|
+
[post_id, platform_post_id, account_id, ad_account_id, name, goal, budget, currency, schedule, targeting, raw_targeting, bid_strategy, bid_amount, roas_average_floor, platform_specific_data, tracking, special_ad_categories, special_ad_category_country, link_url, call_to_action, spark_auth_code, dsa_beneficiary, dsa_payor, optimization_goal].hash
|
|
480
490
|
end
|
|
481
491
|
|
|
482
492
|
# Builds the object from hash
|
|
@@ -0,0 +1,210 @@
|
|
|
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 VerifyCredential200Response < ApiModelBase
|
|
18
|
+
attr_accessor :valid
|
|
19
|
+
|
|
20
|
+
attr_accessor :user_id
|
|
21
|
+
|
|
22
|
+
attr_accessor :auth_type
|
|
23
|
+
|
|
24
|
+
# Granted OAuth scopes, space-separated. Null for API keys.
|
|
25
|
+
attr_accessor :scope
|
|
26
|
+
|
|
27
|
+
class EnumAttributeValidator
|
|
28
|
+
attr_reader :datatype
|
|
29
|
+
attr_reader :allowable_values
|
|
30
|
+
|
|
31
|
+
def initialize(datatype, allowable_values)
|
|
32
|
+
@allowable_values = allowable_values.map do |value|
|
|
33
|
+
case datatype.to_s
|
|
34
|
+
when /Integer/i
|
|
35
|
+
value.to_i
|
|
36
|
+
when /Float/i
|
|
37
|
+
value.to_f
|
|
38
|
+
else
|
|
39
|
+
value
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def valid?(value)
|
|
45
|
+
!value || allowable_values.include?(value)
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
|
+
def self.attribute_map
|
|
51
|
+
{
|
|
52
|
+
:'valid' => :'valid',
|
|
53
|
+
:'user_id' => :'userId',
|
|
54
|
+
:'auth_type' => :'authType',
|
|
55
|
+
:'scope' => :'scope'
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Returns attribute mapping this model knows about
|
|
60
|
+
def self.acceptable_attribute_map
|
|
61
|
+
attribute_map
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Returns all the JSON keys this model knows about
|
|
65
|
+
def self.acceptable_attributes
|
|
66
|
+
acceptable_attribute_map.values
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Attribute type mapping.
|
|
70
|
+
def self.openapi_types
|
|
71
|
+
{
|
|
72
|
+
:'valid' => :'Boolean',
|
|
73
|
+
:'user_id' => :'String',
|
|
74
|
+
:'auth_type' => :'String',
|
|
75
|
+
:'scope' => :'String'
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# List of attributes with nullable: true
|
|
80
|
+
def self.openapi_nullable
|
|
81
|
+
Set.new([
|
|
82
|
+
:'scope'
|
|
83
|
+
])
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Initializes the object
|
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
88
|
+
def initialize(attributes = {})
|
|
89
|
+
if (!attributes.is_a?(Hash))
|
|
90
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::VerifyCredential200Response` initialize method"
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
94
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
96
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
97
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::VerifyCredential200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
98
|
+
end
|
|
99
|
+
h[k.to_sym] = v
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if attributes.key?(:'valid')
|
|
103
|
+
self.valid = attributes[:'valid']
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if attributes.key?(:'user_id')
|
|
107
|
+
self.user_id = attributes[:'user_id']
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'auth_type')
|
|
111
|
+
self.auth_type = attributes[:'auth_type']
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if attributes.key?(:'scope')
|
|
115
|
+
self.scope = attributes[:'scope']
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
120
|
+
# @return Array for valid properties with the reasons
|
|
121
|
+
def list_invalid_properties
|
|
122
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
123
|
+
invalid_properties = Array.new
|
|
124
|
+
invalid_properties
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Check to see if the all the properties in the model are valid
|
|
128
|
+
# @return true if the model is valid
|
|
129
|
+
def valid?
|
|
130
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
131
|
+
auth_type_validator = EnumAttributeValidator.new('String', ["api_key", "oauth", "session"])
|
|
132
|
+
return false unless auth_type_validator.valid?(@auth_type)
|
|
133
|
+
true
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
137
|
+
# @param [Object] auth_type Object to be assigned
|
|
138
|
+
def auth_type=(auth_type)
|
|
139
|
+
validator = EnumAttributeValidator.new('String', ["api_key", "oauth", "session"])
|
|
140
|
+
unless validator.valid?(auth_type)
|
|
141
|
+
fail ArgumentError, "invalid value for \"auth_type\", must be one of #{validator.allowable_values}."
|
|
142
|
+
end
|
|
143
|
+
@auth_type = auth_type
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Checks equality by comparing each attribute.
|
|
147
|
+
# @param [Object] Object to be compared
|
|
148
|
+
def ==(o)
|
|
149
|
+
return true if self.equal?(o)
|
|
150
|
+
self.class == o.class &&
|
|
151
|
+
valid == o.valid &&
|
|
152
|
+
user_id == o.user_id &&
|
|
153
|
+
auth_type == o.auth_type &&
|
|
154
|
+
scope == o.scope
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# @see the `==` method
|
|
158
|
+
# @param [Object] Object to be compared
|
|
159
|
+
def eql?(o)
|
|
160
|
+
self == o
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# Calculates hash code according to all attributes.
|
|
164
|
+
# @return [Integer] Hash code
|
|
165
|
+
def hash
|
|
166
|
+
[valid, user_id, auth_type, scope].hash
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Builds the object from hash
|
|
170
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
171
|
+
# @return [Object] Returns the model itself
|
|
172
|
+
def self.build_from_hash(attributes)
|
|
173
|
+
return nil unless attributes.is_a?(Hash)
|
|
174
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
175
|
+
transformed_hash = {}
|
|
176
|
+
openapi_types.each_pair do |key, type|
|
|
177
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
178
|
+
transformed_hash["#{key}"] = nil
|
|
179
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
180
|
+
# check to ensure the input is an array given that the attribute
|
|
181
|
+
# is documented as an array but the input is not
|
|
182
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
183
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
184
|
+
end
|
|
185
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
186
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
new(transformed_hash)
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the object in the form of hash
|
|
193
|
+
# @return [Hash] Returns the object in the form of hash
|
|
194
|
+
def to_hash
|
|
195
|
+
hash = {}
|
|
196
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
197
|
+
value = self.send(attr)
|
|
198
|
+
if value.nil?
|
|
199
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
200
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
hash[param] = _to_hash(value)
|
|
204
|
+
end
|
|
205
|
+
hash
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -1472,6 +1472,7 @@ require 'zernio-sdk/models/value_rule'
|
|
|
1472
1472
|
require 'zernio-sdk/models/value_rule_criterion'
|
|
1473
1473
|
require 'zernio-sdk/models/value_rule_set'
|
|
1474
1474
|
require 'zernio-sdk/models/verification'
|
|
1475
|
+
require 'zernio-sdk/models/verify_credential200_response'
|
|
1475
1476
|
require 'zernio-sdk/models/verify_sms_registration_otp200_response'
|
|
1476
1477
|
require 'zernio-sdk/models/verify_sms_registration_otp_request'
|
|
1477
1478
|
require 'zernio-sdk/models/verify_whats_app_caller_id_request'
|
data/openapi.yaml
CHANGED
|
@@ -14878,6 +14878,34 @@ paths:
|
|
|
14878
14878
|
error: { type: string }
|
|
14879
14879
|
example:
|
|
14880
14880
|
error: "TikTok creator has reached the daily posting limit. Please try again later."
|
|
14881
|
+
/v1/auth/verify:
|
|
14882
|
+
get:
|
|
14883
|
+
operationId: verifyCredential
|
|
14884
|
+
tags: [API Keys]
|
|
14885
|
+
summary: Verify credential
|
|
14886
|
+
description: 'Checks whether the bearer credential on this request is valid, without reading any data. Accepts an API key or an OAuth access token. Intended for clients that must validate a credential before use (for example an MCP server verifying an incoming token) so they do not have to call a data endpoint to do it.'
|
|
14887
|
+
responses:
|
|
14888
|
+
'200':
|
|
14889
|
+
description: Credential is valid
|
|
14890
|
+
content:
|
|
14891
|
+
application/json:
|
|
14892
|
+
schema:
|
|
14893
|
+
type: object
|
|
14894
|
+
properties:
|
|
14895
|
+
valid: { type: boolean }
|
|
14896
|
+
userId: { type: string }
|
|
14897
|
+
authType:
|
|
14898
|
+
type: string
|
|
14899
|
+
enum: [api_key, oauth, session]
|
|
14900
|
+
scope:
|
|
14901
|
+
type: [string, 'null']
|
|
14902
|
+
description: 'Granted OAuth scopes, space-separated. Null for API keys.'
|
|
14903
|
+
example:
|
|
14904
|
+
valid: true
|
|
14905
|
+
userId: "6507a1b2c3d4e5f6a7b8c9d0"
|
|
14906
|
+
authType: "oauth"
|
|
14907
|
+
scope: "posts:read posts:write accounts:read"
|
|
14908
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
14881
14909
|
/v1/api-keys:
|
|
14882
14910
|
get:
|
|
14883
14911
|
operationId: listApiKeys
|
|
@@ -38399,6 +38427,17 @@ paths:
|
|
|
38399
38427
|
(for example, an agency paying for a client's ads). Same rules as
|
|
38400
38428
|
`dsaBeneficiary`: required for EU targeting unless the ad account has
|
|
38401
38429
|
a default payor.
|
|
38430
|
+
optimizationGoal:
|
|
38431
|
+
type: string
|
|
38432
|
+
description: |
|
|
38433
|
+
Meta only. Explicit ad-set `optimization_goal` override. When omitted,
|
|
38434
|
+
defaults to the value derived from `goal`. The value must be compatible
|
|
38435
|
+
with the objective Meta derives from `goal`, not with the objective used
|
|
38436
|
+
by `POST /v1/ads/create` for the same `goal` name: boost maps `goal:
|
|
38437
|
+
"engagement"` to objective `OUTCOME_AWARENESS`, which accepts
|
|
38438
|
+
`REACH`, `IMPRESSIONS`, `AD_RECALL_LIFT`, or THRUPLAY-class values, and
|
|
38439
|
+
rejects `POST_ENGAGEMENT` (that value is only valid under
|
|
38440
|
+
`OUTCOME_ENGAGEMENT`, which create uses for the same goal name).
|
|
38402
38441
|
responses:
|
|
38403
38442
|
'201':
|
|
38404
38443
|
description: Ad created
|
|
@@ -67,4 +67,15 @@ describe 'APIKeysApi' do
|
|
|
67
67
|
end
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
+
# unit tests for verify_credential
|
|
71
|
+
# Verify credential
|
|
72
|
+
# Checks whether the bearer credential on this request is valid, without reading any data. Accepts an API key or an OAuth access token. Intended for clients that must validate a credential before use (for example an MCP server verifying an incoming token) so they do not have to call a data endpoint to do it.
|
|
73
|
+
# @param [Hash] opts the optional parameters
|
|
74
|
+
# @return [VerifyCredential200Response]
|
|
75
|
+
describe 'verify_credential test' do
|
|
76
|
+
it 'should work' do
|
|
77
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
70
81
|
end
|
|
@@ -173,4 +173,10 @@ describe Zernio::BoostPostRequest do
|
|
|
173
173
|
end
|
|
174
174
|
end
|
|
175
175
|
|
|
176
|
+
describe 'test attribute "optimization_goal"' do
|
|
177
|
+
it 'should work' do
|
|
178
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
176
182
|
end
|
|
@@ -0,0 +1,58 @@
|
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::VerifyCredential200Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::VerifyCredential200Response do
|
|
21
|
+
#let(:instance) { Zernio::VerifyCredential200Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of VerifyCredential200Response' do
|
|
24
|
+
it 'should create an instance of VerifyCredential200Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::VerifyCredential200Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "valid"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "user_id"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "auth_type"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["api_key", "oauth", "session"])
|
|
46
|
+
# validator.allowable_values.each do |value|
|
|
47
|
+
# expect { instance.auth_type = value }.not_to raise_error
|
|
48
|
+
# end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
describe 'test attribute "scope"' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
end
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: late-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.661
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -1571,6 +1571,7 @@ files:
|
|
|
1571
1571
|
- docs/ValueRuleSet.md
|
|
1572
1572
|
- docs/Verification.md
|
|
1573
1573
|
- docs/VerifyApi.md
|
|
1574
|
+
- docs/VerifyCredential200Response.md
|
|
1574
1575
|
- docs/VerifySmsRegistrationOtp200Response.md
|
|
1575
1576
|
- docs/VerifySmsRegistrationOtpRequest.md
|
|
1576
1577
|
- docs/VerifyWhatsAppCallerIdRequest.md
|
|
@@ -3220,6 +3221,7 @@ files:
|
|
|
3220
3221
|
- lib/zernio-sdk/models/value_rule_criterion.rb
|
|
3221
3222
|
- lib/zernio-sdk/models/value_rule_set.rb
|
|
3222
3223
|
- lib/zernio-sdk/models/verification.rb
|
|
3224
|
+
- lib/zernio-sdk/models/verify_credential200_response.rb
|
|
3223
3225
|
- lib/zernio-sdk/models/verify_sms_registration_otp200_response.rb
|
|
3224
3226
|
- lib/zernio-sdk/models/verify_sms_registration_otp_request.rb
|
|
3225
3227
|
- lib/zernio-sdk/models/verify_whats_app_caller_id_request.rb
|
|
@@ -4853,6 +4855,7 @@ files:
|
|
|
4853
4855
|
- spec/models/value_rule_set_spec.rb
|
|
4854
4856
|
- spec/models/value_rule_spec.rb
|
|
4855
4857
|
- spec/models/verification_spec.rb
|
|
4858
|
+
- spec/models/verify_credential200_response_spec.rb
|
|
4856
4859
|
- spec/models/verify_sms_registration_otp200_response_spec.rb
|
|
4857
4860
|
- spec/models/verify_sms_registration_otp_request_spec.rb
|
|
4858
4861
|
- spec/models/verify_whats_app_caller_id_request_spec.rb
|
|
@@ -4967,7 +4970,7 @@ files:
|
|
|
4967
4970
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
4968
4971
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
4969
4972
|
- spec/spec_helper.rb
|
|
4970
|
-
- zernio-sdk-0.0.
|
|
4973
|
+
- zernio-sdk-0.0.661.gem
|
|
4971
4974
|
- zernio-sdk.gemspec
|
|
4972
4975
|
homepage: https://openapi-generator.tech
|
|
4973
4976
|
licenses:
|
|
@@ -6605,6 +6608,7 @@ test_files:
|
|
|
6605
6608
|
- spec/models/add_broadcast_recipients_request_spec.rb
|
|
6606
6609
|
- spec/models/add_conversion_associations200_response_failed_inner_spec.rb
|
|
6607
6610
|
- spec/models/get_account_health200_response_permissions_posting_inner_spec.rb
|
|
6611
|
+
- spec/models/verify_credential200_response_spec.rb
|
|
6608
6612
|
- spec/models/update_youtube_default_playlist200_response_spec.rb
|
|
6609
6613
|
- spec/models/list_value_rule_sets200_response_paging_spec.rb
|
|
6610
6614
|
- spec/models/list_sms_sender_ids200_response_budget_pending_request_spec.rb
|
data/zernio-sdk-0.0.659.gem
DELETED
|
Binary file
|