late-sdk 0.0.1486 → 0.0.1487

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -0
  3. data/docs/AdAccountsApi.md +144 -0
  4. data/docs/GetAdAccountBilling200Response.md +30 -0
  5. data/docs/GetAdAccountBilling200ResponseAccountBudgetsInner.md +28 -0
  6. data/docs/GetAdAccountBilling200ResponseBillingSetupsInner.md +26 -0
  7. data/docs/GetAdAccountBilling200ResponsePaymentsAccountsInner.md +26 -0
  8. data/docs/GetAdAccountBilling200ResponsePendingBudgetProposalsInner.md +20 -0
  9. data/docs/SetUpAdAccountBilling200Response.md +30 -0
  10. data/docs/SetUpAdAccountBilling201Response.md +32 -0
  11. data/docs/SetUpAdAccountBillingRequest.md +30 -0
  12. data/lib/zernio-sdk/api/ad_accounts_api.rb +135 -0
  13. data/lib/zernio-sdk/models/get_ad_account_billing200_response.rb +213 -0
  14. data/lib/zernio-sdk/models/get_ad_account_billing200_response_account_budgets_inner.rb +232 -0
  15. data/lib/zernio-sdk/models/get_ad_account_billing200_response_billing_setups_inner.rb +222 -0
  16. data/lib/zernio-sdk/models/get_ad_account_billing200_response_payments_accounts_inner.rb +189 -0
  17. data/lib/zernio-sdk/models/get_ad_account_billing200_response_pending_budget_proposals_inner.rb +157 -0
  18. data/lib/zernio-sdk/models/set_up_ad_account_billing200_response.rb +205 -0
  19. data/lib/zernio-sdk/models/set_up_ad_account_billing201_response.rb +213 -0
  20. data/lib/zernio-sdk/models/set_up_ad_account_billing_request.rb +350 -0
  21. data/lib/zernio-sdk/version.rb +1 -1
  22. data/lib/zernio-sdk.rb +8 -0
  23. data/openapi.yaml +1 -1
  24. data/spec/api/ad_accounts_api_spec.rb +25 -0
  25. data/spec/models/get_ad_account_billing200_response_account_budgets_inner_spec.rb +70 -0
  26. data/spec/models/get_ad_account_billing200_response_billing_setups_inner_spec.rb +64 -0
  27. data/spec/models/get_ad_account_billing200_response_payments_accounts_inner_spec.rb +60 -0
  28. data/spec/models/get_ad_account_billing200_response_pending_budget_proposals_inner_spec.rb +42 -0
  29. data/spec/models/get_ad_account_billing200_response_spec.rb +72 -0
  30. data/spec/models/set_up_ad_account_billing200_response_spec.rb +72 -0
  31. data/spec/models/set_up_ad_account_billing201_response_spec.rb +78 -0
  32. data/spec/models/set_up_ad_account_billing_request_spec.rb +72 -0
  33. data/zernio-sdk-0.0.1487.gem +0 -0
  34. metadata +34 -2
  35. data/zernio-sdk-0.0.1486.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 837a34677ee59020792e1d575a4e6a70d8301e6f62e4a04a04c4cc9b740f75ea
4
- data.tar.gz: aa553f153a0e78cab8df37cdef6339c7c203ecd99c090b442b0633cdc8ff1c76
3
+ metadata.gz: 6d1436e39b63e20deda256dcbdc73020df3da373372e2f6eb9c72954578b8b1b
4
+ data.tar.gz: d09fe055ede9a9d499642afe4a50a57ef4d0f27ad924515d722abb4ea1acc8bf
5
5
  SHA512:
