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