google-apis-content_v2_1 0.1.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -453,6 +453,40 @@ module Google
453
453
  execute_or_queue_command(command, &block)
454
454
  end
455
455
 
456
+ # Uploads credentials for the Merchant Center account. If credentials already
457
+ # exist for this Merchant Center account and purpose, this method updates them.
458
+ # @param [Fixnum] account_id
459
+ # Required. The merchant id of the account these credentials belong to.
460
+ # @param [Google::Apis::ContentV2_1::AccountCredentials] account_credentials_object
461
+ # @param [String] fields
462
+ # Selector specifying which fields to include in a partial response.
463
+ # @param [String] quota_user
464
+ # Available to use for quota purposes for server-side applications. Can be any
465
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
466
+ # @param [Google::Apis::RequestOptions] options
467
+ # Request-specific options
468
+ #
469
+ # @yield [result, err] Result & error if block supplied
470
+ # @yieldparam result [Google::Apis::ContentV2_1::AccountCredentials] parsed result object
471
+ # @yieldparam err [StandardError] error object if request failed
472
+ #
473
+ # @return [Google::Apis::ContentV2_1::AccountCredentials]
474
+ #
475
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
476
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
477
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
478
+ def create_account_credential(account_id, account_credentials_object = nil, fields: nil, quota_user: nil, options: nil, &block)
479
+ command = make_simple_command(:post, 'content/v2.1/accounts/{accountId}/credentials', options)
480
+ command.request_representation = Google::Apis::ContentV2_1::AccountCredentials::Representation
481
+ command.request_object = account_credentials_object
482
+ command.response_representation = Google::Apis::ContentV2_1::AccountCredentials::Representation
483
+ command.response_class = Google::Apis::ContentV2_1::AccountCredentials
484
+ command.params['accountId'] = account_id unless account_id.nil?
485
+ command.query['fields'] = fields unless fields.nil?
486
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
487
+ execute_or_queue_command(command, &block)
488
+ end
489
+
456
490
  # Creates a new label, not assigned to any account.
457
491
  # @param [Fixnum] account_id
458
492
  # Required. The id of the account this label belongs to.
@@ -594,6 +628,140 @@ module Google
594
628
  execute_or_queue_command(command, &block)
595
629
  end
596
630
 
