• Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_1.html">Content API for Shopping</a> . <a href="content_v2_1.accounttax.html">accounttax</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="#custombatch">custombatch(body)</a></code></p>
79<p class="firstline">Retrieves and updates tax settings of multiple accounts in a single request.</p>
80<p class="toc_element">
81  <code><a href="#get">get(merchantId, accountId)</a></code></p>
82<p class="firstline">Retrieves the tax settings of the account.</p>
83<p class="toc_element">
84  <code><a href="#list">list(merchantId, pageToken=None, maxResults=None)</a></code></p>
85<p class="firstline">Lists the tax settings of the sub-accounts in your Merchant Center account.</p>
86<p class="toc_element">
87  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
90  <code><a href="#update">update(merchantId, accountId, body)</a></code></p>
91<p class="firstline">Updates the tax settings of the account.</p>
92<h3>Method Details</h3>
93<div class="method">
94    <code class="details" id="custombatch">custombatch(body)</code>
95  <pre>Retrieves and updates tax settings of multiple accounts in a single request.
96
97Args:
98  body: object, The request body. (required)
99    The object takes the form of:
100
101{
102    "entries": [ # The request entries to be processed in the batch.
103      { # A batch entry encoding a single non-batch accounttax request.
104        "batchId": 42, # An entry ID, unique within the batch request.
105        "method": "A String",
106        "accountTax": { # The tax settings of a merchant account. All methods require the admin role. # The account tax settings to update. Only defined if the method is update.
107          "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
108            { # Tax calculation rule to apply in a state or province (USA only).
109              "country": "A String", # Country code in which tax is applicable.
110              "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
111              "shippingTaxed": True or False, # If true, shipping charges are also taxed.
112              "locationId": "A String", # State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
113              "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
114            },
115          ],
116          "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
117          "accountId": "A String", # The ID of the account to which these account tax settings belong.
118        },
119        "merchantId": "A String", # The ID of the managing account.
120        "accountId": "A String", # The ID of the account for which to get/update account tax settings.
121      },
122    ],
123  }
124
125
126Returns:
127  An object of the form:
128
129    {
130    "kind": "content#accounttaxCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponse".
131    "entries": [ # The result of the execution of the batch requests.
132      { # A batch entry encoding a single non-batch accounttax response.
133        "batchId": 42, # The ID of the request entry this entry responds to.
134        "accountTax": { # The tax settings of a merchant account. All methods require the admin role. # The retrieved or updated account tax settings.
135          "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
136            { # Tax calculation rule to apply in a state or province (USA only).
137              "country": "A String", # Country code in which tax is applicable.
138              "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
139              "shippingTaxed": True or False, # If true, shipping charges are also taxed.
140              "locationId": "A String", # State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
141              "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
142            },
143          ],
144          "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
145          "accountId": "A String", # The ID of the account to which these account tax settings belong.
146        },
147        "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if and only if the request failed.
148          "message": "A String", # The message of the first error in errors.
149          "code": 42, # The HTTP status of the first error in errors.
150          "errors": [ # A list of errors.
151            { # An error returned by the API.
152              "reason": "A String", # The error code.
153              "domain": "A String", # The domain of the error.
154              "message": "A String", # A description of the error.
155            },
156          ],
157        },
158        "kind": "content#accounttaxCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponseEntry".
159      },
160    ],
161  }</pre>
162</div>
163
164<div class="method">
165    <code class="details" id="get">get(merchantId, accountId)</code>
166  <pre>Retrieves the tax settings of the account.
167
168Args:
169  merchantId: string, The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. (required)
170  accountId: string, The ID of the account for which to get/update account tax settings. (required)
171
172Returns:
173  An object of the form:
174
175    { # The tax settings of a merchant account. All methods require the admin role.
176    "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
177      { # Tax calculation rule to apply in a state or province (USA only).
178        "country": "A String", # Country code in which tax is applicable.
179        "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
180        "shippingTaxed": True or False, # If true, shipping charges are also taxed.
181        "locationId": "A String", # State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
182        "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
183      },
184    ],
185    "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
186    "accountId": "A String", # The ID of the account to which these account tax settings belong.
187  }</pre>
188</div>
189
190<div class="method">
191    <code class="details" id="list">list(merchantId, pageToken=None, maxResults=None)</code>
192  <pre>Lists the tax settings of the sub-accounts in your Merchant Center account.
193
194Args:
195  merchantId: string, The ID of the managing account. This must be a multi-client account. (required)
196  pageToken: string, The token returned by the previous request.
197  maxResults: integer, The maximum number of tax settings to return in the response, used for paging.
198
199Returns:
200  An object of the form:
201
202    {
203    "nextPageToken": "A String", # The token for the retrieval of the next page of account tax settings.
204    "kind": "content#accounttaxListResponse", # Identifies what kind of resource this is. Value: the fixed string "content#accounttaxListResponse".
205    "resources": [
206      { # The tax settings of a merchant account. All methods require the admin role.
207        "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
208          { # Tax calculation rule to apply in a state or province (USA only).
209            "country": "A String", # Country code in which tax is applicable.
210            "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
211            "shippingTaxed": True or False, # If true, shipping charges are also taxed.
212            "locationId": "A String", # State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
213            "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
214          },
215        ],
216        "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
217        "accountId": "A String", # The ID of the account to which these account tax settings belong.
218      },
219    ],
220  }</pre>
221</div>
222
223<div class="method">
224    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
225  <pre>Retrieves the next page of results.
226
227Args:
228  previous_request: The request for the previous page. (required)
229  previous_response: The response from the request for the previous page. (required)
230
231Returns:
232  A request object that you can call 'execute()' on to request the next
233  page. Returns None if there are no more items in the collection.
234    </pre>
235</div>
236
237<div class="method">
238    <code class="details" id="update">update(merchantId, accountId, body)</code>
239  <pre>Updates the tax settings of the account.
240
241Args:
242  merchantId: string, The ID of the managing account. If this parameter is not the same as accountId, then this account must be a multi-client account and accountId must be the ID of a sub-account of this account. (required)
243  accountId: string, The ID of the account for which to get/update account tax settings. (required)
244  body: object, The request body. (required)
245    The object takes the form of:
246
247{ # The tax settings of a merchant account. All methods require the admin role.
248  "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
249    { # Tax calculation rule to apply in a state or province (USA only).
250      "country": "A String", # Country code in which tax is applicable.
251      "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
252      "shippingTaxed": True or False, # If true, shipping charges are also taxed.
253      "locationId": "A String", # State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
254      "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
255    },
256  ],
257  "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
258  "accountId": "A String", # The ID of the account to which these account tax settings belong.
259}
260
261
262Returns:
263  An object of the form:
264
265    { # The tax settings of a merchant account. All methods require the admin role.
266    "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
267      { # Tax calculation rule to apply in a state or province (USA only).
268        "country": "A String", # Country code in which tax is applicable.
269        "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
270        "shippingTaxed": True or False, # If true, shipping charges are also taxed.
271        "locationId": "A String", # State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
272        "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
273      },
274    ],
275    "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
276    "accountId": "A String", # The ID of the account to which these account tax settings belong.
277  }</pre>
278</div>
279
280</body></html>