google-api-client 0.8.7 → 0.9.pre1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +20 -0
- data/.rspec +2 -0
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +63 -0
- data/.travis.yml +21 -0
- data/.yardopts +12 -0
- data/CHANGELOG.md +6 -3
- data/CONTRIBUTING.md +31 -0
- data/Gemfile +28 -2
- data/MIGRATING.md +171 -0
- data/README.md +158 -150
- data/Rakefile +1 -40
- data/api_names.yaml +872 -0
- data/api_names_out.yaml +20843 -0
- data/bin/generate-api +93 -0
- data/generated/google/apis/adexchangebuyer_v1_3.rb +35 -0
- data/generated/google/apis/adexchangebuyer_v1_3/classes.rb +1124 -0
- data/generated/google/apis/adexchangebuyer_v1_3/representations.rb +375 -0
- data/generated/google/apis/adexchangebuyer_v1_3/service.rb +893 -0
- data/generated/google/apis/adexchangeseller_v2_0.rb +38 -0
- data/generated/google/apis/adexchangeseller_v2_0/classes.rb +792 -0
- data/generated/google/apis/adexchangeseller_v2_0/representations.rb +309 -0
- data/generated/google/apis/adexchangeseller_v2_0/service.rb +682 -0
- data/generated/google/apis/admin_directory_v1.rb +89 -0
- data/generated/google/apis/admin_directory_v1/classes.rb +2389 -0
- data/generated/google/apis/admin_directory_v1/representations.rb +780 -0
- data/generated/google/apis/admin_directory_v1/service.rb +2805 -0
- data/generated/google/apis/admin_reports_v1.rb +38 -0
- data/generated/google/apis/admin_reports_v1/classes.rb +582 -0
- data/generated/google/apis/admin_reports_v1/representations.rb +231 -0
- data/generated/google/apis/admin_reports_v1/service.rb +341 -0
- data/generated/google/apis/adsense_v1_4.rb +38 -0
- data/generated/google/apis/adsense_v1_4/classes.rb +1279 -0
- data/generated/google/apis/adsense_v1_4/representations.rb +493 -0
- data/generated/google/apis/adsense_v1_4/service.rb +1752 -0
- data/generated/google/apis/adsensehost_v4_1.rb +35 -0
- data/generated/google/apis/adsensehost_v4_1/classes.rb +834 -0
- data/generated/google/apis/adsensehost_v4_1/representations.rb +327 -0
- data/generated/google/apis/adsensehost_v4_1/service.rb +1190 -0
- data/generated/google/apis/analytics_v3.rb +49 -0
- data/generated/google/apis/analytics_v3/classes.rb +5113 -0
- data/generated/google/apis/analytics_v3/representations.rb +1661 -0
- data/generated/google/apis/analytics_v3/service.rb +3600 -0
- data/generated/google/apis/androidenterprise_v1.rb +34 -0
- data/generated/google/apis/androidenterprise_v1/classes.rb +1162 -0
- data/generated/google/apis/androidenterprise_v1/representations.rb +431 -0
- data/generated/google/apis/androidenterprise_v1/service.rb +1979 -0
- data/generated/google/apis/androidpublisher_v2.rb +34 -0
- data/generated/google/apis/androidpublisher_v2/classes.rb +1374 -0
- data/generated/google/apis/androidpublisher_v2/representations.rb +630 -0
- data/generated/google/apis/androidpublisher_v2/service.rb +2390 -0
- data/generated/google/apis/appsactivity_v1.rb +46 -0
- data/generated/google/apis/appsactivity_v1/classes.rb +392 -0
- data/generated/google/apis/appsactivity_v1/representations.rb +184 -0
- data/generated/google/apis/appsactivity_v1/service.rb +129 -0
- data/generated/google/apis/appstate_v1.rb +34 -0
- data/generated/google/apis/appstate_v1/classes.rb +154 -0
- data/generated/google/apis/appstate_v1/representations.rb +79 -0
- data/generated/google/apis/appstate_v1/service.rb +265 -0
- data/generated/google/apis/autoscaler_v1beta2.rb +38 -0
- data/generated/google/apis/autoscaler_v1beta2/classes.rb +747 -0
- data/generated/google/apis/autoscaler_v1beta2/representations.rb +281 -0
- data/generated/google/apis/autoscaler_v1beta2/service.rb +488 -0
- data/generated/google/apis/bigquery_v2.rb +49 -0
- data/generated/google/apis/bigquery_v2/classes.rb +2255 -0
- data/generated/google/apis/bigquery_v2/representations.rb +754 -0
- data/generated/google/apis/bigquery_v2/service.rb +1003 -0
- data/generated/google/apis/blogger_v3.rb +37 -0
- data/generated/google/apis/blogger_v3/classes.rb +1354 -0
- data/generated/google/apis/blogger_v3/representations.rb +562 -0
- data/generated/google/apis/blogger_v3/service.rb +1620 -0
- data/generated/google/apis/books_v1.rb +34 -0
- data/generated/google/apis/books_v1/classes.rb +3515 -0
- data/generated/google/apis/books_v1/representations.rb +1361 -0
- data/generated/google/apis/books_v1/service.rb +2170 -0
- data/generated/google/apis/calendar_v3.rb +37 -0
- data/generated/google/apis/calendar_v3/classes.rb +1702 -0
- data/generated/google/apis/calendar_v3/representations.rb +566 -0
- data/generated/google/apis/calendar_v3/service.rb +1943 -0
- data/generated/google/apis/civicinfo_v2.rb +31 -0
- data/generated/google/apis/civicinfo_v2/classes.rb +1057 -0
- data/generated/google/apis/civicinfo_v2/representations.rb +374 -0
- data/generated/google/apis/civicinfo_v2/service.rb +284 -0
- data/generated/google/apis/cloudmonitoring_v2beta2.rb +34 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/classes.rb +679 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/representations.rb +311 -0
- data/generated/google/apis/cloudmonitoring_v2beta2/service.rb +458 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1.rb +38 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/classes.rb +139 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/representations.rb +65 -0
- data/generated/google/apis/cloudresourcemanager_v1beta1/service.rb +301 -0
- data/generated/google/apis/compute_v1.rb +49 -0
- data/generated/google/apis/compute_v1/classes.rb +6391 -0
- data/generated/google/apis/compute_v1/representations.rb +2209 -0
- data/generated/google/apis/compute_v1/service.rb +6352 -0
- data/generated/google/apis/container_v1beta1.rb +35 -0
- data/generated/google/apis/container_v1beta1/classes.rb +466 -0
- data/generated/google/apis/container_v1beta1/representations.rb +177 -0
- data/generated/google/apis/container_v1beta1/service.rb +394 -0
- data/generated/google/apis/content_v2.rb +35 -0
- data/generated/google/apis/content_v2/classes.rb +3780 -0
- data/generated/google/apis/content_v2/representations.rb +1456 -0
- data/generated/google/apis/content_v2/service.rb +1706 -0
- data/generated/google/apis/coordinate_v1.rb +37 -0
- data/generated/google/apis/coordinate_v1/classes.rb +669 -0
- data/generated/google/apis/coordinate_v1/representations.rb +285 -0
- data/generated/google/apis/coordinate_v1/service.rb +687 -0
- data/{lib/google/api_client/auth/compute_service_account.rb → generated/google/apis/customsearch_v1.rb} +13 -10
- data/generated/google/apis/customsearch_v1/classes.rb +771 -0
- data/generated/google/apis/customsearch_v1/representations.rb +276 -0
- data/generated/google/apis/customsearch_v1/service.rb +208 -0
- data/generated/google/apis/datastore_v1beta2.rb +40 -0
- data/generated/google/apis/datastore_v1beta2/classes.rb +1186 -0
- data/generated/google/apis/datastore_v1beta2/representations.rb +526 -0
- data/generated/google/apis/datastore_v1beta2/service.rb +300 -0
- data/generated/google/apis/deploymentmanager_v2beta2.rb +41 -0
- data/generated/google/apis/deploymentmanager_v2beta2/classes.rb +820 -0
- data/generated/google/apis/deploymentmanager_v2beta2/representations.rb +303 -0
- data/generated/google/apis/deploymentmanager_v2beta2/service.rb +647 -0
- data/generated/google/apis/dfareporting_v2_1.rb +37 -0
- data/generated/google/apis/dfareporting_v2_1/classes.rb +10755 -0
- data/generated/google/apis/dfareporting_v2_1/representations.rb +3438 -0
- data/generated/google/apis/dfareporting_v2_1/service.rb +8775 -0
- data/generated/google/apis/discovery_v1.rb +32 -0
- data/generated/google/apis/discovery_v1/classes.rb +947 -0
- data/generated/google/apis/discovery_v1/representations.rb +355 -0
- data/generated/google/apis/discovery_v1/service.rb +144 -0
- data/generated/google/apis/dns_v1.rb +41 -0
- data/generated/google/apis/dns_v1/classes.rb +406 -0
- data/generated/google/apis/dns_v1/representations.rb +151 -0
- data/generated/google/apis/dns_v1/service.rb +460 -0
- data/{spec/google/api_client/request_spec.rb → generated/google/apis/doubleclickbidmanager_v1.rb} +15 -13
- data/generated/google/apis/doubleclickbidmanager_v1/classes.rb +709 -0
- data/generated/google/apis/doubleclickbidmanager_v1/representations.rb +297 -0
- data/generated/google/apis/doubleclickbidmanager_v1/service.rb +349 -0
- data/generated/google/apis/doubleclicksearch_v2.rb +35 -0
- data/generated/google/apis/doubleclicksearch_v2/classes.rb +947 -0
- data/generated/google/apis/doubleclicksearch_v2/representations.rb +315 -0
- data/generated/google/apis/doubleclicksearch_v2/service.rb +490 -0
- data/generated/google/apis/drive_v2.rb +55 -0
- data/generated/google/apis/drive_v2/classes.rb +2519 -0
- data/generated/google/apis/drive_v2/representations.rb +781 -0
- data/generated/google/apis/drive_v2/service.rb +2685 -0
- data/generated/google/apis/fitness_v1.rb +49 -0
- data/generated/google/apis/fitness_v1/classes.rb +809 -0
- data/generated/google/apis/fitness_v1/representations.rb +295 -0
- data/generated/google/apis/fitness_v1/service.rb +684 -0
- data/generated/google/apis/fusiontables_v2.rb +37 -0
- data/generated/google/apis/fusiontables_v2/classes.rb +1048 -0
- data/generated/google/apis/fusiontables_v2/representations.rb +409 -0
- data/generated/google/apis/fusiontables_v2/service.rb +1496 -0
- data/generated/google/apis/games_configuration_v1configuration.rb +34 -0
- data/generated/google/apis/games_configuration_v1configuration/classes.rb +506 -0
- data/generated/google/apis/games_configuration_v1configuration/representations.rb +206 -0
- data/generated/google/apis/games_configuration_v1configuration/service.rb +578 -0
- data/generated/google/apis/games_v1.rb +40 -0
- data/generated/google/apis/games_v1/classes.rb +4578 -0
- data/generated/google/apis/games_v1/representations.rb +1570 -0
- data/generated/google/apis/games_v1/service.rb +2306 -0
- data/generated/google/apis/gan_v1beta1.rb +31 -0
- data/generated/google/apis/gan_v1beta1/classes.rb +1428 -0
- data/generated/google/apis/gan_v1beta1/representations.rb +428 -0
- data/generated/google/apis/gan_v1beta1/service.rb +692 -0
- data/generated/google/apis/genomics_v1beta2.rb +46 -0
- data/generated/google/apis/genomics_v1beta2/classes.rb +3288 -0
- data/generated/google/apis/genomics_v1beta2/representations.rb +1194 -0
- data/generated/google/apis/genomics_v1beta2/service.rb +2356 -0
- data/generated/google/apis/gmail_v1.rb +49 -0
- data/generated/google/apis/gmail_v1/classes.rb +794 -0
- data/generated/google/apis/gmail_v1/representations.rb +339 -0
- data/generated/google/apis/gmail_v1/service.rb +1502 -0
- data/generated/google/apis/groupsmigration_v1.rb +34 -0
- data/generated/google/apis/groupsmigration_v1/classes.rb +51 -0
- data/generated/google/apis/groupsmigration_v1/representations.rb +38 -0
- data/generated/google/apis/groupsmigration_v1/service.rb +111 -0
- data/generated/google/apis/groupssettings_v1.rb +34 -0
- data/generated/google/apis/groupssettings_v1/classes.rb +221 -0
- data/generated/google/apis/groupssettings_v1/representations.rb +64 -0
- data/generated/google/apis/groupssettings_v1/service.rb +179 -0
- data/generated/google/apis/identitytoolkit_v3.rb +31 -0
- data/generated/google/apis/identitytoolkit_v3/classes.rb +1229 -0
- data/generated/google/apis/identitytoolkit_v3/representations.rb +422 -0
- data/generated/google/apis/identitytoolkit_v3/service.rb +491 -0
- data/generated/google/apis/licensing_v1.rb +34 -0
- data/generated/google/apis/licensing_v1/classes.rb +132 -0
- data/generated/google/apis/licensing_v1/representations.rb +68 -0
- data/generated/google/apis/licensing_v1/service.rb +376 -0
- data/generated/google/apis/logging_v1beta3.rb +35 -0
- data/generated/google/apis/logging_v1beta3/classes.rb +505 -0
- data/generated/google/apis/logging_v1beta3/representations.rb +222 -0
- data/generated/google/apis/logging_v1beta3/service.rb +670 -0
- data/generated/google/apis/manager_v1beta2.rb +50 -0
- data/generated/google/apis/manager_v1beta2/classes.rb +1287 -0
- data/generated/google/apis/manager_v1beta2/representations.rb +536 -0
- data/generated/google/apis/manager_v1beta2/service.rb +380 -0
- data/generated/google/apis/mapsengine_v1.rb +38 -0
- data/generated/google/apis/mapsengine_v1/classes.rb +2873 -0
- data/generated/google/apis/mapsengine_v1/representations.rb +1235 -0
- data/generated/google/apis/mapsengine_v1/service.rb +3465 -0
- data/generated/google/apis/mirror_v1.rb +37 -0
- data/generated/google/apis/mirror_v1/classes.rb +1072 -0
- data/generated/google/apis/mirror_v1/representations.rb +350 -0
- data/generated/google/apis/mirror_v1/service.rb +1001 -0
- data/generated/google/apis/oauth2_v2.rb +43 -0
- data/generated/google/apis/oauth2_v2/classes.rb +245 -0
- data/generated/google/apis/oauth2_v2/representations.rb +94 -0
- data/generated/google/apis/oauth2_v2/service.rb +203 -0
- data/generated/google/apis/pagespeedonline_v2.rb +32 -0
- data/generated/google/apis/pagespeedonline_v2/classes.rb +614 -0
- data/generated/google/apis/pagespeedonline_v2/representations.rb +244 -0
- data/generated/google/apis/pagespeedonline_v2/service.rb +120 -0
- data/generated/google/apis/plus_domains_v1.rb +61 -0
- data/generated/google/apis/plus_domains_v1/classes.rb +2402 -0
- data/generated/google/apis/plus_domains_v1/representations.rb +873 -0
- data/generated/google/apis/plus_domains_v1/service.rb +924 -0
- data/generated/google/apis/plus_v1.rb +43 -0
- data/generated/google/apis/plus_v1/classes.rb +2384 -0
- data/generated/google/apis/plus_v1/representations.rb +812 -0
- data/generated/google/apis/plus_v1/service.rb +616 -0
- data/generated/google/apis/prediction_v1_6.rb +44 -0
- data/generated/google/apis/prediction_v1_6/classes.rb +751 -0
- data/generated/google/apis/prediction_v1_6/representations.rb +327 -0
- data/generated/google/apis/prediction_v1_6/service.rb +388 -0
- data/generated/google/apis/pubsub_v1beta2.rb +37 -0
- data/generated/google/apis/pubsub_v1beta2/classes.rb +824 -0
- data/generated/google/apis/pubsub_v1beta2/representations.rb +366 -0
- data/generated/google/apis/pubsub_v1beta2/service.rb +778 -0
- data/generated/google/apis/qpx_express_v1.rb +31 -0
- data/generated/google/apis/qpx_express_v1/classes.rb +1268 -0
- data/generated/google/apis/qpx_express_v1/representations.rb +424 -0
- data/generated/google/apis/qpx_express_v1/service.rb +101 -0
- data/generated/google/apis/replicapool_v1beta2.rb +41 -0
- data/generated/google/apis/replicapool_v1beta2/classes.rb +621 -0
- data/generated/google/apis/replicapool_v1beta2/representations.rb +235 -0
- data/generated/google/apis/replicapool_v1beta2/service.rb +620 -0
- data/generated/google/apis/replicapoolupdater_v1beta1.rb +41 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/classes.rb +682 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/representations.rb +247 -0
- data/generated/google/apis/replicapoolupdater_v1beta1/service.rb +472 -0
- data/generated/google/apis/reseller_v1.rb +37 -0
- data/generated/google/apis/reseller_v1/classes.rb +502 -0
- data/generated/google/apis/reseller_v1/representations.rb +199 -0
- data/generated/google/apis/reseller_v1/service.rb +637 -0
- data/generated/google/apis/resourceviews_v1beta2.rb +47 -0
- data/generated/google/apis/resourceviews_v1beta2/classes.rb +660 -0
- data/generated/google/apis/resourceviews_v1beta2/representations.rb +269 -0
- data/generated/google/apis/resourceviews_v1beta2/service.rb +574 -0
- data/generated/google/apis/site_verification_v1.rb +37 -0
- data/generated/google/apis/site_verification_v1/classes.rb +185 -0
- data/generated/google/apis/site_verification_v1/representations.rb +101 -0
- data/generated/google/apis/site_verification_v1/service.rb +322 -0
- data/generated/google/apis/sqladmin_v1beta4.rb +37 -0
- data/generated/google/apis/sqladmin_v1beta4/classes.rb +1817 -0
- data/generated/google/apis/sqladmin_v1beta4/representations.rb +688 -0
- data/generated/google/apis/sqladmin_v1beta4/service.rb +1534 -0
- data/generated/google/apis/storage_v1.rb +43 -0
- data/generated/google/apis/storage_v1/classes.rb +1177 -0
- data/generated/google/apis/storage_v1/representations.rb +427 -0
- data/generated/google/apis/storage_v1/service.rb +1920 -0
- data/generated/google/apis/tagmanager_v1.rb +52 -0
- data/generated/google/apis/tagmanager_v1/classes.rb +1226 -0
- data/generated/google/apis/tagmanager_v1/representations.rb +461 -0
- data/generated/google/apis/tagmanager_v1/service.rb +1978 -0
- data/generated/google/apis/taskqueue_v1beta2.rb +37 -0
- data/generated/google/apis/taskqueue_v1beta2/classes.rb +254 -0
- data/generated/google/apis/taskqueue_v1beta2/representations.rb +114 -0
- data/generated/google/apis/taskqueue_v1beta2/service.rb +416 -0
- data/generated/google/apis/tasks_v1.rb +37 -0
- data/generated/google/apis/tasks_v1/classes.rb +296 -0
- data/generated/google/apis/tasks_v1/representations.rb +115 -0
- data/generated/google/apis/tasks_v1/service.rb +657 -0
- data/generated/google/apis/translate_v2.rb +31 -0
- data/generated/google/apis/translate_v2/classes.rb +168 -0
- data/generated/google/apis/translate_v2/representations.rb +109 -0
- data/generated/google/apis/translate_v2/service.rb +185 -0
- data/generated/google/apis/urlshortener_v1.rb +34 -0
- data/generated/google/apis/urlshortener_v1/classes.rb +246 -0
- data/generated/google/apis/urlshortener_v1/representations.rb +111 -0
- data/generated/google/apis/urlshortener_v1/service.rb +179 -0
- data/generated/google/apis/webmasters_v3.rb +37 -0
- data/generated/google/apis/webmasters_v3/classes.rb +563 -0
- data/generated/google/apis/webmasters_v3/representations.rb +250 -0
- data/generated/google/apis/webmasters_v3/service.rb +587 -0
- data/generated/google/apis/youtube_analytics_v1.rb +46 -0
- data/generated/google/apis/youtube_analytics_v1/classes.rb +540 -0
- data/generated/google/apis/youtube_analytics_v1/representations.rb +242 -0
- data/generated/google/apis/youtube_analytics_v1/service.rb +567 -0
- data/generated/google/apis/youtube_v3.rb +49 -0
- data/generated/google/apis/youtube_v3/classes.rb +7225 -0
- data/generated/google/apis/youtube_v3/representations.rb +2529 -0
- data/generated/google/apis/youtube_v3/service.rb +4051 -0
- data/google-api-client.gemspec +27 -39
- data/lib/google/api_client/auth/storage.rb +3 -2
- data/lib/google/api_client/auth/storages/file_store.rb +1 -3
- data/lib/google/api_client/auth/storages/redis_store.rb +6 -2
- data/lib/google/apis.rb +48 -0
- data/lib/google/apis/core/api_command.rb +128 -0
- data/lib/google/apis/core/base_service.rb +314 -0
- data/lib/google/apis/core/batch.rb +222 -0
- data/lib/google/apis/core/download.rb +94 -0
- data/lib/google/apis/core/hashable.rb +44 -0
- data/lib/google/apis/core/http_command.rb +275 -0
- data/lib/google/apis/core/json_representation.rb +122 -0
- data/lib/google/{api_client/version.rb → apis/core/logging.rb} +12 -8
- data/lib/google/apis/core/multipart.rb +173 -0
- data/lib/google/apis/core/upload.rb +275 -0
- data/lib/google/{api_client → apis}/errors.rb +32 -28
- data/lib/google/apis/generator.rb +70 -0
- data/lib/google/apis/generator/annotator.rb +271 -0
- data/lib/google/apis/generator/helpers.rb +74 -0
- data/lib/google/apis/generator/model.rb +130 -0
- data/lib/google/apis/generator/template.rb +124 -0
- data/lib/google/apis/generator/templates/_class.tmpl +40 -0
- data/lib/google/apis/generator/templates/_method.tmpl +90 -0
- data/lib/google/apis/generator/templates/_representation.tmpl +51 -0
- data/lib/google/apis/generator/templates/_representation_stub.tmpl +15 -0
- data/lib/google/apis/generator/templates/_representation_type.tmpl +10 -0
- data/lib/google/{api_client/reference.rb → apis/generator/templates/classes.rb.tmpl} +11 -9
- data/lib/google/apis/generator/templates/module.rb.tmpl +40 -0
- data/lib/google/apis/generator/templates/representations.rb.tmpl +32 -0
- data/lib/google/apis/generator/templates/service.rb.tmpl +60 -0
- data/lib/google/apis/options.rb +79 -0
- data/lib/google/apis/version.rb +39 -0
- data/rakelib/metrics.rake +22 -0
- data/rakelib/rubocop.rake +10 -0
- data/rakelib/spec.rake +11 -0
- data/rakelib/yard.rake +11 -0
- data/samples/calendar/calendar.rb +43 -0
- data/samples/drive/drive.rb +40 -0
- data/samples/pubsub/pubsub.rb +52 -0
- data/{lib/google/api_client/discovery.rb → samples/translate/translate.rb} +14 -5
- data/script/generate +79 -0
- data/script/package +8 -0
- data/script/release +15 -0
- data/spec/fixtures/files/api_names.yaml +3 -0
- data/spec/fixtures/files/auth_stored_credentials.json +8 -0
- data/spec/fixtures/files/client_secrets.json +1 -0
- data/spec/fixtures/files/test.blah +1 -0
- data/spec/fixtures/files/test.txt +1 -0
- data/spec/fixtures/files/test_api.json +440 -0
- data/spec/google/api_client/auth/storage_spec.rb +1 -3
- data/spec/google/api_client/auth/storages/file_store_spec.rb +1 -2
- data/spec/google/api_client/auth/storages/redis_store_spec.rb +1 -3
- data/spec/google/apis/core/api_command_spec.rb +170 -0
- data/spec/google/apis/core/batch_spec.rb +128 -0
- data/spec/google/apis/core/download_spec.rb +90 -0
- data/spec/google/apis/core/hashable_spec.rb +60 -0
- data/spec/google/apis/core/http_command_spec.rb +238 -0
- data/spec/google/apis/core/json_representation_spec.rb +192 -0
- data/spec/google/apis/core/service_spec.rb +247 -0
- data/spec/google/apis/core/upload_spec.rb +238 -0
- data/{lib/google/api_client/service_account.rb → spec/google/apis/generated_spec.rb} +14 -8
- data/spec/google/apis/generator/generator_spec.rb +272 -0
- data/spec/google/apis/logging_spec.rb +45 -0
- data/spec/google/apis/options_spec.rb +40 -0
- data/spec/integration_tests/drive_spec.rb +35 -0
- data/spec/integration_tests/pubsub_spec.rb +48 -0
- data/spec/integration_tests/url_shortener_spec.rb +31 -0
- data/spec/spec_helper.rb +102 -46
- metadata +433 -178
- data/lib/compat/multi_json.rb +0 -19
- data/lib/google/api_client.rb +0 -750
- data/lib/google/api_client/auth/file_storage.rb +0 -59
- data/lib/google/api_client/auth/jwt_asserter.rb +0 -126
- data/lib/google/api_client/auth/key_utils.rb +0 -93
- data/lib/google/api_client/auth/pkcs12.rb +0 -41
- data/lib/google/api_client/batch.rb +0 -326
- data/lib/google/api_client/charset.rb +0 -33
- data/lib/google/api_client/discovery/api.rb +0 -310
- data/lib/google/api_client/discovery/media.rb +0 -77
- data/lib/google/api_client/discovery/method.rb +0 -363
- data/lib/google/api_client/discovery/resource.rb +0 -156
- data/lib/google/api_client/discovery/schema.rb +0 -117
- data/lib/google/api_client/environment.rb +0 -42
- data/lib/google/api_client/gzip.rb +0 -28
- data/lib/google/api_client/logging.rb +0 -32
- data/lib/google/api_client/media.rb +0 -259
- data/lib/google/api_client/railtie.rb +0 -18
- data/lib/google/api_client/request.rb +0 -350
- data/lib/google/api_client/result.rb +0 -255
- data/lib/google/api_client/service.rb +0 -233
- data/lib/google/api_client/service/batch.rb +0 -110
- data/lib/google/api_client/service/request.rb +0 -144
- data/lib/google/api_client/service/resource.rb +0 -40
- data/lib/google/api_client/service/result.rb +0 -162
- data/lib/google/api_client/service/simple_file_store.rb +0 -151
- data/lib/google/api_client/service/stub_generator.rb +0 -61
- data/spec/google/api_client/batch_spec.rb +0 -248
- data/spec/google/api_client/discovery_spec.rb +0 -708
- data/spec/google/api_client/gzip_spec.rb +0 -98
- data/spec/google/api_client/media_spec.rb +0 -178
- data/spec/google/api_client/result_spec.rb +0 -207
- data/spec/google/api_client/service_account_spec.rb +0 -169
- data/spec/google/api_client/service_spec.rb +0 -618
- data/spec/google/api_client/simple_file_store_spec.rb +0 -133
- data/spec/google/api_client_spec.rb +0 -352
@@ -0,0 +1,1706 @@
|
|
1
|
+
# Copyright 2015 Google Inc.
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module ContentV2
|
23
|
+
# Content API for Shopping
|
24
|
+
#
|
25
|
+
# Manage product items, inventory, and Merchant Center accounts for Google
|
26
|
+
# Shopping.
|
27
|
+
#
|
28
|
+
# @example
|
29
|
+
# require 'google/apis/content_v2'
|
30
|
+
#
|
31
|
+
# Content = Google::Apis::ContentV2 # Alias the module
|
32
|
+
# service = Content::ShoppingContentService.new
|
33
|
+
#
|
34
|
+
# @see https://developers.google.com/shopping-content/v2/
|
35
|
+
class ShoppingContentService < Google::Apis::Core::BaseService
|
36
|
+
# @return [String]
|
37
|
+
# API key. Your API key identifies your project and provides you with API access,
|
38
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
39
|
+
attr_accessor :key
|
40
|
+
|
41
|
+
# @return [String]
|
42
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
43
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
44
|
+
# Overrides userIp if both are provided.
|
45
|
+
attr_accessor :quota_user
|
46
|
+
|
47
|
+
# @return [String]
|
48
|
+
# IP address of the site where the request originates. Use this if you want to
|
49
|
+
# enforce per-user limits.
|
50
|
+
attr_accessor :user_ip
|
51
|
+
|
52
|
+
def initialize
|
53
|
+
super('https://www.googleapis.com/', 'content/v2/')
|
54
|
+
end
|
55
|
+
|
56
|
+
# Returns information about the authenticated user.
|
57
|
+
# @param [String] fields
|
58
|
+
# Selector specifying which fields to include in a partial response.
|
59
|
+
# @param [String] quota_user
|
60
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
61
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
62
|
+
# Overrides userIp if both are provided.
|
63
|
+
# @param [String] user_ip
|
64
|
+
# IP address of the site where the request originates. Use this if you want to
|
65
|
+
# enforce per-user limits.
|
66
|
+
# @param [Google::Apis::RequestOptions] options
|
67
|
+
# Request-specific options
|
68
|
+
#
|
69
|
+
# @yield [result, err] Result & error if block supplied
|
70
|
+
# @yieldparam result [Google::Apis::ContentV2::AccountsAuthInfoResponse] parsed result object
|
71
|
+
# @yieldparam err [StandardError] error object if request failed
|
72
|
+
#
|
73
|
+
# @return [Google::Apis::ContentV2::AccountsAuthInfoResponse]
|
74
|
+
#
|
75
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
76
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
77
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
78
|
+
def get_account_authinfo(fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
79
|
+
path = 'accounts/authinfo'
|
80
|
+
command = make_simple_command(:get, path, options)
|
81
|
+
command.response_representation = Google::Apis::ContentV2::AccountsAuthInfoResponse::Representation
|
82
|
+
command.response_class = Google::Apis::ContentV2::AccountsAuthInfoResponse
|
83
|
+
command.query['fields'] = fields unless fields.nil?
|
84
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
85
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
86
|
+
execute_or_queue_command(command, &block)
|
87
|
+
end
|
88
|
+
|
89
|
+
# Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)
|
90
|
+
# accounts in a single request.
|
91
|
+
# @param [Google::Apis::ContentV2::BatchAccountsRequest] batch_accounts_request_object
|
92
|
+
# @param [String] fields
|
93
|
+
# Selector specifying which fields to include in a partial response.
|
94
|
+
# @param [String] quota_user
|
95
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
96
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
97
|
+
# Overrides userIp if both are provided.
|
98
|
+
# @param [String] user_ip
|
99
|
+
# IP address of the site where the request originates. Use this if you want to
|
100
|
+
# enforce per-user limits.
|
101
|
+
# @param [Google::Apis::RequestOptions] options
|
102
|
+
# Request-specific options
|
103
|
+
#
|
104
|
+
# @yield [result, err] Result & error if block supplied
|
105
|
+
# @yieldparam result [Google::Apis::ContentV2::BatchAccountsResponse] parsed result object
|
106
|
+
# @yieldparam err [StandardError] error object if request failed
|
107
|
+
#
|
108
|
+
# @return [Google::Apis::ContentV2::BatchAccountsResponse]
|
109
|
+
#
|
110
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
111
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
112
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
113
|
+
def batch_account(batch_accounts_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
114
|
+
path = 'accounts/batch'
|
115
|
+
command = make_simple_command(:post, path, options)
|
116
|
+
command.request_representation = Google::Apis::ContentV2::BatchAccountsRequest::Representation
|
117
|
+
command.request_object = batch_accounts_request_object
|
118
|
+
command.response_representation = Google::Apis::ContentV2::BatchAccountsResponse::Representation
|
119
|
+
command.response_class = Google::Apis::ContentV2::BatchAccountsResponse
|
120
|
+
command.query['fields'] = fields unless fields.nil?
|
121
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
122
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
123
|
+
execute_or_queue_command(command, &block)
|
124
|
+
end
|
125
|
+
|
126
|
+
# Deletes a Merchant Center sub-account.
|
127
|
+
# @param [String] merchant_id
|
128
|
+
# The ID of the managing account.
|
129
|
+
# @param [String] account_id
|
130
|
+
# The ID of the account.
|
131
|
+
# @param [String] fields
|
132
|
+
# Selector specifying which fields to include in a partial response.
|
133
|
+
# @param [String] quota_user
|
134
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
135
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
136
|
+
# Overrides userIp if both are provided.
|
137
|
+
# @param [String] user_ip
|
138
|
+
# IP address of the site where the request originates. Use this if you want to
|
139
|
+
# enforce per-user limits.
|
140
|
+
# @param [Google::Apis::RequestOptions] options
|
141
|
+
# Request-specific options
|
142
|
+
#
|
143
|
+
# @yield [result, err] Result & error if block supplied
|
144
|
+
# @yieldparam result [NilClass] No result returned for this method
|
145
|
+
# @yieldparam err [StandardError] error object if request failed
|
146
|
+
#
|
147
|
+
# @return [void]
|
148
|
+
#
|
149
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
150
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
151
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
152
|
+
def delete_account(merchant_id, account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
153
|
+
path = '{merchantId}/accounts/{accountId}'
|
154
|
+
command = make_simple_command(:delete, path, options)
|
155
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
156
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
157
|
+
command.query['fields'] = fields unless fields.nil?
|
158
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
159
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
160
|
+
execute_or_queue_command(command, &block)
|
161
|
+
end
|
162
|
+
|
163
|
+
# Retrieves a Merchant Center account.
|
164
|
+
# @param [String] merchant_id
|
165
|
+
# The ID of the managing account.
|
166
|
+
# @param [String] account_id
|
167
|
+
# The ID of the account.
|
168
|
+
# @param [String] fields
|
169
|
+
# Selector specifying which fields to include in a partial response.
|
170
|
+
# @param [String] quota_user
|
171
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
172
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
173
|
+
# Overrides userIp if both are provided.
|
174
|
+
# @param [String] user_ip
|
175
|
+
# IP address of the site where the request originates. Use this if you want to
|
176
|
+
# enforce per-user limits.
|
177
|
+
# @param [Google::Apis::RequestOptions] options
|
178
|
+
# Request-specific options
|
179
|
+
#
|
180
|
+
# @yield [result, err] Result & error if block supplied
|
181
|
+
# @yieldparam result [Google::Apis::ContentV2::Account] parsed result object
|
182
|
+
# @yieldparam err [StandardError] error object if request failed
|
183
|
+
#
|
184
|
+
# @return [Google::Apis::ContentV2::Account]
|
185
|
+
#
|
186
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
187
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
188
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
189
|
+
def get_account(merchant_id, account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
190
|
+
path = '{merchantId}/accounts/{accountId}'
|
191
|
+
command = make_simple_command(:get, path, options)
|
192
|
+
command.response_representation = Google::Apis::ContentV2::Account::Representation
|
193
|
+
command.response_class = Google::Apis::ContentV2::Account
|
194
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
195
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
196
|
+
command.query['fields'] = fields unless fields.nil?
|
197
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
198
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
199
|
+
execute_or_queue_command(command, &block)
|
200
|
+
end
|
201
|
+
|
202
|
+
# Creates a Merchant Center sub-account.
|
203
|
+
# @param [String] merchant_id
|
204
|
+
# The ID of the managing account.
|
205
|
+
# @param [Google::Apis::ContentV2::Account] account_object
|
206
|
+
# @param [String] fields
|
207
|
+
# Selector specifying which fields to include in a partial response.
|
208
|
+
# @param [String] quota_user
|
209
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
210
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
211
|
+
# Overrides userIp if both are provided.
|
212
|
+
# @param [String] user_ip
|
213
|
+
# IP address of the site where the request originates. Use this if you want to
|
214
|
+
# enforce per-user limits.
|
215
|
+
# @param [Google::Apis::RequestOptions] options
|
216
|
+
# Request-specific options
|
217
|
+
#
|
218
|
+
# @yield [result, err] Result & error if block supplied
|
219
|
+
# @yieldparam result [Google::Apis::ContentV2::Account] parsed result object
|
220
|
+
# @yieldparam err [StandardError] error object if request failed
|
221
|
+
#
|
222
|
+
# @return [Google::Apis::ContentV2::Account]
|
223
|
+
#
|
224
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
225
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
226
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
227
|
+
def insert_account(merchant_id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
228
|
+
path = '{merchantId}/accounts'
|
229
|
+
command = make_simple_command(:post, path, options)
|
230
|
+
command.request_representation = Google::Apis::ContentV2::Account::Representation
|
231
|
+
command.request_object = account_object
|
232
|
+
command.response_representation = Google::Apis::ContentV2::Account::Representation
|
233
|
+
command.response_class = Google::Apis::ContentV2::Account
|
234
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
235
|
+
command.query['fields'] = fields unless fields.nil?
|
236
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
237
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
238
|
+
execute_or_queue_command(command, &block)
|
239
|
+
end
|
240
|
+
|
241
|
+
# Lists the sub-accounts in your Merchant Center account.
|
242
|
+
# @param [String] merchant_id
|
243
|
+
# The ID of the managing account.
|
244
|
+
# @param [Fixnum] max_results
|
245
|
+
# The maximum number of accounts to return in the response, used for paging.
|
246
|
+
# @param [String] page_token
|
247
|
+
# The token returned by the previous request.
|
248
|
+
# @param [String] fields
|
249
|
+
# Selector specifying which fields to include in a partial response.
|
250
|
+
# @param [String] quota_user
|
251
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
252
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
253
|
+
# Overrides userIp if both are provided.
|
254
|
+
# @param [String] user_ip
|
255
|
+
# IP address of the site where the request originates. Use this if you want to
|
256
|
+
# enforce per-user limits.
|
257
|
+
# @param [Google::Apis::RequestOptions] options
|
258
|
+
# Request-specific options
|
259
|
+
#
|
260
|
+
# @yield [result, err] Result & error if block supplied
|
261
|
+
# @yieldparam result [Google::Apis::ContentV2::ListAccountsResponse] parsed result object
|
262
|
+
# @yieldparam err [StandardError] error object if request failed
|
263
|
+
#
|
264
|
+
# @return [Google::Apis::ContentV2::ListAccountsResponse]
|
265
|
+
#
|
266
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
267
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
268
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
269
|
+
def list_accounts(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
270
|
+
path = '{merchantId}/accounts'
|
271
|
+
command = make_simple_command(:get, path, options)
|
272
|
+
command.response_representation = Google::Apis::ContentV2::ListAccountsResponse::Representation
|
273
|
+
command.response_class = Google::Apis::ContentV2::ListAccountsResponse
|
274
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
275
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
276
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
277
|
+
command.query['fields'] = fields unless fields.nil?
|
278
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
279
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
280
|
+
execute_or_queue_command(command, &block)
|
281
|
+
end
|
282
|
+
|
283
|
+
# Updates a Merchant Center account. This method supports patch semantics.
|
284
|
+
# @param [String] merchant_id
|
285
|
+
# The ID of the managing account.
|
286
|
+
# @param [String] account_id
|
287
|
+
# The ID of the account.
|
288
|
+
# @param [Google::Apis::ContentV2::Account] account_object
|
289
|
+
# @param [String] fields
|
290
|
+
# Selector specifying which fields to include in a partial response.
|
291
|
+
# @param [String] quota_user
|
292
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
293
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
294
|
+
# Overrides userIp if both are provided.
|
295
|
+
# @param [String] user_ip
|
296
|
+
# IP address of the site where the request originates. Use this if you want to
|
297
|
+
# enforce per-user limits.
|
298
|
+
# @param [Google::Apis::RequestOptions] options
|
299
|
+
# Request-specific options
|
300
|
+
#
|
301
|
+
# @yield [result, err] Result & error if block supplied
|
302
|
+
# @yieldparam result [Google::Apis::ContentV2::Account] parsed result object
|
303
|
+
# @yieldparam err [StandardError] error object if request failed
|
304
|
+
#
|
305
|
+
# @return [Google::Apis::ContentV2::Account]
|
306
|
+
#
|
307
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
308
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
309
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
310
|
+
def patch_account(merchant_id, account_id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
311
|
+
path = '{merchantId}/accounts/{accountId}'
|
312
|
+
command = make_simple_command(:patch, path, options)
|
313
|
+
command.request_representation = Google::Apis::ContentV2::Account::Representation
|
314
|
+
command.request_object = account_object
|
315
|
+
command.response_representation = Google::Apis::ContentV2::Account::Representation
|
316
|
+
command.response_class = Google::Apis::ContentV2::Account
|
317
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
318
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
319
|
+
command.query['fields'] = fields unless fields.nil?
|
320
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
321
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
322
|
+
execute_or_queue_command(command, &block)
|
323
|
+
end
|
324
|
+
|
325
|
+
# Updates a Merchant Center account.
|
326
|
+
# @param [String] merchant_id
|
327
|
+
# The ID of the managing account.
|
328
|
+
# @param [String] account_id
|
329
|
+
# The ID of the account.
|
330
|
+
# @param [Google::Apis::ContentV2::Account] account_object
|
331
|
+
# @param [String] fields
|
332
|
+
# Selector specifying which fields to include in a partial response.
|
333
|
+
# @param [String] quota_user
|
334
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
335
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
336
|
+
# Overrides userIp if both are provided.
|
337
|
+
# @param [String] user_ip
|
338
|
+
# IP address of the site where the request originates. Use this if you want to
|
339
|
+
# enforce per-user limits.
|
340
|
+
# @param [Google::Apis::RequestOptions] options
|
341
|
+
# Request-specific options
|
342
|
+
#
|
343
|
+
# @yield [result, err] Result & error if block supplied
|
344
|
+
# @yieldparam result [Google::Apis::ContentV2::Account] parsed result object
|
345
|
+
# @yieldparam err [StandardError] error object if request failed
|
346
|
+
#
|
347
|
+
# @return [Google::Apis::ContentV2::Account]
|
348
|
+
#
|
349
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
350
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
351
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
352
|
+
def update_account(merchant_id, account_id, account_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
353
|
+
path = '{merchantId}/accounts/{accountId}'
|
354
|
+
command = make_simple_command(:put, path, options)
|
355
|
+
command.request_representation = Google::Apis::ContentV2::Account::Representation
|
356
|
+
command.request_object = account_object
|
357
|
+
command.response_representation = Google::Apis::ContentV2::Account::Representation
|
358
|
+
command.response_class = Google::Apis::ContentV2::Account
|
359
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
360
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
361
|
+
command.query['fields'] = fields unless fields.nil?
|
362
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
363
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
364
|
+
execute_or_queue_command(command, &block)
|
365
|
+
end
|
366
|
+
|
367
|
+
# Retrieves and updates the shipping settings of multiple accounts in a single
|
368
|
+
# request.
|
369
|
+
# @param [Google::Apis::ContentV2::BatchAccountShippingRequest] batch_account_shipping_request_object
|
370
|
+
# @param [Boolean] dry_run
|
371
|
+
# Flag to run the request in dry-run mode.
|
372
|
+
# @param [String] fields
|
373
|
+
# Selector specifying which fields to include in a partial response.
|
374
|
+
# @param [String] quota_user
|
375
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
376
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
377
|
+
# Overrides userIp if both are provided.
|
378
|
+
# @param [String] user_ip
|
379
|
+
# IP address of the site where the request originates. Use this if you want to
|
380
|
+
# enforce per-user limits.
|
381
|
+
# @param [Google::Apis::RequestOptions] options
|
382
|
+
# Request-specific options
|
383
|
+
#
|
384
|
+
# @yield [result, err] Result & error if block supplied
|
385
|
+
# @yieldparam result [Google::Apis::ContentV2::BatchAccountShippingResponse] parsed result object
|
386
|
+
# @yieldparam err [StandardError] error object if request failed
|
387
|
+
#
|
388
|
+
# @return [Google::Apis::ContentV2::BatchAccountShippingResponse]
|
389
|
+
#
|
390
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
391
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
392
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
393
|
+
def batch_account_shipping(batch_account_shipping_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
394
|
+
path = 'accountshipping/batch'
|
395
|
+
command = make_simple_command(:post, path, options)
|
396
|
+
command.request_representation = Google::Apis::ContentV2::BatchAccountShippingRequest::Representation
|
397
|
+
command.request_object = batch_account_shipping_request_object
|
398
|
+
command.response_representation = Google::Apis::ContentV2::BatchAccountShippingResponse::Representation
|
399
|
+
command.response_class = Google::Apis::ContentV2::BatchAccountShippingResponse
|
400
|
+
command.query['dryRun'] = dry_run unless dry_run.nil?
|
401
|
+
command.query['fields'] = fields unless fields.nil?
|
402
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
403
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
404
|
+
execute_or_queue_command(command, &block)
|
405
|
+
end
|
406
|
+
|
407
|
+
# Retrieves the shipping settings of the account.
|
408
|
+
# @param [String] merchant_id
|
409
|
+
# The ID of the managing account.
|
410
|
+
# @param [String] account_id
|
411
|
+
# The ID of the account for which to get/update account shipping settings.
|
412
|
+
# @param [String] fields
|
413
|
+
# Selector specifying which fields to include in a partial response.
|
414
|
+
# @param [String] quota_user
|
415
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
416
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
417
|
+
# Overrides userIp if both are provided.
|
418
|
+
# @param [String] user_ip
|
419
|
+
# IP address of the site where the request originates. Use this if you want to
|
420
|
+
# enforce per-user limits.
|
421
|
+
# @param [Google::Apis::RequestOptions] options
|
422
|
+
# Request-specific options
|
423
|
+
#
|
424
|
+
# @yield [result, err] Result & error if block supplied
|
425
|
+
# @yieldparam result [Google::Apis::ContentV2::AccountShipping] parsed result object
|
426
|
+
# @yieldparam err [StandardError] error object if request failed
|
427
|
+
#
|
428
|
+
# @return [Google::Apis::ContentV2::AccountShipping]
|
429
|
+
#
|
430
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
431
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
432
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
433
|
+
def get_account_shipping(merchant_id, account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
434
|
+
path = '{merchantId}/accountshipping/{accountId}'
|
435
|
+
command = make_simple_command(:get, path, options)
|
436
|
+
command.response_representation = Google::Apis::ContentV2::AccountShipping::Representation
|
437
|
+
command.response_class = Google::Apis::ContentV2::AccountShipping
|
438
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
439
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
440
|
+
command.query['fields'] = fields unless fields.nil?
|
441
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
442
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
443
|
+
execute_or_queue_command(command, &block)
|
444
|
+
end
|
445
|
+
|
446
|
+
# Lists the shipping settings of the sub-accounts in your Merchant Center
|
447
|
+
# account.
|
448
|
+
# @param [String] merchant_id
|
449
|
+
# The ID of the managing account.
|
450
|
+
# @param [Fixnum] max_results
|
451
|
+
# The maximum number of shipping settings to return in the response, used for
|
452
|
+
# paging.
|
453
|
+
# @param [String] page_token
|
454
|
+
# The token returned by the previous request.
|
455
|
+
# @param [String] fields
|
456
|
+
# Selector specifying which fields to include in a partial response.
|
457
|
+
# @param [String] quota_user
|
458
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
459
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
460
|
+
# Overrides userIp if both are provided.
|
461
|
+
# @param [String] user_ip
|
462
|
+
# IP address of the site where the request originates. Use this if you want to
|
463
|
+
# enforce per-user limits.
|
464
|
+
# @param [Google::Apis::RequestOptions] options
|
465
|
+
# Request-specific options
|
466
|
+
#
|
467
|
+
# @yield [result, err] Result & error if block supplied
|
468
|
+
# @yieldparam result [Google::Apis::ContentV2::ListAccountShippingResponse] parsed result object
|
469
|
+
# @yieldparam err [StandardError] error object if request failed
|
470
|
+
#
|
471
|
+
# @return [Google::Apis::ContentV2::ListAccountShippingResponse]
|
472
|
+
#
|
473
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
474
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
475
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
476
|
+
def list_account_shippings(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
477
|
+
path = '{merchantId}/accountshipping'
|
478
|
+
command = make_simple_command(:get, path, options)
|
479
|
+
command.response_representation = Google::Apis::ContentV2::ListAccountShippingResponse::Representation
|
480
|
+
command.response_class = Google::Apis::ContentV2::ListAccountShippingResponse
|
481
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
482
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
483
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
484
|
+
command.query['fields'] = fields unless fields.nil?
|
485
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
486
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
487
|
+
execute_or_queue_command(command, &block)
|
488
|
+
end
|
489
|
+
|
490
|
+
# Updates the shipping settings of the account. This method supports patch
|
491
|
+
# semantics.
|
492
|
+
# @param [String] merchant_id
|
493
|
+
# The ID of the managing account.
|
494
|
+
# @param [String] account_id
|
495
|
+
# The ID of the account for which to get/update account shipping settings.
|
496
|
+
# @param [Google::Apis::ContentV2::AccountShipping] account_shipping_object
|
497
|
+
# @param [Boolean] dry_run
|
498
|
+
# Flag to run the request in dry-run mode.
|
499
|
+
# @param [String] fields
|
500
|
+
# Selector specifying which fields to include in a partial response.
|
501
|
+
# @param [String] quota_user
|
502
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
503
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
504
|
+
# Overrides userIp if both are provided.
|
505
|
+
# @param [String] user_ip
|
506
|
+
# IP address of the site where the request originates. Use this if you want to
|
507
|
+
# enforce per-user limits.
|
508
|
+
# @param [Google::Apis::RequestOptions] options
|
509
|
+
# Request-specific options
|
510
|
+
#
|
511
|
+
# @yield [result, err] Result & error if block supplied
|
512
|
+
# @yieldparam result [Google::Apis::ContentV2::AccountShipping] parsed result object
|
513
|
+
# @yieldparam err [StandardError] error object if request failed
|
514
|
+
#
|
515
|
+
# @return [Google::Apis::ContentV2::AccountShipping]
|
516
|
+
#
|
517
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
518
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
519
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
520
|
+
def patch_account_shipping(merchant_id, account_id, account_shipping_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
521
|
+
path = '{merchantId}/accountshipping/{accountId}'
|
522
|
+
command = make_simple_command(:patch, path, options)
|
523
|
+
command.request_representation = Google::Apis::ContentV2::AccountShipping::Representation
|
524
|
+
command.request_object = account_shipping_object
|
525
|
+
command.response_representation = Google::Apis::ContentV2::AccountShipping::Representation
|
526
|
+
command.response_class = Google::Apis::ContentV2::AccountShipping
|
527
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
528
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
529
|
+
command.query['dryRun'] = dry_run unless dry_run.nil?
|
530
|
+
command.query['fields'] = fields unless fields.nil?
|
531
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
532
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
533
|
+
execute_or_queue_command(command, &block)
|
534
|
+
end
|
535
|
+
|
536
|
+
# Updates the shipping settings of the account.
|
537
|
+
# @param [String] merchant_id
|
538
|
+
# The ID of the managing account.
|
539
|
+
# @param [String] account_id
|
540
|
+
# The ID of the account for which to get/update account shipping settings.
|
541
|
+
# @param [Google::Apis::ContentV2::AccountShipping] account_shipping_object
|
542
|
+
# @param [Boolean] dry_run
|
543
|
+
# Flag to run the request in dry-run mode.
|
544
|
+
# @param [String] fields
|
545
|
+
# Selector specifying which fields to include in a partial response.
|
546
|
+
# @param [String] quota_user
|
547
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
548
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
549
|
+
# Overrides userIp if both are provided.
|
550
|
+
# @param [String] user_ip
|
551
|
+
# IP address of the site where the request originates. Use this if you want to
|
552
|
+
# enforce per-user limits.
|
553
|
+
# @param [Google::Apis::RequestOptions] options
|
554
|
+
# Request-specific options
|
555
|
+
#
|
556
|
+
# @yield [result, err] Result & error if block supplied
|
557
|
+
# @yieldparam result [Google::Apis::ContentV2::AccountShipping] parsed result object
|
558
|
+
# @yieldparam err [StandardError] error object if request failed
|
559
|
+
#
|
560
|
+
# @return [Google::Apis::ContentV2::AccountShipping]
|
561
|
+
#
|
562
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
563
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
564
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
565
|
+
def update_account_shipping(merchant_id, account_id, account_shipping_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
566
|
+
path = '{merchantId}/accountshipping/{accountId}'
|
567
|
+
command = make_simple_command(:put, path, options)
|
568
|
+
command.request_representation = Google::Apis::ContentV2::AccountShipping::Representation
|
569
|
+
command.request_object = account_shipping_object
|
570
|
+
command.response_representation = Google::Apis::ContentV2::AccountShipping::Representation
|
571
|
+
command.response_class = Google::Apis::ContentV2::AccountShipping
|
572
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
573
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
574
|
+
command.query['dryRun'] = dry_run unless dry_run.nil?
|
575
|
+
command.query['fields'] = fields unless fields.nil?
|
576
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
577
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
578
|
+
execute_or_queue_command(command, &block)
|
579
|
+
end
|
580
|
+
|
581
|
+
#
|
582
|
+
# @param [Google::Apis::ContentV2::BatchAccountStatusesRequest] batch_account_statuses_request_object
|
583
|
+
# @param [String] fields
|
584
|
+
# Selector specifying which fields to include in a partial response.
|
585
|
+
# @param [String] quota_user
|
586
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
587
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
588
|
+
# Overrides userIp if both are provided.
|
589
|
+
# @param [String] user_ip
|
590
|
+
# IP address of the site where the request originates. Use this if you want to
|
591
|
+
# enforce per-user limits.
|
592
|
+
# @param [Google::Apis::RequestOptions] options
|
593
|
+
# Request-specific options
|
594
|
+
#
|
595
|
+
# @yield [result, err] Result & error if block supplied
|
596
|
+
# @yieldparam result [Google::Apis::ContentV2::BatchAccountStatusesResponse] parsed result object
|
597
|
+
# @yieldparam err [StandardError] error object if request failed
|
598
|
+
#
|
599
|
+
# @return [Google::Apis::ContentV2::BatchAccountStatusesResponse]
|
600
|
+
#
|
601
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
602
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
603
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
604
|
+
def batch_account_status(batch_account_statuses_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
605
|
+
path = 'accountstatuses/batch'
|
606
|
+
command = make_simple_command(:post, path, options)
|
607
|
+
command.request_representation = Google::Apis::ContentV2::BatchAccountStatusesRequest::Representation
|
608
|
+
command.request_object = batch_account_statuses_request_object
|
609
|
+
command.response_representation = Google::Apis::ContentV2::BatchAccountStatusesResponse::Representation
|
610
|
+
command.response_class = Google::Apis::ContentV2::BatchAccountStatusesResponse
|
611
|
+
command.query['fields'] = fields unless fields.nil?
|
612
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
613
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
614
|
+
execute_or_queue_command(command, &block)
|
615
|
+
end
|
616
|
+
|
617
|
+
# Retrieves the status of a Merchant Center account.
|
618
|
+
# @param [String] merchant_id
|
619
|
+
# The ID of the managing account.
|
620
|
+
# @param [String] account_id
|
621
|
+
# The ID of the account.
|
622
|
+
# @param [String] fields
|
623
|
+
# Selector specifying which fields to include in a partial response.
|
624
|
+
# @param [String] quota_user
|
625
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
626
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
627
|
+
# Overrides userIp if both are provided.
|
628
|
+
# @param [String] user_ip
|
629
|
+
# IP address of the site where the request originates. Use this if you want to
|
630
|
+
# enforce per-user limits.
|
631
|
+
# @param [Google::Apis::RequestOptions] options
|
632
|
+
# Request-specific options
|
633
|
+
#
|
634
|
+
# @yield [result, err] Result & error if block supplied
|
635
|
+
# @yieldparam result [Google::Apis::ContentV2::AccountStatus] parsed result object
|
636
|
+
# @yieldparam err [StandardError] error object if request failed
|
637
|
+
#
|
638
|
+
# @return [Google::Apis::ContentV2::AccountStatus]
|
639
|
+
#
|
640
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
641
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
642
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
643
|
+
def get_account_status(merchant_id, account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
644
|
+
path = '{merchantId}/accountstatuses/{accountId}'
|
645
|
+
command = make_simple_command(:get, path, options)
|
646
|
+
command.response_representation = Google::Apis::ContentV2::AccountStatus::Representation
|
647
|
+
command.response_class = Google::Apis::ContentV2::AccountStatus
|
648
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
649
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
650
|
+
command.query['fields'] = fields unless fields.nil?
|
651
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
652
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
653
|
+
execute_or_queue_command(command, &block)
|
654
|
+
end
|
655
|
+
|
656
|
+
# Lists the statuses of the sub-accounts in your Merchant Center account.
|
657
|
+
# @param [String] merchant_id
|
658
|
+
# The ID of the managing account.
|
659
|
+
# @param [Fixnum] max_results
|
660
|
+
# The maximum number of account statuses to return in the response, used for
|
661
|
+
# paging.
|
662
|
+
# @param [String] page_token
|
663
|
+
# The token returned by the previous request.
|
664
|
+
# @param [String] fields
|
665
|
+
# Selector specifying which fields to include in a partial response.
|
666
|
+
# @param [String] quota_user
|
667
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
668
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
669
|
+
# Overrides userIp if both are provided.
|
670
|
+
# @param [String] user_ip
|
671
|
+
# IP address of the site where the request originates. Use this if you want to
|
672
|
+
# enforce per-user limits.
|
673
|
+
# @param [Google::Apis::RequestOptions] options
|
674
|
+
# Request-specific options
|
675
|
+
#
|
676
|
+
# @yield [result, err] Result & error if block supplied
|
677
|
+
# @yieldparam result [Google::Apis::ContentV2::ListAccountStatusesResponse] parsed result object
|
678
|
+
# @yieldparam err [StandardError] error object if request failed
|
679
|
+
#
|
680
|
+
# @return [Google::Apis::ContentV2::ListAccountStatusesResponse]
|
681
|
+
#
|
682
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
683
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
684
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
685
|
+
def list_account_statuses(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
686
|
+
path = '{merchantId}/accountstatuses'
|
687
|
+
command = make_simple_command(:get, path, options)
|
688
|
+
command.response_representation = Google::Apis::ContentV2::ListAccountStatusesResponse::Representation
|
689
|
+
command.response_class = Google::Apis::ContentV2::ListAccountStatusesResponse
|
690
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
691
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
692
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
693
|
+
command.query['fields'] = fields unless fields.nil?
|
694
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
695
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
696
|
+
execute_or_queue_command(command, &block)
|
697
|
+
end
|
698
|
+
|
699
|
+
# Retrieves and updates tax settings of multiple accounts in a single request.
|
700
|
+
# @param [Google::Apis::ContentV2::BatchAccountTaxRequest] batch_account_tax_request_object
|
701
|
+
# @param [Boolean] dry_run
|
702
|
+
# Flag to run the request in dry-run mode.
|
703
|
+
# @param [String] fields
|
704
|
+
# Selector specifying which fields to include in a partial response.
|
705
|
+
# @param [String] quota_user
|
706
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
707
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
708
|
+
# Overrides userIp if both are provided.
|
709
|
+
# @param [String] user_ip
|
710
|
+
# IP address of the site where the request originates. Use this if you want to
|
711
|
+
# enforce per-user limits.
|
712
|
+
# @param [Google::Apis::RequestOptions] options
|
713
|
+
# Request-specific options
|
714
|
+
#
|
715
|
+
# @yield [result, err] Result & error if block supplied
|
716
|
+
# @yieldparam result [Google::Apis::ContentV2::BatchAccountTaxResponse] parsed result object
|
717
|
+
# @yieldparam err [StandardError] error object if request failed
|
718
|
+
#
|
719
|
+
# @return [Google::Apis::ContentV2::BatchAccountTaxResponse]
|
720
|
+
#
|
721
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
722
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
723
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
724
|
+
def batch_account_tax(batch_account_tax_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
725
|
+
path = 'accounttax/batch'
|
726
|
+
command = make_simple_command(:post, path, options)
|
727
|
+
command.request_representation = Google::Apis::ContentV2::BatchAccountTaxRequest::Representation
|
728
|
+
command.request_object = batch_account_tax_request_object
|
729
|
+
command.response_representation = Google::Apis::ContentV2::BatchAccountTaxResponse::Representation
|
730
|
+
command.response_class = Google::Apis::ContentV2::BatchAccountTaxResponse
|
731
|
+
command.query['dryRun'] = dry_run unless dry_run.nil?
|
732
|
+
command.query['fields'] = fields unless fields.nil?
|
733
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
734
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
735
|
+
execute_or_queue_command(command, &block)
|
736
|
+
end
|
737
|
+
|
738
|
+
# Retrieves the tax settings of the account.
|
739
|
+
# @param [String] merchant_id
|
740
|
+
# The ID of the managing account.
|
741
|
+
# @param [String] account_id
|
742
|
+
# The ID of the account for which to get/update account tax settings.
|
743
|
+
# @param [String] fields
|
744
|
+
# Selector specifying which fields to include in a partial response.
|
745
|
+
# @param [String] quota_user
|
746
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
747
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
748
|
+
# Overrides userIp if both are provided.
|
749
|
+
# @param [String] user_ip
|
750
|
+
# IP address of the site where the request originates. Use this if you want to
|
751
|
+
# enforce per-user limits.
|
752
|
+
# @param [Google::Apis::RequestOptions] options
|
753
|
+
# Request-specific options
|
754
|
+
#
|
755
|
+
# @yield [result, err] Result & error if block supplied
|
756
|
+
# @yieldparam result [Google::Apis::ContentV2::AccountTax] parsed result object
|
757
|
+
# @yieldparam err [StandardError] error object if request failed
|
758
|
+
#
|
759
|
+
# @return [Google::Apis::ContentV2::AccountTax]
|
760
|
+
#
|
761
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
762
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
763
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
764
|
+
def get_account_tax(merchant_id, account_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
765
|
+
path = '{merchantId}/accounttax/{accountId}'
|
766
|
+
command = make_simple_command(:get, path, options)
|
767
|
+
command.response_representation = Google::Apis::ContentV2::AccountTax::Representation
|
768
|
+
command.response_class = Google::Apis::ContentV2::AccountTax
|
769
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
770
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
771
|
+
command.query['fields'] = fields unless fields.nil?
|
772
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
773
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
774
|
+
execute_or_queue_command(command, &block)
|
775
|
+
end
|
776
|
+
|
777
|
+
# Lists the tax settings of the sub-accounts in your Merchant Center account.
|
778
|
+
# @param [String] merchant_id
|
779
|
+
# The ID of the managing account.
|
780
|
+
# @param [Fixnum] max_results
|
781
|
+
# The maximum number of tax settings to return in the response, used for paging.
|
782
|
+
# @param [String] page_token
|
783
|
+
# The token returned by the previous request.
|
784
|
+
# @param [String] fields
|
785
|
+
# Selector specifying which fields to include in a partial response.
|
786
|
+
# @param [String] quota_user
|
787
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
788
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
789
|
+
# Overrides userIp if both are provided.
|
790
|
+
# @param [String] user_ip
|
791
|
+
# IP address of the site where the request originates. Use this if you want to
|
792
|
+
# enforce per-user limits.
|
793
|
+
# @param [Google::Apis::RequestOptions] options
|
794
|
+
# Request-specific options
|
795
|
+
#
|
796
|
+
# @yield [result, err] Result & error if block supplied
|
797
|
+
# @yieldparam result [Google::Apis::ContentV2::ListAccountTaxResponse] parsed result object
|
798
|
+
# @yieldparam err [StandardError] error object if request failed
|
799
|
+
#
|
800
|
+
# @return [Google::Apis::ContentV2::ListAccountTaxResponse]
|
801
|
+
#
|
802
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
803
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
804
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
805
|
+
def list_account_taxes(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
806
|
+
path = '{merchantId}/accounttax'
|
807
|
+
command = make_simple_command(:get, path, options)
|
808
|
+
command.response_representation = Google::Apis::ContentV2::ListAccountTaxResponse::Representation
|
809
|
+
command.response_class = Google::Apis::ContentV2::ListAccountTaxResponse
|
810
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
811
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
812
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
813
|
+
command.query['fields'] = fields unless fields.nil?
|
814
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
815
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
816
|
+
execute_or_queue_command(command, &block)
|
817
|
+
end
|
818
|
+
|
819
|
+
# Updates the tax settings of the account. This method supports patch semantics.
|
820
|
+
# @param [String] merchant_id
|
821
|
+
# The ID of the managing account.
|
822
|
+
# @param [String] account_id
|
823
|
+
# The ID of the account for which to get/update account tax settings.
|
824
|
+
# @param [Google::Apis::ContentV2::AccountTax] account_tax_object
|
825
|
+
# @param [Boolean] dry_run
|
826
|
+
# Flag to run the request in dry-run mode.
|
827
|
+
# @param [String] fields
|
828
|
+
# Selector specifying which fields to include in a partial response.
|
829
|
+
# @param [String] quota_user
|
830
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
831
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
832
|
+
# Overrides userIp if both are provided.
|
833
|
+
# @param [String] user_ip
|
834
|
+
# IP address of the site where the request originates. Use this if you want to
|
835
|
+
# enforce per-user limits.
|
836
|
+
# @param [Google::Apis::RequestOptions] options
|
837
|
+
# Request-specific options
|
838
|
+
#
|
839
|
+
# @yield [result, err] Result & error if block supplied
|
840
|
+
# @yieldparam result [Google::Apis::ContentV2::AccountTax] parsed result object
|
841
|
+
# @yieldparam err [StandardError] error object if request failed
|
842
|
+
#
|
843
|
+
# @return [Google::Apis::ContentV2::AccountTax]
|
844
|
+
#
|
845
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
846
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
847
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
848
|
+
def patch_account_tax(merchant_id, account_id, account_tax_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
849
|
+
path = '{merchantId}/accounttax/{accountId}'
|
850
|
+
command = make_simple_command(:patch, path, options)
|
851
|
+
command.request_representation = Google::Apis::ContentV2::AccountTax::Representation
|
852
|
+
command.request_object = account_tax_object
|
853
|
+
command.response_representation = Google::Apis::ContentV2::AccountTax::Representation
|
854
|
+
command.response_class = Google::Apis::ContentV2::AccountTax
|
855
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
856
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
857
|
+
command.query['dryRun'] = dry_run unless dry_run.nil?
|
858
|
+
command.query['fields'] = fields unless fields.nil?
|
859
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
860
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
861
|
+
execute_or_queue_command(command, &block)
|
862
|
+
end
|
863
|
+
|
864
|
+
# Updates the tax settings of the account.
|
865
|
+
# @param [String] merchant_id
|
866
|
+
# The ID of the managing account.
|
867
|
+
# @param [String] account_id
|
868
|
+
# The ID of the account for which to get/update account tax settings.
|
869
|
+
# @param [Google::Apis::ContentV2::AccountTax] account_tax_object
|
870
|
+
# @param [Boolean] dry_run
|
871
|
+
# Flag to run the request in dry-run mode.
|
872
|
+
# @param [String] fields
|
873
|
+
# Selector specifying which fields to include in a partial response.
|
874
|
+
# @param [String] quota_user
|
875
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
876
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
877
|
+
# Overrides userIp if both are provided.
|
878
|
+
# @param [String] user_ip
|
879
|
+
# IP address of the site where the request originates. Use this if you want to
|
880
|
+
# enforce per-user limits.
|
881
|
+
# @param [Google::Apis::RequestOptions] options
|
882
|
+
# Request-specific options
|
883
|
+
#
|
884
|
+
# @yield [result, err] Result & error if block supplied
|
885
|
+
# @yieldparam result [Google::Apis::ContentV2::AccountTax] parsed result object
|
886
|
+
# @yieldparam err [StandardError] error object if request failed
|
887
|
+
#
|
888
|
+
# @return [Google::Apis::ContentV2::AccountTax]
|
889
|
+
#
|
890
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
891
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
892
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
893
|
+
def update_account_tax(merchant_id, account_id, account_tax_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
894
|
+
path = '{merchantId}/accounttax/{accountId}'
|
895
|
+
command = make_simple_command(:put, path, options)
|
896
|
+
command.request_representation = Google::Apis::ContentV2::AccountTax::Representation
|
897
|
+
command.request_object = account_tax_object
|
898
|
+
command.response_representation = Google::Apis::ContentV2::AccountTax::Representation
|
899
|
+
command.response_class = Google::Apis::ContentV2::AccountTax
|
900
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
901
|
+
command.params['accountId'] = account_id unless account_id.nil?
|
902
|
+
command.query['dryRun'] = dry_run unless dry_run.nil?
|
903
|
+
command.query['fields'] = fields unless fields.nil?
|
904
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
905
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
906
|
+
execute_or_queue_command(command, &block)
|
907
|
+
end
|
908
|
+
|
909
|
+
#
|
910
|
+
# @param [Google::Apis::ContentV2::BatchDatafeedsRequest] batch_datafeeds_request_object
|
911
|
+
# @param [String] fields
|
912
|
+
# Selector specifying which fields to include in a partial response.
|
913
|
+
# @param [String] quota_user
|
914
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
915
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
916
|
+
# Overrides userIp if both are provided.
|
917
|
+
# @param [String] user_ip
|
918
|
+
# IP address of the site where the request originates. Use this if you want to
|
919
|
+
# enforce per-user limits.
|
920
|
+
# @param [Google::Apis::RequestOptions] options
|
921
|
+
# Request-specific options
|
922
|
+
#
|
923
|
+
# @yield [result, err] Result & error if block supplied
|
924
|
+
# @yieldparam result [Google::Apis::ContentV2::BatchDatafeedsResponse] parsed result object
|
925
|
+
# @yieldparam err [StandardError] error object if request failed
|
926
|
+
#
|
927
|
+
# @return [Google::Apis::ContentV2::BatchDatafeedsResponse]
|
928
|
+
#
|
929
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
930
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
931
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
932
|
+
def batch_datafeed(batch_datafeeds_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
933
|
+
path = 'datafeeds/batch'
|
934
|
+
command = make_simple_command(:post, path, options)
|
935
|
+
command.request_representation = Google::Apis::ContentV2::BatchDatafeedsRequest::Representation
|
936
|
+
command.request_object = batch_datafeeds_request_object
|
937
|
+
command.response_representation = Google::Apis::ContentV2::BatchDatafeedsResponse::Representation
|
938
|
+
command.response_class = Google::Apis::ContentV2::BatchDatafeedsResponse
|
939
|
+
command.query['fields'] = fields unless fields.nil?
|
940
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
941
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
942
|
+
execute_or_queue_command(command, &block)
|
943
|
+
end
|
944
|
+
|
945
|
+
# Deletes a datafeed from your Merchant Center account.
|
946
|
+
# @param [String] merchant_id
|
947
|
+
# @param [String] datafeed_id
|
948
|
+
# @param [String] fields
|
949
|
+
# Selector specifying which fields to include in a partial response.
|
950
|
+
# @param [String] quota_user
|
951
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
952
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
953
|
+
# Overrides userIp if both are provided.
|
954
|
+
# @param [String] user_ip
|
955
|
+
# IP address of the site where the request originates. Use this if you want to
|
956
|
+
# enforce per-user limits.
|
957
|
+
# @param [Google::Apis::RequestOptions] options
|
958
|
+
# Request-specific options
|
959
|
+
#
|
960
|
+
# @yield [result, err] Result & error if block supplied
|
961
|
+
# @yieldparam result [NilClass] No result returned for this method
|
962
|
+
# @yieldparam err [StandardError] error object if request failed
|
963
|
+
#
|
964
|
+
# @return [void]
|
965
|
+
#
|
966
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
967
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
968
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
969
|
+
def delete_datafeed(merchant_id, datafeed_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
970
|
+
path = '{merchantId}/datafeeds/{datafeedId}'
|
971
|
+
command = make_simple_command(:delete, path, options)
|
972
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
973
|
+
command.params['datafeedId'] = datafeed_id unless datafeed_id.nil?
|
974
|
+
command.query['fields'] = fields unless fields.nil?
|
975
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
976
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
977
|
+
execute_or_queue_command(command, &block)
|
978
|
+
end
|
979
|
+
|
980
|
+
# Retrieves a datafeed from your Merchant Center account.
|
981
|
+
# @param [String] merchant_id
|
982
|
+
# @param [String] datafeed_id
|
983
|
+
# @param [String] fields
|
984
|
+
# Selector specifying which fields to include in a partial response.
|
985
|
+
# @param [String] quota_user
|
986
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
987
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
988
|
+
# Overrides userIp if both are provided.
|
989
|
+
# @param [String] user_ip
|
990
|
+
# IP address of the site where the request originates. Use this if you want to
|
991
|
+
# enforce per-user limits.
|
992
|
+
# @param [Google::Apis::RequestOptions] options
|
993
|
+
# Request-specific options
|
994
|
+
#
|
995
|
+
# @yield [result, err] Result & error if block supplied
|
996
|
+
# @yieldparam result [Google::Apis::ContentV2::Datafeed] parsed result object
|
997
|
+
# @yieldparam err [StandardError] error object if request failed
|
998
|
+
#
|
999
|
+
# @return [Google::Apis::ContentV2::Datafeed]
|
1000
|
+
#
|
1001
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1002
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1003
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1004
|
+
def get_datafeed(merchant_id, datafeed_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1005
|
+
path = '{merchantId}/datafeeds/{datafeedId}'
|
1006
|
+
command = make_simple_command(:get, path, options)
|
1007
|
+
command.response_representation = Google::Apis::ContentV2::Datafeed::Representation
|
1008
|
+
command.response_class = Google::Apis::ContentV2::Datafeed
|
1009
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1010
|
+
command.params['datafeedId'] = datafeed_id unless datafeed_id.nil?
|
1011
|
+
command.query['fields'] = fields unless fields.nil?
|
1012
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1013
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1014
|
+
execute_or_queue_command(command, &block)
|
1015
|
+
end
|
1016
|
+
|
1017
|
+
# Registers a datafeed with your Merchant Center account.
|
1018
|
+
# @param [String] merchant_id
|
1019
|
+
# @param [Google::Apis::ContentV2::Datafeed] datafeed_object
|
1020
|
+
# @param [String] fields
|
1021
|
+
# Selector specifying which fields to include in a partial response.
|
1022
|
+
# @param [String] quota_user
|
1023
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1024
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1025
|
+
# Overrides userIp if both are provided.
|
1026
|
+
# @param [String] user_ip
|
1027
|
+
# IP address of the site where the request originates. Use this if you want to
|
1028
|
+
# enforce per-user limits.
|
1029
|
+
# @param [Google::Apis::RequestOptions] options
|
1030
|
+
# Request-specific options
|
1031
|
+
#
|
1032
|
+
# @yield [result, err] Result & error if block supplied
|
1033
|
+
# @yieldparam result [Google::Apis::ContentV2::Datafeed] parsed result object
|
1034
|
+
# @yieldparam err [StandardError] error object if request failed
|
1035
|
+
#
|
1036
|
+
# @return [Google::Apis::ContentV2::Datafeed]
|
1037
|
+
#
|
1038
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1039
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1040
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1041
|
+
def insert_datafeed(merchant_id, datafeed_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1042
|
+
path = '{merchantId}/datafeeds'
|
1043
|
+
command = make_simple_command(:post, path, options)
|
1044
|
+
command.request_representation = Google::Apis::ContentV2::Datafeed::Representation
|
1045
|
+
command.request_object = datafeed_object
|
1046
|
+
command.response_representation = Google::Apis::ContentV2::Datafeed::Representation
|
1047
|
+
command.response_class = Google::Apis::ContentV2::Datafeed
|
1048
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1049
|
+
command.query['fields'] = fields unless fields.nil?
|
1050
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1051
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1052
|
+
execute_or_queue_command(command, &block)
|
1053
|
+
end
|
1054
|
+
|
1055
|
+
# Lists the datafeeds in your Merchant Center account.
|
1056
|
+
# @param [String] merchant_id
|
1057
|
+
# The ID of the managing account.
|
1058
|
+
# @param [Fixnum] max_results
|
1059
|
+
# The maximum number of products to return in the response, used for paging.
|
1060
|
+
# @param [String] page_token
|
1061
|
+
# The token returned by the previous request.
|
1062
|
+
# @param [String] fields
|
1063
|
+
# Selector specifying which fields to include in a partial response.
|
1064
|
+
# @param [String] quota_user
|
1065
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1066
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1067
|
+
# Overrides userIp if both are provided.
|
1068
|
+
# @param [String] user_ip
|
1069
|
+
# IP address of the site where the request originates. Use this if you want to
|
1070
|
+
# enforce per-user limits.
|
1071
|
+
# @param [Google::Apis::RequestOptions] options
|
1072
|
+
# Request-specific options
|
1073
|
+
#
|
1074
|
+
# @yield [result, err] Result & error if block supplied
|
1075
|
+
# @yieldparam result [Google::Apis::ContentV2::ListDatafeedsResponse] parsed result object
|
1076
|
+
# @yieldparam err [StandardError] error object if request failed
|
1077
|
+
#
|
1078
|
+
# @return [Google::Apis::ContentV2::ListDatafeedsResponse]
|
1079
|
+
#
|
1080
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1081
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1082
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1083
|
+
def list_datafeeds(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1084
|
+
path = '{merchantId}/datafeeds'
|
1085
|
+
command = make_simple_command(:get, path, options)
|
1086
|
+
command.response_representation = Google::Apis::ContentV2::ListDatafeedsResponse::Representation
|
1087
|
+
command.response_class = Google::Apis::ContentV2::ListDatafeedsResponse
|
1088
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1089
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1090
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1091
|
+
command.query['fields'] = fields unless fields.nil?
|
1092
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1093
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1094
|
+
execute_or_queue_command(command, &block)
|
1095
|
+
end
|
1096
|
+
|
1097
|
+
# Updates a datafeed of your Merchant Center account. This method supports patch
|
1098
|
+
# semantics.
|
1099
|
+
# @param [String] merchant_id
|
1100
|
+
# @param [String] datafeed_id
|
1101
|
+
# @param [Google::Apis::ContentV2::Datafeed] datafeed_object
|
1102
|
+
# @param [String] fields
|
1103
|
+
# Selector specifying which fields to include in a partial response.
|
1104
|
+
# @param [String] quota_user
|
1105
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1106
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1107
|
+
# Overrides userIp if both are provided.
|
1108
|
+
# @param [String] user_ip
|
1109
|
+
# IP address of the site where the request originates. Use this if you want to
|
1110
|
+
# enforce per-user limits.
|
1111
|
+
# @param [Google::Apis::RequestOptions] options
|
1112
|
+
# Request-specific options
|
1113
|
+
#
|
1114
|
+
# @yield [result, err] Result & error if block supplied
|
1115
|
+
# @yieldparam result [Google::Apis::ContentV2::Datafeed] parsed result object
|
1116
|
+
# @yieldparam err [StandardError] error object if request failed
|
1117
|
+
#
|
1118
|
+
# @return [Google::Apis::ContentV2::Datafeed]
|
1119
|
+
#
|
1120
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1121
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1122
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1123
|
+
def patch_datafeed(merchant_id, datafeed_id, datafeed_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1124
|
+
path = '{merchantId}/datafeeds/{datafeedId}'
|
1125
|
+
command = make_simple_command(:patch, path, options)
|
1126
|
+
command.request_representation = Google::Apis::ContentV2::Datafeed::Representation
|
1127
|
+
command.request_object = datafeed_object
|
1128
|
+
command.response_representation = Google::Apis::ContentV2::Datafeed::Representation
|
1129
|
+
command.response_class = Google::Apis::ContentV2::Datafeed
|
1130
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1131
|
+
command.params['datafeedId'] = datafeed_id unless datafeed_id.nil?
|
1132
|
+
command.query['fields'] = fields unless fields.nil?
|
1133
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1134
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1135
|
+
execute_or_queue_command(command, &block)
|
1136
|
+
end
|
1137
|
+
|
1138
|
+
# Updates a datafeed of your Merchant Center account.
|
1139
|
+
# @param [String] merchant_id
|
1140
|
+
# @param [String] datafeed_id
|
1141
|
+
# @param [Google::Apis::ContentV2::Datafeed] datafeed_object
|
1142
|
+
# @param [String] fields
|
1143
|
+
# Selector specifying which fields to include in a partial response.
|
1144
|
+
# @param [String] quota_user
|
1145
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1146
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1147
|
+
# Overrides userIp if both are provided.
|
1148
|
+
# @param [String] user_ip
|
1149
|
+
# IP address of the site where the request originates. Use this if you want to
|
1150
|
+
# enforce per-user limits.
|
1151
|
+
# @param [Google::Apis::RequestOptions] options
|
1152
|
+
# Request-specific options
|
1153
|
+
#
|
1154
|
+
# @yield [result, err] Result & error if block supplied
|
1155
|
+
# @yieldparam result [Google::Apis::ContentV2::Datafeed] parsed result object
|
1156
|
+
# @yieldparam err [StandardError] error object if request failed
|
1157
|
+
#
|
1158
|
+
# @return [Google::Apis::ContentV2::Datafeed]
|
1159
|
+
#
|
1160
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1161
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1162
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1163
|
+
def update_datafeed(merchant_id, datafeed_id, datafeed_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1164
|
+
path = '{merchantId}/datafeeds/{datafeedId}'
|
1165
|
+
command = make_simple_command(:put, path, options)
|
1166
|
+
command.request_representation = Google::Apis::ContentV2::Datafeed::Representation
|
1167
|
+
command.request_object = datafeed_object
|
1168
|
+
command.response_representation = Google::Apis::ContentV2::Datafeed::Representation
|
1169
|
+
command.response_class = Google::Apis::ContentV2::Datafeed
|
1170
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1171
|
+
command.params['datafeedId'] = datafeed_id unless datafeed_id.nil?
|
1172
|
+
command.query['fields'] = fields unless fields.nil?
|
1173
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1174
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1175
|
+
execute_or_queue_command(command, &block)
|
1176
|
+
end
|
1177
|
+
|
1178
|
+
#
|
1179
|
+
# @param [Google::Apis::ContentV2::BatchDatafeedStatusesRequest] batch_datafeed_statuses_request_object
|
1180
|
+
# @param [String] fields
|
1181
|
+
# Selector specifying which fields to include in a partial response.
|
1182
|
+
# @param [String] quota_user
|
1183
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1184
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1185
|
+
# Overrides userIp if both are provided.
|
1186
|
+
# @param [String] user_ip
|
1187
|
+
# IP address of the site where the request originates. Use this if you want to
|
1188
|
+
# enforce per-user limits.
|
1189
|
+
# @param [Google::Apis::RequestOptions] options
|
1190
|
+
# Request-specific options
|
1191
|
+
#
|
1192
|
+
# @yield [result, err] Result & error if block supplied
|
1193
|
+
# @yieldparam result [Google::Apis::ContentV2::BatchDatafeedStatusesResponse] parsed result object
|
1194
|
+
# @yieldparam err [StandardError] error object if request failed
|
1195
|
+
#
|
1196
|
+
# @return [Google::Apis::ContentV2::BatchDatafeedStatusesResponse]
|
1197
|
+
#
|
1198
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1199
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1200
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1201
|
+
def batch_datafeed_status(batch_datafeed_statuses_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1202
|
+
path = 'datafeedstatuses/batch'
|
1203
|
+
command = make_simple_command(:post, path, options)
|
1204
|
+
command.request_representation = Google::Apis::ContentV2::BatchDatafeedStatusesRequest::Representation
|
1205
|
+
command.request_object = batch_datafeed_statuses_request_object
|
1206
|
+
command.response_representation = Google::Apis::ContentV2::BatchDatafeedStatusesResponse::Representation
|
1207
|
+
command.response_class = Google::Apis::ContentV2::BatchDatafeedStatusesResponse
|
1208
|
+
command.query['fields'] = fields unless fields.nil?
|
1209
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1210
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1211
|
+
execute_or_queue_command(command, &block)
|
1212
|
+
end
|
1213
|
+
|
1214
|
+
# Retrieves the status of a datafeed from your Merchant Center account.
|
1215
|
+
# @param [String] merchant_id
|
1216
|
+
# @param [String] datafeed_id
|
1217
|
+
# @param [String] fields
|
1218
|
+
# Selector specifying which fields to include in a partial response.
|
1219
|
+
# @param [String] quota_user
|
1220
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1221
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1222
|
+
# Overrides userIp if both are provided.
|
1223
|
+
# @param [String] user_ip
|
1224
|
+
# IP address of the site where the request originates. Use this if you want to
|
1225
|
+
# enforce per-user limits.
|
1226
|
+
# @param [Google::Apis::RequestOptions] options
|
1227
|
+
# Request-specific options
|
1228
|
+
#
|
1229
|
+
# @yield [result, err] Result & error if block supplied
|
1230
|
+
# @yieldparam result [Google::Apis::ContentV2::DatafeedStatus] parsed result object
|
1231
|
+
# @yieldparam err [StandardError] error object if request failed
|
1232
|
+
#
|
1233
|
+
# @return [Google::Apis::ContentV2::DatafeedStatus]
|
1234
|
+
#
|
1235
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1236
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1237
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1238
|
+
def get_datafeed_status(merchant_id, datafeed_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1239
|
+
path = '{merchantId}/datafeedstatuses/{datafeedId}'
|
1240
|
+
command = make_simple_command(:get, path, options)
|
1241
|
+
command.response_representation = Google::Apis::ContentV2::DatafeedStatus::Representation
|
1242
|
+
command.response_class = Google::Apis::ContentV2::DatafeedStatus
|
1243
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1244
|
+
command.params['datafeedId'] = datafeed_id unless datafeed_id.nil?
|
1245
|
+
command.query['fields'] = fields unless fields.nil?
|
1246
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1247
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1248
|
+
execute_or_queue_command(command, &block)
|
1249
|
+
end
|
1250
|
+
|
1251
|
+
# Lists the statuses of the datafeeds in your Merchant Center account.
|
1252
|
+
# @param [String] merchant_id
|
1253
|
+
# The ID of the managing account.
|
1254
|
+
# @param [Fixnum] max_results
|
1255
|
+
# The maximum number of products to return in the response, used for paging.
|
1256
|
+
# @param [String] page_token
|
1257
|
+
# The token returned by the previous request.
|
1258
|
+
# @param [String] fields
|
1259
|
+
# Selector specifying which fields to include in a partial response.
|
1260
|
+
# @param [String] quota_user
|
1261
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1262
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1263
|
+
# Overrides userIp if both are provided.
|
1264
|
+
# @param [String] user_ip
|
1265
|
+
# IP address of the site where the request originates. Use this if you want to
|
1266
|
+
# enforce per-user limits.
|
1267
|
+
# @param [Google::Apis::RequestOptions] options
|
1268
|
+
# Request-specific options
|
1269
|
+
#
|
1270
|
+
# @yield [result, err] Result & error if block supplied
|
1271
|
+
# @yieldparam result [Google::Apis::ContentV2::ListDatafeedStatusesResponse] parsed result object
|
1272
|
+
# @yieldparam err [StandardError] error object if request failed
|
1273
|
+
#
|
1274
|
+
# @return [Google::Apis::ContentV2::ListDatafeedStatusesResponse]
|
1275
|
+
#
|
1276
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1277
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1278
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1279
|
+
def list_datafeed_statuses(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1280
|
+
path = '{merchantId}/datafeedstatuses'
|
1281
|
+
command = make_simple_command(:get, path, options)
|
1282
|
+
command.response_representation = Google::Apis::ContentV2::ListDatafeedStatusesResponse::Representation
|
1283
|
+
command.response_class = Google::Apis::ContentV2::ListDatafeedStatusesResponse
|
1284
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1285
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1286
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1287
|
+
command.query['fields'] = fields unless fields.nil?
|
1288
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1289
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1290
|
+
execute_or_queue_command(command, &block)
|
1291
|
+
end
|
1292
|
+
|
1293
|
+
# Updates price and availability for multiple products or stores in a single
|
1294
|
+
# request.
|
1295
|
+
# @param [Google::Apis::ContentV2::BatchInventoryRequest] batch_inventory_request_object
|
1296
|
+
# @param [String] fields
|
1297
|
+
# Selector specifying which fields to include in a partial response.
|
1298
|
+
# @param [String] quota_user
|
1299
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1300
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1301
|
+
# Overrides userIp if both are provided.
|
1302
|
+
# @param [String] user_ip
|
1303
|
+
# IP address of the site where the request originates. Use this if you want to
|
1304
|
+
# enforce per-user limits.
|
1305
|
+
# @param [Google::Apis::RequestOptions] options
|
1306
|
+
# Request-specific options
|
1307
|
+
#
|
1308
|
+
# @yield [result, err] Result & error if block supplied
|
1309
|
+
# @yieldparam result [Google::Apis::ContentV2::BatchInventoryResponse] parsed result object
|
1310
|
+
# @yieldparam err [StandardError] error object if request failed
|
1311
|
+
#
|
1312
|
+
# @return [Google::Apis::ContentV2::BatchInventoryResponse]
|
1313
|
+
#
|
1314
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1315
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1316
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1317
|
+
def batch_inventory(batch_inventory_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1318
|
+
path = 'inventory/batch'
|
1319
|
+
command = make_simple_command(:post, path, options)
|
1320
|
+
command.request_representation = Google::Apis::ContentV2::BatchInventoryRequest::Representation
|
1321
|
+
command.request_object = batch_inventory_request_object
|
1322
|
+
command.response_representation = Google::Apis::ContentV2::BatchInventoryResponse::Representation
|
1323
|
+
command.response_class = Google::Apis::ContentV2::BatchInventoryResponse
|
1324
|
+
command.query['fields'] = fields unless fields.nil?
|
1325
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1326
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1327
|
+
execute_or_queue_command(command, &block)
|
1328
|
+
end
|
1329
|
+
|
1330
|
+
# Updates price and availability of a product in your Merchant Center account.
|
1331
|
+
# @param [String] merchant_id
|
1332
|
+
# The ID of the managing account.
|
1333
|
+
# @param [String] store_code
|
1334
|
+
# The code of the store for which to update price and availability. Use online
|
1335
|
+
# to update price and availability of an online product.
|
1336
|
+
# @param [String] product_id
|
1337
|
+
# The ID of the product for which to update price and availability.
|
1338
|
+
# @param [Google::Apis::ContentV2::SetInventoryRequest] set_inventory_request_object
|
1339
|
+
# @param [String] fields
|
1340
|
+
# Selector specifying which fields to include in a partial response.
|
1341
|
+
# @param [String] quota_user
|
1342
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1343
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1344
|
+
# Overrides userIp if both are provided.
|
1345
|
+
# @param [String] user_ip
|
1346
|
+
# IP address of the site where the request originates. Use this if you want to
|
1347
|
+
# enforce per-user limits.
|
1348
|
+
# @param [Google::Apis::RequestOptions] options
|
1349
|
+
# Request-specific options
|
1350
|
+
#
|
1351
|
+
# @yield [result, err] Result & error if block supplied
|
1352
|
+
# @yieldparam result [Google::Apis::ContentV2::SetInventoryResponse] parsed result object
|
1353
|
+
# @yieldparam err [StandardError] error object if request failed
|
1354
|
+
#
|
1355
|
+
# @return [Google::Apis::ContentV2::SetInventoryResponse]
|
1356
|
+
#
|
1357
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1358
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1359
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1360
|
+
def set_inventory(merchant_id, store_code, product_id, set_inventory_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1361
|
+
path = '{merchantId}/inventory/{storeCode}/products/{productId}'
|
1362
|
+
command = make_simple_command(:post, path, options)
|
1363
|
+
command.request_representation = Google::Apis::ContentV2::SetInventoryRequest::Representation
|
1364
|
+
command.request_object = set_inventory_request_object
|
1365
|
+
command.response_representation = Google::Apis::ContentV2::SetInventoryResponse::Representation
|
1366
|
+
command.response_class = Google::Apis::ContentV2::SetInventoryResponse
|
1367
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1368
|
+
command.params['storeCode'] = store_code unless store_code.nil?
|
1369
|
+
command.params['productId'] = product_id unless product_id.nil?
|
1370
|
+
command.query['fields'] = fields unless fields.nil?
|
1371
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1372
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1373
|
+
execute_or_queue_command(command, &block)
|
1374
|
+
end
|
1375
|
+
|
1376
|
+
# Retrieves, inserts, and deletes multiple products in a single request.
|
1377
|
+
# @param [Google::Apis::ContentV2::BatchProductsRequest] batch_products_request_object
|
1378
|
+
# @param [Boolean] dry_run
|
1379
|
+
# Flag to run the request in dry-run mode.
|
1380
|
+
# @param [String] fields
|
1381
|
+
# Selector specifying which fields to include in a partial response.
|
1382
|
+
# @param [String] quota_user
|
1383
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1384
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1385
|
+
# Overrides userIp if both are provided.
|
1386
|
+
# @param [String] user_ip
|
1387
|
+
# IP address of the site where the request originates. Use this if you want to
|
1388
|
+
# enforce per-user limits.
|
1389
|
+
# @param [Google::Apis::RequestOptions] options
|
1390
|
+
# Request-specific options
|
1391
|
+
#
|
1392
|
+
# @yield [result, err] Result & error if block supplied
|
1393
|
+
# @yieldparam result [Google::Apis::ContentV2::BatchProductsResponse] parsed result object
|
1394
|
+
# @yieldparam err [StandardError] error object if request failed
|
1395
|
+
#
|
1396
|
+
# @return [Google::Apis::ContentV2::BatchProductsResponse]
|
1397
|
+
#
|
1398
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1399
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1400
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1401
|
+
def batch_product(batch_products_request_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1402
|
+
path = 'products/batch'
|
1403
|
+
command = make_simple_command(:post, path, options)
|
1404
|
+
command.request_representation = Google::Apis::ContentV2::BatchProductsRequest::Representation
|
1405
|
+
command.request_object = batch_products_request_object
|
1406
|
+
command.response_representation = Google::Apis::ContentV2::BatchProductsResponse::Representation
|
1407
|
+
command.response_class = Google::Apis::ContentV2::BatchProductsResponse
|
1408
|
+
command.query['dryRun'] = dry_run unless dry_run.nil?
|
1409
|
+
command.query['fields'] = fields unless fields.nil?
|
1410
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1411
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1412
|
+
execute_or_queue_command(command, &block)
|
1413
|
+
end
|
1414
|
+
|
1415
|
+
# Deletes a product from your Merchant Center account.
|
1416
|
+
# @param [String] merchant_id
|
1417
|
+
# The ID of the managing account.
|
1418
|
+
# @param [String] product_id
|
1419
|
+
# The ID of the product.
|
1420
|
+
# @param [Boolean] dry_run
|
1421
|
+
# Flag to run the request in dry-run mode.
|
1422
|
+
# @param [String] fields
|
1423
|
+
# Selector specifying which fields to include in a partial response.
|
1424
|
+
# @param [String] quota_user
|
1425
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1426
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1427
|
+
# Overrides userIp if both are provided.
|
1428
|
+
# @param [String] user_ip
|
1429
|
+
# IP address of the site where the request originates. Use this if you want to
|
1430
|
+
# enforce per-user limits.
|
1431
|
+
# @param [Google::Apis::RequestOptions] options
|
1432
|
+
# Request-specific options
|
1433
|
+
#
|
1434
|
+
# @yield [result, err] Result & error if block supplied
|
1435
|
+
# @yieldparam result [NilClass] No result returned for this method
|
1436
|
+
# @yieldparam err [StandardError] error object if request failed
|
1437
|
+
#
|
1438
|
+
# @return [void]
|
1439
|
+
#
|
1440
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1441
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1442
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1443
|
+
def delete_product(merchant_id, product_id, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1444
|
+
path = '{merchantId}/products/{productId}'
|
1445
|
+
command = make_simple_command(:delete, path, options)
|
1446
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1447
|
+
command.params['productId'] = product_id unless product_id.nil?
|
1448
|
+
command.query['dryRun'] = dry_run unless dry_run.nil?
|
1449
|
+
command.query['fields'] = fields unless fields.nil?
|
1450
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1451
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1452
|
+
execute_or_queue_command(command, &block)
|
1453
|
+
end
|
1454
|
+
|
1455
|
+
# Retrieves a product from your Merchant Center account.
|
1456
|
+
# @param [String] merchant_id
|
1457
|
+
# The ID of the managing account.
|
1458
|
+
# @param [String] product_id
|
1459
|
+
# The ID of the product.
|
1460
|
+
# @param [String] fields
|
1461
|
+
# Selector specifying which fields to include in a partial response.
|
1462
|
+
# @param [String] quota_user
|
1463
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1464
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1465
|
+
# Overrides userIp if both are provided.
|
1466
|
+
# @param [String] user_ip
|
1467
|
+
# IP address of the site where the request originates. Use this if you want to
|
1468
|
+
# enforce per-user limits.
|
1469
|
+
# @param [Google::Apis::RequestOptions] options
|
1470
|
+
# Request-specific options
|
1471
|
+
#
|
1472
|
+
# @yield [result, err] Result & error if block supplied
|
1473
|
+
# @yieldparam result [Google::Apis::ContentV2::Product] parsed result object
|
1474
|
+
# @yieldparam err [StandardError] error object if request failed
|
1475
|
+
#
|
1476
|
+
# @return [Google::Apis::ContentV2::Product]
|
1477
|
+
#
|
1478
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1479
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1480
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1481
|
+
def get_product(merchant_id, product_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1482
|
+
path = '{merchantId}/products/{productId}'
|
1483
|
+
command = make_simple_command(:get, path, options)
|
1484
|
+
command.response_representation = Google::Apis::ContentV2::Product::Representation
|
1485
|
+
command.response_class = Google::Apis::ContentV2::Product
|
1486
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1487
|
+
command.params['productId'] = product_id unless product_id.nil?
|
1488
|
+
command.query['fields'] = fields unless fields.nil?
|
1489
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1490
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1491
|
+
execute_or_queue_command(command, &block)
|
1492
|
+
end
|
1493
|
+
|
1494
|
+
# Uploads a product to your Merchant Center account.
|
1495
|
+
# @param [String] merchant_id
|
1496
|
+
# The ID of the managing account.
|
1497
|
+
# @param [Google::Apis::ContentV2::Product] product_object
|
1498
|
+
# @param [Boolean] dry_run
|
1499
|
+
# Flag to run the request in dry-run mode.
|
1500
|
+
# @param [String] fields
|
1501
|
+
# Selector specifying which fields to include in a partial response.
|
1502
|
+
# @param [String] quota_user
|
1503
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1504
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1505
|
+
# Overrides userIp if both are provided.
|
1506
|
+
# @param [String] user_ip
|
1507
|
+
# IP address of the site where the request originates. Use this if you want to
|
1508
|
+
# enforce per-user limits.
|
1509
|
+
# @param [Google::Apis::RequestOptions] options
|
1510
|
+
# Request-specific options
|
1511
|
+
#
|
1512
|
+
# @yield [result, err] Result & error if block supplied
|
1513
|
+
# @yieldparam result [Google::Apis::ContentV2::Product] parsed result object
|
1514
|
+
# @yieldparam err [StandardError] error object if request failed
|
1515
|
+
#
|
1516
|
+
# @return [Google::Apis::ContentV2::Product]
|
1517
|
+
#
|
1518
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1519
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1520
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1521
|
+
def insert_product(merchant_id, product_object = nil, dry_run: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1522
|
+
path = '{merchantId}/products'
|
1523
|
+
command = make_simple_command(:post, path, options)
|
1524
|
+
command.request_representation = Google::Apis::ContentV2::Product::Representation
|
1525
|
+
command.request_object = product_object
|
1526
|
+
command.response_representation = Google::Apis::ContentV2::Product::Representation
|
1527
|
+
command.response_class = Google::Apis::ContentV2::Product
|
1528
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1529
|
+
command.query['dryRun'] = dry_run unless dry_run.nil?
|
1530
|
+
command.query['fields'] = fields unless fields.nil?
|
1531
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1532
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1533
|
+
execute_or_queue_command(command, &block)
|
1534
|
+
end
|
1535
|
+
|
1536
|
+
# Lists the products in your Merchant Center account.
|
1537
|
+
# @param [String] merchant_id
|
1538
|
+
# The ID of the managing account.
|
1539
|
+
# @param [Fixnum] max_results
|
1540
|
+
# The maximum number of products to return in the response, used for paging.
|
1541
|
+
# @param [String] page_token
|
1542
|
+
# The token returned by the previous request.
|
1543
|
+
# @param [String] fields
|
1544
|
+
# Selector specifying which fields to include in a partial response.
|
1545
|
+
# @param [String] quota_user
|
1546
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1547
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1548
|
+
# Overrides userIp if both are provided.
|
1549
|
+
# @param [String] user_ip
|
1550
|
+
# IP address of the site where the request originates. Use this if you want to
|
1551
|
+
# enforce per-user limits.
|
1552
|
+
# @param [Google::Apis::RequestOptions] options
|
1553
|
+
# Request-specific options
|
1554
|
+
#
|
1555
|
+
# @yield [result, err] Result & error if block supplied
|
1556
|
+
# @yieldparam result [Google::Apis::ContentV2::ListProductsResponse] parsed result object
|
1557
|
+
# @yieldparam err [StandardError] error object if request failed
|
1558
|
+
#
|
1559
|
+
# @return [Google::Apis::ContentV2::ListProductsResponse]
|
1560
|
+
#
|
1561
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1562
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1563
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1564
|
+
def list_products(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1565
|
+
path = '{merchantId}/products'
|
1566
|
+
command = make_simple_command(:get, path, options)
|
1567
|
+
command.response_representation = Google::Apis::ContentV2::ListProductsResponse::Representation
|
1568
|
+
command.response_class = Google::Apis::ContentV2::ListProductsResponse
|
1569
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1570
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1571
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1572
|
+
command.query['fields'] = fields unless fields.nil?
|
1573
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1574
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1575
|
+
execute_or_queue_command(command, &block)
|
1576
|
+
end
|
1577
|
+
|
1578
|
+
# Gets the statuses of multiple products in a single request.
|
1579
|
+
# @param [Google::Apis::ContentV2::BatchProductStatusesRequest] batch_product_statuses_request_object
|
1580
|
+
# @param [String] fields
|
1581
|
+
# Selector specifying which fields to include in a partial response.
|
1582
|
+
# @param [String] quota_user
|
1583
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1584
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1585
|
+
# Overrides userIp if both are provided.
|
1586
|
+
# @param [String] user_ip
|
1587
|
+
# IP address of the site where the request originates. Use this if you want to
|
1588
|
+
# enforce per-user limits.
|
1589
|
+
# @param [Google::Apis::RequestOptions] options
|
1590
|
+
# Request-specific options
|
1591
|
+
#
|
1592
|
+
# @yield [result, err] Result & error if block supplied
|
1593
|
+
# @yieldparam result [Google::Apis::ContentV2::BatchProductStatusesResponse] parsed result object
|
1594
|
+
# @yieldparam err [StandardError] error object if request failed
|
1595
|
+
#
|
1596
|
+
# @return [Google::Apis::ContentV2::BatchProductStatusesResponse]
|
1597
|
+
#
|
1598
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1599
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1600
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1601
|
+
def batch_product_status(batch_product_statuses_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1602
|
+
path = 'productstatuses/batch'
|
1603
|
+
command = make_simple_command(:post, path, options)
|
1604
|
+
command.request_representation = Google::Apis::ContentV2::BatchProductStatusesRequest::Representation
|
1605
|
+
command.request_object = batch_product_statuses_request_object
|
1606
|
+
command.response_representation = Google::Apis::ContentV2::BatchProductStatusesResponse::Representation
|
1607
|
+
command.response_class = Google::Apis::ContentV2::BatchProductStatusesResponse
|
1608
|
+
command.query['fields'] = fields unless fields.nil?
|
1609
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1610
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1611
|
+
execute_or_queue_command(command, &block)
|
1612
|
+
end
|
1613
|
+
|
1614
|
+
# Gets the status of a product from your Merchant Center account.
|
1615
|
+
# @param [String] merchant_id
|
1616
|
+
# The ID of the managing account.
|
1617
|
+
# @param [String] product_id
|
1618
|
+
# The ID of the product.
|
1619
|
+
# @param [String] fields
|
1620
|
+
# Selector specifying which fields to include in a partial response.
|
1621
|
+
# @param [String] quota_user
|
1622
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1623
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1624
|
+
# Overrides userIp if both are provided.
|
1625
|
+
# @param [String] user_ip
|
1626
|
+
# IP address of the site where the request originates. Use this if you want to
|
1627
|
+
# enforce per-user limits.
|
1628
|
+
# @param [Google::Apis::RequestOptions] options
|
1629
|
+
# Request-specific options
|
1630
|
+
#
|
1631
|
+
# @yield [result, err] Result & error if block supplied
|
1632
|
+
# @yieldparam result [Google::Apis::ContentV2::ProductStatus] parsed result object
|
1633
|
+
# @yieldparam err [StandardError] error object if request failed
|
1634
|
+
#
|
1635
|
+
# @return [Google::Apis::ContentV2::ProductStatus]
|
1636
|
+
#
|
1637
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1638
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1639
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1640
|
+
def get_product_status(merchant_id, product_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1641
|
+
path = '{merchantId}/productstatuses/{productId}'
|
1642
|
+
command = make_simple_command(:get, path, options)
|
1643
|
+
command.response_representation = Google::Apis::ContentV2::ProductStatus::Representation
|
1644
|
+
command.response_class = Google::Apis::ContentV2::ProductStatus
|
1645
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1646
|
+
command.params['productId'] = product_id unless product_id.nil?
|
1647
|
+
command.query['fields'] = fields unless fields.nil?
|
1648
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1649
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1650
|
+
execute_or_queue_command(command, &block)
|
1651
|
+
end
|
1652
|
+
|
1653
|
+
# Lists the statuses of the products in your Merchant Center account.
|
1654
|
+
# @param [String] merchant_id
|
1655
|
+
# The ID of the managing account.
|
1656
|
+
# @param [Fixnum] max_results
|
1657
|
+
# The maximum number of product statuses to return in the response, used for
|
1658
|
+
# paging.
|
1659
|
+
# @param [String] page_token
|
1660
|
+
# The token returned by the previous request.
|
1661
|
+
# @param [String] fields
|
1662
|
+
# Selector specifying which fields to include in a partial response.
|
1663
|
+
# @param [String] quota_user
|
1664
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
1665
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
1666
|
+
# Overrides userIp if both are provided.
|
1667
|
+
# @param [String] user_ip
|
1668
|
+
# IP address of the site where the request originates. Use this if you want to
|
1669
|
+
# enforce per-user limits.
|
1670
|
+
# @param [Google::Apis::RequestOptions] options
|
1671
|
+
# Request-specific options
|
1672
|
+
#
|
1673
|
+
# @yield [result, err] Result & error if block supplied
|
1674
|
+
# @yieldparam result [Google::Apis::ContentV2::ListProductStatusesResponse] parsed result object
|
1675
|
+
# @yieldparam err [StandardError] error object if request failed
|
1676
|
+
#
|
1677
|
+
# @return [Google::Apis::ContentV2::ListProductStatusesResponse]
|
1678
|
+
#
|
1679
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
1680
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
1681
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
1682
|
+
def list_product_statuses(merchant_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
|
1683
|
+
path = '{merchantId}/productstatuses'
|
1684
|
+
command = make_simple_command(:get, path, options)
|
1685
|
+
command.response_representation = Google::Apis::ContentV2::ListProductStatusesResponse::Representation
|
1686
|
+
command.response_class = Google::Apis::ContentV2::ListProductStatusesResponse
|
1687
|
+
command.params['merchantId'] = merchant_id unless merchant_id.nil?
|
1688
|
+
command.query['maxResults'] = max_results unless max_results.nil?
|
1689
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
1690
|
+
command.query['fields'] = fields unless fields.nil?
|
1691
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1692
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1693
|
+
execute_or_queue_command(command, &block)
|
1694
|
+
end
|
1695
|
+
|
1696
|
+
protected
|
1697
|
+
|
1698
|
+
def apply_command_defaults(command)
|
1699
|
+
command.query['key'] = key unless key.nil?
|
1700
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
1701
|
+
command.query['userIp'] = user_ip unless user_ip.nil?
|
1702
|
+
end
|
1703
|
+
end
|
1704
|
+
end
|
1705
|
+
end
|
1706
|
+
end
|