blob: 98c9fefbd6961e995285ab5199cf0fa9fe4c4e02 [file] [log] [blame]
Craig Citroe633be12015-03-02 13:40:36 -08001<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.accounttax.html">accounttax</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#custombatch">custombatch(body=None, dryRun=None)</a></code></p>
Craig Citroe633be12015-03-02 13:40:36 -080079<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>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Retrieves the tax settings of the account.</p>
Craig Citroe633be12015-03-02 13:40:36 -080083<p class="toc_element">
84 <code><a href="#list">list(merchantId, pageToken=None, maxResults=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070085<p class="firstline">Lists the tax settings of the sub-accounts in your Merchant Center account.</p>
Craig Citroe633be12015-03-02 13:40:36 -080086<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">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#update">update(merchantId, accountId, body=None, dryRun=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="firstline">Updates the tax settings of the account.</p>
Craig Citroe633be12015-03-02 13:40:36 -080092<h3>Method Details</h3>
93<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070094 <code class="details" id="custombatch">custombatch(body=None, dryRun=None)</code>
Craig Citroe633be12015-03-02 13:40:36 -080095 <pre>Retrieves and updates tax settings of multiple accounts in a single request.
96
97Args:
Dan O'Mearadd494642020-05-01 07:42:23 -070098 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -080099 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.
Dan O'Mearadd494642020-05-01 07:42:23 -0700105 "method": "A String", # The method of the batch entry.
106 #
107 # Acceptable values are:
108 # - "`get`"
109 # - "`update`"
110 "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`.
Craig Citroe633be12015-03-02 13:40:36 -0800111 "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
112 { # Tax calculation rule to apply in a state or province (USA only).
113 "country": "A String", # Country code in which tax is applicable.
114 "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
115 "shippingTaxed": True or False, # If true, shipping charges are also taxed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700116 "locationId": "A String", # Required. State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
Craig Citroe633be12015-03-02 13:40:36 -0800117 "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
118 },
119 ],
120 "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
Dan O'Mearadd494642020-05-01 07:42:23 -0700121 "accountId": "A String", # Required. The ID of the account to which these account tax settings belong.
Craig Citroe633be12015-03-02 13:40:36 -0800122 },
123 "merchantId": "A String", # The ID of the managing account.
124 "accountId": "A String", # The ID of the account for which to get/update account tax settings.
125 },
126 ],
127 }
128
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700129 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).
Craig Citroe633be12015-03-02 13:40:36 -0800130
131Returns:
132 An object of the form:
133
134 {
135 "kind": "content#accounttaxCustomBatchResponse", # Identifies what kind of resource this is. Value: the fixed string "content#accounttaxCustomBatchResponse".
136 "entries": [ # The result of the execution of the batch requests.
137 { # A batch entry encoding a single non-batch accounttax response.
138 "batchId": 42, # The ID of the request entry this entry responds to.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700139 "accountTax": { # The tax settings of a merchant account. All methods require the admin role. # The retrieved or updated account tax settings.
Craig Citroe633be12015-03-02 13:40:36 -0800140 "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
141 { # Tax calculation rule to apply in a state or province (USA only).
142 "country": "A String", # Country code in which tax is applicable.
143 "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
144 "shippingTaxed": True or False, # If true, shipping charges are also taxed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 "locationId": "A String", # Required. State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
Craig Citroe633be12015-03-02 13:40:36 -0800146 "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
147 },
148 ],
149 "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
Dan O'Mearadd494642020-05-01 07:42:23 -0700150 "accountId": "A String", # Required. The ID of the account to which these account tax settings belong.
Craig Citroe633be12015-03-02 13:40:36 -0800151 },
152 "errors": { # A list of errors returned by a failed batch entry. # A list of errors defined if and only if the request failed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700153 "message": "A String", # The message of the first error in `errors`.
154 "code": 42, # The HTTP status of the first error in `errors`.
Craig Citroe633be12015-03-02 13:40:36 -0800155 "errors": [ # A list of errors.
156 { # An error returned by the API.
157 "reason": "A String", # The error code.
158 "domain": "A String", # The domain of the error.
159 "message": "A String", # A description of the error.
160 },
161 ],
162 },
Dan O'Mearadd494642020-05-01 07:42:23 -0700163 "kind": "content#accounttaxCustomBatchResponseEntry", # Identifies what kind of resource this is. Value: the fixed string "`content#accounttaxCustomBatchResponseEntry`"
Craig Citroe633be12015-03-02 13:40:36 -0800164 },
165 ],
166 }</pre>
167</div>
168
169<div class="method">
170 <code class="details" id="get">get(merchantId, accountId)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700171 <pre>Retrieves the tax settings of the account.
Craig Citroe633be12015-03-02 13:40:36 -0800172
173Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700174 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)
Craig Citroe633be12015-03-02 13:40:36 -0800175 accountId: string, The ID of the account for which to get/update account tax settings. (required)
176
177Returns:
178 An object of the form:
179
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700180 { # The tax settings of a merchant account. All methods require the admin role.
Craig Citroe633be12015-03-02 13:40:36 -0800181 "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
182 { # Tax calculation rule to apply in a state or province (USA only).
183 "country": "A String", # Country code in which tax is applicable.
184 "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
185 "shippingTaxed": True or False, # If true, shipping charges are also taxed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 "locationId": "A String", # Required. State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
Craig Citroe633be12015-03-02 13:40:36 -0800187 "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
188 },
189 ],
190 "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
Dan O'Mearadd494642020-05-01 07:42:23 -0700191 "accountId": "A String", # Required. The ID of the account to which these account tax settings belong.
Craig Citroe633be12015-03-02 13:40:36 -0800192 }</pre>
193</div>
194
195<div class="method">
196 <code class="details" id="list">list(merchantId, pageToken=None, maxResults=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700197 <pre>Lists the tax settings of the sub-accounts in your Merchant Center account.
Craig Citroe633be12015-03-02 13:40:36 -0800198
199Args:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700200 merchantId: string, The ID of the managing account. This must be a multi-client account. (required)
Craig Citroe633be12015-03-02 13:40:36 -0800201 pageToken: string, The token returned by the previous request.
202 maxResults: integer, The maximum number of tax settings to return in the response, used for paging.
203
204Returns:
205 An object of the form:
206
207 {
208 "nextPageToken": "A String", # The token for the retrieval of the next page of account tax settings.
209 "kind": "content#accounttaxListResponse", # Identifies what kind of resource this is. Value: the fixed string "content#accounttaxListResponse".
210 "resources": [
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700211 { # The tax settings of a merchant account. All methods require the admin role.
Craig Citroe633be12015-03-02 13:40:36 -0800212 "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
213 { # Tax calculation rule to apply in a state or province (USA only).
214 "country": "A String", # Country code in which tax is applicable.
215 "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
216 "shippingTaxed": True or False, # If true, shipping charges are also taxed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700217 "locationId": "A String", # Required. State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
Craig Citroe633be12015-03-02 13:40:36 -0800218 "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
219 },
220 ],
221 "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
Dan O'Mearadd494642020-05-01 07:42:23 -0700222 "accountId": "A String", # Required. The ID of the account to which these account tax settings belong.
Craig Citroe633be12015-03-02 13:40:36 -0800223 },
224 ],
225 }</pre>
226</div>
227
228<div class="method">
229 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
230 <pre>Retrieves the next page of results.
231
232Args:
233 previous_request: The request for the previous page. (required)
234 previous_response: The response from the request for the previous page. (required)
235
236Returns:
237 A request object that you can call 'execute()' on to request the next
238 page. Returns None if there are no more items in the collection.
239 </pre>
240</div>
241
242<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700243 <code class="details" id="update">update(merchantId, accountId, body=None, dryRun=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700244 <pre>Updates the tax settings of the account.
Craig Citroe633be12015-03-02 13:40:36 -0800245
246Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700247 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)
Craig Citroe633be12015-03-02 13:40:36 -0800248 accountId: string, The ID of the account for which to get/update account tax settings. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700249 body: object, The request body.
Craig Citroe633be12015-03-02 13:40:36 -0800250 The object takes the form of:
251
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700252{ # The tax settings of a merchant account. All methods require the admin role.
Craig Citroe633be12015-03-02 13:40:36 -0800253 "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
254 { # Tax calculation rule to apply in a state or province (USA only).
255 "country": "A String", # Country code in which tax is applicable.
256 "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
257 "shippingTaxed": True or False, # If true, shipping charges are also taxed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700258 "locationId": "A String", # Required. State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
Craig Citroe633be12015-03-02 13:40:36 -0800259 "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
260 },
261 ],
262 "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
Dan O'Mearadd494642020-05-01 07:42:23 -0700263 "accountId": "A String", # Required. The ID of the account to which these account tax settings belong.
Craig Citroe633be12015-03-02 13:40:36 -0800264}
265
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700266 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).
Craig Citroe633be12015-03-02 13:40:36 -0800267
268Returns:
269 An object of the form:
270
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700271 { # The tax settings of a merchant account. All methods require the admin role.
Craig Citroe633be12015-03-02 13:40:36 -0800272 "rules": [ # Tax rules. Updating the tax rules will enable US taxes (not reversible). Defining no rules is equivalent to not charging tax at all.
273 { # Tax calculation rule to apply in a state or province (USA only).
274 "country": "A String", # Country code in which tax is applicable.
275 "ratePercent": "A String", # Explicit tax rate in percent, represented as a floating point number without the percentage character. Must not be negative.
276 "shippingTaxed": True or False, # If true, shipping charges are also taxed.
Dan O'Mearadd494642020-05-01 07:42:23 -0700277 "locationId": "A String", # Required. State (or province) is which the tax is applicable, described by its location ID (also called criteria ID).
Craig Citroe633be12015-03-02 13:40:36 -0800278 "useGlobalRate": True or False, # Whether the tax rate is taken from a global tax table or specified explicitly.
279 },
280 ],
281 "kind": "content#accountTax", # Identifies what kind of resource this is. Value: the fixed string "content#accountTax".
Dan O'Mearadd494642020-05-01 07:42:23 -0700282 "accountId": "A String", # Required. The ID of the account to which these account tax settings belong.
Craig Citroe633be12015-03-02 13:40:36 -0800283 }</pre>
284</div>
285
286</body></html>