Class: PinterestSdkClient::AudienceSharingApi
- Inherits:
-
Object
- Object
- PinterestSdkClient::AudienceSharingApi
- Defined in:
- lib/pinterest_sdk/api/audience_sharing_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#ad_accounts_audiences_shared_accounts_list(audience_id, account_type, ad_account_id, opts = {}) ⇒ AdAccountsAudiencesSharedAccountsList200Response
List accounts with access to an audience owned by an ad account List all ad accounts and/or businesses that have access to a specific audience.
-
#ad_accounts_audiences_shared_accounts_list_with_http_info(audience_id, account_type, ad_account_id, opts = {}) ⇒ Array<(AdAccountsAudiencesSharedAccountsList200Response, Integer, Hash)>
List accounts with access to an audience owned by an ad account List all ad accounts and/or businesses that have access to a specific audience.
-
#business_account_audiences_shared_accounts_list(business_id, audience_id, account_type, opts = {}) ⇒ AdAccountsAudiencesSharedAccountsList200Response
List accounts with access to an audience owned by a business List all ad accounts and/or businesses that have access to a specific audience.
-
#business_account_audiences_shared_accounts_list_with_http_info(business_id, audience_id, account_type, opts = {}) ⇒ Array<(AdAccountsAudiencesSharedAccountsList200Response, Integer, Hash)>
List accounts with access to an audience owned by a business List all ad accounts and/or businesses that have access to a specific audience.
-
#initialize(api_client = ApiClient.default) ⇒ AudienceSharingApi
constructor
A new instance of AudienceSharingApi.
-
#shared_audiences_for_business_list(business_id, opts = {}) ⇒ SharedAudiencesForBusinessList200Response
List received audiences for a business Get a list of received audiences for the given business.
-
#shared_audiences_for_business_list_with_http_info(business_id, opts = {}) ⇒ Array<(SharedAudiencesForBusinessList200Response, Integer, Hash)>
List received audiences for a business Get a list of received audiences for the given business.
-
#update_ad_account_to_ad_account_shared_audience(ad_account_id, ad_account_to_ad_account_shared_audience_update_with_required_body, opts = {}) ⇒ AdAccountToAdAccountSharedAudience
Update audience sharing between ad accounts From an ad account, share a specific audience with another ad account, or revoke access to a previously shared audience.
-
#update_ad_account_to_ad_account_shared_audience_with_http_info(ad_account_id, ad_account_to_ad_account_shared_audience_update_with_required_body, opts = {}) ⇒ Array<(AdAccountToAdAccountSharedAudience, Integer, Hash)>
Update audience sharing between ad accounts From an ad account, share a specific audience with another ad account, or revoke access to a previously shared audience.
-
#update_ad_account_to_business_shared_audience(ad_account_id, ad_account_to_business_shared_audience_update_with_required_body, opts = {}) ⇒ AdAccountToBusinessSharedAudience
Update audience sharing from an ad account to businesses From an ad account, share a specific audience with a business account, or revoke access to a previously shared audience.
-
#update_ad_account_to_business_shared_audience_with_http_info(ad_account_id, ad_account_to_business_shared_audience_update_with_required_body, opts = {}) ⇒ Array<(AdAccountToBusinessSharedAudience, Integer, Hash)>
Update audience sharing from an ad account to businesses From an ad account, share a specific audience with a business account, or revoke access to a previously shared audience.
-
#update_business_to_ad_account_shared_audience(business_id, business_to_ad_account_shared_audience_update_with_required_body, opts = {}) ⇒ BusinessToAdAccountSharedAudience
Update audience sharing from a business to ad accounts From a business, share a specific audience with other ad account(s), or revoke access to a previously shared audience.
-
#update_business_to_ad_account_shared_audience_with_http_info(business_id, business_to_ad_account_shared_audience_update_with_required_body, opts = {}) ⇒ Array<(BusinessToAdAccountSharedAudience, Integer, Hash)>
Update audience sharing from a business to ad accounts From a business, share a specific audience with other ad account(s), or revoke access to a previously shared audience.
-
#update_business_to_business_shared_audience(business_id, business_to_business_shared_audience_update_with_required_body, opts = {}) ⇒ BusinessToBusinessSharedAudience
Update audience sharing between businesses From a business, share a specific audience with another business account, or revoke access to a previously shared audience.
-
#update_business_to_business_shared_audience_with_http_info(business_id, business_to_business_shared_audience_update_with_required_body, opts = {}) ⇒ Array<(BusinessToBusinessSharedAudience, Integer, Hash)>
Update audience sharing between businesses From a business, share a specific audience with another business account, or revoke access to a previously shared audience.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AudienceSharingApi
Returns a new instance of AudienceSharingApi.
19 20 21 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#ad_accounts_audiences_shared_accounts_list(audience_id, account_type, ad_account_id, opts = {}) ⇒ AdAccountsAudiencesSharedAccountsList200Response
List accounts with access to an audience owned by an ad account List all ad accounts and/or businesses that have access to a specific audience. The audience must be owned by the requesting ad account.
31 32 33 34 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 31 def ad_accounts_audiences_shared_accounts_list(audience_id, account_type, ad_account_id, opts = {}) data, _status_code, _headers = ad_accounts_audiences_shared_accounts_list_with_http_info(audience_id, account_type, ad_account_id, opts) data end |
#ad_accounts_audiences_shared_accounts_list_with_http_info(audience_id, account_type, ad_account_id, opts = {}) ⇒ Array<(AdAccountsAudiencesSharedAccountsList200Response, Integer, Hash)>
List accounts with access to an audience owned by an ad account List all ad accounts and/or businesses that have access to a specific audience. The audience must be owned by the requesting ad account.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 45 def ad_accounts_audiences_shared_accounts_list_with_http_info(audience_id, account_type, ad_account_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AudienceSharingApi.ad_accounts_audiences_shared_accounts_list ...' end # verify the required parameter 'audience_id' is set if @api_client.config.client_side_validation && audience_id.nil? fail ArgumentError, "Missing the required parameter 'audience_id' when calling AudienceSharingApi.ad_accounts_audiences_shared_accounts_list" end if @api_client.config.client_side_validation && audience_id.to_s.length > 18 fail ArgumentError, 'invalid value for "audience_id" when calling AudienceSharingApi.ad_accounts_audiences_shared_accounts_list, the character length must be smaller than or equal to 18.' end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && audience_id !~ pattern fail ArgumentError, "invalid value for 'audience_id' when calling AudienceSharingApi.ad_accounts_audiences_shared_accounts_list, must conform to the pattern #{pattern}." end # verify the required parameter 'account_type' is set if @api_client.config.client_side_validation && account_type.nil? fail ArgumentError, "Missing the required parameter 'account_type' when calling AudienceSharingApi.ad_accounts_audiences_shared_accounts_list" end # verify the required parameter 'ad_account_id' is set if @api_client.config.client_side_validation && ad_account_id.nil? fail ArgumentError, "Missing the required parameter 'ad_account_id' when calling AudienceSharingApi.ad_accounts_audiences_shared_accounts_list" end if @api_client.config.client_side_validation && ad_account_id.to_s.length > 18 fail ArgumentError, 'invalid value for "ad_account_id" when calling AudienceSharingApi.ad_accounts_audiences_shared_accounts_list, the character length must be smaller than or equal to 18.' end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && ad_account_id !~ pattern fail ArgumentError, "invalid value for 'ad_account_id' when calling AudienceSharingApi.ad_accounts_audiences_shared_accounts_list, must conform to the pattern #{pattern}." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 250 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AudienceSharingApi.ad_accounts_audiences_shared_accounts_list, must be smaller than or equal to 250.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AudienceSharingApi.ad_accounts_audiences_shared_accounts_list, must be greater than or equal to 1.' end # resource path local_var_path = '/ad_accounts/{ad_account_id}/audiences/shared/accounts'.sub('{ad_account_id}', CGI.escape(ad_account_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'audience_id'] = audience_id query_params[:'account_type'] = account_type query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AdAccountsAudiencesSharedAccountsList200Response' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2', 'client_credentials'] = opts.merge( :operation => :"AudienceSharingApi.ad_accounts_audiences_shared_accounts_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AudienceSharingApi#ad_accounts_audiences_shared_accounts_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#business_account_audiences_shared_accounts_list(business_id, audience_id, account_type, opts = {}) ⇒ AdAccountsAudiencesSharedAccountsList200Response
List accounts with access to an audience owned by a business List all ad accounts and/or businesses that have access to a specific audience. The audience must either be owned by an ad account in the requesting business, or it must have been shared with the requesting business. If the requesting business is not the owner of the audience, only ad accounts owned by the requesting business will be returned.
140 141 142 143 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 140 def business_account_audiences_shared_accounts_list(business_id, audience_id, account_type, opts = {}) data, _status_code, _headers = business_account_audiences_shared_accounts_list_with_http_info(business_id, audience_id, account_type, opts) data end |
#business_account_audiences_shared_accounts_list_with_http_info(business_id, audience_id, account_type, opts = {}) ⇒ Array<(AdAccountsAudiencesSharedAccountsList200Response, Integer, Hash)>
List accounts with access to an audience owned by a business List all ad accounts and/or businesses that have access to a specific audience. The audience must either be owned by an ad account in the requesting business, or it must have been shared with the requesting business. If the requesting business is not the owner of the audience, only ad accounts owned by the requesting business will be returned.
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 154 def business_account_audiences_shared_accounts_list_with_http_info(business_id, audience_id, account_type, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AudienceSharingApi.business_account_audiences_shared_accounts_list ...' end # verify the required parameter 'business_id' is set if @api_client.config.client_side_validation && business_id.nil? fail ArgumentError, "Missing the required parameter 'business_id' when calling AudienceSharingApi.business_account_audiences_shared_accounts_list" end if @api_client.config.client_side_validation && business_id.to_s.length > 20 fail ArgumentError, 'invalid value for "business_id" when calling AudienceSharingApi.business_account_audiences_shared_accounts_list, the character length must be smaller than or equal to 20.' end if @api_client.config.client_side_validation && business_id.to_s.length < 1 fail ArgumentError, 'invalid value for "business_id" when calling AudienceSharingApi.business_account_audiences_shared_accounts_list, the character length must be greater than or equal to 1.' end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && business_id !~ pattern fail ArgumentError, "invalid value for 'business_id' when calling AudienceSharingApi.business_account_audiences_shared_accounts_list, must conform to the pattern #{pattern}." end # verify the required parameter 'audience_id' is set if @api_client.config.client_side_validation && audience_id.nil? fail ArgumentError, "Missing the required parameter 'audience_id' when calling AudienceSharingApi.business_account_audiences_shared_accounts_list" end if @api_client.config.client_side_validation && audience_id.to_s.length > 18 fail ArgumentError, 'invalid value for "audience_id" when calling AudienceSharingApi.business_account_audiences_shared_accounts_list, the character length must be smaller than or equal to 18.' end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && audience_id !~ pattern fail ArgumentError, "invalid value for 'audience_id' when calling AudienceSharingApi.business_account_audiences_shared_accounts_list, must conform to the pattern #{pattern}." end # verify the required parameter 'account_type' is set if @api_client.config.client_side_validation && account_type.nil? fail ArgumentError, "Missing the required parameter 'account_type' when calling AudienceSharingApi.business_account_audiences_shared_accounts_list" end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 250 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AudienceSharingApi.business_account_audiences_shared_accounts_list, must be smaller than or equal to 250.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AudienceSharingApi.business_account_audiences_shared_accounts_list, must be greater than or equal to 1.' end # resource path local_var_path = '/businesses/{business_id}/audiences/shared/accounts'.sub('{business_id}', CGI.escape(business_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'audience_id'] = audience_id query_params[:'account_type'] = account_type query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AdAccountsAudiencesSharedAccountsList200Response' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"AudienceSharingApi.business_account_audiences_shared_accounts_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AudienceSharingApi#business_account_audiences_shared_accounts_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#shared_audiences_for_business_list(business_id, opts = {}) ⇒ SharedAudiencesForBusinessList200Response
List received audiences for a business Get a list of received audiences for the given business.
252 253 254 255 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 252 def shared_audiences_for_business_list(business_id, opts = {}) data, _status_code, _headers = shared_audiences_for_business_list_with_http_info(business_id, opts) data end |
#shared_audiences_for_business_list_with_http_info(business_id, opts = {}) ⇒ Array<(SharedAudiencesForBusinessList200Response, Integer, Hash)>
List received audiences for a business Get a list of received audiences for the given business.
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 265 def shared_audiences_for_business_list_with_http_info(business_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AudienceSharingApi.shared_audiences_for_business_list ...' end # verify the required parameter 'business_id' is set if @api_client.config.client_side_validation && business_id.nil? fail ArgumentError, "Missing the required parameter 'business_id' when calling AudienceSharingApi.shared_audiences_for_business_list" end if @api_client.config.client_side_validation && business_id.to_s.length > 20 fail ArgumentError, 'invalid value for "business_id" when calling AudienceSharingApi.shared_audiences_for_business_list, the character length must be smaller than or equal to 20.' end if @api_client.config.client_side_validation && business_id.to_s.length < 1 fail ArgumentError, 'invalid value for "business_id" when calling AudienceSharingApi.shared_audiences_for_business_list, the character length must be greater than or equal to 1.' end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && business_id !~ pattern fail ArgumentError, "invalid value for 'business_id' when calling AudienceSharingApi.shared_audiences_for_business_list, must conform to the pattern #{pattern}." end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 250 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AudienceSharingApi.shared_audiences_for_business_list, must be smaller than or equal to 250.' end if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1 fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling AudienceSharingApi.shared_audiences_for_business_list, must be greater than or equal to 1.' end # resource path local_var_path = '/businesses/{business_id}/audiences'.sub('{business_id}', CGI.escape(business_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'order'] = opts[:'order'] if !opts[:'order'].nil? query_params[:'bookmark'] = opts[:'bookmark'] if !opts[:'bookmark'].nil? query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'SharedAudiencesForBusinessList200Response' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"AudienceSharingApi.shared_audiences_for_business_list", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AudienceSharingApi#shared_audiences_for_business_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ad_account_to_ad_account_shared_audience(ad_account_id, ad_account_to_ad_account_shared_audience_update_with_required_body, opts = {}) ⇒ AdAccountToAdAccountSharedAudience
Update audience sharing between ad accounts From an ad account, share a specific audience with another ad account, or revoke access to a previously shared audience. Only the audience owner account can share the audience. The recipient ad account(s) must be in the same Pinterest Business Hierarchy as the business owner of the ad account. This endpoint is not available to all apps. Learn more.
343 344 345 346 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 343 def update_ad_account_to_ad_account_shared_audience(ad_account_id, ad_account_to_ad_account_shared_audience_update_with_required_body, opts = {}) data, _status_code, _headers = update_ad_account_to_ad_account_shared_audience_with_http_info(ad_account_id, ad_account_to_ad_account_shared_audience_update_with_required_body, opts) data end |
#update_ad_account_to_ad_account_shared_audience_with_http_info(ad_account_id, ad_account_to_ad_account_shared_audience_update_with_required_body, opts = {}) ⇒ Array<(AdAccountToAdAccountSharedAudience, Integer, Hash)>
Update audience sharing between ad accounts From an ad account, share a specific audience with another ad account, or revoke access to a previously shared audience. Only the audience owner account can share the audience. The recipient ad account(s) must be in the same Pinterest Business Hierarchy as the business owner of the ad account. This endpoint is not available to all apps. Learn more.
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 354 def update_ad_account_to_ad_account_shared_audience_with_http_info(ad_account_id, ad_account_to_ad_account_shared_audience_update_with_required_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AudienceSharingApi.update_ad_account_to_ad_account_shared_audience ...' end # verify the required parameter 'ad_account_id' is set if @api_client.config.client_side_validation && ad_account_id.nil? fail ArgumentError, "Missing the required parameter 'ad_account_id' when calling AudienceSharingApi.update_ad_account_to_ad_account_shared_audience" end if @api_client.config.client_side_validation && ad_account_id.to_s.length > 18 fail ArgumentError, 'invalid value for "ad_account_id" when calling AudienceSharingApi.update_ad_account_to_ad_account_shared_audience, the character length must be smaller than or equal to 18.' end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && ad_account_id !~ pattern fail ArgumentError, "invalid value for 'ad_account_id' when calling AudienceSharingApi.update_ad_account_to_ad_account_shared_audience, must conform to the pattern #{pattern}." end # verify the required parameter 'ad_account_to_ad_account_shared_audience_update_with_required_body' is set if @api_client.config.client_side_validation && ad_account_to_ad_account_shared_audience_update_with_required_body.nil? fail ArgumentError, "Missing the required parameter 'ad_account_to_ad_account_shared_audience_update_with_required_body' when calling AudienceSharingApi.update_ad_account_to_ad_account_shared_audience" end # resource path local_var_path = '/ad_accounts/{ad_account_id}/audiences/ad_accounts/shared'.sub('{ad_account_id}', CGI.escape(ad_account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(ad_account_to_ad_account_shared_audience_update_with_required_body) # return_type return_type = opts[:debug_return_type] || 'AdAccountToAdAccountSharedAudience' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"AudienceSharingApi.update_ad_account_to_ad_account_shared_audience", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AudienceSharingApi#update_ad_account_to_ad_account_shared_audience\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_ad_account_to_business_shared_audience(ad_account_id, ad_account_to_business_shared_audience_update_with_required_body, opts = {}) ⇒ AdAccountToBusinessSharedAudience
Update audience sharing from an ad account to businesses From an ad account, share a specific audience with a business account, or revoke access to a previously shared audience. Only the audience owner account can share the audience. The recipient business account must be in the same business hierarchy as the business owner of the ad account. This endpoint is not available to all apps. Learn more.
426 427 428 429 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 426 def update_ad_account_to_business_shared_audience(ad_account_id, ad_account_to_business_shared_audience_update_with_required_body, opts = {}) data, _status_code, _headers = update_ad_account_to_business_shared_audience_with_http_info(ad_account_id, ad_account_to_business_shared_audience_update_with_required_body, opts) data end |
#update_ad_account_to_business_shared_audience_with_http_info(ad_account_id, ad_account_to_business_shared_audience_update_with_required_body, opts = {}) ⇒ Array<(AdAccountToBusinessSharedAudience, Integer, Hash)>
Update audience sharing from an ad account to businesses From an ad account, share a specific audience with a business account, or revoke access to a previously shared audience. Only the audience owner account can share the audience. The recipient business account must be in the same business hierarchy as the business owner of the ad account. This endpoint is not available to all apps. Learn more.
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 437 def update_ad_account_to_business_shared_audience_with_http_info(ad_account_id, ad_account_to_business_shared_audience_update_with_required_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AudienceSharingApi.update_ad_account_to_business_shared_audience ...' end # verify the required parameter 'ad_account_id' is set if @api_client.config.client_side_validation && ad_account_id.nil? fail ArgumentError, "Missing the required parameter 'ad_account_id' when calling AudienceSharingApi.update_ad_account_to_business_shared_audience" end if @api_client.config.client_side_validation && ad_account_id.to_s.length > 18 fail ArgumentError, 'invalid value for "ad_account_id" when calling AudienceSharingApi.update_ad_account_to_business_shared_audience, the character length must be smaller than or equal to 18.' end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && ad_account_id !~ pattern fail ArgumentError, "invalid value for 'ad_account_id' when calling AudienceSharingApi.update_ad_account_to_business_shared_audience, must conform to the pattern #{pattern}." end # verify the required parameter 'ad_account_to_business_shared_audience_update_with_required_body' is set if @api_client.config.client_side_validation && ad_account_to_business_shared_audience_update_with_required_body.nil? fail ArgumentError, "Missing the required parameter 'ad_account_to_business_shared_audience_update_with_required_body' when calling AudienceSharingApi.update_ad_account_to_business_shared_audience" end # resource path local_var_path = '/ad_accounts/{ad_account_id}/audiences/businesses/shared'.sub('{ad_account_id}', CGI.escape(ad_account_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(ad_account_to_business_shared_audience_update_with_required_body) # return_type return_type = opts[:debug_return_type] || 'AdAccountToBusinessSharedAudience' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"AudienceSharingApi.update_ad_account_to_business_shared_audience", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AudienceSharingApi#update_ad_account_to_business_shared_audience\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_business_to_ad_account_shared_audience(business_id, business_to_ad_account_shared_audience_update_with_required_body, opts = {}) ⇒ BusinessToAdAccountSharedAudience
Update audience sharing from a business to ad accounts From a business, share a specific audience with other ad account(s), or revoke access to a previously shared audience. - If the business is the owner of the audience, it can share with any ad account within the same business hierarchy. - If the business is the recipient of the audience, it can share with any of its owned ad accounts. This endpoint is not available to all apps. Learn more.
509 510 511 512 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 509 def update_business_to_ad_account_shared_audience(business_id, business_to_ad_account_shared_audience_update_with_required_body, opts = {}) data, _status_code, _headers = update_business_to_ad_account_shared_audience_with_http_info(business_id, business_to_ad_account_shared_audience_update_with_required_body, opts) data end |
#update_business_to_ad_account_shared_audience_with_http_info(business_id, business_to_ad_account_shared_audience_update_with_required_body, opts = {}) ⇒ Array<(BusinessToAdAccountSharedAudience, Integer, Hash)>
Update audience sharing from a business to ad accounts From a business, share a specific audience with other ad account(s), or revoke access to a previously shared audience. - If the business is the owner of the audience, it can share with any ad account within the same business hierarchy. - If the business is the recipient of the audience, it can share with any of its owned ad accounts. This endpoint is not available to all apps. Learn more.
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 520 def update_business_to_ad_account_shared_audience_with_http_info(business_id, business_to_ad_account_shared_audience_update_with_required_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AudienceSharingApi.update_business_to_ad_account_shared_audience ...' end # verify the required parameter 'business_id' is set if @api_client.config.client_side_validation && business_id.nil? fail ArgumentError, "Missing the required parameter 'business_id' when calling AudienceSharingApi.update_business_to_ad_account_shared_audience" end if @api_client.config.client_side_validation && business_id.to_s.length > 20 fail ArgumentError, 'invalid value for "business_id" when calling AudienceSharingApi.update_business_to_ad_account_shared_audience, the character length must be smaller than or equal to 20.' end if @api_client.config.client_side_validation && business_id.to_s.length < 1 fail ArgumentError, 'invalid value for "business_id" when calling AudienceSharingApi.update_business_to_ad_account_shared_audience, the character length must be greater than or equal to 1.' end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && business_id !~ pattern fail ArgumentError, "invalid value for 'business_id' when calling AudienceSharingApi.update_business_to_ad_account_shared_audience, must conform to the pattern #{pattern}." end # verify the required parameter 'business_to_ad_account_shared_audience_update_with_required_body' is set if @api_client.config.client_side_validation && business_to_ad_account_shared_audience_update_with_required_body.nil? fail ArgumentError, "Missing the required parameter 'business_to_ad_account_shared_audience_update_with_required_body' when calling AudienceSharingApi.update_business_to_ad_account_shared_audience" end # resource path local_var_path = '/businesses/{business_id}/audiences/ad_accounts/shared'.sub('{business_id}', CGI.escape(business_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(business_to_ad_account_shared_audience_update_with_required_body) # return_type return_type = opts[:debug_return_type] || 'BusinessToAdAccountSharedAudience' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"AudienceSharingApi.update_business_to_ad_account_shared_audience", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AudienceSharingApi#update_business_to_ad_account_shared_audience\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_business_to_business_shared_audience(business_id, business_to_business_shared_audience_update_with_required_body, opts = {}) ⇒ BusinessToBusinessSharedAudience
Update audience sharing between businesses From a business, share a specific audience with another business account, or revoke access to a previously shared audience. Only the audience owner can share the audience with other businesses, and the recipient business must be within the same business hierarchy. This endpoint is not available to all apps. Learn more.
596 597 598 599 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 596 def update_business_to_business_shared_audience(business_id, business_to_business_shared_audience_update_with_required_body, opts = {}) data, _status_code, _headers = update_business_to_business_shared_audience_with_http_info(business_id, business_to_business_shared_audience_update_with_required_body, opts) data end |
#update_business_to_business_shared_audience_with_http_info(business_id, business_to_business_shared_audience_update_with_required_body, opts = {}) ⇒ Array<(BusinessToBusinessSharedAudience, Integer, Hash)>
Update audience sharing between businesses From a business, share a specific audience with another business account, or revoke access to a previously shared audience. Only the audience owner can share the audience with other businesses, and the recipient business must be within the same business hierarchy. This endpoint is not available to all apps. Learn more.
607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 |
# File 'lib/pinterest_sdk/api/audience_sharing_api.rb', line 607 def update_business_to_business_shared_audience_with_http_info(business_id, business_to_business_shared_audience_update_with_required_body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AudienceSharingApi.update_business_to_business_shared_audience ...' end # verify the required parameter 'business_id' is set if @api_client.config.client_side_validation && business_id.nil? fail ArgumentError, "Missing the required parameter 'business_id' when calling AudienceSharingApi.update_business_to_business_shared_audience" end if @api_client.config.client_side_validation && business_id.to_s.length > 20 fail ArgumentError, 'invalid value for "business_id" when calling AudienceSharingApi.update_business_to_business_shared_audience, the character length must be smaller than or equal to 20.' end if @api_client.config.client_side_validation && business_id.to_s.length < 1 fail ArgumentError, 'invalid value for "business_id" when calling AudienceSharingApi.update_business_to_business_shared_audience, the character length must be greater than or equal to 1.' end pattern = Regexp.new(/^\d+$/) if @api_client.config.client_side_validation && business_id !~ pattern fail ArgumentError, "invalid value for 'business_id' when calling AudienceSharingApi.update_business_to_business_shared_audience, must conform to the pattern #{pattern}." end # verify the required parameter 'business_to_business_shared_audience_update_with_required_body' is set if @api_client.config.client_side_validation && business_to_business_shared_audience_update_with_required_body.nil? fail ArgumentError, "Missing the required parameter 'business_to_business_shared_audience_update_with_required_body' when calling AudienceSharingApi.update_business_to_business_shared_audience" end # resource path local_var_path = '/businesses/{business_id}/audiences/businesses/shared'.sub('{business_id}', CGI.escape(business_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(business_to_business_shared_audience_update_with_required_body) # return_type return_type = opts[:debug_return_type] || 'BusinessToBusinessSharedAudience' # auth_names auth_names = opts[:debug_auth_names] || ['pinterest_oauth2'] = opts.merge( :operation => :"AudienceSharingApi.update_business_to_business_shared_audience", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AudienceSharingApi#update_business_to_business_shared_audience\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |