/
classes.rb
11535 lines (9533 loc) · 443 KB
/
classes.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
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
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
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
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
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
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
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
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
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
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
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
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright 2015 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
require 'date'
require 'google/apis/core/base_service'
require 'google/apis/core/json_representation'
require 'google/apis/core/hashable'
require 'google/apis/errors'
module Google
module Apis
module ContentV2
# Account data. After the creation of a new account it may take a few minutes
# before it is fully operational. The methods delete, insert, and update require
# the admin role.
class Account
include Google::Apis::Core::Hashable
# Indicates whether the merchant sells adult content.
# Corresponds to the JSON property `adultContent`
# @return [Boolean]
attr_accessor :adult_content
alias_method :adult_content?, :adult_content
# List of linked AdWords accounts that are active or pending approval. To create
# a new link request, add a new link with status `active` to the list. It will
# remain in a `pending` state until approved or rejected either in the AdWords
# interface or through the AdWords API. To delete an active link, or to cancel a
# link request, remove it from the list.
# Corresponds to the JSON property `adwordsLinks`
# @return [Array<Google::Apis::ContentV2::AccountAdwordsLink>]
attr_accessor :adwords_links
# The business information of the account.
# Corresponds to the JSON property `businessInformation`
# @return [Google::Apis::ContentV2::AccountBusinessInformation]
attr_accessor :business_information
# The GMB account which is linked or in the process of being linked with the
# Merchant Center account.
# Corresponds to the JSON property `googleMyBusinessLink`
# @return [Google::Apis::ContentV2::AccountGoogleMyBusinessLink]
attr_accessor :google_my_business_link
# Required for update. Merchant Center account ID.
# Corresponds to the JSON property `id`
# @return [Fixnum]
attr_accessor :id
# Identifies what kind of resource this is. Value: the fixed string "`content#
# account`"
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Required. Display name for the account.
# Corresponds to the JSON property `name`
# @return [String]
attr_accessor :name
# [DEPRECATED] This field is never returned and will be ignored if provided.
# Corresponds to the JSON property `reviewsUrl`
# @return [String]
attr_accessor :reviews_url
# Client-specific, locally-unique, internal ID for the child account.
# Corresponds to the JSON property `sellerId`
# @return [String]
attr_accessor :seller_id
# Users with access to the account. Every account (except for subaccounts) must
# have at least one admin user.
# Corresponds to the JSON property `users`
# @return [Array<Google::Apis::ContentV2::AccountUser>]
attr_accessor :users
# The merchant's website.
# Corresponds to the JSON property `websiteUrl`
# @return [String]
attr_accessor :website_url
# List of linked YouTube channels that are active or pending approval. To create
# a new link request, add a new link with status `active` to the list. It will
# remain in a `pending` state until approved or rejected in the YT Creator
# Studio interface. To delete an active link, or to cancel a link request,
# remove it from the list.
# Corresponds to the JSON property `youtubeChannelLinks`
# @return [Array<Google::Apis::ContentV2::AccountYouTubeChannelLink>]
attr_accessor :youtube_channel_links
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@adult_content = args[:adult_content] if args.key?(:adult_content)
@adwords_links = args[:adwords_links] if args.key?(:adwords_links)
@business_information = args[:business_information] if args.key?(:business_information)
@google_my_business_link = args[:google_my_business_link] if args.key?(:google_my_business_link)
@id = args[:id] if args.key?(:id)
@kind = args[:kind] if args.key?(:kind)
@name = args[:name] if args.key?(:name)
@reviews_url = args[:reviews_url] if args.key?(:reviews_url)
@seller_id = args[:seller_id] if args.key?(:seller_id)
@users = args[:users] if args.key?(:users)
@website_url = args[:website_url] if args.key?(:website_url)
@youtube_channel_links = args[:youtube_channel_links] if args.key?(:youtube_channel_links)
end
end
#
class AccountAddress
include Google::Apis::Core::Hashable
# CLDR country code (e.g. "US"). This value cannot be set for a sub-account of
# an MCA. All MCA sub-accounts inherit the country of their parent MCA.
# Corresponds to the JSON property `country`
# @return [String]
attr_accessor :country
# City, town or commune. May also include dependent localities or sublocalities (
# e.g. neighborhoods or suburbs).
# Corresponds to the JSON property `locality`
# @return [String]
attr_accessor :locality
# Postal code or ZIP (e.g. "94043").
# Corresponds to the JSON property `postalCode`
# @return [String]
attr_accessor :postal_code
# Top-level administrative subdivision of the country. For example, a state like
# California ("CA") or a province like Quebec ("QC").
# Corresponds to the JSON property `region`
# @return [String]
attr_accessor :region
# Street-level part of the address.
# Corresponds to the JSON property `streetAddress`
# @return [String]
attr_accessor :street_address
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@country = args[:country] if args.key?(:country)
@locality = args[:locality] if args.key?(:locality)
@postal_code = args[:postal_code] if args.key?(:postal_code)
@region = args[:region] if args.key?(:region)
@street_address = args[:street_address] if args.key?(:street_address)
end
end
#
class AccountAdwordsLink
include Google::Apis::Core::Hashable
# Customer ID of the AdWords account.
# Corresponds to the JSON property `adwordsId`
# @return [Fixnum]
attr_accessor :adwords_id
# Status of the link between this Merchant Center account and the AdWords
# account. Upon retrieval, it represents the actual status of the link and can
# be either `active` if it was approved in Google AdWords or `pending` if it's
# pending approval. Upon insertion, it represents the *intended* status of the
# link. Re-uploading a link with status `active` when it's still pending or with
# status `pending` when it's already active will have no effect: the status will
# remain unchanged. Re-uploading a link with deprecated status `inactive` is
# equivalent to not submitting the link at all and will delete the link if it
# was active or cancel the link request if it was pending. Acceptable values are:
# - "`active`" - "`pending`"
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@adwords_id = args[:adwords_id] if args.key?(:adwords_id)
@status = args[:status] if args.key?(:status)
end
end
#
class AccountBusinessInformation
include Google::Apis::Core::Hashable
# The address of the business.
# Corresponds to the JSON property `address`
# @return [Google::Apis::ContentV2::AccountAddress]
attr_accessor :address
# The customer service information of the business.
# Corresponds to the JSON property `customerService`
# @return [Google::Apis::ContentV2::AccountCustomerService]
attr_accessor :customer_service
# The phone number of the business.
# Corresponds to the JSON property `phoneNumber`
# @return [String]
attr_accessor :phone_number
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@address = args[:address] if args.key?(:address)
@customer_service = args[:customer_service] if args.key?(:customer_service)
@phone_number = args[:phone_number] if args.key?(:phone_number)
end
end
#
class AccountCustomerService
include Google::Apis::Core::Hashable
# Customer service email.
# Corresponds to the JSON property `email`
# @return [String]
attr_accessor :email
# Customer service phone number.
# Corresponds to the JSON property `phoneNumber`
# @return [String]
attr_accessor :phone_number
# Customer service URL.
# Corresponds to the JSON property `url`
# @return [String]
attr_accessor :url
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@email = args[:email] if args.key?(:email)
@phone_number = args[:phone_number] if args.key?(:phone_number)
@url = args[:url] if args.key?(:url)
end
end
#
class AccountGoogleMyBusinessLink
include Google::Apis::Core::Hashable
# The GMB email address of which a specific account within a GMB account. A
# sample account within a GMB account could be a business account with set of
# locations, managed under the GMB account.
# Corresponds to the JSON property `gmbEmail`
# @return [String]
attr_accessor :gmb_email
# Status of the link between this Merchant Center account and the GMB account.
# Acceptable values are: - "`active`" - "`pending`"
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@gmb_email = args[:gmb_email] if args.key?(:gmb_email)
@status = args[:status] if args.key?(:status)
end
end
#
class AccountIdentifier
include Google::Apis::Core::Hashable
# The aggregator ID, set for aggregators and subaccounts (in that case, it
# represents the aggregator of the subaccount).
# Corresponds to the JSON property `aggregatorId`
# @return [Fixnum]
attr_accessor :aggregator_id
# The merchant account ID, set for individual accounts and subaccounts.
# Corresponds to the JSON property `merchantId`
# @return [Fixnum]
attr_accessor :merchant_id
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@aggregator_id = args[:aggregator_id] if args.key?(:aggregator_id)
@merchant_id = args[:merchant_id] if args.key?(:merchant_id)
end
end
# The status of an account, i.e., information about its products, which is
# computed offline and not returned immediately at insertion time.
class AccountStatus
include Google::Apis::Core::Hashable
# The ID of the account for which the status is reported.
# Corresponds to the JSON property `accountId`
# @return [String]
attr_accessor :account_id
# A list of account level issues.
# Corresponds to the JSON property `accountLevelIssues`
# @return [Array<Google::Apis::ContentV2::AccountStatusAccountLevelIssue>]
attr_accessor :account_level_issues
# DEPRECATED - never populated.
# Corresponds to the JSON property `dataQualityIssues`
# @return [Array<Google::Apis::ContentV2::AccountStatusDataQualityIssue>]
attr_accessor :data_quality_issues
# Identifies what kind of resource this is. Value: the fixed string "`content#
# accountStatus`"
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# List of product-related data by channel, destination, and country. Data in
# this field may be delayed by up to 30 minutes.
# Corresponds to the JSON property `products`
# @return [Array<Google::Apis::ContentV2::AccountStatusProducts>]
attr_accessor :products
# Whether the account's website is claimed or not.
# Corresponds to the JSON property `websiteClaimed`
# @return [Boolean]
attr_accessor :website_claimed
alias_method :website_claimed?, :website_claimed
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@account_id = args[:account_id] if args.key?(:account_id)
@account_level_issues = args[:account_level_issues] if args.key?(:account_level_issues)
@data_quality_issues = args[:data_quality_issues] if args.key?(:data_quality_issues)
@kind = args[:kind] if args.key?(:kind)
@products = args[:products] if args.key?(:products)
@website_claimed = args[:website_claimed] if args.key?(:website_claimed)
end
end
#
class AccountStatusAccountLevelIssue
include Google::Apis::Core::Hashable
# Country for which this issue is reported.
# Corresponds to the JSON property `country`
# @return [String]
attr_accessor :country
# The destination the issue applies to. If this field is empty then the issue
# applies to all available destinations.
# Corresponds to the JSON property `destination`
# @return [String]
attr_accessor :destination
# Additional details about the issue.
# Corresponds to the JSON property `detail`
# @return [String]
attr_accessor :detail
# The URL of a web page to help resolving this issue.
# Corresponds to the JSON property `documentation`
# @return [String]
attr_accessor :documentation
# Issue identifier.
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
# Severity of the issue. Acceptable values are: - "`critical`" - "`error`" - "`
# suggestion`"
# Corresponds to the JSON property `severity`
# @return [String]
attr_accessor :severity
# Short description of the issue.
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@country = args[:country] if args.key?(:country)
@destination = args[:destination] if args.key?(:destination)
@detail = args[:detail] if args.key?(:detail)
@documentation = args[:documentation] if args.key?(:documentation)
@id = args[:id] if args.key?(:id)
@severity = args[:severity] if args.key?(:severity)
@title = args[:title] if args.key?(:title)
end
end
#
class AccountStatusDataQualityIssue
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `country`
# @return [String]
attr_accessor :country
#
# Corresponds to the JSON property `destination`
# @return [String]
attr_accessor :destination
#
# Corresponds to the JSON property `detail`
# @return [String]
attr_accessor :detail
#
# Corresponds to the JSON property `displayedValue`
# @return [String]
attr_accessor :displayed_value
#
# Corresponds to the JSON property `exampleItems`
# @return [Array<Google::Apis::ContentV2::AccountStatusExampleItem>]
attr_accessor :example_items
#
# Corresponds to the JSON property `id`
# @return [String]
attr_accessor :id
#
# Corresponds to the JSON property `lastChecked`
# @return [String]
attr_accessor :last_checked
#
# Corresponds to the JSON property `location`
# @return [String]
attr_accessor :location
#
# Corresponds to the JSON property `numItems`
# @return [Fixnum]
attr_accessor :num_items
# Acceptable values are: - "`critical`" - "`error`" - "`suggestion`"
# Corresponds to the JSON property `severity`
# @return [String]
attr_accessor :severity
#
# Corresponds to the JSON property `submittedValue`
# @return [String]
attr_accessor :submitted_value
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@country = args[:country] if args.key?(:country)
@destination = args[:destination] if args.key?(:destination)
@detail = args[:detail] if args.key?(:detail)
@displayed_value = args[:displayed_value] if args.key?(:displayed_value)
@example_items = args[:example_items] if args.key?(:example_items)
@id = args[:id] if args.key?(:id)
@last_checked = args[:last_checked] if args.key?(:last_checked)
@location = args[:location] if args.key?(:location)
@num_items = args[:num_items] if args.key?(:num_items)
@severity = args[:severity] if args.key?(:severity)
@submitted_value = args[:submitted_value] if args.key?(:submitted_value)
end
end
#
class AccountStatusExampleItem
include Google::Apis::Core::Hashable
#
# Corresponds to the JSON property `itemId`
# @return [String]
attr_accessor :item_id
#
# Corresponds to the JSON property `link`
# @return [String]
attr_accessor :link
#
# Corresponds to the JSON property `submittedValue`
# @return [String]
attr_accessor :submitted_value
#
# Corresponds to the JSON property `title`
# @return [String]
attr_accessor :title
#
# Corresponds to the JSON property `valueOnLandingPage`
# @return [String]
attr_accessor :value_on_landing_page
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@item_id = args[:item_id] if args.key?(:item_id)
@link = args[:link] if args.key?(:link)
@submitted_value = args[:submitted_value] if args.key?(:submitted_value)
@title = args[:title] if args.key?(:title)
@value_on_landing_page = args[:value_on_landing_page] if args.key?(:value_on_landing_page)
end
end
#
class AccountStatusItemLevelIssue
include Google::Apis::Core::Hashable
# The attribute's name, if the issue is caused by a single attribute.
# Corresponds to the JSON property `attributeName`
# @return [String]
attr_accessor :attribute_name
# The error code of the issue.
# Corresponds to the JSON property `code`
# @return [String]
attr_accessor :code
# A short issue description in English.
# Corresponds to the JSON property `description`
# @return [String]
attr_accessor :description
# A detailed issue description in English.
# Corresponds to the JSON property `detail`
# @return [String]
attr_accessor :detail
# The URL of a web page to help with resolving this issue.
# Corresponds to the JSON property `documentation`
# @return [String]
attr_accessor :documentation
# Number of items with this issue.
# Corresponds to the JSON property `numItems`
# @return [Fixnum]
attr_accessor :num_items
# Whether the issue can be resolved by the merchant.
# Corresponds to the JSON property `resolution`
# @return [String]
attr_accessor :resolution
# How this issue affects serving of the offer.
# Corresponds to the JSON property `servability`
# @return [String]
attr_accessor :servability
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@attribute_name = args[:attribute_name] if args.key?(:attribute_name)
@code = args[:code] if args.key?(:code)
@description = args[:description] if args.key?(:description)
@detail = args[:detail] if args.key?(:detail)
@documentation = args[:documentation] if args.key?(:documentation)
@num_items = args[:num_items] if args.key?(:num_items)
@resolution = args[:resolution] if args.key?(:resolution)
@servability = args[:servability] if args.key?(:servability)
end
end
#
class AccountStatusProducts
include Google::Apis::Core::Hashable
# The channel the data applies to. Acceptable values are: - "`local`" - "`online`
# "
# Corresponds to the JSON property `channel`
# @return [String]
attr_accessor :channel
# The country the data applies to.
# Corresponds to the JSON property `country`
# @return [String]
attr_accessor :country
# The destination the data applies to.
# Corresponds to the JSON property `destination`
# @return [String]
attr_accessor :destination
# List of item-level issues.
# Corresponds to the JSON property `itemLevelIssues`
# @return [Array<Google::Apis::ContentV2::AccountStatusItemLevelIssue>]
attr_accessor :item_level_issues
# Aggregated product statistics.
# Corresponds to the JSON property `statistics`
# @return [Google::Apis::ContentV2::AccountStatusStatistics]
attr_accessor :statistics
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@channel = args[:channel] if args.key?(:channel)
@country = args[:country] if args.key?(:country)
@destination = args[:destination] if args.key?(:destination)
@item_level_issues = args[:item_level_issues] if args.key?(:item_level_issues)
@statistics = args[:statistics] if args.key?(:statistics)
end
end
#
class AccountStatusStatistics
include Google::Apis::Core::Hashable
# Number of active offers.
# Corresponds to the JSON property `active`
# @return [Fixnum]
attr_accessor :active
# Number of disapproved offers.
# Corresponds to the JSON property `disapproved`
# @return [Fixnum]
attr_accessor :disapproved
# Number of expiring offers.
# Corresponds to the JSON property `expiring`
# @return [Fixnum]
attr_accessor :expiring
# Number of pending offers.
# Corresponds to the JSON property `pending`
# @return [Fixnum]
attr_accessor :pending
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@active = args[:active] if args.key?(:active)
@disapproved = args[:disapproved] if args.key?(:disapproved)
@expiring = args[:expiring] if args.key?(:expiring)
@pending = args[:pending] if args.key?(:pending)
end
end
# The tax settings of a merchant account. All methods require the admin role.
class AccountTax
include Google::Apis::Core::Hashable
# Required. The ID of the account to which these account tax settings belong.
# Corresponds to the JSON property `accountId`
# @return [Fixnum]
attr_accessor :account_id
# Identifies what kind of resource this is. Value: the fixed string "content#
# accountTax".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
# Tax rules. Updating the tax rules will enable US taxes (not reversible).
# Defining no rules is equivalent to not charging tax at all.
# Corresponds to the JSON property `rules`
# @return [Array<Google::Apis::ContentV2::AccountTaxTaxRule>]
attr_accessor :rules
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@account_id = args[:account_id] if args.key?(:account_id)
@kind = args[:kind] if args.key?(:kind)
@rules = args[:rules] if args.key?(:rules)
end
end
# Tax calculation rule to apply in a state or province (USA only).
class AccountTaxTaxRule
include Google::Apis::Core::Hashable
# Country code in which tax is applicable.
# Corresponds to the JSON property `country`
# @return [String]
attr_accessor :country
# Required. State (or province) is which the tax is applicable, described by its
# location ID (also called criteria ID).
# Corresponds to the JSON property `locationId`
# @return [Fixnum]
attr_accessor :location_id
# Explicit tax rate in percent, represented as a floating point number without
# the percentage character. Must not be negative.
# Corresponds to the JSON property `ratePercent`
# @return [String]
attr_accessor :rate_percent
# If true, shipping charges are also taxed.
# Corresponds to the JSON property `shippingTaxed`
# @return [Boolean]
attr_accessor :shipping_taxed
alias_method :shipping_taxed?, :shipping_taxed
# Whether the tax rate is taken from a global tax table or specified explicitly.
# Corresponds to the JSON property `useGlobalRate`
# @return [Boolean]
attr_accessor :use_global_rate
alias_method :use_global_rate?, :use_global_rate
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@country = args[:country] if args.key?(:country)
@location_id = args[:location_id] if args.key?(:location_id)
@rate_percent = args[:rate_percent] if args.key?(:rate_percent)
@shipping_taxed = args[:shipping_taxed] if args.key?(:shipping_taxed)
@use_global_rate = args[:use_global_rate] if args.key?(:use_global_rate)
end
end
#
class AccountUser
include Google::Apis::Core::Hashable
# Whether user is an admin.
# Corresponds to the JSON property `admin`
# @return [Boolean]
attr_accessor :admin
alias_method :admin?, :admin
# User's email address.
# Corresponds to the JSON property `emailAddress`
# @return [String]
attr_accessor :email_address
# Whether user is an order manager.
# Corresponds to the JSON property `orderManager`
# @return [Boolean]
attr_accessor :order_manager
alias_method :order_manager?, :order_manager
# Whether user can access payment statements.
# Corresponds to the JSON property `paymentsAnalyst`
# @return [Boolean]
attr_accessor :payments_analyst
alias_method :payments_analyst?, :payments_analyst
# Whether user can manage payment settings.
# Corresponds to the JSON property `paymentsManager`
# @return [Boolean]
attr_accessor :payments_manager
alias_method :payments_manager?, :payments_manager
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@admin = args[:admin] if args.key?(:admin)
@email_address = args[:email_address] if args.key?(:email_address)
@order_manager = args[:order_manager] if args.key?(:order_manager)
@payments_analyst = args[:payments_analyst] if args.key?(:payments_analyst)
@payments_manager = args[:payments_manager] if args.key?(:payments_manager)
end
end
#
class AccountYouTubeChannelLink
include Google::Apis::Core::Hashable
# Channel ID.
# Corresponds to the JSON property `channelId`
# @return [String]
attr_accessor :channel_id
# Status of the link between this Merchant Center account and the YouTube
# channel. Upon retrieval, it represents the actual status of the link and can
# be either `active` if it was approved in YT Creator Studio or `pending` if it'
# s pending approval. Upon insertion, it represents the *intended* status of the
# link. Re-uploading a link with status `active` when it's still pending or with
# status `pending` when it's already active will have no effect: the status will
# remain unchanged. Re-uploading a link with deprecated status `inactive` is
# equivalent to not submitting the link at all and will delete the link if it
# was active or cancel the link request if it was pending.
# Corresponds to the JSON property `status`
# @return [String]
attr_accessor :status
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@channel_id = args[:channel_id] if args.key?(:channel_id)
@status = args[:status] if args.key?(:status)
end
end
#
class AccountsAuthInfoResponse
include Google::Apis::Core::Hashable
# The account identifiers corresponding to the authenticated user. - For an
# individual account: only the merchant ID is defined - For an aggregator: only
# the aggregator ID is defined - For a subaccount of an MCA: both the merchant
# ID and the aggregator ID are defined.
# Corresponds to the JSON property `accountIdentifiers`
# @return [Array<Google::Apis::ContentV2::AccountIdentifier>]
attr_accessor :account_identifiers
# Identifies what kind of resource this is. Value: the fixed string "content#
# accountsAuthInfoResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@account_identifiers = args[:account_identifiers] if args.key?(:account_identifiers)
@kind = args[:kind] if args.key?(:kind)
end
end
#
class AccountsClaimWebsiteResponse
include Google::Apis::Core::Hashable
# Identifies what kind of resource this is. Value: the fixed string "content#
# accountsClaimWebsiteResponse".
# Corresponds to the JSON property `kind`
# @return [String]
attr_accessor :kind
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@kind = args[:kind] if args.key?(:kind)
end
end
#
class BatchAccountsRequest
include Google::Apis::Core::Hashable
# The request entries to be processed in the batch.
# Corresponds to the JSON property `entries`
# @return [Array<Google::Apis::ContentV2::AccountsBatchRequestEntry>]
attr_accessor :entries
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@entries = args[:entries] if args.key?(:entries)
end
end
# A batch entry encoding a single non-batch accounts request.
class AccountsBatchRequestEntry
include Google::Apis::Core::Hashable
# Account data. After the creation of a new account it may take a few minutes
# before it is fully operational. The methods delete, insert, and update require
# the admin role.
# Corresponds to the JSON property `account`
# @return [Google::Apis::ContentV2::Account]
attr_accessor :account
# The ID of the targeted account. Only defined if the method is not `insert`.
# Corresponds to the JSON property `accountId`
# @return [Fixnum]
attr_accessor :account_id
# An entry ID, unique within the batch request.
# Corresponds to the JSON property `batchId`
# @return [Fixnum]
attr_accessor :batch_id
# Whether the account should be deleted if the account has offers. Only
# applicable if the method is `delete`.
# Corresponds to the JSON property `force`
# @return [Boolean]
attr_accessor :force
alias_method :force?, :force
# Label IDs for the 'updatelabels' request.
# Corresponds to the JSON property `labelIds`
# @return [Array<Fixnum>]
attr_accessor :label_ids
# Details about the `link` request.
# Corresponds to the JSON property `linkRequest`
# @return [Google::Apis::ContentV2::AccountsCustomBatchRequestEntryLinkRequest]
attr_accessor :link_request
# The ID of the managing account.
# Corresponds to the JSON property `merchantId`
# @return [Fixnum]
attr_accessor :merchant_id
# The method of the batch entry. Acceptable values are: - "`claimWebsite`" - "`
# delete`" - "`get`" - "`insert`" - "`link`" - "`update`"
# Corresponds to the JSON property `method`
# @return [String]
attr_accessor :request_method
# Only applicable if the method is `claimwebsite`. Indicates whether or not to
# take the claim from another account in case there is a conflict.
# Corresponds to the JSON property `overwrite`
# @return [Boolean]
attr_accessor :overwrite
alias_method :overwrite?, :overwrite
def initialize(**args)
update!(**args)
end
# Update properties of this object
def update!(**args)
@account = args[:account] if args.key?(:account)
@account_id = args[:account_id] if args.key?(:account_id)
@batch_id = args[:batch_id] if args.key?(:batch_id)
@force = args[:force] if args.key?(:force)
@label_ids = args[:label_ids] if args.key?(:label_ids)
@link_request = args[:link_request] if args.key?(:link_request)
@merchant_id = args[:merchant_id] if args.key?(:merchant_id)
@request_method = args[:request_method] if args.key?(:request_method)
@overwrite = args[:overwrite] if args.key?(:overwrite)
end
end
#
class AccountsCustomBatchRequestEntryLinkRequest
include Google::Apis::Core::Hashable
# Action to perform for this link. The `"request"` action is only available to