google-apis-content_v2_1 0.33.0 → 0.34.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1106,232 +1106,6 @@ module Google
1106
1106
  execute_or_queue_command(command, &block)
1107
1107
  end
1108
1108
 
1109
- # Reactivates the BoG program in your Merchant Center account. Moves the program
1110
- # to the active state when allowed, for example, when paused. This method is
1111
- # only available to selected merchants.
1112
- # @param [Fixnum] merchant_id
1113
- # Required. The ID of the account.
1114
- # @param [String] region_code
1115
- # Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1116
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1117
- # @param [Google::Apis::ContentV2_1::ActivateBuyOnGoogleProgramRequest] activate_buy_on_google_program_request_object
1118
- # @param [String] fields
1119
- # Selector specifying which fields to include in a partial response.
1120
- # @param [String] quota_user
1121
- # Available to use for quota purposes for server-side applications. Can be any
1122
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1123
- # @param [Google::Apis::RequestOptions] options
1124
- # Request-specific options
1125
- #
1126
- # @yield [result, err] Result & error if block supplied
1127
- # @yieldparam result [NilClass] No result returned for this method
1128
- # @yieldparam err [StandardError] error object if request failed
1129
- #
1130
- # @return [void]
1131
- #
1132
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1133
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1134
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1135
- 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)
1136
- command = make_simple_command(:post, '{merchantId}/buyongoogleprograms/{regionCode}/activate', options)
1137
- command.request_representation = Google::Apis::ContentV2_1::ActivateBuyOnGoogleProgramRequest::Representation
1138
- command.request_object = activate_buy_on_google_program_request_object
1139
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1140
- command.params['regionCode'] = region_code unless region_code.nil?
1141
- command.query['fields'] = fields unless fields.nil?
1142
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1143
- execute_or_queue_command(command, &block)
1144
- end
1145
-
1146
- # Retrieves a status of the BoG program for your Merchant Center account.
1147
- # @param [Fixnum] merchant_id
1148
- # Required. The ID of the account.
1149
- # @param [String] region_code
1150
- # Required. The Program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1151
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1152
- # @param [String] fields
1153
- # Selector specifying which fields to include in a partial response.
1154
- # @param [String] quota_user
1155
- # Available to use for quota purposes for server-side applications. Can be any
1156
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1157
- # @param [Google::Apis::RequestOptions] options
1158
- # Request-specific options
1159
- #
1160
- # @yield [result, err] Result & error if block supplied
1161
- # @yieldparam result [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus] parsed result object
1162
- # @yieldparam err [StandardError] error object if request failed
1163
- #
1164
- # @return [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus]
1165
- #
1166
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1167
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1168
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1169
- def get_buyongoogleprogram(merchant_id, region_code, fields: nil, quota_user: nil, options: nil, &block)
1170
- command = make_simple_command(:get, '{merchantId}/buyongoogleprograms/{regionCode}', options)
1171
- command.response_representation = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus::Representation
1172
- command.response_class = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus
1173
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1174
- command.params['regionCode'] = region_code unless region_code.nil?
1175
- command.query['fields'] = fields unless fields.nil?
1176
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1177
- execute_or_queue_command(command, &block)
1178
- end
1179
-
1180
- # Onboards the BoG program in your Merchant Center account. By using this method,
1181
- # you agree to the [Terms of Service](https://merchants.google.com/mc/
1182
- # termsofservice/transactions/US/latest). Calling this method is only possible
1183
- # if the authenticated account is the same as the merchant id in the request.
1184
- # Calling this method multiple times will only accept Terms of Service if the
1185
- # latest version is not currently signed.
1186
- # @param [Fixnum] merchant_id
1187
- # Required. The ID of the account.
1188
- # @param [String] region_code
1189
- # Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1190
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1191
- # @param [Google::Apis::ContentV2_1::OnboardBuyOnGoogleProgramRequest] onboard_buy_on_google_program_request_object
1192
- # @param [String] fields
1193
- # Selector specifying which fields to include in a partial response.
1194
- # @param [String] quota_user
1195
- # Available to use for quota purposes for server-side applications. Can be any
1196
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1197
- # @param [Google::Apis::RequestOptions] options
1198
- # Request-specific options
1199
- #
1200
- # @yield [result, err] Result & error if block supplied
1201
- # @yieldparam result [NilClass] No result returned for this method
1202
- # @yieldparam err [StandardError] error object if request failed
1203
- #
1204
- # @return [void]
1205
- #
1206
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1207
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1208
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1209
- 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)
1210
- command = make_simple_command(:post, '{merchantId}/buyongoogleprograms/{regionCode}/onboard', options)
1211
- command.request_representation = Google::Apis::ContentV2_1::OnboardBuyOnGoogleProgramRequest::Representation
1212
- command.request_object = onboard_buy_on_google_program_request_object
1213
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1214
- command.params['regionCode'] = region_code unless region_code.nil?
1215
- command.query['fields'] = fields unless fields.nil?
1216
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1217
- execute_or_queue_command(command, &block)
1218
- end
1219
-
1220
- # Updates the status of the BoG program for your Merchant Center account.
1221
- # @param [Fixnum] merchant_id
1222
- # Required. The ID of the account.
1223
- # @param [String] region_code
1224
- # Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1225
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1226
- # @param [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus] buy_on_google_program_status_object
1227
- # @param [String] update_mask
1228
- # The list of fields to update. If the update mask is not provided, then all the
1229
- # fields set in buyOnGoogleProgramStatus will be updated. Clearing fields is
1230
- # only possible if update mask is provided.
1231
- # @param [String] fields
1232
- # Selector specifying which fields to include in a partial response.
1233
- # @param [String] quota_user
1234
- # Available to use for quota purposes for server-side applications. Can be any
1235
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1236
- # @param [Google::Apis::RequestOptions] options
1237
- # Request-specific options
1238
- #
1239
- # @yield [result, err] Result & error if block supplied
1240
- # @yieldparam result [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus] parsed result object
1241
- # @yieldparam err [StandardError] error object if request failed
1242
- #
1243
- # @return [Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus]
1244
- #
1245
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1246
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1247
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1248
- 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)
1249
- command = make_simple_command(:patch, '{merchantId}/buyongoogleprograms/{regionCode}', options)
1250
- command.request_representation = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus::Representation
1251
- command.request_object = buy_on_google_program_status_object
1252
- command.response_representation = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus::Representation
1253
- command.response_class = Google::Apis::ContentV2_1::BuyOnGoogleProgramStatus
1254
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1255
- command.params['regionCode'] = region_code unless region_code.nil?
1256
- command.query['updateMask'] = update_mask unless update_mask.nil?
1257
- command.query['fields'] = fields unless fields.nil?
1258
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1259
- execute_or_queue_command(command, &block)
1260
- end
1261
-
1262
- # Pauses the BoG program in your Merchant Center account. This method is only
1263
- # available to selected merchants.
1264
- # @param [Fixnum] merchant_id
1265
- # Required. The ID of the account.
1266
- # @param [String] region_code
1267
- # Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1268
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1269
- # @param [Google::Apis::ContentV2_1::PauseBuyOnGoogleProgramRequest] pause_buy_on_google_program_request_object
1270
- # @param [String] fields
1271
- # Selector specifying which fields to include in a partial response.
1272
- # @param [String] quota_user
1273
- # Available to use for quota purposes for server-side applications. Can be any
1274
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1275
- # @param [Google::Apis::RequestOptions] options
1276
- # Request-specific options
1277
- #
1278
- # @yield [result, err] Result & error if block supplied
1279
- # @yieldparam result [NilClass] No result returned for this method
1280
- # @yieldparam err [StandardError] error object if request failed
1281
- #
1282
- # @return [void]
1283
- #
1284
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1285
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1286
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1287
- 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)
1288
- command = make_simple_command(:post, '{merchantId}/buyongoogleprograms/{regionCode}/pause', options)
1289
- command.request_representation = Google::Apis::ContentV2_1::PauseBuyOnGoogleProgramRequest::Representation
1290
- command.request_object = pause_buy_on_google_program_request_object
1291
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1292
- command.params['regionCode'] = region_code unless region_code.nil?
1293
- command.query['fields'] = fields unless fields.nil?
1294
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1295
- execute_or_queue_command(command, &block)
1296
- end
1297
-
1298
- # Requests review and then activates the BoG program in your Merchant Center
1299
- # account for the first time. Moves the program to the REVIEW_PENDING state.
1300
- # This method is only available to selected merchants.
1301
- # @param [Fixnum] merchant_id
1302
- # Required. The ID of the account.
1303
- # @param [String] region_code
1304
- # Required. The program region code [ISO 3166-1 alpha-2](https://en.wikipedia.
1305
- # org/wiki/ISO_3166-1_alpha-2). Currently only US is available.
1306
- # @param [Google::Apis::ContentV2_1::RequestReviewBuyOnGoogleProgramRequest] request_review_buy_on_google_program_request_object
1307
- # @param [String] fields
1308
- # Selector specifying which fields to include in a partial response.
1309
- # @param [String] quota_user
1310
- # Available to use for quota purposes for server-side applications. Can be any
1311
- # arbitrary string assigned to a user, but should not exceed 40 characters.
1312
- # @param [Google::Apis::RequestOptions] options
1313
- # Request-specific options
1314
- #
1315
- # @yield [result, err] Result & error if block supplied
1316
- # @yieldparam result [NilClass] No result returned for this method
1317
- # @yieldparam err [StandardError] error object if request failed
1318
- #
1319
- # @return [void]
1320
- #
1321
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
1322
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
1323
- # @raise [Google::Apis::AuthorizationError] Authorization is required
1324
- def requestreview_buyongoogleprogram(merchant_id, region_code, request_review_buy_on_google_program_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
1325
- command = make_simple_command(:post, '{merchantId}/buyongoogleprograms/{regionCode}/requestreview', options)
1326
- command.request_representation = Google::Apis::ContentV2_1::RequestReviewBuyOnGoogleProgramRequest::Representation
1327
- command.request_object = request_review_buy_on_google_program_request_object
1328
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
1329
- command.params['regionCode'] = region_code unless region_code.nil?
1330
- command.query['fields'] = fields unless fields.nil?
1331
- command.query['quotaUser'] = quota_user unless quota_user.nil?
1332
- execute_or_queue_command(command, &block)
1333
- end
1334
-
1335
1109
  # Uploads a collection to your Merchant Center account. If a collection with the
1336
1110
  # same collectionId already exists, this method updates that entry. In each
1337
1111
  # update, the collection is completely replaced by the fields in the body of the
@@ -3029,1303 +2803,6 @@ module Google
3029
2803
  execute_or_queue_command(command, &block)
3030
2804
  end
3031
2805
 
3032
- # Creates a charge invoice for a shipment group, and triggers a charge capture
3033
- # for orderinvoice enabled orders.
3034
- # @param [Fixnum] merchant_id
3035
- # The ID of the account that manages the order. This cannot be a multi-client
3036
- # account.
3037
- # @param [String] order_id
3038
- # The ID of the order.
3039
- # @param [Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceRequest] orderinvoices_create_charge_invoice_request_object
3040
- # @param [String] fields
3041
- # Selector specifying which fields to include in a partial response.
3042
- # @param [String] quota_user
3043
- # Available to use for quota purposes for server-side applications. Can be any
3044
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3045
- # @param [Google::Apis::RequestOptions] options
3046
- # Request-specific options
3047
- #
3048
- # @yield [result, err] Result & error if block supplied
3049
- # @yieldparam result [Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceResponse] parsed result object
3050
- # @yieldparam err [StandardError] error object if request failed
3051
- #
3052
- # @return [Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceResponse]
3053
- #
3054
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3055
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3056
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3057
- def createchargeinvoice_orderinvoice(merchant_id, order_id, orderinvoices_create_charge_invoice_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3058
- command = make_simple_command(:post, '{merchantId}/orderinvoices/{orderId}/createChargeInvoice', options)
3059
- command.request_representation = Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceRequest::Representation
3060
- command.request_object = orderinvoices_create_charge_invoice_request_object
3061
- command.response_representation = Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceResponse::Representation
3062
- command.response_class = Google::Apis::ContentV2_1::OrderinvoicesCreateChargeInvoiceResponse
3063
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3064
- command.params['orderId'] = order_id unless order_id.nil?
3065
- command.query['fields'] = fields unless fields.nil?
3066
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3067
- execute_or_queue_command(command, &block)
3068
- end
3069
-
3070
- # Creates a refund invoice for one or more shipment groups, and triggers a
3071
- # refund for orderinvoice enabled orders. This can only be used for line items
3072
- # that have previously been charged using `createChargeInvoice`. All amounts (
3073
- # except for the summary) are incremental with respect to the previous invoice.
3074
- # @param [Fixnum] merchant_id
3075
- # The ID of the account that manages the order. This cannot be a multi-client
3076
- # account.
3077
- # @param [String] order_id
3078
- # The ID of the order.
3079
- # @param [Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceRequest] orderinvoices_create_refund_invoice_request_object
3080
- # @param [String] fields
3081
- # Selector specifying which fields to include in a partial response.
3082
- # @param [String] quota_user
3083
- # Available to use for quota purposes for server-side applications. Can be any
3084
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3085
- # @param [Google::Apis::RequestOptions] options
3086
- # Request-specific options
3087
- #
3088
- # @yield [result, err] Result & error if block supplied
3089
- # @yieldparam result [Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceResponse] parsed result object
3090
- # @yieldparam err [StandardError] error object if request failed
3091
- #
3092
- # @return [Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceResponse]
3093
- #
3094
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3095
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3096
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3097
- def createrefundinvoice_orderinvoice(merchant_id, order_id, orderinvoices_create_refund_invoice_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3098
- command = make_simple_command(:post, '{merchantId}/orderinvoices/{orderId}/createRefundInvoice', options)
3099
- command.request_representation = Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceRequest::Representation
3100
- command.request_object = orderinvoices_create_refund_invoice_request_object
3101
- command.response_representation = Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceResponse::Representation
3102
- command.response_class = Google::Apis::ContentV2_1::OrderinvoicesCreateRefundInvoiceResponse
3103
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3104
- command.params['orderId'] = order_id unless order_id.nil?
3105
- command.query['fields'] = fields unless fields.nil?
3106
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3107
- execute_or_queue_command(command, &block)
3108
- end
3109
-
3110
- # Retrieves a report for disbursements from your Merchant Center account.
3111
- # @param [Fixnum] merchant_id
3112
- # The ID of the account that manages the order. This cannot be a multi-client
3113
- # account.
3114
- # @param [String] disbursement_end_date
3115
- # The last date which disbursements occurred. In ISO 8601 format. Default:
3116
- # current date.
3117
- # @param [String] disbursement_start_date
3118
- # The first date which disbursements occurred. In ISO 8601 format.
3119
- # @param [Fixnum] max_results
3120
- # The maximum number of disbursements to return in the response, used for paging.
3121
- # @param [String] page_token
3122
- # The token returned by the previous request.
3123
- # @param [String] fields
3124
- # Selector specifying which fields to include in a partial response.
3125
- # @param [String] quota_user
3126
- # Available to use for quota purposes for server-side applications. Can be any
3127
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3128
- # @param [Google::Apis::RequestOptions] options
3129
- # Request-specific options
3130
- #
3131
- # @yield [result, err] Result & error if block supplied
3132
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreportsListDisbursementsResponse] parsed result object
3133
- # @yieldparam err [StandardError] error object if request failed
3134
- #
3135
- # @return [Google::Apis::ContentV2_1::OrderreportsListDisbursementsResponse]
3136
- #
3137
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3138
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3139
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3140
- 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)
3141
- command = make_simple_command(:get, '{merchantId}/orderreports/disbursements', options)
3142
- command.response_representation = Google::Apis::ContentV2_1::OrderreportsListDisbursementsResponse::Representation
3143
- command.response_class = Google::Apis::ContentV2_1::OrderreportsListDisbursementsResponse
3144
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3145
- command.query['disbursementEndDate'] = disbursement_end_date unless disbursement_end_date.nil?
3146
- command.query['disbursementStartDate'] = disbursement_start_date unless disbursement_start_date.nil?
3147
- command.query['maxResults'] = max_results unless max_results.nil?
3148
- command.query['pageToken'] = page_token unless page_token.nil?
3149
- command.query['fields'] = fields unless fields.nil?
3150
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3151
- execute_or_queue_command(command, &block)
3152
- end
3153
-
3154
- # Retrieves a list of transactions for a disbursement from your Merchant Center
3155
- # account.
3156
- # @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] disbursement_id
3160
- # The Google-provided ID of the disbursement (found in Wallet).
3161
- # @param [Fixnum] max_results
3162
- # The maximum number of disbursements to return in the response, used for paging.
3163
- # @param [String] page_token
3164
- # The token returned by the previous request.
3165
- # @param [String] transaction_end_date
3166
- # The last date in which transaction occurred. In ISO 8601 format. Default:
3167
- # current date.
3168
- # @param [String] transaction_start_date
3169
- # The first date in which transaction occurred. In ISO 8601 format.
3170
- # @param [String] fields
3171
- # Selector specifying which fields to include in a partial response.
3172
- # @param [String] quota_user
3173
- # Available to use for quota purposes for server-side applications. Can be any
3174
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3175
- # @param [Google::Apis::RequestOptions] options
3176
- # Request-specific options
3177
- #
3178
- # @yield [result, err] Result & error if block supplied
3179
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreportsListTransactionsResponse] parsed result object
3180
- # @yieldparam err [StandardError] error object if request failed
3181
- #
3182
- # @return [Google::Apis::ContentV2_1::OrderreportsListTransactionsResponse]
3183
- #
3184
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3185
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3186
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3187
- 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)
3188
- command = make_simple_command(:get, '{merchantId}/orderreports/disbursements/{disbursementId}/transactions', options)
3189
- command.response_representation = Google::Apis::ContentV2_1::OrderreportsListTransactionsResponse::Representation
3190
- command.response_class = Google::Apis::ContentV2_1::OrderreportsListTransactionsResponse
3191
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3192
- command.params['disbursementId'] = disbursement_id unless disbursement_id.nil?
3193
- command.query['maxResults'] = max_results unless max_results.nil?
3194
- command.query['pageToken'] = page_token unless page_token.nil?
3195
- command.query['transactionEndDate'] = transaction_end_date unless transaction_end_date.nil?
3196
- command.query['transactionStartDate'] = transaction_start_date unless transaction_start_date.nil?
3197
- command.query['fields'] = fields unless fields.nil?
3198
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3199
- execute_or_queue_command(command, &block)
3200
- end
3201
-
3202
- # Acks an order return in your Merchant Center account.
3203
- # @param [Fixnum] merchant_id
3204
- # The ID of the account that manages the order. This cannot be a multi-client
3205
- # account.
3206
- # @param [String] return_id
3207
- # The ID of the return.
3208
- # @param [Google::Apis::ContentV2_1::OrderreturnsAcknowledgeRequest] orderreturns_acknowledge_request_object
3209
- # @param [String] fields
3210
- # Selector specifying which fields to include in a partial response.
3211
- # @param [String] quota_user
3212
- # Available to use for quota purposes for server-side applications. Can be any
3213
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3214
- # @param [Google::Apis::RequestOptions] options
3215
- # Request-specific options
3216
- #
3217
- # @yield [result, err] Result & error if block supplied
3218
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreturnsAcknowledgeResponse] parsed result object
3219
- # @yieldparam err [StandardError] error object if request failed
3220
- #
3221
- # @return [Google::Apis::ContentV2_1::OrderreturnsAcknowledgeResponse]
3222
- #
3223
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3224
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3225
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3226
- def acknowledge_orderreturn(merchant_id, return_id, orderreturns_acknowledge_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3227
- command = make_simple_command(:post, '{merchantId}/orderreturns/{returnId}/acknowledge', options)
3228
- command.request_representation = Google::Apis::ContentV2_1::OrderreturnsAcknowledgeRequest::Representation
3229
- command.request_object = orderreturns_acknowledge_request_object
3230
- command.response_representation = Google::Apis::ContentV2_1::OrderreturnsAcknowledgeResponse::Representation
3231
- command.response_class = Google::Apis::ContentV2_1::OrderreturnsAcknowledgeResponse
3232
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3233
- command.params['returnId'] = return_id unless return_id.nil?
3234
- command.query['fields'] = fields unless fields.nil?
3235
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3236
- execute_or_queue_command(command, &block)
3237
- end
3238
-
3239
- # Create return in your Merchant Center account.
3240
- # @param [Fixnum] merchant_id
3241
- # The ID of the account that manages the order. This cannot be a multi-client
3242
- # account.
3243
- # @param [Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnRequest] orderreturns_create_order_return_request_object
3244
- # @param [String] fields
3245
- # Selector specifying which fields to include in a partial response.
3246
- # @param [String] quota_user
3247
- # Available to use for quota purposes for server-side applications. Can be any
3248
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3249
- # @param [Google::Apis::RequestOptions] options
3250
- # Request-specific options
3251
- #
3252
- # @yield [result, err] Result & error if block supplied
3253
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnResponse] parsed result object
3254
- # @yieldparam err [StandardError] error object if request failed
3255
- #
3256
- # @return [Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnResponse]
3257
- #
3258
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3259
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3260
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3261
- def createorderreturn_orderreturn(merchant_id, orderreturns_create_order_return_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3262
- command = make_simple_command(:post, '{merchantId}/orderreturns/createOrderReturn', options)
3263
- command.request_representation = Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnRequest::Representation
3264
- command.request_object = orderreturns_create_order_return_request_object
3265
- command.response_representation = Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnResponse::Representation
3266
- command.response_class = Google::Apis::ContentV2_1::OrderreturnsCreateOrderReturnResponse
3267
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3268
- command.query['fields'] = fields unless fields.nil?
3269
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3270
- execute_or_queue_command(command, &block)
3271
- end
3272
-
3273
- # Retrieves an order return from your Merchant Center account.
3274
- # @param [Fixnum] merchant_id
3275
- # The ID of the account that manages the order. This cannot be a multi-client
3276
- # account.
3277
- # @param [String] return_id
3278
- # Merchant order return ID generated by Google.
3279
- # @param [String] fields
3280
- # Selector specifying which fields to include in a partial response.
3281
- # @param [String] quota_user
3282
- # Available to use for quota purposes for server-side applications. Can be any
3283
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3284
- # @param [Google::Apis::RequestOptions] options
3285
- # Request-specific options
3286
- #
3287
- # @yield [result, err] Result & error if block supplied
3288
- # @yieldparam result [Google::Apis::ContentV2_1::MerchantOrderReturn] parsed result object
3289
- # @yieldparam err [StandardError] error object if request failed
3290
- #
3291
- # @return [Google::Apis::ContentV2_1::MerchantOrderReturn]
3292
- #
3293
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3294
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3295
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3296
- def get_orderreturn(merchant_id, return_id, fields: nil, quota_user: nil, options: nil, &block)
3297
- command = make_simple_command(:get, '{merchantId}/orderreturns/{returnId}', options)
3298
- command.response_representation = Google::Apis::ContentV2_1::MerchantOrderReturn::Representation
3299
- command.response_class = Google::Apis::ContentV2_1::MerchantOrderReturn
3300
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3301
- command.params['returnId'] = return_id unless return_id.nil?
3302
- command.query['fields'] = fields unless fields.nil?
3303
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3304
- execute_or_queue_command(command, &block)
3305
- end
3306
-
3307
- # Lists order returns in your Merchant Center account.
3308
- # @param [Fixnum] merchant_id
3309
- # The ID of the account that manages the order. This cannot be a multi-client
3310
- # account.
3311
- # @param [Boolean] acknowledged
3312
- # Obtains order returns that match the acknowledgement status. When set to true,
3313
- # obtains order returns that have been acknowledged. When false, obtains order
3314
- # returns that have not been acknowledged. When not provided, obtains order
3315
- # returns regardless of their acknowledgement status. We recommend using this
3316
- # filter set to `false`, in conjunction with the `acknowledge` call, such that
3317
- # only un-acknowledged order returns are returned.
3318
- # @param [String] created_end_date
3319
- # Obtains order returns created before this date (inclusively), in ISO 8601
3320
- # format.
3321
- # @param [String] created_start_date
3322
- # Obtains order returns created after this date (inclusively), in ISO 8601
3323
- # format.
3324
- # @param [Array<String>, String] google_order_ids
3325
- # Obtains order returns with the specified order ids. If this parameter is
3326
- # provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus,
3327
- # shipmentState and acknowledged parameters must be not set. Note: if
3328
- # googleOrderId and shipmentTrackingNumber parameters are provided, the obtained
3329
- # results will include all order returns that either match the specified order
3330
- # id or the specified tracking number.
3331
- # @param [Fixnum] max_results
3332
- # The maximum number of order returns to return in the response, used for paging.
3333
- # The default value is 25 returns per page, and the maximum allowed value is
3334
- # 250 returns per page.
3335
- # @param [String] order_by
3336
- # Return the results in the specified order.
3337
- # @param [String] page_token
3338
- # The token returned by the previous request.
3339
- # @param [Array<String>, String] shipment_states
3340
- # Obtains order returns that match any shipment state provided in this parameter.
3341
- # When this parameter is not provided, order returns are obtained regardless of
3342
- # their shipment states.
3343
- # @param [Array<String>, String] shipment_status
3344
- # Obtains order returns that match any shipment status provided in this
3345
- # parameter. When this parameter is not provided, order returns are obtained
3346
- # regardless of their shipment statuses.
3347
- # @param [Array<String>, String] shipment_tracking_numbers
3348
- # Obtains order returns with the specified tracking numbers. If this parameter
3349
- # is provided, createdStartDate, createdEndDate, shipmentType, shipmentStatus,
3350
- # shipmentState and acknowledged parameters must be not set. Note: if
3351
- # googleOrderId and shipmentTrackingNumber parameters are provided, the obtained
3352
- # results will include all order returns that either match the specified order
3353
- # id or the specified tracking number.
3354
- # @param [Array<String>, String] shipment_types
3355
- # Obtains order returns that match any shipment type provided in this parameter.
3356
- # When this parameter is not provided, order returns are obtained regardless of
3357
- # their shipment types.
3358
- # @param [String] fields
3359
- # Selector specifying which fields to include in a partial response.
3360
- # @param [String] quota_user
3361
- # Available to use for quota purposes for server-side applications. Can be any
3362
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3363
- # @param [Google::Apis::RequestOptions] options
3364
- # Request-specific options
3365
- #
3366
- # @yield [result, err] Result & error if block supplied
3367
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreturnsListResponse] parsed result object
3368
- # @yieldparam err [StandardError] error object if request failed
3369
- #
3370
- # @return [Google::Apis::ContentV2_1::OrderreturnsListResponse]
3371
- #
3372
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3373
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3374
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3375
- 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)
3376
- command = make_simple_command(:get, '{merchantId}/orderreturns', options)
3377
- command.response_representation = Google::Apis::ContentV2_1::OrderreturnsListResponse::Representation
3378
- command.response_class = Google::Apis::ContentV2_1::OrderreturnsListResponse
3379
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3380
- command.query['acknowledged'] = acknowledged unless acknowledged.nil?
3381
- command.query['createdEndDate'] = created_end_date unless created_end_date.nil?
3382
- command.query['createdStartDate'] = created_start_date unless created_start_date.nil?
3383
- command.query['googleOrderIds'] = google_order_ids unless google_order_ids.nil?
3384
- command.query['maxResults'] = max_results unless max_results.nil?
3385
- command.query['orderBy'] = order_by unless order_by.nil?
3386
- command.query['pageToken'] = page_token unless page_token.nil?
3387
- command.query['shipmentStates'] = shipment_states unless shipment_states.nil?
3388
- command.query['shipmentStatus'] = shipment_status unless shipment_status.nil?
3389
- command.query['shipmentTrackingNumbers'] = shipment_tracking_numbers unless shipment_tracking_numbers.nil?
3390
- command.query['shipmentTypes'] = shipment_types unless shipment_types.nil?
3391
- command.query['fields'] = fields unless fields.nil?
3392
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3393
- execute_or_queue_command(command, &block)
3394
- end
3395
-
3396
- # Processes return in your Merchant Center account.
3397
- # @param [Fixnum] merchant_id
3398
- # The ID of the account that manages the order. This cannot be a multi-client
3399
- # account.
3400
- # @param [String] return_id
3401
- # The ID of the return.
3402
- # @param [Google::Apis::ContentV2_1::OrderreturnsProcessRequest] orderreturns_process_request_object
3403
- # @param [String] fields
3404
- # Selector specifying which fields to include in a partial response.
3405
- # @param [String] quota_user
3406
- # Available to use for quota purposes for server-side applications. Can be any
3407
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3408
- # @param [Google::Apis::RequestOptions] options
3409
- # Request-specific options
3410
- #
3411
- # @yield [result, err] Result & error if block supplied
3412
- # @yieldparam result [Google::Apis::ContentV2_1::OrderreturnsProcessResponse] parsed result object
3413
- # @yieldparam err [StandardError] error object if request failed
3414
- #
3415
- # @return [Google::Apis::ContentV2_1::OrderreturnsProcessResponse]
3416
- #
3417
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3418
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3419
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3420
- def process_orderreturn(merchant_id, return_id, orderreturns_process_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3421
- command = make_simple_command(:post, '{merchantId}/orderreturns/{returnId}/process', options)
3422
- command.request_representation = Google::Apis::ContentV2_1::OrderreturnsProcessRequest::Representation
3423
- command.request_object = orderreturns_process_request_object
3424
- command.response_representation = Google::Apis::ContentV2_1::OrderreturnsProcessResponse::Representation
3425
- command.response_class = Google::Apis::ContentV2_1::OrderreturnsProcessResponse
3426
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3427
- command.params['returnId'] = return_id unless return_id.nil?
3428
- command.query['fields'] = fields unless fields.nil?
3429
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3430
- execute_or_queue_command(command, &block)
3431
- end
3432
-
3433
- # Links a return shipping label to a return id. You can only create one return
3434
- # label per return id. Since the label is sent to the buyer, the linked return
3435
- # label cannot be updated or deleted. If you try to create multiple return
3436
- # shipping labels for a single return id, every create request except the first
3437
- # will fail.
3438
- # @param [Fixnum] merchant_id
3439
- # Required. The merchant the Return Shipping Label belongs to.
3440
- # @param [String] return_id
3441
- # Required. Provide the Google-generated merchant order return ID.
3442
- # @param [Google::Apis::ContentV2_1::ReturnShippingLabel] return_shipping_label_object
3443
- # @param [String] fields
3444
- # Selector specifying which fields to include in a partial response.
3445
- # @param [String] quota_user
3446
- # Available to use for quota purposes for server-side applications. Can be any
3447
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3448
- # @param [Google::Apis::RequestOptions] options
3449
- # Request-specific options
3450
- #
3451
- # @yield [result, err] Result & error if block supplied
3452
- # @yieldparam result [Google::Apis::ContentV2_1::ReturnShippingLabel] parsed result object
3453
- # @yieldparam err [StandardError] error object if request failed
3454
- #
3455
- # @return [Google::Apis::ContentV2_1::ReturnShippingLabel]
3456
- #
3457
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3458
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3459
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3460
- def create_orderreturn_label(merchant_id, return_id, return_shipping_label_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3461
- command = make_simple_command(:post, '{merchantId}/orderreturns/{returnId}/labels', options)
3462
- command.request_representation = Google::Apis::ContentV2_1::ReturnShippingLabel::Representation
3463
- command.request_object = return_shipping_label_object
3464
- command.response_representation = Google::Apis::ContentV2_1::ReturnShippingLabel::Representation
3465
- command.response_class = Google::Apis::ContentV2_1::ReturnShippingLabel
3466
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3467
- command.params['returnId'] = return_id unless return_id.nil?
3468
- command.query['fields'] = fields unless fields.nil?
3469
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3470
- execute_or_queue_command(command, &block)
3471
- end
3472
-
3473
- # Marks an order as acknowledged.
3474
- # @param [Fixnum] merchant_id
3475
- # The ID of the account that manages the order. This cannot be a multi-client
3476
- # account.
3477
- # @param [String] order_id
3478
- # The ID of the order.
3479
- # @param [Google::Apis::ContentV2_1::OrdersAcknowledgeRequest] orders_acknowledge_request_object
3480
- # @param [String] fields
3481
- # Selector specifying which fields to include in a partial response.
3482
- # @param [String] quota_user
3483
- # Available to use for quota purposes for server-side applications. Can be any
3484
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3485
- # @param [Google::Apis::RequestOptions] options
3486
- # Request-specific options
3487
- #
3488
- # @yield [result, err] Result & error if block supplied
3489
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersAcknowledgeResponse] parsed result object
3490
- # @yieldparam err [StandardError] error object if request failed
3491
- #
3492
- # @return [Google::Apis::ContentV2_1::OrdersAcknowledgeResponse]
3493
- #
3494
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3495
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3496
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3497
- def acknowledge_order(merchant_id, order_id, orders_acknowledge_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3498
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/acknowledge', options)
3499
- command.request_representation = Google::Apis::ContentV2_1::OrdersAcknowledgeRequest::Representation
3500
- command.request_object = orders_acknowledge_request_object
3501
- command.response_representation = Google::Apis::ContentV2_1::OrdersAcknowledgeResponse::Representation
3502
- command.response_class = Google::Apis::ContentV2_1::OrdersAcknowledgeResponse
3503
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3504
- command.params['orderId'] = order_id unless order_id.nil?
3505
- command.query['fields'] = fields unless fields.nil?
3506
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3507
- execute_or_queue_command(command, &block)
3508
- end
3509
-
3510
- # Sandbox only. Moves a test order from state "`inProgress`" to state "`
3511
- # pendingShipment`".
3512
- # @param [Fixnum] merchant_id
3513
- # The ID of the account that manages the order. This cannot be a multi-client
3514
- # account.
3515
- # @param [String] order_id
3516
- # The ID of the test order to modify.
3517
- # @param [String] fields
3518
- # Selector specifying which fields to include in a partial response.
3519
- # @param [String] quota_user
3520
- # Available to use for quota purposes for server-side applications. Can be any
3521
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3522
- # @param [Google::Apis::RequestOptions] options
3523
- # Request-specific options
3524
- #
3525
- # @yield [result, err] Result & error if block supplied
3526
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersAdvanceTestOrderResponse] parsed result object
3527
- # @yieldparam err [StandardError] error object if request failed
3528
- #
3529
- # @return [Google::Apis::ContentV2_1::OrdersAdvanceTestOrderResponse]
3530
- #
3531
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3532
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3533
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3534
- def advancetestorder_order(merchant_id, order_id, fields: nil, quota_user: nil, options: nil, &block)
3535
- command = make_simple_command(:post, '{merchantId}/testorders/{orderId}/advance', options)
3536
- command.response_representation = Google::Apis::ContentV2_1::OrdersAdvanceTestOrderResponse::Representation
3537
- command.response_class = Google::Apis::ContentV2_1::OrdersAdvanceTestOrderResponse
3538
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3539
- command.params['orderId'] = order_id unless order_id.nil?
3540
- command.query['fields'] = fields unless fields.nil?
3541
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3542
- execute_or_queue_command(command, &block)
3543
- end
3544
-
3545
- # Cancels all line items in an order, making a full refund.
3546
- # @param [Fixnum] merchant_id
3547
- # The ID of the account that manages the order. This cannot be a multi-client
3548
- # account.
3549
- # @param [String] order_id
3550
- # The ID of the order to cancel.
3551
- # @param [Google::Apis::ContentV2_1::OrdersCancelRequest] orders_cancel_request_object
3552
- # @param [String] fields
3553
- # Selector specifying which fields to include in a partial response.
3554
- # @param [String] quota_user
3555
- # Available to use for quota purposes for server-side applications. Can be any
3556
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3557
- # @param [Google::Apis::RequestOptions] options
3558
- # Request-specific options
3559
- #
3560
- # @yield [result, err] Result & error if block supplied
3561
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersCancelResponse] parsed result object
3562
- # @yieldparam err [StandardError] error object if request failed
3563
- #
3564
- # @return [Google::Apis::ContentV2_1::OrdersCancelResponse]
3565
- #
3566
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3567
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3568
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3569
- def cancel_order(merchant_id, order_id, orders_cancel_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3570
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/cancel', options)
3571
- command.request_representation = Google::Apis::ContentV2_1::OrdersCancelRequest::Representation
3572
- command.request_object = orders_cancel_request_object
3573
- command.response_representation = Google::Apis::ContentV2_1::OrdersCancelResponse::Representation
3574
- command.response_class = Google::Apis::ContentV2_1::OrdersCancelResponse
3575
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3576
- command.params['orderId'] = order_id unless order_id.nil?
3577
- command.query['fields'] = fields unless fields.nil?
3578
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3579
- execute_or_queue_command(command, &block)
3580
- end
3581
-
3582
- # Cancels a line item, making a full refund.
3583
- # @param [Fixnum] merchant_id
3584
- # The ID of the account that manages the order. This cannot be a multi-client
3585
- # account.
3586
- # @param [String] order_id
3587
- # The ID of the order.
3588
- # @param [Google::Apis::ContentV2_1::OrdersCancelLineItemRequest] orders_cancel_line_item_request_object
3589
- # @param [String] fields
3590
- # Selector specifying which fields to include in a partial response.
3591
- # @param [String] quota_user
3592
- # Available to use for quota purposes for server-side applications. Can be any
3593
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3594
- # @param [Google::Apis::RequestOptions] options
3595
- # Request-specific options
3596
- #
3597
- # @yield [result, err] Result & error if block supplied
3598
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersCancelLineItemResponse] parsed result object
3599
- # @yieldparam err [StandardError] error object if request failed
3600
- #
3601
- # @return [Google::Apis::ContentV2_1::OrdersCancelLineItemResponse]
3602
- #
3603
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3604
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3605
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3606
- def cancellineitem_order(merchant_id, order_id, orders_cancel_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3607
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/cancelLineItem', options)
3608
- command.request_representation = Google::Apis::ContentV2_1::OrdersCancelLineItemRequest::Representation
3609
- command.request_object = orders_cancel_line_item_request_object
3610
- command.response_representation = Google::Apis::ContentV2_1::OrdersCancelLineItemResponse::Representation
3611
- command.response_class = Google::Apis::ContentV2_1::OrdersCancelLineItemResponse
3612
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3613
- command.params['orderId'] = order_id unless order_id.nil?
3614
- command.query['fields'] = fields unless fields.nil?
3615
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3616
- execute_or_queue_command(command, &block)
3617
- end
3618
-
3619
- # Sandbox only. Cancels a test order for customer-initiated cancellation.
3620
- # @param [Fixnum] merchant_id
3621
- # The ID of the account that manages the order. This cannot be a multi-client
3622
- # account.
3623
- # @param [String] order_id
3624
- # The ID of the test order to cancel.
3625
- # @param [Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerRequest] orders_cancel_test_order_by_customer_request_object
3626
- # @param [String] fields
3627
- # Selector specifying which fields to include in a partial response.
3628
- # @param [String] quota_user
3629
- # Available to use for quota purposes for server-side applications. Can be any
3630
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3631
- # @param [Google::Apis::RequestOptions] options
3632
- # Request-specific options
3633
- #
3634
- # @yield [result, err] Result & error if block supplied
3635
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerResponse] parsed result object
3636
- # @yieldparam err [StandardError] error object if request failed
3637
- #
3638
- # @return [Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerResponse]
3639
- #
3640
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3641
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3642
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3643
- def canceltestorderbycustomer_order(merchant_id, order_id, orders_cancel_test_order_by_customer_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3644
- command = make_simple_command(:post, '{merchantId}/testorders/{orderId}/cancelByCustomer', options)
3645
- command.request_representation = Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerRequest::Representation
3646
- command.request_object = orders_cancel_test_order_by_customer_request_object
3647
- command.response_representation = Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerResponse::Representation
3648
- command.response_class = Google::Apis::ContentV2_1::OrdersCancelTestOrderByCustomerResponse
3649
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3650
- command.params['orderId'] = order_id unless order_id.nil?
3651
- command.query['fields'] = fields unless fields.nil?
3652
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3653
- execute_or_queue_command(command, &block)
3654
- end
3655
-
3656
- # Capture funds from the customer for the current order total. This method
3657
- # should be called after the merchant verifies that they are able and ready to
3658
- # start shipping the order. This method blocks until a response is received from
3659
- # the payment processsor. If this method succeeds, the merchant is guaranteed to
3660
- # receive funds for the order after shipment. If the request fails, it can be
3661
- # retried or the order may be cancelled. This method cannot be called after the
3662
- # entire order is already shipped. A rejected error code is returned when the
3663
- # payment service provider has declined the charge. This indicates a problem
3664
- # between the PSP and either the merchant's or customer's account. Sometimes
3665
- # this error will be resolved by the customer. We recommend retrying these
3666
- # errors once per day or cancelling the order with reason `failedToCaptureFunds`
3667
- # if the items cannot be held.
3668
- # @param [Fixnum] merchant_id
3669
- # Required. The ID of the account that manages the order. This cannot be a multi-
3670
- # client account.
3671
- # @param [String] order_id
3672
- # Required. The ID of the Order.
3673
- # @param [Google::Apis::ContentV2_1::CaptureOrderRequest] capture_order_request_object
3674
- # @param [String] fields
3675
- # Selector specifying which fields to include in a partial response.
3676
- # @param [String] quota_user
3677
- # Available to use for quota purposes for server-side applications. Can be any
3678
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3679
- # @param [Google::Apis::RequestOptions] options
3680
- # Request-specific options
3681
- #
3682
- # @yield [result, err] Result & error if block supplied
3683
- # @yieldparam result [Google::Apis::ContentV2_1::CaptureOrderResponse] parsed result object
3684
- # @yieldparam err [StandardError] error object if request failed
3685
- #
3686
- # @return [Google::Apis::ContentV2_1::CaptureOrderResponse]
3687
- #
3688
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3689
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3690
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3691
- def capture_order(merchant_id, order_id, capture_order_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3692
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/captureOrder', options)
3693
- command.request_representation = Google::Apis::ContentV2_1::CaptureOrderRequest::Representation
3694
- command.request_object = capture_order_request_object
3695
- command.response_representation = Google::Apis::ContentV2_1::CaptureOrderResponse::Representation
3696
- command.response_class = Google::Apis::ContentV2_1::CaptureOrderResponse
3697
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3698
- command.params['orderId'] = order_id unless order_id.nil?
3699
- command.query['fields'] = fields unless fields.nil?
3700
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3701
- execute_or_queue_command(command, &block)
3702
- end
3703
-
3704
- # Sandbox only. Creates a test order.
3705
- # @param [Fixnum] merchant_id
3706
- # The ID of the account that should manage the order. This cannot be a multi-
3707
- # client account.
3708
- # @param [Google::Apis::ContentV2_1::OrdersCreateTestOrderRequest] orders_create_test_order_request_object
3709
- # @param [String] fields
3710
- # Selector specifying which fields to include in a partial response.
3711
- # @param [String] quota_user
3712
- # Available to use for quota purposes for server-side applications. Can be any
3713
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3714
- # @param [Google::Apis::RequestOptions] options
3715
- # Request-specific options
3716
- #
3717
- # @yield [result, err] Result & error if block supplied
3718
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersCreateTestOrderResponse] parsed result object
3719
- # @yieldparam err [StandardError] error object if request failed
3720
- #
3721
- # @return [Google::Apis::ContentV2_1::OrdersCreateTestOrderResponse]
3722
- #
3723
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3724
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3725
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3726
- def createtestorder_order(merchant_id, orders_create_test_order_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3727
- command = make_simple_command(:post, '{merchantId}/testorders', options)
3728
- command.request_representation = Google::Apis::ContentV2_1::OrdersCreateTestOrderRequest::Representation
3729
- command.request_object = orders_create_test_order_request_object
3730
- command.response_representation = Google::Apis::ContentV2_1::OrdersCreateTestOrderResponse::Representation
3731
- command.response_class = Google::Apis::ContentV2_1::OrdersCreateTestOrderResponse
3732
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3733
- command.query['fields'] = fields unless fields.nil?
3734
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3735
- execute_or_queue_command(command, &block)
3736
- end
3737
-
3738
- # Sandbox only. Creates a test return.
3739
- # @param [Fixnum] merchant_id
3740
- # The ID of the account that manages the order. This cannot be a multi-client
3741
- # account.
3742
- # @param [String] order_id
3743
- # The ID of the order.
3744
- # @param [Google::Apis::ContentV2_1::OrdersCreateTestReturnRequest] orders_create_test_return_request_object
3745
- # @param [String] fields
3746
- # Selector specifying which fields to include in a partial response.
3747
- # @param [String] quota_user
3748
- # Available to use for quota purposes for server-side applications. Can be any
3749
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3750
- # @param [Google::Apis::RequestOptions] options
3751
- # Request-specific options
3752
- #
3753
- # @yield [result, err] Result & error if block supplied
3754
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersCreateTestReturnResponse] parsed result object
3755
- # @yieldparam err [StandardError] error object if request failed
3756
- #
3757
- # @return [Google::Apis::ContentV2_1::OrdersCreateTestReturnResponse]
3758
- #
3759
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3760
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3761
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3762
- def createtestreturn_order(merchant_id, order_id, orders_create_test_return_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3763
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/testreturn', options)
3764
- command.request_representation = Google::Apis::ContentV2_1::OrdersCreateTestReturnRequest::Representation
3765
- command.request_object = orders_create_test_return_request_object
3766
- command.response_representation = Google::Apis::ContentV2_1::OrdersCreateTestReturnResponse::Representation
3767
- command.response_class = Google::Apis::ContentV2_1::OrdersCreateTestReturnResponse
3768
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3769
- command.params['orderId'] = order_id unless order_id.nil?
3770
- command.query['fields'] = fields unless fields.nil?
3771
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3772
- execute_or_queue_command(command, &block)
3773
- end
3774
-
3775
- # Retrieves an order from your Merchant Center account.
3776
- # @param [Fixnum] merchant_id
3777
- # The ID of the account that manages the order. This cannot be a multi-client
3778
- # account.
3779
- # @param [String] order_id
3780
- # The ID of the order.
3781
- # @param [String] fields
3782
- # Selector specifying which fields to include in a partial response.
3783
- # @param [String] quota_user
3784
- # Available to use for quota purposes for server-side applications. Can be any
3785
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3786
- # @param [Google::Apis::RequestOptions] options
3787
- # Request-specific options
3788
- #
3789
- # @yield [result, err] Result & error if block supplied
3790
- # @yieldparam result [Google::Apis::ContentV2_1::Order] parsed result object
3791
- # @yieldparam err [StandardError] error object if request failed
3792
- #
3793
- # @return [Google::Apis::ContentV2_1::Order]
3794
- #
3795
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3796
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3797
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3798
- def get_order(merchant_id, order_id, fields: nil, quota_user: nil, options: nil, &block)
3799
- command = make_simple_command(:get, '{merchantId}/orders/{orderId}', options)
3800
- command.response_representation = Google::Apis::ContentV2_1::Order::Representation
3801
- command.response_class = Google::Apis::ContentV2_1::Order
3802
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3803
- command.params['orderId'] = order_id unless order_id.nil?
3804
- command.query['fields'] = fields unless fields.nil?
3805
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3806
- execute_or_queue_command(command, &block)
3807
- end
3808
-
3809
- # Retrieves an order using merchant order ID.
3810
- # @param [Fixnum] merchant_id
3811
- # The ID of the account that manages the order. This cannot be a multi-client
3812
- # account.
3813
- # @param [String] merchant_order_id
3814
- # The merchant order ID to be looked for.
3815
- # @param [String] fields
3816
- # Selector specifying which fields to include in a partial response.
3817
- # @param [String] quota_user
3818
- # Available to use for quota purposes for server-side applications. Can be any
3819
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3820
- # @param [Google::Apis::RequestOptions] options
3821
- # Request-specific options
3822
- #
3823
- # @yield [result, err] Result & error if block supplied
3824
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersGetByMerchantOrderIdResponse] parsed result object
3825
- # @yieldparam err [StandardError] error object if request failed
3826
- #
3827
- # @return [Google::Apis::ContentV2_1::OrdersGetByMerchantOrderIdResponse]
3828
- #
3829
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3830
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3831
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3832
- def getbymerchantorderid_order(merchant_id, merchant_order_id, fields: nil, quota_user: nil, options: nil, &block)
3833
- command = make_simple_command(:get, '{merchantId}/ordersbymerchantid/{merchantOrderId}', options)
3834
- command.response_representation = Google::Apis::ContentV2_1::OrdersGetByMerchantOrderIdResponse::Representation
3835
- command.response_class = Google::Apis::ContentV2_1::OrdersGetByMerchantOrderIdResponse
3836
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3837
- command.params['merchantOrderId'] = merchant_order_id unless merchant_order_id.nil?
3838
- command.query['fields'] = fields unless fields.nil?
3839
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3840
- execute_or_queue_command(command, &block)
3841
- end
3842
-
3843
- # Sandbox only. Retrieves an order template that can be used to quickly create a
3844
- # new order in sandbox.
3845
- # @param [Fixnum] merchant_id
3846
- # The ID of the account that should manage the order. This cannot be a multi-
3847
- # client account.
3848
- # @param [String] template_name
3849
- # The name of the template to retrieve.
3850
- # @param [String] country
3851
- # The country of the template to retrieve. Defaults to "`US`".
3852
- # @param [String] fields
3853
- # Selector specifying which fields to include in a partial response.
3854
- # @param [String] quota_user
3855
- # Available to use for quota purposes for server-side applications. Can be any
3856
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3857
- # @param [Google::Apis::RequestOptions] options
3858
- # Request-specific options
3859
- #
3860
- # @yield [result, err] Result & error if block supplied
3861
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersGetTestOrderTemplateResponse] parsed result object
3862
- # @yieldparam err [StandardError] error object if request failed
3863
- #
3864
- # @return [Google::Apis::ContentV2_1::OrdersGetTestOrderTemplateResponse]
3865
- #
3866
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3867
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3868
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3869
- def gettestordertemplate_order(merchant_id, template_name, country: nil, fields: nil, quota_user: nil, options: nil, &block)
3870
- command = make_simple_command(:get, '{merchantId}/testordertemplates/{templateName}', options)
3871
- command.response_representation = Google::Apis::ContentV2_1::OrdersGetTestOrderTemplateResponse::Representation
3872
- command.response_class = Google::Apis::ContentV2_1::OrdersGetTestOrderTemplateResponse
3873
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3874
- command.params['templateName'] = template_name unless template_name.nil?
3875
- command.query['country'] = country unless country.nil?
3876
- command.query['fields'] = fields unless fields.nil?
3877
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3878
- execute_or_queue_command(command, &block)
3879
- end
3880
-
3881
- # Deprecated. Notifies that item return and refund was handled directly by
3882
- # merchant outside of Google payments processing (for example, cash refund done
3883
- # in store). Note: We recommend calling the returnrefundlineitem method to
3884
- # refund in-store returns. We will issue the refund directly to the customer.
3885
- # This helps to prevent possible differences arising between merchant and Google
3886
- # transaction records. We also recommend having the point of sale system
3887
- # communicate with Google to ensure that customers do not receive a double
3888
- # refund by first refunding through Google then through an in-store return.
3889
- # @param [Fixnum] merchant_id
3890
- # The ID of the account that manages the order. This cannot be a multi-client
3891
- # account.
3892
- # @param [String] order_id
3893
- # The ID of the order.
3894
- # @param [Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemRequest] orders_in_store_refund_line_item_request_object
3895
- # @param [String] fields
3896
- # Selector specifying which fields to include in a partial response.
3897
- # @param [String] quota_user
3898
- # Available to use for quota purposes for server-side applications. Can be any
3899
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3900
- # @param [Google::Apis::RequestOptions] options
3901
- # Request-specific options
3902
- #
3903
- # @yield [result, err] Result & error if block supplied
3904
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemResponse] parsed result object
3905
- # @yieldparam err [StandardError] error object if request failed
3906
- #
3907
- # @return [Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemResponse]
3908
- #
3909
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3910
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3911
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3912
- def instorerefundlineitem_order(merchant_id, order_id, orders_in_store_refund_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
3913
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/inStoreRefundLineItem', options)
3914
- command.request_representation = Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemRequest::Representation
3915
- command.request_object = orders_in_store_refund_line_item_request_object
3916
- command.response_representation = Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemResponse::Representation
3917
- command.response_class = Google::Apis::ContentV2_1::OrdersInStoreRefundLineItemResponse
3918
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3919
- command.params['orderId'] = order_id unless order_id.nil?
3920
- command.query['fields'] = fields unless fields.nil?
3921
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3922
- execute_or_queue_command(command, &block)
3923
- end
3924
-
3925
- # Lists the orders in your Merchant Center account.
3926
- # @param [Fixnum] merchant_id
3927
- # The ID of the account that manages the order. This cannot be a multi-client
3928
- # account.
3929
- # @param [Boolean] acknowledged
3930
- # Obtains orders that match the acknowledgement status. When set to true,
3931
- # obtains orders that have been acknowledged. When false, obtains orders that
3932
- # have not been acknowledged. We recommend using this filter set to `false`, in
3933
- # conjunction with the `acknowledge` call, such that only un-acknowledged orders
3934
- # are returned.
3935
- # @param [Fixnum] max_results
3936
- # The maximum number of orders to return in the response, used for paging. The
3937
- # default value is 25 orders per page, and the maximum allowed value is 250
3938
- # orders per page.
3939
- # @param [String] order_by
3940
- # Order results by placement date in descending or ascending order. Acceptable
3941
- # values are: - placedDateAsc - placedDateDesc
3942
- # @param [String] page_token
3943
- # The token returned by the previous request.
3944
- # @param [String] placed_date_end
3945
- # Obtains orders placed before this date (exclusively), in ISO 8601 format.
3946
- # @param [String] placed_date_start
3947
- # Obtains orders placed after this date (inclusively), in ISO 8601 format.
3948
- # @param [Array<String>, String] statuses
3949
- # Obtains orders that match any of the specified statuses. Note that `active` is
3950
- # a shortcut for `pendingShipment` and `partiallyShipped`, and `completed` is a
3951
- # shortcut for `shipped`, `partiallyDelivered`, `delivered`, `partiallyReturned`,
3952
- # `returned`, and `canceled`.
3953
- # @param [String] fields
3954
- # Selector specifying which fields to include in a partial response.
3955
- # @param [String] quota_user
3956
- # Available to use for quota purposes for server-side applications. Can be any
3957
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3958
- # @param [Google::Apis::RequestOptions] options
3959
- # Request-specific options
3960
- #
3961
- # @yield [result, err] Result & error if block supplied
3962
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersListResponse] parsed result object
3963
- # @yieldparam err [StandardError] error object if request failed
3964
- #
3965
- # @return [Google::Apis::ContentV2_1::OrdersListResponse]
3966
- #
3967
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
3968
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
3969
- # @raise [Google::Apis::AuthorizationError] Authorization is required
3970
- 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)
3971
- command = make_simple_command(:get, '{merchantId}/orders', options)
3972
- command.response_representation = Google::Apis::ContentV2_1::OrdersListResponse::Representation
3973
- command.response_class = Google::Apis::ContentV2_1::OrdersListResponse
3974
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
3975
- command.query['acknowledged'] = acknowledged unless acknowledged.nil?
3976
- command.query['maxResults'] = max_results unless max_results.nil?
3977
- command.query['orderBy'] = order_by unless order_by.nil?
3978
- command.query['pageToken'] = page_token unless page_token.nil?
3979
- command.query['placedDateEnd'] = placed_date_end unless placed_date_end.nil?
3980
- command.query['placedDateStart'] = placed_date_start unless placed_date_start.nil?
3981
- command.query['statuses'] = statuses unless statuses.nil?
3982
- command.query['fields'] = fields unless fields.nil?
3983
- command.query['quotaUser'] = quota_user unless quota_user.nil?
3984
- execute_or_queue_command(command, &block)
3985
- end
3986
-
3987
- # Issues a partial or total refund for items and shipment.
3988
- # @param [Fixnum] merchant_id
3989
- # The ID of the account that manages the order. This cannot be a multi-client
3990
- # account.
3991
- # @param [String] order_id
3992
- # The ID of the order to refund.
3993
- # @param [Google::Apis::ContentV2_1::OrdersRefundItemRequest] orders_refund_item_request_object
3994
- # @param [String] fields
3995
- # Selector specifying which fields to include in a partial response.
3996
- # @param [String] quota_user
3997
- # Available to use for quota purposes for server-side applications. Can be any
3998
- # arbitrary string assigned to a user, but should not exceed 40 characters.
3999
- # @param [Google::Apis::RequestOptions] options
4000
- # Request-specific options
4001
- #
4002
- # @yield [result, err] Result & error if block supplied
4003
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersRefundItemResponse] parsed result object
4004
- # @yieldparam err [StandardError] error object if request failed
4005
- #
4006
- # @return [Google::Apis::ContentV2_1::OrdersRefundItemResponse]
4007
- #
4008
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4009
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4010
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4011
- def refunditem_order(merchant_id, order_id, orders_refund_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4012
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/refunditem', options)
4013
- command.request_representation = Google::Apis::ContentV2_1::OrdersRefundItemRequest::Representation
4014
- command.request_object = orders_refund_item_request_object
4015
- command.response_representation = Google::Apis::ContentV2_1::OrdersRefundItemResponse::Representation
4016
- command.response_class = Google::Apis::ContentV2_1::OrdersRefundItemResponse
4017
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4018
- command.params['orderId'] = order_id unless order_id.nil?
4019
- command.query['fields'] = fields unless fields.nil?
4020
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4021
- execute_or_queue_command(command, &block)
4022
- end
4023
-
4024
- # Issues a partial or total refund for an order.
4025
- # @param [Fixnum] merchant_id
4026
- # The ID of the account that manages the order. This cannot be a multi-client
4027
- # account.
4028
- # @param [String] order_id
4029
- # The ID of the order to refund.
4030
- # @param [Google::Apis::ContentV2_1::OrdersRefundOrderRequest] orders_refund_order_request_object
4031
- # @param [String] fields
4032
- # Selector specifying which fields to include in a partial response.
4033
- # @param [String] quota_user
4034
- # Available to use for quota purposes for server-side applications. Can be any
4035
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4036
- # @param [Google::Apis::RequestOptions] options
4037
- # Request-specific options
4038
- #
4039
- # @yield [result, err] Result & error if block supplied
4040
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersRefundOrderResponse] parsed result object
4041
- # @yieldparam err [StandardError] error object if request failed
4042
- #
4043
- # @return [Google::Apis::ContentV2_1::OrdersRefundOrderResponse]
4044
- #
4045
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4046
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4047
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4048
- def refundorder_order(merchant_id, order_id, orders_refund_order_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4049
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/refundorder', options)
4050
- command.request_representation = Google::Apis::ContentV2_1::OrdersRefundOrderRequest::Representation
4051
- command.request_object = orders_refund_order_request_object
4052
- command.response_representation = Google::Apis::ContentV2_1::OrdersRefundOrderResponse::Representation
4053
- command.response_class = Google::Apis::ContentV2_1::OrdersRefundOrderResponse
4054
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4055
- command.params['orderId'] = order_id unless order_id.nil?
4056
- command.query['fields'] = fields unless fields.nil?
4057
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4058
- execute_or_queue_command(command, &block)
4059
- end
4060
-
4061
- # Rejects return on an line item.
4062
- # @param [Fixnum] merchant_id
4063
- # The ID of the account that manages the order. This cannot be a multi-client
4064
- # account.
4065
- # @param [String] order_id
4066
- # The ID of the order.
4067
- # @param [Google::Apis::ContentV2_1::OrdersRejectReturnLineItemRequest] orders_reject_return_line_item_request_object
4068
- # @param [String] fields
4069
- # Selector specifying which fields to include in a partial response.
4070
- # @param [String] quota_user
4071
- # Available to use for quota purposes for server-side applications. Can be any
4072
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4073
- # @param [Google::Apis::RequestOptions] options
4074
- # Request-specific options
4075
- #
4076
- # @yield [result, err] Result & error if block supplied
4077
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersRejectReturnLineItemResponse] parsed result object
4078
- # @yieldparam err [StandardError] error object if request failed
4079
- #
4080
- # @return [Google::Apis::ContentV2_1::OrdersRejectReturnLineItemResponse]
4081
- #
4082
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4083
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4084
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4085
- def rejectreturnlineitem_order(merchant_id, order_id, orders_reject_return_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4086
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/rejectReturnLineItem', options)
4087
- command.request_representation = Google::Apis::ContentV2_1::OrdersRejectReturnLineItemRequest::Representation
4088
- command.request_object = orders_reject_return_line_item_request_object
4089
- command.response_representation = Google::Apis::ContentV2_1::OrdersRejectReturnLineItemResponse::Representation
4090
- command.response_class = Google::Apis::ContentV2_1::OrdersRejectReturnLineItemResponse
4091
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4092
- command.params['orderId'] = order_id unless order_id.nil?
4093
- command.query['fields'] = fields unless fields.nil?
4094
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4095
- execute_or_queue_command(command, &block)
4096
- end
4097
-
4098
- # Returns and refunds a line item. Note that this method can only be called on
4099
- # fully shipped orders. The Orderreturns API is the preferred way to handle
4100
- # returns after you receive a return from a customer. You can use Orderreturns.
4101
- # list or Orderreturns.get to search for the return, and then use Orderreturns.
4102
- # processreturn to issue the refund. If the return cannot be found, then we
4103
- # recommend using this API to issue a refund.
4104
- # @param [Fixnum] merchant_id
4105
- # The ID of the account that manages the order. This cannot be a multi-client
4106
- # account.
4107
- # @param [String] order_id
4108
- # The ID of the order.
4109
- # @param [Google::Apis::ContentV2_1::OrdersReturnRefundLineItemRequest] orders_return_refund_line_item_request_object
4110
- # @param [String] fields
4111
- # Selector specifying which fields to include in a partial response.
4112
- # @param [String] quota_user
4113
- # Available to use for quota purposes for server-side applications. Can be any
4114
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4115
- # @param [Google::Apis::RequestOptions] options
4116
- # Request-specific options
4117
- #
4118
- # @yield [result, err] Result & error if block supplied
4119
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersReturnRefundLineItemResponse] parsed result object
4120
- # @yieldparam err [StandardError] error object if request failed
4121
- #
4122
- # @return [Google::Apis::ContentV2_1::OrdersReturnRefundLineItemResponse]
4123
- #
4124
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4125
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4126
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4127
- def returnrefundlineitem_order(merchant_id, order_id, orders_return_refund_line_item_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4128
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/returnRefundLineItem', options)
4129
- command.request_representation = Google::Apis::ContentV2_1::OrdersReturnRefundLineItemRequest::Representation
4130
- command.request_object = orders_return_refund_line_item_request_object
4131
- command.response_representation = Google::Apis::ContentV2_1::OrdersReturnRefundLineItemResponse::Representation
4132
- command.response_class = Google::Apis::ContentV2_1::OrdersReturnRefundLineItemResponse
4133
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4134
- command.params['orderId'] = order_id unless order_id.nil?
4135
- command.query['fields'] = fields unless fields.nil?
4136
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4137
- execute_or_queue_command(command, &block)
4138
- end
4139
-
4140
- # Sets (or overrides if it already exists) merchant provided annotations in the
4141
- # form of key-value pairs. A common use case would be to supply us with
4142
- # additional structured information about a line item that cannot be provided
4143
- # through other methods. Submitted key-value pairs can be retrieved as part of
4144
- # the orders resource.
4145
- # @param [Fixnum] merchant_id
4146
- # The ID of the account that manages the order. This cannot be a multi-client
4147
- # account.
4148
- # @param [String] order_id
4149
- # The ID of the order.
4150
- # @param [Google::Apis::ContentV2_1::OrdersSetLineItemMetadataRequest] orders_set_line_item_metadata_request_object
4151
- # @param [String] fields
4152
- # Selector specifying which fields to include in a partial response.
4153
- # @param [String] quota_user
4154
- # Available to use for quota purposes for server-side applications. Can be any
4155
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4156
- # @param [Google::Apis::RequestOptions] options
4157
- # Request-specific options
4158
- #
4159
- # @yield [result, err] Result & error if block supplied
4160
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersSetLineItemMetadataResponse] parsed result object
4161
- # @yieldparam err [StandardError] error object if request failed
4162
- #
4163
- # @return [Google::Apis::ContentV2_1::OrdersSetLineItemMetadataResponse]
4164
- #
4165
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4166
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4167
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4168
- def setlineitemmetadata_order(merchant_id, order_id, orders_set_line_item_metadata_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4169
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/setLineItemMetadata', options)
4170
- command.request_representation = Google::Apis::ContentV2_1::OrdersSetLineItemMetadataRequest::Representation
4171
- command.request_object = orders_set_line_item_metadata_request_object
4172
- command.response_representation = Google::Apis::ContentV2_1::OrdersSetLineItemMetadataResponse::Representation
4173
- command.response_class = Google::Apis::ContentV2_1::OrdersSetLineItemMetadataResponse
4174
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4175
- command.params['orderId'] = order_id unless order_id.nil?
4176
- command.query['fields'] = fields unless fields.nil?
4177
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4178
- execute_or_queue_command(command, &block)
4179
- end
4180
-
4181
- # Marks line item(s) as shipped.
4182
- # @param [Fixnum] merchant_id
4183
- # The ID of the account that manages the order. This cannot be a multi-client
4184
- # account.
4185
- # @param [String] order_id
4186
- # The ID of the order.
4187
- # @param [Google::Apis::ContentV2_1::OrdersShipLineItemsRequest] orders_ship_line_items_request_object
4188
- # @param [String] fields
4189
- # Selector specifying which fields to include in a partial response.
4190
- # @param [String] quota_user
4191
- # Available to use for quota purposes for server-side applications. Can be any
4192
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4193
- # @param [Google::Apis::RequestOptions] options
4194
- # Request-specific options
4195
- #
4196
- # @yield [result, err] Result & error if block supplied
4197
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersShipLineItemsResponse] parsed result object
4198
- # @yieldparam err [StandardError] error object if request failed
4199
- #
4200
- # @return [Google::Apis::ContentV2_1::OrdersShipLineItemsResponse]
4201
- #
4202
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4203
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4204
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4205
- def shiplineitems_order(merchant_id, order_id, orders_ship_line_items_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4206
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/shipLineItems', options)
4207
- command.request_representation = Google::Apis::ContentV2_1::OrdersShipLineItemsRequest::Representation
4208
- command.request_object = orders_ship_line_items_request_object
4209
- command.response_representation = Google::Apis::ContentV2_1::OrdersShipLineItemsResponse::Representation
4210
- command.response_class = Google::Apis::ContentV2_1::OrdersShipLineItemsResponse
4211
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4212
- command.params['orderId'] = order_id unless order_id.nil?
4213
- command.query['fields'] = fields unless fields.nil?
4214
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4215
- execute_or_queue_command(command, &block)
4216
- end
4217
-
4218
- # Updates ship by and delivery by dates for a line item.
4219
- # @param [Fixnum] merchant_id
4220
- # The ID of the account that manages the order. This cannot be a multi-client
4221
- # account.
4222
- # @param [String] order_id
4223
- # The ID of the order.
4224
- # @param [Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsRequest] orders_update_line_item_shipping_details_request_object
4225
- # @param [String] fields
4226
- # Selector specifying which fields to include in a partial response.
4227
- # @param [String] quota_user
4228
- # Available to use for quota purposes for server-side applications. Can be any
4229
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4230
- # @param [Google::Apis::RequestOptions] options
4231
- # Request-specific options
4232
- #
4233
- # @yield [result, err] Result & error if block supplied
4234
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsResponse] parsed result object
4235
- # @yieldparam err [StandardError] error object if request failed
4236
- #
4237
- # @return [Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsResponse]
4238
- #
4239
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4240
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4241
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4242
- def updatelineitemshippingdetails_order(merchant_id, order_id, orders_update_line_item_shipping_details_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4243
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/updateLineItemShippingDetails', options)
4244
- command.request_representation = Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsRequest::Representation
4245
- command.request_object = orders_update_line_item_shipping_details_request_object
4246
- command.response_representation = Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsResponse::Representation
4247
- command.response_class = Google::Apis::ContentV2_1::OrdersUpdateLineItemShippingDetailsResponse
4248
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4249
- command.params['orderId'] = order_id unless order_id.nil?
4250
- command.query['fields'] = fields unless fields.nil?
4251
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4252
- execute_or_queue_command(command, &block)
4253
- end
4254
-
4255
- # Updates the merchant order ID for a given order.
4256
- # @param [Fixnum] merchant_id
4257
- # The ID of the account that manages the order. This cannot be a multi-client
4258
- # account.
4259
- # @param [String] order_id
4260
- # The ID of the order.
4261
- # @param [Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdRequest] orders_update_merchant_order_id_request_object
4262
- # @param [String] fields
4263
- # Selector specifying which fields to include in a partial response.
4264
- # @param [String] quota_user
4265
- # Available to use for quota purposes for server-side applications. Can be any
4266
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4267
- # @param [Google::Apis::RequestOptions] options
4268
- # Request-specific options
4269
- #
4270
- # @yield [result, err] Result & error if block supplied
4271
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdResponse] parsed result object
4272
- # @yieldparam err [StandardError] error object if request failed
4273
- #
4274
- # @return [Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdResponse]
4275
- #
4276
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4277
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4278
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4279
- def updatemerchantorderid_order(merchant_id, order_id, orders_update_merchant_order_id_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4280
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/updateMerchantOrderId', options)
4281
- command.request_representation = Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdRequest::Representation
4282
- command.request_object = orders_update_merchant_order_id_request_object
4283
- command.response_representation = Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdResponse::Representation
4284
- command.response_class = Google::Apis::ContentV2_1::OrdersUpdateMerchantOrderIdResponse
4285
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4286
- command.params['orderId'] = order_id unless order_id.nil?
4287
- command.query['fields'] = fields unless fields.nil?
4288
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4289
- execute_or_queue_command(command, &block)
4290
- end
4291
-
4292
- # Updates a shipment's status, carrier, and/or tracking ID.
4293
- # @param [Fixnum] merchant_id
4294
- # The ID of the account that manages the order. This cannot be a multi-client
4295
- # account.
4296
- # @param [String] order_id
4297
- # The ID of the order.
4298
- # @param [Google::Apis::ContentV2_1::OrdersUpdateShipmentRequest] orders_update_shipment_request_object
4299
- # @param [String] fields
4300
- # Selector specifying which fields to include in a partial response.
4301
- # @param [String] quota_user
4302
- # Available to use for quota purposes for server-side applications. Can be any
4303
- # arbitrary string assigned to a user, but should not exceed 40 characters.
4304
- # @param [Google::Apis::RequestOptions] options
4305
- # Request-specific options
4306
- #
4307
- # @yield [result, err] Result & error if block supplied
4308
- # @yieldparam result [Google::Apis::ContentV2_1::OrdersUpdateShipmentResponse] parsed result object
4309
- # @yieldparam err [StandardError] error object if request failed
4310
- #
4311
- # @return [Google::Apis::ContentV2_1::OrdersUpdateShipmentResponse]
4312
- #
4313
- # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
4314
- # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
4315
- # @raise [Google::Apis::AuthorizationError] Authorization is required
4316
- def updateshipment_order(merchant_id, order_id, orders_update_shipment_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
4317
- command = make_simple_command(:post, '{merchantId}/orders/{orderId}/updateShipment', options)
4318
- command.request_representation = Google::Apis::ContentV2_1::OrdersUpdateShipmentRequest::Representation
4319
- command.request_object = orders_update_shipment_request_object
4320
- command.response_representation = Google::Apis::ContentV2_1::OrdersUpdateShipmentResponse::Representation
4321
- command.response_class = Google::Apis::ContentV2_1::OrdersUpdateShipmentResponse
4322
- command.params['merchantId'] = merchant_id unless merchant_id.nil?
4323
- command.params['orderId'] = order_id unless order_id.nil?
4324
- command.query['fields'] = fields unless fields.nil?
4325
- command.query['quotaUser'] = quota_user unless quota_user.nil?
4326
- execute_or_queue_command(command, &block)
4327
- end
4328
-
4329
2806
  # Creates new order tracking signal.
4330
2807
  # @param [Fixnum] merchant_id
4331
2808
  # The ID of the merchant for which the order signal is created.