Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 1 | <html><body> |
| 2 | <style> |
| 3 | |
| 4 | body, 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 | |
| 15 | body { |
| 16 | font-size: 13px; |
| 17 | padding: 1em; |
| 18 | } |
| 19 | |
| 20 | h1 { |
| 21 | font-size: 26px; |
| 22 | margin-bottom: 1em; |
| 23 | } |
| 24 | |
| 25 | h2 { |
| 26 | font-size: 24px; |
| 27 | margin-bottom: 1em; |
| 28 | } |
| 29 | |
| 30 | h3 { |
| 31 | font-size: 20px; |
| 32 | margin-bottom: 1em; |
| 33 | margin-top: 1em; |
| 34 | } |
| 35 | |
| 36 | pre, code { |
| 37 | line-height: 1.5; |
| 38 | font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 | } |
| 40 | |
| 41 | pre { |
| 42 | margin-top: 0.5em; |
| 43 | } |
| 44 | |
| 45 | h1, h2, h3, p { |
| 46 | font-family: Arial, sans serif; |
| 47 | } |
| 48 | |
| 49 | h1, 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.pos.html">pos</a></h1> |
| 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 78 | <code><a href="#close">close()</a></code></p> |
| 79 | <p class="firstline">Close httplib2 connections.</p> |
| 80 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 81 | <code><a href="#custombatch">custombatch(body=None, dryRun=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 82 | <p class="firstline">Batches multiple POS-related calls in a single request.</p> |
| 83 | <p class="toc_element"> |
| 84 | <code><a href="#delete">delete(merchantId, targetMerchantId, storeCode, dryRun=None)</a></code></p> |
| 85 | <p class="firstline">Deletes a store for the given merchant.</p> |
| 86 | <p class="toc_element"> |
| 87 | <code><a href="#get">get(merchantId, targetMerchantId, storeCode)</a></code></p> |
| 88 | <p class="firstline">Retrieves information about the given store.</p> |
| 89 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 90 | <code><a href="#insert">insert(merchantId, targetMerchantId, body=None, dryRun=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 91 | <p class="firstline">Creates a store for the given merchant.</p> |
| 92 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 93 | <code><a href="#inventory">inventory(merchantId, targetMerchantId, body=None, dryRun=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <p class="firstline">Submit inventory for the given merchant.</p> |
| 95 | <p class="toc_element"> |
| 96 | <code><a href="#list">list(merchantId, targetMerchantId)</a></code></p> |
| 97 | <p class="firstline">Lists the stores of the target merchant.</p> |
| 98 | <p class="toc_element"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 99 | <code><a href="#sale">sale(merchantId, targetMerchantId, body=None, dryRun=None)</a></code></p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 100 | <p class="firstline">Submit a sale event for the given merchant.</p> |
| 101 | <h3>Method Details</h3> |
| 102 | <div class="method"> |
Dmitry Frenkel | 3e17f89 | 2020-10-06 16:46:05 -0700 | [diff] [blame^] | 103 | <code class="details" id="close">close()</code> |
| 104 | <pre>Close httplib2 connections.</pre> |
| 105 | </div> |
| 106 | |
| 107 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 108 | <code class="details" id="custombatch">custombatch(body=None, dryRun=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 109 | <pre>Batches multiple POS-related calls in a single request. |
| 110 | |
| 111 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 112 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 113 | The object takes the form of: |
| 114 | |
| 115 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 116 | "entries": [ # The request entries to be processed in the batch. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 117 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 118 | "batchId": 42, # An entry ID, unique within the batch request. |
| 119 | "inventory": { # The absolute quantity of an item available at the given store. # The inventory to submit. Set this only if the method is `inventory`. |
| 120 | "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. |
| 121 | "gtin": "A String", # Global Trade Item Number. |
| 122 | "itemId": "A String", # Required. A unique identifier for the item. |
| 123 | "kind": "content#posInventory", # Identifies what kind of resource this is. Value: the fixed string "`content#posInventory`" |
| 124 | "price": { # Required. The current price of the item. |
| 125 | "currency": "A String", # The currency of the price. |
| 126 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 127 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 128 | "quantity": "A String", # Required. The available quantity of the item. |
| 129 | "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business. |
| 130 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
| 131 | "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 132 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 133 | "merchantId": "A String", # The ID of the POS data provider. |
| 134 | "method": "A String", # The method of the batch entry. |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 135 | # |
| 136 | # Acceptable values are: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 137 | # - "`delete`" |
| 138 | # - "`get`" |
| 139 | # - "`insert`" |
| 140 | # - "`inventory`" |
| 141 | # - "`sale`" |
| 142 | "sale": { # The change of the available quantity of an item at the given store. # The sale information to submit. Set this only if the method is `sale`. |
| 143 | "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. |
| 144 | "gtin": "A String", # Global Trade Item Number. |
| 145 | "itemId": "A String", # Required. A unique identifier for the item. |
| 146 | "kind": "content#posSale", # Identifies what kind of resource this is. Value: the fixed string "`content#posSale`" |
| 147 | "price": { # Required. The price of the item. |
| 148 | "currency": "A String", # The currency of the price. |
| 149 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 150 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 151 | "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned. |
| 152 | "saleId": "A String", # A unique ID to group items from the same sale event. |
| 153 | "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business. |
| 154 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
| 155 | "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format. |
| 156 | }, |
| 157 | "store": { # Store resource. # The store information to submit. Set this only if the method is `insert`. |
| 158 | "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`" |
| 159 | "storeAddress": "A String", # Required. The street address of the store. |
| 160 | "storeCode": "A String", # Required. A store identifier that is unique for the given merchant. |
| 161 | }, |
| 162 | "storeCode": "A String", # The store code. Set this only if the method is `delete` or `get`. |
| 163 | "targetMerchantId": "A String", # The ID of the account for which to get/submit data. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 164 | }, |
| 165 | ], |
| 166 | } |
| 167 | |
| 168 | dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any). |
| 169 | |
| 170 | Returns: |
| 171 | An object of the form: |
| 172 | |
| 173 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 174 | "entries": [ # The result of the execution of the batch requests. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 175 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 176 | "batchId": 42, # The ID of the request entry to which this entry responds. |
| 177 | "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if, and only if, the request failed. |
| 178 | "code": 42, # The HTTP status of the first error in `errors`. |
| 179 | "errors": [ # A list of errors. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 180 | { # An error returned by the API. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 181 | "domain": "A String", # The domain of the error. |
| 182 | "message": "A String", # A description of the error. |
| 183 | "reason": "A String", # The error code. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 184 | }, |
| 185 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 186 | "message": "A String", # The message of the first error in `errors`. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 187 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 188 | "inventory": { # The absolute quantity of an item available at the given store. # The updated inventory information. |
| 189 | "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. |
| 190 | "gtin": "A String", # Global Trade Item Number. |
| 191 | "itemId": "A String", # Required. A unique identifier for the item. |
| 192 | "kind": "content#posInventory", # Identifies what kind of resource this is. Value: the fixed string "`content#posInventory`" |
| 193 | "price": { # Required. The current price of the item. |
| 194 | "currency": "A String", # The currency of the price. |
| 195 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 196 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 197 | "quantity": "A String", # Required. The available quantity of the item. |
| 198 | "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business. |
| 199 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
| 200 | "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 201 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 202 | "kind": "content#posCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "`content#posCustomBatchResponseEntry`" |
| 203 | "sale": { # The change of the available quantity of an item at the given store. # The updated sale information. |
| 204 | "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. |
| 205 | "gtin": "A String", # Global Trade Item Number. |
| 206 | "itemId": "A String", # Required. A unique identifier for the item. |
| 207 | "kind": "content#posSale", # Identifies what kind of resource this is. Value: the fixed string "`content#posSale`" |
| 208 | "price": { # Required. The price of the item. |
| 209 | "currency": "A String", # The currency of the price. |
| 210 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 211 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 212 | "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned. |
| 213 | "saleId": "A String", # A unique ID to group items from the same sale event. |
| 214 | "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business. |
| 215 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
| 216 | "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 217 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 218 | "store": { # Store resource. # The retrieved or updated store information. |
| 219 | "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`" |
| 220 | "storeAddress": "A String", # Required. The street address of the store. |
| 221 | "storeCode": "A String", # Required. A store identifier that is unique for the given merchant. |
| 222 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 223 | }, |
| 224 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 225 | "kind": "content#posCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posCustomBatchResponse". |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 226 | }</pre> |
| 227 | </div> |
| 228 | |
| 229 | <div class="method"> |
| 230 | <code class="details" id="delete">delete(merchantId, targetMerchantId, storeCode, dryRun=None)</code> |
| 231 | <pre>Deletes a store for the given merchant. |
| 232 | |
| 233 | Args: |
| 234 | merchantId: string, The ID of the POS or inventory data provider. (required) |
| 235 | targetMerchantId: string, The ID of the target merchant. (required) |
| 236 | storeCode: string, A store code that is unique per merchant. (required) |
| 237 | dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any). |
| 238 | </pre> |
| 239 | </div> |
| 240 | |
| 241 | <div class="method"> |
| 242 | <code class="details" id="get">get(merchantId, targetMerchantId, storeCode)</code> |
| 243 | <pre>Retrieves information about the given store. |
| 244 | |
| 245 | Args: |
| 246 | merchantId: string, The ID of the POS or inventory data provider. (required) |
| 247 | targetMerchantId: string, The ID of the target merchant. (required) |
| 248 | storeCode: string, A store code that is unique per merchant. (required) |
| 249 | |
| 250 | Returns: |
| 251 | An object of the form: |
| 252 | |
| 253 | { # Store resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 254 | "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`" |
| 255 | "storeAddress": "A String", # Required. The street address of the store. |
| 256 | "storeCode": "A String", # Required. A store identifier that is unique for the given merchant. |
| 257 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 258 | </div> |
| 259 | |
| 260 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 261 | <code class="details" id="insert">insert(merchantId, targetMerchantId, body=None, dryRun=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 262 | <pre>Creates a store for the given merchant. |
| 263 | |
| 264 | Args: |
| 265 | merchantId: string, The ID of the POS or inventory data provider. (required) |
| 266 | targetMerchantId: string, The ID of the target merchant. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 267 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 268 | The object takes the form of: |
| 269 | |
| 270 | { # Store resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 271 | "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`" |
| 272 | "storeAddress": "A String", # Required. The street address of the store. |
| 273 | "storeCode": "A String", # Required. A store identifier that is unique for the given merchant. |
| 274 | } |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 275 | |
| 276 | dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any). |
| 277 | |
| 278 | Returns: |
| 279 | An object of the form: |
| 280 | |
| 281 | { # Store resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 282 | "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`" |
| 283 | "storeAddress": "A String", # Required. The street address of the store. |
| 284 | "storeCode": "A String", # Required. A store identifier that is unique for the given merchant. |
| 285 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 286 | </div> |
| 287 | |
| 288 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 289 | <code class="details" id="inventory">inventory(merchantId, targetMerchantId, body=None, dryRun=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 290 | <pre>Submit inventory for the given merchant. |
| 291 | |
| 292 | Args: |
| 293 | merchantId: string, The ID of the POS or inventory data provider. (required) |
| 294 | targetMerchantId: string, The ID of the target merchant. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 295 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 296 | The object takes the form of: |
| 297 | |
| 298 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 299 | "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. |
| 300 | "gtin": "A String", # Global Trade Item Number. |
| 301 | "itemId": "A String", # Required. A unique identifier for the item. |
| 302 | "price": { # Required. The current price of the item. |
| 303 | "currency": "A String", # The currency of the price. |
| 304 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 305 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 306 | "quantity": "A String", # Required. The available quantity of the item. |
| 307 | "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business. |
| 308 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
| 309 | "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 310 | } |
| 311 | |
| 312 | dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any). |
| 313 | |
| 314 | Returns: |
| 315 | An object of the form: |
| 316 | |
| 317 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 318 | "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. |
| 319 | "gtin": "A String", # Global Trade Item Number. |
| 320 | "itemId": "A String", # Required. A unique identifier for the item. |
| 321 | "kind": "content#posInventoryResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posInventoryResponse". |
| 322 | "price": { # Required. The current price of the item. |
| 323 | "currency": "A String", # The currency of the price. |
| 324 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 325 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 326 | "quantity": "A String", # Required. The available quantity of the item. |
| 327 | "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business. |
| 328 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
| 329 | "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 330 | }</pre> |
| 331 | </div> |
| 332 | |
| 333 | <div class="method"> |
| 334 | <code class="details" id="list">list(merchantId, targetMerchantId)</code> |
| 335 | <pre>Lists the stores of the target merchant. |
| 336 | |
| 337 | Args: |
| 338 | merchantId: string, The ID of the POS or inventory data provider. (required) |
| 339 | targetMerchantId: string, The ID of the target merchant. (required) |
| 340 | |
| 341 | Returns: |
| 342 | An object of the form: |
| 343 | |
| 344 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 345 | "kind": "content#posListResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posListResponse". |
| 346 | "resources": [ |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 347 | { # Store resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 348 | "kind": "content#posStore", # Identifies what kind of resource this is. Value: the fixed string "`content#posStore`" |
| 349 | "storeAddress": "A String", # Required. The street address of the store. |
| 350 | "storeCode": "A String", # Required. A store identifier that is unique for the given merchant. |
| 351 | }, |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 352 | ], |
| 353 | }</pre> |
| 354 | </div> |
| 355 | |
| 356 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 357 | <code class="details" id="sale">sale(merchantId, targetMerchantId, body=None, dryRun=None)</code> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 358 | <pre>Submit a sale event for the given merchant. |
| 359 | |
| 360 | Args: |
| 361 | merchantId: string, The ID of the POS or inventory data provider. (required) |
| 362 | targetMerchantId: string, The ID of the target merchant. (required) |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 363 | body: object, The request body. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 364 | The object takes the form of: |
| 365 | |
| 366 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 367 | "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. |
| 368 | "gtin": "A String", # Global Trade Item Number. |
| 369 | "itemId": "A String", # Required. A unique identifier for the item. |
| 370 | "price": { # Required. The price of the item. |
| 371 | "currency": "A String", # The currency of the price. |
| 372 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 373 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 374 | "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned. |
| 375 | "saleId": "A String", # A unique ID to group items from the same sale event. |
| 376 | "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business. |
| 377 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
| 378 | "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 379 | } |
| 380 | |
| 381 | dryRun: boolean, Flag to simulate a request like in a live environment. If set to true, dry-run mode checks the validity of the request and returns errors (if any). |
| 382 | |
| 383 | Returns: |
| 384 | An object of the form: |
| 385 | |
| 386 | { |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 387 | "contentLanguage": "A String", # Required. The two-letter ISO 639-1 language code for the item. |
| 388 | "gtin": "A String", # Global Trade Item Number. |
| 389 | "itemId": "A String", # Required. A unique identifier for the item. |
| 390 | "kind": "content#posSaleResponse", # Identifies what kind of resource this is. Value: the fixed string "content#posSaleResponse". |
| 391 | "price": { # Required. The price of the item. |
| 392 | "currency": "A String", # The currency of the price. |
| 393 | "value": "A String", # The price represented as a number. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 394 | }, |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 395 | "quantity": "A String", # Required. The relative change of the available quantity. Negative for items returned. |
| 396 | "saleId": "A String", # A unique ID to group items from the same sale event. |
| 397 | "storeCode": "A String", # Required. The identifier of the merchant's store. Either a `storeCode` inserted via the API or the code of the store in Google My Business. |
| 398 | "targetCountry": "A String", # Required. The CLDR territory code for the item. |
| 399 | "timestamp": "A String", # Required. The inventory timestamp, in ISO 8601 format. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 400 | }</pre> |
| 401 | </div> |
| 402 | |
| 403 | </body></html> |