631
+ # Links return carrier to a merchant account.
632
+ # @param [Fixnum] account_id
633
+ # Required. The Merchant Center Account Id under which the Return Carrier is to
634
+ # be linked.
635
+ # @param [Google::Apis::ContentV2_1::AccountReturnCarrier] account_return_carrier_object
636
+ # @param [String] fields
637
+ # Selector specifying which fields to include in a partial response.
638
+ # @param [String] quota_user
639
+ # Available to use for quota purposes for server-side applications. Can be any
640
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
641
+ # @param [Google::Apis::RequestOptions] options
642
+ # Request-specific options
643
+ #
644
+ # @yield [result, err] Result & error if block supplied
645
+ # @yieldparam result [Google::Apis::ContentV2_1::AccountReturnCarrier] parsed result object
646
+ # @yieldparam err [StandardError] error object if request failed
647
+ #
648
+ # @return [Google::Apis::ContentV2_1::AccountReturnCarrier]
649
+ #
650
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
651
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
652
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
653
+ def create_account_returncarrier(account_id, account_return_carrier_object = nil, fields: nil, quota_user: nil, options: nil, &block)
654
+ command = make_simple_command(:post, 'content/v2.1/accounts/{accountId}/returncarrier', options)
655
+ command.request_representation = Google::Apis::ContentV2_1::AccountReturnCarrier::Representation
656
+ command.request_object = account_return_carrier_object
657
+ command.response_representation = Google::Apis::ContentV2_1::AccountReturnCarrier::Representation
658
+ command.response_class = Google::Apis::ContentV2_1::AccountReturnCarrier
659
+ command.params['accountId'] = account_id unless account_id.nil?
660
+ command.query['fields'] = fields unless fields.nil?
661
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
662
+ execute_or_queue_command(command, &block)
663
+ end
664
+
665
+ # Delete a return carrier in the merchant account.
666
+ # @param [Fixnum] account_id
667
+ # Required. The Merchant Center Account Id under which the Return Carrier is to
668
+ # be linked.
669
+ # @param [Fixnum] carrier_account_id
670
+ # Required. The Google-provided unique carrier ID, used to update the resource.
671
+ # @param [String] fields
672
+ # Selector specifying which fields to include in a partial response.
673
+ # @param [String] quota_user
674
+ # Available to use for quota purposes for server-side applications. Can be any
675
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
676
+ # @param [Google::Apis::RequestOptions] options
677
+ # Request-specific options
678
+ #
679
+ # @yield [result, err] Result & error if block supplied
680
+ # @yieldparam result [NilClass] No result returned for this method
681
+ # @yieldparam err [StandardError] error object if request failed
682
+ #
683
+ # @return [void]
684
+ #
685
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
686
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
687
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
688
+ def delete_account_returncarrier(account_id, carrier_account_id, fields: nil, quota_user: nil, options: nil, &block)
689
+ command = make_simple_command(:delete, 'content/v2.1/accounts/{accountId}/returncarrier/{carrierAccountId}', options)
690
+ command.params['accountId'] = account_id unless account_id.nil?
691
+ command.params['carrierAccountId'] = carrier_account_id unless carrier_account_id.nil?
692
+ command.query['fields'] = fields unless fields.nil?
693
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
694
+ execute_or_queue_command(command, &block)
695
+ end
696
+
697
+ # Lists available return carriers in the merchant account.
698
+ # @param [Fixnum] account_id
699
+ # Required. The Merchant Center Account Id under which the Return Carrier is to
700
+ # be linked.
701
+ # @param [String] fields
702
+ # Selector specifying which fields to include in a partial response.
703
+ # @param [String] quota_user
704
+ # Available to use for quota purposes for server-side applications. Can be any
705
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
706
+ # @param [Google::Apis::RequestOptions] options
707
+ # Request-specific options
708
+ #
709
+ # @yield [result, err] Result & error if block supplied
710
+ # @yieldparam result [Google::Apis::ContentV2_1::ListAccountReturnCarrierResponse] parsed result object
711
+ # @yieldparam err [StandardError] error object if request failed
712
+ #
713
+ # @return [Google::Apis::ContentV2_1::ListAccountReturnCarrierResponse]
714
+ #
715
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
716
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
717
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
718
+ def list_account_returncarriers(account_id, fields: nil, quota_user: nil, options: nil, &block)
719
+ command = make_simple_command(:get, 'content/v2.1/accounts/{accountId}/returncarrier', options)
720
+ command.response_representation = Google::Apis::ContentV2_1::ListAccountReturnCarrierResponse::Representation
721
+ command.response_class = Google::Apis::ContentV2_1::ListAccountReturnCarrierResponse
722
+ command.params['accountId'] = account_id unless account_id.nil?
723
+ command.query['fields'] = fields unless fields.nil?
724
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
725
+ execute_or_queue_command(command, &block)
726
+ end
727
+
728
+ # Updates a return carrier in the merchant account.
729
+ # @param [Fixnum] account_id
730
+ # Required. The Merchant Center Account Id under which the Return Carrier is to
731
+ # be linked.
732
+ # @param [Fixnum] carrier_account_id
733
+ # Required. The Google-provided unique carrier ID, used to update the resource.
734
+ # @param [Google::Apis::ContentV2_1::AccountReturnCarrier] account_return_carrier_object
735
+ # @param [String] fields
736
+ # Selector specifying which fields to include in a partial response.
737
+ # @param [String] quota_user
738
+ # Available to use for quota purposes for server-side applications. Can be any
739
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
740
+ # @param [Google::Apis::RequestOptions] options
741
+ # Request-specific options
742
+ #
743
+ # @yield [result, err] Result & error if block supplied
744
+ # @yieldparam result [Google::Apis::ContentV2_1::AccountReturnCarrier] parsed result object
745
+ # @yieldparam err [StandardError] error object if request failed
746
+ #
747
+ # @return [Google::Apis::ContentV2_1::AccountReturnCarrier]
748
+ #
749
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
750
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
751
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
752
+ def patch_account_returncarrier(account_id, carrier_account_id, account_return_carrier_object = nil, fields: nil, quota_user: nil, options: nil, &block)
753
+ command = make_simple_command(:patch, 'content/v2.1/accounts/{accountId}/returncarrier/{carrierAccountId}', options)
754
+ command.request_representation = Google::Apis::ContentV2_1::AccountReturnCarrier::Representation
755
+ command.request_object = account_return_carrier_object
756
+ command.response_representation = Google::Apis::ContentV2_1::AccountReturnCarrier::Representation
757
+ command.response_class = Google::Apis::ContentV2_1::AccountReturnCarrier
758
+ command.params['accountId'] = account_id unless account_id.nil?
759
+ command.params['carrierAccountId'] = carrier_account_id unless carrier_account_id.nil?
760
+ command.query['fields'] = fields unless fields.nil?
761
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
762
+ execute_or_queue_command(command, &block)
763
+ end
764
+
597
765
  # Retrieves multiple Merchant Center account statuses in a single request.
598
766
  # @param [Google::Apis::ContentV2_1::AccountstatusesCustomBatchRequest] accountstatuses_custom_batch_request_object
599
767
  # @param [String] fields
@@ -845,6 +1013,296 @@ module Google
845
1013
  execute_or_queue_command(command, &block)
846
1014
  end
847
1015
 
