1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="content_v2.html">Content API for Shopping</a> . <a href="content_v2.orderinvoices.html">orderinvoices</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#close">close()</a></code></p> 79<p class="firstline">Close httplib2 connections.</p> 80<p class="toc_element"> 81 <code><a href="#createchargeinvoice">createchargeinvoice(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 82<p class="firstline">Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders.</p> 83<p class="toc_element"> 84 <code><a href="#createrefundinvoice">createrefundinvoice(merchantId, orderId, body=None, x__xgafv=None)</a></code></p> 85<p class="firstline">Creates a refund invoice for one or more shipment groups, and triggers a refund for orderinvoice enabled orders. This can only be used for line items that have previously been charged using `createChargeInvoice`. All amounts (except for the summary) are incremental with respect to the previous invoice.</p> 86<h3>Method Details</h3> 87<div class="method"> 88 <code class="details" id="close">close()</code> 89 <pre>Close httplib2 connections.</pre> 90</div> 91 92<div class="method"> 93 <code class="details" id="createchargeinvoice">createchargeinvoice(merchantId, orderId, body=None, x__xgafv=None)</code> 94 <pre>Creates a charge invoice for a shipment group, and triggers a charge capture for orderinvoice enabled orders. 95 96Args: 97 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 98 orderId: string, The ID of the order. (required) 99 body: object, The request body. 100 The object takes the form of: 101 102{ 103 "invoiceId": "A String", # [required] The ID of the invoice. 104 "invoiceSummary": { # [required] Invoice summary. 105 "additionalChargeSummaries": [ # Summary of the total amounts of the additional charges. 106 { 107 "totalAmount": { # [required] Total additional charge for this type. 108 "pretax": { # [required] Value before taxes. 109 "currency": "A String", # The currency of the price. 110 "value": "A String", # The price represented as a number. 111 }, 112 "tax": { # [required] Tax value. 113 "currency": "A String", # The currency of the price. 114 "value": "A String", # The price represented as a number. 115 }, 116 }, 117 "type": "A String", # [required] Type of the additional charge. Acceptable values are: - "`shipping`" 118 }, 119 ], 120 "customerBalance": { # Deprecated. 121 "pretax": { # [required] Value before taxes. 122 "currency": "A String", # The currency of the price. 123 "value": "A String", # The price represented as a number. 124 }, 125 "tax": { # [required] Tax value. 126 "currency": "A String", # The currency of the price. 127 "value": "A String", # The price represented as a number. 128 }, 129 }, 130 "googleBalance": { # Deprecated. 131 "pretax": { # [required] Value before taxes. 132 "currency": "A String", # The currency of the price. 133 "value": "A String", # The price represented as a number. 134 }, 135 "tax": { # [required] Tax value. 136 "currency": "A String", # The currency of the price. 137 "value": "A String", # The price represented as a number. 138 }, 139 }, 140 "merchantBalance": { # Deprecated. 141 "pretax": { # [required] Value before taxes. 142 "currency": "A String", # The currency of the price. 143 "value": "A String", # The price represented as a number. 144 }, 145 "tax": { # [required] Tax value. 146 "currency": "A String", # The currency of the price. 147 "value": "A String", # The price represented as a number. 148 }, 149 }, 150 "productTotal": { # [required] Total price for the product. 151 "pretax": { # [required] Value before taxes. 152 "currency": "A String", # The currency of the price. 153 "value": "A String", # The price represented as a number. 154 }, 155 "tax": { # [required] Tax value. 156 "currency": "A String", # The currency of the price. 157 "value": "A String", # The price represented as a number. 158 }, 159 }, 160 "promotionSummaries": [ # Deprecated. 161 { 162 "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts. 163 "pretax": { # [required] Value before taxes. 164 "currency": "A String", # The currency of the price. 165 "value": "A String", # The price represented as a number. 166 }, 167 "tax": { # [required] Tax value. 168 "currency": "A String", # The currency of the price. 169 "value": "A String", # The price represented as a number. 170 }, 171 }, 172 "promotionId": "A String", # [required] ID of the promotion. 173 }, 174 ], 175 }, 176 "lineItemInvoices": [ # [required] Invoice details per line item. 177 { 178 "lineItemId": "A String", # ID of the line item. Either lineItemId or productId must be set. 179 "productId": "A String", # ID of the product. This is the REST ID used in the products service. Either lineItemId or productId must be set. 180 "shipmentUnitIds": [ # [required] The shipment unit ID is assigned by the merchant and defines individual quantities within a line item. The same ID can be assigned to units that are the same while units that differ must be assigned a different ID (for example: free or promotional units). 181 "A String", 182 ], 183 "unitInvoice": { # [required] Invoice details for a single unit. 184 "additionalCharges": [ # Additional charges for a unit, e.g. shipping costs. 185 { 186 "additionalChargeAmount": { # [required] Amount of the additional charge. 187 "pretax": { # [required] Value before taxes. 188 "currency": "A String", # The currency of the price. 189 "value": "A String", # The price represented as a number. 190 }, 191 "tax": { # [required] Tax value. 192 "currency": "A String", # The currency of the price. 193 "value": "A String", # The price represented as a number. 194 }, 195 }, 196 "additionalChargePromotions": [ # Deprecated. 197 { 198 "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts. 199 "pretax": { # [required] Value before taxes. 200 "currency": "A String", # The currency of the price. 201 "value": "A String", # The price represented as a number. 202 }, 203 "tax": { # [required] Tax value. 204 "currency": "A String", # The currency of the price. 205 "value": "A String", # The price represented as a number. 206 }, 207 }, 208 "promotionId": "A String", # [required] ID of the promotion. 209 }, 210 ], 211 "type": "A String", # [required] Type of the additional charge. Acceptable values are: - "`shipping`" 212 }, 213 ], 214 "promotions": [ # Deprecated. 215 { 216 "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts. 217 "pretax": { # [required] Value before taxes. 218 "currency": "A String", # The currency of the price. 219 "value": "A String", # The price represented as a number. 220 }, 221 "tax": { # [required] Tax value. 222 "currency": "A String", # The currency of the price. 223 "value": "A String", # The price represented as a number. 224 }, 225 }, 226 "promotionId": "A String", # [required] ID of the promotion. 227 }, 228 ], 229 "unitPricePretax": { # [required] Price of the unit, before applying taxes. 230 "currency": "A String", # The currency of the price. 231 "value": "A String", # The price represented as a number. 232 }, 233 "unitPriceTaxes": [ # Tax amounts to apply to the unit price. 234 { 235 "taxAmount": { # [required] Tax amount for the tax type. 236 "currency": "A String", # The currency of the price. 237 "value": "A String", # The price represented as a number. 238 }, 239 "taxName": "A String", # Optional name of the tax type. This should only be provided if `taxType` is `otherFeeTax`. 240 "taxType": "A String", # [required] Type of the tax. Acceptable values are: - "`otherFee`" - "`otherFeeTax`" - "`sales`" 241 }, 242 ], 243 }, 244 }, 245 ], 246 "operationId": "A String", # [required] The ID of the operation, unique across all operations for a given order. 247 "shipmentGroupId": "A String", # [required] ID of the shipment group. It is assigned by the merchant in the `shipLineItems` method and is used to group multiple line items that have the same kind of shipping charges. 248} 249 250 x__xgafv: string, V1 error format. 251 Allowed values 252 1 - v1 error format 253 2 - v2 error format 254 255Returns: 256 An object of the form: 257 258 { 259 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 260 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "content#orderinvoicesCreateChargeInvoiceResponse". 261}</pre> 262</div> 263 264<div class="method"> 265 <code class="details" id="createrefundinvoice">createrefundinvoice(merchantId, orderId, body=None, x__xgafv=None)</code> 266 <pre>Creates a refund invoice for one or more shipment groups, and triggers a refund for orderinvoice enabled orders. This can only be used for line items that have previously been charged using `createChargeInvoice`. All amounts (except for the summary) are incremental with respect to the previous invoice. 267 268Args: 269 merchantId: string, The ID of the account that manages the order. This cannot be a multi-client account. (required) 270 orderId: string, The ID of the order. (required) 271 body: object, The request body. 272 The object takes the form of: 273 274{ 275 "invoiceId": "A String", # [required] The ID of the invoice. 276 "operationId": "A String", # [required] The ID of the operation, unique across all operations for a given order. 277 "refundOnlyOption": { # Option to create a refund-only invoice. Exactly one of `refundOnlyOption` or `returnOption` must be provided. 278 "description": "A String", # Optional description of the refund reason. 279 "reason": "A String", # [required] Reason for the refund. Acceptable values are: - "`adjustment`" - "`autoPostInternal`" - "`autoPostInvalidBillingAddress`" - "`autoPostNoInventory`" - "`autoPostPriceError`" - "`autoPostUndeliverableShippingAddress`" - "`couponAbuse`" - "`courtesyAdjustment`" - "`customerCanceled`" - "`customerDiscretionaryReturn`" - "`customerInitiatedMerchantCancel`" - "`customerSupportRequested`" - "`deliveredLateByCarrier`" - "`deliveredTooLate`" - "`expiredItem`" - "`failToPushOrderGoogleError`" - "`failToPushOrderMerchantError`" - "`failToPushOrderMerchantFulfillmentError`" - "`failToPushOrderToMerchant`" - "`failToPushOrderToMerchantOutOfStock`" - "`feeAdjustment`" - "`invalidCoupon`" - "`lateShipmentCredit`" - "`malformedShippingAddress`" - "`merchantDidNotShipOnTime`" - "`noInventory`" - "`orderTimeout`" - "`other`" - "`paymentAbuse`" - "`paymentDeclined`" - "`priceAdjustment`" - "`priceError`" - "`productArrivedDamaged`" - "`productNotAsDescribed`" - "`promoReallocation`" - "`qualityNotAsExpected`" - "`returnRefundAbuse`" - "`shippingCostAdjustment`" - "`shippingPriceError`" - "`taxAdjustment`" - "`taxError`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`wrongProductShipped`" 280 }, 281 "returnOption": { # Option to create an invoice for a refund and mark all items within the invoice as returned. Exactly one of `refundOnlyOption` or `returnOption` must be provided. 282 "description": "A String", # Optional description of the return reason. 283 "reason": "A String", # [required] Reason for the return. Acceptable values are: - "`customerDiscretionaryReturn`" - "`customerInitiatedMerchantCancel`" - "`deliveredTooLate`" - "`expiredItem`" - "`invalidCoupon`" - "`malformedShippingAddress`" - "`other`" - "`productArrivedDamaged`" - "`productNotAsDescribed`" - "`qualityNotAsExpected`" - "`undeliverableShippingAddress`" - "`unsupportedPoBoxAddress`" - "`wrongProductShipped`" 284 }, 285 "shipmentInvoices": [ # Invoice details for different shipment groups. 286 { 287 "invoiceSummary": { # [required] Invoice summary. 288 "additionalChargeSummaries": [ # Summary of the total amounts of the additional charges. 289 { 290 "totalAmount": { # [required] Total additional charge for this type. 291 "pretax": { # [required] Value before taxes. 292 "currency": "A String", # The currency of the price. 293 "value": "A String", # The price represented as a number. 294 }, 295 "tax": { # [required] Tax value. 296 "currency": "A String", # The currency of the price. 297 "value": "A String", # The price represented as a number. 298 }, 299 }, 300 "type": "A String", # [required] Type of the additional charge. Acceptable values are: - "`shipping`" 301 }, 302 ], 303 "customerBalance": { # Deprecated. 304 "pretax": { # [required] Value before taxes. 305 "currency": "A String", # The currency of the price. 306 "value": "A String", # The price represented as a number. 307 }, 308 "tax": { # [required] Tax value. 309 "currency": "A String", # The currency of the price. 310 "value": "A String", # The price represented as a number. 311 }, 312 }, 313 "googleBalance": { # Deprecated. 314 "pretax": { # [required] Value before taxes. 315 "currency": "A String", # The currency of the price. 316 "value": "A String", # The price represented as a number. 317 }, 318 "tax": { # [required] Tax value. 319 "currency": "A String", # The currency of the price. 320 "value": "A String", # The price represented as a number. 321 }, 322 }, 323 "merchantBalance": { # Deprecated. 324 "pretax": { # [required] Value before taxes. 325 "currency": "A String", # The currency of the price. 326 "value": "A String", # The price represented as a number. 327 }, 328 "tax": { # [required] Tax value. 329 "currency": "A String", # The currency of the price. 330 "value": "A String", # The price represented as a number. 331 }, 332 }, 333 "productTotal": { # [required] Total price for the product. 334 "pretax": { # [required] Value before taxes. 335 "currency": "A String", # The currency of the price. 336 "value": "A String", # The price represented as a number. 337 }, 338 "tax": { # [required] Tax value. 339 "currency": "A String", # The currency of the price. 340 "value": "A String", # The price represented as a number. 341 }, 342 }, 343 "promotionSummaries": [ # Deprecated. 344 { 345 "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts. 346 "pretax": { # [required] Value before taxes. 347 "currency": "A String", # The currency of the price. 348 "value": "A String", # The price represented as a number. 349 }, 350 "tax": { # [required] Tax value. 351 "currency": "A String", # The currency of the price. 352 "value": "A String", # The price represented as a number. 353 }, 354 }, 355 "promotionId": "A String", # [required] ID of the promotion. 356 }, 357 ], 358 }, 359 "lineItemInvoices": [ # [required] Invoice details per line item. 360 { 361 "lineItemId": "A String", # ID of the line item. Either lineItemId or productId must be set. 362 "productId": "A String", # ID of the product. This is the REST ID used in the products service. Either lineItemId or productId must be set. 363 "shipmentUnitIds": [ # [required] The shipment unit ID is assigned by the merchant and defines individual quantities within a line item. The same ID can be assigned to units that are the same while units that differ must be assigned a different ID (for example: free or promotional units). 364 "A String", 365 ], 366 "unitInvoice": { # [required] Invoice details for a single unit. 367 "additionalCharges": [ # Additional charges for a unit, e.g. shipping costs. 368 { 369 "additionalChargeAmount": { # [required] Amount of the additional charge. 370 "pretax": { # [required] Value before taxes. 371 "currency": "A String", # The currency of the price. 372 "value": "A String", # The price represented as a number. 373 }, 374 "tax": { # [required] Tax value. 375 "currency": "A String", # The currency of the price. 376 "value": "A String", # The price represented as a number. 377 }, 378 }, 379 "additionalChargePromotions": [ # Deprecated. 380 { 381 "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts. 382 "pretax": { # [required] Value before taxes. 383 "currency": "A String", # The currency of the price. 384 "value": "A String", # The price represented as a number. 385 }, 386 "tax": { # [required] Tax value. 387 "currency": "A String", # The currency of the price. 388 "value": "A String", # The price represented as a number. 389 }, 390 }, 391 "promotionId": "A String", # [required] ID of the promotion. 392 }, 393 ], 394 "type": "A String", # [required] Type of the additional charge. Acceptable values are: - "`shipping`" 395 }, 396 ], 397 "promotions": [ # Deprecated. 398 { 399 "promotionAmount": { # [required] Amount of the promotion. The values here are the promotion applied to the unit price pretax and to the total of the tax amounts. 400 "pretax": { # [required] Value before taxes. 401 "currency": "A String", # The currency of the price. 402 "value": "A String", # The price represented as a number. 403 }, 404 "tax": { # [required] Tax value. 405 "currency": "A String", # The currency of the price. 406 "value": "A String", # The price represented as a number. 407 }, 408 }, 409 "promotionId": "A String", # [required] ID of the promotion. 410 }, 411 ], 412 "unitPricePretax": { # [required] Price of the unit, before applying taxes. 413 "currency": "A String", # The currency of the price. 414 "value": "A String", # The price represented as a number. 415 }, 416 "unitPriceTaxes": [ # Tax amounts to apply to the unit price. 417 { 418 "taxAmount": { # [required] Tax amount for the tax type. 419 "currency": "A String", # The currency of the price. 420 "value": "A String", # The price represented as a number. 421 }, 422 "taxName": "A String", # Optional name of the tax type. This should only be provided if `taxType` is `otherFeeTax`. 423 "taxType": "A String", # [required] Type of the tax. Acceptable values are: - "`otherFee`" - "`otherFeeTax`" - "`sales`" 424 }, 425 ], 426 }, 427 }, 428 ], 429 "shipmentGroupId": "A String", # [required] ID of the shipment group. It is assigned by the merchant in the `shipLineItems` method and is used to group multiple line items that have the same kind of shipping charges. 430 }, 431 ], 432} 433 434 x__xgafv: string, V1 error format. 435 Allowed values 436 1 - v1 error format 437 2 - v2 error format 438 439Returns: 440 An object of the form: 441 442 { 443 "executionStatus": "A String", # The status of the execution. Acceptable values are: - "`duplicate`" - "`executed`" 444 "kind": "A String", # Identifies what kind of resource this is. Value: the fixed string "content#orderinvoicesCreateRefundInvoiceResponse". 445}</pre> 446</div> 447 448</body></html>