google-apis-content_v2_1 0.32.0 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,6 +32,8 @@ module Google
32
32
  #
33
33
  # @see https://developers.google.com/shopping-content/v2/
34
34
  class ShoppingContentService < Google::Apis::Core::BaseService
35
+ DEFAULT_ENDPOINT_TEMPLATE = "https://shoppingcontent.$UNIVERSE_DOMAIN$/"
36
+
35
37
  # @return [String]
36
38
  # API key. Your API key identifies your project and provides you with API access,
37
39
  # quota, and reports. Required unless you provide an OAuth 2.0 token.
@@ -43,7 +45,7 @@ module Google
43
45
  attr_accessor :quota_user
44
46
 
45
47
  def initialize
46
- super('https://shoppingcontent.googleapis.com/', 'content/v2.1/',
48
+ super(DEFAULT_ENDPOINT_TEMPLATE, 'content/v2.1/',
47
49
  client_name: 'google-apis-content_v2_1',
48
50
  client_version: Google::Apis::ContentV2_1::GEM_VERSION)
49
51
  @batch_path = 'batch'
@@ -1104,232 +1106,6 @@ module Google
1104
1106
  execute_or_queue_command(command, &block)
1105
1107
  end
1106
1108
 
1107
- # Reactivates the BoG program in your Merchant Center account. Moves the program
1108
- # to the active state when allowed, for example, when paused. This method is
1109
- # only available to selected merchants.
1110
- # @param [Fixnum] merchant_id
1111
- # Required. The ID of the account.
1112
- # @param [String] region_code
1113
- # Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1114
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1115
- # @param [Google::Apis::ContentV2_1::ActivateBuyOnGoogleProgramRequest] activate_buy_on_google_program_request_object
1116
- # @param [String] fields
1117
- # Selector specifying which fields to include in a partial response.
1118
- # @param [String] quota_user
1119
- # Available to use for quota purposes for server-side applications. Can be any
1120
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1121
- # @param [Google::Apis::RequestOptions] options
1122
- # Request-specific options
1123
- #
1124
- # @yield [result, err] Result & error if block supplied
1125
- # @yieldparam result [NilClass] No result returned for this method
1126
- # @yieldparam err [StandardError] error object if request failed
1127
- #
1128
- # @return [void]
1129
- #
1130
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1131
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1132
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1133
- def activate_buyongoogleprogram_buy_on_google_program(merchant_id, region_code, activate_buy_on_google_program_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1134
- command = make_simple_command(:post, '{merchantId}/buyongoogleprograms/{regionCode}/activate', options)
1135
- command.request_representation = Google::Apis::ContentV2_1::ActivateBuyOnGoogleProgramRequest::Representation
1136
- command.request_object = activate_buy_on_google_program_request_object
1137
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1138
- command.params['regionCode'] = region_code unless region_code.nil?
1139
- command.query['fields'] = fields unless fields.nil?
1140
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1141
- execute_or_queue_command(command, &block)
1142
- end
1143
-
1144
- # Retrieves a status of the BoG program for your Merchant Center account.
1145
- # @param [Fixnum] merchant_id
1146
- # Required. The ID of the account.
1147
- # @param [String] region_code
1148
- # Required. The Program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1149
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1150
- # @param [String] fields
1151
- # Selector specifying which fields to include in a partial response.
1152
- # @param [String] quota_user
1153
- # Available to use for quota purposes for server-side applications. Can be any
1154
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1155
- # @param [Google::Apis::RequestOptions] options
1156
- # Request-specific options
1157
- #
1158
- # @yield [result, err] Result & error if block supplied
1159
- # @yieldparam result [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus] parsed result object
1160
- # @yieldparam err [StandardError] error object if request failed
1161
- #
1162
- # @return [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus]
1163
- #
1164
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1165
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1166
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1167
- def get_buyongoogleprogram(merchant_id, region_code, fields: nil, quota_user: nil, options: nil, &block)
1168
- command = make_simple_command(:get, '{merchantId}/buyongoogleprograms/{regionCode}', options)
1169
- command.response_representation = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus::Representation
1170
- command.response_class = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus
1171
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1172
- command.params['regionCode'] = region_code unless region_code.nil?
1173
- command.query['fields'] = fields unless fields.nil?
1174
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1175
- execute_or_queue_command(command, &block)
1176
- end
1177
-
1178
- # Onboards the BoG program in your Merchant Center account. By using this method,
1179
- # you agree to the [Terms of Service](https://merchants.google.com/mc/
1180
- # termsofservice/transactions/US/latest). Calling this method is only possible
1181
- # if the authenticated account is the same as the merchant id in the request.
1182
- # Calling this method multiple times will only accept Terms of Service if the
1183
- # latest version is not currently signed.
1184
- # @param [Fixnum] merchant_id
1185
- # Required. The ID of the account.
1186
- # @param [String] region_code
1187
- # Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1188
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1189
- # @param [Google::Apis::ContentV2_1::OnboardBuyOnGoogleProgramRequest] onboard_buy_on_google_program_request_object
1190
- # @param [String] fields
1191
- # Selector specifying which fields to include in a partial response.
1192
- # @param [String] quota_user
1193
- # Available to use for quota purposes for server-side applications. Can be any
1194
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1195
- # @param [Google::Apis::RequestOptions] options
1196
- # Request-specific options
1197
- #
1198
- # @yield [result, err] Result & error if block supplied
1199
- # @yieldparam result [NilClass] No result returned for this method
1200
- # @yieldparam err [StandardError] error object if request failed
1201
- #
1202
- # @return [void]
1203
- #
1204
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1205
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1206
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1207
- 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)
1208
- command = make_simple_command(:post, '{merchantId}/buyongoogleprograms/{regionCode}/onboard', options)
1209
- command.request_representation = Google::Apis::ContentV2_1::OnboardBuyOnGoogleProgramRequest::Representation
1210
- command.request_object = onboard_buy_on_google_program_request_object
1211
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1212
- command.params['regionCode'] = region_code unless region_code.nil?
1213
- command.query['fields'] = fields unless fields.nil?
1214
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1215
- execute_or_queue_command(command, &block)
1216
- end
1217
-
1218
- # Updates the status of the BoG program for your Merchant Center account.
1219
- # @param [Fixnum] merchant_id
1220
- # Required. The ID of the account.
1221
- # @param [String] region_code
1222
- # Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1223
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1224
- # @param [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus] buy_on_google_program_status_object
1225
- # @param [String] update_mask
1226
- # The list of fields to update. If the update mask is not provided, then all the
1227
- # fields set in buyOnGoogleProgramStatus will be updated. Clearing fields is
1228
- # only possible if update mask is provided.
1229
- # @param [String] fields
1230
- # Selector specifying which fields to include in a partial response.
1231
- # @param [String] quota_user
1232
- # Available to use for quota purposes for server-side applications. Can be any
1233
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1234
- # @param [Google::Apis::RequestOptions] options
1235
- # Request-specific options
1236
- #
1237
- # @yield [result, err] Result & error if block supplied
1238
- # @yieldparam result [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus] parsed result object
1239
- # @yieldparam err [StandardError] error object if request failed
1240
- #
1241
- # @return [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus]
1242
- #
1243
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1244
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1245
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1246
- def patch_buyongoogleprogram(merchant_id, region_code, buy_on_google_program_status_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
1247
- command = make_simple_command(:patch, '{merchantId}/buyongoogleprograms/{regionCode}', options)
1248
- command.request_representation = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus::Representation
1249
- command.request_object = buy_on_google_program_status_object
1250
- command.response_representation = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus::Representation
1251
- command.response_class = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus
1252
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1253
- command.params['regionCode'] = region_code unless region_code.nil?
1254
- command.query['updateMask'] = update_mask unless update_mask.nil?
1255
- command.query['fields'] = fields unless fields.nil?
1256
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1257
- execute_or_queue_command(command, &block)
1258
- end
1259
-
1260
- # Pauses the BoG program in your Merchant Center account. This method is only
1261
- # available to selected merchants.
1262
- # @param [Fixnum] merchant_id
1263
- # Required. The ID of the account.
1264
- # @param [String] region_code
1265
- # Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1266
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1267
- # @param [Google::Apis::ContentV2_1::PauseBuyOnGoogleProgramRequest] pause_buy_on_google_program_request_object
1268
- # @param [String] fields
1269
- # Selector specifying which fields to include in a partial response.
1270
- # @param [String] quota_user
1271
- # Available to use for quota purposes for server-side applications. Can be any
1272
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1273
- # @param [Google::Apis::RequestOptions] options
1274
- # Request-specific options
1275
- #
1276
- # @yield [result, err] Result & error if block supplied
1277
- # @yieldparam result [NilClass] No result returned for this method
1278
- # @yieldparam err [StandardError] error object if request failed
1279
- #
1280
- # @return [void]
1281
- #
1282
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1283
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1284
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1285
- def pause_buyongoogleprogram_buy_on_google_program(merchant_id, region_code, pause_buy_on_google_program_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1286
- command = make_simple_command(:post, '{merchantId}/buyongoogleprograms/{regionCode}/pause', options)
1287
- command.request_representation = Google::Apis::ContentV2_1::PauseBuyOnGoogleProgramRequest::Representation
1288
- command.request_object = pause_buy_on_google_program_request_object
1289
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1290
- command.params['regionCode'] = region_code unless region_code.nil?
1291
- command.query['fields'] = fields unless fields.nil?
1292
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1293
- execute_or_queue_command(command, &block)
1294
- end
1295
-
1296
- # Requests review and then activates the BoG program in your Merchant Center
1297
- # account for the first time. Moves the program to the REVIEW_PENDING state.
1298
- # This method is only available to selected merchants.
1299
- # @param [Fixnum] merchant_id
1300
- # Required. The ID of the account.
1301
- # @param [String] region_code
1302
- # Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1303
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1304
- # @param [Google::Apis::ContentV2_1::RequestReviewBuyOnGoogleProgramRequest] request_review_buy_on_google_program_request_object
1305
- # @param [String] fields
1306
- # Selector specifying which fields to include in a partial response.
1307
- # @param [String] quota_user
1308
- # Available to use for quota purposes for server-side applications. Can be any
1309
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1310
- # @param [Google::Apis::RequestOptions] options
1311
- # Request-specific options
1312
- #
1313
- # @yield [result, err] Result & error if block supplied
1314
- # @yieldparam result [NilClass] No result returned for this method
1315
- # @yieldparam err [StandardError] error object if request failed
1316
- #
1317
- # @return [void]
1318
- #
1319
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1320
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1321
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1322
- def requestreview_buyongoogleprogram(merchant_id, region_code, request_review_buy_on_google_program_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1323
- command = make_simple_command(:post, '{merchantId}/buyongoogleprograms/{regionCode}/requestreview', options)
1324
- command.request_representation = Google::Apis::ContentV2_1::RequestReviewBuyOnGoogleProgramRequest::Representation
1325
- command.request_object = request_review_buy_on_google_program_request_object
1326
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1327
- command.params['regionCode'] = region_code unless region_code.nil?
1328
- command.query['fields'] = fields unless fields.nil?
1329
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1330
- execute_or_queue_command(command, &block)
1331
- end
1332
-
1333
1109
  # Uploads a collection to your Merchant Center account. If a collection with the
1334
1110
  # same collectionId already exists, this method updates that entry. In each
1335
1111
  # update, the collection is completely replaced by the fields in the body of the
@@ -2896,7 +2672,7 @@ module Google
2896
2672
  # @param [String] language_code
2897
2673
  # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code
2898
2674
  # used to localize support content. If not set, the result will be in default
2899
- # language ('en-US').
2675
+ # language `en-US`.
2900
2676
  # @param [String] time_zone
2901
2677
  # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to
2902
2678
  # localize times in support content. For example 'America/Los_Angeles'. If not
@@ -2945,7 +2721,7 @@ module Google
2945
2721
  # @param [String] language_code
2946
2722
  # Optional. The [IETF BCP-47](https://tools.ietf.org/html/bcp47) language code
2947
2723
  # used to localize support content. If not set, the result will be in default
2948
- # language ('en-US').
2724
+ # language `en-US`.
2949
2725
  # @param [String] time_zone
2950
2726
  # Optional. The [IANA](https://www.iana.org/time-zones) timezone used to
2951
2727
  # localize times in support content. For example 'America/Los_Angeles'. If not
@@ -2982,14 +2758,21 @@ module Google
2982
2758
  execute_or_queue_command(command, &block)
2983
2759
  end
2984
2760
 
2985
- # Creates a charge invoice for a shipment group, and triggers a charge capture
2986
- # for orderinvoice enabled orders.
2761
+ # Start an action. The action can be requested by merchants in third-party
2762
+ # application. Before merchants can request the action, the third-party
2763
+ # application needs to show them action specific content and display a user
2764
+ # input form. The action can be successfully started only once all `required`
2765
+ # inputs are provided. If any `required` input is missing, or invalid value was
2766
+ # provided, the service will return 400 error. Validation errors will contain
2767
+ # Ids for all problematic field together with translated, human readable error
2768
+ # messages that can be shown to the user.
2987
2769
  # @param [Fixnum] merchant_id
2988
- # The ID of the account that manages the order. This cannot be a multi-client
2989
- # account.
2990
- # @param [String] order_id
2991
- # The ID of the order.
2992
- # @param [Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceRequest] orderinvoices_create_charge_invoice_request_object
2770
+ # Required. The ID of the merchant's account.
2771
+ # @param [Google::Apis::ContentV2_1::TriggerActionPayload] trigger_action_payload_object
2772
+ # @param [String] language_code
2773
+ # Optional. Language code [IETF BCP 47 syntax](https://tools.ietf.org/html/bcp47)
2774
+ # used to localize the response. If not set, the result will be in default
2775
+ # language `en-US`.
2993
2776
  # @param [String] fields
2994
2777
  # Selector specifying which fields to include in a partial response.
2995
2778
  # @param [String] quota_user
@@ -2999,37 +2782,31 @@ module Google
2999
2782
  # Request-specific options
3000
2783
  #
3001
2784
  # @yield [result, err] Result & error if block supplied
3002
- # @yieldparam result [Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceResponse] parsed result object
2785
+ # @yieldparam result [Google::Apis::ContentV2_1::TriggerActionResponse] parsed result object
3003
2786
  # @yieldparam err [StandardError] error object if request failed
3004
2787
  #
3005
- # @return [Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceResponse]
2788
+ # @return [Google::Apis::ContentV2_1::TriggerActionResponse]
3006
2789
  #
3007
2790
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3008
2791
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3009
2792
  # @raise [Google::Apis::AuthorizationError] Authorization is required
3010
- def createchargeinvoice_orderinvoice(merchant_id, order_id, orderinvoices_create_charge_invoice_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3011
- command = make_simple_command(:post, '{merchantId}/orderinvoices/{orderId}/createChargeInvoice', options)
3012
- command.request_representation = Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceRequest::Representation
3013
- command.request_object = orderinvoices_create_charge_invoice_request_object
3014
- command.response_representation = Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceResponse::Representation
3015
- command.response_class = Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceResponse
2793
+ def triggeraction_merchantsupport(merchant_id, trigger_action_payload_object = nil, language_code: nil, fields: nil, quota_user: nil, options: nil, &block)
2794
+ command = make_simple_command(:post, '{merchantId}/merchantsupport/triggeraction', options)
2795
+ command.request_representation = Google::Apis::ContentV2_1::TriggerActionPayload::Representation
2796
+ command.request_object = trigger_action_payload_object
2797
+ command.response_representation = Google::Apis::ContentV2_1::TriggerActionResponse::Representation
2798
+ command.response_class = Google::Apis::ContentV2_1::TriggerActionResponse
3016
2799
  command.params['merchantId'] = merchant_id unless merchant_id.nil?
3017
- command.params['orderId'] = order_id unless order_id.nil?
2800
+ command.query['languageCode'] = language_code unless language_code.nil?
3018
2801
  command.query['fields'] = fields unless fields.nil?
3019
2802
  command.query['quotaUser'] = quota_user unless quota_user.nil?
3020
2803
  execute_or_queue_command(command, &block)
3021
2804
  end
3022
2805
 
3023
- # Creates a refund invoice for one or more shipment groups, and triggers a
3024
- # refund for orderinvoice enabled orders. This can only be used for line items
3025
- # that have previously been charged using `createChargeInvoice`. All amounts (
3026
- # except for the summary) are incremental with respect to the previous invoice.
2806
+ # Creates new order tracking signal.
3027
2807
  # @param [Fixnum] merchant_id
3028
- # The ID of the account that manages the order. This cannot be a multi-client
3029
- # account.
3030
- # @param [String] order_id
3031
- # The ID of the order.
3032
- # @param [Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceRequest] orderinvoices_create_refund_invoice_request_object
2808
+ # The ID of the merchant for which the order signal is created.
2809
+ # @param [Google::Apis::ContentV2_1::OrderTrackingSignal] order_tracking_signal_object
3033
2810
  # @param [String] fields
3034
2811
  # Selector specifying which fields to include in a partial response.
3035
2812
  # @param [String] quota_user
@@ -3039,40 +2816,28 @@ module Google
3039
2816
  # Request-specific options
3040
2817
  #
3041
2818
  # @yield [result, err] Result & error if block supplied
3042
- # @yieldparam result [Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceResponse] parsed result object
2819
+ # @yieldparam result [Google::Apis::ContentV2_1::OrderTrackingSignal] parsed result object
3043
2820
  # @yieldparam err [StandardError] error object if request failed
3044
2821
  #
3045
- # @return [Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceResponse]
2822
+ # @return [Google::Apis::ContentV2_1::OrderTrackingSignal]
3046
2823
  #
3047
2824
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3048
2825
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3049
2826
  # @raise [Google::Apis::AuthorizationError] Authorization is required
3050
- def createrefundinvoice_orderinvoice(merchant_id, order_id, orderinvoices_create_refund_invoice_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3051
- command = make_simple_command(:post, '{merchantId}/orderinvoices/{orderId}/createRefundInvoice', options)
3052
- command.request_representation = Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceRequest::Representation
3053
- command.request_object = orderinvoices_create_refund_invoice_request_object
3054
- command.response_representation = Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceResponse::Representation
3055
- command.response_class = Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceResponse
2827
+ def create_ordertrackingsignal(merchant_id, order_tracking_signal_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2828
+ command = make_simple_command(:post, '{merchantId}/ordertrackingsignals', options)
2829
+ command.request_representation = Google::Apis::ContentV2_1::OrderTrackingSignal::Representation
2830
+ command.request_object = order_tracking_signal_object
2831
+ command.response_representation = Google::Apis::ContentV2_1::OrderTrackingSignal::Representation
2832
+ command.response_class = Google::Apis::ContentV2_1::OrderTrackingSignal
3056
2833
  command.params['merchantId'] = merchant_id unless merchant_id.nil?
3057
- command.params['orderId'] = order_id unless order_id.nil?
3058
2834
  command.query['fields'] = fields unless fields.nil?
3059
2835
  command.query['quotaUser'] = quota_user unless quota_user.nil?
3060
2836
  execute_or_queue_command(command, &block)
3061
2837
  end
3062
2838
 
3063
- # Retrieves a report for disbursements from your Merchant Center account.
3064
- # @param [Fixnum] merchant_id
3065
- # The ID of the account that manages the order. This cannot be a multi-client
3066
- # account.
3067
- # @param [String] disbursement_end_date
3068
- # The last date which disbursements occurred. In ISO 8601 format. Default:
3069
- # current date.
3070
- # @param [String] disbursement_start_date
3071
- # The first date which disbursements occurred. In ISO 8601 format.
3072
- # @param [Fixnum] max_results
3073
- # The maximum number of disbursements to return in the response, used for paging.
3074
- # @param [String] page_token
3075
- # The token returned by the previous request.
2839
+ # Batches multiple POS-related calls in a single request.
2840
+ # @param [Google::Apis::ContentV2_1::PosCustomBatchRequest] pos_custom_batch_request_object
3076
2841
  # @param [String] fields
3077
2842
  # Selector specifying which fields to include in a partial response.
3078
2843
  # @param [String] quota_user
@@ -3082,44 +2847,32 @@ module Google
3082
2847
  # Request-specific options
3083
2848
  #
3084
2849
  # @yield [result, err] Result & error if block supplied
3085
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreportsListDisbursementsResponse] parsed result object
2850
+ # @yieldparam result [Google::Apis::ContentV2_1::PosCustomBatchResponse] parsed result object
3086
2851
  # @yieldparam err [StandardError] error object if request failed
3087
2852
  #
3088
- # @return [Google::Apis::ContentV2_1::OrderreportsListDisbursementsResponse]
2853
+ # @return [Google::Apis::ContentV2_1::PosCustomBatchResponse]
3089
2854
  #
3090
2855
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3091
2856
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3092
2857
  # @raise [Google::Apis::AuthorizationError] Authorization is required
3093
- def listdisbursements_orderreport(merchant_id, disbursement_end_date: nil, disbursement_start_date: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
3094
- command = make_simple_command(:get, '{merchantId}/orderreports/disbursements', options)
3095
- command.response_representation = Google::Apis::ContentV2_1::OrderreportsListDisbursementsResponse::Representation
3096
- command.response_class = Google::Apis::ContentV2_1::OrderreportsListDisbursementsResponse
3097
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3098
- command.query['disbursementEndDate'] = disbursement_end_date unless disbursement_end_date.nil?
3099
- command.query['disbursementStartDate'] = disbursement_start_date unless disbursement_start_date.nil?
3100
- command.query['maxResults'] = max_results unless max_results.nil?
3101
- command.query['pageToken'] = page_token unless page_token.nil?
2858
+ def custombatch_po(pos_custom_batch_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2859
+ command = make_simple_command(:post, 'pos/batch', options)
2860
+ command.request_representation = Google::Apis::ContentV2_1::PosCustomBatchRequest::Representation
2861
+ command.request_object = pos_custom_batch_request_object
2862
+ command.response_representation = Google::Apis::ContentV2_1::PosCustomBatchResponse::Representation
2863
+ command.response_class = Google::Apis::ContentV2_1::PosCustomBatchResponse
3102
2864
  command.query['fields'] = fields unless fields.nil?
3103
2865
  command.query['quotaUser'] = quota_user unless quota_user.nil?
3104
2866
  execute_or_queue_command(command, &block)
3105
2867
  end
3106
2868
 
3107
- # Retrieves a list of transactions for a disbursement from your Merchant Center
3108
- # account.
2869
+ # Deletes a store for the given merchant.
3109
2870
  # @param [Fixnum] merchant_id
3110
- # The ID of the account that manages the order. This cannot be a multi-client
3111
- # account.
3112
- # @param [String] disbursement_id
3113
- # The Google-provided ID of the disbursement (found in Wallet).
3114
- # @param [Fixnum] max_results
3115
- # The maximum number of disbursements to return in the response, used for paging.
3116
- # @param [String] page_token
3117
- # The token returned by the previous request.
3118
- # @param [String] transaction_end_date
3119
- # The last date in which transaction occurred. In ISO 8601 format. Default:
3120
- # current date.
3121
- # @param [String] transaction_start_date
3122
- # The first date in which transaction occurred. In ISO 8601 format.
2871
+ # The ID of the POS or inventory data provider.
2872
+ # @param [Fixnum] target_merchant_id
2873
+ # The ID of the target merchant.
2874
+ # @param [String] store_code
2875
+ # A store code that is unique per merchant.
3123
2876
  # @param [String] fields
3124
2877
  # Selector specifying which fields to include in a partial response.
3125
2878
  # @param [String] quota_user
@@ -3129,36 +2882,31 @@ module Google
3129
2882
  # Request-specific options
3130
2883
  #
3131
2884
  # @yield [result, err] Result & error if block supplied
3132
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreportsListTransactionsResponse] parsed result object
2885
+ # @yieldparam result [NilClass] No result returned for this method
3133
2886
  # @yieldparam err [StandardError] error object if request failed
3134
2887
  #
3135
- # @return [Google::Apis::ContentV2_1::OrderreportsListTransactionsResponse]
2888
+ # @return [void]
3136
2889
  #
3137
2890
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3138
2891
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3139
2892
  # @raise [Google::Apis::AuthorizationError] Authorization is required
3140
- def listtransactions_orderreport(merchant_id, disbursement_id, max_results: nil, page_token: nil, transaction_end_date: nil, transaction_start_date: nil, fields: nil, quota_user: nil, options: nil, &block)
3141
- command = make_simple_command(:get, '{merchantId}/orderreports/disbursements/{disbursementId}/transactions', options)
3142
- command.response_representation = Google::Apis::ContentV2_1::OrderreportsListTransactionsResponse::Representation
3143
- command.response_class = Google::Apis::ContentV2_1::OrderreportsListTransactionsResponse
2893
+ def delete_po(merchant_id, target_merchant_id, store_code, fields: nil, quota_user: nil, options: nil, &block)
2894
+ command = make_simple_command(:delete, '{merchantId}/pos/{targetMerchantId}/store/{storeCode}', options)
3144
2895
  command.params['merchantId'] = merchant_id unless merchant_id.nil?
3145
- command.params['disbursementId'] = disbursement_id unless disbursement_id.nil?
3146
- command.query['maxResults'] = max_results unless max_results.nil?
3147
- command.query['pageToken'] = page_token unless page_token.nil?
3148
- command.query['transactionEndDate'] = transaction_end_date unless transaction_end_date.nil?
3149
- command.query['transactionStartDate'] = transaction_start_date unless transaction_start_date.nil?
2896
+ command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
2897
+ command.params['storeCode'] = store_code unless store_code.nil?
3150
2898
  command.query['fields'] = fields unless fields.nil?
3151
2899
  command.query['quotaUser'] = quota_user unless quota_user.nil?
3152
2900
  execute_or_queue_command(command, &block)
3153
2901
  end
3154
2902
 
3155
- # Acks an order return in your Merchant Center account.
2903
+ # Retrieves information about the given store.
3156
2904
  # @param [Fixnum] merchant_id
3157
- # The ID of the account that manages the order. This cannot be a multi-client
3158
- # account.
3159
- # @param [String] return_id
3160
- # The ID of the return.
3161
- # @param [Google::Apis::ContentV2_1::OrderreturnsAcknowledgeRequest] orderreturns_acknowledge_request_object
2905
+ # The ID of the POS or inventory data provider.
2906
+ # @param [Fixnum] target_merchant_id
2907
+ # The ID of the target merchant.
2908
+ # @param [String] store_code
2909
+ # A store code that is unique per merchant.
3162
2910
  # @param [String] fields
3163
2911
  # Selector specifying which fields to include in a partial response.
3164
2912
  # @param [String] quota_user
@@ -3168,32 +2916,32 @@ module Google
3168
2916
  # Request-specific options
3169
2917
  #
3170
2918
  # @yield [result, err] Result & error if block supplied
3171
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreturnsAcknowledgeResponse] parsed result object
2919
+ # @yieldparam result [Google::Apis::ContentV2_1::PosStore] parsed result object
3172
2920
  # @yieldparam err [StandardError] error object if request failed
3173
2921
  #
3174
- # @return [Google::Apis::ContentV2_1::OrderreturnsAcknowledgeResponse]
2922
+ # @return [Google::Apis::ContentV2_1::PosStore]
3175
2923
  #
3176
2924
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3177
2925
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3178
2926
  # @raise [Google::Apis::AuthorizationError] Authorization is required
3179
- def acknowledge_orderreturn(merchant_id, return_id, orderreturns_acknowledge_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3180
- command = make_simple_command(:post, '{merchantId}/orderreturns/{returnId}/acknowledge', options)
3181
- command.request_representation = Google::Apis::ContentV2_1::OrderreturnsAcknowledgeRequest::Representation
3182
- command.request_object = orderreturns_acknowledge_request_object
3183
- command.response_representation = Google::Apis::ContentV2_1::OrderreturnsAcknowledgeResponse::Representation
3184
- command.response_class = Google::Apis::ContentV2_1::OrderreturnsAcknowledgeResponse
2927
+ def get_po(merchant_id, target_merchant_id, store_code, fields: nil, quota_user: nil, options: nil, &block)
2928
+ command = make_simple_command(:get, '{merchantId}/pos/{targetMerchantId}/store/{storeCode}', options)
2929
+ command.response_representation = Google::Apis::ContentV2_1::PosStore::Representation
2930
+ command.response_class = Google::Apis::ContentV2_1::PosStore
3185
2931
  command.params['merchantId'] = merchant_id unless merchant_id.nil?
3186
- command.params['returnId'] = return_id unless return_id.nil?
2932
+ command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
2933
+ command.params['storeCode'] = store_code unless store_code.nil?
3187
2934
  command.query['fields'] = fields unless fields.nil?
3188
2935
  command.query['quotaUser'] = quota_user unless quota_user.nil?
3189
2936
  execute_or_queue_command(command, &block)
3190
2937
  end
3191
2938
 
3192
- # Create return in your Merchant Center account.
2939
+ # Creates a store for the given merchant.
3193
2940
  # @param [Fixnum] merchant_id
3194
- # The ID of the account that manages the order. This cannot be a multi-client
3195
- # account.
3196
- # @param [Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnRequest] orderreturns_create_order_return_request_object
2941
+ # The ID of the POS or inventory data provider.
2942
+ # @param [Fixnum] target_merchant_id
2943
+ # The ID of the target merchant.
2944
+ # @param [Google::Apis::ContentV2_1::PosStore] pos_store_object
3197
2945
  # @param [String] fields
3198
2946
  # Selector specifying which fields to include in a partial response.
3199
2947
  # @param [String] quota_user
@@ -3203,32 +2951,33 @@ module Google
3203
2951
  # Request-specific options
3204
2952
  #
3205
2953
  # @yield [result, err] Result & error if block supplied
3206
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnResponse] parsed result object
2954
+ # @yieldparam result [Google::Apis::ContentV2_1::PosStore] parsed result object
3207
2955
  # @yieldparam err [StandardError] error object if request failed
3208
2956
  #
3209
- # @return [Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnResponse]
2957
+ # @return [Google::Apis::ContentV2_1::PosStore]
3210
2958
  #
3211
2959
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3212
2960
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3213
2961
  # @raise [Google::Apis::AuthorizationError] Authorization is required
3214
- def createorderreturn_orderreturn(merchant_id, orderreturns_create_order_return_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3215
- command = make_simple_command(:post, '{merchantId}/orderreturns/createOrderReturn', options)
3216
- command.request_representation = Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnRequest::Representation
3217
- command.request_object = orderreturns_create_order_return_request_object
3218
- command.response_representation = Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnResponse::Representation
3219
- command.response_class = Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnResponse
2962
+ def insert_po(merchant_id, target_merchant_id, pos_store_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2963
+ command = make_simple_command(:post, '{merchantId}/pos/{targetMerchantId}/store', options)
2964
+ command.request_representation = Google::Apis::ContentV2_1::PosStore::Representation
2965
+ command.request_object = pos_store_object
2966
+ command.response_representation = Google::Apis::ContentV2_1::PosStore::Representation
2967
+ command.response_class = Google::Apis::ContentV2_1::PosStore
3220
2968
  command.params['merchantId'] = merchant_id unless merchant_id.nil?
2969
+ command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
3221
2970
  command.query['fields'] = fields unless fields.nil?
3222
2971
  command.query['quotaUser'] = quota_user unless quota_user.nil?
3223
2972
  execute_or_queue_command(command, &block)
3224
2973
  end
3225
2974
 
3226
- # Retrieves an order return from your Merchant Center account.
2975
+ # Submit inventory for the given merchant.
3227
2976
  # @param [Fixnum] merchant_id
3228
- # The ID of the account that manages the order. This cannot be a multi-client
3229
- # account.
3230
- # @param [String] return_id
3231
- # Merchant order return ID generated by Google.
2977
+ # The ID of the POS or inventory data provider.
2978
+ # @param [Fixnum] target_merchant_id
2979
+ # The ID of the target merchant.
2980
+ # @param [Google::Apis::ContentV2_1::PosInventoryRequest] pos_inventory_request_object
3232
2981
  # @param [String] fields
3233
2982
  # Selector specifying which fields to include in a partial response.
3234
2983
  # @param [String] quota_user
@@ -3238,1253 +2987,28 @@ module Google
3238
2987
  # Request-specific options
3239
2988
  #
3240
2989
  # @yield [result, err] Result & error if block supplied
3241
- # @yieldparam result [Google::Apis::ContentV2_1::MerchantOrderReturn] parsed result object
2990
+ # @yieldparam result [Google::Apis::ContentV2_1::PosInventoryResponse] parsed result object
3242
2991
  # @yieldparam err [StandardError] error object if request failed
3243
2992
  #
3244
- # @return [Google::Apis::ContentV2_1::MerchantOrderReturn]
2993
+ # @return [Google::Apis::ContentV2_1::PosInventoryResponse]
3245
2994
  #
3246
2995
  # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3247
2996
  # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3248
2997
  # @raise [Google::Apis::AuthorizationError] Authorization is required
3249
- def get_orderreturn(merchant_id, return_id, fields: nil, quota_user: nil, options: nil, &block)
3250
- command = make_simple_command(:get, '{merchantId}/orderreturns/{returnId}', options)
3251
- command.response_representation = Google::Apis::ContentV2_1::MerchantOrderReturn::Representation
3252
- command.response_class = Google::Apis::ContentV2_1::MerchantOrderReturn
2998
+ def inventory_po(merchant_id, target_merchant_id, pos_inventory_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
2999
+ command = make_simple_command(:post, '{merchantId}/pos/{targetMerchantId}/inventory', options)
3000
+ command.request_representation = Google::Apis::ContentV2_1::PosInventoryRequest::Representation
3001
+ command.request_object = pos_inventory_request_object
3002
+ command.response_representation = Google::Apis::ContentV2_1::PosInventoryResponse::Representation
3003
+ command.response_class = Google::Apis::ContentV2_1::PosInventoryResponse
3253
3004
  command.params['merchantId'] = merchant_id unless merchant_id.nil?
3254
- command.params['returnId'] = return_id unless return_id.nil?
3005
+ command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
3255
3006
  command.query['fields'] = fields unless fields.nil?
3256
3007
  command.query['quotaUser'] = quota_user unless quota_user.nil?
3257
3008
  execute_or_queue_command(command, &block)
3258
3009
  end
3259
3010
 
3260
- # Lists order returns in your Merchant Center account.
3261
- # @param [Fixnum] merchant_id
3262
- # The ID of the account that manages the order. This cannot be a multi-client
3263
- # account.
3264
- # @param [Boolean] acknowledged
3265
- # Obtains order returns that match the acknowledgement status. When set to true,
3266
- # obtains order returns that have been acknowledged. When false, obtains order
3267
- # returns that have not been acknowledged. When not provided, obtains order
3268
- # returns regardless of their acknowledgement status. We recommend using this
3269
- # filter set to `false`, in conjunction with the `acknowledge` call, such that
3270
- # only un-acknowledged order returns are returned.
3271
- # @param [String] created_end_date
3272
- # Obtains order returns created before this date (inclusively), in ISO 8601
3273
- # format.
3274
- # @param [String] created_start_date
3275
- # Obtains order returns created after this date (inclusively), in ISO 8601
3276
- # format.
3277
- # @param [Array<String>, String] google_order_ids
3278
- # Obtains order returns with the specified order ids. If this parameter is
3279
- # provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus,
3280
- # shipmentState and acknowledged parameters must be not set. Note: if
3281
- # googleOrderId and shipmentTrackingNumber parameters are provided, the obtained
3282
- # results will include all order returns that either match the specified order
3283
- # id or the specified tracking number.
3284
- # @param [Fixnum] max_results
3285
- # The maximum number of order returns to return in the response, used for paging.
3286
- # The default value is 25 returns per page, and the maximum allowed value is
3287
- # 250 returns per page.
3288
- # @param [String] order_by
3289
- # Return the results in the specified order.
3290
- # @param [String] page_token
3291
- # The token returned by the previous request.
3292
- # @param [Array<String>, String] shipment_states
3293
- # Obtains order returns that match any shipment state provided in this parameter.
3294
- # When this parameter is not provided, order returns are obtained regardless of
3295
- # their shipment states.
3296
- # @param [Array<String>, String] shipment_status
3297
- # Obtains order returns that match any shipment status provided in this
3298
- # parameter. When this parameter is not provided, order returns are obtained
3299
- # regardless of their shipment statuses.
3300
- # @param [Array<String>, String] shipment_tracking_numbers
3301
- # Obtains order returns with the specified tracking numbers. If this parameter
3302
- # is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus,
3303
- # shipmentState and acknowledged parameters must be not set. Note: if
3304
- # googleOrderId and shipmentTrackingNumber parameters are provided, the obtained
3305
- # results will include all order returns that either match the specified order
3306
- # id or the specified tracking number.
3307
- # @param [Array<String>, String] shipment_types
3308
- # Obtains order returns that match any shipment type provided in this parameter.
3309
- # When this parameter is not provided, order returns are obtained regardless of
3310
- # their shipment types.
3311
- # @param [String] fields
3312
- # Selector specifying which fields to include in a partial response.
3313
- # @param [String] quota_user
3314
- # Available to use for quota purposes for server-side applications. Can be any
3315
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3316
- # @param [Google::Apis::RequestOptions] options
3317
- # Request-specific options
3318
- #
3319
- # @yield [result, err] Result & error if block supplied
3320
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreturnsListResponse] parsed result object
3321
- # @yieldparam err [StandardError] error object if request failed
3322
- #
3323
- # @return [Google::Apis::ContentV2_1::OrderreturnsListResponse]
3324
- #
3325
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3326
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3327
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3328
- def list_orderreturns(merchant_id, acknowledged: nil, created_end_date: nil, created_start_date: nil, google_order_ids: nil, max_results: nil, order_by: nil, page_token: nil, shipment_states: nil, shipment_status: nil, shipment_tracking_numbers: nil, shipment_types: nil, fields: nil, quota_user: nil, options: nil, &block)
3329
- command = make_simple_command(:get, '{merchantId}/orderreturns', options)
3330
- command.response_representation = Google::Apis::ContentV2_1::OrderreturnsListResponse::Representation
3331
- command.response_class = Google::Apis::ContentV2_1::OrderreturnsListResponse
3332
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3333
- command.query['acknowledged'] = acknowledged unless acknowledged.nil?
3334
- command.query['createdEndDate'] = created_end_date unless created_end_date.nil?
3335
- command.query['createdStartDate'] = created_start_date unless created_start_date.nil?
3336
- command.query['googleOrderIds'] = google_order_ids unless google_order_ids.nil?
3337
- command.query['maxResults'] = max_results unless max_results.nil?
3338
- command.query['orderBy'] = order_by unless order_by.nil?
3339
- command.query['pageToken'] = page_token unless page_token.nil?
3340
- command.query['shipmentStates'] = shipment_states unless shipment_states.nil?
3341
- command.query['shipmentStatus'] = shipment_status unless shipment_status.nil?
3342
- command.query['shipmentTrackingNumbers'] = shipment_tracking_numbers unless shipment_tracking_numbers.nil?
3343
- command.query['shipmentTypes'] = shipment_types unless shipment_types.nil?
3344
- command.query['fields'] = fields unless fields.nil?
3345
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3346
- execute_or_queue_command(command, &block)
3347
- end
3348
-
3349
- # Processes return in your Merchant Center account.
3350
- # @param [Fixnum] merchant_id
3351
- # The ID of the account that manages the order. This cannot be a multi-client
3352
- # account.
3353
- # @param [String] return_id
3354
- # The ID of the return.
3355
- # @param [Google::Apis::ContentV2_1::OrderreturnsProcessRequest] orderreturns_process_request_object
3356
- # @param [String] fields
3357
- # Selector specifying which fields to include in a partial response.
3358
- # @param [String] quota_user
3359
- # Available to use for quota purposes for server-side applications. Can be any
3360
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3361
- # @param [Google::Apis::RequestOptions] options
3362
- # Request-specific options
3363
- #
3364
- # @yield [result, err] Result & error if block supplied
3365
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreturnsProcessResponse] parsed result object
3366
- # @yieldparam err [StandardError] error object if request failed
3367
- #
3368
- # @return [Google::Apis::ContentV2_1::OrderreturnsProcessResponse]
3369
- #
3370
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3371
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3372
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3373
- def process_orderreturn(merchant_id, return_id, orderreturns_process_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3374
- command = make_simple_command(:post, '{merchantId}/orderreturns/{returnId}/process', options)
3375
- command.request_representation = Google::Apis::ContentV2_1::OrderreturnsProcessRequest::Representation
3376
- command.request_object = orderreturns_process_request_object
3377
- command.response_representation = Google::Apis::ContentV2_1::OrderreturnsProcessResponse::Representation
3378
- command.response_class = Google::Apis::ContentV2_1::OrderreturnsProcessResponse
3379
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3380
- command.params['returnId'] = return_id unless return_id.nil?
3381
- command.query['fields'] = fields unless fields.nil?
3382
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3383
- execute_or_queue_command(command, &block)
3384
- end
3385
-
3386
- # Links a return shipping label to a return id. You can only create one return
3387
- # label per return id. Since the label is sent to the buyer, the linked return
3388
- # label cannot be updated or deleted. If you try to create multiple return
3389
- # shipping labels for a single return id, every create request except the first
3390
- # will fail.
3391
- # @param [Fixnum] merchant_id
3392
- # Required. The merchant the Return Shipping Label belongs to.
3393
- # @param [String] return_id
3394
- # Required. Provide the Google-generated merchant order return ID.
3395
- # @param [Google::Apis::ContentV2_1::ReturnShippingLabel] return_shipping_label_object
3396
- # @param [String] fields
3397
- # Selector specifying which fields to include in a partial response.
3398
- # @param [String] quota_user
3399
- # Available to use for quota purposes for server-side applications. Can be any
3400
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3401
- # @param [Google::Apis::RequestOptions] options
3402
- # Request-specific options
3403
- #
3404
- # @yield [result, err] Result & error if block supplied
3405
- # @yieldparam result [Google::Apis::ContentV2_1::ReturnShippingLabel] parsed result object
3406
- # @yieldparam err [StandardError] error object if request failed
3407
- #
3408
- # @return [Google::Apis::ContentV2_1::ReturnShippingLabel]
3409
- #
3410
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3411
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3412
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3413
- def create_orderreturn_label(merchant_id, return_id, return_shipping_label_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3414
- command = make_simple_command(:post, '{merchantId}/orderreturns/{returnId}/labels', options)
3415
- command.request_representation = Google::Apis::ContentV2_1::ReturnShippingLabel::Representation
3416
- command.request_object = return_shipping_label_object
3417
- command.response_representation = Google::Apis::ContentV2_1::ReturnShippingLabel::Representation
3418
- command.response_class = Google::Apis::ContentV2_1::ReturnShippingLabel
3419
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3420
- command.params['returnId'] = return_id unless return_id.nil?
3421
- command.query['fields'] = fields unless fields.nil?
3422
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3423
- execute_or_queue_command(command, &block)
3424
- end
3425
-
3426
- # Marks an order as acknowledged.
3427
- # @param [Fixnum] merchant_id
3428
- # The ID of the account that manages the order. This cannot be a multi-client
3429
- # account.
3430
- # @param [String] order_id
3431
- # The ID of the order.
3432
- # @param [Google::Apis::ContentV2_1::OrdersAcknowledgeRequest] orders_acknowledge_request_object
3433
- # @param [String] fields
3434
- # Selector specifying which fields to include in a partial response.
3435
- # @param [String] quota_user
3436
- # Available to use for quota purposes for server-side applications. Can be any
3437
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3438
- # @param [Google::Apis::RequestOptions] options
3439
- # Request-specific options
3440
- #
3441
- # @yield [result, err] Result & error if block supplied
3442
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersAcknowledgeResponse] parsed result object
3443
- # @yieldparam err [StandardError] error object if request failed
3444
- #
3445
- # @return [Google::Apis::ContentV2_1::OrdersAcknowledgeResponse]
3446
- #
3447
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3448
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3449
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3450
- def acknowledge_order(merchant_id, order_id, orders_acknowledge_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3451
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/acknowledge', options)
3452
- command.request_representation = Google::Apis::ContentV2_1::OrdersAcknowledgeRequest::Representation
3453
- command.request_object = orders_acknowledge_request_object
3454
- command.response_representation = Google::Apis::ContentV2_1::OrdersAcknowledgeResponse::Representation
3455
- command.response_class = Google::Apis::ContentV2_1::OrdersAcknowledgeResponse
3456
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3457
- command.params['orderId'] = order_id unless order_id.nil?
3458
- command.query['fields'] = fields unless fields.nil?
3459
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3460
- execute_or_queue_command(command, &block)
3461
- end
3462
-
3463
- # Sandbox only. Moves a test order from state "`inProgress`" to state "`
3464
- # pendingShipment`".
3465
- # @param [Fixnum] merchant_id
3466
- # The ID of the account that manages the order. This cannot be a multi-client
3467
- # account.
3468
- # @param [String] order_id
3469
- # The ID of the test order to modify.
3470
- # @param [String] fields
3471
- # Selector specifying which fields to include in a partial response.
3472
- # @param [String] quota_user
3473
- # Available to use for quota purposes for server-side applications. Can be any
3474
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3475
- # @param [Google::Apis::RequestOptions] options
3476
- # Request-specific options
3477
- #
3478
- # @yield [result, err] Result & error if block supplied
3479
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersAdvanceTestOrderResponse] parsed result object
3480
- # @yieldparam err [StandardError] error object if request failed
3481
- #
3482
- # @return [Google::Apis::ContentV2_1::OrdersAdvanceTestOrderResponse]
3483
- #
3484
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3485
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3486
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3487
- def advancetestorder_order(merchant_id, order_id, fields: nil, quota_user: nil, options: nil, &block)
3488
- command = make_simple_command(:post, '{merchantId}/testorders/{orderId}/advance', options)
3489
- command.response_representation = Google::Apis::ContentV2_1::OrdersAdvanceTestOrderResponse::Representation
3490
- command.response_class = Google::Apis::ContentV2_1::OrdersAdvanceTestOrderResponse
3491
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3492
- command.params['orderId'] = order_id unless order_id.nil?
3493
- command.query['fields'] = fields unless fields.nil?
3494
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3495
- execute_or_queue_command(command, &block)
3496
- end
3497
-
3498
- # Cancels all line items in an order, making a full refund.
3499
- # @param [Fixnum] merchant_id
3500
- # The ID of the account that manages the order. This cannot be a multi-client
3501
- # account.
3502
- # @param [String] order_id
3503
- # The ID of the order to cancel.
3504
- # @param [Google::Apis::ContentV2_1::OrdersCancelRequest] orders_cancel_request_object
3505
- # @param [String] fields
3506
- # Selector specifying which fields to include in a partial response.
3507
- # @param [String] quota_user
3508
- # Available to use for quota purposes for server-side applications. Can be any
3509
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3510
- # @param [Google::Apis::RequestOptions] options
3511
- # Request-specific options
3512
- #
3513
- # @yield [result, err] Result & error if block supplied
3514
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersCancelResponse] parsed result object
3515
- # @yieldparam err [StandardError] error object if request failed
3516
- #
3517
- # @return [Google::Apis::ContentV2_1::OrdersCancelResponse]
3518
- #
3519
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3520
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3521
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3522
- def cancel_order(merchant_id, order_id, orders_cancel_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3523
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/cancel', options)
3524
- command.request_representation = Google::Apis::ContentV2_1::OrdersCancelRequest::Representation
3525
- command.request_object = orders_cancel_request_object
3526
- command.response_representation = Google::Apis::ContentV2_1::OrdersCancelResponse::Representation
3527
- command.response_class = Google::Apis::ContentV2_1::OrdersCancelResponse
3528
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3529
- command.params['orderId'] = order_id unless order_id.nil?
3530
- command.query['fields'] = fields unless fields.nil?
3531
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3532
- execute_or_queue_command(command, &block)
3533
- end
3534
-
3535
- # Cancels a line item, making a full refund.
3536
- # @param [Fixnum] merchant_id
3537
- # The ID of the account that manages the order. This cannot be a multi-client
3538
- # account.
3539
- # @param [String] order_id
3540
- # The ID of the order.
3541
- # @param [Google::Apis::ContentV2_1::OrdersCancelLineItemRequest] orders_cancel_line_item_request_object
3542
- # @param [String] fields
3543
- # Selector specifying which fields to include in a partial response.
3544
- # @param [String] quota_user
3545
- # Available to use for quota purposes for server-side applications. Can be any
3546
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3547
- # @param [Google::Apis::RequestOptions] options
3548
- # Request-specific options
3549
- #
3550
- # @yield [result, err] Result & error if block supplied
3551
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersCancelLineItemResponse] parsed result object
3552
- # @yieldparam err [StandardError] error object if request failed
3553
- #
3554
- # @return [Google::Apis::ContentV2_1::OrdersCancelLineItemResponse]
3555
- #
3556
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3557
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3558
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3559
- def cancellineitem_order(merchant_id, order_id, orders_cancel_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3560
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/cancelLineItem', options)
3561
- command.request_representation = Google::Apis::ContentV2_1::OrdersCancelLineItemRequest::Representation
3562
- command.request_object = orders_cancel_line_item_request_object
3563
- command.response_representation = Google::Apis::ContentV2_1::OrdersCancelLineItemResponse::Representation
3564
- command.response_class = Google::Apis::ContentV2_1::OrdersCancelLineItemResponse
3565
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3566
- command.params['orderId'] = order_id unless order_id.nil?
3567
- command.query['fields'] = fields unless fields.nil?
3568
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3569
- execute_or_queue_command(command, &block)
3570
- end
3571
-
3572
- # Sandbox only. Cancels a test order for customer-initiated cancellation.
3573
- # @param [Fixnum] merchant_id
3574
- # The ID of the account that manages the order. This cannot be a multi-client
3575
- # account.
3576
- # @param [String] order_id
3577
- # The ID of the test order to cancel.
3578
- # @param [Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerRequest] orders_cancel_test_order_by_customer_request_object
3579
- # @param [String] fields
3580
- # Selector specifying which fields to include in a partial response.
3581
- # @param [String] quota_user
3582
- # Available to use for quota purposes for server-side applications. Can be any
3583
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3584
- # @param [Google::Apis::RequestOptions] options
3585
- # Request-specific options
3586
- #
3587
- # @yield [result, err] Result & error if block supplied
3588
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerResponse] parsed result object
3589
- # @yieldparam err [StandardError] error object if request failed
3590
- #
3591
- # @return [Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerResponse]
3592
- #
3593
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3594
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3595
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3596
- def canceltestorderbycustomer_order(merchant_id, order_id, orders_cancel_test_order_by_customer_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3597
- command = make_simple_command(:post, '{merchantId}/testorders/{orderId}/cancelByCustomer', options)
3598
- command.request_representation = Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerRequest::Representation
3599
- command.request_object = orders_cancel_test_order_by_customer_request_object
3600
- command.response_representation = Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerResponse::Representation
3601
- command.response_class = Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerResponse
3602
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3603
- command.params['orderId'] = order_id unless order_id.nil?
3604
- command.query['fields'] = fields unless fields.nil?
3605
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3606
- execute_or_queue_command(command, &block)
3607
- end
3608
-
3609
- # Capture funds from the customer for the current order total. This method
3610
- # should be called after the merchant verifies that they are able and ready to
3611
- # start shipping the order. This method blocks until a response is received from
3612
- # the payment processsor. If this method succeeds, the merchant is guaranteed to
3613
- # receive funds for the order after shipment. If the request fails, it can be
3614
- # retried or the order may be cancelled. This method cannot be called after the
3615
- # entire order is already shipped. A rejected error code is returned when the
3616
- # payment service provider has declined the charge. This indicates a problem
3617
- # between the PSP and either the merchant's or customer's account. Sometimes
3618
- # this error will be resolved by the customer. We recommend retrying these
3619
- # errors once per day or cancelling the order with reason `failedToCaptureFunds`
3620
- # if the items cannot be held.
3621
- # @param [Fixnum] merchant_id
3622
- # Required. The ID of the account that manages the order. This cannot be a multi-
3623
- # client account.
3624
- # @param [String] order_id
3625
- # Required. The ID of the Order.
3626
- # @param [Google::Apis::ContentV2_1::CaptureOrderRequest] capture_order_request_object
3627
- # @param [String] fields
3628
- # Selector specifying which fields to include in a partial response.
3629
- # @param [String] quota_user
3630
- # Available to use for quota purposes for server-side applications. Can be any
3631
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3632
- # @param [Google::Apis::RequestOptions] options
3633
- # Request-specific options
3634
- #
3635
- # @yield [result, err] Result & error if block supplied
3636
- # @yieldparam result [Google::Apis::ContentV2_1::CaptureOrderResponse] parsed result object
3637
- # @yieldparam err [StandardError] error object if request failed
3638
- #
3639
- # @return [Google::Apis::ContentV2_1::CaptureOrderResponse]
3640
- #
3641
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3642
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3643
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3644
- def capture_order(merchant_id, order_id, capture_order_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3645
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/captureOrder', options)
3646
- command.request_representation = Google::Apis::ContentV2_1::CaptureOrderRequest::Representation
3647
- command.request_object = capture_order_request_object
3648
- command.response_representation = Google::Apis::ContentV2_1::CaptureOrderResponse::Representation
3649
- command.response_class = Google::Apis::ContentV2_1::CaptureOrderResponse
3650
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3651
- command.params['orderId'] = order_id unless order_id.nil?
3652
- command.query['fields'] = fields unless fields.nil?
3653
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3654
- execute_or_queue_command(command, &block)
3655
- end
3656
-
3657
- # Sandbox only. Creates a test order.
3658
- # @param [Fixnum] merchant_id
3659
- # The ID of the account that should manage the order. This cannot be a multi-
3660
- # client account.
3661
- # @param [Google::Apis::ContentV2_1::OrdersCreateTestOrderRequest] orders_create_test_order_request_object
3662
- # @param [String] fields
3663
- # Selector specifying which fields to include in a partial response.
3664
- # @param [String] quota_user
3665
- # Available to use for quota purposes for server-side applications. Can be any
3666
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3667
- # @param [Google::Apis::RequestOptions] options
3668
- # Request-specific options
3669
- #
3670
- # @yield [result, err] Result & error if block supplied
3671
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersCreateTestOrderResponse] parsed result object
3672
- # @yieldparam err [StandardError] error object if request failed
3673
- #
3674
- # @return [Google::Apis::ContentV2_1::OrdersCreateTestOrderResponse]
3675
- #
3676
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3677
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3678
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3679
- def createtestorder_order(merchant_id, orders_create_test_order_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3680
- command = make_simple_command(:post, '{merchantId}/testorders', options)
3681
- command.request_representation = Google::Apis::ContentV2_1::OrdersCreateTestOrderRequest::Representation
3682
- command.request_object = orders_create_test_order_request_object
3683
- command.response_representation = Google::Apis::ContentV2_1::OrdersCreateTestOrderResponse::Representation
3684
- command.response_class = Google::Apis::ContentV2_1::OrdersCreateTestOrderResponse
3685
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3686
- command.query['fields'] = fields unless fields.nil?
3687
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3688
- execute_or_queue_command(command, &block)
3689
- end
3690
-
3691
- # Sandbox only. Creates a test return.
3692
- # @param [Fixnum] merchant_id
3693
- # The ID of the account that manages the order. This cannot be a multi-client
3694
- # account.
3695
- # @param [String] order_id
3696
- # The ID of the order.
3697
- # @param [Google::Apis::ContentV2_1::OrdersCreateTestReturnRequest] orders_create_test_return_request_object
3698
- # @param [String] fields
3699
- # Selector specifying which fields to include in a partial response.
3700
- # @param [String] quota_user
3701
- # Available to use for quota purposes for server-side applications. Can be any
3702
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3703
- # @param [Google::Apis::RequestOptions] options
3704
- # Request-specific options
3705
- #
3706
- # @yield [result, err] Result & error if block supplied
3707
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersCreateTestReturnResponse] parsed result object
3708
- # @yieldparam err [StandardError] error object if request failed
3709
- #
3710
- # @return [Google::Apis::ContentV2_1::OrdersCreateTestReturnResponse]
3711
- #
3712
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3713
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3714
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3715
- def createtestreturn_order(merchant_id, order_id, orders_create_test_return_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3716
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/testreturn', options)
3717
- command.request_representation = Google::Apis::ContentV2_1::OrdersCreateTestReturnRequest::Representation
3718
- command.request_object = orders_create_test_return_request_object
3719
- command.response_representation = Google::Apis::ContentV2_1::OrdersCreateTestReturnResponse::Representation
3720
- command.response_class = Google::Apis::ContentV2_1::OrdersCreateTestReturnResponse
3721
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3722
- command.params['orderId'] = order_id unless order_id.nil?
3723
- command.query['fields'] = fields unless fields.nil?
3724
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3725
- execute_or_queue_command(command, &block)
3726
- end
3727
-
3728
- # Retrieves an order from your Merchant Center account.
3729
- # @param [Fixnum] merchant_id
3730
- # The ID of the account that manages the order. This cannot be a multi-client
3731
- # account.
3732
- # @param [String] order_id
3733
- # The ID of the order.
3734
- # @param [String] fields
3735
- # Selector specifying which fields to include in a partial response.
3736
- # @param [String] quota_user
3737
- # Available to use for quota purposes for server-side applications. Can be any
3738
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3739
- # @param [Google::Apis::RequestOptions] options
3740
- # Request-specific options
3741
- #
3742
- # @yield [result, err] Result & error if block supplied
3743
- # @yieldparam result [Google::Apis::ContentV2_1::Order] parsed result object
3744
- # @yieldparam err [StandardError] error object if request failed
3745
- #
3746
- # @return [Google::Apis::ContentV2_1::Order]
3747
- #
3748
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3749
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3750
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3751
- def get_order(merchant_id, order_id, fields: nil, quota_user: nil, options: nil, &block)
3752
- command = make_simple_command(:get, '{merchantId}/orders/{orderId}', options)
3753
- command.response_representation = Google::Apis::ContentV2_1::Order::Representation
3754
- command.response_class = Google::Apis::ContentV2_1::Order
3755
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3756
- command.params['orderId'] = order_id unless order_id.nil?
3757
- command.query['fields'] = fields unless fields.nil?
3758
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3759
- execute_or_queue_command(command, &block)
3760
- end
3761
-
3762
- # Retrieves an order using merchant order ID.
3763
- # @param [Fixnum] merchant_id
3764
- # The ID of the account that manages the order. This cannot be a multi-client
3765
- # account.
3766
- # @param [String] merchant_order_id
3767
- # The merchant order ID to be looked for.
3768
- # @param [String] fields
3769
- # Selector specifying which fields to include in a partial response.
3770
- # @param [String] quota_user
3771
- # Available to use for quota purposes for server-side applications. Can be any
3772
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3773
- # @param [Google::Apis::RequestOptions] options
3774
- # Request-specific options
3775
- #
3776
- # @yield [result, err] Result & error if block supplied
3777
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersGetByMerchantOrderIdResponse] parsed result object
3778
- # @yieldparam err [StandardError] error object if request failed
3779
- #
3780
- # @return [Google::Apis::ContentV2_1::OrdersGetByMerchantOrderIdResponse]
3781
- #
3782
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3783
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3784
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3785
- def getbymerchantorderid_order(merchant_id, merchant_order_id, fields: nil, quota_user: nil, options: nil, &block)
3786
- command = make_simple_command(:get, '{merchantId}/ordersbymerchantid/{merchantOrderId}', options)
3787
- command.response_representation = Google::Apis::ContentV2_1::OrdersGetByMerchantOrderIdResponse::Representation
3788
- command.response_class = Google::Apis::ContentV2_1::OrdersGetByMerchantOrderIdResponse
3789
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3790
- command.params['merchantOrderId'] = merchant_order_id unless merchant_order_id.nil?
3791
- command.query['fields'] = fields unless fields.nil?
3792
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3793
- execute_or_queue_command(command, &block)
3794
- end
3795
-
3796
- # Sandbox only. Retrieves an order template that can be used to quickly create a
3797
- # new order in sandbox.
3798
- # @param [Fixnum] merchant_id
3799
- # The ID of the account that should manage the order. This cannot be a multi-
3800
- # client account.
3801
- # @param [String] template_name
3802
- # The name of the template to retrieve.
3803
- # @param [String] country
3804
- # The country of the template to retrieve. Defaults to "`US`".
3805
- # @param [String] fields
3806
- # Selector specifying which fields to include in a partial response.
3807
- # @param [String] quota_user
3808
- # Available to use for quota purposes for server-side applications. Can be any
3809
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3810
- # @param [Google::Apis::RequestOptions] options
3811
- # Request-specific options
3812
- #
3813
- # @yield [result, err] Result & error if block supplied
3814
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersGetTestOrderTemplateResponse] parsed result object
3815
- # @yieldparam err [StandardError] error object if request failed
3816
- #
3817
- # @return [Google::Apis::ContentV2_1::OrdersGetTestOrderTemplateResponse]
3818
- #
3819
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3820
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3821
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3822
- def gettestordertemplate_order(merchant_id, template_name, country: nil, fields: nil, quota_user: nil, options: nil, &block)
3823
- command = make_simple_command(:get, '{merchantId}/testordertemplates/{templateName}', options)
3824
- command.response_representation = Google::Apis::ContentV2_1::OrdersGetTestOrderTemplateResponse::Representation
3825
- command.response_class = Google::Apis::ContentV2_1::OrdersGetTestOrderTemplateResponse
3826
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3827
- command.params['templateName'] = template_name unless template_name.nil?
3828
- command.query['country'] = country unless country.nil?
3829
- command.query['fields'] = fields unless fields.nil?
3830
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3831
- execute_or_queue_command(command, &block)
3832
- end
3833
-
3834
- # Deprecated. Notifies that item return and refund was handled directly by
3835
- # merchant outside of Google payments processing (for example, cash refund done
3836
- # in store). Note: We recommend calling the returnrefundlineitem method to
3837
- # refund in-store returns. We will issue the refund directly to the customer.
3838
- # This helps to prevent possible differences arising between merchant and Google
3839
- # transaction records. We also recommend having the point of sale system
3840
- # communicate with Google to ensure that customers do not receive a double
3841
- # refund by first refunding through Google then through an in-store return.
3842
- # @param [Fixnum] merchant_id
3843
- # The ID of the account that manages the order. This cannot be a multi-client
3844
- # account.
3845
- # @param [String] order_id
3846
- # The ID of the order.
3847
- # @param [Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemRequest] orders_in_store_refund_line_item_request_object
3848
- # @param [String] fields
3849
- # Selector specifying which fields to include in a partial response.
3850
- # @param [String] quota_user
3851
- # Available to use for quota purposes for server-side applications. Can be any
3852
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3853
- # @param [Google::Apis::RequestOptions] options
3854
- # Request-specific options
3855
- #
3856
- # @yield [result, err] Result & error if block supplied
3857
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemResponse] parsed result object
3858
- # @yieldparam err [StandardError] error object if request failed
3859
- #
3860
- # @return [Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemResponse]
3861
- #
3862
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3863
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3864
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3865
- def instorerefundlineitem_order(merchant_id, order_id, orders_in_store_refund_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3866
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/inStoreRefundLineItem', options)
3867
- command.request_representation = Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemRequest::Representation
3868
- command.request_object = orders_in_store_refund_line_item_request_object
3869
- command.response_representation = Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemResponse::Representation
3870
- command.response_class = Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemResponse
3871
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3872
- command.params['orderId'] = order_id unless order_id.nil?
3873
- command.query['fields'] = fields unless fields.nil?
3874
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3875
- execute_or_queue_command(command, &block)
3876
- end
3877
-
3878
- # Lists the orders in your Merchant Center account.
3879
- # @param [Fixnum] merchant_id
3880
- # The ID of the account that manages the order. This cannot be a multi-client
3881
- # account.
3882
- # @param [Boolean] acknowledged
3883
- # Obtains orders that match the acknowledgement status. When set to true,
3884
- # obtains orders that have been acknowledged. When false, obtains orders that
3885
- # have not been acknowledged. We recommend using this filter set to `false`, in
3886
- # conjunction with the `acknowledge` call, such that only un-acknowledged orders
3887
- # are returned.
3888
- # @param [Fixnum] max_results
3889
- # The maximum number of orders to return in the response, used for paging. The
3890
- # default value is 25 orders per page, and the maximum allowed value is 250
3891
- # orders per page.
3892
- # @param [String] order_by
3893
- # Order results by placement date in descending or ascending order. Acceptable
3894
- # values are: - placedDateAsc - placedDateDesc
3895
- # @param [String] page_token
3896
- # The token returned by the previous request.
3897
- # @param [String] placed_date_end
3898
- # Obtains orders placed before this date (exclusively), in ISO 8601 format.
3899
- # @param [String] placed_date_start
3900
- # Obtains orders placed after this date (inclusively), in ISO 8601 format.
3901
- # @param [Array<String>, String] statuses
3902
- # Obtains orders that match any of the specified statuses. Note that `active` is
3903
- # a shortcut for `pendingShipment` and `partiallyShipped`, and `completed` is a
3904
- # shortcut for `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`,
3905
- # `returned`, and `canceled`.
3906
- # @param [String] fields
3907
- # Selector specifying which fields to include in a partial response.
3908
- # @param [String] quota_user
3909
- # Available to use for quota purposes for server-side applications. Can be any
3910
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3911
- # @param [Google::Apis::RequestOptions] options
3912
- # Request-specific options
3913
- #
3914
- # @yield [result, err] Result & error if block supplied
3915
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersListResponse] parsed result object
3916
- # @yieldparam err [StandardError] error object if request failed
3917
- #
3918
- # @return [Google::Apis::ContentV2_1::OrdersListResponse]
3919
- #
3920
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3921
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3922
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3923
- def list_orders(merchant_id, acknowledged: nil, max_results: nil, order_by: nil, page_token: nil, placed_date_end: nil, placed_date_start: nil, statuses: nil, fields: nil, quota_user: nil, options: nil, &block)
3924
- command = make_simple_command(:get, '{merchantId}/orders', options)
3925
- command.response_representation = Google::Apis::ContentV2_1::OrdersListResponse::Representation
3926
- command.response_class = Google::Apis::ContentV2_1::OrdersListResponse
3927
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3928
- command.query['acknowledged'] = acknowledged unless acknowledged.nil?
3929
- command.query['maxResults'] = max_results unless max_results.nil?
3930
- command.query['orderBy'] = order_by unless order_by.nil?
3931
- command.query['pageToken'] = page_token unless page_token.nil?
3932
- command.query['placedDateEnd'] = placed_date_end unless placed_date_end.nil?
3933
- command.query['placedDateStart'] = placed_date_start unless placed_date_start.nil?
3934
- command.query['statuses'] = statuses unless statuses.nil?
3935
- command.query['fields'] = fields unless fields.nil?
3936
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3937
- execute_or_queue_command(command, &block)
3938
- end
3939
-
3940
- # Issues a partial or total refund for items and shipment.
3941
- # @param [Fixnum] merchant_id
3942
- # The ID of the account that manages the order. This cannot be a multi-client
3943
- # account.
3944
- # @param [String] order_id
3945
- # The ID of the order to refund.
3946
- # @param [Google::Apis::ContentV2_1::OrdersRefundItemRequest] orders_refund_item_request_object
3947
- # @param [String] fields
3948
- # Selector specifying which fields to include in a partial response.
3949
- # @param [String] quota_user
3950
- # Available to use for quota purposes for server-side applications. Can be any
3951
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3952
- # @param [Google::Apis::RequestOptions] options
3953
- # Request-specific options
3954
- #
3955
- # @yield [result, err] Result & error if block supplied
3956
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersRefundItemResponse] parsed result object
3957
- # @yieldparam err [StandardError] error object if request failed
3958
- #
3959
- # @return [Google::Apis::ContentV2_1::OrdersRefundItemResponse]
3960
- #
3961
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3962
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3963
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3964
- def refunditem_order(merchant_id, order_id, orders_refund_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3965
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/refunditem', options)
3966
- command.request_representation = Google::Apis::ContentV2_1::OrdersRefundItemRequest::Representation
3967
- command.request_object = orders_refund_item_request_object
3968
- command.response_representation = Google::Apis::ContentV2_1::OrdersRefundItemResponse::Representation
3969
- command.response_class = Google::Apis::ContentV2_1::OrdersRefundItemResponse
3970
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3971
- command.params['orderId'] = order_id unless order_id.nil?
3972
- command.query['fields'] = fields unless fields.nil?
3973
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3974
- execute_or_queue_command(command, &block)
3975
- end
3976
-
3977
- # Issues a partial or total refund for an order.
3978
- # @param [Fixnum] merchant_id
3979
- # The ID of the account that manages the order. This cannot be a multi-client
3980
- # account.
3981
- # @param [String] order_id
3982
- # The ID of the order to refund.
3983
- # @param [Google::Apis::ContentV2_1::OrdersRefundOrderRequest] orders_refund_order_request_object
3984
- # @param [String] fields
3985
- # Selector specifying which fields to include in a partial response.
3986
- # @param [String] quota_user
3987
- # Available to use for quota purposes for server-side applications. Can be any
3988
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3989
- # @param [Google::Apis::RequestOptions] options
3990
- # Request-specific options
3991
- #
3992
- # @yield [result, err] Result & error if block supplied
3993
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersRefundOrderResponse] parsed result object
3994
- # @yieldparam err [StandardError] error object if request failed
3995
- #
3996
- # @return [Google::Apis::ContentV2_1::OrdersRefundOrderResponse]
3997
- #
3998
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3999
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4000
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4001
- def refundorder_order(merchant_id, order_id, orders_refund_order_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4002
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/refundorder', options)
4003
- command.request_representation = Google::Apis::ContentV2_1::OrdersRefundOrderRequest::Representation
4004
- command.request_object = orders_refund_order_request_object
4005
- command.response_representation = Google::Apis::ContentV2_1::OrdersRefundOrderResponse::Representation
4006
- command.response_class = Google::Apis::ContentV2_1::OrdersRefundOrderResponse
4007
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4008
- command.params['orderId'] = order_id unless order_id.nil?
4009
- command.query['fields'] = fields unless fields.nil?
4010
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4011
- execute_or_queue_command(command, &block)
4012
- end
4013
-
4014
- # Rejects return on an line item.
4015
- # @param [Fixnum] merchant_id
4016
- # The ID of the account that manages the order. This cannot be a multi-client
4017
- # account.
4018
- # @param [String] order_id
4019
- # The ID of the order.
4020
- # @param [Google::Apis::ContentV2_1::OrdersRejectReturnLineItemRequest] orders_reject_return_line_item_request_object
4021
- # @param [String] fields
4022
- # Selector specifying which fields to include in a partial response.
4023
- # @param [String] quota_user
4024
- # Available to use for quota purposes for server-side applications. Can be any
4025
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4026
- # @param [Google::Apis::RequestOptions] options
4027
- # Request-specific options
4028
- #
4029
- # @yield [result, err] Result & error if block supplied
4030
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersRejectReturnLineItemResponse] parsed result object
4031
- # @yieldparam err [StandardError] error object if request failed
4032
- #
4033
- # @return [Google::Apis::ContentV2_1::OrdersRejectReturnLineItemResponse]
4034
- #
4035
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4036
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4037
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4038
- def rejectreturnlineitem_order(merchant_id, order_id, orders_reject_return_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4039
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/rejectReturnLineItem', options)
4040
- command.request_representation = Google::Apis::ContentV2_1::OrdersRejectReturnLineItemRequest::Representation
4041
- command.request_object = orders_reject_return_line_item_request_object
4042
- command.response_representation = Google::Apis::ContentV2_1::OrdersRejectReturnLineItemResponse::Representation
4043
- command.response_class = Google::Apis::ContentV2_1::OrdersRejectReturnLineItemResponse
4044
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4045
- command.params['orderId'] = order_id unless order_id.nil?
4046
- command.query['fields'] = fields unless fields.nil?
4047
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4048
- execute_or_queue_command(command, &block)
4049
- end
4050
-
4051
- # Returns and refunds a line item. Note that this method can only be called on
4052
- # fully shipped orders. The Orderreturns API is the preferred way to handle
4053
- # returns after you receive a return from a customer. You can use Orderreturns.
4054
- # list or Orderreturns.get to search for the return, and then use Orderreturns.
4055
- # processreturn to issue the refund. If the return cannot be found, then we
4056
- # recommend using this API to issue a refund.
4057
- # @param [Fixnum] merchant_id
4058
- # The ID of the account that manages the order. This cannot be a multi-client
4059
- # account.
4060
- # @param [String] order_id
4061
- # The ID of the order.
4062
- # @param [Google::Apis::ContentV2_1::OrdersReturnRefundLineItemRequest] orders_return_refund_line_item_request_object
4063
- # @param [String] fields
4064
- # Selector specifying which fields to include in a partial response.
4065
- # @param [String] quota_user
4066
- # Available to use for quota purposes for server-side applications. Can be any
4067
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4068
- # @param [Google::Apis::RequestOptions] options
4069
- # Request-specific options
4070
- #
4071
- # @yield [result, err] Result & error if block supplied
4072
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersReturnRefundLineItemResponse] parsed result object
4073
- # @yieldparam err [StandardError] error object if request failed
4074
- #
4075
- # @return [Google::Apis::ContentV2_1::OrdersReturnRefundLineItemResponse]
4076
- #
4077
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4078
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4079
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4080
- def returnrefundlineitem_order(merchant_id, order_id, orders_return_refund_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4081
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/returnRefundLineItem', options)
4082
- command.request_representation = Google::Apis::ContentV2_1::OrdersReturnRefundLineItemRequest::Representation
4083
- command.request_object = orders_return_refund_line_item_request_object
4084
- command.response_representation = Google::Apis::ContentV2_1::OrdersReturnRefundLineItemResponse::Representation
4085
- command.response_class = Google::Apis::ContentV2_1::OrdersReturnRefundLineItemResponse
4086
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4087
- command.params['orderId'] = order_id unless order_id.nil?
4088
- command.query['fields'] = fields unless fields.nil?
4089
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4090
- execute_or_queue_command(command, &block)
4091
- end
4092
-
4093
- # Sets (or overrides if it already exists) merchant provided annotations in the
4094
- # form of key-value pairs. A common use case would be to supply us with
4095
- # additional structured information about a line item that cannot be provided
4096
- # through other methods. Submitted key-value pairs can be retrieved as part of
4097
- # the orders resource.
4098
- # @param [Fixnum] merchant_id
4099
- # The ID of the account that manages the order. This cannot be a multi-client
4100
- # account.
4101
- # @param [String] order_id
4102
- # The ID of the order.
4103
- # @param [Google::Apis::ContentV2_1::OrdersSetLineItemMetadataRequest] orders_set_line_item_metadata_request_object
4104
- # @param [String] fields
4105
- # Selector specifying which fields to include in a partial response.
4106
- # @param [String] quota_user
4107
- # Available to use for quota purposes for server-side applications. Can be any
4108
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4109
- # @param [Google::Apis::RequestOptions] options
4110
- # Request-specific options
4111
- #
4112
- # @yield [result, err] Result & error if block supplied
4113
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersSetLineItemMetadataResponse] parsed result object
4114
- # @yieldparam err [StandardError] error object if request failed
4115
- #
4116
- # @return [Google::Apis::ContentV2_1::OrdersSetLineItemMetadataResponse]
4117
- #
4118
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4119
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4120
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4121
- def setlineitemmetadata_order(merchant_id, order_id, orders_set_line_item_metadata_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4122
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/setLineItemMetadata', options)
4123
- command.request_representation = Google::Apis::ContentV2_1::OrdersSetLineItemMetadataRequest::Representation
4124
- command.request_object = orders_set_line_item_metadata_request_object
4125
- command.response_representation = Google::Apis::ContentV2_1::OrdersSetLineItemMetadataResponse::Representation
4126
- command.response_class = Google::Apis::ContentV2_1::OrdersSetLineItemMetadataResponse
4127
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4128
- command.params['orderId'] = order_id unless order_id.nil?
4129
- command.query['fields'] = fields unless fields.nil?
4130
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4131
- execute_or_queue_command(command, &block)
4132
- end
4133
-
4134
- # Marks line item(s) as shipped.
4135
- # @param [Fixnum] merchant_id
4136
- # The ID of the account that manages the order. This cannot be a multi-client
4137
- # account.
4138
- # @param [String] order_id
4139
- # The ID of the order.
4140
- # @param [Google::Apis::ContentV2_1::OrdersShipLineItemsRequest] orders_ship_line_items_request_object
4141
- # @param [String] fields
4142
- # Selector specifying which fields to include in a partial response.
4143
- # @param [String] quota_user
4144
- # Available to use for quota purposes for server-side applications. Can be any
4145
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4146
- # @param [Google::Apis::RequestOptions] options
4147
- # Request-specific options
4148
- #
4149
- # @yield [result, err] Result & error if block supplied
4150
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersShipLineItemsResponse] parsed result object
4151
- # @yieldparam err [StandardError] error object if request failed
4152
- #
4153
- # @return [Google::Apis::ContentV2_1::OrdersShipLineItemsResponse]
4154
- #
4155
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4156
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4157
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4158
- def shiplineitems_order(merchant_id, order_id, orders_ship_line_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4159
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/shipLineItems', options)
4160
- command.request_representation = Google::Apis::ContentV2_1::OrdersShipLineItemsRequest::Representation
4161
- command.request_object = orders_ship_line_items_request_object
4162
- command.response_representation = Google::Apis::ContentV2_1::OrdersShipLineItemsResponse::Representation
4163
- command.response_class = Google::Apis::ContentV2_1::OrdersShipLineItemsResponse
4164
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4165
- command.params['orderId'] = order_id unless order_id.nil?
4166
- command.query['fields'] = fields unless fields.nil?
4167
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4168
- execute_or_queue_command(command, &block)
4169
- end
4170
-
4171
- # Updates ship by and delivery by dates for a line item.
4172
- # @param [Fixnum] merchant_id
4173
- # The ID of the account that manages the order. This cannot be a multi-client
4174
- # account.
4175
- # @param [String] order_id
4176
- # The ID of the order.
4177
- # @param [Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsRequest] orders_update_line_item_shipping_details_request_object
4178
- # @param [String] fields
4179
- # Selector specifying which fields to include in a partial response.
4180
- # @param [String] quota_user
4181
- # Available to use for quota purposes for server-side applications. Can be any
4182
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4183
- # @param [Google::Apis::RequestOptions] options
4184
- # Request-specific options
4185
- #
4186
- # @yield [result, err] Result & error if block supplied
4187
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsResponse] parsed result object
4188
- # @yieldparam err [StandardError] error object if request failed
4189
- #
4190
- # @return [Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsResponse]
4191
- #
4192
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4193
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4194
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4195
- def updatelineitemshippingdetails_order(merchant_id, order_id, orders_update_line_item_shipping_details_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4196
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/updateLineItemShippingDetails', options)
4197
- command.request_representation = Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsRequest::Representation
4198
- command.request_object = orders_update_line_item_shipping_details_request_object
4199
- command.response_representation = Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsResponse::Representation
4200
- command.response_class = Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsResponse
4201
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4202
- command.params['orderId'] = order_id unless order_id.nil?
4203
- command.query['fields'] = fields unless fields.nil?
4204
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4205
- execute_or_queue_command(command, &block)
4206
- end
4207
-
4208
- # Updates the merchant order ID for a given order.
4209
- # @param [Fixnum] merchant_id
4210
- # The ID of the account that manages the order. This cannot be a multi-client
4211
- # account.
4212
- # @param [String] order_id
4213
- # The ID of the order.
4214
- # @param [Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdRequest] orders_update_merchant_order_id_request_object
4215
- # @param [String] fields
4216
- # Selector specifying which fields to include in a partial response.
4217
- # @param [String] quota_user
4218
- # Available to use for quota purposes for server-side applications. Can be any
4219
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4220
- # @param [Google::Apis::RequestOptions] options
4221
- # Request-specific options
4222
- #
4223
- # @yield [result, err] Result & error if block supplied
4224
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdResponse] parsed result object
4225
- # @yieldparam err [StandardError] error object if request failed
4226
- #
4227
- # @return [Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdResponse]
4228
- #
4229
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4230
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4231
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4232
- def updatemerchantorderid_order(merchant_id, order_id, orders_update_merchant_order_id_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4233
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/updateMerchantOrderId', options)
4234
- command.request_representation = Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdRequest::Representation
4235
- command.request_object = orders_update_merchant_order_id_request_object
4236
- command.response_representation = Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdResponse::Representation
4237
- command.response_class = Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdResponse
4238
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4239
- command.params['orderId'] = order_id unless order_id.nil?
4240
- command.query['fields'] = fields unless fields.nil?
4241
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4242
- execute_or_queue_command(command, &block)
4243
- end
4244
-
4245
- # Updates a shipment's status, carrier, and/or tracking ID.
4246
- # @param [Fixnum] merchant_id
4247
- # The ID of the account that manages the order. This cannot be a multi-client
4248
- # account.
4249
- # @param [String] order_id
4250
- # The ID of the order.
4251
- # @param [Google::Apis::ContentV2_1::OrdersUpdateShipmentRequest] orders_update_shipment_request_object
4252
- # @param [String] fields
4253
- # Selector specifying which fields to include in a partial response.
4254
- # @param [String] quota_user
4255
- # Available to use for quota purposes for server-side applications. Can be any
4256
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4257
- # @param [Google::Apis::RequestOptions] options
4258
- # Request-specific options
4259
- #
4260
- # @yield [result, err] Result & error if block supplied
4261
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersUpdateShipmentResponse] parsed result object
4262
- # @yieldparam err [StandardError] error object if request failed
4263
- #
4264
- # @return [Google::Apis::ContentV2_1::OrdersUpdateShipmentResponse]
4265
- #
4266
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4267
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4268
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4269
- def updateshipment_order(merchant_id, order_id, orders_update_shipment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4270
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/updateShipment', options)
4271
- command.request_representation = Google::Apis::ContentV2_1::OrdersUpdateShipmentRequest::Representation
4272
- command.request_object = orders_update_shipment_request_object
4273
- command.response_representation = Google::Apis::ContentV2_1::OrdersUpdateShipmentResponse::Representation
4274
- command.response_class = Google::Apis::ContentV2_1::OrdersUpdateShipmentResponse
4275
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4276
- command.params['orderId'] = order_id unless order_id.nil?
4277
- command.query['fields'] = fields unless fields.nil?
4278
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4279
- execute_or_queue_command(command, &block)
4280
- end
4281
-
4282
- # Creates new order tracking signal.
4283
- # @param [Fixnum] merchant_id
4284
- # The ID of the merchant for which the order signal is created.
4285
- # @param [Google::Apis::ContentV2_1::OrderTrackingSignal] order_tracking_signal_object
4286
- # @param [String] fields
4287
- # Selector specifying which fields to include in a partial response.
4288
- # @param [String] quota_user
4289
- # Available to use for quota purposes for server-side applications. Can be any
4290
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4291
- # @param [Google::Apis::RequestOptions] options
4292
- # Request-specific options
4293
- #
4294
- # @yield [result, err] Result & error if block supplied
4295
- # @yieldparam result [Google::Apis::ContentV2_1::OrderTrackingSignal] parsed result object
4296
- # @yieldparam err [StandardError] error object if request failed
4297
- #
4298
- # @return [Google::Apis::ContentV2_1::OrderTrackingSignal]
4299
- #
4300
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4301
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4302
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4303
- def create_ordertrackingsignal(merchant_id, order_tracking_signal_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4304
- command = make_simple_command(:post, '{merchantId}/ordertrackingsignals', options)
4305
- command.request_representation = Google::Apis::ContentV2_1::OrderTrackingSignal::Representation
4306
- command.request_object = order_tracking_signal_object
4307
- command.response_representation = Google::Apis::ContentV2_1::OrderTrackingSignal::Representation
4308
- command.response_class = Google::Apis::ContentV2_1::OrderTrackingSignal
4309
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4310
- command.query['fields'] = fields unless fields.nil?
4311
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4312
- execute_or_queue_command(command, &block)
4313
- end
4314
-
4315
- # Batches multiple POS-related calls in a single request.
4316
- # @param [Google::Apis::ContentV2_1::PosCustomBatchRequest] pos_custom_batch_request_object
4317
- # @param [String] fields
4318
- # Selector specifying which fields to include in a partial response.
4319
- # @param [String] quota_user
4320
- # Available to use for quota purposes for server-side applications. Can be any
4321
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4322
- # @param [Google::Apis::RequestOptions] options
4323
- # Request-specific options
4324
- #
4325
- # @yield [result, err] Result & error if block supplied
4326
- # @yieldparam result [Google::Apis::ContentV2_1::PosCustomBatchResponse] parsed result object
4327
- # @yieldparam err [StandardError] error object if request failed
4328
- #
4329
- # @return [Google::Apis::ContentV2_1::PosCustomBatchResponse]
4330
- #
4331
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4332
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4333
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4334
- def custombatch_po(pos_custom_batch_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4335
- command = make_simple_command(:post, 'pos/batch', options)
4336
- command.request_representation = Google::Apis::ContentV2_1::PosCustomBatchRequest::Representation
4337
- command.request_object = pos_custom_batch_request_object
4338
- command.response_representation = Google::Apis::ContentV2_1::PosCustomBatchResponse::Representation
4339
- command.response_class = Google::Apis::ContentV2_1::PosCustomBatchResponse
4340
- command.query['fields'] = fields unless fields.nil?
4341
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4342
- execute_or_queue_command(command, &block)
4343
- end
4344
-
4345
- # Deletes a store for the given merchant.
4346
- # @param [Fixnum] merchant_id
4347
- # The ID of the POS or inventory data provider.
4348
- # @param [Fixnum] target_merchant_id
4349
- # The ID of the target merchant.
4350
- # @param [String] store_code
4351
- # A store code that is unique per merchant.
4352
- # @param [String] fields
4353
- # Selector specifying which fields to include in a partial response.
4354
- # @param [String] quota_user
4355
- # Available to use for quota purposes for server-side applications. Can be any
4356
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4357
- # @param [Google::Apis::RequestOptions] options
4358
- # Request-specific options
4359
- #
4360
- # @yield [result, err] Result & error if block supplied
4361
- # @yieldparam result [NilClass] No result returned for this method
4362
- # @yieldparam err [StandardError] error object if request failed
4363
- #
4364
- # @return [void]
4365
- #
4366
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4367
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4368
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4369
- def delete_po(merchant_id, target_merchant_id, store_code, fields: nil, quota_user: nil, options: nil, &block)
4370
- command = make_simple_command(:delete, '{merchantId}/pos/{targetMerchantId}/store/{storeCode}', options)
4371
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4372
- command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
4373
- command.params['storeCode'] = store_code unless store_code.nil?
4374
- command.query['fields'] = fields unless fields.nil?
4375
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4376
- execute_or_queue_command(command, &block)
4377
- end
4378
-
4379
- # Retrieves information about the given store.
4380
- # @param [Fixnum] merchant_id
4381
- # The ID of the POS or inventory data provider.
4382
- # @param [Fixnum] target_merchant_id
4383
- # The ID of the target merchant.
4384
- # @param [String] store_code
4385
- # A store code that is unique per merchant.
4386
- # @param [String] fields
4387
- # Selector specifying which fields to include in a partial response.
4388
- # @param [String] quota_user
4389
- # Available to use for quota purposes for server-side applications. Can be any
4390
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4391
- # @param [Google::Apis::RequestOptions] options
4392
- # Request-specific options
4393
- #
4394
- # @yield [result, err] Result & error if block supplied
4395
- # @yieldparam result [Google::Apis::ContentV2_1::PosStore] parsed result object
4396
- # @yieldparam err [StandardError] error object if request failed
4397
- #
4398
- # @return [Google::Apis::ContentV2_1::PosStore]
4399
- #
4400
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4401
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4402
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4403
- def get_po(merchant_id, target_merchant_id, store_code, fields: nil, quota_user: nil, options: nil, &block)
4404
- command = make_simple_command(:get, '{merchantId}/pos/{targetMerchantId}/store/{storeCode}', options)
4405
- command.response_representation = Google::Apis::ContentV2_1::PosStore::Representation
4406
- command.response_class = Google::Apis::ContentV2_1::PosStore
4407
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4408
- command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
4409
- command.params['storeCode'] = store_code unless store_code.nil?
4410
- command.query['fields'] = fields unless fields.nil?
4411
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4412
- execute_or_queue_command(command, &block)
4413
- end
4414
-
4415
- # Creates a store for the given merchant.
4416
- # @param [Fixnum] merchant_id
4417
- # The ID of the POS or inventory data provider.
4418
- # @param [Fixnum] target_merchant_id
4419
- # The ID of the target merchant.
4420
- # @param [Google::Apis::ContentV2_1::PosStore] pos_store_object
4421
- # @param [String] fields
4422
- # Selector specifying which fields to include in a partial response.
4423
- # @param [String] quota_user
4424
- # Available to use for quota purposes for server-side applications. Can be any
4425
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4426
- # @param [Google::Apis::RequestOptions] options
4427
- # Request-specific options
4428
- #
4429
- # @yield [result, err] Result & error if block supplied
4430
- # @yieldparam result [Google::Apis::ContentV2_1::PosStore] parsed result object
4431
- # @yieldparam err [StandardError] error object if request failed
4432
- #
4433
- # @return [Google::Apis::ContentV2_1::PosStore]
4434
- #
4435
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4436
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4437
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4438
- def insert_po(merchant_id, target_merchant_id, pos_store_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4439
- command = make_simple_command(:post, '{merchantId}/pos/{targetMerchantId}/store', options)
4440
- command.request_representation = Google::Apis::ContentV2_1::PosStore::Representation
4441
- command.request_object = pos_store_object
4442
- command.response_representation = Google::Apis::ContentV2_1::PosStore::Representation
4443
- command.response_class = Google::Apis::ContentV2_1::PosStore
4444
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4445
- command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
4446
- command.query['fields'] = fields unless fields.nil?
4447
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4448
- execute_or_queue_command(command, &block)
4449
- end
4450
-
4451
- # Submit inventory for the given merchant.
4452
- # @param [Fixnum] merchant_id
4453
- # The ID of the POS or inventory data provider.
4454
- # @param [Fixnum] target_merchant_id
4455
- # The ID of the target merchant.
4456
- # @param [Google::Apis::ContentV2_1::PosInventoryRequest] pos_inventory_request_object
4457
- # @param [String] fields
4458
- # Selector specifying which fields to include in a partial response.
4459
- # @param [String] quota_user
4460
- # Available to use for quota purposes for server-side applications. Can be any
4461
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4462
- # @param [Google::Apis::RequestOptions] options
4463
- # Request-specific options
4464
- #
4465
- # @yield [result, err] Result & error if block supplied
4466
- # @yieldparam result [Google::Apis::ContentV2_1::PosInventoryResponse] parsed result object
4467
- # @yieldparam err [StandardError] error object if request failed
4468
- #
4469
- # @return [Google::Apis::ContentV2_1::PosInventoryResponse]
4470
- #
4471
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4472
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4473
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4474
- def inventory_po(merchant_id, target_merchant_id, pos_inventory_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4475
- command = make_simple_command(:post, '{merchantId}/pos/{targetMerchantId}/inventory', options)
4476
- command.request_representation = Google::Apis::ContentV2_1::PosInventoryRequest::Representation
4477
- command.request_object = pos_inventory_request_object
4478
- command.response_representation = Google::Apis::ContentV2_1::PosInventoryResponse::Representation
4479
- command.response_class = Google::Apis::ContentV2_1::PosInventoryResponse
4480
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4481
- command.params['targetMerchantId'] = target_merchant_id unless target_merchant_id.nil?
4482
- command.query['fields'] = fields unless fields.nil?
4483
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4484
- execute_or_queue_command(command, &block)
4485
- end
4486
-
4487
- # Lists the stores of the target merchant.
3011
+ # Lists the stores of the target merchant.
4488
3012
  # @param [Fixnum] merchant_id
4489
3013
  # The ID of the POS or inventory data provider.
4490
3014
  # @param [Fixnum] target_merchant_id
@@ -4991,67 +3515,6 @@ module Google
4991
3515
  execute_or_queue_command(command, &block)
4992
3516
  end
4993
3517
 
4994
- # Lists the metrics report for a given Repricing product.
4995
- # @param [Fixnum] merchant_id
4996
- # Required. Id of the merchant who owns the Repricing rule.
4997
- # @param [String] product_id
4998
- # Required. Id of the Repricing product. Also known as the [REST_ID](https://
4999
- # developers.google.com/shopping-content/reference/rest/v2.1/products#Product.
5000
- # FIELDS.id)
5001
- # @param [String] end_date
5002
- # Gets Repricing reports on and before this date in the merchant's timezone. You
5003
- # can only retrieve data up to 7 days ago (default) or earlier. Format is YYYY-
5004
- # MM-DD.
5005
- # @param [Fixnum] page_size
5006
- # Maximum number of days of reports to return. There can be more than one rule
5007
- # report returned per day. For example, if 3 rule types got applied to the same
5008
- # product within a 24-hour period, then a page_size of 1 will return 3 rule
5009
- # reports. The page size defaults to 50 and values above 1000 are coerced to
5010
- # 1000. This service may return fewer days of reports than this value, for
5011
- # example, if the time between your start and end date is less than the page
5012
- # size.
5013
- # @param [String] page_token
5014
- # Token (if provided) to retrieve the subsequent page. All other parameters must
5015
- # match the original call that provided the page token.
5016
- # @param [String] rule_id
5017
- # Id of the Repricing rule. If specified, only gets this rule's reports.
5018
- # @param [String] start_date
5019
- # Gets Repricing reports on and after this date in the merchant's timezone, up
5020
- # to one year ago. Do not use a start date later than 7 days ago (default).
5021
- # Format is YYYY-MM-DD.
5022
- # @param [String] fields
5023
- # Selector specifying which fields to include in a partial response.
5024
- # @param [String] quota_user
5025
- # Available to use for quota purposes for server-side applications. Can be any
5026
- # arbitrary string assigned to a user, but should not exceed 40 characters.
5027
- # @param [Google::Apis::RequestOptions] options
5028
- # Request-specific options
5029
- #
5030
- # @yield [result, err] Result & error if block supplied
5031
- # @yieldparam result [Google::Apis::ContentV2_1::ListRepricingProductReportsResponse] parsed result object
5032
- # @yieldparam err [StandardError] error object if request failed
5033
- #
5034
- # @return [Google::Apis::ContentV2_1::ListRepricingProductReportsResponse]
5035
- #
5036
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5037
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5038
- # @raise [Google::Apis::AuthorizationError] Authorization is required
5039
- def list_productstatus_repricingreports(merchant_id, product_id, end_date: nil, page_size: nil, page_token: nil, rule_id: nil, start_date: nil, fields: nil, quota_user: nil, options: nil, &block)
5040
- command = make_simple_command(:get, '{merchantId}/productstatuses/{productId}/repricingreports', options)
5041
- command.response_representation = Google::Apis::ContentV2_1::ListRepricingProductReportsResponse::Representation
5042
- command.response_class = Google::Apis::ContentV2_1::ListRepricingProductReportsResponse
5043
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
5044
- command.params['productId'] = product_id unless product_id.nil?
5045
- command.query['endDate'] = end_date unless end_date.nil?
5046
- command.query['pageSize'] = page_size unless page_size.nil?
5047
- command.query['pageToken'] = page_token unless page_token.nil?
5048
- command.query['ruleId'] = rule_id unless rule_id.nil?
5049
- command.query['startDate'] = start_date unless start_date.nil?
5050
- command.query['fields'] = fields unless fields.nil?
5051
- command.query['quotaUser'] = quota_user unless quota_user.nil?
5052
- execute_or_queue_command(command, &block)
5053
- end
5054
-
5055
3518
  # Inserts a promotion for your Merchant Center account. If the promotion already
5056
3519
  # exists, then it updates the promotion instead. To [end or delete] (https://
5057
3520
  # developers.google.com/shopping-content/guides/promotions#end_a_promotion) a
@@ -5597,7 +4060,7 @@ module Google
5597
4060
  execute_or_queue_command(command, &block)
5598
4061
  end
5599
4062
 
5600
- # Retrieves merchant performance mertrics matching the search query and
4063
+ # Retrieves merchant performance metrics matching the search query and
5601
4064
  # optionally segmented by selected dimensions.
5602
4065
  # @param [Fixnum] merchant_id
5603
4066
  # Required. Id of the merchant making the call. Must be a standalone account or
@@ -5632,249 +4095,6 @@ module Google
5632
4095
  execute_or_queue_command(command, &block)
5633
4096
  end
5634
4097
 
5635
- # Creates a repricing rule for your Merchant Center account.
5636
- # @param [Fixnum] merchant_id
5637
- # Required. The id of the merchant who owns the repricing rule.
5638
- # @param [Google::Apis::ContentV2_1::RepricingRule] repricing_rule_object
5639
- # @param [String] rule_id
5640
- # Required. The id of the rule to create.
5641
- # @param [String] fields
5642
- # Selector specifying which fields to include in a partial response.
5643
- # @param [String] quota_user
5644
- # Available to use for quota purposes for server-side applications. Can be any
5645
- # arbitrary string assigned to a user, but should not exceed 40 characters.
5646
- # @param [Google::Apis::RequestOptions] options
5647
- # Request-specific options
5648
- #
5649
- # @yield [result, err] Result & error if block supplied
5650
- # @yieldparam result [Google::Apis::ContentV2_1::RepricingRule] parsed result object
5651
- # @yieldparam err [StandardError] error object if request failed
5652
- #
5653
- # @return [Google::Apis::ContentV2_1::RepricingRule]
5654
- #
5655
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5656
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5657
- # @raise [Google::Apis::AuthorizationError] Authorization is required
5658
- def create_repricingrule(merchant_id, repricing_rule_object = nil, rule_id: nil, fields: nil, quota_user: nil, options: nil, &block)
5659
- command = make_simple_command(:post, '{merchantId}/repricingrules', options)
5660
- command.request_representation = Google::Apis::ContentV2_1::RepricingRule::Representation
5661
- command.request_object = repricing_rule_object
5662
- command.response_representation = Google::Apis::ContentV2_1::RepricingRule::Representation
5663
- command.response_class = Google::Apis::ContentV2_1::RepricingRule
5664
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
5665
- command.query['ruleId'] = rule_id unless rule_id.nil?
5666
- command.query['fields'] = fields unless fields.nil?
5667
- command.query['quotaUser'] = quota_user unless quota_user.nil?
5668
- execute_or_queue_command(command, &block)
5669
- end
5670
-
5671
- # Deletes a repricing rule in your Merchant Center account.
5672
- # @param [Fixnum] merchant_id
5673
- # Required. The id of the merchant who owns the repricing rule.
5674
- # @param [String] rule_id
5675
- # Required. The id of the rule to Delete.
5676
- # @param [String] fields
5677
- # Selector specifying which fields to include in a partial response.
5678
- # @param [String] quota_user
5679
- # Available to use for quota purposes for server-side applications. Can be any
5680
- # arbitrary string assigned to a user, but should not exceed 40 characters.
5681
- # @param [Google::Apis::RequestOptions] options
5682
- # Request-specific options
5683
- #
5684
- # @yield [result, err] Result & error if block supplied
5685
- # @yieldparam result [NilClass] No result returned for this method
5686
- # @yieldparam err [StandardError] error object if request failed
5687
- #
5688
- # @return [void]
5689
- #
5690
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5691
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5692
- # @raise [Google::Apis::AuthorizationError] Authorization is required
5693
- def delete_repricingrule(merchant_id, rule_id, fields: nil, quota_user: nil, options: nil, &block)
5694
- command = make_simple_command(:delete, '{merchantId}/repricingrules/{ruleId}', options)
5695
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
5696
- command.params['ruleId'] = rule_id unless rule_id.nil?
5697
- command.query['fields'] = fields unless fields.nil?
5698
- command.query['quotaUser'] = quota_user unless quota_user.nil?
5699
- execute_or_queue_command(command, &block)
5700
- end
5701
-
5702
- # Retrieves a repricing rule from your Merchant Center account.
5703
- # @param [Fixnum] merchant_id
5704
- # Required. The id of the merchant who owns the repricing rule.
5705
- # @param [String] rule_id
5706
- # Required. The id of the rule to retrieve.
5707
- # @param [String] fields
5708
- # Selector specifying which fields to include in a partial response.
5709
- # @param [String] quota_user
5710
- # Available to use for quota purposes for server-side applications. Can be any
5711
- # arbitrary string assigned to a user, but should not exceed 40 characters.
5712
- # @param [Google::Apis::RequestOptions] options
5713
- # Request-specific options
5714
- #
5715
- # @yield [result, err] Result & error if block supplied
5716
- # @yieldparam result [Google::Apis::ContentV2_1::RepricingRule] parsed result object
5717
- # @yieldparam err [StandardError] error object if request failed
5718
- #
5719
- # @return [Google::Apis::ContentV2_1::RepricingRule]
5720
- #
5721
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5722
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5723
- # @raise [Google::Apis::AuthorizationError] Authorization is required
5724
- def get_repricingrule(merchant_id, rule_id, fields: nil, quota_user: nil, options: nil, &block)
5725
- command = make_simple_command(:get, '{merchantId}/repricingrules/{ruleId}', options)
5726
- command.response_representation = Google::Apis::ContentV2_1::RepricingRule::Representation
5727
- command.response_class = Google::Apis::ContentV2_1::RepricingRule
5728
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
5729
- command.params['ruleId'] = rule_id unless rule_id.nil?
5730
- command.query['fields'] = fields unless fields.nil?
5731
- command.query['quotaUser'] = quota_user unless quota_user.nil?
5732
- execute_or_queue_command(command, &block)
5733
- end
5734
-
5735
- # Lists the repricing rules in your Merchant Center account.
5736
- # @param [Fixnum] merchant_id
5737
- # Required. The id of the merchant who owns the repricing rule.
5738
- # @param [String] country_code
5739
- # [CLDR country code](http://www.unicode.org/repos/cldr/tags/latest/common/main/
5740
- # en.xml) (for example, "US"), used as a filter on repricing rules.
5741
- # @param [String] language_code
5742
- # The two-letter ISO 639-1 language code associated with the repricing rule,
5743
- # used as a filter.
5744
- # @param [Fixnum] page_size
5745
- # The maximum number of repricing rules to return. The service may return fewer
5746
- # than this value. If unspecified, at most 50 rules will be returned. The
5747
- # maximum value is 1000; values above 1000 will be coerced to 1000.
5748
- # @param [String] page_token
5749
- # A page token, received from a previous `ListRepricingRules` call. Provide this
5750
- # to retrieve the subsequent page. When paginating, all other parameters
5751
- # provided to `ListRepricingRules` must match the call that provided the page
5752
- # token.
5753
- # @param [String] fields
5754
- # Selector specifying which fields to include in a partial response.
5755
- # @param [String] quota_user
5756
- # Available to use for quota purposes for server-side applications. Can be any
5757
- # arbitrary string assigned to a user, but should not exceed 40 characters.
5758
- # @param [Google::Apis::RequestOptions] options
5759
- # Request-specific options
5760
- #
5761
- # @yield [result, err] Result & error if block supplied
5762
- # @yieldparam result [Google::Apis::ContentV2_1::ListRepricingRulesResponse] parsed result object
5763
- # @yieldparam err [StandardError] error object if request failed
5764
- #
5765
- # @return [Google::Apis::ContentV2_1::ListRepricingRulesResponse]
5766
- #
5767
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5768
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5769
- # @raise [Google::Apis::AuthorizationError] Authorization is required
5770
- def list_repricingrules(merchant_id, country_code: nil, language_code: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
5771
- command = make_simple_command(:get, '{merchantId}/repricingrules', options)
5772
- command.response_representation = Google::Apis::ContentV2_1::ListRepricingRulesResponse::Representation
5773
- command.response_class = Google::Apis::ContentV2_1::ListRepricingRulesResponse
5774
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
5775
- command.query['countryCode'] = country_code unless country_code.nil?
5776
- command.query['languageCode'] = language_code unless language_code.nil?
5777
- command.query['pageSize'] = page_size unless page_size.nil?
5778
- command.query['pageToken'] = page_token unless page_token.nil?
5779
- command.query['fields'] = fields unless fields.nil?
5780
- command.query['quotaUser'] = quota_user unless quota_user.nil?
5781
- execute_or_queue_command(command, &block)
5782
- end
5783
-
5784
- # Updates a repricing rule in your Merchant Center account. All mutable fields
5785
- # will be overwritten in each update request. In each update, you must provide
5786
- # all required mutable fields, or an error will be thrown. If you do not provide
5787
- # an optional field in the update request, if that field currently exists, it
5788
- # will be deleted from the rule.
5789
- # @param [Fixnum] merchant_id
5790
- # Required. The id of the merchant who owns the repricing rule.
5791
- # @param [String] rule_id
5792
- # Required. The id of the rule to update.
5793
- # @param [Google::Apis::ContentV2_1::RepricingRule] repricing_rule_object
5794
- # @param [String] fields
5795
- # Selector specifying which fields to include in a partial response.
5796
- # @param [String] quota_user
5797
- # Available to use for quota purposes for server-side applications. Can be any
5798
- # arbitrary string assigned to a user, but should not exceed 40 characters.
5799
- # @param [Google::Apis::RequestOptions] options
5800
- # Request-specific options
5801
- #
5802
- # @yield [result, err] Result & error if block supplied
5803
- # @yieldparam result [Google::Apis::ContentV2_1::RepricingRule] parsed result object
5804
- # @yieldparam err [StandardError] error object if request failed
5805
- #
5806
- # @return [Google::Apis::ContentV2_1::RepricingRule]
5807
- #
5808
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5809
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5810
- # @raise [Google::Apis::AuthorizationError] Authorization is required
5811
- def patch_repricingrule(merchant_id, rule_id, repricing_rule_object = nil, fields: nil, quota_user: nil, options: nil, &block)
5812
- command = make_simple_command(:patch, '{merchantId}/repricingrules/{ruleId}', options)
5813
- command.request_representation = Google::Apis::ContentV2_1::RepricingRule::Representation
5814
- command.request_object = repricing_rule_object
5815
- command.response_representation = Google::Apis::ContentV2_1::RepricingRule::Representation
5816
- command.response_class = Google::Apis::ContentV2_1::RepricingRule
5817
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
5818
- command.params['ruleId'] = rule_id unless rule_id.nil?
5819
- command.query['fields'] = fields unless fields.nil?
5820
- command.query['quotaUser'] = quota_user unless quota_user.nil?
5821
- execute_or_queue_command(command, &block)
5822
- end
5823
-
5824
- # *Deprecated*: New merchants can't start using this service. Lists the metrics
5825
- # report for a given Repricing rule.
5826
- # @param [Fixnum] merchant_id
5827
- # Required. Id of the merchant who owns the Repricing rule.
5828
- # @param [String] rule_id
5829
- # Required. Id of the Repricing rule.
5830
- # @param [String] end_date
5831
- # Gets Repricing reports on and before this date in the merchant's timezone. You
5832
- # can only retrieve data up to 7 days ago (default) or earlier. Format: YYYY-MM-
5833
- # DD.
5834
- # @param [Fixnum] page_size
5835
- # Maximum number of daily reports to return. Each report includes data from a
5836
- # single 24-hour period. The page size defaults to 50 and values above 1000 are
5837
- # coerced to 1000. This service may return fewer days than this value, for
5838
- # example, if the time between your start and end date is less than page size.
5839
- # @param [String] page_token
5840
- # Token (if provided) to retrieve the subsequent page. All other parameters must
5841
- # match the original call that provided the page token.
5842
- # @param [String] start_date
5843
- # Gets Repricing reports on and after this date in the merchant's timezone, up
5844
- # to one year ago. Do not use a start date later than 7 days ago (default).
5845
- # Format: YYYY-MM-DD.
5846
- # @param [String] fields
5847
- # Selector specifying which fields to include in a partial response.
5848
- # @param [String] quota_user
5849
- # Available to use for quota purposes for server-side applications. Can be any
5850
- # arbitrary string assigned to a user, but should not exceed 40 characters.
5851
- # @param [Google::Apis::RequestOptions] options
5852
- # Request-specific options
5853
- #
5854
- # @yield [result, err] Result & error if block supplied
5855
- # @yieldparam result [Google::Apis::ContentV2_1::ListRepricingRuleReportsResponse] parsed result object
5856
- # @yieldparam err [StandardError] error object if request failed
5857
- #
5858
- # @return [Google::Apis::ContentV2_1::ListRepricingRuleReportsResponse]
5859
- #
5860
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
5861
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
5862
- # @raise [Google::Apis::AuthorizationError] Authorization is required
5863
- def list_repricingrule_repricingreports(merchant_id, rule_id, end_date: nil, page_size: nil, page_token: nil, start_date: nil, fields: nil, quota_user: nil, options: nil, &block)
5864
- command = make_simple_command(:get, '{merchantId}/repricingrules/{ruleId}/repricingreports', options)
5865
- command.response_representation = Google::Apis::ContentV2_1::ListRepricingRuleReportsResponse::Representation
5866
- command.response_class = Google::Apis::ContentV2_1::ListRepricingRuleReportsResponse
5867
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
5868
- command.params['ruleId'] = rule_id unless rule_id.nil?
5869
- command.query['endDate'] = end_date unless end_date.nil?
5870
- command.query['pageSize'] = page_size unless page_size.nil?
5871
- command.query['pageToken'] = page_token unless page_token.nil?
5872
- command.query['startDate'] = start_date unless start_date.nil?
5873
- command.query['fields'] = fields unless fields.nil?
5874
- command.query['quotaUser'] = quota_user unless quota_user.nil?
5875
- execute_or_queue_command(command, &block)
5876
- end
5877
-
5878
4098
  # Batches multiple return address related calls in a single request.
5879
4099
  # @param [Google::Apis::ContentV2_1::ReturnaddressCustomBatchRequest] returnaddress_custom_batch_request_object
5880
4100
  # @param [String] fields