1016
+ # Retrieves a status of BoG program for your Merchant Center account.
1017
+ # @param [Fixnum] merchant_id
1018
+ # Required. The ID of the account.
1019
+ # @param [String] region_code
1020
+ # The Program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/
1021
+ # ISO_3166-1_alpha-2). Currently only US is available.
1022
+ # @param [String] fields
1023
+ # Selector specifying which fields to include in a partial response.
1024
+ # @param [String] quota_user
1025
+ # Available to use for quota purposes for server-side applications. Can be any
1026
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1027
+ # @param [Google::Apis::RequestOptions] options
1028
+ # Request-specific options
1029
+ #
1030
+ # @yield [result, err] Result & error if block supplied
1031
+ # @yieldparam result [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus] parsed result object
1032
+ # @yieldparam err [StandardError] error object if request failed
1033
+ #
1034
+ # @return [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus]
1035
+ #
1036
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1037
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1038
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1039
+ def get_buyongoogleprogram(merchant_id, region_code, fields: nil, quota_user: nil, options: nil, &block)
1040
+ command = make_simple_command(:get, 'content/v2.1/{merchantId}/buyongoogleprograms/{regionCode}', options)
1041
+ command.response_representation = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus::Representation
1042
+ command.response_class = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus
1043
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1044
+ command.params['regionCode'] = region_code unless region_code.nil?
1045
+ command.query['fields'] = fields unless fields.nil?
1046
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1047
+ execute_or_queue_command(command, &block)
1048
+ end
1049
+
1050
+ # Onboards BoG in your Merchant Center account. By using this method, you agree
1051
+ # to the [Terms of Service](https://merchants.google.com/mc/termsofservice/
1052
+ # transactions/US/latest).
1053
+ # @param [Fixnum] merchant_id
1054
+ # Required. The ID of the account.
1055
+ # @param [String] region_code
1056
+ # The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/
1057
+ # ISO_3166-1_alpha-2). Currently only US is available.
1058
+ # @param [Google::Apis::ContentV2_1::OnboardBuyOnGoogleProgramRequest] onboard_buy_on_google_program_request_object
1059
+ # @param [String] fields
1060
+ # Selector specifying which fields to include in a partial response.
1061
+ # @param [String] quota_user
1062
+ # Available to use for quota purposes for server-side applications. Can be any
1063
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1064
+ # @param [Google::Apis::RequestOptions] options
1065
+ # Request-specific options
1066
+ #
1067
+ # @yield [result, err] Result & error if block supplied
1068
+ # @yieldparam result [NilClass] No result returned for this method
1069
+ # @yieldparam err [StandardError] error object if request failed
1070
+ #
1071
+ # @return [void]
1072
+ #
1073
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1074
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1075
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1076
+ def onboard_buyongoogleprogram_buy_on_google_program(merchant_id, region_code, onboard_buy_on_google_program_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1077
+ command = make_simple_command(:post, 'content/v2.1/{merchantId}/buyongoogleprograms/{regionCode}/onboard', options)
1078
+ command.request_representation = Google::Apis::ContentV2_1::OnboardBuyOnGoogleProgramRequest::Representation
1079
+ command.request_object = onboard_buy_on_google_program_request_object
1080
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1081
+ command.params['regionCode'] = region_code unless region_code.nil?
1082
+ command.query['fields'] = fields unless fields.nil?
1083
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1084
+ execute_or_queue_command(command, &block)
1085
+ end
1086
+
1087
+ # Uploads a collection to your Merchant Center account. If a collection with the
1088
+ # same collectionId already exists, this method updates that entry. In each
1089
+ # update, the collection is completely replaced by the fields in the body of the
1090
+ # update request.
1091
+ # @param [Fixnum] merchant_id
1092
+ # Required. The ID of the account that contains the collection. This account
1093
+ # cannot be a multi-client account.
1094
+ # @param [Google::Apis::ContentV2_1::Collection] collection_object
1095
+ # @param [String] fields
1096
+ # Selector specifying which fields to include in a partial response.
1097
+ # @param [String] quota_user
1098
+ # Available to use for quota purposes for server-side applications. Can be any
1099
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1100
+ # @param [Google::Apis::RequestOptions] options
1101
+ # Request-specific options
1102
+ #
1103
+ # @yield [result, err] Result & error if block supplied
1104
+ # @yieldparam result [Google::Apis::ContentV2_1::Collection] parsed result object
1105
+ # @yieldparam err [StandardError] error object if request failed
1106
+ #
1107
+ # @return [Google::Apis::ContentV2_1::Collection]
1108
+ #
1109
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1110
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1111
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1112
+ def create_collection(merchant_id, collection_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1113
+ command = make_simple_command(:post, 'content/v2.1/{merchantId}/collections', options)
1114
+ command.request_representation = Google::Apis::ContentV2_1::Collection::Representation
1115
+ command.request_object = collection_object
1116
+ command.response_representation = Google::Apis::ContentV2_1::Collection::Representation
1117
+ command.response_class = Google::Apis::ContentV2_1::Collection
1118
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1119
+ command.query['fields'] = fields unless fields.nil?
1120
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1121
+ execute_or_queue_command(command, &block)
1122
+ end
1123
+
1124
+ # Deletes a collection from your Merchant Center account.
1125
+ # @param [Fixnum] merchant_id
1126
+ # Required. The ID of the account that contains the collection. This account
1127
+ # cannot be a multi-client account.
1128
+ # @param [String] collection_id
1129
+ # Required. The collectionId of the collection. CollectionId is the same as the
1130
+ # REST ID of the collection.
1131
+ # @param [String] fields
1132
+ # Selector specifying which fields to include in a partial response.
1133
+ # @param [String] quota_user
1134
+ # Available to use for quota purposes for server-side applications. Can be any
1135
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1136
+ # @param [Google::Apis::RequestOptions] options
1137
+ # Request-specific options
1138
+ #
1139
+ # @yield [result, err] Result & error if block supplied
1140
+ # @yieldparam result [NilClass] No result returned for this method
1141
+ # @yieldparam err [StandardError] error object if request failed
1142
+ #
1143
+ # @return [void]
1144
+ #
1145
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1146
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1147
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1148
+ def delete_collection(merchant_id, collection_id, fields: nil, quota_user: nil, options: nil, &block)
1149
+ command = make_simple_command(:delete, 'content/v2.1/{merchantId}/collections/{collectionId}', options)
1150
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1151
+ command.params['collectionId'] = collection_id unless collection_id.nil?
1152
+ command.query['fields'] = fields unless fields.nil?
1153
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1154
+ execute_or_queue_command(command, &block)
1155
+ end
1156
+
1157
+ # Retrieves a collection from your Merchant Center account.
1158
+ # @param [Fixnum] merchant_id
1159
+ # Required. The ID of the account that contains the collection. This account
1160
+ # cannot be a multi-client account.
1161
+ # @param [String] collection_id
1162
+ # Required. The REST ID of the collection.
1163
+ # @param [String] fields
1164
+ # Selector specifying which fields to include in a partial response.
1165
+ # @param [String] quota_user
1166
+ # Available to use for quota purposes for server-side applications. Can be any
1167
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1168
+ # @param [Google::Apis::RequestOptions] options
1169
+ # Request-specific options
1170
+ #
1171
+ # @yield [result, err] Result & error if block supplied
1172
+ # @yieldparam result [Google::Apis::ContentV2_1::Collection] parsed result object
1173
+ # @yieldparam err [StandardError] error object if request failed
1174
+ #
1175
+ # @return [Google::Apis::ContentV2_1::Collection]
1176
+ #
1177
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1178
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1179
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1180
+ def get_collection(merchant_id, collection_id, fields: nil, quota_user: nil, options: nil, &block)
1181
+ command = make_simple_command(:get, 'content/v2.1/{merchantId}/collections/{collectionId}', options)
1182
+ command.response_representation = Google::Apis::ContentV2_1::Collection::Representation
1183
+ command.response_class = Google::Apis::ContentV2_1::Collection
1184
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1185
+ command.params['collectionId'] = collection_id unless collection_id.nil?
1186
+ command.query['fields'] = fields unless fields.nil?
1187
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1188
+ execute_or_queue_command(command, &block)
1189
+ end
1190
+
1191
+ # Lists the collections in your Merchant Center account. The response might
1192
+ # contain fewer items than specified by page_size. Rely on next_page_token to
1193
+ # determine if there are more items to be requested.
1194
+ # @param [Fixnum] merchant_id
1195
+ # Required. The ID of the account that contains the collection. This account
1196
+ # cannot be a multi-client account.
1197
+ # @param [Fixnum] page_size
1198
+ # The maximum number of collections to return in the response, used for paging.
1199
+ # Defaults to 50; values above 1000 will be coerced to 1000.
1200
+ # @param [String] page_token
1201
+ # Token (if provided) to retrieve the subsequent page. All other parameters must
1202
+ # match the original call that provided the page token.
1203
+ # @param [String] fields
1204
+ # Selector specifying which fields to include in a partial response.
1205
+ # @param [String] quota_user
1206
+ # Available to use for quota purposes for server-side applications. Can be any
1207
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1208
+ # @param [Google::Apis::RequestOptions] options
1209
+ # Request-specific options
1210
+ #
1211
+ # @yield [result, err] Result & error if block supplied
1212
+ # @yieldparam result [Google::Apis::ContentV2_1::ListCollectionsResponse] parsed result object
1213
+ # @yieldparam err [StandardError] error object if request failed
1214
+ #
1215
+ # @return [Google::Apis::ContentV2_1::ListCollectionsResponse]
1216
+ #
1217
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1218
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1219
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1220
+ def list_collections(merchant_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1221
+ command = make_simple_command(:get, 'content/v2.1/{merchantId}/collections', options)
1222
+ command.response_representation = Google::Apis::ContentV2_1::ListCollectionsResponse::Representation
1223
+ command.response_class = Google::Apis::ContentV2_1::ListCollectionsResponse
1224
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1225
+ command.query['pageSize'] = page_size unless page_size.nil?
1226
+ command.query['pageToken'] = page_token unless page_token.nil?
1227
+ command.query['fields'] = fields unless fields.nil?
1228
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1229
+ execute_or_queue_command(command, &block)
1230
+ end
1231
+
1232
+ # Gets the status of a collection from your Merchant Center account.
1233
+ # @param [Fixnum] merchant_id
1234
+ # Required. The ID of the account that contains the collection. This account
1235
+ # cannot be a multi-client account.
1236
+ # @param [String] collection_id
1237
+ # Required. The collectionId of the collection. CollectionId is the same as the
1238
+ # REST ID of the collection.
1239
+ # @param [String] fields
1240
+ # Selector specifying which fields to include in a partial response.
1241
+ # @param [String] quota_user
1242
+ # Available to use for quota purposes for server-side applications. Can be any
1243
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1244
+ # @param [Google::Apis::RequestOptions] options
1245
+ # Request-specific options
1246
+ #
1247
+ # @yield [result, err] Result & error if block supplied
1248
+ # @yieldparam result [Google::Apis::ContentV2_1::CollectionStatus] parsed result object
1249
+ # @yieldparam err [StandardError] error object if request failed
1250
+ #
1251
+ # @return [Google::Apis::ContentV2_1::CollectionStatus]
1252
+ #
1253
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1254
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1255
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1256
+ def get_collectionstatus(merchant_id, collection_id, fields: nil, quota_user: nil, options: nil, &block)
1257
+ command = make_simple_command(:get, 'content/v2.1/{merchantId}/collectionstatuses/{collectionId}', options)
1258
+ command.response_representation = Google::Apis::ContentV2_1::CollectionStatus::Representation
1259
+ command.response_class = Google::Apis::ContentV2_1::CollectionStatus
1260
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1261
+ command.params['collectionId'] = collection_id unless collection_id.nil?
1262
+ command.query['fields'] = fields unless fields.nil?
1263
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1264
+ execute_or_queue_command(command, &block)
1265
+ end
1266
+
1267
+ # Lists the statuses of the collections in your Merchant Center account.
1268
+ # @param [Fixnum] merchant_id
1269
+ # Required. The ID of the account that contains the collection. This account
1270
+ # cannot be a multi-client account.
1271
+ # @param [Fixnum] page_size
1272
+ # The maximum number of collection statuses to return in the response, used for
1273
+ # paging. Defaults to 50; values above 1000 will be coerced to 1000.
1274
+ # @param [String] page_token
1275
+ # Token (if provided) to retrieve the subsequent page. All other parameters must
1276
+ # match the original call that provided the page token.
1277
+ # @param [String] fields
1278
+ # Selector specifying which fields to include in a partial response.
1279
+ # @param [String] quota_user
1280
+ # Available to use for quota purposes for server-side applications. Can be any
1281
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
1282
+ # @param [Google::Apis::RequestOptions] options
1283
+ # Request-specific options
1284
+ #
1285
+ # @yield [result, err] Result & error if block supplied
1286
+ # @yieldparam result [Google::Apis::ContentV2_1::ListCollectionStatusesResponse] parsed result object
1287
+ # @yieldparam err [StandardError] error object if request failed
1288
+ #
1289
+ # @return [Google::Apis::ContentV2_1::ListCollectionStatusesResponse]
1290
+ #
1291
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1292
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1293
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
1294
+ def list_collectionstatuses(merchant_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
1295
+ command = make_simple_command(:get, 'content/v2.1/{merchantId}/collectionstatuses', options)
1296
+ command.response_representation = Google::Apis::ContentV2_1::ListCollectionStatusesResponse::Representation
1297
+ command.response_class = Google::Apis::ContentV2_1::ListCollectionStatusesResponse
1298
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
1299
+ command.query['pageSize'] = page_size unless page_size.nil?
1300
+ command.query['pageToken'] = page_token unless page_token.nil?
1301
+ command.query['fields'] = fields unless fields.nil?
1302
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
1303
+ execute_or_queue_command(command, &block)
1304
+ end
1305
+
848
1306
  # Retrieves a single CSS domain by ID.
849
1307
  # @param [Fixnum] css_group_id
850
1308
  # Required. The ID of the managing account. If this parameter is not the same as
@@ -3523,8 +3981,7 @@ module Google
3523
3981
  execute_or_queue_command(command, &block)
3524
3982
  end
3525
3983
 
3526
- # Lists the metrics report for a given Repricing product. Reports of the last 3
3527
- # days may not be complete.
3984
+ # Lists the metrics report for a given Repricing product.
3528
3985
  # @param [Fixnum] merchant_id
3529
3986
  # Required. Id of the merchant who owns the Repricing rule.
3530
3987
  # @param [String] product_id
@@ -3533,7 +3990,7 @@ module Google
3533
3990
  # FIELDS.id)
3534
3991
  # @param [String] end_date
3535
3992
  # Gets Repricing reports on and before this date in the merchant's timezone. You
3536
- # can only retrieve data up to 3 days ago (default) or earlier. Format is YYYY-
3993
+ # can only retrieve data up to 7 days ago (default) or earlier. Format is YYYY-
3537
3994
  # MM-DD.
3538
3995
  # @param [Fixnum] page_size
3539
3996
  # Maximum number of days of reports to return. There can be more than one rule
@@ -3550,7 +4007,7 @@ module Google
3550
4007
  # Id of the Repricing rule. If specified, only gets this rule's reports.
3551
4008
  # @param [String] start_date
3552
4009
  # Gets Repricing reports on and after this date in the merchant's timezone, up
3553
- # to one year ago. Do not use a start date later than 3 days ago (default).
4010
+ # to one year ago. Do not use a start date later than 7 days ago (default).
3554
4011
  # Format is YYYY-MM-DD.
3555
4012
  # @param [String] fields
3556
4013
  # Selector specifying which fields to include in a partial response.
@@ -3898,6 +4355,41 @@ module Google
3898
4355
  execute_or_queue_command(command, &block)
3899
4356
  end
3900
4357
 
4358
+ # Retrieves merchant performance mertrics matching the search query and
4359
+ # optionally segmented by selected dimensions.
4360
+ # @param [Fixnum] merchant_id
4361
+ # Required. Id of the merchant making the call. Must be a standalone account or
4362
+ # an MCA subaccount.
4363
+ # @param [Google::Apis::ContentV2_1::SearchRequest] search_request_object
4364
+ # @param [String] fields
4365
+ # Selector specifying which fields to include in a partial response.
4366
+ # @param [String] quota_user
4367
+ # Available to use for quota purposes for server-side applications. Can be any
4368
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4369
+ # @param [Google::Apis::RequestOptions] options
4370
+ # Request-specific options
4371
+ #
4372
+ # @yield [result, err] Result & error if block supplied
4373
+ # @yieldparam result [Google::Apis::ContentV2_1::SearchResponse] parsed result object
4374
+ # @yieldparam err [StandardError] error object if request failed
4375
+ #
4376
+ # @return [Google::Apis::ContentV2_1::SearchResponse]
4377
+ #
4378
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4379
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4380
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4381
+ def search_report(merchant_id, search_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4382
+ command = make_simple_command(:post, 'content/v2.1/{merchantId}/reports/search', options)
4383
+ command.request_representation = Google::Apis::ContentV2_1::SearchRequest::Representation
4384
+ command.request_object = search_request_object
4385
+ command.response_representation = Google::Apis::ContentV2_1::SearchResponse::Representation
4386
+ command.response_class = Google::Apis::ContentV2_1::SearchResponse
4387
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
4388
+ command.query['fields'] = fields unless fields.nil?
4389
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4390
+ execute_or_queue_command(command, &block)
4391
+ end
4392
+
3901
4393
  # Creates a repricing rule for your Merchant Center account.
3902
4394
  # @param [Fixnum] merchant_id
3903
4395
  # Required. The id of the merchant who owns the repricing rule.
@@ -4002,7 +4494,8 @@ module Google
4002
4494
  # @param [Fixnum] merchant_id
4003
4495
  # Required. The id of the merchant who owns the repricing rule.
4004
4496
  # @param [String] country_code
4005
- # CLDR country code (e.g. "US"), used as a filter on repricing rules.
4497
+ # [CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/
4498
+ # en.xml) (e.g. "US"), used as a filter on repricing rules.
4006
4499
  # @param [String] language_code
4007
4500
  # The two-letter ISO 639-1 language code associated with the repricing rule,
4008
4501
  # used as a filter.
@@ -4086,15 +4579,14 @@ module Google
4086
4579
  execute_or_queue_command(command, &block)
4087
4580
  end
4088
4581
 
4089
- # Lists the metrics report for a given Repricing rule. Reports of the last 3
4090
- # days may not be complete.
4582
+ # Lists the metrics report for a given Repricing rule.
4091
4583
  # @param [Fixnum] merchant_id
4092
4584
  # Required. Id of the merchant who owns the Repricing rule.
4093
4585
  # @param [String] rule_id
4094
4586
  # Required. Id of the Repricing rule.
4095
4587
  # @param [String] end_date
4096
4588
  # Gets Repricing reports on and before this date in the merchant's timezone. You
4097
- # can only retrieve data up to 3 days ago (default) or earlier. Format: YYYY-MM-
4589
+ # can only retrieve data up to 7 days ago (default) or earlier. Format: YYYY-MM-
4098
4590
  # DD.
4099
4591
  # @param [Fixnum] page_size
4100
4592
  # Maximum number of daily reports to return. Each report includes data from a
@@ -4106,7 +4598,7 @@ module Google
4106
4598
  # match the original call that provided the page token.
4107
4599
  # @param [String] start_date
4108
4600
  # Gets Repricing reports on and after this date in the merchant's timezone, up
4109
- # to one year ago. Do not use a start date later than 3 days ago (default).
4601
+ # to one year ago. Do not use a start date later than 7 days ago (default).
4110
4602
  # Format: YYYY-MM-DD.
4111
4603
  # @param [String] fields
4112
4604
  # Selector specifying which fields to include in a partial response.
@@ -4464,6 +4956,174 @@ module Google
4464
4956
  execute_or_queue_command(command, &block)
4465
4957
  end
4466
4958
 
4959
+ # Creates a new return policy.
4960
+ # @param [Fixnum] merchant_id
4961
+ # Required. The id of the merchant for which to retrieve the return policy
4962
+ # online object.
4963
+ # @param [Google::Apis::ContentV2_1::ReturnPolicyOnline] return_policy_online_object
4964
+ # @param [String] fields
4965
+ # Selector specifying which fields to include in a partial response.
4966
+ # @param [String] quota_user
4967
+ # Available to use for quota purposes for server-side applications. Can be any
4968
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
4969
+ # @param [Google::Apis::RequestOptions] options
4970
+ # Request-specific options
4971
+ #
4972
+ # @yield [result, err] Result & error if block supplied
4973
+ # @yieldparam result [Google::Apis::ContentV2_1::ReturnPolicyOnline] parsed result object
4974
+ # @yieldparam err [StandardError] error object if request failed
4975
+ #
4976
+ # @return [Google::Apis::ContentV2_1::ReturnPolicyOnline]
4977
+ #
4978
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4979
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4980
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
4981
+ def create_returnpolicyonline(merchant_id, return_policy_online_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4982
+ command = make_simple_command(:post, 'content/v2.1/{merchantId}/returnpolicyonline', options)
4983
+ command.request_representation = Google::Apis::ContentV2_1::ReturnPolicyOnline::Representation
4984
+ command.request_object = return_policy_online_object
4985
+ command.response_representation = Google::Apis::ContentV2_1::ReturnPolicyOnline::Representation
4986
+ command.response_class = Google::Apis::ContentV2_1::ReturnPolicyOnline
4987
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
4988
+ command.query['fields'] = fields unless fields.nil?
4989
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
4990
+ execute_or_queue_command(command, &block)
4991
+ end
4992
+
4993
+ # Deletes an existing return policy.
4994
+ # @param [Fixnum] merchant_id
4995
+ # Required. The id of the merchant for which to retrieve the return policy
4996
+ # online object.
4997
+ # @param [String] return_policy_id
4998
+ # Required. The id of the return policy to delete.
4999
+ # @param [String] fields
5000
+ # Selector specifying which fields to include in a partial response.
5001
+ # @param [String] quota_user
5002
+ # Available to use for quota purposes for server-side applications. Can be any
5003
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
5004
+ # @param [Google::Apis::RequestOptions] options
5005
+ # Request-specific options
5006
+ #
5007
+ # @yield [result, err] Result & error if block supplied
5008
+ # @yieldparam result [NilClass] No result returned for this method
5009
+ # @yieldparam err [StandardError] error object if request failed
5010
+ #
5011
+ # @return [void]
5012
+ #
5013
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5014
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5015
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
5016
+ def delete_returnpolicyonline(merchant_id, return_policy_id, fields: nil, quota_user: nil, options: nil, &block)
5017
+ command = make_simple_command(:delete, 'content/v2.1/{merchantId}/returnpolicyonline/{returnPolicyId}', options)
5018
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
5019
+ command.params['returnPolicyId'] = return_policy_id unless return_policy_id.nil?
5020
+ command.query['fields'] = fields unless fields.nil?
5021
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
5022
+ execute_or_queue_command(command, &block)
5023
+ end
5024
+
5025
+ # Gets an existing return policy.
5026
+ # @param [Fixnum] merchant_id
5027
+ # Required. The id of the merchant for which to retrieve the return policy
5028
+ # online object.
5029
+ # @param [String] return_policy_id
5030
+ # Required. The id of the return policy to retrieve.
5031
+ # @param [String] fields
5032
+ # Selector specifying which fields to include in a partial response.
5033
+ # @param [String] quota_user
5034
+ # Available to use for quota purposes for server-side applications. Can be any
5035
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
5036
+ # @param [Google::Apis::RequestOptions] options
5037
+ # Request-specific options
5038
+ #
5039
+ # @yield [result, err] Result & error if block supplied
5040
+ # @yieldparam result [Google::Apis::ContentV2_1::ReturnPolicyOnline] parsed result object
5041
+ # @yieldparam err [StandardError] error object if request failed
5042
+ #
5043
+ # @return [Google::Apis::ContentV2_1::ReturnPolicyOnline]
5044
+ #
5045
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5046
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5047
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
5048
+ def get_returnpolicyonline(merchant_id, return_policy_id, fields: nil, quota_user: nil, options: nil, &block)
5049
+ command = make_simple_command(:get, 'content/v2.1/{merchantId}/returnpolicyonline/{returnPolicyId}', options)
5050
+ command.response_representation = Google::Apis::ContentV2_1::ReturnPolicyOnline::Representation
5051
+ command.response_class = Google::Apis::ContentV2_1::ReturnPolicyOnline
5052
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
5053
+ command.params['returnPolicyId'] = return_policy_id unless return_policy_id.nil?
5054
+ command.query['fields'] = fields unless fields.nil?
5055
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
5056
+ execute_or_queue_command(command, &block)
5057
+ end
5058
+
5059
+ # Lists all existing return policies.
5060
+ # @param [Fixnum] merchant_id
5061
+ # Required. The id of the merchant for which to retrieve the return policy
5062
+ # online object.
5063
+ # @param [String] fields
5064
+ # Selector specifying which fields to include in a partial response.
5065
+ # @param [String] quota_user
5066
+ # Available to use for quota purposes for server-side applications. Can be any
5067
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
5068
+ # @param [Google::Apis::RequestOptions] options
5069
+ # Request-specific options
5070
+ #
5071
+ # @yield [result, err] Result & error if block supplied
5072
+ # @yieldparam result [Google::Apis::ContentV2_1::ListReturnPolicyOnlineResponse] parsed result object
5073
+ # @yieldparam err [StandardError] error object if request failed
5074
+ #
5075
+ # @return [Google::Apis::ContentV2_1::ListReturnPolicyOnlineResponse]
5076
+ #
5077
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5078
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5079
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
5080
+ def list_returnpolicyonlines(merchant_id, fields: nil, quota_user: nil, options: nil, &block)
5081
+ command = make_simple_command(:get, 'content/v2.1/{merchantId}/returnpolicyonline', options)
5082
+ command.response_representation = Google::Apis::ContentV2_1::ListReturnPolicyOnlineResponse::Representation
5083
+ command.response_class = Google::Apis::ContentV2_1::ListReturnPolicyOnlineResponse
5084
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
5085
+ command.query['fields'] = fields unless fields.nil?
5086
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
5087
+ execute_or_queue_command(command, &block)
5088
+ end
5089
+
5090
+ # Updates an existing return policy.
5091
+ # @param [Fixnum] merchant_id
5092
+ # Required. The id of the merchant for which to retrieve the return policy
5093
+ # online object.
5094
+ # @param [String] return_policy_id
5095
+ # Required. The id of the return policy to update.
5096
+ # @param [Google::Apis::ContentV2_1::ReturnPolicyOnline] return_policy_online_object
5097
+ # @param [String] fields
5098
+ # Selector specifying which fields to include in a partial response.
5099
+ # @param [String] quota_user
5100
+ # Available to use for quota purposes for server-side applications. Can be any
5101
+ # arbitrary string assigned to a user, but should not exceed 40 characters.
5102
+ # @param [Google::Apis::RequestOptions] options
5103
+ # Request-specific options
5104
+ #
5105
+ # @yield [result, err] Result & error if block supplied
5106
+ # @yieldparam result [Google::Apis::ContentV2_1::ReturnPolicyOnline] parsed result object
5107
+ # @yieldparam err [StandardError] error object if request failed
5108
+ #
5109
+ # @return [Google::Apis::ContentV2_1::ReturnPolicyOnline]
5110
+ #
5111
+ # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5112
+ # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5113
+ # @raise [Google::Apis::AuthorizationError] Authorization is required
5114
+ def patch_returnpolicyonline(merchant_id, return_policy_id, return_policy_online_object = nil, fields: nil, quota_user: nil, options: nil, &block)
5115
+ command = make_simple_command(:patch, 'content/v2.1/{merchantId}/returnpolicyonline/{returnPolicyId}', options)
5116
+ command.request_representation = Google::Apis::ContentV2_1::ReturnPolicyOnline::Representation
5117
+ command.request_object = return_policy_online_object
5118
+ command.response_representation = Google::Apis::ContentV2_1::ReturnPolicyOnline::Representation
5119
+ command.response_class = Google::Apis::ContentV2_1::ReturnPolicyOnline
5120
+ command.params['merchantId'] = merchant_id unless merchant_id.nil?
5121
+ command.params['returnPolicyId'] = return_policy_id unless return_policy_id.nil?
5122
+ command.query['fields'] = fields unless fields.nil?
5123
+ command.query['quotaUser'] = quota_user unless quota_user.nil?
5124
+ execute_or_queue_command(command, &block)
5125
+ end
5126
+
4467
5127
  # Retrieves a settlement report from your Merchant Center account.
4468
5128
  # @param [Fixnum] merchant_id
4469
5129
  # The Merchant Center account of the settlement report.