late-sdk 0.0.908 → 0.0.910
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 +32 -19
- data/docs/AdAccountsApi.md +92 -16
- data/docs/AdCampaignsApi.md +20 -20
- data/docs/AdCreativesApi.md +222 -0
- data/docs/AdInsightsApi.md +16 -16
- data/docs/AdTargetingApi.md +4 -4
- data/docs/CheckPhoneNumberAvailability200Response.md +1 -1
- data/docs/ConversionsApi.md +8 -8
- data/docs/GetAdComments200ResponseMeta.md +1 -1
- data/docs/ListPartnershipAdContent200Response.md +18 -0
- data/docs/ListPartnershipAdContent200ResponseMediaInner.md +30 -0
- data/docs/ListPartnershipAdPermissions200Response.md +18 -0
- data/docs/ListPartnershipAdPermissions200ResponsePermissionsInner.md +22 -0
- data/docs/ListPhoneNumberCountries200ResponseCountriesInnerTypesInner.md +1 -1
- data/docs/ListTikTokAdPixels200Response.md +20 -0
- data/docs/ListTikTokAdPixels200ResponsePixelsInner.md +26 -0
- data/docs/ListTikTokAdPixels200ResponsePixelsInnerEventDetailsInner.md +22 -0
- data/docs/ReachAndFrequencyApi.md +16 -16
- data/docs/SetPartnershipAdPermission200Response.md +18 -0
- data/docs/SetPartnershipAdPermissionRequest.md +22 -0
- data/docs/SubmitPhoneNumberKyc200Response.md +1 -1
- data/lib/zernio-sdk/api/ad_accounts_api.rb +89 -14
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +10 -10
- data/lib/zernio-sdk/api/ad_creatives_api.rb +218 -0
- data/lib/zernio-sdk/api/ad_insights_api.rb +8 -8
- data/lib/zernio-sdk/api/ad_targeting_api.rb +2 -2
- data/lib/zernio-sdk/api/conversions_api.rb +4 -4
- data/lib/zernio-sdk/api/reach_and_frequency_api.rb +8 -8
- data/lib/zernio-sdk/models/check_phone_number_availability200_response.rb +1 -1
- data/lib/zernio-sdk/models/get_ad_comments200_response_meta.rb +1 -1
- data/lib/zernio-sdk/models/list_partnership_ad_content200_response.rb +149 -0
- data/lib/zernio-sdk/models/list_partnership_ad_content200_response_media_inner.rb +205 -0
- data/lib/zernio-sdk/models/list_partnership_ad_permissions200_response.rb +149 -0
- data/lib/zernio-sdk/models/list_partnership_ad_permissions200_response_permissions_inner.rb +165 -0
- data/lib/zernio-sdk/models/list_phone_number_countries200_response_countries_inner_types_inner.rb +1 -1
- data/lib/zernio-sdk/models/list_tik_tok_ad_pixels200_response.rb +158 -0
- data/lib/zernio-sdk/models/list_tik_tok_ad_pixels200_response_pixels_inner.rb +187 -0
- data/lib/zernio-sdk/models/list_tik_tok_ad_pixels200_response_pixels_inner_event_details_inner.rb +166 -0
- data/lib/zernio-sdk/models/set_partnership_ad_permission200_response.rb +147 -0
- data/lib/zernio-sdk/models/set_partnership_ad_permission_request.rb +219 -0
- data/lib/zernio-sdk/models/submit_phone_number_kyc200_response.rb +1 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +9 -0
- data/openapi.yaml +675 -171
- data/spec/api/ad_accounts_api_spec.rb +21 -7
- data/spec/api/ad_campaigns_api_spec.rb +5 -5
- data/spec/api/ad_creatives_api_spec.rb +40 -0
- data/spec/api/ad_insights_api_spec.rb +4 -4
- data/spec/api/ad_targeting_api_spec.rb +1 -1
- data/spec/api/conversions_api_spec.rb +2 -2
- data/spec/api/reach_and_frequency_api_spec.rb +4 -4
- data/spec/models/list_partnership_ad_content200_response_media_inner_spec.rb +72 -0
- data/spec/models/list_partnership_ad_content200_response_spec.rb +36 -0
- data/spec/models/list_partnership_ad_permissions200_response_permissions_inner_spec.rb +48 -0
- data/spec/models/list_partnership_ad_permissions200_response_spec.rb +36 -0
- data/spec/models/list_tik_tok_ad_pixels200_response_pixels_inner_event_details_inner_spec.rb +48 -0
- data/spec/models/list_tik_tok_ad_pixels200_response_pixels_inner_spec.rb +60 -0
- data/spec/models/list_tik_tok_ad_pixels200_response_spec.rb +42 -0
- data/spec/models/set_partnership_ad_permission200_response_spec.rb +36 -0
- data/spec/models/set_partnership_ad_permission_request_spec.rb +48 -0
- data/zernio-sdk-0.0.910.gem +0 -0
- metadata +38 -2
- data/zernio-sdk-0.0.908.gem +0 -0
|
@@ -909,6 +909,224 @@ module Zernio
|
|
|
909
909
|
return data, status_code, headers
|
|
910
910
|
end
|
|
911
911
|
|
|
912
|
+
# List partnership ad content
|
|
913
|
+
# Private beta. Lists creator Instagram posts available to the advertiser for Partnership Ads. Supply creatorUsername or postUrl. Requires instagram_branded_content_ads_brand permission and an advertiser Instagram Business Account.
|
|
914
|
+
# @param account_id [String] Zernio SocialAccount ID.
|
|
915
|
+
# @param [Hash] opts the optional parameters
|
|
916
|
+
# @option opts [String] :creator_username Creator username. Required unless postUrl is supplied.
|
|
917
|
+
# @option opts [String] :post_url Instagram post permalink. Required unless creatorUsername is supplied.
|
|
918
|
+
# @option opts [Boolean] :only_allowlisted Return only creators with account-level permission.
|
|
919
|
+
# @return [ListPartnershipAdContent200Response]
|
|
920
|
+
def list_partnership_ad_content(account_id, opts = {})
|
|
921
|
+
data, _status_code, _headers = list_partnership_ad_content_with_http_info(account_id, opts)
|
|
922
|
+
data
|
|
923
|
+
end
|
|
924
|
+
|
|
925
|
+
# List partnership ad content
|
|
926
|
+
# Private beta. Lists creator Instagram posts available to the advertiser for Partnership Ads. Supply creatorUsername or postUrl. Requires instagram_branded_content_ads_brand permission and an advertiser Instagram Business Account.
|
|
927
|
+
# @param account_id [String] Zernio SocialAccount ID.
|
|
928
|
+
# @param [Hash] opts the optional parameters
|
|
929
|
+
# @option opts [String] :creator_username Creator username. Required unless postUrl is supplied.
|
|
930
|
+
# @option opts [String] :post_url Instagram post permalink. Required unless creatorUsername is supplied.
|
|
931
|
+
# @option opts [Boolean] :only_allowlisted Return only creators with account-level permission.
|
|
932
|
+
# @return [Array<(ListPartnershipAdContent200Response, Integer, Hash)>] ListPartnershipAdContent200Response data, response status code and response headers
|
|
933
|
+
def list_partnership_ad_content_with_http_info(account_id, opts = {})
|
|
934
|
+
if @api_client.config.debugging
|
|
935
|
+
@api_client.config.logger.debug 'Calling API: AdCreativesApi.list_partnership_ad_content ...'
|
|
936
|
+
end
|
|
937
|
+
# verify the required parameter 'account_id' is set
|
|
938
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
939
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdCreativesApi.list_partnership_ad_content"
|
|
940
|
+
end
|
|
941
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
|
|
942
|
+
if @api_client.config.client_side_validation && account_id !~ pattern
|
|
943
|
+
fail ArgumentError, "invalid value for 'account_id' when calling AdCreativesApi.list_partnership_ad_content, must conform to the pattern #{pattern}."
|
|
944
|
+
end
|
|
945
|
+
|
|
946
|
+
# resource path
|
|
947
|
+
local_var_path = '/v1/ads/partnership-content'
|
|
948
|
+
|
|
949
|
+
# query parameters
|
|
950
|
+
query_params = opts[:query_params] || {}
|
|
951
|
+
query_params[:'accountId'] = account_id
|
|
952
|
+
query_params[:'creatorUsername'] = opts[:'creator_username'] if !opts[:'creator_username'].nil?
|
|
953
|
+
query_params[:'postUrl'] = opts[:'post_url'] if !opts[:'post_url'].nil?
|
|
954
|
+
query_params[:'onlyAllowlisted'] = opts[:'only_allowlisted'] if !opts[:'only_allowlisted'].nil?
|
|
955
|
+
|
|
956
|
+
# header parameters
|
|
957
|
+
header_params = opts[:header_params] || {}
|
|
958
|
+
# HTTP header 'Accept' (if needed)
|
|
959
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
960
|
+
|
|
961
|
+
# form parameters
|
|
962
|
+
form_params = opts[:form_params] || {}
|
|
963
|
+
|
|
964
|
+
# http body (model)
|
|
965
|
+
post_body = opts[:debug_body]
|
|
966
|
+
|
|
967
|
+
# return_type
|
|
968
|
+
return_type = opts[:debug_return_type] || 'ListPartnershipAdContent200Response'
|
|
969
|
+
|
|
970
|
+
# auth_names
|
|
971
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
972
|
+
|
|
973
|
+
new_options = opts.merge(
|
|
974
|
+
:operation => :"AdCreativesApi.list_partnership_ad_content",
|
|
975
|
+
:header_params => header_params,
|
|
976
|
+
:query_params => query_params,
|
|
977
|
+
:form_params => form_params,
|
|
978
|
+
:body => post_body,
|
|
979
|
+
:auth_names => auth_names,
|
|
980
|
+
:return_type => return_type
|
|
981
|
+
)
|
|
982
|
+
|
|
983
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
984
|
+
if @api_client.config.debugging
|
|
985
|
+
@api_client.config.logger.debug "API called: AdCreativesApi#list_partnership_ad_content\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
986
|
+
end
|
|
987
|
+
return data, status_code, headers
|
|
988
|
+
end
|
|
989
|
+
|
|
990
|
+
# List partnership permissions
|
|
991
|
+
# Private beta. Lists granted or pending creator permissions for the advertiser Instagram Business Account. Requires instagram_branded_content_ads_brand permission.
|
|
992
|
+
# @param account_id [String] Zernio SocialAccount ID.
|
|
993
|
+
# @param [Hash] opts the optional parameters
|
|
994
|
+
# @option opts [String] :creator_username Filter by creator username.
|
|
995
|
+
# @return [ListPartnershipAdPermissions200Response]
|
|
996
|
+
def list_partnership_ad_permissions(account_id, opts = {})
|
|
997
|
+
data, _status_code, _headers = list_partnership_ad_permissions_with_http_info(account_id, opts)
|
|
998
|
+
data
|
|
999
|
+
end
|
|
1000
|
+
|
|
1001
|
+
# List partnership permissions
|
|
1002
|
+
# Private beta. Lists granted or pending creator permissions for the advertiser Instagram Business Account. Requires instagram_branded_content_ads_brand permission.
|
|
1003
|
+
# @param account_id [String] Zernio SocialAccount ID.
|
|
1004
|
+
# @param [Hash] opts the optional parameters
|
|
1005
|
+
# @option opts [String] :creator_username Filter by creator username.
|
|
1006
|
+
# @return [Array<(ListPartnershipAdPermissions200Response, Integer, Hash)>] ListPartnershipAdPermissions200Response data, response status code and response headers
|
|
1007
|
+
def list_partnership_ad_permissions_with_http_info(account_id, opts = {})
|
|
1008
|
+
if @api_client.config.debugging
|
|
1009
|
+
@api_client.config.logger.debug 'Calling API: AdCreativesApi.list_partnership_ad_permissions ...'
|
|
1010
|
+
end
|
|
1011
|
+
# verify the required parameter 'account_id' is set
|
|
1012
|
+
if @api_client.config.client_side_validation && account_id.nil?
|
|
1013
|
+
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdCreativesApi.list_partnership_ad_permissions"
|
|
1014
|
+
end
|
|
1015
|
+
pattern = Regexp.new(/^[a-fA-F0-9]{24}$/)
|
|
1016
|
+
if @api_client.config.client_side_validation && account_id !~ pattern
|
|
1017
|
+
fail ArgumentError, "invalid value for 'account_id' when calling AdCreativesApi.list_partnership_ad_permissions, must conform to the pattern #{pattern}."
|
|
1018
|
+
end
|
|
1019
|
+
|
|
1020
|
+
# resource path
|
|
1021
|
+
local_var_path = '/v1/ads/partnership-permissions'
|
|
1022
|
+
|
|
1023
|
+
# query parameters
|
|
1024
|
+
query_params = opts[:query_params] || {}
|
|
1025
|
+
query_params[:'accountId'] = account_id
|
|
1026
|
+
query_params[:'creatorUsername'] = opts[:'creator_username'] if !opts[:'creator_username'].nil?
|
|
1027
|
+
|
|
1028
|
+
# header parameters
|
|
1029
|
+
header_params = opts[:header_params] || {}
|
|
1030
|
+
# HTTP header 'Accept' (if needed)
|
|
1031
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1032
|
+
|
|
1033
|
+
# form parameters
|
|
1034
|
+
form_params = opts[:form_params] || {}
|
|
1035
|
+
|
|
1036
|
+
# http body (model)
|
|
1037
|
+
post_body = opts[:debug_body]
|
|
1038
|
+
|
|
1039
|
+
# return_type
|
|
1040
|
+
return_type = opts[:debug_return_type] || 'ListPartnershipAdPermissions200Response'
|
|
1041
|
+
|
|
1042
|
+
# auth_names
|
|
1043
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1044
|
+
|
|
1045
|
+
new_options = opts.merge(
|
|
1046
|
+
:operation => :"AdCreativesApi.list_partnership_ad_permissions",
|
|
1047
|
+
:header_params => header_params,
|
|
1048
|
+
:query_params => query_params,
|
|
1049
|
+
:form_params => form_params,
|
|
1050
|
+
:body => post_body,
|
|
1051
|
+
:auth_names => auth_names,
|
|
1052
|
+
:return_type => return_type
|
|
1053
|
+
)
|
|
1054
|
+
|
|
1055
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1056
|
+
if @api_client.config.debugging
|
|
1057
|
+
@api_client.config.logger.debug "API called: AdCreativesApi#list_partnership_ad_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1058
|
+
end
|
|
1059
|
+
return data, status_code, headers
|
|
1060
|
+
end
|
|
1061
|
+
|
|
1062
|
+
# Set partnership permission
|
|
1063
|
+
# Private beta. Requests permission from a creator or revokes it when revoke is true. Requests require the creator to approve in Instagram. Requires instagram_branded_content_ads_brand permission.
|
|
1064
|
+
# @param set_partnership_ad_permission_request [SetPartnershipAdPermissionRequest]
|
|
1065
|
+
# @param [Hash] opts the optional parameters
|
|
1066
|
+
# @return [SetPartnershipAdPermission200Response]
|
|
1067
|
+
def set_partnership_ad_permission(set_partnership_ad_permission_request, opts = {})
|
|
1068
|
+
data, _status_code, _headers = set_partnership_ad_permission_with_http_info(set_partnership_ad_permission_request, opts)
|
|
1069
|
+
data
|
|
1070
|
+
end
|
|
1071
|
+
|
|
1072
|
+
# Set partnership permission
|
|
1073
|
+
# Private beta. Requests permission from a creator or revokes it when revoke is true. Requests require the creator to approve in Instagram. Requires instagram_branded_content_ads_brand permission.
|
|
1074
|
+
# @param set_partnership_ad_permission_request [SetPartnershipAdPermissionRequest]
|
|
1075
|
+
# @param [Hash] opts the optional parameters
|
|
1076
|
+
# @return [Array<(SetPartnershipAdPermission200Response, Integer, Hash)>] SetPartnershipAdPermission200Response data, response status code and response headers
|
|
1077
|
+
def set_partnership_ad_permission_with_http_info(set_partnership_ad_permission_request, opts = {})
|
|
1078
|
+
if @api_client.config.debugging
|
|
1079
|
+
@api_client.config.logger.debug 'Calling API: AdCreativesApi.set_partnership_ad_permission ...'
|
|
1080
|
+
end
|
|
1081
|
+
# verify the required parameter 'set_partnership_ad_permission_request' is set
|
|
1082
|
+
if @api_client.config.client_side_validation && set_partnership_ad_permission_request.nil?
|
|
1083
|
+
fail ArgumentError, "Missing the required parameter 'set_partnership_ad_permission_request' when calling AdCreativesApi.set_partnership_ad_permission"
|
|
1084
|
+
end
|
|
1085
|
+
# resource path
|
|
1086
|
+
local_var_path = '/v1/ads/partnership-permissions'
|
|
1087
|
+
|
|
1088
|
+
# query parameters
|
|
1089
|
+
query_params = opts[:query_params] || {}
|
|
1090
|
+
|
|
1091
|
+
# header parameters
|
|
1092
|
+
header_params = opts[:header_params] || {}
|
|
1093
|
+
# HTTP header 'Accept' (if needed)
|
|
1094
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1095
|
+
# HTTP header 'Content-Type'
|
|
1096
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1097
|
+
if !content_type.nil?
|
|
1098
|
+
header_params['Content-Type'] = content_type
|
|
1099
|
+
end
|
|
1100
|
+
|
|
1101
|
+
# form parameters
|
|
1102
|
+
form_params = opts[:form_params] || {}
|
|
1103
|
+
|
|
1104
|
+
# http body (model)
|
|
1105
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(set_partnership_ad_permission_request)
|
|
1106
|
+
|
|
1107
|
+
# return_type
|
|
1108
|
+
return_type = opts[:debug_return_type] || 'SetPartnershipAdPermission200Response'
|
|
1109
|
+
|
|
1110
|
+
# auth_names
|
|
1111
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1112
|
+
|
|
1113
|
+
new_options = opts.merge(
|
|
1114
|
+
:operation => :"AdCreativesApi.set_partnership_ad_permission",
|
|
1115
|
+
:header_params => header_params,
|
|
1116
|
+
:query_params => query_params,
|
|
1117
|
+
:form_params => form_params,
|
|
1118
|
+
:body => post_body,
|
|
1119
|
+
:auth_names => auth_names,
|
|
1120
|
+
:return_type => return_type
|
|
1121
|
+
)
|
|
1122
|
+
|
|
1123
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1124
|
+
if @api_client.config.debugging
|
|
1125
|
+
@api_client.config.logger.debug "API called: AdCreativesApi#set_partnership_ad_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1126
|
+
end
|
|
1127
|
+
return data, status_code, headers
|
|
1128
|
+
end
|
|
1129
|
+
|
|
912
1130
|
# Rename a creative
|
|
913
1131
|
# Renames a creative. Creatives are immutable on Meta beyond `name`. For content changes create a new creative (POST /v1/ads/creatives) and swap it onto the ad (PUT /v1/ads/{adId} with `creative`).
|
|
914
1132
|
# @param creative_id [String] Platform creative id
|
|
@@ -19,7 +19,7 @@ module Zernio
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Submit
|
|
22
|
+
# Submit async insights report
|
|
23
23
|
# Submits an asynchronous Meta insights report. Same query surface as GET /v1/ads/insights, but in the JSON body; Meta processes the report server-side, which is the right choice for long ranges or large accounts where the sync query is slow or rate-limited. Returns a `reportRunId` to poll via GET /v1/ads/insights/reports/{reportRunId}.
|
|
24
24
|
# @param create_ad_insights_report_request [CreateAdInsightsReportRequest]
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
@@ -29,7 +29,7 @@ module Zernio
|
|
|
29
29
|
data
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
# Submit
|
|
32
|
+
# Submit async insights report
|
|
33
33
|
# Submits an asynchronous Meta insights report. Same query surface as GET /v1/ads/insights, but in the JSON body; Meta processes the report server-side, which is the right choice for long ranges or large accounts where the sync query is slow or rate-limited. Returns a `reportRunId` to poll via GET /v1/ads/insights/reports/{reportRunId}.
|
|
34
34
|
# @param create_ad_insights_report_request [CreateAdInsightsReportRequest]
|
|
35
35
|
# @param [Hash] opts the optional parameters
|
|
@@ -87,7 +87,7 @@ module Zernio
|
|
|
87
87
|
return data, status_code, headers
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
-
#
|
|
90
|
+
# Get historical keyword metrics
|
|
91
91
|
# Google Ads only. Runs Keyword Planner's generateKeywordHistoricalMetrics for up to 1,000 exact keywords: historical search volume, competition and top-of-page bid ranges, plus averageCpcMicros when includeAverageCpc is set. Rows come back verbatim; counters are int64s encoded as strings, bid/CPC values are micros of the account currency.
|
|
92
92
|
# @param generate_keyword_historical_metrics_request [GenerateKeywordHistoricalMetricsRequest]
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
@@ -97,7 +97,7 @@ module Zernio
|
|
|
97
97
|
data
|
|
98
98
|
end
|
|
99
99
|
|
|
100
|
-
#
|
|
100
|
+
# Get historical keyword metrics
|
|
101
101
|
# Google Ads only. Runs Keyword Planner's generateKeywordHistoricalMetrics for up to 1,000 exact keywords: historical search volume, competition and top-of-page bid ranges, plus averageCpcMicros when includeAverageCpc is set. Rows come back verbatim; counters are int64s encoded as strings, bid/CPC values are micros of the account currency.
|
|
102
102
|
# @param generate_keyword_historical_metrics_request [GenerateKeywordHistoricalMetricsRequest]
|
|
103
103
|
# @param [Hash] opts the optional parameters
|
|
@@ -155,7 +155,7 @@ module Zernio
|
|
|
155
155
|
return data, status_code, headers
|
|
156
156
|
end
|
|
157
157
|
|
|
158
|
-
# Generate keyword ideas
|
|
158
|
+
# Generate keyword ideas
|
|
159
159
|
# Google Ads only. Runs Keyword Planner's generateKeywordIdeas from seed keywords, a seed URL, or both, returning idea rows verbatim (avgMonthlySearches, competition, competitionIndex, top-of-page bid micros, monthlySearchVolumes). Counters are int64s encoded as strings; bid values are micros of the account currency. Omitting `countries` targets worldwide.
|
|
160
160
|
# @param generate_keyword_ideas_request [GenerateKeywordIdeasRequest]
|
|
161
161
|
# @param [Hash] opts the optional parameters
|
|
@@ -165,7 +165,7 @@ module Zernio
|
|
|
165
165
|
data
|
|
166
166
|
end
|
|
167
167
|
|
|
168
|
-
# Generate keyword ideas
|
|
168
|
+
# Generate keyword ideas
|
|
169
169
|
# Google Ads only. Runs Keyword Planner's generateKeywordIdeas from seed keywords, a seed URL, or both, returning idea rows verbatim (avgMonthlySearches, competition, competitionIndex, top-of-page bid micros, monthlySearchVolumes). Counters are int64s encoded as strings; bid values are micros of the account currency. Omitting `countries` targets worldwide.
|
|
170
170
|
# @param generate_keyword_ideas_request [GenerateKeywordIdeasRequest]
|
|
171
171
|
# @param [Hash] opts the optional parameters
|
|
@@ -536,7 +536,7 @@ module Zernio
|
|
|
536
536
|
return data, status_code, headers
|
|
537
537
|
end
|
|
538
538
|
|
|
539
|
-
#
|
|
539
|
+
# List lead conversations
|
|
540
540
|
# Conversation entries of one Local Services lead: phone calls (duration, recording URL) and messages (text, attachment URLs), oldest first. Read live from `local_services_lead_conversation`, always scoped to a single lead. Call-recording URLs require read access on the Google Ads account. Draws on the shared Google Ads operations budget.
|
|
541
541
|
# @param lead_id [String] Numeric lead id from /v1/ads/local-services/leads.
|
|
542
542
|
# @param account_id [String] Google ads SocialAccount id.
|
|
@@ -549,7 +549,7 @@ module Zernio
|
|
|
549
549
|
data
|
|
550
550
|
end
|
|
551
551
|
|
|
552
|
-
#
|
|
552
|
+
# List lead conversations
|
|
553
553
|
# Conversation entries of one Local Services lead: phone calls (duration, recording URL) and messages (text, attachment URLs), oldest first. Read live from `local_services_lead_conversation`, always scoped to a single lead. Call-recording URLs require read access on the Google Ads account. Draws on the shared Google Ads operations budget.
|
|
554
554
|
# @param lead_id [String] Numeric lead id from /v1/ads/local-services/leads.
|
|
555
555
|
# @param account_id [String] Google ads SocialAccount id.
|
|
@@ -155,7 +155,7 @@ module Zernio
|
|
|
155
155
|
return data, status_code, headers
|
|
156
156
|
end
|
|
157
157
|
|
|
158
|
-
#
|
|
158
|
+
# Forecast ad delivery
|
|
159
159
|
# LinkedIn-only. Forecasted impressions, clicks, spend and ~20 other metrics for a targeting spec over a time range. Wraps LinkedIn's `adSupplyForecasts` finder. Each returned series carries a `metricType` (IMPRESSION, CLICK, SPENDING, MAX_POTENTIAL_BUDGET, COST_PER_MILLION_IMPRESSIONS, ...) and a `granularity` (DAILY, SEVEN_DAY, THIRTY_DAY, CUSTOM). LinkedIn caps the daily spending forecast at 1.2x the daily budget and returns 0 once the total budget is exhausted. Non-LinkedIn accounts return `available: false`.
|
|
160
160
|
# @param get_linked_in_supply_forecast_request [GetLinkedInSupplyForecastRequest]
|
|
161
161
|
# @param [Hash] opts the optional parameters
|
|
@@ -165,7 +165,7 @@ module Zernio
|
|
|
165
165
|
data
|
|
166
166
|
end
|
|
167
167
|
|
|
168
|
-
#
|
|
168
|
+
# Forecast ad delivery
|
|
169
169
|
# LinkedIn-only. Forecasted impressions, clicks, spend and ~20 other metrics for a targeting spec over a time range. Wraps LinkedIn's `adSupplyForecasts` finder. Each returned series carries a `metricType` (IMPRESSION, CLICK, SPENDING, MAX_POTENTIAL_BUDGET, COST_PER_MILLION_IMPRESSIONS, ...) and a `granularity` (DAILY, SEVEN_DAY, THIRTY_DAY, CUSTOM). LinkedIn caps the daily spending forecast at 1.2x the daily budget and returns 0 once the total budget is exhausted. Non-LinkedIn accounts return `available: false`.
|
|
170
170
|
# @param get_linked_in_supply_forecast_request [GetLinkedInSupplyForecastRequest]
|
|
171
171
|
# @param [Hash] opts the optional parameters
|
|
@@ -167,7 +167,7 @@ module Zernio
|
|
|
167
167
|
return data, status_code, headers
|
|
168
168
|
end
|
|
169
169
|
|
|
170
|
-
# Create
|
|
170
|
+
# Create website conversion action
|
|
171
171
|
# Creates a `WEBPAGE` conversion action (category `DEFAULT`) and returns it with its tag snippets, read back after creation since Google never returns them on the create response itself. Invalidates the cached list `GET` on this resource would otherwise keep serving. Google-only; other platforms return `501`. Requires the Ads add-on.
|
|
172
172
|
# @param create_conversion_action_request [CreateConversionActionRequest]
|
|
173
173
|
# @param [Hash] opts the optional parameters
|
|
@@ -177,7 +177,7 @@ module Zernio
|
|
|
177
177
|
data
|
|
178
178
|
end
|
|
179
179
|
|
|
180
|
-
# Create
|
|
180
|
+
# Create website conversion action
|
|
181
181
|
# Creates a `WEBPAGE` conversion action (category `DEFAULT`) and returns it with its tag snippets, read back after creation since Google never returns them on the create response itself. Invalidates the cached list `GET` on this resource would otherwise keep serving. Google-only; other platforms return `501`. Requires the Ads add-on.
|
|
182
182
|
# @param create_conversion_action_request [CreateConversionActionRequest]
|
|
183
183
|
# @param [Hash] opts the optional parameters
|
|
@@ -631,7 +631,7 @@ module Zernio
|
|
|
631
631
|
return data, status_code, headers
|
|
632
632
|
end
|
|
633
633
|
|
|
634
|
-
# List conversion actions
|
|
634
|
+
# List conversion actions
|
|
635
635
|
# Lists Google Ads conversion actions on the resolved customer, all types by default. Each action's `tagSnippets` (global site tag + event snippet) is included when Google has them for that action's type, e.g. `WEBPAGE`. Google-only; other platforms return `501`. Requires the Ads add-on. `customerId` is optional: when omitted, it is resolved from the connection's accessible Google Ads customers, and the call fails with `400` when more than one is accessible (pass `customerId` to disambiguate). The list itself is cached for the quota window (1 hour fresh, up to 7 days last-good; the cache key does not vary on `type`). The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read.
|
|
636
636
|
# @param account_id [String] SocialAccount _id (must be a googleads account).
|
|
637
637
|
# @param [Hash] opts the optional parameters
|
|
@@ -643,7 +643,7 @@ module Zernio
|
|
|
643
643
|
data
|
|
644
644
|
end
|
|
645
645
|
|
|
646
|
-
# List conversion actions
|
|
646
|
+
# List conversion actions
|
|
647
647
|
# Lists Google Ads conversion actions on the resolved customer, all types by default. Each action's `tagSnippets` (global site tag + event snippet) is included when Google has them for that action's type, e.g. `WEBPAGE`. Google-only; other platforms return `501`. Requires the Ads add-on. `customerId` is optional: when omitted, it is resolved from the connection's accessible Google Ads customers, and the call fails with `400` when more than one is accessible (pass `customerId` to disambiguate). The list itself is cached for the quota window (1 hour fresh, up to 7 days last-good; the cache key does not vary on `type`). The response carries `cachedAt` and `stale`, set when a quota-exhausted call falls back to the last-good copy instead of a live read.
|
|
648
648
|
# @param account_id [String] SocialAccount _id (must be a googleads account).
|
|
649
649
|
# @param [Hash] opts the optional parameters
|
|
@@ -19,7 +19,7 @@ module Zernio
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
-
# Cancel
|
|
22
|
+
# Cancel reach-frequency booking
|
|
23
23
|
# Releases a RESERVATION's locked price and inventory. Unreserved predictions expire on their own.
|
|
24
24
|
# @param prediction_id [String]
|
|
25
25
|
# @param account_id [String]
|
|
@@ -31,7 +31,7 @@ module Zernio
|
|
|
31
31
|
nil
|
|
32
32
|
end
|
|
33
33
|
|
|
34
|
-
# Cancel
|
|
34
|
+
# Cancel reach-frequency booking
|
|
35
35
|
# Releases a RESERVATION's locked price and inventory. Unreserved predictions expire on their own.
|
|
36
36
|
# @param prediction_id [String]
|
|
37
37
|
# @param account_id [String]
|
|
@@ -96,7 +96,7 @@ module Zernio
|
|
|
96
96
|
return data, status_code, headers
|
|
97
97
|
end
|
|
98
98
|
|
|
99
|
-
# Create
|
|
99
|
+
# Create reach-frequency prediction
|
|
100
100
|
# Creates an R&F prediction. This is a QUOTE, nothing is bought and no ad entities are created. Provide a date range plus exactly one of `budgetAmount` (Meta predicts reach) or `reach` (Meta predicts the budget). The response carries the estimate and its allowed bounds (min/max budget and reach). Predictions expire on their own; to buy, reserve one via POST /v1/ads/rf-predictions/{predictionId}/reserve and pass the RESERVED id to POST /v1/ads/create with `buyingType: \"RESERVED\"`. Reservation campaigns reject automatic placements. Top-level `placements` wins; when it is omitted, `targeting.placements` is used; when neither is set, placements default to Facebook feed (+ Instagram stream when a linked IG professional account resolves). Instagram placements require that IG account.
|
|
101
101
|
# @param create_rf_prediction_request [CreateRfPredictionRequest]
|
|
102
102
|
# @param [Hash] opts the optional parameters
|
|
@@ -106,7 +106,7 @@ module Zernio
|
|
|
106
106
|
data
|
|
107
107
|
end
|
|
108
108
|
|
|
109
|
-
# Create
|
|
109
|
+
# Create reach-frequency prediction
|
|
110
110
|
# Creates an R&F prediction. This is a QUOTE, nothing is bought and no ad entities are created. Provide a date range plus exactly one of `budgetAmount` (Meta predicts reach) or `reach` (Meta predicts the budget). The response carries the estimate and its allowed bounds (min/max budget and reach). Predictions expire on their own; to buy, reserve one via POST /v1/ads/rf-predictions/{predictionId}/reserve and pass the RESERVED id to POST /v1/ads/create with `buyingType: \"RESERVED\"`. Reservation campaigns reject automatic placements. Top-level `placements` wins; when it is omitted, `targeting.placements` is used; when neither is set, placements default to Facebook feed (+ Instagram stream when a linked IG professional account resolves). Instagram placements require that IG account.
|
|
111
111
|
# @param create_rf_prediction_request [CreateRfPredictionRequest]
|
|
112
112
|
# @param [Hash] opts the optional parameters
|
|
@@ -164,7 +164,7 @@ module Zernio
|
|
|
164
164
|
return data, status_code, headers
|
|
165
165
|
end
|
|
166
166
|
|
|
167
|
-
#
|
|
167
|
+
# Get reach-frequency prediction
|
|
168
168
|
# @param prediction_id [String]
|
|
169
169
|
# @param account_id [String]
|
|
170
170
|
# @param ad_account_id [String]
|
|
@@ -175,7 +175,7 @@ module Zernio
|
|
|
175
175
|
data
|
|
176
176
|
end
|
|
177
177
|
|
|
178
|
-
#
|
|
178
|
+
# Get reach-frequency prediction
|
|
179
179
|
# @param prediction_id [String]
|
|
180
180
|
# @param account_id [String]
|
|
181
181
|
# @param ad_account_id [String]
|
|
@@ -239,7 +239,7 @@ module Zernio
|
|
|
239
239
|
return data, status_code, headers
|
|
240
240
|
end
|
|
241
241
|
|
|
242
|
-
# Reserve
|
|
242
|
+
# Reserve reach-frequency inventory
|
|
243
243
|
# Locks the quoted price + inventory until the returned `expiresAt` and mints a NEW prediction id. Pass that RESERVED id (not the original) as `rfPredictionId` on POST /v1/ads/create. Release an unused reservation via DELETE.
|
|
244
244
|
# @param prediction_id [String]
|
|
245
245
|
# @param reserve_rf_prediction_request [ReserveRfPredictionRequest]
|
|
@@ -250,7 +250,7 @@ module Zernio
|
|
|
250
250
|
data
|
|
251
251
|
end
|
|
252
252
|
|
|
253
|
-
# Reserve
|
|
253
|
+
# Reserve reach-frequency inventory
|
|
254
254
|
# Locks the quoted price + inventory until the returned `expiresAt` and mints a NEW prediction id. Pass that RESERVED id (not the original) as `rfPredictionId` on POST /v1/ads/create. Release an unused reservation via DELETE.
|
|
255
255
|
# @param prediction_id [String]
|
|
256
256
|
# @param reserve_rf_prediction_request [ReserveRfPredictionRequest]
|
|
@@ -22,7 +22,7 @@ module Zernio
|
|
|
22
22
|
# Whether deliverable voice inventory exists right now.
|
|
23
23
|
attr_accessor :available
|
|
24
24
|
|
|
25
|
-
# Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and the carrier sources the number
|
|
25
|
+
# Nothing deliverable now, but this pair can be pre-ordered: submit KYC as usual and we buy regular stock the moment it returns, otherwise the carrier sources the number (usually 2 to 4 weeks, never guaranteed). Only document tiers (3/4) qualify.
|
|
26
26
|
attr_accessor :pre_orderable
|
|
27
27
|
|
|
28
28
|
attr_accessor :address_constraint
|
|
@@ -30,7 +30,7 @@ module Zernio
|
|
|
30
30
|
# Underlying post ID the comments belong to. effective_object_story_id for the Facebook side, effective_instagram_media_id for the Instagram side.
|
|
31
31
|
attr_accessor :effective_story_id
|
|
32
32
|
|
|
33
|
-
# TikTok-only video item ID. Null
|
|
33
|
+
# TikTok-only video item ID from stored ad fields or returned comments. Null does not prevent listing; ad details are not fetched to populate it.
|
|
34
34
|
attr_accessor :tiktok_item_id
|
|
35
35
|
|
|
36
36
|
# TikTok-only resolved start date.
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
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 ListPartnershipAdContent200Response < ApiModelBase
|
|
18
|
+
attr_accessor :media
|
|
19
|
+
|
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
21
|
+
def self.attribute_map
|
|
22
|
+
{
|
|
23
|
+
:'media' => :'media'
|
|
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
|
+
:'media' => :'Array<ListPartnershipAdContent200ResponseMediaInner>'
|
|
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 `Zernio::ListPartnershipAdContent200Response` 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 `Zernio::ListPartnershipAdContent200Response`. 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?(:'media')
|
|
67
|
+
if (value = attributes[:'media']).is_a?(Array)
|
|
68
|
+
self.media = value
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
74
|
+
# @return Array for valid properties with the reasons
|
|
75
|
+
def list_invalid_properties
|
|
76
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
77
|
+
invalid_properties = Array.new
|
|
78
|
+
invalid_properties
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Check to see if the all the properties in the model are valid
|
|
82
|
+
# @return true if the model is valid
|
|
83
|
+
def valid?
|
|
84
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
media == o.media
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# @see the `==` method
|
|
97
|
+
# @param [Object] Object to be compared
|
|
98
|
+
def eql?(o)
|
|
99
|
+
self == o
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Calculates hash code according to all attributes.
|
|
103
|
+
# @return [Integer] Hash code
|
|
104
|
+
def hash
|
|
105
|
+
[media].hash
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Builds the object from hash
|
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
110
|
+
# @return [Object] Returns the model itself
|
|
111
|
+
def self.build_from_hash(attributes)
|
|
112
|
+
return nil unless attributes.is_a?(Hash)
|
|
113
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
114
|
+
transformed_hash = {}
|
|
115
|
+
openapi_types.each_pair do |key, type|
|
|
116
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
117
|
+
transformed_hash["#{key}"] = nil
|
|
118
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
119
|
+
# check to ensure the input is an array given that the attribute
|
|
120
|
+
# is documented as an array but the input is not
|
|
121
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
122
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
123
|
+
end
|
|
124
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
new(transformed_hash)
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Returns the object in the form of hash
|
|
132
|
+
# @return [Hash] Returns the object in the form of hash
|
|
133
|
+
def to_hash
|
|
134
|
+
hash = {}
|
|
135
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
136
|
+
value = self.send(attr)
|
|
137
|
+
if value.nil?
|
|
138
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
139
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
hash[param] = _to_hash(value)
|
|
143
|
+
end
|
|
144
|
+
hash
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
end
|