late-sdk 0.0.704 → 0.0.706
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 +9 -0
- data/docs/AdAccountsApi.md +214 -0
- data/docs/CreateAdCreativeRequest.md +3 -1
- data/docs/CreateCustomConversionRequest.md +26 -0
- data/docs/CreateHighDemandPeriod201Response.md +20 -0
- data/docs/CreateHighDemandPeriodRequest.md +34 -0
- data/docs/CreateStandaloneAdRequest.md +2 -0
- data/docs/CustomConversion.md +28 -0
- data/docs/CustomConversionResult.md +24 -0
- data/docs/GetMediaPresignedUrl200Response.md +2 -2
- data/docs/GetMediaPresignedUrlRequest.md +1 -3
- data/docs/ListCustomConversions200Response.md +20 -0
- data/docs/MediaApi.md +1 -1
- data/lib/zernio-sdk/api/ad_accounts_api.rb +212 -0
- data/lib/zernio-sdk/api/media_api.rb +2 -2
- data/lib/zernio-sdk/models/create_ad_creative_request.rb +26 -4
- data/lib/zernio-sdk/models/create_custom_conversion_request.rb +282 -0
- data/lib/zernio-sdk/models/create_high_demand_period201_response.rb +158 -0
- data/lib/zernio-sdk/models/create_high_demand_period_request.rb +347 -0
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +23 -1
- data/lib/zernio-sdk/models/custom_conversion.rb +198 -0
- data/lib/zernio-sdk/models/custom_conversion_result.rb +176 -0
- data/lib/zernio-sdk/models/get_media_presigned_url200_response.rb +2 -2
- data/lib/zernio-sdk/models/get_media_presigned_url_request.rb +4 -16
- data/lib/zernio-sdk/models/list_custom_conversions200_response.rb +158 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +6 -0
- data/openapi.yaml +154 -16
- data/spec/api/ad_accounts_api_spec.rb +38 -0
- data/spec/api/media_api_spec.rb +1 -1
- data/spec/models/create_ad_creative_request_spec.rb +10 -0
- data/spec/models/create_custom_conversion_request_spec.rb +60 -0
- data/spec/models/create_high_demand_period201_response_spec.rb +42 -0
- data/spec/models/create_high_demand_period_request_spec.rb +92 -0
- data/spec/models/create_standalone_ad_request_spec.rb +10 -0
- data/spec/models/custom_conversion_result_spec.rb +54 -0
- data/spec/models/custom_conversion_spec.rb +66 -0
- data/spec/models/get_media_presigned_url_request_spec.rb +0 -6
- data/spec/models/list_custom_conversions200_response_spec.rb +42 -0
- data/zernio-sdk-0.0.706.gem +0 -0
- metadata +26 -2
- data/zernio-sdk-0.0.704.gem +0 -0
data/openapi.yaml
CHANGED
|
@@ -7856,6 +7856,22 @@ components:
|
|
|
7856
7856
|
platformAdSetId: { type: string }
|
|
7857
7857
|
message: { type: string }
|
|
7858
7858
|
|
|
7859
|
+
CustomConversion:
|
|
7860
|
+
type: object
|
|
7861
|
+
properties:
|
|
7862
|
+
id: { type: string }
|
|
7863
|
+
name: { type: [string, "null"] }
|
|
7864
|
+
rule: { type: [object, "null"], description: "Meta's rule, parsed back from the string Meta stores." }
|
|
7865
|
+
customEventType: { type: [string, "null"] }
|
|
7866
|
+
pixelId: { type: [string, "null"], description: "Meta's event_source_id — the pixel the rule reads from." }
|
|
7867
|
+
isArchived: { type: boolean }
|
|
7868
|
+
CustomConversionResult:
|
|
7869
|
+
type: object
|
|
7870
|
+
properties:
|
|
7871
|
+
adAccountId: { type: string }
|
|
7872
|
+
customConversionId: { type: string, description: "Drops straight into promotedObject.customConversionId on POST /v1/ads/create." }
|
|
7873
|
+
reused: { type: boolean, description: "True when an existing conversion matched name + pixelId; the response is then a 200." }
|
|
7874
|
+
customConversion: { $ref: '#/components/schemas/CustomConversion' }
|
|
7859
7875
|
TrackingTag:
|
|
7860
7876
|
type: object
|
|
7861
7877
|
description: |
|
|
@@ -12317,15 +12333,7 @@ paths:
|
|
|
12317
12333
|
operationId: getMediaPresignedUrl
|
|
12318
12334
|
tags: [Media]
|
|
12319
12335
|
summary: Get upload URL
|
|
12320
|
-
description:
|
|
12321
|
-
Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an
|
|
12322
|
-
uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.
|
|
12323
|
-
|
|
12324
|
-
By default the file is written to temporary storage and auto-deletes 7 days after upload,
|
|
12325
|
-
so the publicUrl stops resolving once that window passes. Send `permanent: true` to write
|
|
12326
|
-
straight to permanent storage, which has no expiry: use it for anything that must stay
|
|
12327
|
-
reachable for longer, in particular cover and thumbnail images on posts scheduled more
|
|
12328
|
-
than a week out.
|
|
12336
|
+
description: Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.
|
|
12329
12337
|
requestBody:
|
|
12330
12338
|
required: true
|
|
12331
12339
|
content:
|
|
@@ -12367,11 +12375,6 @@ paths:
|
|
|
12367
12375
|
type: integer
|
|
12368
12376
|
description: Optional file size in bytes for pre-validation (max 5GB)
|
|
12369
12377
|
example: 15234567
|
|
12370
|
-
permanent:
|
|
12371
|
-
type: boolean
|
|
12372
|
-
default: false
|
|
12373
|
-
description: 'Write the file to permanent storage instead of temporary storage. Temporary files auto-delete 7 days after upload; permanent files never expire.'
|
|
12374
|
-
example: true
|
|
12375
12378
|
responses:
|
|
12376
12379
|
'200':
|
|
12377
12380
|
description: Presigned URL generated successfully
|
|
@@ -12387,10 +12390,10 @@ paths:
|
|
|
12387
12390
|
publicUrl:
|
|
12388
12391
|
type: string
|
|
12389
12392
|
format: uri
|
|
12390
|
-
description:
|
|
12393
|
+
description: Public URL where the file will be accessible after upload
|
|
12391
12394
|
key:
|
|
12392
12395
|
type: string
|
|
12393
|
-
description:
|
|
12396
|
+
description: Storage key/path of the file
|
|
12394
12397
|
expiresIn:
|
|
12395
12398
|
type: integer
|
|
12396
12399
|
description: Seconds until the presigned uploadUrl expires (always 3600)
|
|
@@ -39105,6 +39108,54 @@ paths:
|
|
|
39105
39108
|
'400': { description: "Invalid input, or Meta rejected the query" }
|
|
39106
39109
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
39107
39110
|
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
39111
|
+
post:
|
|
39112
|
+
x-resource-group: "ads"
|
|
39113
|
+
operationId: createHighDemandPeriod
|
|
39114
|
+
tags: ["Ad Accounts"]
|
|
39115
|
+
x-platforms: ["meta"]
|
|
39116
|
+
summary: Schedule a budget increase
|
|
39117
|
+
description: |-
|
|
39118
|
+
Pre-schedule a temporary budget increase (Black Friday, a launch, a sale) instead of
|
|
39119
|
+
editing the budget by hand on the day. Same target rule as the GET: exactly one of
|
|
39120
|
+
`campaignId` / `adSetId`.
|
|
39121
|
+
|
|
39122
|
+
Two Meta constraints worth knowing before you call it. `timeStart` / `timeEnd` must
|
|
39123
|
+
fall on a 15-minute boundary, and a campaign cannot mix `ABSOLUTE` and `MULTIPLIER`
|
|
39124
|
+
across its schedules — the second type is rejected with "Can't mix your budget scaling
|
|
39125
|
+
selection". Window rules (must sit inside the campaign's run dates, minimum lead time,
|
|
39126
|
+
no overlap) are Meta's and its message is forwarded verbatim.
|
|
39127
|
+
security:
|
|
39128
|
+
- bearerAuth: []
|
|
39129
|
+
requestBody:
|
|
39130
|
+
required: true
|
|
39131
|
+
content:
|
|
39132
|
+
application/json:
|
|
39133
|
+
schema:
|
|
39134
|
+
type: object
|
|
39135
|
+
required: [accountId, budgetValue, budgetValueType, timeStart, timeEnd]
|
|
39136
|
+
properties:
|
|
39137
|
+
accountId: { type: string, description: "Zernio SocialAccount id used to resolve the Meta token." }
|
|
39138
|
+
campaignId: { type: string, description: "Platform campaign id. Exactly one of campaignId / adSetId." }
|
|
39139
|
+
adSetId: { type: string, description: "Platform ad set id. Exactly one of campaignId / adSetId." }
|
|
39140
|
+
budgetValue: { type: number, description: "With ABSOLUTE, a budget in the ad account's currency in WHOLE units (50 = $50.00). With MULTIPLIER, a factor of the existing budget (2 = double it) and NOT a currency amount." }
|
|
39141
|
+
budgetValueType: { type: string, enum: [ABSOLUTE, MULTIPLIER] }
|
|
39142
|
+
timeStart: { type: integer, description: "Unix seconds, on a 15-minute boundary (:00, :15, :30, :45)." }
|
|
39143
|
+
timeEnd: { type: integer, description: "Unix seconds, on a 15-minute boundary and after timeStart." }
|
|
39144
|
+
recurrenceType: { type: string, enum: [ONE_TIME, WEEKLY, MONTHLY] }
|
|
39145
|
+
currency: { type: string, description: "Ad account currency, for the ABSOLUTE minor-unit conversion. Ignored for MULTIPLIER." }
|
|
39146
|
+
responses:
|
|
39147
|
+
'201':
|
|
39148
|
+
description: Budget schedule created
|
|
39149
|
+
content:
|
|
39150
|
+
application/json:
|
|
39151
|
+
schema:
|
|
39152
|
+
type: object
|
|
39153
|
+
properties:
|
|
39154
|
+
objectId: { type: string, description: "The campaign / ad set the schedule was attached to." }
|
|
39155
|
+
id: { type: string, description: "Meta budget schedule id." }
|
|
39156
|
+
'400': { description: "Invalid input, or Meta rejected the schedule" }
|
|
39157
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
39158
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
39108
39159
|
|
|
39109
39160
|
/v1/ads/creatives:
|
|
39110
39161
|
get:
|
|
@@ -39195,6 +39246,10 @@ paths:
|
|
|
39195
39246
|
type: object
|
|
39196
39247
|
additionalProperties: { type: string, enum: [OPT_IN, OPT_OUT] }
|
|
39197
39248
|
description: 'Advantage+ creative enhancements: partial map of Meta creative feature keys (snake_case) to enroll status, forwarded as degrees_of_freedom_spec.creative_features_spec. Unspecified features default to OPT_OUT.'
|
|
39249
|
+
multiAdvertiser:
|
|
39250
|
+
type: string
|
|
39251
|
+
enum: [OPT_IN, OPT_OUT]
|
|
39252
|
+
description: "Meta only. Multi-advertiser ads: whether Meta may show this ad alongside other advertisers' in one unit. Meta auto-enrols since Aug 2024, so send OPT_OUT to leave. It is a top-level creative field, NOT a `creativeFeatures` key — Meta rejects it there."
|
|
39198
39253
|
responses:
|
|
39199
39254
|
'201':
|
|
39200
39255
|
description: Creative created
|
|
@@ -40178,6 +40233,10 @@ paths:
|
|
|
40178
40233
|
type: object
|
|
40179
40234
|
additionalProperties: { type: string, enum: [OPT_IN, OPT_OUT] }
|
|
40180
40235
|
description: 'Meta only. Advantage+ creative enhancements: a partial map of Meta creative feature keys (snake_case, e.g. enhance_cta, image_brightness_and_contrast, text_optimizations) to enroll status, forwarded as degrees_of_freedom_spec.creative_features_spec. Meta validates the keys; unspecified features default to OPT_OUT. The legacy standard_enhancements bundle is deprecated by Meta and rejected.'
|
|
40236
|
+
multiAdvertiser:
|
|
40237
|
+
type: string
|
|
40238
|
+
enum: [OPT_IN, OPT_OUT]
|
|
40239
|
+
description: "Meta only. Multi-advertiser ads: whether Meta may show this ad alongside other advertisers' in one unit. Meta auto-enrols since Aug 2024, so send OPT_OUT to leave. It is a top-level creative field, NOT a `creativeFeatures` key — Meta rejects it there."
|
|
40181
40240
|
validateOnly:
|
|
40182
40241
|
type: boolean
|
|
40183
40242
|
description: 'Meta only, single standalone shape only (no creatives[], adSetId, or RESERVED). Dry-run: each node runs Meta''s execution_options validate_only and NOTHING is created or persisted. Children need real parents, so a fresh tree validates the campaign + creative (the ad set needs its campaign to exist — pass existingCampaignId to validate it too; the ad itself is never validatable pre-create). A Meta validation failure returns the 400 verbatim; success returns 200 with per-node results instead of an ad.'
|
|
@@ -43473,6 +43532,85 @@ paths:
|
|
|
43473
43532
|
Meta rejected the request (e.g. WABA business verification
|
|
43474
43533
|
missing). Inspect `platformError` for the upstream Meta payload.
|
|
43475
43534
|
|
|
43535
|
+
/v1/accounts/{accountId}/custom-conversions:
|
|
43536
|
+
get:
|
|
43537
|
+
x-resource-group: "accounts"
|
|
43538
|
+
operationId: listCustomConversions
|
|
43539
|
+
tags: ["Ad Accounts"]
|
|
43540
|
+
x-platforms: ["meta"]
|
|
43541
|
+
summary: List custom conversions
|
|
43542
|
+
description: The ad account's Meta custom conversions, including archived ones (`isArchived`).
|
|
43543
|
+
security:
|
|
43544
|
+
- bearerAuth: []
|
|
43545
|
+
parameters:
|
|
43546
|
+
- { name: accountId, in: path, required: true, schema: { type: string }, description: "Meta ads SocialAccount id." }
|
|
43547
|
+
- { name: adAccountId, in: query, required: true, schema: { type: string }, description: "Meta ad account id (act_<n>)." }
|
|
43548
|
+
responses:
|
|
43549
|
+
'200':
|
|
43550
|
+
description: Custom conversions
|
|
43551
|
+
content:
|
|
43552
|
+
application/json:
|
|
43553
|
+
schema:
|
|
43554
|
+
type: object
|
|
43555
|
+
properties:
|
|
43556
|
+
adAccountId: { type: string }
|
|
43557
|
+
data:
|
|
43558
|
+
type: array
|
|
43559
|
+
items: { $ref: '#/components/schemas/CustomConversion' }
|
|
43560
|
+
'400': { description: "Invalid input, or Meta rejected the query" }
|
|
43561
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
43562
|
+
'403': { description: "Ads access required, or the token lacks the ads permissions." }
|
|
43563
|
+
post:
|
|
43564
|
+
x-resource-group: "accounts"
|
|
43565
|
+
operationId: createCustomConversion
|
|
43566
|
+
tags: ["Ad Accounts"]
|
|
43567
|
+
x-platforms: ["meta"]
|
|
43568
|
+
summary: Create or reuse a custom conversion
|
|
43569
|
+
description: |-
|
|
43570
|
+
Provision the Meta custom conversion an ads flow optimises toward, and hand back the
|
|
43571
|
+
`customConversionId` for `promotedObject.customConversionId` on POST /v1/ads/create.
|
|
43572
|
+
Removes the manual "create it in Ads Manager first" step.
|
|
43573
|
+
|
|
43574
|
+
**Reuse is ours, not Meta's.** Meta's create is not idempotent, so a retried request
|
|
43575
|
+
would otherwise mint a duplicate carrying none of the original's optimisation history.
|
|
43576
|
+
A non-archived conversion with the same `name` on the same `pixelId` is returned
|
|
43577
|
+
instead of created, with `reused: true` and a 200 rather than a 201.
|
|
43578
|
+
|
|
43579
|
+
`rule` is forwarded verbatim in Meta's own grammar (e.g.
|
|
43580
|
+
`{"url": {"i_contains": "thank-you"}}`); Meta validates it and rejects a malformed one
|
|
43581
|
+
with "A conversion rule is required at creation time".
|
|
43582
|
+
security:
|
|
43583
|
+
- bearerAuth: []
|
|
43584
|
+
parameters:
|
|
43585
|
+
- { name: accountId, in: path, required: true, schema: { type: string }, description: "Meta ads SocialAccount id." }
|
|
43586
|
+
requestBody:
|
|
43587
|
+
required: true
|
|
43588
|
+
content:
|
|
43589
|
+
application/json:
|
|
43590
|
+
schema:
|
|
43591
|
+
type: object
|
|
43592
|
+
required: [adAccountId, name, pixelId, customEventType, rule]
|
|
43593
|
+
properties:
|
|
43594
|
+
adAccountId: { type: string, description: "Meta ad account id (act_<n>)." }
|
|
43595
|
+
name: { type: string, maxLength: 255, description: "Also the reuse key, together with pixelId." }
|
|
43596
|
+
pixelId: { type: string, description: "Meta pixel id (event_source_id). From GET /v1/accounts/{accountId}/tracking-tags." }
|
|
43597
|
+
customEventType: { type: string, description: "Meta custom_event_type, e.g. LEAD, PURCHASE, OTHER." }
|
|
43598
|
+
rule: { type: object, description: "Meta conversion rule, forwarded verbatim." }
|
|
43599
|
+
responses:
|
|
43600
|
+
'200':
|
|
43601
|
+
description: An existing custom conversion was reused
|
|
43602
|
+
content:
|
|
43603
|
+
application/json:
|
|
43604
|
+
schema: { $ref: '#/components/schemas/CustomConversionResult' }
|
|
43605
|
+
'201':
|
|
43606
|
+
description: Custom conversion created
|
|
43607
|
+
content:
|
|
43608
|
+
application/json:
|
|
43609
|
+
schema: { $ref: '#/components/schemas/CustomConversionResult' }
|
|
43610
|
+
'400': { description: "Invalid input, or Meta rejected the conversion (bad rule, per-account cap reached)" }
|
|
43611
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
43612
|
+
'403': { description: "Ads access required, or the token lacks the ads permissions." }
|
|
43613
|
+
|
|
43476
43614
|
/v1/accounts/{accountId}/tracking-tags:
|
|
43477
43615
|
get:
|
|
43478
43616
|
x-resource-group: "ads"
|
|
@@ -32,6 +32,31 @@ describe 'AdAccountsApi' do
|
|
|
32
32
|
end
|
|
33
33
|
end
|
|
34
34
|
|
|
35
|
+
# unit tests for create_custom_conversion
|
|
36
|
+
# Create or reuse a custom conversion
|
|
37
|
+
# Provision the Meta custom conversion an ads flow optimises toward, and hand back the `customConversionId` for `promotedObject.customConversionId` on POST /v1/ads/create. Removes the manual \"create it in Ads Manager first\" step. **Reuse is ours, not Meta's.** Meta's create is not idempotent, so a retried request would otherwise mint a duplicate carrying none of the original's optimisation history. A non-archived conversion with the same `name` on the same `pixelId` is returned instead of created, with `reused: true` and a 200 rather than a 201. `rule` is forwarded verbatim in Meta's own grammar (e.g. `{\"url\": {\"i_contains\": \"thank-you\"}}`); Meta validates it and rejects a malformed one with \"A conversion rule is required at creation time\".
|
|
38
|
+
# @param account_id Meta ads SocialAccount id.
|
|
39
|
+
# @param create_custom_conversion_request
|
|
40
|
+
# @param [Hash] opts the optional parameters
|
|
41
|
+
# @return [CustomConversionResult]
|
|
42
|
+
describe 'create_custom_conversion test' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# unit tests for create_high_demand_period
|
|
49
|
+
# Schedule a budget increase
|
|
50
|
+
# Pre-schedule a temporary budget increase (Black Friday, a launch, a sale) instead of editing the budget by hand on the day. Same target rule as the GET: exactly one of `campaignId` / `adSetId`. Two Meta constraints worth knowing before you call it. `timeStart` / `timeEnd` must fall on a 15-minute boundary, and a campaign cannot mix `ABSOLUTE` and `MULTIPLIER` across its schedules — the second type is rejected with \"Can't mix your budget scaling selection\". Window rules (must sit inside the campaign's run dates, minimum lead time, no overlap) are Meta's and its message is forwarded verbatim.
|
|
51
|
+
# @param create_high_demand_period_request
|
|
52
|
+
# @param [Hash] opts the optional parameters
|
|
53
|
+
# @return [CreateHighDemandPeriod201Response]
|
|
54
|
+
describe 'create_high_demand_period test' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
35
60
|
# unit tests for create_value_rule_set
|
|
36
61
|
# Create a value rule set
|
|
37
62
|
# Creates a value rule set on the ad account (Meta's `POST /act_X/value_rule_set`). Attach the returned id to an ad set with `valueRuleSetId` on `POST /v1/ads/create` or `PUT /v1/ads/ad-sets/{adSetId}`. **Rule order is semantic**: rules are evaluated in array order and only the first matching rule adjusts the bid for an overlapping audience. `adjustValue` is an unsigned magnitude in percent; the direction lives in `adjustSign`. `INCREASE` accepts 1-1000, `DECREASE` accepts 1-90. There is no signed field and 0 is out of range. `criteriaValueTypes` is positionally paired with `criteriaValues` (same length, same order). Every type is the literal `\"NONE\"` except on `LOCATION`, which uses `LOCATION_COUNTRY` / `LOCATION_REGION` / `LOCATION_CITY` / `LOCATION_COMSCORE_MARKET` and may mix them within one criterion. Location values are Targeting-Search keys: a two-letter country code for `LOCATION_COUNTRY`, a numeric key for the rest. `LOCATION_DMA` was replaced by `LOCATION_COMSCORE_MARKET` on 2026-06-22 and rules using DMAs are no longer active, so this API rejects it. `AUDIENCE_LABEL` values (e.g. `HIGH_VALUE`) are applied to a Custom Audience in Ads Manager. There is no API to provision them, so label strings are passed through unvalidated and a typo produces a rule that never fires. Ads Manager turns a rule set read-only (this API stays editable) when a rule uses more than 2 criteria, a custom age range, or the placements `FB_MARKETPLACE`, `FB_SEARCH`, `FB_VIDEO` or `IG_EXPLORE`. Limits: 6 rule sets per ad account, 10 rules per set, 4 criteria per rule. The per-account cap is enforced by Meta, not here.
|
|
@@ -199,6 +224,19 @@ describe 'AdAccountsApi' do
|
|
|
199
224
|
end
|
|
200
225
|
end
|
|
201
226
|
|
|
227
|
+
# unit tests for list_custom_conversions
|
|
228
|
+
# List custom conversions
|
|
229
|
+
# The ad account's Meta custom conversions, including archived ones (`isArchived`).
|
|
230
|
+
# @param account_id Meta ads SocialAccount id.
|
|
231
|
+
# @param ad_account_id Meta ad account id (act_<n>).
|
|
232
|
+
# @param [Hash] opts the optional parameters
|
|
233
|
+
# @return [ListCustomConversions200Response]
|
|
234
|
+
describe 'list_custom_conversions test' do
|
|
235
|
+
it 'should work' do
|
|
236
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
|
|
202
240
|
# unit tests for list_high_demand_periods
|
|
203
241
|
# High demand periods / budget schedules
|
|
204
242
|
# Scheduled budget increases (Meta's budget-scheduling API). The Graph edge lives on the campaign and ad-set nodes only, so exactly one of `campaignId` / `adSetId` (platform ids) is required. Rows returned verbatim (budget_value, budget_value_type, time window, recurrence).
|
data/spec/api/media_api_spec.rb
CHANGED
|
@@ -34,7 +34,7 @@ describe 'MediaApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for get_media_presigned_url
|
|
36
36
|
# Get upload URL
|
|
37
|
-
# Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.
|
|
37
|
+
# Get a presigned URL to upload files directly to cloud storage (up to 5GB). Returns an uploadUrl and publicUrl. PUT your file to the uploadUrl, then use the publicUrl in your posts.
|
|
38
38
|
# @param get_media_presigned_url_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [GetMediaPresignedUrl200Response]
|
|
@@ -103,4 +103,14 @@ describe Zernio::CreateAdCreativeRequest do
|
|
|
103
103
|
end
|
|
104
104
|
end
|
|
105
105
|
|
|
106
|
+
describe 'test attribute "multi_advertiser"' do
|
|
107
|
+
it 'should work' do
|
|
108
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
109
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["OPT_IN", "OPT_OUT"])
|
|
110
|
+
# validator.allowable_values.each do |value|
|
|
111
|
+
# expect { instance.multi_advertiser = value }.not_to raise_error
|
|
112
|
+
# end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
|
|
106
116
|
end
|
|
@@ -0,0 +1,60 @@
|
|
|
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::CreateCustomConversionRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CreateCustomConversionRequest do
|
|
21
|
+
#let(:instance) { Zernio::CreateCustomConversionRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateCustomConversionRequest' do
|
|
24
|
+
it 'should create an instance of CreateCustomConversionRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CreateCustomConversionRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "ad_account_id"' 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 "name"' 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 "pixel_id"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "custom_event_type"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "rule"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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::CreateHighDemandPeriod201Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CreateHighDemandPeriod201Response do
|
|
21
|
+
#let(:instance) { Zernio::CreateHighDemandPeriod201Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateHighDemandPeriod201Response' do
|
|
24
|
+
it 'should create an instance of CreateHighDemandPeriod201Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CreateHighDemandPeriod201Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "object_id"' 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 "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
|
+
end
|
|
@@ -0,0 +1,92 @@
|
|
|
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::CreateHighDemandPeriodRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CreateHighDemandPeriodRequest do
|
|
21
|
+
#let(:instance) { Zernio::CreateHighDemandPeriodRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CreateHighDemandPeriodRequest' do
|
|
24
|
+
it 'should create an instance of CreateHighDemandPeriodRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CreateHighDemandPeriodRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "account_id"' 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 "campaign_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 "ad_set_id"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "budget_value"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "budget_value_type"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ABSOLUTE", "MULTIPLIER"])
|
|
58
|
+
# validator.allowable_values.each do |value|
|
|
59
|
+
# expect { instance.budget_value_type = value }.not_to raise_error
|
|
60
|
+
# end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
describe 'test attribute "time_start"' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
describe 'test attribute "time_end"' do
|
|
71
|
+
it 'should work' do
|
|
72
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
describe 'test attribute "recurrence_type"' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
79
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ONE_TIME", "WEEKLY", "MONTHLY"])
|
|
80
|
+
# validator.allowable_values.each do |value|
|
|
81
|
+
# expect { instance.recurrence_type = value }.not_to raise_error
|
|
82
|
+
# end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
describe 'test attribute "currency"' do
|
|
87
|
+
it 'should work' do
|
|
88
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
89
|
+
end
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
end
|
|
@@ -117,6 +117,16 @@ describe Zernio::CreateStandaloneAdRequest do
|
|
|
117
117
|
end
|
|
118
118
|
end
|
|
119
119
|
|
|
120
|
+
describe 'test attribute "multi_advertiser"' do
|
|
121
|
+
it 'should work' do
|
|
122
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
123
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["OPT_IN", "OPT_OUT"])
|
|
124
|
+
# validator.allowable_values.each do |value|
|
|
125
|
+
# expect { instance.multi_advertiser = value }.not_to raise_error
|
|
126
|
+
# end
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
120
130
|
describe 'test attribute "validate_only"' do
|
|
121
131
|
it 'should work' do
|
|
122
132
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -0,0 +1,54 @@
|
|
|
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::CustomConversionResult
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CustomConversionResult do
|
|
21
|
+
#let(:instance) { Zernio::CustomConversionResult.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CustomConversionResult' do
|
|
24
|
+
it 'should create an instance of CustomConversionResult' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CustomConversionResult)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "ad_account_id"' 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 "custom_conversion_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 "reused"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "custom_conversion"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
@@ -0,0 +1,66 @@
|
|
|
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::CustomConversion
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CustomConversion do
|
|
21
|
+
#let(:instance) { Zernio::CustomConversion.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CustomConversion' do
|
|
24
|
+
it 'should create an instance of CustomConversion' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CustomConversion)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "id"' 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 "name"' 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 "rule"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "custom_event_type"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
describe 'test attribute "pixel_id"' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
describe 'test attribute "is_archived"' do
|
|
61
|
+
it 'should work' do
|
|
62
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|