6
- metadata.gz: 4a7befccf633f683e1a273cbcb715c7912232e95259d1a86fcf0bfc104e7c00f2e318b998eff064ec29370ecccd3d0e9f7c452b97bd7d6ec10bec6060ba5bba2
7
- data.tar.gz: 0c985247e9f6e1f007c297f27a960642c27a84c7cedb5c3758731f484253119a15320ac4a543fb2117e7abe6c086bc8f9c18dec422e3c4712db61b19d1df21eb
6
+ metadata.gz: e69243e4430441f4bbab1acb2907f511875ceb2eb74d5bc3567f96132a7bdaff50605bc3dd24bb6cad6c8bfcd9517a0099569ea7d65532e6789283fe02f24d7f
7
+ data.tar.gz: c52e5b50097027dc4f6d37fff206d4bc4ea602015e1c91e92640a2fb479e0981647ae222a05fb1d8f72a844abc5ca79a13f17ec390d8c4a1807fffb450be68da
data/README.md CHANGED
@@ -142,6 +142,7 @@ Class | Method | HTTP request | Description
142
142
  *Zernio::AdAccountsApi* | [**delete_ad_negative_keyword_list**](docs/AdAccountsApi.md#delete_ad_negative_keyword_list) | **DELETE** /v1/ads/accounts/negative-keyword-lists/{listId} | Delete a negative keyword list
143
143
  *Zernio::AdAccountsApi* | [**delete_value_rule_set**](docs/AdAccountsApi.md#delete_value_rule_set) | **DELETE** /v1/ads/value-rule-sets/{valueRuleSetId} | Delete a value rule set
144
144
  *Zernio::AdAccountsApi* | [**detach_ad_label**](docs/AdAccountsApi.md#detach_ad_label) | **DELETE** /v1/ads/labels/{labelId}/assignments | Detach a Google Ads label
145
+ *Zernio::AdAccountsApi* | [**get_ad_account_billing**](docs/AdAccountsApi.md#get_ad_account_billing) | **GET** /v1/ads/accounts/billing | Get ad account billing
145
146
  *Zernio::AdAccountsApi* | [**get_ad_account_finance**](docs/AdAccountsApi.md#get_ad_account_finance) | **GET** /v1/ads/accounts/finance | Ad account finances
146
147
  *Zernio::AdAccountsApi* | [**get_ad_account_hierarchy**](docs/AdAccountsApi.md#get_ad_account_hierarchy) | **GET** /v1/ads/accounts/hierarchy | Get manager account hierarchy
147
148
  *Zernio::AdAccountsApi* | [**get_ad_account_live_entities**](docs/AdAccountsApi.md#get_ad_account_live_entities) | **GET** /v1/ads/accounts/live | Read an ad account's campaigns and ad sets live
@@ -185,6 +186,7 @@ Class | Method | HTTP request | Description
185
186
  *Zernio::AdAccountsApi* | [**replace_ad_negative_keyword_list_keywords**](docs/AdAccountsApi.md#replace_ad_negative_keyword_list_keywords) | **PUT** /v1/ads/accounts/negative-keyword-lists/{listId}/keywords | Replace negative list keywords
186
187
  *Zernio::AdAccountsApi* | [**reply_to_ad_comment**](docs/AdAccountsApi.md#reply_to_ad_comment) | **POST** /v1/ads/{adId}/comments/{commentId}/reply | Reply to an ad comment
187
188
  *Zernio::AdAccountsApi* | [**revoke_ad_account_user_invitation**](docs/AdAccountsApi.md#revoke_ad_account_user_invitation) | **DELETE** /v1/ads/accounts/user-invitations | Revoke a user access invitation
189
+ *Zernio::AdAccountsApi* | [**set_up_ad_account_billing**](docs/AdAccountsApi.md#set_up_ad_account_billing) | **POST** /v1/ads/accounts/billing | Set up ad account billing (monthly invoicing)
188
190
  *Zernio::AdAccountsApi* | [**update_account_callouts**](docs/AdAccountsApi.md#update_account_callouts) | **PUT** /v1/ads/accounts/callouts | Update account callouts
189
191
  *Zernio::AdAccountsApi* | [**update_account_sitelinks**](docs/AdAccountsApi.md#update_account_sitelinks) | **PUT** /v1/ads/accounts/sitelinks | Update account sitelinks
190
192
  *Zernio::AdAccountsApi* | [**update_account_structured_snippets**](docs/AdAccountsApi.md#update_account_structured_snippets) | **PUT** /v1/ads/accounts/structured-snippets | Update account snippets
@@ -1898,6 +1900,11 @@ Class | Method | HTTP request | Description
1898
1900
  - [Zernio::GetAccountPosts200ResponsePostsInner](docs/GetAccountPosts200ResponsePostsInner.md)
1899
1901
  - [Zernio::GetAd200Response](docs/GetAd200Response.md)
1900
1902
  - [Zernio::GetAd200ResponseDarkPost](docs/GetAd200ResponseDarkPost.md)
1903
+ - [Zernio::GetAdAccountBilling200Response](docs/GetAdAccountBilling200Response.md)
1904
+ - [Zernio::GetAdAccountBilling200ResponseAccountBudgetsInner](docs/GetAdAccountBilling200ResponseAccountBudgetsInner.md)
1905
+ - [Zernio::GetAdAccountBilling200ResponseBillingSetupsInner](docs/GetAdAccountBilling200ResponseBillingSetupsInner.md)
1906
+ - [Zernio::GetAdAccountBilling200ResponsePaymentsAccountsInner](docs/GetAdAccountBilling200ResponsePaymentsAccountsInner.md)
1907
+ - [Zernio::GetAdAccountBilling200ResponsePendingBudgetProposalsInner](docs/GetAdAccountBilling200ResponsePendingBudgetProposalsInner.md)
1901
1908
  - [Zernio::GetAdAccountFinance200Response](docs/GetAdAccountFinance200Response.md)
1902
1909
  - [Zernio::GetAdAccountFinance200ResponseFundingSource](docs/GetAdAccountFinance200ResponseFundingSource.md)
1903
1910
  - [Zernio::GetAdAccountHierarchy200Response](docs/GetAdAccountHierarchy200Response.md)
@@ -3237,6 +3244,9 @@ Class | Method | HTTP request | Description
3237
3244
  - [Zernio::SetRedditPostFlairRequest](docs/SetRedditPostFlairRequest.md)
3238
3245
  - [Zernio::SetTelegramCommandsRequest](docs/SetTelegramCommandsRequest.md)
3239
3246
  - [Zernio::SetTelegramCommandsRequestCommandsInner](docs/SetTelegramCommandsRequestCommandsInner.md)
3247
+ - [Zernio::SetUpAdAccountBilling200Response](docs/SetUpAdAccountBilling200Response.md)
3248
+ - [Zernio::SetUpAdAccountBilling201Response](docs/SetUpAdAccountBilling201Response.md)
3249
+ - [Zernio::SetUpAdAccountBillingRequest](docs/SetUpAdAccountBillingRequest.md)
3240
3250
  - [Zernio::SetWhatsAppConversationalAutomationRequest](docs/SetWhatsAppConversationalAutomationRequest.md)
3241
3251
  - [Zernio::SetWhatsAppFlowsEncryptionKeyRequest](docs/SetWhatsAppFlowsEncryptionKeyRequest.md)
3242
3252
  - [Zernio::SetWhatsappBusinessUsername200Response](docs/SetWhatsappBusinessUsername200Response.md)
@@ -20,6 +20,7 @@ All URIs are relative to *https://zernio.com/api*
20
20
  | [**delete_ad_negative_keyword_list**](AdAccountsApi.md#delete_ad_negative_keyword_list) | **DELETE** /v1/ads/accounts/negative-keyword-lists/{listId} | Delete a negative keyword list |
21
21
  | [**delete_value_rule_set**](AdAccountsApi.md#delete_value_rule_set) | **DELETE** /v1/ads/value-rule-sets/{valueRuleSetId} | Delete a value rule set |
22
22
  | [**detach_ad_label**](AdAccountsApi.md#detach_ad_label) | **DELETE** /v1/ads/labels/{labelId}/assignments | Detach a Google Ads label |
23
+ | [**get_ad_account_billing**](AdAccountsApi.md#get_ad_account_billing) | **GET** /v1/ads/accounts/billing | Get ad account billing |
23
24
  | [**get_ad_account_finance**](AdAccountsApi.md#get_ad_account_finance) | **GET** /v1/ads/accounts/finance | Ad account finances |
24
25
  | [**get_ad_account_hierarchy**](AdAccountsApi.md#get_ad_account_hierarchy) | **GET** /v1/ads/accounts/hierarchy | Get manager account hierarchy |
25
26
  | [**get_ad_account_live_entities**](AdAccountsApi.md#get_ad_account_live_entities) | **GET** /v1/ads/accounts/live | Read an ad account's campaigns and ad sets live |
@@ -63,6 +64,7 @@ All URIs are relative to *https://zernio.com/api*
63
64
  | [**replace_ad_negative_keyword_list_keywords**](AdAccountsApi.md#replace_ad_negative_keyword_list_keywords) | **PUT** /v1/ads/accounts/negative-keyword-lists/{listId}/keywords | Replace negative list keywords |
64
65
  | [**reply_to_ad_comment**](AdAccountsApi.md#reply_to_ad_comment) | **POST** /v1/ads/{adId}/comments/{commentId}/reply | Reply to an ad comment |
65
66
  | [**revoke_ad_account_user_invitation**](AdAccountsApi.md#revoke_ad_account_user_invitation) | **DELETE** /v1/ads/accounts/user-invitations | Revoke a user access invitation |
67
+ | [**set_up_ad_account_billing**](AdAccountsApi.md#set_up_ad_account_billing) | **POST** /v1/ads/accounts/billing | Set up ad account billing (monthly invoicing) |
66
68
  | [**update_account_callouts**](AdAccountsApi.md#update_account_callouts) | **PUT** /v1/ads/accounts/callouts | Update account callouts |
67
69
  | [**update_account_sitelinks**](AdAccountsApi.md#update_account_sitelinks) | **PUT** /v1/ads/accounts/sitelinks | Update account sitelinks |
68
70
  | [**update_account_structured_snippets**](AdAccountsApi.md#update_account_structured_snippets) | **PUT** /v1/ads/accounts/structured-snippets | Update account snippets |
@@ -1218,6 +1220,79 @@ end
1218
1220
  - **Accept**: application/json
1219
1221
 
1220
1222
 
1223
+ ## get_ad_account_billing
1224
+
1225
+ > <GetAdAccountBilling200Response> get_ad_account_billing(account_id, opts)
1226
+
1227
+ Get ad account billing
1228
+
1229
+ Reads the payments accounts a Google Ads account can be billed to, plus its billing setups and account budgets. Payments accounts come from Google's PaymentsAccountService, read as the manager above the customer: they are the monthly invoicing (consolidated billing) accounts of that manager. An empty `paymentsAccounts` means the manager has no monthly invoicing, so billing cannot be set up through the API and has to be added in Google Ads. Billing setups and account budgets are read live from Google with their status. Results are cached for 10 minutes and dropped on every setup through Zernio.
1230
+
1231
+ ### Examples
1232
+
1233
+ ```ruby
1234
+ require 'time'
1235
+ require 'zernio-sdk'
1236
+ # setup authorization
1237
+ Zernio.configure do |config|
1238
+ # Configure Bearer authorization (JWT): bearerAuth
1239
+ config.access_token = 'YOUR_BEARER_TOKEN'
1240
+ end
1241
+
1242
+ api_instance = Zernio::AdAccountsApi.new
1243
+ account_id = 'account_id_example' # String | Google ads SocialAccount id.
1244
+ opts = {
1245
+ ad_account_id: 'ad_account_id_example' # String | Google Ads customer id, digits only. Defaults to the connection's selected customer.
1246
+ }
1247
+
1248
+ begin
1249
+ # Get ad account billing
1250
+ result = api_instance.get_ad_account_billing(account_id, opts)
1251
+ p result
1252
+ rescue Zernio::ApiError => e
1253
+ puts "Error when calling AdAccountsApi->get_ad_account_billing: #{e}"
1254
+ end
1255
+ ```
1256
+
1257
+ #### Using the get_ad_account_billing_with_http_info variant
1258
+
1259
+ This returns an Array which contains the response data, status code and headers.
1260
+
1261
+ > <Array(<GetAdAccountBilling200Response>, Integer, Hash)> get_ad_account_billing_with_http_info(account_id, opts)
1262
+
1263
+ ```ruby
1264
+ begin
1265
+ # Get ad account billing
1266
+ data, status_code, headers = api_instance.get_ad_account_billing_with_http_info(account_id, opts)
1267
+ p status_code # => 2xx
1268
+ p headers # => { ... }
1269
+ p data # => <GetAdAccountBilling200Response>
1270
+ rescue Zernio::ApiError => e
1271
+ puts "Error when calling AdAccountsApi->get_ad_account_billing_with_http_info: #{e}"
1272
+ end
1273
+ ```
1274
+
1275
+ ### Parameters
1276
+
1277
+ | Name | Type | Description | Notes |
1278
+ | ---- | ---- | ----------- | ----- |
1279
+ | **account_id** | **String** | Google ads SocialAccount id. | |
1280
+ | **ad_account_id** | **String** | Google Ads customer id, digits only. Defaults to the connection&#39;s selected customer. | [optional] |
1281
+
1282
+ ### Return type
1283
+
1284
+ [**GetAdAccountBilling200Response**](GetAdAccountBilling200Response.md)
1285
+
1286
+ ### Authorization
1287
+
1288
+ [bearerAuth](../README.md#bearerAuth)
1289
+
1290
+ ### HTTP request headers
1291
+
1292
+ - **Content-Type**: Not defined
1293
+ - **Accept**: application/json
1294
+
1295
+
1221
1296
  ## get_ad_account_finance
1222
1297
 
1223
1298
  > <GetAdAccountFinance200Response> get_ad_account_finance(account_id, ad_account_id)
@@ -4437,6 +4512,75 @@ end
4437
4512
  - **Accept**: application/json
4438
4513
 
4439
4514
 
4515
+ ## set_up_ad_account_billing
4516
+
4517
+ > <SetUpAdAccountBilling200Response> set_up_ad_account_billing(set_up_ad_account_billing_request)
4518
+
4519
+ Set up ad account billing (monthly invoicing)
4520
+
4521
+ Bills a Google Ads account to a monthly invoicing payments account of a manager above it, and proposes its account budget, so the account can serve without anyone opening Google Ads. Monthly invoicing only. Google's API cannot add a card or other payment method, so `paymentsAccountId` must be one of the manager's monthly invoicing (consolidated billing) payments accounts listed by GET /v1/ads/accounts/billing. A manager without monthly invoicing has none, and billing has to be added in Google Ads instead. Creates a billing setup (Google's BillingSetupService) that starts now on that payments account, then an account budget proposal that starts now and never ends: unlimited by default, or capped at `spendingLimit` in the account currency. Google reviews the budget offline, usually within an hour; until then the setup reads `APPROVED_HELD` and ads do not serve. A customer whose current billing setup already has a budget is refused with 409, and so is one billed to another payments account: this call never replaces existing billing. A current setup on the same payments account without a budget (for example after a budget rejection) is reused, so resending the same request finishes it. Not idempotent and never retried: after a 502 with details.creationStatus=unknown, read GET /v1/ads/accounts/billing before retrying. Google has no dry run for billing setups, so `validateOnly: true` checks the payments account and the existing billing without creating anything (and asks Google to validate the budget when a setup would be reused).
4522
+
4523
+ ### Examples
4524
+
4525
+ ```ruby
4526
+ require 'time'
4527
+ require 'zernio-sdk'
4528
+ # setup authorization
4529
+ Zernio.configure do |config|
4530
+ # Configure Bearer authorization (JWT): bearerAuth
4531
+ config.access_token = 'YOUR_BEARER_TOKEN'
4532
+ end
4533
+
4534
+ api_instance = Zernio::AdAccountsApi.new
4535
+ set_up_ad_account_billing_request = Zernio::SetUpAdAccountBillingRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', payments_account_id: 'payments_account_id_example'}) # SetUpAdAccountBillingRequest |
4536
+
4537
+ begin
4538
+ # Set up ad account billing (monthly invoicing)
4539
+ result = api_instance.set_up_ad_account_billing(set_up_ad_account_billing_request)
4540
+ p result
4541
+ rescue Zernio::ApiError => e
4542
+ puts "Error when calling AdAccountsApi->set_up_ad_account_billing: #{e}"
4543
+ end
4544
+ ```
4545
+
4546
+ #### Using the set_up_ad_account_billing_with_http_info variant
4547
+
4548
+ This returns an Array which contains the response data, status code and headers.
4549
+
4550
+ > <Array(<SetUpAdAccountBilling200Response>, Integer, Hash)> set_up_ad_account_billing_with_http_info(set_up_ad_account_billing_request)
4551
+
4552
+ ```ruby
4553
+ begin
4554
+ # Set up ad account billing (monthly invoicing)
4555
+ data, status_code, headers = api_instance.set_up_ad_account_billing_with_http_info(set_up_ad_account_billing_request)
4556
+ p status_code # => 2xx
4557
+ p headers # => { ... }
4558
+ p data # => <SetUpAdAccountBilling200Response>
4559
+ rescue Zernio::ApiError => e
4560
+ puts "Error when calling AdAccountsApi->set_up_ad_account_billing_with_http_info: #{e}"
4561
+ end
4562
+ ```
4563
+
4564
+ ### Parameters
4565
+
4566
+ | Name | Type | Description | Notes |
4567
+ | ---- | ---- | ----------- | ----- |
4568
+ | **set_up_ad_account_billing_request** | [**SetUpAdAccountBillingRequest**](SetUpAdAccountBillingRequest.md) | | |
4569
+
4570
+ ### Return type
4571
+
4572
+ [**SetUpAdAccountBilling200Response**](SetUpAdAccountBilling200Response.md)
4573
+
4574
+ ### Authorization
4575
+
4576
+ [bearerAuth](../README.md#bearerAuth)
4577
+
4578
+ ### HTTP request headers
4579
+
4580
+ - **Content-Type**: application/json
4581
+ - **Accept**: application/json
4582
+
4583
+
4440
4584
  ## update_account_callouts
4441
4585
 
4442
4586
  > <UpdateAccountCallouts200Response> update_account_callouts(update_account_callouts_request)
@@ -0,0 +1,30 @@
1
+ # Zernio::GetAdAccountBilling200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **customer_id** | **String** | | [optional] |
8
+ | **payments_accounts** | [**Array&lt;GetAdAccountBilling200ResponsePaymentsAccountsInner&gt;**](GetAdAccountBilling200ResponsePaymentsAccountsInner.md) | | [optional] |
9
+ | **billing_setups** | [**Array&lt;GetAdAccountBilling200ResponseBillingSetupsInner&gt;**](GetAdAccountBilling200ResponseBillingSetupsInner.md) | | [optional] |
10
+ | **account_budgets** | [**Array&lt;GetAdAccountBilling200ResponseAccountBudgetsInner&gt;**](GetAdAccountBilling200ResponseAccountBudgetsInner.md) | | [optional] |
11
+ | **pending_budget_proposals** | [**Array&lt;GetAdAccountBilling200ResponsePendingBudgetProposalsInner&gt;**](GetAdAccountBilling200ResponsePendingBudgetProposalsInner.md) | New account budgets proposed but not yet approved by Google. A setup with one is not reused by the POST. | [optional] |
12
+ | **cached_at** | **Time** | When this data was fetched from Google. Null when the cache is unavailable. | [optional] |
13
+ | **stale** | **Boolean** | True when Google&#39;s quota was exhausted and this is the last successful fetch. | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'zernio-sdk'
19
+
20
+ instance = Zernio::GetAdAccountBilling200Response.new(
21
+ customer_id: null,
22
+ payments_accounts: null,
23
+ billing_setups: null,
24
+ account_budgets: null,
25
+ pending_budget_proposals: null,
26
+ cached_at: null,
27
+ stale: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,28 @@
1
+ # Zernio::GetAdAccountBilling200ResponseAccountBudgetsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_budget_id** | **String** | | [optional] |
8
+ | **status** | **String** | | [optional] |
9
+ | **billing_setup_id** | **String** | | [optional] |
10
+ | **approved_spending_limit_micros** | **String** | | [optional] |
11
+ | **approved_spending_limit_type** | **String** | INFINITE for an unlimited budget. | [optional] |
12
+ | **pending_proposal_id** | **String** | Account budget proposal still waiting for Google&#39;s review. | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'zernio-sdk'
18
+
19
+ instance = Zernio::GetAdAccountBilling200ResponseAccountBudgetsInner.new(
20
+ account_budget_id: null,
21
+ status: null,
22
+ billing_setup_id: null,
23
+ approved_spending_limit_micros: null,
24
+ approved_spending_limit_type: null,
25
+ pending_proposal_id: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,26 @@
1
+ # Zernio::GetAdAccountBilling200ResponseBillingSetupsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **billing_setup_id** | **String** | | [optional] |
8
+ | **status** | **String** | APPROVED_HELD means approved but waiting for its first account budget to be approved. | [optional] |
9
+ | **payments_account_id** | **String** | | [optional] |
10
+ | **start_date_time** | **String** | In the account time zone, as Google returns it. | [optional] |
11
+ | **end_date_time** | **String** | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'zernio-sdk'
17
+
18
+ instance = Zernio::GetAdAccountBilling200ResponseBillingSetupsInner.new(
19
+ billing_setup_id: null,
20
+ status: null,
21
+ payments_account_id: null,
22
+ start_date_time: null,
23
+ end_date_time: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,26 @@
1
+ # Zernio::GetAdAccountBilling200ResponsePaymentsAccountsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **payments_account_id** | **String** | Format 1234-5678-9012-3456. Pass it to POST /v1/ads/accounts/billing. | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+ | **currency** | **String** | | [optional] |
10
+ | **payments_profile_id** | **String** | | [optional] |
11
+ | **paying_manager_customer_id** | **String** | Manager whose monthly invoice pays this account. | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'zernio-sdk'
17
+
18
+ instance = Zernio::GetAdAccountBilling200ResponsePaymentsAccountsInner.new(
19
+ payments_account_id: null,
20
+ name: null,
21
+ currency: null,
22
+ payments_profile_id: null,
23
+ paying_manager_customer_id: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,20 @@
1
+ # Zernio::GetAdAccountBilling200ResponsePendingBudgetProposalsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_budget_proposal_id** | **String** | | [optional] |
8
+ | **billing_setup_id** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::GetAdAccountBilling200ResponsePendingBudgetProposalsInner.new(
16
+ account_budget_proposal_id: null,
17
+ billing_setup_id: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,30 @@
1
+ # Zernio::SetUpAdAccountBilling200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **customer_id** | **String** | | [optional] |
8
+ | **payments_account_id** | **String** | | [optional] |
9
+ | **payments_account_name** | **String** | | [optional] |
10
+ | **billing_setup_id** | **String** | | [optional] |
11
+ | **reused_billing_setup** | **Boolean** | | [optional] |
12
+ | **account_budget_proposal_id** | **String** | Always null for validateOnly. | [optional] |
13
+ | **validate_only** | **Boolean** | | [optional] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'zernio-sdk'
19
+
20
+ instance = Zernio::SetUpAdAccountBilling200Response.new(
21
+ customer_id: null,
22
+ payments_account_id: null,
23
+ payments_account_name: null,
24
+ billing_setup_id: null,
25
+ reused_billing_setup: null,
26
+ account_budget_proposal_id: null,
27
+ validate_only: null
28
+ )
29
+ ```
30
+
@@ -0,0 +1,32 @@
1
+ # Zernio::SetUpAdAccountBilling201Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **customer_id** | **String** | | [optional] |
8
+ | **payments_account_id** | **String** | | [optional] |
9
+ | **payments_account_name** | **String** | | [optional] |
10
+ | **billing_setup_id** | **String** | | [optional] |
11
+ | **reused_billing_setup** | **Boolean** | True when an existing setup on the same payments account without a budget was completed. | [optional] |
12
+ | **account_budget_proposal_id** | **String** | | [optional] |
13
+ | **validate_only** | **Boolean** | | [optional] |
14
+ | **next_steps** | **String** | | [optional] |
15
+
16
+ ## Example
17
+
18
+ ```ruby
19
+ require 'zernio-sdk'
20
+
21
+ instance = Zernio::SetUpAdAccountBilling201Response.new(
22
+ customer_id: null,
23
+ payments_account_id: null,
24
+ payments_account_name: null,
25
+ billing_setup_id: null,
26
+ reused_billing_setup: null,
27
+ account_budget_proposal_id: null,
28
+ validate_only: null,
29
+ next_steps: null
30
+ )
31
+ ```
32
+
@@ -0,0 +1,30 @@
1
+ # Zernio::SetUpAdAccountBillingRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **account_id** | **String** | Google ads SocialAccount id. | |
8
+ | **ad_account_id** | **String** | Google Ads customer id to bill, digits only. | |
9
+ | **payments_account_id** | **String** | Monthly invoicing payments account from GET /v1/ads/accounts/billing. | |
10
+ | **spending_limit** | **Float** | Account budget cap in the account currency. Omit for an unlimited budget. | [optional] |
11
+ | **budget_name** | **String** | | [optional][default to &#39;Zernio account budget&#39;] |
12
+ | **purchase_order_number** | **String** | Printed on the invoice. No effect on delivery. | [optional] |
13
+ | **validate_only** | **Boolean** | | [optional][default to false] |
14
+
15
+ ## Example
16
+
17
+ ```ruby
18
+ require 'zernio-sdk'
19
+
20
+ instance = Zernio::SetUpAdAccountBillingRequest.new(
21
+ account_id: null,
22
+ ad_account_id: null,
23
+ payments_account_id: null,
24
+ spending_limit: null,
25
+ budget_name: null,
26
+ purchase_order_number: null,
27
+ validate_only: null
28
+ )
29
+ ```
30
+
@@ -1245,6 +1245,73 @@ module Zernio
1245
1245
  return data, status_code, headers
1246
1246
  end
1247
1247
 
1248
+ # Get ad account billing
1249
+ # Reads the payments accounts a Google Ads account can be billed to, plus its billing setups and account budgets. Payments accounts come from Google's PaymentsAccountService, read as the manager above the customer: they are the monthly invoicing (consolidated billing) accounts of that manager. An empty `paymentsAccounts` means the manager has no monthly invoicing, so billing cannot be set up through the API and has to be added in Google Ads. Billing setups and account budgets are read live from Google with their status. Results are cached for 10 minutes and dropped on every setup through Zernio.
1250
+ # @param account_id [String] Google ads SocialAccount id.
1251
+ # @param [Hash] opts the optional parameters
1252
+ # @option opts [String] :ad_account_id Google Ads customer id, digits only. Defaults to the connection&#39;s selected customer.
1253
+ # @return [GetAdAccountBilling200Response]
1254
+ def get_ad_account_billing(account_id, opts = {})
1255
+ data, _status_code, _headers = get_ad_account_billing_with_http_info(account_id, opts)
1256
+ data
1257
+ end
1258
+
1259
+ # Get ad account billing
1260
+ # Reads the payments accounts a Google Ads account can be billed to, plus its billing setups and account budgets. Payments accounts come from Google&#39;s PaymentsAccountService, read as the manager above the customer: they are the monthly invoicing (consolidated billing) accounts of that manager. An empty &#x60;paymentsAccounts&#x60; means the manager has no monthly invoicing, so billing cannot be set up through the API and has to be added in Google Ads. Billing setups and account budgets are read live from Google with their status. Results are cached for 10 minutes and dropped on every setup through Zernio.
1261
+ # @param account_id [String] Google ads SocialAccount id.
1262
+ # @param [Hash] opts the optional parameters
1263
+ # @option opts [String] :ad_account_id Google Ads customer id, digits only. Defaults to the connection&#39;s selected customer.
1264
+ # @return [Array<(GetAdAccountBilling200Response, Integer, Hash)>] GetAdAccountBilling200Response data, response status code and response headers
1265
+ def get_ad_account_billing_with_http_info(account_id, opts = {})
1266
+ if @api_client.config.debugging
1267
+ @api_client.config.logger.debug 'Calling API: AdAccountsApi.get_ad_account_billing ...'
1268
+ end
1269
+ # verify the required parameter 'account_id' is set
1270
+ if @api_client.config.client_side_validation && account_id.nil?
1271
+ fail ArgumentError, "Missing the required parameter 'account_id' when calling AdAccountsApi.get_ad_account_billing"
1272
+ end
1273
+ # resource path
1274
+ local_var_path = '/v1/ads/accounts/billing'
1275
+
1276
+ # query parameters
1277
+ query_params = opts[:query_params] || {}
1278
+ query_params[:'accountId'] = account_id
1279
+ query_params[:'adAccountId'] = opts[:'ad_account_id'] if !opts[:'ad_account_id'].nil?
1280
+
1281
+ # header parameters
1282
+ header_params = opts[:header_params] || {}
1283
+ # HTTP header 'Accept' (if needed)
1284
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1285
+
1286
+ # form parameters
1287
+ form_params = opts[:form_params] || {}
1288
+
1289
+ # http body (model)
1290
+ post_body = opts[:debug_body]
1291
+
1292
+ # return_type
1293
+ return_type = opts[:debug_return_type] || 'GetAdAccountBilling200Response'
1294
+
1295
+ # auth_names
1296
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1297
+
1298
+ new_options = opts.merge(
1299
+ :operation => :"AdAccountsApi.get_ad_account_billing",
1300
+ :header_params => header_params,
1301
+ :query_params => query_params,
1302
+ :form_params => form_params,
1303
+ :body => post_body,
1304
+ :auth_names => auth_names,
1305
+ :return_type => return_type
1306
+ )
1307
+
1308
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1309
+ if @api_client.config.debugging
1310
+ @api_client.config.logger.debug "API called: AdAccountsApi#get_ad_account_billing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1311
+ end
1312
+ return data, status_code, headers
1313
+ end
1314
+
1248
1315
  # Ad account finances
1249
1316
  # Shows a Meta ad account's balance, total spend, spend cap and funding source. Finances of one Meta ad account: prepaid `balance`, lifetime `amountSpent`, account `spendCap` (null = no cap) and the `fundingSource`. Money values are converted from Meta's minor units to whole units of `currency`.
1250
1317
  # @param account_id [String] Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token.
@@ -4752,6 +4819,74 @@ module Zernio
4752
4819
  return data, status_code, headers
4753
4820
  end
4754
4821
 
4822
+ # Set up ad account billing (monthly invoicing)
4823
+ # Bills a Google Ads account to a monthly invoicing payments account of a manager above it, and proposes its account budget, so the account can serve without anyone opening Google Ads. Monthly invoicing only. Google's API cannot add a card or other payment method, so `paymentsAccountId` must be one of the manager's monthly invoicing (consolidated billing) payments accounts listed by GET /v1/ads/accounts/billing. A manager without monthly invoicing has none, and billing has to be added in Google Ads instead. Creates a billing setup (Google's BillingSetupService) that starts now on that payments account, then an account budget proposal that starts now and never ends: unlimited by default, or capped at `spendingLimit` in the account currency. Google reviews the budget offline, usually within an hour; until then the setup reads `APPROVED_HELD` and ads do not serve. A customer whose current billing setup already has a budget is refused with 409, and so is one billed to another payments account: this call never replaces existing billing. A current setup on the same payments account without a budget (for example after a budget rejection) is reused, so resending the same request finishes it. Not idempotent and never retried: after a 502 with details.creationStatus=unknown, read GET /v1/ads/accounts/billing before retrying. Google has no dry run for billing setups, so `validateOnly: true` checks the payments account and the existing billing without creating anything (and asks Google to validate the budget when a setup would be reused).
4824
+ # @param set_up_ad_account_billing_request [SetUpAdAccountBillingRequest]
4825
+ # @param [Hash] opts the optional parameters
4826
+ # @return [SetUpAdAccountBilling200Response]
4827
+ def set_up_ad_account_billing(set_up_ad_account_billing_request, opts = {})
4828
+ data, _status_code, _headers = set_up_ad_account_billing_with_http_info(set_up_ad_account_billing_request, opts)
4829
+ data
4830
+ end
4831
+
4832
+ # Set up ad account billing (monthly invoicing)
4833
+ # Bills a Google Ads account to a monthly invoicing payments account of a manager above it, and proposes its account budget, so the account can serve without anyone opening Google Ads. Monthly invoicing only. Google&#39;s API cannot add a card or other payment method, so &#x60;paymentsAccountId&#x60; must be one of the manager&#39;s monthly invoicing (consolidated billing) payments accounts listed by GET /v1/ads/accounts/billing. A manager without monthly invoicing has none, and billing has to be added in Google Ads instead. Creates a billing setup (Google&#39;s BillingSetupService) that starts now on that payments account, then an account budget proposal that starts now and never ends: unlimited by default, or capped at &#x60;spendingLimit&#x60; in the account currency. Google reviews the budget offline, usually within an hour; until then the setup reads &#x60;APPROVED_HELD&#x60; and ads do not serve. A customer whose current billing setup already has a budget is refused with 409, and so is one billed to another payments account: this call never replaces existing billing. A current setup on the same payments account without a budget (for example after a budget rejection) is reused, so resending the same request finishes it. Not idempotent and never retried: after a 502 with details.creationStatus&#x3D;unknown, read GET /v1/ads/accounts/billing before retrying. Google has no dry run for billing setups, so &#x60;validateOnly: true&#x60; checks the payments account and the existing billing without creating anything (and asks Google to validate the budget when a setup would be reused).
4834
+ # @param set_up_ad_account_billing_request [SetUpAdAccountBillingRequest]
4835
+ # @param [Hash] opts the optional parameters
4836
+ # @return [Array<(SetUpAdAccountBilling200Response, Integer, Hash)>] SetUpAdAccountBilling200Response data, response status code and response headers
4837
+ def set_up_ad_account_billing_with_http_info(set_up_ad_account_billing_request, opts = {})
4838
+ if @api_client.config.debugging
4839
+ @api_client.config.logger.debug 'Calling API: AdAccountsApi.set_up_ad_account_billing ...'
4840
+ end
4841
+ # verify the required parameter 'set_up_ad_account_billing_request' is set
4842
+ if @api_client.config.client_side_validation && set_up_ad_account_billing_request.nil?
4843
+ fail ArgumentError, "Missing the required parameter 'set_up_ad_account_billing_request' when calling AdAccountsApi.set_up_ad_account_billing"
4844
+ end
4845
+ # resource path
4846
+ local_var_path = '/v1/ads/accounts/billing'
4847
+
4848
+ # query parameters
4849
+ query_params = opts[:query_params] || {}
4850
+
4851
+ # header parameters
4852
+ header_params = opts[:header_params] || {}
4853
+ # HTTP header 'Accept' (if needed)
4854
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
4855
+ # HTTP header 'Content-Type'
4856
+ content_type = @api_client.select_header_content_type(['application/json'])
4857
+ if !content_type.nil?
4858
+ header_params['Content-Type'] = content_type
4859
+ end
4860
+
4861
+ # form parameters
4862
+ form_params = opts[:form_params] || {}
4863
+
4864
+ # http body (model)
4865
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(set_up_ad_account_billing_request)
4866
+
4867
+ # return_type
4868
+ return_type = opts[:debug_return_type] || 'SetUpAdAccountBilling200Response'
4869
+
4870
+ # auth_names
4871
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
4872
+
4873
+ new_options = opts.merge(
4874
+ :operation => :"AdAccountsApi.set_up_ad_account_billing",
4875
+ :header_params => header_params,
4876
+ :query_params => query_params,
4877
+ :form_params => form_params,
4878
+ :body => post_body,
4879
+ :auth_names => auth_names,
4880
+ :return_type => return_type
4881
+ )
4882
+
4883
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
4884
+ if @api_client.config.debugging
4885
+ @api_client.config.logger.debug "API called: AdAccountsApi#set_up_ad_account_billing\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4886
+ end
4887
+ return data, status_code, headers
4888
+ end
4889
+
4755
4890
  # Update account callouts
4756
4891
  # Edits existing Google Ads callouts in place; the change applies everywhere that callout is used. Send updates with assetResourceName and the fields to change. An asset is shared: changes affect every attachment using it. Omitted fields stay unchanged. The operation consumes the Google operations budget and invalidates affected cached lists.
4757
4892
  # @param update_account_callouts_request [UpdateAccountCalloutsRequest]