You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

23827 lines
864 KiB

  1. // Package content provides access to the Content API for Shopping.
  2. //
  3. // See https://developers.google.com/shopping-content
  4. //
  5. // Usage example:
  6. //
  7. // import "google.golang.org/api/content/v2"
  8. // ...
  9. // contentService, err := content.New(oauthHttpClient)
  10. package content // import "google.golang.org/api/content/v2"
  11. import (
  12. "bytes"
  13. "encoding/json"
  14. "errors"
  15. "fmt"
  16. context "golang.org/x/net/context"
  17. ctxhttp "golang.org/x/net/context/ctxhttp"
  18. gensupport "google.golang.org/api/gensupport"
  19. googleapi "google.golang.org/api/googleapi"
  20. "io"
  21. "net/http"
  22. "net/url"
  23. "strconv"
  24. "strings"
  25. )
  26. // Always reference these packages, just in case the auto-generated code
  27. // below doesn't.
  28. var _ = bytes.NewBuffer
  29. var _ = strconv.Itoa
  30. var _ = fmt.Sprintf
  31. var _ = json.NewDecoder
  32. var _ = io.Copy
  33. var _ = url.Parse
  34. var _ = gensupport.MarshalJSON
  35. var _ = googleapi.Version
  36. var _ = errors.New
  37. var _ = strings.Replace
  38. var _ = context.Canceled
  39. var _ = ctxhttp.Do
  40. const apiId = "content:v2"
  41. const apiName = "content"
  42. const apiVersion = "v2"
  43. const basePath = "https://www.googleapis.com/content/v2/"
  44. // OAuth2 scopes used by this API.
  45. const (
  46. // Manage your product listings and accounts for Google Shopping
  47. ContentScope = "https://www.googleapis.com/auth/content"
  48. )
  49. func New(client *http.Client) (*APIService, error) {
  50. if client == nil {
  51. return nil, errors.New("client is nil")
  52. }
  53. s := &APIService{client: client, BasePath: basePath}
  54. s.Accounts = NewAccountsService(s)
  55. s.Accountstatuses = NewAccountstatusesService(s)
  56. s.Accounttax = NewAccounttaxService(s)
  57. s.Datafeeds = NewDatafeedsService(s)
  58. s.Datafeedstatuses = NewDatafeedstatusesService(s)
  59. s.Inventory = NewInventoryService(s)
  60. s.Liasettings = NewLiasettingsService(s)
  61. s.Orderinvoices = NewOrderinvoicesService(s)
  62. s.Orderpayments = NewOrderpaymentsService(s)
  63. s.Orders = NewOrdersService(s)
  64. s.Pos = NewPosService(s)
  65. s.Products = NewProductsService(s)
  66. s.Productstatuses = NewProductstatusesService(s)
  67. s.Shippingsettings = NewShippingsettingsService(s)
  68. return s, nil
  69. }
  70. type APIService struct {
  71. client *http.Client
  72. BasePath string // API endpoint base URL
  73. UserAgent string // optional additional User-Agent fragment
  74. Accounts *AccountsService
  75. Accountstatuses *AccountstatusesService
  76. Accounttax *AccounttaxService
  77. Datafeeds *DatafeedsService
  78. Datafeedstatuses *DatafeedstatusesService
  79. Inventory *InventoryService
  80. Liasettings *LiasettingsService
  81. Orderinvoices *OrderinvoicesService
  82. Orderpayments *OrderpaymentsService
  83. Orders *OrdersService
  84. Pos *PosService
  85. Products *ProductsService
  86. Productstatuses *ProductstatusesService
  87. Shippingsettings *ShippingsettingsService
  88. }
  89. func (s *APIService) userAgent() string {
  90. if s.UserAgent == "" {
  91. return googleapi.UserAgent
  92. }
  93. return googleapi.UserAgent + " " + s.UserAgent
  94. }
  95. func NewAccountsService(s *APIService) *AccountsService {
  96. rs := &AccountsService{s: s}
  97. return rs
  98. }
  99. type AccountsService struct {
  100. s *APIService
  101. }
  102. func NewAccountstatusesService(s *APIService) *AccountstatusesService {
  103. rs := &AccountstatusesService{s: s}
  104. return rs
  105. }
  106. type AccountstatusesService struct {
  107. s *APIService
  108. }
  109. func NewAccounttaxService(s *APIService) *AccounttaxService {
  110. rs := &AccounttaxService{s: s}
  111. return rs
  112. }
  113. type AccounttaxService struct {
  114. s *APIService
  115. }
  116. func NewDatafeedsService(s *APIService) *DatafeedsService {
  117. rs := &DatafeedsService{s: s}
  118. return rs
  119. }
  120. type DatafeedsService struct {
  121. s *APIService
  122. }
  123. func NewDatafeedstatusesService(s *APIService) *DatafeedstatusesService {
  124. rs := &DatafeedstatusesService{s: s}
  125. return rs
  126. }
  127. type DatafeedstatusesService struct {
  128. s *APIService
  129. }
  130. func NewInventoryService(s *APIService) *InventoryService {
  131. rs := &InventoryService{s: s}
  132. return rs
  133. }
  134. type InventoryService struct {
  135. s *APIService
  136. }
  137. func NewLiasettingsService(s *APIService) *LiasettingsService {
  138. rs := &LiasettingsService{s: s}
  139. return rs
  140. }
  141. type LiasettingsService struct {
  142. s *APIService
  143. }
  144. func NewOrderinvoicesService(s *APIService) *OrderinvoicesService {
  145. rs := &OrderinvoicesService{s: s}
  146. return rs
  147. }
  148. type OrderinvoicesService struct {
  149. s *APIService
  150. }
  151. func NewOrderpaymentsService(s *APIService) *OrderpaymentsService {
  152. rs := &OrderpaymentsService{s: s}
  153. return rs
  154. }
  155. type OrderpaymentsService struct {
  156. s *APIService
  157. }
  158. func NewOrdersService(s *APIService) *OrdersService {
  159. rs := &OrdersService{s: s}
  160. return rs
  161. }
  162. type OrdersService struct {
  163. s *APIService
  164. }
  165. func NewPosService(s *APIService) *PosService {
  166. rs := &PosService{s: s}
  167. return rs
  168. }
  169. type PosService struct {
  170. s *APIService
  171. }
  172. func NewProductsService(s *APIService) *ProductsService {
  173. rs := &ProductsService{s: s}
  174. return rs
  175. }
  176. type ProductsService struct {
  177. s *APIService
  178. }
  179. func NewProductstatusesService(s *APIService) *ProductstatusesService {
  180. rs := &ProductstatusesService{s: s}
  181. return rs
  182. }
  183. type ProductstatusesService struct {
  184. s *APIService
  185. }
  186. func NewShippingsettingsService(s *APIService) *ShippingsettingsService {
  187. rs := &ShippingsettingsService{s: s}
  188. return rs
  189. }
  190. type ShippingsettingsService struct {
  191. s *APIService
  192. }
  193. // Account: Account data.
  194. type Account struct {
  195. // AdultContent: Indicates whether the merchant sells adult content.
  196. AdultContent bool `json:"adultContent,omitempty"`
  197. // AdwordsLinks: List of linked AdWords accounts that are active or
  198. // pending approval. To create a new link request, add a new link with
  199. // status active to the list. It will remain in a pending state until
  200. // approved or rejected either in the AdWords interface or through the
  201. // AdWords API. To delete an active link, or to cancel a link request,
  202. // remove it from the list.
  203. AdwordsLinks []*AccountAdwordsLink `json:"adwordsLinks,omitempty"`
  204. // GoogleMyBusinessLink: The GMB account which is linked or in the
  205. // process of being linked with the Merchant Center accounnt.
  206. GoogleMyBusinessLink *AccountGoogleMyBusinessLink `json:"googleMyBusinessLink,omitempty"`
  207. // Id: Merchant Center account ID.
  208. Id uint64 `json:"id,omitempty,string"`
  209. // Kind: Identifies what kind of resource this is. Value: the fixed
  210. // string "content#account".
  211. Kind string `json:"kind,omitempty"`
  212. // Name: Display name for the account.
  213. Name string `json:"name,omitempty"`
  214. // ReviewsUrl: [DEPRECATED] This field is never returned and will be
  215. // ignored if provided.
  216. ReviewsUrl string `json:"reviewsUrl,omitempty"`
  217. // SellerId: Client-specific, locally-unique, internal ID for the child
  218. // account.
  219. SellerId string `json:"sellerId,omitempty"`
  220. // Users: Users with access to the account. Every account (except for
  221. // subaccounts) must have at least one admin user.
  222. Users []*AccountUser `json:"users,omitempty"`
  223. // WebsiteUrl: The merchant's website.
  224. WebsiteUrl string `json:"websiteUrl,omitempty"`
  225. // YoutubeChannelLinks: List of linked YouTube channels that are active
  226. // or pending approval. To create a new link request, add a new link
  227. // with status active to the list. It will remain in a pending state
  228. // until approved or rejected in the YT Creator Studio interface. To
  229. // delete an active link, or to cancel a link request, remove it from
  230. // the list.
  231. YoutubeChannelLinks []*AccountYouTubeChannelLink `json:"youtubeChannelLinks,omitempty"`
  232. // ServerResponse contains the HTTP response code and headers from the
  233. // server.
  234. googleapi.ServerResponse `json:"-"`
  235. // ForceSendFields is a list of field names (e.g. "AdultContent") to
  236. // unconditionally include in API requests. By default, fields with
  237. // empty values are omitted from API requests. However, any non-pointer,
  238. // non-interface field appearing in ForceSendFields will be sent to the
  239. // server regardless of whether the field is empty or not. This may be
  240. // used to include empty fields in Patch requests.
  241. ForceSendFields []string `json:"-"`
  242. // NullFields is a list of field names (e.g. "AdultContent") to include
  243. // in API requests with the JSON null value. By default, fields with
  244. // empty values are omitted from API requests. However, any field with
  245. // an empty value appearing in NullFields will be sent to the server as
  246. // null. It is an error if a field in this list has a non-empty value.
  247. // This may be used to include null fields in Patch requests.
  248. NullFields []string `json:"-"`
  249. }
  250. func (s *Account) MarshalJSON() ([]byte, error) {
  251. type NoMethod Account
  252. raw := NoMethod(*s)
  253. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  254. }
  255. type AccountAdwordsLink struct {
  256. // AdwordsId: Customer ID of the AdWords account.
  257. AdwordsId uint64 `json:"adwordsId,omitempty,string"`
  258. // Status: Status of the link between this Merchant Center account and
  259. // the AdWords account. Upon retrieval, it represents the actual status
  260. // of the link and can be either active if it was approved in Google
  261. // AdWords or pending if it's pending approval. Upon insertion, it
  262. // represents the intended status of the link. Re-uploading a link with
  263. // status active when it's still pending or with status pending when
  264. // it's already active will have no effect: the status will remain
  265. // unchanged. Re-uploading a link with deprecated status inactive is
  266. // equivalent to not submitting the link at all and will delete the link
  267. // if it was active or cancel the link request if it was pending.
  268. Status string `json:"status,omitempty"`
  269. // ForceSendFields is a list of field names (e.g. "AdwordsId") to
  270. // unconditionally include in API requests. By default, fields with
  271. // empty values are omitted from API requests. However, any non-pointer,
  272. // non-interface field appearing in ForceSendFields will be sent to the
  273. // server regardless of whether the field is empty or not. This may be
  274. // used to include empty fields in Patch requests.
  275. ForceSendFields []string `json:"-"`
  276. // NullFields is a list of field names (e.g. "AdwordsId") to include in
  277. // API requests with the JSON null value. By default, fields with empty
  278. // values are omitted from API requests. However, any field with an
  279. // empty value appearing in NullFields will be sent to the server as
  280. // null. It is an error if a field in this list has a non-empty value.
  281. // This may be used to include null fields in Patch requests.
  282. NullFields []string `json:"-"`
  283. }
  284. func (s *AccountAdwordsLink) MarshalJSON() ([]byte, error) {
  285. type NoMethod AccountAdwordsLink
  286. raw := NoMethod(*s)
  287. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  288. }
  289. type AccountGoogleMyBusinessLink struct {
  290. // GmbEmail: The GMB email address of which a specific account within a
  291. // GMB account. A sample account within a GMB account could be a
  292. // business account with set of locations, managed under the GMB
  293. // account.
  294. GmbEmail string `json:"gmbEmail,omitempty"`
  295. // Status: Status of the link between this Merchant Center account and
  296. // the GMB account.
  297. Status string `json:"status,omitempty"`
  298. // ForceSendFields is a list of field names (e.g. "GmbEmail") to
  299. // unconditionally include in API requests. By default, fields with
  300. // empty values are omitted from API requests. However, any non-pointer,
  301. // non-interface field appearing in ForceSendFields will be sent to the
  302. // server regardless of whether the field is empty or not. This may be
  303. // used to include empty fields in Patch requests.
  304. ForceSendFields []string `json:"-"`
  305. // NullFields is a list of field names (e.g. "GmbEmail") to include in
  306. // API requests with the JSON null value. By default, fields with empty
  307. // values are omitted from API requests. However, any field with an
  308. // empty value appearing in NullFields will be sent to the server as
  309. // null. It is an error if a field in this list has a non-empty value.
  310. // This may be used to include null fields in Patch requests.
  311. NullFields []string `json:"-"`
  312. }
  313. func (s *AccountGoogleMyBusinessLink) MarshalJSON() ([]byte, error) {
  314. type NoMethod AccountGoogleMyBusinessLink
  315. raw := NoMethod(*s)
  316. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  317. }
  318. type AccountIdentifier struct {
  319. // AggregatorId: The aggregator ID, set for aggregators and subaccounts
  320. // (in that case, it represents the aggregator of the subaccount).
  321. AggregatorId uint64 `json:"aggregatorId,omitempty,string"`
  322. // MerchantId: The merchant account ID, set for individual accounts and
  323. // subaccounts.
  324. MerchantId uint64 `json:"merchantId,omitempty,string"`
  325. // ForceSendFields is a list of field names (e.g. "AggregatorId") to
  326. // unconditionally include in API requests. By default, fields with
  327. // empty values are omitted from API requests. However, any non-pointer,
  328. // non-interface field appearing in ForceSendFields will be sent to the
  329. // server regardless of whether the field is empty or not. This may be
  330. // used to include empty fields in Patch requests.
  331. ForceSendFields []string `json:"-"`
  332. // NullFields is a list of field names (e.g. "AggregatorId") to include
  333. // in API requests with the JSON null value. By default, fields with
  334. // empty values are omitted from API requests. However, any field with
  335. // an empty value appearing in NullFields will be sent to the server as
  336. // null. It is an error if a field in this list has a non-empty value.
  337. // This may be used to include null fields in Patch requests.
  338. NullFields []string `json:"-"`
  339. }
  340. func (s *AccountIdentifier) MarshalJSON() ([]byte, error) {
  341. type NoMethod AccountIdentifier
  342. raw := NoMethod(*s)
  343. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  344. }
  345. // AccountStatus: The status of an account, i.e., information about its
  346. // products, which is computed offline and not returned immediately at
  347. // insertion time.
  348. type AccountStatus struct {
  349. // AccountId: The ID of the account for which the status is reported.
  350. AccountId string `json:"accountId,omitempty"`
  351. // AccountLevelIssues: A list of account level issues.
  352. AccountLevelIssues []*AccountStatusAccountLevelIssue `json:"accountLevelIssues,omitempty"`
  353. // DataQualityIssues: A list of data quality issues.
  354. DataQualityIssues []*AccountStatusDataQualityIssue `json:"dataQualityIssues,omitempty"`
  355. // Kind: Identifies what kind of resource this is. Value: the fixed
  356. // string "content#accountStatus".
  357. Kind string `json:"kind,omitempty"`
  358. // WebsiteClaimed: Whether the account's website is claimed or not.
  359. WebsiteClaimed bool `json:"websiteClaimed,omitempty"`
  360. // ServerResponse contains the HTTP response code and headers from the
  361. // server.
  362. googleapi.ServerResponse `json:"-"`
  363. // ForceSendFields is a list of field names (e.g. "AccountId") to
  364. // unconditionally include in API requests. By default, fields with
  365. // empty values are omitted from API requests. However, any non-pointer,
  366. // non-interface field appearing in ForceSendFields will be sent to the
  367. // server regardless of whether the field is empty or not. This may be
  368. // used to include empty fields in Patch requests.
  369. ForceSendFields []string `json:"-"`
  370. // NullFields is a list of field names (e.g. "AccountId") to include in
  371. // API requests with the JSON null value. By default, fields with empty
  372. // values are omitted from API requests. However, any field with an
  373. // empty value appearing in NullFields will be sent to the server as
  374. // null. It is an error if a field in this list has a non-empty value.
  375. // This may be used to include null fields in Patch requests.
  376. NullFields []string `json:"-"`
  377. }
  378. func (s *AccountStatus) MarshalJSON() ([]byte, error) {
  379. type NoMethod AccountStatus
  380. raw := NoMethod(*s)
  381. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  382. }
  383. type AccountStatusAccountLevelIssue struct {
  384. // Country: Country for which this issue is reported.
  385. Country string `json:"country,omitempty"`
  386. // Destination: The destination the issue applies to.
  387. Destination string `json:"destination,omitempty"`
  388. // Detail: Additional details about the issue.
  389. Detail string `json:"detail,omitempty"`
  390. // Id: Issue identifier.
  391. Id string `json:"id,omitempty"`
  392. // Severity: Severity of the issue.
  393. Severity string `json:"severity,omitempty"`
  394. // Title: Short description of the issue.
  395. Title string `json:"title,omitempty"`
  396. // ForceSendFields is a list of field names (e.g. "Country") to
  397. // unconditionally include in API requests. By default, fields with
  398. // empty values are omitted from API requests. However, any non-pointer,
  399. // non-interface field appearing in ForceSendFields will be sent to the
  400. // server regardless of whether the field is empty or not. This may be
  401. // used to include empty fields in Patch requests.
  402. ForceSendFields []string `json:"-"`
  403. // NullFields is a list of field names (e.g. "Country") to include in
  404. // API requests with the JSON null value. By default, fields with empty
  405. // values are omitted from API requests. However, any field with an
  406. // empty value appearing in NullFields will be sent to the server as
  407. // null. It is an error if a field in this list has a non-empty value.
  408. // This may be used to include null fields in Patch requests.
  409. NullFields []string `json:"-"`
  410. }
  411. func (s *AccountStatusAccountLevelIssue) MarshalJSON() ([]byte, error) {
  412. type NoMethod AccountStatusAccountLevelIssue
  413. raw := NoMethod(*s)
  414. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  415. }
  416. type AccountStatusDataQualityIssue struct {
  417. // Country: Country for which this issue is reported.
  418. Country string `json:"country,omitempty"`
  419. // Destination: The destination the issue applies to.
  420. Destination string `json:"destination,omitempty"`
  421. // Detail: A more detailed description of the issue.
  422. Detail string `json:"detail,omitempty"`
  423. // DisplayedValue: Actual value displayed on the landing page.
  424. DisplayedValue string `json:"displayedValue,omitempty"`
  425. // ExampleItems: Example items featuring the issue.
  426. ExampleItems []*AccountStatusExampleItem `json:"exampleItems,omitempty"`
  427. // Id: Issue identifier.
  428. Id string `json:"id,omitempty"`
  429. // LastChecked: Last time the account was checked for this issue.
  430. LastChecked string `json:"lastChecked,omitempty"`
  431. // Location: The attribute name that is relevant for the issue.
  432. Location string `json:"location,omitempty"`
  433. // NumItems: Number of items in the account found to have the said
  434. // issue.
  435. NumItems int64 `json:"numItems,omitempty"`
  436. // Severity: Severity of the problem.
  437. Severity string `json:"severity,omitempty"`
  438. // SubmittedValue: Submitted value that causes the issue.
  439. SubmittedValue string `json:"submittedValue,omitempty"`
  440. // ForceSendFields is a list of field names (e.g. "Country") to
  441. // unconditionally include in API requests. By default, fields with
  442. // empty values are omitted from API requests. However, any non-pointer,
  443. // non-interface field appearing in ForceSendFields will be sent to the
  444. // server regardless of whether the field is empty or not. This may be
  445. // used to include empty fields in Patch requests.
  446. ForceSendFields []string `json:"-"`
  447. // NullFields is a list of field names (e.g. "Country") to include in
  448. // API requests with the JSON null value. By default, fields with empty
  449. // values are omitted from API requests. However, any field with an
  450. // empty value appearing in NullFields will be sent to the server as
  451. // null. It is an error if a field in this list has a non-empty value.
  452. // This may be used to include null fields in Patch requests.
  453. NullFields []string `json:"-"`
  454. }
  455. func (s *AccountStatusDataQualityIssue) MarshalJSON() ([]byte, error) {
  456. type NoMethod AccountStatusDataQualityIssue
  457. raw := NoMethod(*s)
  458. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  459. }
  460. // AccountStatusExampleItem: An example of an item that has poor data
  461. // quality. An item value on the landing page differs from what is
  462. // submitted, or conflicts with a policy.
  463. type AccountStatusExampleItem struct {
  464. // ItemId: Unique item ID as specified in the uploaded product data.
  465. ItemId string `json:"itemId,omitempty"`
  466. // Link: Landing page of the item.
  467. Link string `json:"link,omitempty"`
  468. // SubmittedValue: The item value that was submitted.
  469. SubmittedValue string `json:"submittedValue,omitempty"`
  470. // Title: Title of the item.
  471. Title string `json:"title,omitempty"`
  472. // ValueOnLandingPage: The actual value on the landing page.
  473. ValueOnLandingPage string `json:"valueOnLandingPage,omitempty"`
  474. // ForceSendFields is a list of field names (e.g. "ItemId") to
  475. // unconditionally include in API requests. By default, fields with
  476. // empty values are omitted from API requests. However, any non-pointer,
  477. // non-interface field appearing in ForceSendFields will be sent to the
  478. // server regardless of whether the field is empty or not. This may be
  479. // used to include empty fields in Patch requests.
  480. ForceSendFields []string `json:"-"`
  481. // NullFields is a list of field names (e.g. "ItemId") to include in API
  482. // requests with the JSON null value. By default, fields with empty
  483. // values are omitted from API requests. However, any field with an
  484. // empty value appearing in NullFields will be sent to the server as
  485. // null. It is an error if a field in this list has a non-empty value.
  486. // This may be used to include null fields in Patch requests.
  487. NullFields []string `json:"-"`
  488. }
  489. func (s *AccountStatusExampleItem) MarshalJSON() ([]byte, error) {
  490. type NoMethod AccountStatusExampleItem
  491. raw := NoMethod(*s)
  492. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  493. }
  494. // AccountTax: The tax settings of a merchant account.
  495. type AccountTax struct {
  496. // AccountId: The ID of the account to which these account tax settings
  497. // belong.
  498. AccountId uint64 `json:"accountId,omitempty,string"`
  499. // Kind: Identifies what kind of resource this is. Value: the fixed
  500. // string "content#accountTax".
  501. Kind string `json:"kind,omitempty"`
  502. // Rules: Tax rules. Updating the tax rules will enable US taxes (not
  503. // reversible). Defining no rules is equivalent to not charging tax at
  504. // all.
  505. Rules []*AccountTaxTaxRule `json:"rules,omitempty"`
  506. // ServerResponse contains the HTTP response code and headers from the
  507. // server.
  508. googleapi.ServerResponse `json:"-"`
  509. // ForceSendFields is a list of field names (e.g. "AccountId") to
  510. // unconditionally include in API requests. By default, fields with
  511. // empty values are omitted from API requests. However, any non-pointer,
  512. // non-interface field appearing in ForceSendFields will be sent to the
  513. // server regardless of whether the field is empty or not. This may be
  514. // used to include empty fields in Patch requests.
  515. ForceSendFields []string `json:"-"`
  516. // NullFields is a list of field names (e.g. "AccountId") to include in
  517. // API requests with the JSON null value. By default, fields with empty
  518. // values are omitted from API requests. However, any field with an
  519. // empty value appearing in NullFields will be sent to the server as
  520. // null. It is an error if a field in this list has a non-empty value.
  521. // This may be used to include null fields in Patch requests.
  522. NullFields []string `json:"-"`
  523. }
  524. func (s *AccountTax) MarshalJSON() ([]byte, error) {
  525. type NoMethod AccountTax
  526. raw := NoMethod(*s)
  527. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  528. }
  529. // AccountTaxTaxRule: Tax calculation rule to apply in a state or
  530. // province (USA only).
  531. type AccountTaxTaxRule struct {
  532. // Country: Country code in which tax is applicable.
  533. Country string `json:"country,omitempty"`
  534. // LocationId: State (or province) is which the tax is applicable,
  535. // described by its location id (also called criteria id).
  536. LocationId uint64 `json:"locationId,omitempty,string"`
  537. // RatePercent: Explicit tax rate in percent, represented as a floating
  538. // point number without the percentage character. Must not be negative.
  539. RatePercent string `json:"ratePercent,omitempty"`
  540. // ShippingTaxed: If true, shipping charges are also taxed.
  541. ShippingTaxed bool `json:"shippingTaxed,omitempty"`
  542. // UseGlobalRate: Whether the tax rate is taken from a global tax table
  543. // or specified explicitly.
  544. UseGlobalRate bool `json:"useGlobalRate,omitempty"`
  545. // ForceSendFields is a list of field names (e.g. "Country") to
  546. // unconditionally include in API requests. By default, fields with
  547. // empty values are omitted from API requests. However, any non-pointer,
  548. // non-interface field appearing in ForceSendFields will be sent to the
  549. // server regardless of whether the field is empty or not. This may be
  550. // used to include empty fields in Patch requests.
  551. ForceSendFields []string `json:"-"`
  552. // NullFields is a list of field names (e.g. "Country") to include in
  553. // API requests with the JSON null value. By default, fields with empty
  554. // values are omitted from API requests. However, any field with an
  555. // empty value appearing in NullFields will be sent to the server as
  556. // null. It is an error if a field in this list has a non-empty value.
  557. // This may be used to include null fields in Patch requests.
  558. NullFields []string `json:"-"`
  559. }
  560. func (s *AccountTaxTaxRule) MarshalJSON() ([]byte, error) {
  561. type NoMethod AccountTaxTaxRule
  562. raw := NoMethod(*s)
  563. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  564. }
  565. type AccountUser struct {
  566. // Admin: Whether user is an admin.
  567. Admin *bool `json:"admin,omitempty"`
  568. // EmailAddress: User's email address.
  569. EmailAddress string `json:"emailAddress,omitempty"`
  570. // ForceSendFields is a list of field names (e.g. "Admin") to
  571. // unconditionally include in API requests. By default, fields with
  572. // empty values are omitted from API requests. However, any non-pointer,
  573. // non-interface field appearing in ForceSendFields will be sent to the
  574. // server regardless of whether the field is empty or not. This may be
  575. // used to include empty fields in Patch requests.
  576. ForceSendFields []string `json:"-"`
  577. // NullFields is a list of field names (e.g. "Admin") to include in API
  578. // requests with the JSON null value. By default, fields with empty
  579. // values are omitted from API requests. However, any field with an
  580. // empty value appearing in NullFields will be sent to the server as
  581. // null. It is an error if a field in this list has a non-empty value.
  582. // This may be used to include null fields in Patch requests.
  583. NullFields []string `json:"-"`
  584. }
  585. func (s *AccountUser) MarshalJSON() ([]byte, error) {
  586. type NoMethod AccountUser
  587. raw := NoMethod(*s)
  588. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  589. }
  590. type AccountYouTubeChannelLink struct {
  591. // ChannelId: Channel ID.
  592. ChannelId string `json:"channelId,omitempty"`
  593. // Status: Status of the link between this Merchant Center account and
  594. // the YouTube channel. Upon retrieval, it represents the actual status
  595. // of the link and can be either active if it was approved in YT Creator
  596. // Studio or pending if it's pending approval. Upon insertion, it
  597. // represents the intended status of the link. Re-uploading a link with
  598. // status active when it's still pending or with status pending when
  599. // it's already active will have no effect: the status will remain
  600. // unchanged. Re-uploading a link with deprecated status inactive is
  601. // equivalent to not submitting the link at all and will delete the link
  602. // if it was active or cancel the link request if it was pending.
  603. Status string `json:"status,omitempty"`
  604. // ForceSendFields is a list of field names (e.g. "ChannelId") to
  605. // unconditionally include in API requests. By default, fields with
  606. // empty values are omitted from API requests. However, any non-pointer,
  607. // non-interface field appearing in ForceSendFields will be sent to the
  608. // server regardless of whether the field is empty or not. This may be
  609. // used to include empty fields in Patch requests.
  610. ForceSendFields []string `json:"-"`
  611. // NullFields is a list of field names (e.g. "ChannelId") to include in
  612. // API requests with the JSON null value. By default, fields with empty
  613. // values are omitted from API requests. However, any field with an
  614. // empty value appearing in NullFields will be sent to the server as
  615. // null. It is an error if a field in this list has a non-empty value.
  616. // This may be used to include null fields in Patch requests.
  617. NullFields []string `json:"-"`
  618. }
  619. func (s *AccountYouTubeChannelLink) MarshalJSON() ([]byte, error) {
  620. type NoMethod AccountYouTubeChannelLink
  621. raw := NoMethod(*s)
  622. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  623. }
  624. type AccountsAuthInfoResponse struct {
  625. // AccountIdentifiers: The account identifiers corresponding to the
  626. // authenticated user.
  627. // - For an individual account: only the merchant ID is defined
  628. // - For an aggregator: only the aggregator ID is defined
  629. // - For a subaccount of an MCA: both the merchant ID and the aggregator
  630. // ID are defined.
  631. AccountIdentifiers []*AccountIdentifier `json:"accountIdentifiers,omitempty"`
  632. // Kind: Identifies what kind of resource this is. Value: the fixed
  633. // string "content#accountsAuthInfoResponse".
  634. Kind string `json:"kind,omitempty"`
  635. // ServerResponse contains the HTTP response code and headers from the
  636. // server.
  637. googleapi.ServerResponse `json:"-"`
  638. // ForceSendFields is a list of field names (e.g. "AccountIdentifiers")
  639. // to unconditionally include in API requests. By default, fields with
  640. // empty values are omitted from API requests. However, any non-pointer,
  641. // non-interface field appearing in ForceSendFields will be sent to the
  642. // server regardless of whether the field is empty or not. This may be
  643. // used to include empty fields in Patch requests.
  644. ForceSendFields []string `json:"-"`
  645. // NullFields is a list of field names (e.g. "AccountIdentifiers") to
  646. // include in API requests with the JSON null value. By default, fields
  647. // with empty values are omitted from API requests. However, any field
  648. // with an empty value appearing in NullFields will be sent to the
  649. // server as null. It is an error if a field in this list has a
  650. // non-empty value. This may be used to include null fields in Patch
  651. // requests.
  652. NullFields []string `json:"-"`
  653. }
  654. func (s *AccountsAuthInfoResponse) MarshalJSON() ([]byte, error) {
  655. type NoMethod AccountsAuthInfoResponse
  656. raw := NoMethod(*s)
  657. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  658. }
  659. type AccountsClaimWebsiteResponse struct {
  660. // Kind: Identifies what kind of resource this is. Value: the fixed
  661. // string "content#accountsClaimWebsiteResponse".
  662. Kind string `json:"kind,omitempty"`
  663. // ServerResponse contains the HTTP response code and headers from the
  664. // server.
  665. googleapi.ServerResponse `json:"-"`
  666. // ForceSendFields is a list of field names (e.g. "Kind") to
  667. // unconditionally include in API requests. By default, fields with
  668. // empty values are omitted from API requests. However, any non-pointer,
  669. // non-interface field appearing in ForceSendFields will be sent to the
  670. // server regardless of whether the field is empty or not. This may be
  671. // used to include empty fields in Patch requests.
  672. ForceSendFields []string `json:"-"`
  673. // NullFields is a list of field names (e.g. "Kind") to include in API
  674. // requests with the JSON null value. By default, fields with empty
  675. // values are omitted from API requests. However, any field with an
  676. // empty value appearing in NullFields will be sent to the server as
  677. // null. It is an error if a field in this list has a non-empty value.
  678. // This may be used to include null fields in Patch requests.
  679. NullFields []string `json:"-"`
  680. }
  681. func (s *AccountsClaimWebsiteResponse) MarshalJSON() ([]byte, error) {
  682. type NoMethod AccountsClaimWebsiteResponse
  683. raw := NoMethod(*s)
  684. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  685. }
  686. type AccountsCustomBatchRequest struct {
  687. // Entries: The request entries to be processed in the batch.
  688. Entries []*AccountsCustomBatchRequestEntry `json:"entries,omitempty"`
  689. // ForceSendFields is a list of field names (e.g. "Entries") to
  690. // unconditionally include in API requests. By default, fields with
  691. // empty values are omitted from API requests. However, any non-pointer,
  692. // non-interface field appearing in ForceSendFields will be sent to the
  693. // server regardless of whether the field is empty or not. This may be
  694. // used to include empty fields in Patch requests.
  695. ForceSendFields []string `json:"-"`
  696. // NullFields is a list of field names (e.g. "Entries") to include in
  697. // API requests with the JSON null value. By default, fields with empty
  698. // values are omitted from API requests. However, any field with an
  699. // empty value appearing in NullFields will be sent to the server as
  700. // null. It is an error if a field in this list has a non-empty value.
  701. // This may be used to include null fields in Patch requests.
  702. NullFields []string `json:"-"`
  703. }
  704. func (s *AccountsCustomBatchRequest) MarshalJSON() ([]byte, error) {
  705. type NoMethod AccountsCustomBatchRequest
  706. raw := NoMethod(*s)
  707. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  708. }
  709. // AccountsCustomBatchRequestEntry: A batch entry encoding a single
  710. // non-batch accounts request.
  711. type AccountsCustomBatchRequestEntry struct {
  712. // Account: The account to create or update. Only defined if the method
  713. // is insert or update.
  714. Account *Account `json:"account,omitempty"`
  715. // AccountId: The ID of the targeted account. Only defined if the method
  716. // is get, delete or claimwebsite.
  717. AccountId uint64 `json:"accountId,omitempty,string"`
  718. // BatchId: An entry ID, unique within the batch request.
  719. BatchId int64 `json:"batchId,omitempty"`
  720. // Force: Whether the account should be deleted if the account has
  721. // offers. Only applicable if the method is delete.
  722. Force bool `json:"force,omitempty"`
  723. // MerchantId: The ID of the managing account.
  724. MerchantId uint64 `json:"merchantId,omitempty,string"`
  725. Method string `json:"method,omitempty"`
  726. // Overwrite: Only applicable if the method is claimwebsite. Indicates
  727. // whether or not to take the claim from another account in case there
  728. // is a conflict.
  729. Overwrite bool `json:"overwrite,omitempty"`
  730. // ForceSendFields is a list of field names (e.g. "Account") to
  731. // unconditionally include in API requests. By default, fields with
  732. // empty values are omitted from API requests. However, any non-pointer,
  733. // non-interface field appearing in ForceSendFields will be sent to the
  734. // server regardless of whether the field is empty or not. This may be
  735. // used to include empty fields in Patch requests.
  736. ForceSendFields []string `json:"-"`
  737. // NullFields is a list of field names (e.g. "Account") to include in
  738. // API requests with the JSON null value. By default, fields with empty
  739. // values are omitted from API requests. However, any field with an
  740. // empty value appearing in NullFields will be sent to the server as
  741. // null. It is an error if a field in this list has a non-empty value.
  742. // This may be used to include null fields in Patch requests.
  743. NullFields []string `json:"-"`
  744. }
  745. func (s *AccountsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  746. type NoMethod AccountsCustomBatchRequestEntry
  747. raw := NoMethod(*s)
  748. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  749. }
  750. type AccountsCustomBatchResponse struct {
  751. // Entries: The result of the execution of the batch requests.
  752. Entries []*AccountsCustomBatchResponseEntry `json:"entries,omitempty"`
  753. // Kind: Identifies what kind of resource this is. Value: the fixed
  754. // string "content#accountsCustomBatchResponse".
  755. Kind string `json:"kind,omitempty"`
  756. // ServerResponse contains the HTTP response code and headers from the
  757. // server.
  758. googleapi.ServerResponse `json:"-"`
  759. // ForceSendFields is a list of field names (e.g. "Entries") to
  760. // unconditionally include in API requests. By default, fields with
  761. // empty values are omitted from API requests. However, any non-pointer,
  762. // non-interface field appearing in ForceSendFields will be sent to the
  763. // server regardless of whether the field is empty or not. This may be
  764. // used to include empty fields in Patch requests.
  765. ForceSendFields []string `json:"-"`
  766. // NullFields is a list of field names (e.g. "Entries") to include in
  767. // API requests with the JSON null value. By default, fields with empty
  768. // values are omitted from API requests. However, any field with an
  769. // empty value appearing in NullFields will be sent to the server as
  770. // null. It is an error if a field in this list has a non-empty value.
  771. // This may be used to include null fields in Patch requests.
  772. NullFields []string `json:"-"`
  773. }
  774. func (s *AccountsCustomBatchResponse) MarshalJSON() ([]byte, error) {
  775. type NoMethod AccountsCustomBatchResponse
  776. raw := NoMethod(*s)
  777. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  778. }
  779. // AccountsCustomBatchResponseEntry: A batch entry encoding a single
  780. // non-batch accounts response.
  781. type AccountsCustomBatchResponseEntry struct {
  782. // Account: The retrieved, created, or updated account. Not defined if
  783. // the method was delete or claimwebsite.
  784. Account *Account `json:"account,omitempty"`
  785. // BatchId: The ID of the request entry this entry responds to.
  786. BatchId int64 `json:"batchId,omitempty"`
  787. // Errors: A list of errors defined if and only if the request failed.
  788. Errors *Errors `json:"errors,omitempty"`
  789. // Kind: Identifies what kind of resource this is. Value: the fixed
  790. // string "content#accountsCustomBatchResponseEntry".
  791. Kind string `json:"kind,omitempty"`
  792. // ForceSendFields is a list of field names (e.g. "Account") to
  793. // unconditionally include in API requests. By default, fields with
  794. // empty values are omitted from API requests. However, any non-pointer,
  795. // non-interface field appearing in ForceSendFields will be sent to the
  796. // server regardless of whether the field is empty or not. This may be
  797. // used to include empty fields in Patch requests.
  798. ForceSendFields []string `json:"-"`
  799. // NullFields is a list of field names (e.g. "Account") to include in
  800. // API requests with the JSON null value. By default, fields with empty
  801. // values are omitted from API requests. However, any field with an
  802. // empty value appearing in NullFields will be sent to the server as
  803. // null. It is an error if a field in this list has a non-empty value.
  804. // This may be used to include null fields in Patch requests.
  805. NullFields []string `json:"-"`
  806. }
  807. func (s *AccountsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  808. type NoMethod AccountsCustomBatchResponseEntry
  809. raw := NoMethod(*s)
  810. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  811. }
  812. type AccountsListResponse struct {
  813. // Kind: Identifies what kind of resource this is. Value: the fixed
  814. // string "content#accountsListResponse".
  815. Kind string `json:"kind,omitempty"`
  816. // NextPageToken: The token for the retrieval of the next page of
  817. // accounts.
  818. NextPageToken string `json:"nextPageToken,omitempty"`
  819. Resources []*Account `json:"resources,omitempty"`
  820. // ServerResponse contains the HTTP response code and headers from the
  821. // server.
  822. googleapi.ServerResponse `json:"-"`
  823. // ForceSendFields is a list of field names (e.g. "Kind") to
  824. // unconditionally include in API requests. By default, fields with
  825. // empty values are omitted from API requests. However, any non-pointer,
  826. // non-interface field appearing in ForceSendFields will be sent to the
  827. // server regardless of whether the field is empty or not. This may be
  828. // used to include empty fields in Patch requests.
  829. ForceSendFields []string `json:"-"`
  830. // NullFields is a list of field names (e.g. "Kind") to include in API
  831. // requests with the JSON null value. By default, fields with empty
  832. // values are omitted from API requests. However, any field with an
  833. // empty value appearing in NullFields will be sent to the server as
  834. // null. It is an error if a field in this list has a non-empty value.
  835. // This may be used to include null fields in Patch requests.
  836. NullFields []string `json:"-"`
  837. }
  838. func (s *AccountsListResponse) MarshalJSON() ([]byte, error) {
  839. type NoMethod AccountsListResponse
  840. raw := NoMethod(*s)
  841. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  842. }
  843. type AccountstatusesCustomBatchRequest struct {
  844. // Entries: The request entries to be processed in the batch.
  845. Entries []*AccountstatusesCustomBatchRequestEntry `json:"entries,omitempty"`
  846. // ForceSendFields is a list of field names (e.g. "Entries") to
  847. // unconditionally include in API requests. By default, fields with
  848. // empty values are omitted from API requests. However, any non-pointer,
  849. // non-interface field appearing in ForceSendFields will be sent to the
  850. // server regardless of whether the field is empty or not. This may be
  851. // used to include empty fields in Patch requests.
  852. ForceSendFields []string `json:"-"`
  853. // NullFields is a list of field names (e.g. "Entries") to include in
  854. // API requests with the JSON null value. By default, fields with empty
  855. // values are omitted from API requests. However, any field with an
  856. // empty value appearing in NullFields will be sent to the server as
  857. // null. It is an error if a field in this list has a non-empty value.
  858. // This may be used to include null fields in Patch requests.
  859. NullFields []string `json:"-"`
  860. }
  861. func (s *AccountstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) {
  862. type NoMethod AccountstatusesCustomBatchRequest
  863. raw := NoMethod(*s)
  864. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  865. }
  866. // AccountstatusesCustomBatchRequestEntry: A batch entry encoding a
  867. // single non-batch accountstatuses request.
  868. type AccountstatusesCustomBatchRequestEntry struct {
  869. // AccountId: The ID of the (sub-)account whose status to get.
  870. AccountId uint64 `json:"accountId,omitempty,string"`
  871. // BatchId: An entry ID, unique within the batch request.
  872. BatchId int64 `json:"batchId,omitempty"`
  873. // Destinations: If set, only issues for the specified destinations are
  874. // returned, otherwise only issues for the Shopping destination.
  875. Destinations []string `json:"destinations,omitempty"`
  876. // MerchantId: The ID of the managing account.
  877. MerchantId uint64 `json:"merchantId,omitempty,string"`
  878. // Method: The method (get).
  879. Method string `json:"method,omitempty"`
  880. // ForceSendFields is a list of field names (e.g. "AccountId") to
  881. // unconditionally include in API requests. By default, fields with
  882. // empty values are omitted from API requests. However, any non-pointer,
  883. // non-interface field appearing in ForceSendFields will be sent to the
  884. // server regardless of whether the field is empty or not. This may be
  885. // used to include empty fields in Patch requests.
  886. ForceSendFields []string `json:"-"`
  887. // NullFields is a list of field names (e.g. "AccountId") to include in
  888. // API requests with the JSON null value. By default, fields with empty
  889. // values are omitted from API requests. However, any field with an
  890. // empty value appearing in NullFields will be sent to the server as
  891. // null. It is an error if a field in this list has a non-empty value.
  892. // This may be used to include null fields in Patch requests.
  893. NullFields []string `json:"-"`
  894. }
  895. func (s *AccountstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  896. type NoMethod AccountstatusesCustomBatchRequestEntry
  897. raw := NoMethod(*s)
  898. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  899. }
  900. type AccountstatusesCustomBatchResponse struct {
  901. // Entries: The result of the execution of the batch requests.
  902. Entries []*AccountstatusesCustomBatchResponseEntry `json:"entries,omitempty"`
  903. // Kind: Identifies what kind of resource this is. Value: the fixed
  904. // string "content#accountstatusesCustomBatchResponse".
  905. Kind string `json:"kind,omitempty"`
  906. // ServerResponse contains the HTTP response code and headers from the
  907. // server.
  908. googleapi.ServerResponse `json:"-"`
  909. // ForceSendFields is a list of field names (e.g. "Entries") to
  910. // unconditionally include in API requests. By default, fields with
  911. // empty values are omitted from API requests. However, any non-pointer,
  912. // non-interface field appearing in ForceSendFields will be sent to the
  913. // server regardless of whether the field is empty or not. This may be
  914. // used to include empty fields in Patch requests.
  915. ForceSendFields []string `json:"-"`
  916. // NullFields is a list of field names (e.g. "Entries") to include in
  917. // API requests with the JSON null value. By default, fields with empty
  918. // values are omitted from API requests. However, any field with an
  919. // empty value appearing in NullFields will be sent to the server as
  920. // null. It is an error if a field in this list has a non-empty value.
  921. // This may be used to include null fields in Patch requests.
  922. NullFields []string `json:"-"`
  923. }
  924. func (s *AccountstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) {
  925. type NoMethod AccountstatusesCustomBatchResponse
  926. raw := NoMethod(*s)
  927. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  928. }
  929. // AccountstatusesCustomBatchResponseEntry: A batch entry encoding a
  930. // single non-batch accountstatuses response.
  931. type AccountstatusesCustomBatchResponseEntry struct {
  932. // AccountStatus: The requested account status. Defined if and only if
  933. // the request was successful.
  934. AccountStatus *AccountStatus `json:"accountStatus,omitempty"`
  935. // BatchId: The ID of the request entry this entry responds to.
  936. BatchId int64 `json:"batchId,omitempty"`
  937. // Errors: A list of errors defined if and only if the request failed.
  938. Errors *Errors `json:"errors,omitempty"`
  939. // ForceSendFields is a list of field names (e.g. "AccountStatus") to
  940. // unconditionally include in API requests. By default, fields with
  941. // empty values are omitted from API requests. However, any non-pointer,
  942. // non-interface field appearing in ForceSendFields will be sent to the
  943. // server regardless of whether the field is empty or not. This may be
  944. // used to include empty fields in Patch requests.
  945. ForceSendFields []string `json:"-"`
  946. // NullFields is a list of field names (e.g. "AccountStatus") to include
  947. // in API requests with the JSON null value. By default, fields with
  948. // empty values are omitted from API requests. However, any field with
  949. // an empty value appearing in NullFields will be sent to the server as
  950. // null. It is an error if a field in this list has a non-empty value.
  951. // This may be used to include null fields in Patch requests.
  952. NullFields []string `json:"-"`
  953. }
  954. func (s *AccountstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  955. type NoMethod AccountstatusesCustomBatchResponseEntry
  956. raw := NoMethod(*s)
  957. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  958. }
  959. type AccountstatusesListResponse struct {
  960. // Kind: Identifies what kind of resource this is. Value: the fixed
  961. // string "content#accountstatusesListResponse".
  962. Kind string `json:"kind,omitempty"`
  963. // NextPageToken: The token for the retrieval of the next page of
  964. // account statuses.
  965. NextPageToken string `json:"nextPageToken,omitempty"`
  966. Resources []*AccountStatus `json:"resources,omitempty"`
  967. // ServerResponse contains the HTTP response code and headers from the
  968. // server.
  969. googleapi.ServerResponse `json:"-"`
  970. // ForceSendFields is a list of field names (e.g. "Kind") to
  971. // unconditionally include in API requests. By default, fields with
  972. // empty values are omitted from API requests. However, any non-pointer,
  973. // non-interface field appearing in ForceSendFields will be sent to the
  974. // server regardless of whether the field is empty or not. This may be
  975. // used to include empty fields in Patch requests.
  976. ForceSendFields []string `json:"-"`
  977. // NullFields is a list of field names (e.g. "Kind") to include in API
  978. // requests with the JSON null value. By default, fields with empty
  979. // values are omitted from API requests. However, any field with an
  980. // empty value appearing in NullFields will be sent to the server as
  981. // null. It is an error if a field in this list has a non-empty value.
  982. // This may be used to include null fields in Patch requests.
  983. NullFields []string `json:"-"`
  984. }
  985. func (s *AccountstatusesListResponse) MarshalJSON() ([]byte, error) {
  986. type NoMethod AccountstatusesListResponse
  987. raw := NoMethod(*s)
  988. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  989. }
  990. type AccounttaxCustomBatchRequest struct {
  991. // Entries: The request entries to be processed in the batch.
  992. Entries []*AccounttaxCustomBatchRequestEntry `json:"entries,omitempty"`
  993. // ForceSendFields is a list of field names (e.g. "Entries") to
  994. // unconditionally include in API requests. By default, fields with
  995. // empty values are omitted from API requests. However, any non-pointer,
  996. // non-interface field appearing in ForceSendFields will be sent to the
  997. // server regardless of whether the field is empty or not. This may be
  998. // used to include empty fields in Patch requests.
  999. ForceSendFields []string `json:"-"`
  1000. // NullFields is a list of field names (e.g. "Entries") to include in
  1001. // API requests with the JSON null value. By default, fields with empty
  1002. // values are omitted from API requests. However, any field with an
  1003. // empty value appearing in NullFields will be sent to the server as
  1004. // null. It is an error if a field in this list has a non-empty value.
  1005. // This may be used to include null fields in Patch requests.
  1006. NullFields []string `json:"-"`
  1007. }
  1008. func (s *AccounttaxCustomBatchRequest) MarshalJSON() ([]byte, error) {
  1009. type NoMethod AccounttaxCustomBatchRequest
  1010. raw := NoMethod(*s)
  1011. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1012. }
  1013. // AccounttaxCustomBatchRequestEntry: A batch entry encoding a single
  1014. // non-batch accounttax request.
  1015. type AccounttaxCustomBatchRequestEntry struct {
  1016. // AccountId: The ID of the account for which to get/update account tax
  1017. // settings.
  1018. AccountId uint64 `json:"accountId,omitempty,string"`
  1019. // AccountTax: The account tax settings to update. Only defined if the
  1020. // method is update.
  1021. AccountTax *AccountTax `json:"accountTax,omitempty"`
  1022. // BatchId: An entry ID, unique within the batch request.
  1023. BatchId int64 `json:"batchId,omitempty"`
  1024. // MerchantId: The ID of the managing account.
  1025. MerchantId uint64 `json:"merchantId,omitempty,string"`
  1026. Method string `json:"method,omitempty"`
  1027. // ForceSendFields is a list of field names (e.g. "AccountId") to
  1028. // unconditionally include in API requests. By default, fields with
  1029. // empty values are omitted from API requests. However, any non-pointer,
  1030. // non-interface field appearing in ForceSendFields will be sent to the
  1031. // server regardless of whether the field is empty or not. This may be
  1032. // used to include empty fields in Patch requests.
  1033. ForceSendFields []string `json:"-"`
  1034. // NullFields is a list of field names (e.g. "AccountId") to include in
  1035. // API requests with the JSON null value. By default, fields with empty
  1036. // values are omitted from API requests. However, any field with an
  1037. // empty value appearing in NullFields will be sent to the server as
  1038. // null. It is an error if a field in this list has a non-empty value.
  1039. // This may be used to include null fields in Patch requests.
  1040. NullFields []string `json:"-"`
  1041. }
  1042. func (s *AccounttaxCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  1043. type NoMethod AccounttaxCustomBatchRequestEntry
  1044. raw := NoMethod(*s)
  1045. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1046. }
  1047. type AccounttaxCustomBatchResponse struct {
  1048. // Entries: The result of the execution of the batch requests.
  1049. Entries []*AccounttaxCustomBatchResponseEntry `json:"entries,omitempty"`
  1050. // Kind: Identifies what kind of resource this is. Value: the fixed
  1051. // string "content#accounttaxCustomBatchResponse".
  1052. Kind string `json:"kind,omitempty"`
  1053. // ServerResponse contains the HTTP response code and headers from the
  1054. // server.
  1055. googleapi.ServerResponse `json:"-"`
  1056. // ForceSendFields is a list of field names (e.g. "Entries") to
  1057. // unconditionally include in API requests. By default, fields with
  1058. // empty values are omitted from API requests. However, any non-pointer,
  1059. // non-interface field appearing in ForceSendFields will be sent to the
  1060. // server regardless of whether the field is empty or not. This may be
  1061. // used to include empty fields in Patch requests.
  1062. ForceSendFields []string `json:"-"`
  1063. // NullFields is a list of field names (e.g. "Entries") to include in
  1064. // API requests with the JSON null value. By default, fields with empty
  1065. // values are omitted from API requests. However, any field with an
  1066. // empty value appearing in NullFields will be sent to the server as
  1067. // null. It is an error if a field in this list has a non-empty value.
  1068. // This may be used to include null fields in Patch requests.
  1069. NullFields []string `json:"-"`
  1070. }
  1071. func (s *AccounttaxCustomBatchResponse) MarshalJSON() ([]byte, error) {
  1072. type NoMethod AccounttaxCustomBatchResponse
  1073. raw := NoMethod(*s)
  1074. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1075. }
  1076. // AccounttaxCustomBatchResponseEntry: A batch entry encoding a single
  1077. // non-batch accounttax response.
  1078. type AccounttaxCustomBatchResponseEntry struct {
  1079. // AccountTax: The retrieved or updated account tax settings.
  1080. AccountTax *AccountTax `json:"accountTax,omitempty"`
  1081. // BatchId: The ID of the request entry this entry responds to.
  1082. BatchId int64 `json:"batchId,omitempty"`
  1083. // Errors: A list of errors defined if and only if the request failed.
  1084. Errors *Errors `json:"errors,omitempty"`
  1085. // Kind: Identifies what kind of resource this is. Value: the fixed
  1086. // string "content#accounttaxCustomBatchResponseEntry".
  1087. Kind string `json:"kind,omitempty"`
  1088. // ForceSendFields is a list of field names (e.g. "AccountTax") to
  1089. // unconditionally include in API requests. By default, fields with
  1090. // empty values are omitted from API requests. However, any non-pointer,
  1091. // non-interface field appearing in ForceSendFields will be sent to the
  1092. // server regardless of whether the field is empty or not. This may be
  1093. // used to include empty fields in Patch requests.
  1094. ForceSendFields []string `json:"-"`
  1095. // NullFields is a list of field names (e.g. "AccountTax") to include in
  1096. // API requests with the JSON null value. By default, fields with empty
  1097. // values are omitted from API requests. However, any field with an
  1098. // empty value appearing in NullFields will be sent to the server as
  1099. // null. It is an error if a field in this list has a non-empty value.
  1100. // This may be used to include null fields in Patch requests.
  1101. NullFields []string `json:"-"`
  1102. }
  1103. func (s *AccounttaxCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  1104. type NoMethod AccounttaxCustomBatchResponseEntry
  1105. raw := NoMethod(*s)
  1106. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1107. }
  1108. type AccounttaxListResponse struct {
  1109. // Kind: Identifies what kind of resource this is. Value: the fixed
  1110. // string "content#accounttaxListResponse".
  1111. Kind string `json:"kind,omitempty"`
  1112. // NextPageToken: The token for the retrieval of the next page of
  1113. // account tax settings.
  1114. NextPageToken string `json:"nextPageToken,omitempty"`
  1115. Resources []*AccountTax `json:"resources,omitempty"`
  1116. // ServerResponse contains the HTTP response code and headers from the
  1117. // server.
  1118. googleapi.ServerResponse `json:"-"`
  1119. // ForceSendFields is a list of field names (e.g. "Kind") to
  1120. // unconditionally include in API requests. By default, fields with
  1121. // empty values are omitted from API requests. However, any non-pointer,
  1122. // non-interface field appearing in ForceSendFields will be sent to the
  1123. // server regardless of whether the field is empty or not. This may be
  1124. // used to include empty fields in Patch requests.
  1125. ForceSendFields []string `json:"-"`
  1126. // NullFields is a list of field names (e.g. "Kind") to include in API
  1127. // requests with the JSON null value. By default, fields with empty
  1128. // values are omitted from API requests. However, any field with an
  1129. // empty value appearing in NullFields will be sent to the server as
  1130. // null. It is an error if a field in this list has a non-empty value.
  1131. // This may be used to include null fields in Patch requests.
  1132. NullFields []string `json:"-"`
  1133. }
  1134. func (s *AccounttaxListResponse) MarshalJSON() ([]byte, error) {
  1135. type NoMethod AccounttaxListResponse
  1136. raw := NoMethod(*s)
  1137. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1138. }
  1139. type Amount struct {
  1140. // Pretax: Value before taxes.
  1141. Pretax *Price `json:"pretax,omitempty"`
  1142. // Tax: Tax value.
  1143. Tax *Price `json:"tax,omitempty"`
  1144. // ForceSendFields is a list of field names (e.g. "Pretax") to
  1145. // unconditionally include in API requests. By default, fields with
  1146. // empty values are omitted from API requests. However, any non-pointer,
  1147. // non-interface field appearing in ForceSendFields will be sent to the
  1148. // server regardless of whether the field is empty or not. This may be
  1149. // used to include empty fields in Patch requests.
  1150. ForceSendFields []string `json:"-"`
  1151. // NullFields is a list of field names (e.g. "Pretax") to include in API
  1152. // requests with the JSON null value. By default, fields with empty
  1153. // values are omitted from API requests. However, any field with an
  1154. // empty value appearing in NullFields will be sent to the server as
  1155. // null. It is an error if a field in this list has a non-empty value.
  1156. // This may be used to include null fields in Patch requests.
  1157. NullFields []string `json:"-"`
  1158. }
  1159. func (s *Amount) MarshalJSON() ([]byte, error) {
  1160. type NoMethod Amount
  1161. raw := NoMethod(*s)
  1162. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1163. }
  1164. type CarrierRate struct {
  1165. // CarrierName: Carrier service, such as "UPS" or "Fedex". The list of
  1166. // supported carriers can be retrieved via the getSupportedCarriers
  1167. // method. Required.
  1168. CarrierName string `json:"carrierName,omitempty"`
  1169. // CarrierService: Carrier service, such as "ground" or "2 days". The
  1170. // list of supported services for a carrier can be retrieved via the
  1171. // getSupportedCarriers method. Required.
  1172. CarrierService string `json:"carrierService,omitempty"`
  1173. // FlatAdjustment: Additive shipping rate modifier. Can be negative. For
  1174. // example { "value": "1", "currency" : "USD" } adds $1 to the rate, {
  1175. // "value": "-3", "currency" : "USD" } removes $3 from the rate.
  1176. // Optional.
  1177. FlatAdjustment *Price `json:"flatAdjustment,omitempty"`
  1178. // Name: Name of the carrier rate. Must be unique per rate group.
  1179. // Required.
  1180. Name string `json:"name,omitempty"`
  1181. // OriginPostalCode: Shipping origin for this carrier rate. Required.
  1182. OriginPostalCode string `json:"originPostalCode,omitempty"`
  1183. // PercentageAdjustment: Multiplicative shipping rate modifier as a
  1184. // number in decimal notation. Can be negative. For example "5.4"
  1185. // increases the rate by 5.4%, "-3" decreases the rate by 3%. Optional.
  1186. PercentageAdjustment string `json:"percentageAdjustment,omitempty"`
  1187. // ForceSendFields is a list of field names (e.g. "CarrierName") to
  1188. // unconditionally include in API requests. By default, fields with
  1189. // empty values are omitted from API requests. However, any non-pointer,
  1190. // non-interface field appearing in ForceSendFields will be sent to the
  1191. // server regardless of whether the field is empty or not. This may be
  1192. // used to include empty fields in Patch requests.
  1193. ForceSendFields []string `json:"-"`
  1194. // NullFields is a list of field names (e.g. "CarrierName") to include
  1195. // in API requests with the JSON null value. By default, fields with
  1196. // empty values are omitted from API requests. However, any field with
  1197. // an empty value appearing in NullFields will be sent to the server as
  1198. // null. It is an error if a field in this list has a non-empty value.
  1199. // This may be used to include null fields in Patch requests.
  1200. NullFields []string `json:"-"`
  1201. }
  1202. func (s *CarrierRate) MarshalJSON() ([]byte, error) {
  1203. type NoMethod CarrierRate
  1204. raw := NoMethod(*s)
  1205. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1206. }
  1207. type CarriersCarrier struct {
  1208. // Country: The CLDR country code of the carrier (e.g., "US"). Always
  1209. // present.
  1210. Country string `json:"country,omitempty"`
  1211. // Name: The name of the carrier (e.g., "UPS"). Always present.
  1212. Name string `json:"name,omitempty"`
  1213. // Services: A list of supported services (e.g., "ground") for that
  1214. // carrier. Contains at least one service.
  1215. Services []string `json:"services,omitempty"`
  1216. // ForceSendFields is a list of field names (e.g. "Country") to
  1217. // unconditionally include in API requests. By default, fields with
  1218. // empty values are omitted from API requests. However, any non-pointer,
  1219. // non-interface field appearing in ForceSendFields will be sent to the
  1220. // server regardless of whether the field is empty or not. This may be
  1221. // used to include empty fields in Patch requests.
  1222. ForceSendFields []string `json:"-"`
  1223. // NullFields is a list of field names (e.g. "Country") to include in
  1224. // API requests with the JSON null value. By default, fields with empty
  1225. // values are omitted from API requests. However, any field with an
  1226. // empty value appearing in NullFields will be sent to the server as
  1227. // null. It is an error if a field in this list has a non-empty value.
  1228. // This may be used to include null fields in Patch requests.
  1229. NullFields []string `json:"-"`
  1230. }
  1231. func (s *CarriersCarrier) MarshalJSON() ([]byte, error) {
  1232. type NoMethod CarriersCarrier
  1233. raw := NoMethod(*s)
  1234. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1235. }
  1236. type CutoffTime struct {
  1237. // Hour: Hour of the cutoff time until which an order has to be placed
  1238. // to be processed in the same day. Required.
  1239. Hour int64 `json:"hour,omitempty"`
  1240. // Minute: Minute of the cutoff time until which an order has to be
  1241. // placed to be processed in the same day. Required.
  1242. Minute int64 `json:"minute,omitempty"`
  1243. // Timezone: Timezone identifier for the cutoff time. A list of
  1244. // identifiers can be found in the AdWords API documentation. E.g.
  1245. // "Europe/Zurich". Required.
  1246. Timezone string `json:"timezone,omitempty"`
  1247. // ForceSendFields is a list of field names (e.g. "Hour") to
  1248. // unconditionally include in API requests. By default, fields with
  1249. // empty values are omitted from API requests. However, any non-pointer,
  1250. // non-interface field appearing in ForceSendFields will be sent to the
  1251. // server regardless of whether the field is empty or not. This may be
  1252. // used to include empty fields in Patch requests.
  1253. ForceSendFields []string `json:"-"`
  1254. // NullFields is a list of field names (e.g. "Hour") to include in API
  1255. // requests with the JSON null value. By default, fields with empty
  1256. // values are omitted from API requests. However, any field with an
  1257. // empty value appearing in NullFields will be sent to the server as
  1258. // null. It is an error if a field in this list has a non-empty value.
  1259. // This may be used to include null fields in Patch requests.
  1260. NullFields []string `json:"-"`
  1261. }
  1262. func (s *CutoffTime) MarshalJSON() ([]byte, error) {
  1263. type NoMethod CutoffTime
  1264. raw := NoMethod(*s)
  1265. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1266. }
  1267. // Datafeed: Datafeed configuration data.
  1268. type Datafeed struct {
  1269. // AttributeLanguage: The two-letter ISO 639-1 language in which the
  1270. // attributes are defined in the data feed.
  1271. AttributeLanguage string `json:"attributeLanguage,omitempty"`
  1272. // ContentLanguage: [DEPRECATED] Please use targets[].language instead.
  1273. // The two-letter ISO 639-1 language of the items in the feed. Must be a
  1274. // valid language for targetCountry.
  1275. ContentLanguage string `json:"contentLanguage,omitempty"`
  1276. // ContentType: The type of data feed. For product inventory feeds, only
  1277. // feeds for local stores, not online stores, are supported.
  1278. ContentType string `json:"contentType,omitempty"`
  1279. // FetchSchedule: Fetch schedule for the feed file.
  1280. FetchSchedule *DatafeedFetchSchedule `json:"fetchSchedule,omitempty"`
  1281. // FileName: The filename of the feed. All feeds must have a unique file
  1282. // name.
  1283. FileName string `json:"fileName,omitempty"`
  1284. // Format: Format of the feed file.
  1285. Format *DatafeedFormat `json:"format,omitempty"`
  1286. // Id: The ID of the data feed.
  1287. Id int64 `json:"id,omitempty,string"`
  1288. // IntendedDestinations: [DEPRECATED] Please use
  1289. // targets[].includedDestinations instead. The list of intended
  1290. // destinations (corresponds to checked check boxes in Merchant Center).
  1291. IntendedDestinations []string `json:"intendedDestinations,omitempty"`
  1292. // Kind: Identifies what kind of resource this is. Value: the fixed
  1293. // string "content#datafeed".
  1294. Kind string `json:"kind,omitempty"`
  1295. // Name: A descriptive name of the data feed.
  1296. Name string `json:"name,omitempty"`
  1297. // TargetCountry: [DEPRECATED] Please use targets[].country instead. The
  1298. // country where the items in the feed will be included in the search
  1299. // index, represented as a CLDR territory code.
  1300. TargetCountry string `json:"targetCountry,omitempty"`
  1301. // Targets: The targets this feed should apply to (country, language,
  1302. // destinations).
  1303. Targets []*DatafeedTarget `json:"targets,omitempty"`
  1304. // ServerResponse contains the HTTP response code and headers from the
  1305. // server.
  1306. googleapi.ServerResponse `json:"-"`
  1307. // ForceSendFields is a list of field names (e.g. "AttributeLanguage")
  1308. // to unconditionally include in API requests. By default, fields with
  1309. // empty values are omitted from API requests. However, any non-pointer,
  1310. // non-interface field appearing in ForceSendFields will be sent to the
  1311. // server regardless of whether the field is empty or not. This may be
  1312. // used to include empty fields in Patch requests.
  1313. ForceSendFields []string `json:"-"`
  1314. // NullFields is a list of field names (e.g. "AttributeLanguage") to
  1315. // include in API requests with the JSON null value. By default, fields
  1316. // with empty values are omitted from API requests. However, any field
  1317. // with an empty value appearing in NullFields will be sent to the
  1318. // server as null. It is an error if a field in this list has a
  1319. // non-empty value. This may be used to include null fields in Patch
  1320. // requests.
  1321. NullFields []string `json:"-"`
  1322. }
  1323. func (s *Datafeed) MarshalJSON() ([]byte, error) {
  1324. type NoMethod Datafeed
  1325. raw := NoMethod(*s)
  1326. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1327. }
  1328. // DatafeedFetchSchedule: The required fields vary based on the
  1329. // frequency of fetching. For a monthly fetch schedule, day_of_month and
  1330. // hour are required. For a weekly fetch schedule, weekday and hour are
  1331. // required. For a daily fetch schedule, only hour is required.
  1332. type DatafeedFetchSchedule struct {
  1333. // DayOfMonth: The day of the month the feed file should be fetched
  1334. // (1-31).
  1335. DayOfMonth int64 `json:"dayOfMonth,omitempty"`
  1336. // FetchUrl: The URL where the feed file can be fetched. Google Merchant
  1337. // Center will support automatic scheduled uploads using the HTTP,
  1338. // HTTPS, FTP, or SFTP protocols, so the value will need to be a valid
  1339. // link using one of those four protocols.
  1340. FetchUrl string `json:"fetchUrl,omitempty"`
  1341. // Hour: The hour of the day the feed file should be fetched (0-23).
  1342. Hour int64 `json:"hour,omitempty"`
  1343. // MinuteOfHour: The minute of the hour the feed file should be fetched
  1344. // (0-59). Read-only.
  1345. MinuteOfHour int64 `json:"minuteOfHour,omitempty"`
  1346. // Password: An optional password for fetch_url.
  1347. Password string `json:"password,omitempty"`
  1348. // Paused: Whether the scheduled fetch is paused or not.
  1349. Paused bool `json:"paused,omitempty"`
  1350. // TimeZone: Time zone used for schedule. UTC by default. E.g.,
  1351. // "America/Los_Angeles".
  1352. TimeZone string `json:"timeZone,omitempty"`
  1353. // Username: An optional user name for fetch_url.
  1354. Username string `json:"username,omitempty"`
  1355. // Weekday: The day of the week the feed file should be fetched.
  1356. Weekday string `json:"weekday,omitempty"`
  1357. // ForceSendFields is a list of field names (e.g. "DayOfMonth") to
  1358. // unconditionally include in API requests. By default, fields with
  1359. // empty values are omitted from API requests. However, any non-pointer,
  1360. // non-interface field appearing in ForceSendFields will be sent to the
  1361. // server regardless of whether the field is empty or not. This may be
  1362. // used to include empty fields in Patch requests.
  1363. ForceSendFields []string `json:"-"`
  1364. // NullFields is a list of field names (e.g. "DayOfMonth") to include in
  1365. // API requests with the JSON null value. By default, fields with empty
  1366. // values are omitted from API requests. However, any field with an
  1367. // empty value appearing in NullFields will be sent to the server as
  1368. // null. It is an error if a field in this list has a non-empty value.
  1369. // This may be used to include null fields in Patch requests.
  1370. NullFields []string `json:"-"`
  1371. }
  1372. func (s *DatafeedFetchSchedule) MarshalJSON() ([]byte, error) {
  1373. type NoMethod DatafeedFetchSchedule
  1374. raw := NoMethod(*s)
  1375. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1376. }
  1377. type DatafeedFormat struct {
  1378. // ColumnDelimiter: Delimiter for the separation of values in a
  1379. // delimiter-separated values feed. If not specified, the delimiter will
  1380. // be auto-detected. Ignored for non-DSV data feeds.
  1381. ColumnDelimiter string `json:"columnDelimiter,omitempty"`
  1382. // FileEncoding: Character encoding scheme of the data feed. If not
  1383. // specified, the encoding will be auto-detected.
  1384. FileEncoding string `json:"fileEncoding,omitempty"`
  1385. // QuotingMode: Specifies how double quotes are interpreted. If not
  1386. // specified, the mode will be auto-detected. Ignored for non-DSV data
  1387. // feeds.
  1388. QuotingMode string `json:"quotingMode,omitempty"`
  1389. // ForceSendFields is a list of field names (e.g. "ColumnDelimiter") to
  1390. // unconditionally include in API requests. By default, fields with
  1391. // empty values are omitted from API requests. However, any non-pointer,
  1392. // non-interface field appearing in ForceSendFields will be sent to the
  1393. // server regardless of whether the field is empty or not. This may be
  1394. // used to include empty fields in Patch requests.
  1395. ForceSendFields []string `json:"-"`
  1396. // NullFields is a list of field names (e.g. "ColumnDelimiter") to
  1397. // include in API requests with the JSON null value. By default, fields
  1398. // with empty values are omitted from API requests. However, any field
  1399. // with an empty value appearing in NullFields will be sent to the
  1400. // server as null. It is an error if a field in this list has a
  1401. // non-empty value. This may be used to include null fields in Patch
  1402. // requests.
  1403. NullFields []string `json:"-"`
  1404. }
  1405. func (s *DatafeedFormat) MarshalJSON() ([]byte, error) {
  1406. type NoMethod DatafeedFormat
  1407. raw := NoMethod(*s)
  1408. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1409. }
  1410. // DatafeedStatus: The status of a datafeed, i.e., the result of the
  1411. // last retrieval of the datafeed computed asynchronously when the feed
  1412. // processing is finished.
  1413. type DatafeedStatus struct {
  1414. // Country: The country for which the status is reported, represented as
  1415. // a CLDR territory code.
  1416. Country string `json:"country,omitempty"`
  1417. // DatafeedId: The ID of the feed for which the status is reported.
  1418. DatafeedId uint64 `json:"datafeedId,omitempty,string"`
  1419. // Errors: The list of errors occurring in the feed.
  1420. Errors []*DatafeedStatusError `json:"errors,omitempty"`
  1421. // ItemsTotal: The number of items in the feed that were processed.
  1422. ItemsTotal uint64 `json:"itemsTotal,omitempty,string"`
  1423. // ItemsValid: The number of items in the feed that were valid.
  1424. ItemsValid uint64 `json:"itemsValid,omitempty,string"`
  1425. // Kind: Identifies what kind of resource this is. Value: the fixed
  1426. // string "content#datafeedStatus".
  1427. Kind string `json:"kind,omitempty"`
  1428. // Language: The two-letter ISO 639-1 language for which the status is
  1429. // reported.
  1430. Language string `json:"language,omitempty"`
  1431. // LastUploadDate: The last date at which the feed was uploaded.
  1432. LastUploadDate string `json:"lastUploadDate,omitempty"`
  1433. // ProcessingStatus: The processing status of the feed.
  1434. ProcessingStatus string `json:"processingStatus,omitempty"`
  1435. // Warnings: The list of errors occurring in the feed.
  1436. Warnings []*DatafeedStatusError `json:"warnings,omitempty"`
  1437. // ServerResponse contains the HTTP response code and headers from the
  1438. // server.
  1439. googleapi.ServerResponse `json:"-"`
  1440. // ForceSendFields is a list of field names (e.g. "Country") to
  1441. // unconditionally include in API requests. By default, fields with
  1442. // empty values are omitted from API requests. However, any non-pointer,
  1443. // non-interface field appearing in ForceSendFields will be sent to the
  1444. // server regardless of whether the field is empty or not. This may be
  1445. // used to include empty fields in Patch requests.
  1446. ForceSendFields []string `json:"-"`
  1447. // NullFields is a list of field names (e.g. "Country") to include in
  1448. // API requests with the JSON null value. By default, fields with empty
  1449. // values are omitted from API requests. However, any field with an
  1450. // empty value appearing in NullFields will be sent to the server as
  1451. // null. It is an error if a field in this list has a non-empty value.
  1452. // This may be used to include null fields in Patch requests.
  1453. NullFields []string `json:"-"`
  1454. }
  1455. func (s *DatafeedStatus) MarshalJSON() ([]byte, error) {
  1456. type NoMethod DatafeedStatus
  1457. raw := NoMethod(*s)
  1458. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1459. }
  1460. // DatafeedStatusError: An error occurring in the feed, like "invalid
  1461. // price".
  1462. type DatafeedStatusError struct {
  1463. // Code: The code of the error, e.g., "validation/invalid_value".
  1464. Code string `json:"code,omitempty"`
  1465. // Count: The number of occurrences of the error in the feed.
  1466. Count uint64 `json:"count,omitempty,string"`
  1467. // Examples: A list of example occurrences of the error, grouped by
  1468. // product.
  1469. Examples []*DatafeedStatusExample `json:"examples,omitempty"`
  1470. // Message: The error message, e.g., "Invalid price".
  1471. Message string `json:"message,omitempty"`
  1472. // ForceSendFields is a list of field names (e.g. "Code") to
  1473. // unconditionally include in API requests. By default, fields with
  1474. // empty values are omitted from API requests. However, any non-pointer,
  1475. // non-interface field appearing in ForceSendFields will be sent to the
  1476. // server regardless of whether the field is empty or not. This may be
  1477. // used to include empty fields in Patch requests.
  1478. ForceSendFields []string `json:"-"`
  1479. // NullFields is a list of field names (e.g. "Code") to include in API
  1480. // requests with the JSON null value. By default, fields with empty
  1481. // values are omitted from API requests. However, any field with an
  1482. // empty value appearing in NullFields will be sent to the server as
  1483. // null. It is an error if a field in this list has a non-empty value.
  1484. // This may be used to include null fields in Patch requests.
  1485. NullFields []string `json:"-"`
  1486. }
  1487. func (s *DatafeedStatusError) MarshalJSON() ([]byte, error) {
  1488. type NoMethod DatafeedStatusError
  1489. raw := NoMethod(*s)
  1490. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1491. }
  1492. // DatafeedStatusExample: An example occurrence for a particular error.
  1493. type DatafeedStatusExample struct {
  1494. // ItemId: The ID of the example item.
  1495. ItemId string `json:"itemId,omitempty"`
  1496. // LineNumber: Line number in the data feed where the example is found.
  1497. LineNumber uint64 `json:"lineNumber,omitempty,string"`
  1498. // Value: The problematic value.
  1499. Value string `json:"value,omitempty"`
  1500. // ForceSendFields is a list of field names (e.g. "ItemId") to
  1501. // unconditionally include in API requests. By default, fields with
  1502. // empty values are omitted from API requests. However, any non-pointer,
  1503. // non-interface field appearing in ForceSendFields will be sent to the
  1504. // server regardless of whether the field is empty or not. This may be
  1505. // used to include empty fields in Patch requests.
  1506. ForceSendFields []string `json:"-"`
  1507. // NullFields is a list of field names (e.g. "ItemId") to include in API
  1508. // requests with the JSON null value. By default, fields with empty
  1509. // values are omitted from API requests. However, any field with an
  1510. // empty value appearing in NullFields will be sent to the server as
  1511. // null. It is an error if a field in this list has a non-empty value.
  1512. // This may be used to include null fields in Patch requests.
  1513. NullFields []string `json:"-"`
  1514. }
  1515. func (s *DatafeedStatusExample) MarshalJSON() ([]byte, error) {
  1516. type NoMethod DatafeedStatusExample
  1517. raw := NoMethod(*s)
  1518. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1519. }
  1520. type DatafeedTarget struct {
  1521. // Country: The country where the items in the feed will be included in
  1522. // the search index, represented as a CLDR territory code.
  1523. Country string `json:"country,omitempty"`
  1524. // ExcludedDestinations: The list of destinations to exclude for this
  1525. // target (corresponds to unchecked check boxes in Merchant Center).
  1526. ExcludedDestinations []string `json:"excludedDestinations,omitempty"`
  1527. // IncludedDestinations: The list of destinations to include for this
  1528. // target (corresponds to checked check boxes in Merchant Center).
  1529. // Default destinations are always included unless provided in the
  1530. // excluded_destination field.
  1531. IncludedDestinations []string `json:"includedDestinations,omitempty"`
  1532. // Language: The two-letter ISO 639-1 language of the items in the feed.
  1533. // Must be a valid language for targets[].country.
  1534. Language string `json:"language,omitempty"`
  1535. // ForceSendFields is a list of field names (e.g. "Country") to
  1536. // unconditionally include in API requests. By default, fields with
  1537. // empty values are omitted from API requests. However, any non-pointer,
  1538. // non-interface field appearing in ForceSendFields will be sent to the
  1539. // server regardless of whether the field is empty or not. This may be
  1540. // used to include empty fields in Patch requests.
  1541. ForceSendFields []string `json:"-"`
  1542. // NullFields is a list of field names (e.g. "Country") to include in
  1543. // API requests with the JSON null value. By default, fields with empty
  1544. // values are omitted from API requests. However, any field with an
  1545. // empty value appearing in NullFields will be sent to the server as
  1546. // null. It is an error if a field in this list has a non-empty value.
  1547. // This may be used to include null fields in Patch requests.
  1548. NullFields []string `json:"-"`
  1549. }
  1550. func (s *DatafeedTarget) MarshalJSON() ([]byte, error) {
  1551. type NoMethod DatafeedTarget
  1552. raw := NoMethod(*s)
  1553. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1554. }
  1555. type DatafeedsCustomBatchRequest struct {
  1556. // Entries: The request entries to be processed in the batch.
  1557. Entries []*DatafeedsCustomBatchRequestEntry `json:"entries,omitempty"`
  1558. // ForceSendFields is a list of field names (e.g. "Entries") to
  1559. // unconditionally include in API requests. By default, fields with
  1560. // empty values are omitted from API requests. However, any non-pointer,
  1561. // non-interface field appearing in ForceSendFields will be sent to the
  1562. // server regardless of whether the field is empty or not. This may be
  1563. // used to include empty fields in Patch requests.
  1564. ForceSendFields []string `json:"-"`
  1565. // NullFields is a list of field names (e.g. "Entries") to include in
  1566. // API requests with the JSON null value. By default, fields with empty
  1567. // values are omitted from API requests. However, any field with an
  1568. // empty value appearing in NullFields will be sent to the server as
  1569. // null. It is an error if a field in this list has a non-empty value.
  1570. // This may be used to include null fields in Patch requests.
  1571. NullFields []string `json:"-"`
  1572. }
  1573. func (s *DatafeedsCustomBatchRequest) MarshalJSON() ([]byte, error) {
  1574. type NoMethod DatafeedsCustomBatchRequest
  1575. raw := NoMethod(*s)
  1576. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1577. }
  1578. // DatafeedsCustomBatchRequestEntry: A batch entry encoding a single
  1579. // non-batch datafeeds request.
  1580. type DatafeedsCustomBatchRequestEntry struct {
  1581. // BatchId: An entry ID, unique within the batch request.
  1582. BatchId int64 `json:"batchId,omitempty"`
  1583. // Datafeed: The data feed to insert.
  1584. Datafeed *Datafeed `json:"datafeed,omitempty"`
  1585. // DatafeedId: The ID of the data feed to get, delete or fetch.
  1586. DatafeedId uint64 `json:"datafeedId,omitempty,string"`
  1587. // MerchantId: The ID of the managing account.
  1588. MerchantId uint64 `json:"merchantId,omitempty,string"`
  1589. Method string `json:"method,omitempty"`
  1590. // ForceSendFields is a list of field names (e.g. "BatchId") to
  1591. // unconditionally include in API requests. By default, fields with
  1592. // empty values are omitted from API requests. However, any non-pointer,
  1593. // non-interface field appearing in ForceSendFields will be sent to the
  1594. // server regardless of whether the field is empty or not. This may be
  1595. // used to include empty fields in Patch requests.
  1596. ForceSendFields []string `json:"-"`
  1597. // NullFields is a list of field names (e.g. "BatchId") to include in
  1598. // API requests with the JSON null value. By default, fields with empty
  1599. // values are omitted from API requests. However, any field with an
  1600. // empty value appearing in NullFields will be sent to the server as
  1601. // null. It is an error if a field in this list has a non-empty value.
  1602. // This may be used to include null fields in Patch requests.
  1603. NullFields []string `json:"-"`
  1604. }
  1605. func (s *DatafeedsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  1606. type NoMethod DatafeedsCustomBatchRequestEntry
  1607. raw := NoMethod(*s)
  1608. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1609. }
  1610. type DatafeedsCustomBatchResponse struct {
  1611. // Entries: The result of the execution of the batch requests.
  1612. Entries []*DatafeedsCustomBatchResponseEntry `json:"entries,omitempty"`
  1613. // Kind: Identifies what kind of resource this is. Value: the fixed
  1614. // string "content#datafeedsCustomBatchResponse".
  1615. Kind string `json:"kind,omitempty"`
  1616. // ServerResponse contains the HTTP response code and headers from the
  1617. // server.
  1618. googleapi.ServerResponse `json:"-"`
  1619. // ForceSendFields is a list of field names (e.g. "Entries") to
  1620. // unconditionally include in API requests. By default, fields with
  1621. // empty values are omitted from API requests. However, any non-pointer,
  1622. // non-interface field appearing in ForceSendFields will be sent to the
  1623. // server regardless of whether the field is empty or not. This may be
  1624. // used to include empty fields in Patch requests.
  1625. ForceSendFields []string `json:"-"`
  1626. // NullFields is a list of field names (e.g. "Entries") to include in
  1627. // API requests with the JSON null value. By default, fields with empty
  1628. // values are omitted from API requests. However, any field with an
  1629. // empty value appearing in NullFields will be sent to the server as
  1630. // null. It is an error if a field in this list has a non-empty value.
  1631. // This may be used to include null fields in Patch requests.
  1632. NullFields []string `json:"-"`
  1633. }
  1634. func (s *DatafeedsCustomBatchResponse) MarshalJSON() ([]byte, error) {
  1635. type NoMethod DatafeedsCustomBatchResponse
  1636. raw := NoMethod(*s)
  1637. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1638. }
  1639. // DatafeedsCustomBatchResponseEntry: A batch entry encoding a single
  1640. // non-batch datafeeds response.
  1641. type DatafeedsCustomBatchResponseEntry struct {
  1642. // BatchId: The ID of the request entry this entry responds to.
  1643. BatchId int64 `json:"batchId,omitempty"`
  1644. // Datafeed: The requested data feed. Defined if and only if the request
  1645. // was successful.
  1646. Datafeed *Datafeed `json:"datafeed,omitempty"`
  1647. // Errors: A list of errors defined if and only if the request failed.
  1648. Errors *Errors `json:"errors,omitempty"`
  1649. // ForceSendFields is a list of field names (e.g. "BatchId") to
  1650. // unconditionally include in API requests. By default, fields with
  1651. // empty values are omitted from API requests. However, any non-pointer,
  1652. // non-interface field appearing in ForceSendFields will be sent to the
  1653. // server regardless of whether the field is empty or not. This may be
  1654. // used to include empty fields in Patch requests.
  1655. ForceSendFields []string `json:"-"`
  1656. // NullFields is a list of field names (e.g. "BatchId") to include in
  1657. // API requests with the JSON null value. By default, fields with empty
  1658. // values are omitted from API requests. However, any field with an
  1659. // empty value appearing in NullFields will be sent to the server as
  1660. // null. It is an error if a field in this list has a non-empty value.
  1661. // This may be used to include null fields in Patch requests.
  1662. NullFields []string `json:"-"`
  1663. }
  1664. func (s *DatafeedsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  1665. type NoMethod DatafeedsCustomBatchResponseEntry
  1666. raw := NoMethod(*s)
  1667. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1668. }
  1669. type DatafeedsFetchNowResponse struct {
  1670. // Kind: Identifies what kind of resource this is. Value: the fixed
  1671. // string "content#datafeedsFetchNowResponse".
  1672. Kind string `json:"kind,omitempty"`
  1673. // ServerResponse contains the HTTP response code and headers from the
  1674. // server.
  1675. googleapi.ServerResponse `json:"-"`
  1676. // ForceSendFields is a list of field names (e.g. "Kind") to
  1677. // unconditionally include in API requests. By default, fields with
  1678. // empty values are omitted from API requests. However, any non-pointer,
  1679. // non-interface field appearing in ForceSendFields will be sent to the
  1680. // server regardless of whether the field is empty or not. This may be
  1681. // used to include empty fields in Patch requests.
  1682. ForceSendFields []string `json:"-"`
  1683. // NullFields is a list of field names (e.g. "Kind") to include in API
  1684. // requests with the JSON null value. By default, fields with empty
  1685. // values are omitted from API requests. However, any field with an
  1686. // empty value appearing in NullFields will be sent to the server as
  1687. // null. It is an error if a field in this list has a non-empty value.
  1688. // This may be used to include null fields in Patch requests.
  1689. NullFields []string `json:"-"`
  1690. }
  1691. func (s *DatafeedsFetchNowResponse) MarshalJSON() ([]byte, error) {
  1692. type NoMethod DatafeedsFetchNowResponse
  1693. raw := NoMethod(*s)
  1694. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1695. }
  1696. type DatafeedsListResponse struct {
  1697. // Kind: Identifies what kind of resource this is. Value: the fixed
  1698. // string "content#datafeedsListResponse".
  1699. Kind string `json:"kind,omitempty"`
  1700. // NextPageToken: The token for the retrieval of the next page of
  1701. // datafeeds.
  1702. NextPageToken string `json:"nextPageToken,omitempty"`
  1703. Resources []*Datafeed `json:"resources,omitempty"`
  1704. // ServerResponse contains the HTTP response code and headers from the
  1705. // server.
  1706. googleapi.ServerResponse `json:"-"`
  1707. // ForceSendFields is a list of field names (e.g. "Kind") to
  1708. // unconditionally include in API requests. By default, fields with
  1709. // empty values are omitted from API requests. However, any non-pointer,
  1710. // non-interface field appearing in ForceSendFields will be sent to the
  1711. // server regardless of whether the field is empty or not. This may be
  1712. // used to include empty fields in Patch requests.
  1713. ForceSendFields []string `json:"-"`
  1714. // NullFields is a list of field names (e.g. "Kind") to include in API
  1715. // requests with the JSON null value. By default, fields with empty
  1716. // values are omitted from API requests. However, any field with an
  1717. // empty value appearing in NullFields will be sent to the server as
  1718. // null. It is an error if a field in this list has a non-empty value.
  1719. // This may be used to include null fields in Patch requests.
  1720. NullFields []string `json:"-"`
  1721. }
  1722. func (s *DatafeedsListResponse) MarshalJSON() ([]byte, error) {
  1723. type NoMethod DatafeedsListResponse
  1724. raw := NoMethod(*s)
  1725. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1726. }
  1727. type DatafeedstatusesCustomBatchRequest struct {
  1728. // Entries: The request entries to be processed in the batch.
  1729. Entries []*DatafeedstatusesCustomBatchRequestEntry `json:"entries,omitempty"`
  1730. // ForceSendFields is a list of field names (e.g. "Entries") to
  1731. // unconditionally include in API requests. By default, fields with
  1732. // empty values are omitted from API requests. However, any non-pointer,
  1733. // non-interface field appearing in ForceSendFields will be sent to the
  1734. // server regardless of whether the field is empty or not. This may be
  1735. // used to include empty fields in Patch requests.
  1736. ForceSendFields []string `json:"-"`
  1737. // NullFields is a list of field names (e.g. "Entries") to include in
  1738. // API requests with the JSON null value. By default, fields with empty
  1739. // values are omitted from API requests. However, any field with an
  1740. // empty value appearing in NullFields will be sent to the server as
  1741. // null. It is an error if a field in this list has a non-empty value.
  1742. // This may be used to include null fields in Patch requests.
  1743. NullFields []string `json:"-"`
  1744. }
  1745. func (s *DatafeedstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) {
  1746. type NoMethod DatafeedstatusesCustomBatchRequest
  1747. raw := NoMethod(*s)
  1748. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1749. }
  1750. // DatafeedstatusesCustomBatchRequestEntry: A batch entry encoding a
  1751. // single non-batch datafeedstatuses request.
  1752. type DatafeedstatusesCustomBatchRequestEntry struct {
  1753. // BatchId: An entry ID, unique within the batch request.
  1754. BatchId int64 `json:"batchId,omitempty"`
  1755. // Country: The country for which to get the datafeed status. If this
  1756. // parameter is provided then language must also be provided. Note that
  1757. // for multi-target datafeeds this parameter is required.
  1758. Country string `json:"country,omitempty"`
  1759. // DatafeedId: The ID of the data feed to get.
  1760. DatafeedId uint64 `json:"datafeedId,omitempty,string"`
  1761. // Language: The language for which to get the datafeed status. If this
  1762. // parameter is provided then country must also be provided. Note that
  1763. // for multi-target datafeeds this parameter is required.
  1764. Language string `json:"language,omitempty"`
  1765. // MerchantId: The ID of the managing account.
  1766. MerchantId uint64 `json:"merchantId,omitempty,string"`
  1767. Method string `json:"method,omitempty"`
  1768. // ForceSendFields is a list of field names (e.g. "BatchId") to
  1769. // unconditionally include in API requests. By default, fields with
  1770. // empty values are omitted from API requests. However, any non-pointer,
  1771. // non-interface field appearing in ForceSendFields will be sent to the
  1772. // server regardless of whether the field is empty or not. This may be
  1773. // used to include empty fields in Patch requests.
  1774. ForceSendFields []string `json:"-"`
  1775. // NullFields is a list of field names (e.g. "BatchId") to include in
  1776. // API requests with the JSON null value. By default, fields with empty
  1777. // values are omitted from API requests. However, any field with an
  1778. // empty value appearing in NullFields will be sent to the server as
  1779. // null. It is an error if a field in this list has a non-empty value.
  1780. // This may be used to include null fields in Patch requests.
  1781. NullFields []string `json:"-"`
  1782. }
  1783. func (s *DatafeedstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  1784. type NoMethod DatafeedstatusesCustomBatchRequestEntry
  1785. raw := NoMethod(*s)
  1786. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1787. }
  1788. type DatafeedstatusesCustomBatchResponse struct {
  1789. // Entries: The result of the execution of the batch requests.
  1790. Entries []*DatafeedstatusesCustomBatchResponseEntry `json:"entries,omitempty"`
  1791. // Kind: Identifies what kind of resource this is. Value: the fixed
  1792. // string "content#datafeedstatusesCustomBatchResponse".
  1793. Kind string `json:"kind,omitempty"`
  1794. // ServerResponse contains the HTTP response code and headers from the
  1795. // server.
  1796. googleapi.ServerResponse `json:"-"`
  1797. // ForceSendFields is a list of field names (e.g. "Entries") to
  1798. // unconditionally include in API requests. By default, fields with
  1799. // empty values are omitted from API requests. However, any non-pointer,
  1800. // non-interface field appearing in ForceSendFields will be sent to the
  1801. // server regardless of whether the field is empty or not. This may be
  1802. // used to include empty fields in Patch requests.
  1803. ForceSendFields []string `json:"-"`
  1804. // NullFields is a list of field names (e.g. "Entries") to include in
  1805. // API requests with the JSON null value. By default, fields with empty
  1806. // values are omitted from API requests. However, any field with an
  1807. // empty value appearing in NullFields will be sent to the server as
  1808. // null. It is an error if a field in this list has a non-empty value.
  1809. // This may be used to include null fields in Patch requests.
  1810. NullFields []string `json:"-"`
  1811. }
  1812. func (s *DatafeedstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) {
  1813. type NoMethod DatafeedstatusesCustomBatchResponse
  1814. raw := NoMethod(*s)
  1815. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1816. }
  1817. // DatafeedstatusesCustomBatchResponseEntry: A batch entry encoding a
  1818. // single non-batch datafeedstatuses response.
  1819. type DatafeedstatusesCustomBatchResponseEntry struct {
  1820. // BatchId: The ID of the request entry this entry responds to.
  1821. BatchId int64 `json:"batchId,omitempty"`
  1822. // DatafeedStatus: The requested data feed status. Defined if and only
  1823. // if the request was successful.
  1824. DatafeedStatus *DatafeedStatus `json:"datafeedStatus,omitempty"`
  1825. // Errors: A list of errors defined if and only if the request failed.
  1826. Errors *Errors `json:"errors,omitempty"`
  1827. // ForceSendFields is a list of field names (e.g. "BatchId") to
  1828. // unconditionally include in API requests. By default, fields with
  1829. // empty values are omitted from API requests. However, any non-pointer,
  1830. // non-interface field appearing in ForceSendFields will be sent to the
  1831. // server regardless of whether the field is empty or not. This may be
  1832. // used to include empty fields in Patch requests.
  1833. ForceSendFields []string `json:"-"`
  1834. // NullFields is a list of field names (e.g. "BatchId") to include in
  1835. // API requests with the JSON null value. By default, fields with empty
  1836. // values are omitted from API requests. However, any field with an
  1837. // empty value appearing in NullFields will be sent to the server as
  1838. // null. It is an error if a field in this list has a non-empty value.
  1839. // This may be used to include null fields in Patch requests.
  1840. NullFields []string `json:"-"`
  1841. }
  1842. func (s *DatafeedstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  1843. type NoMethod DatafeedstatusesCustomBatchResponseEntry
  1844. raw := NoMethod(*s)
  1845. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1846. }
  1847. type DatafeedstatusesListResponse struct {
  1848. // Kind: Identifies what kind of resource this is. Value: the fixed
  1849. // string "content#datafeedstatusesListResponse".
  1850. Kind string `json:"kind,omitempty"`
  1851. // NextPageToken: The token for the retrieval of the next page of
  1852. // datafeed statuses.
  1853. NextPageToken string `json:"nextPageToken,omitempty"`
  1854. Resources []*DatafeedStatus `json:"resources,omitempty"`
  1855. // ServerResponse contains the HTTP response code and headers from the
  1856. // server.
  1857. googleapi.ServerResponse `json:"-"`
  1858. // ForceSendFields is a list of field names (e.g. "Kind") to
  1859. // unconditionally include in API requests. By default, fields with
  1860. // empty values are omitted from API requests. However, any non-pointer,
  1861. // non-interface field appearing in ForceSendFields will be sent to the
  1862. // server regardless of whether the field is empty or not. This may be
  1863. // used to include empty fields in Patch requests.
  1864. ForceSendFields []string `json:"-"`
  1865. // NullFields is a list of field names (e.g. "Kind") to include in API
  1866. // requests with the JSON null value. By default, fields with empty
  1867. // values are omitted from API requests. However, any field with an
  1868. // empty value appearing in NullFields will be sent to the server as
  1869. // null. It is an error if a field in this list has a non-empty value.
  1870. // This may be used to include null fields in Patch requests.
  1871. NullFields []string `json:"-"`
  1872. }
  1873. func (s *DatafeedstatusesListResponse) MarshalJSON() ([]byte, error) {
  1874. type NoMethod DatafeedstatusesListResponse
  1875. raw := NoMethod(*s)
  1876. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1877. }
  1878. type DeliveryTime struct {
  1879. // CutoffTime: Business days cutoff time definition. If not configured
  1880. // the cutoff time will be defaulted to 8AM PST.
  1881. CutoffTime *CutoffTime `json:"cutoffTime,omitempty"`
  1882. // HolidayCutoffs: Holiday cutoff definitions. If configured, they
  1883. // specify order cutoff times for holiday-specific shipping.
  1884. HolidayCutoffs []*HolidayCutoff `json:"holidayCutoffs,omitempty"`
  1885. // MaxHandlingTimeInDays: Maximum number of business days spent before
  1886. // an order is shipped. 0 means same day shipped, 1 means next day
  1887. // shipped. Must be greater than or equal to minHandlingTimeInDays.
  1888. MaxHandlingTimeInDays int64 `json:"maxHandlingTimeInDays,omitempty"`
  1889. // MaxTransitTimeInDays: Maximum number of business days that is spent
  1890. // in transit. 0 means same day delivery, 1 means next day delivery.
  1891. // Must be greater than or equal to minTransitTimeInDays. Required.
  1892. MaxTransitTimeInDays int64 `json:"maxTransitTimeInDays,omitempty"`
  1893. // MinHandlingTimeInDays: Minimum number of business days spent before
  1894. // an order is shipped. 0 means same day shipped, 1 means next day
  1895. // shipped.
  1896. MinHandlingTimeInDays int64 `json:"minHandlingTimeInDays,omitempty"`
  1897. // MinTransitTimeInDays: Minimum number of business days that is spent
  1898. // in transit. 0 means same day delivery, 1 means next day delivery.
  1899. // Required.
  1900. MinTransitTimeInDays int64 `json:"minTransitTimeInDays,omitempty"`
  1901. // ForceSendFields is a list of field names (e.g. "CutoffTime") to
  1902. // unconditionally include in API requests. By default, fields with
  1903. // empty values are omitted from API requests. However, any non-pointer,
  1904. // non-interface field appearing in ForceSendFields will be sent to the
  1905. // server regardless of whether the field is empty or not. This may be
  1906. // used to include empty fields in Patch requests.
  1907. ForceSendFields []string `json:"-"`
  1908. // NullFields is a list of field names (e.g. "CutoffTime") to include in
  1909. // API requests with the JSON null value. By default, fields with empty
  1910. // values are omitted from API requests. However, any field with an
  1911. // empty value appearing in NullFields will be sent to the server as
  1912. // null. It is an error if a field in this list has a non-empty value.
  1913. // This may be used to include null fields in Patch requests.
  1914. NullFields []string `json:"-"`
  1915. }
  1916. func (s *DeliveryTime) MarshalJSON() ([]byte, error) {
  1917. type NoMethod DeliveryTime
  1918. raw := NoMethod(*s)
  1919. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1920. }
  1921. // Error: An error returned by the API.
  1922. type Error struct {
  1923. // Domain: The domain of the error.
  1924. Domain string `json:"domain,omitempty"`
  1925. // Message: A description of the error.
  1926. Message string `json:"message,omitempty"`
  1927. // Reason: The error code.
  1928. Reason string `json:"reason,omitempty"`
  1929. // ForceSendFields is a list of field names (e.g. "Domain") to
  1930. // unconditionally include in API requests. By default, fields with
  1931. // empty values are omitted from API requests. However, any non-pointer,
  1932. // non-interface field appearing in ForceSendFields will be sent to the
  1933. // server regardless of whether the field is empty or not. This may be
  1934. // used to include empty fields in Patch requests.
  1935. ForceSendFields []string `json:"-"`
  1936. // NullFields is a list of field names (e.g. "Domain") to include in API
  1937. // requests with the JSON null value. By default, fields with empty
  1938. // values are omitted from API requests. However, any field with an
  1939. // empty value appearing in NullFields will be sent to the server as
  1940. // null. It is an error if a field in this list has a non-empty value.
  1941. // This may be used to include null fields in Patch requests.
  1942. NullFields []string `json:"-"`
  1943. }
  1944. func (s *Error) MarshalJSON() ([]byte, error) {
  1945. type NoMethod Error
  1946. raw := NoMethod(*s)
  1947. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1948. }
  1949. // Errors: A list of errors returned by a failed batch entry.
  1950. type Errors struct {
  1951. // Code: The HTTP status of the first error in errors.
  1952. Code int64 `json:"code,omitempty"`
  1953. // Errors: A list of errors.
  1954. Errors []*Error `json:"errors,omitempty"`
  1955. // Message: The message of the first error in errors.
  1956. Message string `json:"message,omitempty"`
  1957. // ForceSendFields is a list of field names (e.g. "Code") to
  1958. // unconditionally include in API requests. By default, fields with
  1959. // empty values are omitted from API requests. However, any non-pointer,
  1960. // non-interface field appearing in ForceSendFields will be sent to the
  1961. // server regardless of whether the field is empty or not. This may be
  1962. // used to include empty fields in Patch requests.
  1963. ForceSendFields []string `json:"-"`
  1964. // NullFields is a list of field names (e.g. "Code") to include in API
  1965. // requests with the JSON null value. By default, fields with empty
  1966. // values are omitted from API requests. However, any field with an
  1967. // empty value appearing in NullFields will be sent to the server as
  1968. // null. It is an error if a field in this list has a non-empty value.
  1969. // This may be used to include null fields in Patch requests.
  1970. NullFields []string `json:"-"`
  1971. }
  1972. func (s *Errors) MarshalJSON() ([]byte, error) {
  1973. type NoMethod Errors
  1974. raw := NoMethod(*s)
  1975. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  1976. }
  1977. type GmbAccounts struct {
  1978. // AccountId: The ID of the account.
  1979. AccountId uint64 `json:"accountId,omitempty,string"`
  1980. // GmbAccounts: A list of GMB accounts which are available to the
  1981. // merchant.
  1982. GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"`
  1983. // ForceSendFields is a list of field names (e.g. "AccountId") to
  1984. // unconditionally include in API requests. By default, fields with
  1985. // empty values are omitted from API requests. However, any non-pointer,
  1986. // non-interface field appearing in ForceSendFields will be sent to the
  1987. // server regardless of whether the field is empty or not. This may be
  1988. // used to include empty fields in Patch requests.
  1989. ForceSendFields []string `json:"-"`
  1990. // NullFields is a list of field names (e.g. "AccountId") to include in
  1991. // API requests with the JSON null value. By default, fields with empty
  1992. // values are omitted from API requests. However, any field with an
  1993. // empty value appearing in NullFields will be sent to the server as
  1994. // null. It is an error if a field in this list has a non-empty value.
  1995. // This may be used to include null fields in Patch requests.
  1996. NullFields []string `json:"-"`
  1997. }
  1998. func (s *GmbAccounts) MarshalJSON() ([]byte, error) {
  1999. type NoMethod GmbAccounts
  2000. raw := NoMethod(*s)
  2001. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2002. }
  2003. type GmbAccountsGmbAccount struct {
  2004. // Email: The email which identifies the GMB account.
  2005. Email string `json:"email,omitempty"`
  2006. // ListingCount: Number of listings under this account.
  2007. ListingCount uint64 `json:"listingCount,omitempty,string"`
  2008. // Name: The name of the GMB account.
  2009. Name string `json:"name,omitempty"`
  2010. // Type: The type of the GMB account (User or Business).
  2011. Type string `json:"type,omitempty"`
  2012. // ForceSendFields is a list of field names (e.g. "Email") to
  2013. // unconditionally include in API requests. By default, fields with
  2014. // empty values are omitted from API requests. However, any non-pointer,
  2015. // non-interface field appearing in ForceSendFields will be sent to the
  2016. // server regardless of whether the field is empty or not. This may be
  2017. // used to include empty fields in Patch requests.
  2018. ForceSendFields []string `json:"-"`
  2019. // NullFields is a list of field names (e.g. "Email") to include in API
  2020. // requests with the JSON null value. By default, fields with empty
  2021. // values are omitted from API requests. However, any field with an
  2022. // empty value appearing in NullFields will be sent to the server as
  2023. // null. It is an error if a field in this list has a non-empty value.
  2024. // This may be used to include null fields in Patch requests.
  2025. NullFields []string `json:"-"`
  2026. }
  2027. func (s *GmbAccountsGmbAccount) MarshalJSON() ([]byte, error) {
  2028. type NoMethod GmbAccountsGmbAccount
  2029. raw := NoMethod(*s)
  2030. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2031. }
  2032. // Headers: A non-empty list of row or column headers for a table.
  2033. // Exactly one of prices, weights, numItems, postalCodeGroupNames, or
  2034. // locations must be set.
  2035. type Headers struct {
  2036. // Locations: A list of location ID sets. Must be non-empty. Can only be
  2037. // set if all other fields are not set.
  2038. Locations []*LocationIdSet `json:"locations,omitempty"`
  2039. // NumberOfItems: A list of inclusive number of items upper bounds. The
  2040. // last value can be "infinity". For example ["10", "50", "infinity"]
  2041. // represents the headers "<= 10 items", " 50 items". Must be non-empty.
  2042. // Can only be set if all other fields are not set.
  2043. NumberOfItems []string `json:"numberOfItems,omitempty"`
  2044. // PostalCodeGroupNames: A list of postal group names. The last value
  2045. // can be "all other locations". Example: ["zone 1", "zone 2", "all
  2046. // other locations"]. The referred postal code groups must match the
  2047. // delivery country of the service. Must be non-empty. Can only be set
  2048. // if all other fields are not set.
  2049. PostalCodeGroupNames []string `json:"postalCodeGroupNames,omitempty"`
  2050. // Prices: A list of inclusive order price upper bounds. The last
  2051. // price's value can be "infinity". For example [{"value": "10",
  2052. // "currency": "USD"}, {"value": "500", "currency": "USD"}, {"value":
  2053. // "infinity", "currency": "USD"}] represents the headers "<= $10", "
  2054. // $500". All prices within a service must have the same currency. Must
  2055. // be non-empty. Can only be set if all other fields are not set.
  2056. Prices []*Price `json:"prices,omitempty"`
  2057. // Weights: A list of inclusive order weight upper bounds. The last
  2058. // weight's value can be "infinity". For example [{"value": "10",
  2059. // "unit": "kg"}, {"value": "50", "unit": "kg"}, {"value": "infinity",
  2060. // "unit": "kg"}] represents the headers "<= 10kg", " 50kg". All weights
  2061. // within a service must have the same unit. Must be non-empty. Can only
  2062. // be set if all other fields are not set.
  2063. Weights []*Weight `json:"weights,omitempty"`
  2064. // ForceSendFields is a list of field names (e.g. "Locations") to
  2065. // unconditionally include in API requests. By default, fields with
  2066. // empty values are omitted from API requests. However, any non-pointer,
  2067. // non-interface field appearing in ForceSendFields will be sent to the
  2068. // server regardless of whether the field is empty or not. This may be
  2069. // used to include empty fields in Patch requests.
  2070. ForceSendFields []string `json:"-"`
  2071. // NullFields is a list of field names (e.g. "Locations") to include in
  2072. // API requests with the JSON null value. By default, fields with empty
  2073. // values are omitted from API requests. However, any field with an
  2074. // empty value appearing in NullFields will be sent to the server as
  2075. // null. It is an error if a field in this list has a non-empty value.
  2076. // This may be used to include null fields in Patch requests.
  2077. NullFields []string `json:"-"`
  2078. }
  2079. func (s *Headers) MarshalJSON() ([]byte, error) {
  2080. type NoMethod Headers
  2081. raw := NoMethod(*s)
  2082. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2083. }
  2084. type HolidayCutoff struct {
  2085. // DeadlineDate: Date of the order deadline, in ISO 8601 format. E.g.
  2086. // "2016-11-29" for 29th November 2016. Required.
  2087. DeadlineDate string `json:"deadlineDate,omitempty"`
  2088. // DeadlineHour: Hour of the day on the deadline date until which the
  2089. // order has to be placed to qualify for the delivery guarantee.
  2090. // Possible values are: 0 (midnight), 1, ..., 12 (noon), 13, ..., 23.
  2091. // Required.
  2092. DeadlineHour int64 `json:"deadlineHour,omitempty"`
  2093. // DeadlineTimezone: Timezone identifier for the deadline hour. A list
  2094. // of identifiers can be found in the AdWords API documentation. E.g.
  2095. // "Europe/Zurich". Required.
  2096. DeadlineTimezone string `json:"deadlineTimezone,omitempty"`
  2097. // HolidayId: Unique identifier for the holiday. Required.
  2098. HolidayId string `json:"holidayId,omitempty"`
  2099. // VisibleFromDate: Date on which the deadline will become visible to
  2100. // consumers in ISO 8601 format. E.g. "2016-10-31" for 31st October
  2101. // 2016. Required.
  2102. VisibleFromDate string `json:"visibleFromDate,omitempty"`
  2103. // ForceSendFields is a list of field names (e.g. "DeadlineDate") to
  2104. // unconditionally include in API requests. By default, fields with
  2105. // empty values are omitted from API requests. However, any non-pointer,
  2106. // non-interface field appearing in ForceSendFields will be sent to the
  2107. // server regardless of whether the field is empty or not. This may be
  2108. // used to include empty fields in Patch requests.
  2109. ForceSendFields []string `json:"-"`
  2110. // NullFields is a list of field names (e.g. "DeadlineDate") to include
  2111. // in API requests with the JSON null value. By default, fields with
  2112. // empty values are omitted from API requests. However, any field with
  2113. // an empty value appearing in NullFields will be sent to the server as
  2114. // null. It is an error if a field in this list has a non-empty value.
  2115. // This may be used to include null fields in Patch requests.
  2116. NullFields []string `json:"-"`
  2117. }
  2118. func (s *HolidayCutoff) MarshalJSON() ([]byte, error) {
  2119. type NoMethod HolidayCutoff
  2120. raw := NoMethod(*s)
  2121. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2122. }
  2123. type HolidaysHoliday struct {
  2124. // CountryCode: The CLDR territory code of the country in which the
  2125. // holiday is available. E.g. "US", "DE", "GB". A holiday cutoff can
  2126. // only be configured in a shipping settings service with matching
  2127. // delivery country. Always present.
  2128. CountryCode string `json:"countryCode,omitempty"`
  2129. // Date: Date of the holiday, in ISO 8601 format. E.g. "2016-12-25" for
  2130. // Christmas 2016. Always present.
  2131. Date string `json:"date,omitempty"`
  2132. // DeliveryGuaranteeDate: Date on which the order has to arrive at the
  2133. // customer's, in ISO 8601 format. E.g. "2016-12-24" for 24th December
  2134. // 2016. Always present.
  2135. DeliveryGuaranteeDate string `json:"deliveryGuaranteeDate,omitempty"`
  2136. // DeliveryGuaranteeHour: Hour of the day in the delivery location's
  2137. // timezone on the guaranteed delivery date by which the order has to
  2138. // arrive at the customer's. Possible values are: 0 (midnight), 1, ...,
  2139. // 12 (noon), 13, ..., 23. Always present.
  2140. DeliveryGuaranteeHour uint64 `json:"deliveryGuaranteeHour,omitempty,string"`
  2141. // Id: Unique identifier for the holiday to be used when configuring
  2142. // holiday cutoffs. Always present.
  2143. Id string `json:"id,omitempty"`
  2144. // Type: The holiday type. Always present.
  2145. Type string `json:"type,omitempty"`
  2146. // ForceSendFields is a list of field names (e.g. "CountryCode") to
  2147. // unconditionally include in API requests. By default, fields with
  2148. // empty values are omitted from API requests. However, any non-pointer,
  2149. // non-interface field appearing in ForceSendFields will be sent to the
  2150. // server regardless of whether the field is empty or not. This may be
  2151. // used to include empty fields in Patch requests.
  2152. ForceSendFields []string `json:"-"`
  2153. // NullFields is a list of field names (e.g. "CountryCode") to include
  2154. // in API requests with the JSON null value. By default, fields with
  2155. // empty values are omitted from API requests. However, any field with
  2156. // an empty value appearing in NullFields will be sent to the server as
  2157. // null. It is an error if a field in this list has a non-empty value.
  2158. // This may be used to include null fields in Patch requests.
  2159. NullFields []string `json:"-"`
  2160. }
  2161. func (s *HolidaysHoliday) MarshalJSON() ([]byte, error) {
  2162. type NoMethod HolidaysHoliday
  2163. raw := NoMethod(*s)
  2164. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2165. }
  2166. type Installment struct {
  2167. // Amount: The amount the buyer has to pay per month.
  2168. Amount *Price `json:"amount,omitempty"`
  2169. // Months: The number of installments the buyer has to pay.
  2170. Months int64 `json:"months,omitempty,string"`
  2171. // ForceSendFields is a list of field names (e.g. "Amount") to
  2172. // unconditionally include in API requests. By default, fields with
  2173. // empty values are omitted from API requests. However, any non-pointer,
  2174. // non-interface field appearing in ForceSendFields will be sent to the
  2175. // server regardless of whether the field is empty or not. This may be
  2176. // used to include empty fields in Patch requests.
  2177. ForceSendFields []string `json:"-"`
  2178. // NullFields is a list of field names (e.g. "Amount") to include in API
  2179. // requests with the JSON null value. By default, fields with empty
  2180. // values are omitted from API requests. However, any field with an
  2181. // empty value appearing in NullFields will be sent to the server as
  2182. // null. It is an error if a field in this list has a non-empty value.
  2183. // This may be used to include null fields in Patch requests.
  2184. NullFields []string `json:"-"`
  2185. }
  2186. func (s *Installment) MarshalJSON() ([]byte, error) {
  2187. type NoMethod Installment
  2188. raw := NoMethod(*s)
  2189. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2190. }
  2191. type Inventory struct {
  2192. // Availability: The availability of the product.
  2193. Availability string `json:"availability,omitempty"`
  2194. // Installment: Number and amount of installments to pay for an item.
  2195. // Brazil only.
  2196. Installment *Installment `json:"installment,omitempty"`
  2197. // Kind: Identifies what kind of resource this is. Value: the fixed
  2198. // string "content#inventory".
  2199. Kind string `json:"kind,omitempty"`
  2200. // LoyaltyPoints: Loyalty points that users receive after purchasing the
  2201. // item. Japan only.
  2202. LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"`
  2203. // Pickup: Store pickup information. Only supported for local inventory.
  2204. // Not setting pickup means "don't update" while setting it to the empty
  2205. // value ({} in JSON) means "delete". Otherwise, pickupMethod and
  2206. // pickupSla must be set together, unless pickupMethod is "not
  2207. // supported".
  2208. Pickup *InventoryPickup `json:"pickup,omitempty"`
  2209. // Price: The price of the product.
  2210. Price *Price `json:"price,omitempty"`
  2211. // Quantity: The quantity of the product. Must be equal to or greater
  2212. // than zero. Supported only for local products.
  2213. Quantity int64 `json:"quantity,omitempty"`
  2214. // SalePrice: The sale price of the product. Mandatory if
  2215. // sale_price_effective_date is defined.
  2216. SalePrice *Price `json:"salePrice,omitempty"`
  2217. // SalePriceEffectiveDate: A date range represented by a pair of ISO
  2218. // 8601 dates separated by a space, comma, or slash. Both dates might be
  2219. // specified as 'null' if undecided.
  2220. SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"`
  2221. // SellOnGoogleQuantity: The quantity of the product that is reserved
  2222. // for sell-on-google ads. Supported only for online products.
  2223. SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"`
  2224. // ForceSendFields is a list of field names (e.g. "Availability") to
  2225. // unconditionally include in API requests. By default, fields with
  2226. // empty values are omitted from API requests. However, any non-pointer,
  2227. // non-interface field appearing in ForceSendFields will be sent to the
  2228. // server regardless of whether the field is empty or not. This may be
  2229. // used to include empty fields in Patch requests.
  2230. ForceSendFields []string `json:"-"`
  2231. // NullFields is a list of field names (e.g. "Availability") to include
  2232. // in API requests with the JSON null value. By default, fields with
  2233. // empty values are omitted from API requests. However, any field with
  2234. // an empty value appearing in NullFields will be sent to the server as
  2235. // null. It is an error if a field in this list has a non-empty value.
  2236. // This may be used to include null fields in Patch requests.
  2237. NullFields []string `json:"-"`
  2238. }
  2239. func (s *Inventory) MarshalJSON() ([]byte, error) {
  2240. type NoMethod Inventory
  2241. raw := NoMethod(*s)
  2242. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2243. }
  2244. type InventoryCustomBatchRequest struct {
  2245. // Entries: The request entries to be processed in the batch.
  2246. Entries []*InventoryCustomBatchRequestEntry `json:"entries,omitempty"`
  2247. // ForceSendFields is a list of field names (e.g. "Entries") to
  2248. // unconditionally include in API requests. By default, fields with
  2249. // empty values are omitted from API requests. However, any non-pointer,
  2250. // non-interface field appearing in ForceSendFields will be sent to the
  2251. // server regardless of whether the field is empty or not. This may be
  2252. // used to include empty fields in Patch requests.
  2253. ForceSendFields []string `json:"-"`
  2254. // NullFields is a list of field names (e.g. "Entries") to include in
  2255. // API requests with the JSON null value. By default, fields with empty
  2256. // values are omitted from API requests. However, any field with an
  2257. // empty value appearing in NullFields will be sent to the server as
  2258. // null. It is an error if a field in this list has a non-empty value.
  2259. // This may be used to include null fields in Patch requests.
  2260. NullFields []string `json:"-"`
  2261. }
  2262. func (s *InventoryCustomBatchRequest) MarshalJSON() ([]byte, error) {
  2263. type NoMethod InventoryCustomBatchRequest
  2264. raw := NoMethod(*s)
  2265. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2266. }
  2267. // InventoryCustomBatchRequestEntry: A batch entry encoding a single
  2268. // non-batch inventory request.
  2269. type InventoryCustomBatchRequestEntry struct {
  2270. // BatchId: An entry ID, unique within the batch request.
  2271. BatchId int64 `json:"batchId,omitempty"`
  2272. // Inventory: Price and availability of the product.
  2273. Inventory *Inventory `json:"inventory,omitempty"`
  2274. // MerchantId: The ID of the managing account.
  2275. MerchantId uint64 `json:"merchantId,omitempty,string"`
  2276. // ProductId: The ID of the product for which to update price and
  2277. // availability.
  2278. ProductId string `json:"productId,omitempty"`
  2279. // StoreCode: The code of the store for which to update price and
  2280. // availability. Use online to update price and availability of an
  2281. // online product.
  2282. StoreCode string `json:"storeCode,omitempty"`
  2283. // ForceSendFields is a list of field names (e.g. "BatchId") to
  2284. // unconditionally include in API requests. By default, fields with
  2285. // empty values are omitted from API requests. However, any non-pointer,
  2286. // non-interface field appearing in ForceSendFields will be sent to the
  2287. // server regardless of whether the field is empty or not. This may be
  2288. // used to include empty fields in Patch requests.
  2289. ForceSendFields []string `json:"-"`
  2290. // NullFields is a list of field names (e.g. "BatchId") to include in
  2291. // API requests with the JSON null value. By default, fields with empty
  2292. // values are omitted from API requests. However, any field with an
  2293. // empty value appearing in NullFields will be sent to the server as
  2294. // null. It is an error if a field in this list has a non-empty value.
  2295. // This may be used to include null fields in Patch requests.
  2296. NullFields []string `json:"-"`
  2297. }
  2298. func (s *InventoryCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  2299. type NoMethod InventoryCustomBatchRequestEntry
  2300. raw := NoMethod(*s)
  2301. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2302. }
  2303. type InventoryCustomBatchResponse struct {
  2304. // Entries: The result of the execution of the batch requests.
  2305. Entries []*InventoryCustomBatchResponseEntry `json:"entries,omitempty"`
  2306. // Kind: Identifies what kind of resource this is. Value: the fixed
  2307. // string "content#inventoryCustomBatchResponse".
  2308. Kind string `json:"kind,omitempty"`
  2309. // ServerResponse contains the HTTP response code and headers from the
  2310. // server.
  2311. googleapi.ServerResponse `json:"-"`
  2312. // ForceSendFields is a list of field names (e.g. "Entries") to
  2313. // unconditionally include in API requests. By default, fields with
  2314. // empty values are omitted from API requests. However, any non-pointer,
  2315. // non-interface field appearing in ForceSendFields will be sent to the
  2316. // server regardless of whether the field is empty or not. This may be
  2317. // used to include empty fields in Patch requests.
  2318. ForceSendFields []string `json:"-"`
  2319. // NullFields is a list of field names (e.g. "Entries") to include in
  2320. // API requests with the JSON null value. By default, fields with empty
  2321. // values are omitted from API requests. However, any field with an
  2322. // empty value appearing in NullFields will be sent to the server as
  2323. // null. It is an error if a field in this list has a non-empty value.
  2324. // This may be used to include null fields in Patch requests.
  2325. NullFields []string `json:"-"`
  2326. }
  2327. func (s *InventoryCustomBatchResponse) MarshalJSON() ([]byte, error) {
  2328. type NoMethod InventoryCustomBatchResponse
  2329. raw := NoMethod(*s)
  2330. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2331. }
  2332. // InventoryCustomBatchResponseEntry: A batch entry encoding a single
  2333. // non-batch inventory response.
  2334. type InventoryCustomBatchResponseEntry struct {
  2335. // BatchId: The ID of the request entry this entry responds to.
  2336. BatchId int64 `json:"batchId,omitempty"`
  2337. // Errors: A list of errors defined if and only if the request failed.
  2338. Errors *Errors `json:"errors,omitempty"`
  2339. // Kind: Identifies what kind of resource this is. Value: the fixed
  2340. // string "content#inventoryCustomBatchResponseEntry".
  2341. Kind string `json:"kind,omitempty"`
  2342. // ForceSendFields is a list of field names (e.g. "BatchId") to
  2343. // unconditionally include in API requests. By default, fields with
  2344. // empty values are omitted from API requests. However, any non-pointer,
  2345. // non-interface field appearing in ForceSendFields will be sent to the
  2346. // server regardless of whether the field is empty or not. This may be
  2347. // used to include empty fields in Patch requests.
  2348. ForceSendFields []string `json:"-"`
  2349. // NullFields is a list of field names (e.g. "BatchId") to include in
  2350. // API requests with the JSON null value. By default, fields with empty
  2351. // values are omitted from API requests. However, any field with an
  2352. // empty value appearing in NullFields will be sent to the server as
  2353. // null. It is an error if a field in this list has a non-empty value.
  2354. // This may be used to include null fields in Patch requests.
  2355. NullFields []string `json:"-"`
  2356. }
  2357. func (s *InventoryCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  2358. type NoMethod InventoryCustomBatchResponseEntry
  2359. raw := NoMethod(*s)
  2360. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2361. }
  2362. type InventoryPickup struct {
  2363. // PickupMethod: Whether store pickup is available for this offer and
  2364. // whether the pickup option should be shown as buy, reserve, or not
  2365. // supported. Only supported for local inventory. Unless the value is
  2366. // "not supported", must be submitted together with pickupSla.
  2367. PickupMethod string `json:"pickupMethod,omitempty"`
  2368. // PickupSla: The expected date that an order will be ready for pickup,
  2369. // relative to when the order is placed. Only supported for local
  2370. // inventory. Must be submitted together with pickupMethod.
  2371. PickupSla string `json:"pickupSla,omitempty"`
  2372. // ForceSendFields is a list of field names (e.g. "PickupMethod") to
  2373. // unconditionally include in API requests. By default, fields with
  2374. // empty values are omitted from API requests. However, any non-pointer,
  2375. // non-interface field appearing in ForceSendFields will be sent to the
  2376. // server regardless of whether the field is empty or not. This may be
  2377. // used to include empty fields in Patch requests.
  2378. ForceSendFields []string `json:"-"`
  2379. // NullFields is a list of field names (e.g. "PickupMethod") to include
  2380. // in API requests with the JSON null value. By default, fields with
  2381. // empty values are omitted from API requests. However, any field with
  2382. // an empty value appearing in NullFields will be sent to the server as
  2383. // null. It is an error if a field in this list has a non-empty value.
  2384. // This may be used to include null fields in Patch requests.
  2385. NullFields []string `json:"-"`
  2386. }
  2387. func (s *InventoryPickup) MarshalJSON() ([]byte, error) {
  2388. type NoMethod InventoryPickup
  2389. raw := NoMethod(*s)
  2390. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2391. }
  2392. type InventorySetRequest struct {
  2393. // Availability: The availability of the product.
  2394. Availability string `json:"availability,omitempty"`
  2395. // Installment: Number and amount of installments to pay for an item.
  2396. // Brazil only.
  2397. Installment *Installment `json:"installment,omitempty"`
  2398. // LoyaltyPoints: Loyalty points that users receive after purchasing the
  2399. // item. Japan only.
  2400. LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"`
  2401. // Pickup: Store pickup information. Only supported for local inventory.
  2402. // Not setting pickup means "don't update" while setting it to the empty
  2403. // value ({} in JSON) means "delete". Otherwise, pickupMethod and
  2404. // pickupSla must be set together, unless pickupMethod is "not
  2405. // supported".
  2406. Pickup *InventoryPickup `json:"pickup,omitempty"`
  2407. // Price: The price of the product.
  2408. Price *Price `json:"price,omitempty"`
  2409. // Quantity: The quantity of the product. Must be equal to or greater
  2410. // than zero. Supported only for local products.
  2411. Quantity int64 `json:"quantity,omitempty"`
  2412. // SalePrice: The sale price of the product. Mandatory if
  2413. // sale_price_effective_date is defined.
  2414. SalePrice *Price `json:"salePrice,omitempty"`
  2415. // SalePriceEffectiveDate: A date range represented by a pair of ISO
  2416. // 8601 dates separated by a space, comma, or slash. Both dates might be
  2417. // specified as 'null' if undecided.
  2418. SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"`
  2419. // SellOnGoogleQuantity: The quantity of the product that is reserved
  2420. // for sell-on-google ads. Supported only for online products.
  2421. SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty"`
  2422. // ForceSendFields is a list of field names (e.g. "Availability") to
  2423. // unconditionally include in API requests. By default, fields with
  2424. // empty values are omitted from API requests. However, any non-pointer,
  2425. // non-interface field appearing in ForceSendFields will be sent to the
  2426. // server regardless of whether the field is empty or not. This may be
  2427. // used to include empty fields in Patch requests.
  2428. ForceSendFields []string `json:"-"`
  2429. // NullFields is a list of field names (e.g. "Availability") to include
  2430. // in API requests with the JSON null value. By default, fields with
  2431. // empty values are omitted from API requests. However, any field with
  2432. // an empty value appearing in NullFields will be sent to the server as
  2433. // null. It is an error if a field in this list has a non-empty value.
  2434. // This may be used to include null fields in Patch requests.
  2435. NullFields []string `json:"-"`
  2436. }
  2437. func (s *InventorySetRequest) MarshalJSON() ([]byte, error) {
  2438. type NoMethod InventorySetRequest
  2439. raw := NoMethod(*s)
  2440. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2441. }
  2442. type InventorySetResponse struct {
  2443. // Kind: Identifies what kind of resource this is. Value: the fixed
  2444. // string "content#inventorySetResponse".
  2445. Kind string `json:"kind,omitempty"`
  2446. // ServerResponse contains the HTTP response code and headers from the
  2447. // server.
  2448. googleapi.ServerResponse `json:"-"`
  2449. // ForceSendFields is a list of field names (e.g. "Kind") to
  2450. // unconditionally include in API requests. By default, fields with
  2451. // empty values are omitted from API requests. However, any non-pointer,
  2452. // non-interface field appearing in ForceSendFields will be sent to the
  2453. // server regardless of whether the field is empty or not. This may be
  2454. // used to include empty fields in Patch requests.
  2455. ForceSendFields []string `json:"-"`
  2456. // NullFields is a list of field names (e.g. "Kind") to include in API
  2457. // requests with the JSON null value. By default, fields with empty
  2458. // values are omitted from API requests. However, any field with an
  2459. // empty value appearing in NullFields will be sent to the server as
  2460. // null. It is an error if a field in this list has a non-empty value.
  2461. // This may be used to include null fields in Patch requests.
  2462. NullFields []string `json:"-"`
  2463. }
  2464. func (s *InventorySetResponse) MarshalJSON() ([]byte, error) {
  2465. type NoMethod InventorySetResponse
  2466. raw := NoMethod(*s)
  2467. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2468. }
  2469. type InvoiceSummary struct {
  2470. // AdditionalChargeSummaries: Summary of the total amounts of the
  2471. // additional charges.
  2472. AdditionalChargeSummaries []*InvoiceSummaryAdditionalChargeSummary `json:"additionalChargeSummaries,omitempty"`
  2473. // CustomerBalance: Customer balance on this invoice. A positive amount
  2474. // means the customer is paying, a negative one means the customer is
  2475. // receiving money. Note that it must always be true that
  2476. // merchant_balance + customer_balance + google_balance = 0.
  2477. CustomerBalance *Amount `json:"customerBalance,omitempty"`
  2478. // GoogleBalance: Google balance on this invoice. A positive amount
  2479. // means Google is paying, a negative one means Google is receiving
  2480. // money. Note that it must always be true that merchant_balance +
  2481. // customer_balance + google_balance = 0.
  2482. GoogleBalance *Amount `json:"googleBalance,omitempty"`
  2483. // MerchantBalance: Merchant balance on this invoice. A positive amount
  2484. // means the merchant is paying, a negative one means the merchant is
  2485. // receiving money. Note that it must always be true that
  2486. // merchant_balance + customer_balance + google_balance = 0.
  2487. MerchantBalance *Amount `json:"merchantBalance,omitempty"`
  2488. // ProductTotal: Total price for the product.
  2489. ProductTotal *Amount `json:"productTotal,omitempty"`
  2490. // PromotionSummaries: Summary for each promotion.
  2491. PromotionSummaries []*Promotion `json:"promotionSummaries,omitempty"`
  2492. // ForceSendFields is a list of field names (e.g.
  2493. // "AdditionalChargeSummaries") to unconditionally include in API
  2494. // requests. By default, fields with empty values are omitted from API
  2495. // requests. However, any non-pointer, non-interface field appearing in
  2496. // ForceSendFields will be sent to the server regardless of whether the
  2497. // field is empty or not. This may be used to include empty fields in
  2498. // Patch requests.
  2499. ForceSendFields []string `json:"-"`
  2500. // NullFields is a list of field names (e.g.
  2501. // "AdditionalChargeSummaries") to include in API requests with the JSON
  2502. // null value. By default, fields with empty values are omitted from API
  2503. // requests. However, any field with an empty value appearing in
  2504. // NullFields will be sent to the server as null. It is an error if a
  2505. // field in this list has a non-empty value. This may be used to include
  2506. // null fields in Patch requests.
  2507. NullFields []string `json:"-"`
  2508. }
  2509. func (s *InvoiceSummary) MarshalJSON() ([]byte, error) {
  2510. type NoMethod InvoiceSummary
  2511. raw := NoMethod(*s)
  2512. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2513. }
  2514. type InvoiceSummaryAdditionalChargeSummary struct {
  2515. // TotalAmount: Total additional charge for this type.
  2516. TotalAmount *Amount `json:"totalAmount,omitempty"`
  2517. // Type: Type of the additional charge.
  2518. Type string `json:"type,omitempty"`
  2519. // ForceSendFields is a list of field names (e.g. "TotalAmount") to
  2520. // unconditionally include in API requests. By default, fields with
  2521. // empty values are omitted from API requests. However, any non-pointer,
  2522. // non-interface field appearing in ForceSendFields will be sent to the
  2523. // server regardless of whether the field is empty or not. This may be
  2524. // used to include empty fields in Patch requests.
  2525. ForceSendFields []string `json:"-"`
  2526. // NullFields is a list of field names (e.g. "TotalAmount") to include
  2527. // in API requests with the JSON null value. By default, fields with
  2528. // empty values are omitted from API requests. However, any field with
  2529. // an empty value appearing in NullFields will be sent to the server as
  2530. // null. It is an error if a field in this list has a non-empty value.
  2531. // This may be used to include null fields in Patch requests.
  2532. NullFields []string `json:"-"`
  2533. }
  2534. func (s *InvoiceSummaryAdditionalChargeSummary) MarshalJSON() ([]byte, error) {
  2535. type NoMethod InvoiceSummaryAdditionalChargeSummary
  2536. raw := NoMethod(*s)
  2537. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2538. }
  2539. type LiaAboutPageSettings struct {
  2540. // Status: The status of the verification process for the About page.
  2541. Status string `json:"status,omitempty"`
  2542. // Url: The URL for the About page.
  2543. Url string `json:"url,omitempty"`
  2544. // ForceSendFields is a list of field names (e.g. "Status") to
  2545. // unconditionally include in API requests. By default, fields with
  2546. // empty values are omitted from API requests. However, any non-pointer,
  2547. // non-interface field appearing in ForceSendFields will be sent to the
  2548. // server regardless of whether the field is empty or not. This may be
  2549. // used to include empty fields in Patch requests.
  2550. ForceSendFields []string `json:"-"`
  2551. // NullFields is a list of field names (e.g. "Status") to include in API
  2552. // requests with the JSON null value. By default, fields with empty
  2553. // values are omitted from API requests. However, any field with an
  2554. // empty value appearing in NullFields will be sent to the server as
  2555. // null. It is an error if a field in this list has a non-empty value.
  2556. // This may be used to include null fields in Patch requests.
  2557. NullFields []string `json:"-"`
  2558. }
  2559. func (s *LiaAboutPageSettings) MarshalJSON() ([]byte, error) {
  2560. type NoMethod LiaAboutPageSettings
  2561. raw := NoMethod(*s)
  2562. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2563. }
  2564. type LiaCountrySettings struct {
  2565. // About: The settings for the About page.
  2566. About *LiaAboutPageSettings `json:"about,omitempty"`
  2567. // Country: CLDR country code (e.g. "US").
  2568. Country string `json:"country,omitempty"`
  2569. // HostedLocalStorefrontActive: The status of the "Merchant hosted local
  2570. // storefront" feature.
  2571. HostedLocalStorefrontActive bool `json:"hostedLocalStorefrontActive,omitempty"`
  2572. // Inventory: LIA inventory verification settings.
  2573. Inventory *LiaInventorySettings `json:"inventory,omitempty"`
  2574. // OnDisplayToOrder: LIA "On Display To Order" settings.
  2575. OnDisplayToOrder *LiaOnDisplayToOrderSettings `json:"onDisplayToOrder,omitempty"`
  2576. // PosDataProvider: The POS data provider linked with this country.
  2577. PosDataProvider *LiaPosDataProvider `json:"posDataProvider,omitempty"`
  2578. // StorePickupActive: The status of the "Store pickup" feature.
  2579. StorePickupActive bool `json:"storePickupActive,omitempty"`
  2580. // ForceSendFields is a list of field names (e.g. "About") to
  2581. // unconditionally include in API requests. By default, fields with
  2582. // empty values are omitted from API requests. However, any non-pointer,
  2583. // non-interface field appearing in ForceSendFields will be sent to the
  2584. // server regardless of whether the field is empty or not. This may be
  2585. // used to include empty fields in Patch requests.
  2586. ForceSendFields []string `json:"-"`
  2587. // NullFields is a list of field names (e.g. "About") to include in API
  2588. // requests with the JSON null value. By default, fields with empty
  2589. // values are omitted from API requests. However, any field with an
  2590. // empty value appearing in NullFields will be sent to the server as
  2591. // null. It is an error if a field in this list has a non-empty value.
  2592. // This may be used to include null fields in Patch requests.
  2593. NullFields []string `json:"-"`
  2594. }
  2595. func (s *LiaCountrySettings) MarshalJSON() ([]byte, error) {
  2596. type NoMethod LiaCountrySettings
  2597. raw := NoMethod(*s)
  2598. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2599. }
  2600. type LiaInventorySettings struct {
  2601. // InventoryVerificationContactEmail: The email of the contact for the
  2602. // inventory verification process.
  2603. InventoryVerificationContactEmail string `json:"inventoryVerificationContactEmail,omitempty"`
  2604. // InventoryVerificationContactName: The name of the contact for the
  2605. // inventory verification process.
  2606. InventoryVerificationContactName string `json:"inventoryVerificationContactName,omitempty"`
  2607. // InventoryVerificationContactStatus: The status of the verification
  2608. // contact.
  2609. InventoryVerificationContactStatus string `json:"inventoryVerificationContactStatus,omitempty"`
  2610. // Status: The status of the inventory verification process.
  2611. Status string `json:"status,omitempty"`
  2612. // ForceSendFields is a list of field names (e.g.
  2613. // "InventoryVerificationContactEmail") to unconditionally include in
  2614. // API requests. By default, fields with empty values are omitted from
  2615. // API requests. However, any non-pointer, non-interface field appearing
  2616. // in ForceSendFields will be sent to the server regardless of whether
  2617. // the field is empty or not. This may be used to include empty fields
  2618. // in Patch requests.
  2619. ForceSendFields []string `json:"-"`
  2620. // NullFields is a list of field names (e.g.
  2621. // "InventoryVerificationContactEmail") to include in API requests with
  2622. // the JSON null value. By default, fields with empty values are omitted
  2623. // from API requests. However, any field with an empty value appearing
  2624. // in NullFields will be sent to the server as null. It is an error if a
  2625. // field in this list has a non-empty value. This may be used to include
  2626. // null fields in Patch requests.
  2627. NullFields []string `json:"-"`
  2628. }
  2629. func (s *LiaInventorySettings) MarshalJSON() ([]byte, error) {
  2630. type NoMethod LiaInventorySettings
  2631. raw := NoMethod(*s)
  2632. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2633. }
  2634. type LiaOnDisplayToOrderSettings struct {
  2635. // ShippingCostPolicyUrl: Shipping cost and policy URL.
  2636. ShippingCostPolicyUrl string `json:"shippingCostPolicyUrl,omitempty"`
  2637. // Status: The status of the ?On display to order? feature.
  2638. Status string `json:"status,omitempty"`
  2639. // ForceSendFields is a list of field names (e.g.
  2640. // "ShippingCostPolicyUrl") to unconditionally include in API requests.
  2641. // By default, fields with empty values are omitted from API requests.
  2642. // However, any non-pointer, non-interface field appearing in
  2643. // ForceSendFields will be sent to the server regardless of whether the
  2644. // field is empty or not. This may be used to include empty fields in
  2645. // Patch requests.
  2646. ForceSendFields []string `json:"-"`
  2647. // NullFields is a list of field names (e.g. "ShippingCostPolicyUrl") to
  2648. // include in API requests with the JSON null value. By default, fields
  2649. // with empty values are omitted from API requests. However, any field
  2650. // with an empty value appearing in NullFields will be sent to the
  2651. // server as null. It is an error if a field in this list has a
  2652. // non-empty value. This may be used to include null fields in Patch
  2653. // requests.
  2654. NullFields []string `json:"-"`
  2655. }
  2656. func (s *LiaOnDisplayToOrderSettings) MarshalJSON() ([]byte, error) {
  2657. type NoMethod LiaOnDisplayToOrderSettings
  2658. raw := NoMethod(*s)
  2659. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2660. }
  2661. type LiaPosDataProvider struct {
  2662. // PosDataProviderId: The ID of the POS data provider.
  2663. PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"`
  2664. // PosExternalAccountId: The account ID by which this merchant is known
  2665. // to the POS data provider.
  2666. PosExternalAccountId string `json:"posExternalAccountId,omitempty"`
  2667. // ForceSendFields is a list of field names (e.g. "PosDataProviderId")
  2668. // to unconditionally include in API requests. By default, fields with
  2669. // empty values are omitted from API requests. However, any non-pointer,
  2670. // non-interface field appearing in ForceSendFields will be sent to the
  2671. // server regardless of whether the field is empty or not. This may be
  2672. // used to include empty fields in Patch requests.
  2673. ForceSendFields []string `json:"-"`
  2674. // NullFields is a list of field names (e.g. "PosDataProviderId") to
  2675. // include in API requests with the JSON null value. By default, fields
  2676. // with empty values are omitted from API requests. However, any field
  2677. // with an empty value appearing in NullFields will be sent to the
  2678. // server as null. It is an error if a field in this list has a
  2679. // non-empty value. This may be used to include null fields in Patch
  2680. // requests.
  2681. NullFields []string `json:"-"`
  2682. }
  2683. func (s *LiaPosDataProvider) MarshalJSON() ([]byte, error) {
  2684. type NoMethod LiaPosDataProvider
  2685. raw := NoMethod(*s)
  2686. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2687. }
  2688. type LiaSettings struct {
  2689. // AccountId: The ID of the account to which these LIA settings belong.
  2690. // Ignored upon update, always present in get request responses.
  2691. AccountId uint64 `json:"accountId,omitempty,string"`
  2692. // CountrySettings: The LIA settings for each country.
  2693. CountrySettings []*LiaCountrySettings `json:"countrySettings,omitempty"`
  2694. // Kind: Identifies what kind of resource this is. Value: the fixed
  2695. // string "content#liaSettings".
  2696. Kind string `json:"kind,omitempty"`
  2697. // ServerResponse contains the HTTP response code and headers from the
  2698. // server.
  2699. googleapi.ServerResponse `json:"-"`
  2700. // ForceSendFields is a list of field names (e.g. "AccountId") to
  2701. // unconditionally include in API requests. By default, fields with
  2702. // empty values are omitted from API requests. However, any non-pointer,
  2703. // non-interface field appearing in ForceSendFields will be sent to the
  2704. // server regardless of whether the field is empty or not. This may be
  2705. // used to include empty fields in Patch requests.
  2706. ForceSendFields []string `json:"-"`
  2707. // NullFields is a list of field names (e.g. "AccountId") to include in
  2708. // API requests with the JSON null value. By default, fields with empty
  2709. // values are omitted from API requests. However, any field with an
  2710. // empty value appearing in NullFields will be sent to the server as
  2711. // null. It is an error if a field in this list has a non-empty value.
  2712. // This may be used to include null fields in Patch requests.
  2713. NullFields []string `json:"-"`
  2714. }
  2715. func (s *LiaSettings) MarshalJSON() ([]byte, error) {
  2716. type NoMethod LiaSettings
  2717. raw := NoMethod(*s)
  2718. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2719. }
  2720. type LiasettingsCustomBatchRequest struct {
  2721. // Entries: The request entries to be processed in the batch.
  2722. Entries []*LiasettingsCustomBatchRequestEntry `json:"entries,omitempty"`
  2723. // ForceSendFields is a list of field names (e.g. "Entries") to
  2724. // unconditionally include in API requests. By default, fields with
  2725. // empty values are omitted from API requests. However, any non-pointer,
  2726. // non-interface field appearing in ForceSendFields will be sent to the
  2727. // server regardless of whether the field is empty or not. This may be
  2728. // used to include empty fields in Patch requests.
  2729. ForceSendFields []string `json:"-"`
  2730. // NullFields is a list of field names (e.g. "Entries") to include in
  2731. // API requests with the JSON null value. By default, fields with empty
  2732. // values are omitted from API requests. However, any field with an
  2733. // empty value appearing in NullFields will be sent to the server as
  2734. // null. It is an error if a field in this list has a non-empty value.
  2735. // This may be used to include null fields in Patch requests.
  2736. NullFields []string `json:"-"`
  2737. }
  2738. func (s *LiasettingsCustomBatchRequest) MarshalJSON() ([]byte, error) {
  2739. type NoMethod LiasettingsCustomBatchRequest
  2740. raw := NoMethod(*s)
  2741. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2742. }
  2743. type LiasettingsCustomBatchRequestEntry struct {
  2744. // AccountId: The ID of the account for which to get/update account
  2745. // shipping settings.
  2746. AccountId uint64 `json:"accountId,omitempty,string"`
  2747. // BatchId: An entry ID, unique within the batch request.
  2748. BatchId int64 `json:"batchId,omitempty"`
  2749. // ContactEmail: Inventory validation contact email. Required only for
  2750. // SetInventoryValidationContact.
  2751. ContactEmail string `json:"contactEmail,omitempty"`
  2752. // ContactName: Inventory validation contact name. Required only for
  2753. // SetInventoryValidationContact.
  2754. ContactName string `json:"contactName,omitempty"`
  2755. // Country: The country code. Required only for
  2756. // RequestInventoryVerification.
  2757. Country string `json:"country,omitempty"`
  2758. // GmbEmail: The GMB account. Required only for RequestGmbAccess.
  2759. GmbEmail string `json:"gmbEmail,omitempty"`
  2760. // LiaSettings: The account Lia settings to update. Only defined if the
  2761. // method is update.
  2762. LiaSettings *LiaSettings `json:"liaSettings,omitempty"`
  2763. // MerchantId: The ID of the managing account.
  2764. MerchantId uint64 `json:"merchantId,omitempty,string"`
  2765. Method string `json:"method,omitempty"`
  2766. // PosDataProviderId: The ID of POS data provider. Required only for
  2767. // SetPosProvider.
  2768. PosDataProviderId uint64 `json:"posDataProviderId,omitempty,string"`
  2769. // PosExternalAccountId: The account ID by which this merchant is known
  2770. // to the POS provider.
  2771. PosExternalAccountId string `json:"posExternalAccountId,omitempty"`
  2772. // ForceSendFields is a list of field names (e.g. "AccountId") to
  2773. // unconditionally include in API requests. By default, fields with
  2774. // empty values are omitted from API requests. However, any non-pointer,
  2775. // non-interface field appearing in ForceSendFields will be sent to the
  2776. // server regardless of whether the field is empty or not. This may be
  2777. // used to include empty fields in Patch requests.
  2778. ForceSendFields []string `json:"-"`
  2779. // NullFields is a list of field names (e.g. "AccountId") to include in
  2780. // API requests with the JSON null value. By default, fields with empty
  2781. // values are omitted from API requests. However, any field with an
  2782. // empty value appearing in NullFields will be sent to the server as
  2783. // null. It is an error if a field in this list has a non-empty value.
  2784. // This may be used to include null fields in Patch requests.
  2785. NullFields []string `json:"-"`
  2786. }
  2787. func (s *LiasettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  2788. type NoMethod LiasettingsCustomBatchRequestEntry
  2789. raw := NoMethod(*s)
  2790. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2791. }
  2792. type LiasettingsCustomBatchResponse struct {
  2793. // Entries: The result of the execution of the batch requests.
  2794. Entries []*LiasettingsCustomBatchResponseEntry `json:"entries,omitempty"`
  2795. // Kind: Identifies what kind of resource this is. Value: the fixed
  2796. // string "content#liasettingsCustomBatchResponse".
  2797. Kind string `json:"kind,omitempty"`
  2798. // ServerResponse contains the HTTP response code and headers from the
  2799. // server.
  2800. googleapi.ServerResponse `json:"-"`
  2801. // ForceSendFields is a list of field names (e.g. "Entries") to
  2802. // unconditionally include in API requests. By default, fields with
  2803. // empty values are omitted from API requests. However, any non-pointer,
  2804. // non-interface field appearing in ForceSendFields will be sent to the
  2805. // server regardless of whether the field is empty or not. This may be
  2806. // used to include empty fields in Patch requests.
  2807. ForceSendFields []string `json:"-"`
  2808. // NullFields is a list of field names (e.g. "Entries") to include in
  2809. // API requests with the JSON null value. By default, fields with empty
  2810. // values are omitted from API requests. However, any field with an
  2811. // empty value appearing in NullFields will be sent to the server as
  2812. // null. It is an error if a field in this list has a non-empty value.
  2813. // This may be used to include null fields in Patch requests.
  2814. NullFields []string `json:"-"`
  2815. }
  2816. func (s *LiasettingsCustomBatchResponse) MarshalJSON() ([]byte, error) {
  2817. type NoMethod LiasettingsCustomBatchResponse
  2818. raw := NoMethod(*s)
  2819. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2820. }
  2821. type LiasettingsCustomBatchResponseEntry struct {
  2822. // BatchId: The ID of the request entry to which this entry responds.
  2823. BatchId int64 `json:"batchId,omitempty"`
  2824. // Errors: A list of errors defined if, and only if, the request failed.
  2825. Errors *Errors `json:"errors,omitempty"`
  2826. // GmbAccounts: The the list of accessible GMB accounts.
  2827. GmbAccounts *GmbAccounts `json:"gmbAccounts,omitempty"`
  2828. // Kind: Identifies what kind of resource this is. Value: the fixed
  2829. // string "content#liasettingsCustomBatchResponseEntry".
  2830. Kind string `json:"kind,omitempty"`
  2831. // LiaSettings: The retrieved or updated Lia settings.
  2832. LiaSettings *LiaSettings `json:"liaSettings,omitempty"`
  2833. // PosDataProviders: The list of POS data providers.
  2834. PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"`
  2835. // ForceSendFields is a list of field names (e.g. "BatchId") to
  2836. // unconditionally include in API requests. By default, fields with
  2837. // empty values are omitted from API requests. However, any non-pointer,
  2838. // non-interface field appearing in ForceSendFields will be sent to the
  2839. // server regardless of whether the field is empty or not. This may be
  2840. // used to include empty fields in Patch requests.
  2841. ForceSendFields []string `json:"-"`
  2842. // NullFields is a list of field names (e.g. "BatchId") to include in
  2843. // API requests with the JSON null value. By default, fields with empty
  2844. // values are omitted from API requests. However, any field with an
  2845. // empty value appearing in NullFields will be sent to the server as
  2846. // null. It is an error if a field in this list has a non-empty value.
  2847. // This may be used to include null fields in Patch requests.
  2848. NullFields []string `json:"-"`
  2849. }
  2850. func (s *LiasettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  2851. type NoMethod LiasettingsCustomBatchResponseEntry
  2852. raw := NoMethod(*s)
  2853. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2854. }
  2855. type LiasettingsGetAccessibleGmbAccountsResponse struct {
  2856. // AccountId: The ID of the account.
  2857. AccountId uint64 `json:"accountId,omitempty,string"`
  2858. // GmbAccounts: A list of GMB accounts which are available to the
  2859. // merchant.
  2860. GmbAccounts []*GmbAccountsGmbAccount `json:"gmbAccounts,omitempty"`
  2861. // Kind: Identifies what kind of resource this is. Value: the fixed
  2862. // string "content#liasettingsGetAccessibleGmbAccountsResponse".
  2863. Kind string `json:"kind,omitempty"`
  2864. // ServerResponse contains the HTTP response code and headers from the
  2865. // server.
  2866. googleapi.ServerResponse `json:"-"`
  2867. // ForceSendFields is a list of field names (e.g. "AccountId") to
  2868. // unconditionally include in API requests. By default, fields with
  2869. // empty values are omitted from API requests. However, any non-pointer,
  2870. // non-interface field appearing in ForceSendFields will be sent to the
  2871. // server regardless of whether the field is empty or not. This may be
  2872. // used to include empty fields in Patch requests.
  2873. ForceSendFields []string `json:"-"`
  2874. // NullFields is a list of field names (e.g. "AccountId") to include in
  2875. // API requests with the JSON null value. By default, fields with empty
  2876. // values are omitted from API requests. However, any field with an
  2877. // empty value appearing in NullFields will be sent to the server as
  2878. // null. It is an error if a field in this list has a non-empty value.
  2879. // This may be used to include null fields in Patch requests.
  2880. NullFields []string `json:"-"`
  2881. }
  2882. func (s *LiasettingsGetAccessibleGmbAccountsResponse) MarshalJSON() ([]byte, error) {
  2883. type NoMethod LiasettingsGetAccessibleGmbAccountsResponse
  2884. raw := NoMethod(*s)
  2885. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2886. }
  2887. type LiasettingsListPosDataProvidersResponse struct {
  2888. // Kind: Identifies what kind of resource this is. Value: the fixed
  2889. // string "content#liasettingsListPosDataProvidersResponse".
  2890. Kind string `json:"kind,omitempty"`
  2891. // PosDataProviders: The list of POS data providers for each eligible
  2892. // country
  2893. PosDataProviders []*PosDataProviders `json:"posDataProviders,omitempty"`
  2894. // ServerResponse contains the HTTP response code and headers from the
  2895. // server.
  2896. googleapi.ServerResponse `json:"-"`
  2897. // ForceSendFields is a list of field names (e.g. "Kind") to
  2898. // unconditionally include in API requests. By default, fields with
  2899. // empty values are omitted from API requests. However, any non-pointer,
  2900. // non-interface field appearing in ForceSendFields will be sent to the
  2901. // server regardless of whether the field is empty or not. This may be
  2902. // used to include empty fields in Patch requests.
  2903. ForceSendFields []string `json:"-"`
  2904. // NullFields is a list of field names (e.g. "Kind") to include in API
  2905. // requests with the JSON null value. By default, fields with empty
  2906. // values are omitted from API requests. However, any field with an
  2907. // empty value appearing in NullFields will be sent to the server as
  2908. // null. It is an error if a field in this list has a non-empty value.
  2909. // This may be used to include null fields in Patch requests.
  2910. NullFields []string `json:"-"`
  2911. }
  2912. func (s *LiasettingsListPosDataProvidersResponse) MarshalJSON() ([]byte, error) {
  2913. type NoMethod LiasettingsListPosDataProvidersResponse
  2914. raw := NoMethod(*s)
  2915. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2916. }
  2917. type LiasettingsListResponse struct {
  2918. // Kind: Identifies what kind of resource this is. Value: the fixed
  2919. // string "content#liasettingsListResponse".
  2920. Kind string `json:"kind,omitempty"`
  2921. // NextPageToken: The token for the retrieval of the next page of LIA
  2922. // settings.
  2923. NextPageToken string `json:"nextPageToken,omitempty"`
  2924. Resources []*LiaSettings `json:"resources,omitempty"`
  2925. // ServerResponse contains the HTTP response code and headers from the
  2926. // server.
  2927. googleapi.ServerResponse `json:"-"`
  2928. // ForceSendFields is a list of field names (e.g. "Kind") to
  2929. // unconditionally include in API requests. By default, fields with
  2930. // empty values are omitted from API requests. However, any non-pointer,
  2931. // non-interface field appearing in ForceSendFields will be sent to the
  2932. // server regardless of whether the field is empty or not. This may be
  2933. // used to include empty fields in Patch requests.
  2934. ForceSendFields []string `json:"-"`
  2935. // NullFields is a list of field names (e.g. "Kind") to include in API
  2936. // requests with the JSON null value. By default, fields with empty
  2937. // values are omitted from API requests. However, any field with an
  2938. // empty value appearing in NullFields will be sent to the server as
  2939. // null. It is an error if a field in this list has a non-empty value.
  2940. // This may be used to include null fields in Patch requests.
  2941. NullFields []string `json:"-"`
  2942. }
  2943. func (s *LiasettingsListResponse) MarshalJSON() ([]byte, error) {
  2944. type NoMethod LiasettingsListResponse
  2945. raw := NoMethod(*s)
  2946. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2947. }
  2948. type LiasettingsRequestGmbAccessResponse struct {
  2949. // Kind: Identifies what kind of resource this is. Value: the fixed
  2950. // string "content#liasettingsRequestGmbAccessResponse".
  2951. Kind string `json:"kind,omitempty"`
  2952. // ServerResponse contains the HTTP response code and headers from the
  2953. // server.
  2954. googleapi.ServerResponse `json:"-"`
  2955. // ForceSendFields is a list of field names (e.g. "Kind") to
  2956. // unconditionally include in API requests. By default, fields with
  2957. // empty values are omitted from API requests. However, any non-pointer,
  2958. // non-interface field appearing in ForceSendFields will be sent to the
  2959. // server regardless of whether the field is empty or not. This may be
  2960. // used to include empty fields in Patch requests.
  2961. ForceSendFields []string `json:"-"`
  2962. // NullFields is a list of field names (e.g. "Kind") to include in API
  2963. // requests with the JSON null value. By default, fields with empty
  2964. // values are omitted from API requests. However, any field with an
  2965. // empty value appearing in NullFields will be sent to the server as
  2966. // null. It is an error if a field in this list has a non-empty value.
  2967. // This may be used to include null fields in Patch requests.
  2968. NullFields []string `json:"-"`
  2969. }
  2970. func (s *LiasettingsRequestGmbAccessResponse) MarshalJSON() ([]byte, error) {
  2971. type NoMethod LiasettingsRequestGmbAccessResponse
  2972. raw := NoMethod(*s)
  2973. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  2974. }
  2975. type LiasettingsRequestInventoryVerificationResponse struct {
  2976. // Kind: Identifies what kind of resource this is. Value: the fixed
  2977. // string "content#liasettingsRequestInventoryVerificationResponse".
  2978. Kind string `json:"kind,omitempty"`
  2979. // ServerResponse contains the HTTP response code and headers from the
  2980. // server.
  2981. googleapi.ServerResponse `json:"-"`
  2982. // ForceSendFields is a list of field names (e.g. "Kind") to
  2983. // unconditionally include in API requests. By default, fields with
  2984. // empty values are omitted from API requests. However, any non-pointer,
  2985. // non-interface field appearing in ForceSendFields will be sent to the
  2986. // server regardless of whether the field is empty or not. This may be
  2987. // used to include empty fields in Patch requests.
  2988. ForceSendFields []string `json:"-"`
  2989. // NullFields is a list of field names (e.g. "Kind") to include in API
  2990. // requests with the JSON null value. By default, fields with empty
  2991. // values are omitted from API requests. However, any field with an
  2992. // empty value appearing in NullFields will be sent to the server as
  2993. // null. It is an error if a field in this list has a non-empty value.
  2994. // This may be used to include null fields in Patch requests.
  2995. NullFields []string `json:"-"`
  2996. }
  2997. func (s *LiasettingsRequestInventoryVerificationResponse) MarshalJSON() ([]byte, error) {
  2998. type NoMethod LiasettingsRequestInventoryVerificationResponse
  2999. raw := NoMethod(*s)
  3000. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3001. }
  3002. type LiasettingsSetInventoryVerificationContactResponse struct {
  3003. // Kind: Identifies what kind of resource this is. Value: the fixed
  3004. // string "content#liasettingsSetInventoryVerificationContactResponse".
  3005. Kind string `json:"kind,omitempty"`
  3006. // ServerResponse contains the HTTP response code and headers from the
  3007. // server.
  3008. googleapi.ServerResponse `json:"-"`
  3009. // ForceSendFields is a list of field names (e.g. "Kind") to
  3010. // unconditionally include in API requests. By default, fields with
  3011. // empty values are omitted from API requests. However, any non-pointer,
  3012. // non-interface field appearing in ForceSendFields will be sent to the
  3013. // server regardless of whether the field is empty or not. This may be
  3014. // used to include empty fields in Patch requests.
  3015. ForceSendFields []string `json:"-"`
  3016. // NullFields is a list of field names (e.g. "Kind") to include in API
  3017. // requests with the JSON null value. By default, fields with empty
  3018. // values are omitted from API requests. However, any field with an
  3019. // empty value appearing in NullFields will be sent to the server as
  3020. // null. It is an error if a field in this list has a non-empty value.
  3021. // This may be used to include null fields in Patch requests.
  3022. NullFields []string `json:"-"`
  3023. }
  3024. func (s *LiasettingsSetInventoryVerificationContactResponse) MarshalJSON() ([]byte, error) {
  3025. type NoMethod LiasettingsSetInventoryVerificationContactResponse
  3026. raw := NoMethod(*s)
  3027. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3028. }
  3029. type LiasettingsSetPosDataProviderResponse struct {
  3030. // Kind: Identifies what kind of resource this is. Value: the fixed
  3031. // string "content#liasettingsSetPosDataProviderResponse".
  3032. Kind string `json:"kind,omitempty"`
  3033. // ServerResponse contains the HTTP response code and headers from the
  3034. // server.
  3035. googleapi.ServerResponse `json:"-"`
  3036. // ForceSendFields is a list of field names (e.g. "Kind") to
  3037. // unconditionally include in API requests. By default, fields with
  3038. // empty values are omitted from API requests. However, any non-pointer,
  3039. // non-interface field appearing in ForceSendFields will be sent to the
  3040. // server regardless of whether the field is empty or not. This may be
  3041. // used to include empty fields in Patch requests.
  3042. ForceSendFields []string `json:"-"`
  3043. // NullFields is a list of field names (e.g. "Kind") to include in API
  3044. // requests with the JSON null value. By default, fields with empty
  3045. // values are omitted from API requests. However, any field with an
  3046. // empty value appearing in NullFields will be sent to the server as
  3047. // null. It is an error if a field in this list has a non-empty value.
  3048. // This may be used to include null fields in Patch requests.
  3049. NullFields []string `json:"-"`
  3050. }
  3051. func (s *LiasettingsSetPosDataProviderResponse) MarshalJSON() ([]byte, error) {
  3052. type NoMethod LiasettingsSetPosDataProviderResponse
  3053. raw := NoMethod(*s)
  3054. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3055. }
  3056. type LocationIdSet struct {
  3057. // LocationIds: A non-empty list of location IDs. They must all be of
  3058. // the same location type (e.g., state).
  3059. LocationIds []string `json:"locationIds,omitempty"`
  3060. // ForceSendFields is a list of field names (e.g. "LocationIds") to
  3061. // unconditionally include in API requests. By default, fields with
  3062. // empty values are omitted from API requests. However, any non-pointer,
  3063. // non-interface field appearing in ForceSendFields will be sent to the
  3064. // server regardless of whether the field is empty or not. This may be
  3065. // used to include empty fields in Patch requests.
  3066. ForceSendFields []string `json:"-"`
  3067. // NullFields is a list of field names (e.g. "LocationIds") to include
  3068. // in API requests with the JSON null value. By default, fields with
  3069. // empty values are omitted from API requests. However, any field with
  3070. // an empty value appearing in NullFields will be sent to the server as
  3071. // null. It is an error if a field in this list has a non-empty value.
  3072. // This may be used to include null fields in Patch requests.
  3073. NullFields []string `json:"-"`
  3074. }
  3075. func (s *LocationIdSet) MarshalJSON() ([]byte, error) {
  3076. type NoMethod LocationIdSet
  3077. raw := NoMethod(*s)
  3078. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3079. }
  3080. type LoyaltyPoints struct {
  3081. // Name: Name of loyalty points program. It is recommended to limit the
  3082. // name to 12 full-width characters or 24 Roman characters.
  3083. Name string `json:"name,omitempty"`
  3084. // PointsValue: The retailer's loyalty points in absolute value.
  3085. PointsValue int64 `json:"pointsValue,omitempty,string"`
  3086. // Ratio: The ratio of a point when converted to currency. Google
  3087. // assumes currency based on Merchant Center settings. If ratio is left
  3088. // out, it defaults to 1.0.
  3089. Ratio float64 `json:"ratio,omitempty"`
  3090. // ForceSendFields is a list of field names (e.g. "Name") to
  3091. // unconditionally include in API requests. By default, fields with
  3092. // empty values are omitted from API requests. However, any non-pointer,
  3093. // non-interface field appearing in ForceSendFields will be sent to the
  3094. // server regardless of whether the field is empty or not. This may be
  3095. // used to include empty fields in Patch requests.
  3096. ForceSendFields []string `json:"-"`
  3097. // NullFields is a list of field names (e.g. "Name") to include in API
  3098. // requests with the JSON null value. By default, fields with empty
  3099. // values are omitted from API requests. However, any field with an
  3100. // empty value appearing in NullFields will be sent to the server as
  3101. // null. It is an error if a field in this list has a non-empty value.
  3102. // This may be used to include null fields in Patch requests.
  3103. NullFields []string `json:"-"`
  3104. }
  3105. func (s *LoyaltyPoints) MarshalJSON() ([]byte, error) {
  3106. type NoMethod LoyaltyPoints
  3107. raw := NoMethod(*s)
  3108. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3109. }
  3110. func (s *LoyaltyPoints) UnmarshalJSON(data []byte) error {
  3111. type NoMethod LoyaltyPoints
  3112. var s1 struct {
  3113. Ratio gensupport.JSONFloat64 `json:"ratio"`
  3114. *NoMethod
  3115. }
  3116. s1.NoMethod = (*NoMethod)(s)
  3117. if err := json.Unmarshal(data, &s1); err != nil {
  3118. return err
  3119. }
  3120. s.Ratio = float64(s1.Ratio)
  3121. return nil
  3122. }
  3123. type Order struct {
  3124. // Acknowledged: Whether the order was acknowledged.
  3125. Acknowledged bool `json:"acknowledged,omitempty"`
  3126. // ChannelType: The channel type of the order: "purchaseOnGoogle" or
  3127. // "googleExpress".
  3128. ChannelType string `json:"channelType,omitempty"`
  3129. // Customer: The details of the customer who placed the order.
  3130. Customer *OrderCustomer `json:"customer,omitempty"`
  3131. // DeliveryDetails: The details for the delivery.
  3132. DeliveryDetails *OrderDeliveryDetails `json:"deliveryDetails,omitempty"`
  3133. // Id: The REST id of the order. Globally unique.
  3134. Id string `json:"id,omitempty"`
  3135. // Kind: Identifies what kind of resource this is. Value: the fixed
  3136. // string "content#order".
  3137. Kind string `json:"kind,omitempty"`
  3138. // LineItems: Line items that are ordered.
  3139. LineItems []*OrderLineItem `json:"lineItems,omitempty"`
  3140. MerchantId uint64 `json:"merchantId,omitempty,string"`
  3141. // MerchantOrderId: Merchant-provided id of the order.
  3142. MerchantOrderId string `json:"merchantOrderId,omitempty"`
  3143. // NetAmount: The net amount for the order. For example, if an order was
  3144. // originally for a grand total of $100 and a refund was issued for $20,
  3145. // the net amount will be $80.
  3146. NetAmount *Price `json:"netAmount,omitempty"`
  3147. // PaymentMethod: The details of the payment method.
  3148. PaymentMethod *OrderPaymentMethod `json:"paymentMethod,omitempty"`
  3149. // PaymentStatus: The status of the payment.
  3150. PaymentStatus string `json:"paymentStatus,omitempty"`
  3151. // PlacedDate: The date when the order was placed, in ISO 8601 format.
  3152. PlacedDate string `json:"placedDate,omitempty"`
  3153. // Promotions: The details of the merchant provided promotions applied
  3154. // to the order. More details about the program are here.
  3155. Promotions []*OrderPromotion `json:"promotions,omitempty"`
  3156. // Refunds: Refunds for the order.
  3157. Refunds []*OrderRefund `json:"refunds,omitempty"`
  3158. // Shipments: Shipments of the order.
  3159. Shipments []*OrderShipment `json:"shipments,omitempty"`
  3160. // ShippingCost: The total cost of shipping for all items.
  3161. ShippingCost *Price `json:"shippingCost,omitempty"`
  3162. // ShippingCostTax: The tax for the total shipping cost.
  3163. ShippingCostTax *Price `json:"shippingCostTax,omitempty"`
  3164. // ShippingOption: The requested shipping option.
  3165. ShippingOption string `json:"shippingOption,omitempty"`
  3166. // Status: The status of the order.
  3167. Status string `json:"status,omitempty"`
  3168. // ServerResponse contains the HTTP response code and headers from the
  3169. // server.
  3170. googleapi.ServerResponse `json:"-"`
  3171. // ForceSendFields is a list of field names (e.g. "Acknowledged") to
  3172. // unconditionally include in API requests. By default, fields with
  3173. // empty values are omitted from API requests. However, any non-pointer,
  3174. // non-interface field appearing in ForceSendFields will be sent to the
  3175. // server regardless of whether the field is empty or not. This may be
  3176. // used to include empty fields in Patch requests.
  3177. ForceSendFields []string `json:"-"`
  3178. // NullFields is a list of field names (e.g. "Acknowledged") to include
  3179. // in API requests with the JSON null value. By default, fields with
  3180. // empty values are omitted from API requests. However, any field with
  3181. // an empty value appearing in NullFields will be sent to the server as
  3182. // null. It is an error if a field in this list has a non-empty value.
  3183. // This may be used to include null fields in Patch requests.
  3184. NullFields []string `json:"-"`
  3185. }
  3186. func (s *Order) MarshalJSON() ([]byte, error) {
  3187. type NoMethod Order
  3188. raw := NoMethod(*s)
  3189. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3190. }
  3191. type OrderAddress struct {
  3192. // Country: CLDR country code (e.g. "US").
  3193. Country string `json:"country,omitempty"`
  3194. // FullAddress: Strings representing the lines of the printed label for
  3195. // mailing the order, for example:
  3196. // John Smith
  3197. // 1600 Amphitheatre Parkway
  3198. // Mountain View, CA, 94043
  3199. // United States
  3200. FullAddress []string `json:"fullAddress,omitempty"`
  3201. // IsPostOfficeBox: Whether the address is a post office box.
  3202. IsPostOfficeBox bool `json:"isPostOfficeBox,omitempty"`
  3203. // Locality: City, town or commune. May also include dependent
  3204. // localities or sublocalities (e.g. neighborhoods or suburbs).
  3205. Locality string `json:"locality,omitempty"`
  3206. // PostalCode: Postal Code or ZIP (e.g. "94043").
  3207. PostalCode string `json:"postalCode,omitempty"`
  3208. // RecipientName: Name of the recipient.
  3209. RecipientName string `json:"recipientName,omitempty"`
  3210. // Region: Top-level administrative subdivision of the country (e.g.
  3211. // "CA").
  3212. Region string `json:"region,omitempty"`
  3213. // StreetAddress: Street-level part of the address.
  3214. StreetAddress []string `json:"streetAddress,omitempty"`
  3215. // ForceSendFields is a list of field names (e.g. "Country") to
  3216. // unconditionally include in API requests. By default, fields with
  3217. // empty values are omitted from API requests. However, any non-pointer,
  3218. // non-interface field appearing in ForceSendFields will be sent to the
  3219. // server regardless of whether the field is empty or not. This may be
  3220. // used to include empty fields in Patch requests.
  3221. ForceSendFields []string `json:"-"`
  3222. // NullFields is a list of field names (e.g. "Country") to include in
  3223. // API requests with the JSON null value. By default, fields with empty
  3224. // values are omitted from API requests. However, any field with an
  3225. // empty value appearing in NullFields will be sent to the server as
  3226. // null. It is an error if a field in this list has a non-empty value.
  3227. // This may be used to include null fields in Patch requests.
  3228. NullFields []string `json:"-"`
  3229. }
  3230. func (s *OrderAddress) MarshalJSON() ([]byte, error) {
  3231. type NoMethod OrderAddress
  3232. raw := NoMethod(*s)
  3233. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3234. }
  3235. type OrderCancellation struct {
  3236. // Actor: The actor that created the cancellation.
  3237. Actor string `json:"actor,omitempty"`
  3238. // CreationDate: Date on which the cancellation has been created, in ISO
  3239. // 8601 format.
  3240. CreationDate string `json:"creationDate,omitempty"`
  3241. // Quantity: The quantity that was canceled.
  3242. Quantity int64 `json:"quantity,omitempty"`
  3243. // Reason: The reason for the cancellation. Orders that are cancelled
  3244. // with a noInventory reason will lead to the removal of the product
  3245. // from Shopping Actions until you make an update to that product. This
  3246. // will not affect your Shopping ads.
  3247. Reason string `json:"reason,omitempty"`
  3248. // ReasonText: The explanation of the reason.
  3249. ReasonText string `json:"reasonText,omitempty"`
  3250. // ForceSendFields is a list of field names (e.g. "Actor") to
  3251. // unconditionally include in API requests. By default, fields with
  3252. // empty values are omitted from API requests. However, any non-pointer,
  3253. // non-interface field appearing in ForceSendFields will be sent to the
  3254. // server regardless of whether the field is empty or not. This may be
  3255. // used to include empty fields in Patch requests.
  3256. ForceSendFields []string `json:"-"`
  3257. // NullFields is a list of field names (e.g. "Actor") to include in API
  3258. // requests with the JSON null value. By default, fields with empty
  3259. // values are omitted from API requests. However, any field with an
  3260. // empty value appearing in NullFields will be sent to the server as
  3261. // null. It is an error if a field in this list has a non-empty value.
  3262. // This may be used to include null fields in Patch requests.
  3263. NullFields []string `json:"-"`
  3264. }
  3265. func (s *OrderCancellation) MarshalJSON() ([]byte, error) {
  3266. type NoMethod OrderCancellation
  3267. raw := NoMethod(*s)
  3268. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3269. }
  3270. type OrderCustomer struct {
  3271. // Email: Email address that should be used for order related
  3272. // communications. In certain cases this might not be a real users
  3273. // email, but a proxy email.
  3274. Email string `json:"email,omitempty"`
  3275. // ExplicitMarketingPreference: Deprecated. Please use
  3276. // marketingRightsInfo instead.
  3277. ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"`
  3278. // FullName: Full name of the customer.
  3279. FullName string `json:"fullName,omitempty"`
  3280. // MarketingRightsInfo: Customer's marketing preferences.
  3281. MarketingRightsInfo *OrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"`
  3282. // ForceSendFields is a list of field names (e.g. "Email") to
  3283. // unconditionally include in API requests. By default, fields with
  3284. // empty values are omitted from API requests. However, any non-pointer,
  3285. // non-interface field appearing in ForceSendFields will be sent to the
  3286. // server regardless of whether the field is empty or not. This may be
  3287. // used to include empty fields in Patch requests.
  3288. ForceSendFields []string `json:"-"`
  3289. // NullFields is a list of field names (e.g. "Email") to include in API
  3290. // requests with the JSON null value. By default, fields with empty
  3291. // values are omitted from API requests. However, any field with an
  3292. // empty value appearing in NullFields will be sent to the server as
  3293. // null. It is an error if a field in this list has a non-empty value.
  3294. // This may be used to include null fields in Patch requests.
  3295. NullFields []string `json:"-"`
  3296. }
  3297. func (s *OrderCustomer) MarshalJSON() ([]byte, error) {
  3298. type NoMethod OrderCustomer
  3299. raw := NoMethod(*s)
  3300. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3301. }
  3302. type OrderCustomerMarketingRightsInfo struct {
  3303. // ExplicitMarketingPreference: Last known user selection regarding
  3304. // marketing preferences. In certain cases this selection might not be
  3305. // known, so this field would be empty.
  3306. ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"`
  3307. // LastUpdatedTimestamp: Timestamp when last time marketing preference
  3308. // was updated. Could be empty, if user wasn't offered a selection yet.
  3309. LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"`
  3310. // MarketingEmailAddress: Email address that can be used for marketing
  3311. // purposes. This field is only filled when explicitMarketingPreference
  3312. // is equal to 'granted'.
  3313. MarketingEmailAddress string `json:"marketingEmailAddress,omitempty"`
  3314. // ForceSendFields is a list of field names (e.g.
  3315. // "ExplicitMarketingPreference") to unconditionally include in API
  3316. // requests. By default, fields with empty values are omitted from API
  3317. // requests. However, any non-pointer, non-interface field appearing in
  3318. // ForceSendFields will be sent to the server regardless of whether the
  3319. // field is empty or not. This may be used to include empty fields in
  3320. // Patch requests.
  3321. ForceSendFields []string `json:"-"`
  3322. // NullFields is a list of field names (e.g.
  3323. // "ExplicitMarketingPreference") to include in API requests with the
  3324. // JSON null value. By default, fields with empty values are omitted
  3325. // from API requests. However, any field with an empty value appearing
  3326. // in NullFields will be sent to the server as null. It is an error if a
  3327. // field in this list has a non-empty value. This may be used to include
  3328. // null fields in Patch requests.
  3329. NullFields []string `json:"-"`
  3330. }
  3331. func (s *OrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) {
  3332. type NoMethod OrderCustomerMarketingRightsInfo
  3333. raw := NoMethod(*s)
  3334. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3335. }
  3336. type OrderDeliveryDetails struct {
  3337. // Address: The delivery address
  3338. Address *OrderAddress `json:"address,omitempty"`
  3339. // PhoneNumber: The phone number of the person receiving the delivery.
  3340. PhoneNumber string `json:"phoneNumber,omitempty"`
  3341. // ForceSendFields is a list of field names (e.g. "Address") to
  3342. // unconditionally include in API requests. By default, fields with
  3343. // empty values are omitted from API requests. However, any non-pointer,
  3344. // non-interface field appearing in ForceSendFields will be sent to the
  3345. // server regardless of whether the field is empty or not. This may be
  3346. // used to include empty fields in Patch requests.
  3347. ForceSendFields []string `json:"-"`
  3348. // NullFields is a list of field names (e.g. "Address") to include in
  3349. // API requests with the JSON null value. By default, fields with empty
  3350. // values are omitted from API requests. However, any field with an
  3351. // empty value appearing in NullFields will be sent to the server as
  3352. // null. It is an error if a field in this list has a non-empty value.
  3353. // This may be used to include null fields in Patch requests.
  3354. NullFields []string `json:"-"`
  3355. }
  3356. func (s *OrderDeliveryDetails) MarshalJSON() ([]byte, error) {
  3357. type NoMethod OrderDeliveryDetails
  3358. raw := NoMethod(*s)
  3359. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3360. }
  3361. type OrderLineItem struct {
  3362. // Annotations: Annotations that are attached to the line item.
  3363. Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"`
  3364. // Cancellations: Cancellations of the line item.
  3365. Cancellations []*OrderCancellation `json:"cancellations,omitempty"`
  3366. // Id: The id of the line item.
  3367. Id string `json:"id,omitempty"`
  3368. // Price: Total price for the line item. For example, if two items for
  3369. // $10 are purchased, the total price will be $20.
  3370. Price *Price `json:"price,omitempty"`
  3371. // Product: Product data from the time of the order placement.
  3372. Product *OrderLineItemProduct `json:"product,omitempty"`
  3373. // QuantityCanceled: Number of items canceled.
  3374. QuantityCanceled int64 `json:"quantityCanceled,omitempty"`
  3375. // QuantityDelivered: Number of items delivered.
  3376. QuantityDelivered int64 `json:"quantityDelivered,omitempty"`
  3377. // QuantityOrdered: Number of items ordered.
  3378. QuantityOrdered int64 `json:"quantityOrdered,omitempty"`
  3379. // QuantityPending: Number of items pending.
  3380. QuantityPending int64 `json:"quantityPending,omitempty"`
  3381. // QuantityReturned: Number of items returned.
  3382. QuantityReturned int64 `json:"quantityReturned,omitempty"`
  3383. // QuantityShipped: Number of items shipped.
  3384. QuantityShipped int64 `json:"quantityShipped,omitempty"`
  3385. // ReturnInfo: Details of the return policy for the line item.
  3386. ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"`
  3387. // Returns: Returns of the line item.
  3388. Returns []*OrderReturn `json:"returns,omitempty"`
  3389. // ShippingDetails: Details of the requested shipping for the line item.
  3390. ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"`
  3391. // Tax: Total tax amount for the line item. For example, if two items
  3392. // are purchased, and each have a cost tax of $2, the total tax amount
  3393. // will be $4.
  3394. Tax *Price `json:"tax,omitempty"`
  3395. // ForceSendFields is a list of field names (e.g. "Annotations") to
  3396. // unconditionally include in API requests. By default, fields with
  3397. // empty values are omitted from API requests. However, any non-pointer,
  3398. // non-interface field appearing in ForceSendFields will be sent to the
  3399. // server regardless of whether the field is empty or not. This may be
  3400. // used to include empty fields in Patch requests.
  3401. ForceSendFields []string `json:"-"`
  3402. // NullFields is a list of field names (e.g. "Annotations") to include
  3403. // in API requests with the JSON null value. By default, fields with
  3404. // empty values are omitted from API requests. However, any field with
  3405. // an empty value appearing in NullFields will be sent to the server as
  3406. // null. It is an error if a field in this list has a non-empty value.
  3407. // This may be used to include null fields in Patch requests.
  3408. NullFields []string `json:"-"`
  3409. }
  3410. func (s *OrderLineItem) MarshalJSON() ([]byte, error) {
  3411. type NoMethod OrderLineItem
  3412. raw := NoMethod(*s)
  3413. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3414. }
  3415. type OrderLineItemProduct struct {
  3416. // Brand: Brand of the item.
  3417. Brand string `json:"brand,omitempty"`
  3418. // Channel: The item's channel (online or local).
  3419. Channel string `json:"channel,omitempty"`
  3420. // Condition: Condition or state of the item.
  3421. Condition string `json:"condition,omitempty"`
  3422. // ContentLanguage: The two-letter ISO 639-1 language code for the item.
  3423. ContentLanguage string `json:"contentLanguage,omitempty"`
  3424. // Gtin: Global Trade Item Number (GTIN) of the item.
  3425. Gtin string `json:"gtin,omitempty"`
  3426. // Id: The REST id of the product.
  3427. Id string `json:"id,omitempty"`
  3428. // ImageLink: URL of an image of the item.
  3429. ImageLink string `json:"imageLink,omitempty"`
  3430. // ItemGroupId: Shared identifier for all variants of the same product.
  3431. ItemGroupId string `json:"itemGroupId,omitempty"`
  3432. // Mpn: Manufacturer Part Number (MPN) of the item.
  3433. Mpn string `json:"mpn,omitempty"`
  3434. // OfferId: An identifier of the item.
  3435. OfferId string `json:"offerId,omitempty"`
  3436. // Price: Price of the item.
  3437. Price *Price `json:"price,omitempty"`
  3438. // ShownImage: URL to the cached image shown to the user when order was
  3439. // placed.
  3440. ShownImage string `json:"shownImage,omitempty"`
  3441. // TargetCountry: The CLDR territory code of the target country of the
  3442. // product.
  3443. TargetCountry string `json:"targetCountry,omitempty"`
  3444. // Title: The title of the product.
  3445. Title string `json:"title,omitempty"`
  3446. // VariantAttributes: Variant attributes for the item. These are
  3447. // dimensions of the product, such as color, gender, material, pattern,
  3448. // and size. You can find a comprehensive list of variant attributes
  3449. // here.
  3450. VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"`
  3451. // ForceSendFields is a list of field names (e.g. "Brand") to
  3452. // unconditionally include in API requests. By default, fields with
  3453. // empty values are omitted from API requests. However, any non-pointer,
  3454. // non-interface field appearing in ForceSendFields will be sent to the
  3455. // server regardless of whether the field is empty or not. This may be
  3456. // used to include empty fields in Patch requests.
  3457. ForceSendFields []string `json:"-"`
  3458. // NullFields is a list of field names (e.g. "Brand") to include in API
  3459. // requests with the JSON null value. By default, fields with empty
  3460. // values are omitted from API requests. However, any field with an
  3461. // empty value appearing in NullFields will be sent to the server as
  3462. // null. It is an error if a field in this list has a non-empty value.
  3463. // This may be used to include null fields in Patch requests.
  3464. NullFields []string `json:"-"`
  3465. }
  3466. func (s *OrderLineItemProduct) MarshalJSON() ([]byte, error) {
  3467. type NoMethod OrderLineItemProduct
  3468. raw := NoMethod(*s)
  3469. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3470. }
  3471. type OrderLineItemProductVariantAttribute struct {
  3472. // Dimension: The dimension of the variant.
  3473. Dimension string `json:"dimension,omitempty"`
  3474. // Value: The value for the dimension.
  3475. Value string `json:"value,omitempty"`
  3476. // ForceSendFields is a list of field names (e.g. "Dimension") to
  3477. // unconditionally include in API requests. By default, fields with
  3478. // empty values are omitted from API requests. However, any non-pointer,
  3479. // non-interface field appearing in ForceSendFields will be sent to the
  3480. // server regardless of whether the field is empty or not. This may be
  3481. // used to include empty fields in Patch requests.
  3482. ForceSendFields []string `json:"-"`
  3483. // NullFields is a list of field names (e.g. "Dimension") to include in
  3484. // API requests with the JSON null value. By default, fields with empty
  3485. // values are omitted from API requests. However, any field with an
  3486. // empty value appearing in NullFields will be sent to the server as
  3487. // null. It is an error if a field in this list has a non-empty value.
  3488. // This may be used to include null fields in Patch requests.
  3489. NullFields []string `json:"-"`
  3490. }
  3491. func (s *OrderLineItemProductVariantAttribute) MarshalJSON() ([]byte, error) {
  3492. type NoMethod OrderLineItemProductVariantAttribute
  3493. raw := NoMethod(*s)
  3494. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3495. }
  3496. type OrderLineItemReturnInfo struct {
  3497. // DaysToReturn: How many days later the item can be returned.
  3498. DaysToReturn int64 `json:"daysToReturn,omitempty"`
  3499. // IsReturnable: Whether the item is returnable.
  3500. IsReturnable bool `json:"isReturnable,omitempty"`
  3501. // PolicyUrl: URL of the item return policy.
  3502. PolicyUrl string `json:"policyUrl,omitempty"`
  3503. // ForceSendFields is a list of field names (e.g. "DaysToReturn") to
  3504. // unconditionally include in API requests. By default, fields with
  3505. // empty values are omitted from API requests. However, any non-pointer,
  3506. // non-interface field appearing in ForceSendFields will be sent to the
  3507. // server regardless of whether the field is empty or not. This may be
  3508. // used to include empty fields in Patch requests.
  3509. ForceSendFields []string `json:"-"`
  3510. // NullFields is a list of field names (e.g. "DaysToReturn") to include
  3511. // in API requests with the JSON null value. By default, fields with
  3512. // empty values are omitted from API requests. However, any field with
  3513. // an empty value appearing in NullFields will be sent to the server as
  3514. // null. It is an error if a field in this list has a non-empty value.
  3515. // This may be used to include null fields in Patch requests.
  3516. NullFields []string `json:"-"`
  3517. }
  3518. func (s *OrderLineItemReturnInfo) MarshalJSON() ([]byte, error) {
  3519. type NoMethod OrderLineItemReturnInfo
  3520. raw := NoMethod(*s)
  3521. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3522. }
  3523. type OrderLineItemShippingDetails struct {
  3524. // DeliverByDate: The delivery by date, in ISO 8601 format.
  3525. DeliverByDate string `json:"deliverByDate,omitempty"`
  3526. // Method: Details of the shipping method.
  3527. Method *OrderLineItemShippingDetailsMethod `json:"method,omitempty"`
  3528. // ShipByDate: The ship by date, in ISO 8601 format.
  3529. ShipByDate string `json:"shipByDate,omitempty"`
  3530. // ForceSendFields is a list of field names (e.g. "DeliverByDate") to
  3531. // unconditionally include in API requests. By default, fields with
  3532. // empty values are omitted from API requests. However, any non-pointer,
  3533. // non-interface field appearing in ForceSendFields will be sent to the
  3534. // server regardless of whether the field is empty or not. This may be
  3535. // used to include empty fields in Patch requests.
  3536. ForceSendFields []string `json:"-"`
  3537. // NullFields is a list of field names (e.g. "DeliverByDate") to include
  3538. // in API requests with the JSON null value. By default, fields with
  3539. // empty values are omitted from API requests. However, any field with
  3540. // an empty value appearing in NullFields will be sent to the server as
  3541. // null. It is an error if a field in this list has a non-empty value.
  3542. // This may be used to include null fields in Patch requests.
  3543. NullFields []string `json:"-"`
  3544. }
  3545. func (s *OrderLineItemShippingDetails) MarshalJSON() ([]byte, error) {
  3546. type NoMethod OrderLineItemShippingDetails
  3547. raw := NoMethod(*s)
  3548. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3549. }
  3550. type OrderLineItemShippingDetailsMethod struct {
  3551. // Carrier: The carrier for the shipping. Optional. See
  3552. // shipments[].carrier for a list of acceptable values.
  3553. Carrier string `json:"carrier,omitempty"`
  3554. // MaxDaysInTransit: Maximum transit time.
  3555. MaxDaysInTransit int64 `json:"maxDaysInTransit,omitempty"`
  3556. // MethodName: The name of the shipping method.
  3557. MethodName string `json:"methodName,omitempty"`
  3558. // MinDaysInTransit: Minimum transit time.
  3559. MinDaysInTransit int64 `json:"minDaysInTransit,omitempty"`
  3560. // ForceSendFields is a list of field names (e.g. "Carrier") to
  3561. // unconditionally include in API requests. By default, fields with
  3562. // empty values are omitted from API requests. However, any non-pointer,
  3563. // non-interface field appearing in ForceSendFields will be sent to the
  3564. // server regardless of whether the field is empty or not. This may be
  3565. // used to include empty fields in Patch requests.
  3566. ForceSendFields []string `json:"-"`
  3567. // NullFields is a list of field names (e.g. "Carrier") to include in
  3568. // API requests with the JSON null value. By default, fields with empty
  3569. // values are omitted from API requests. However, any field with an
  3570. // empty value appearing in NullFields will be sent to the server as
  3571. // null. It is an error if a field in this list has a non-empty value.
  3572. // This may be used to include null fields in Patch requests.
  3573. NullFields []string `json:"-"`
  3574. }
  3575. func (s *OrderLineItemShippingDetailsMethod) MarshalJSON() ([]byte, error) {
  3576. type NoMethod OrderLineItemShippingDetailsMethod
  3577. raw := NoMethod(*s)
  3578. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3579. }
  3580. type OrderMerchantProvidedAnnotation struct {
  3581. // Key: Key for additional merchant provided (as key-value pairs)
  3582. // annotation about the line item.
  3583. Key string `json:"key,omitempty"`
  3584. // Value: Value for additional merchant provided (as key-value pairs)
  3585. // annotation about the line item.
  3586. Value string `json:"value,omitempty"`
  3587. // ForceSendFields is a list of field names (e.g. "Key") to
  3588. // unconditionally include in API requests. By default, fields with
  3589. // empty values are omitted from API requests. However, any non-pointer,
  3590. // non-interface field appearing in ForceSendFields will be sent to the
  3591. // server regardless of whether the field is empty or not. This may be
  3592. // used to include empty fields in Patch requests.
  3593. ForceSendFields []string `json:"-"`
  3594. // NullFields is a list of field names (e.g. "Key") to include in API
  3595. // requests with the JSON null value. By default, fields with empty
  3596. // values are omitted from API requests. However, any field with an
  3597. // empty value appearing in NullFields will be sent to the server as
  3598. // null. It is an error if a field in this list has a non-empty value.
  3599. // This may be used to include null fields in Patch requests.
  3600. NullFields []string `json:"-"`
  3601. }
  3602. func (s *OrderMerchantProvidedAnnotation) MarshalJSON() ([]byte, error) {
  3603. type NoMethod OrderMerchantProvidedAnnotation
  3604. raw := NoMethod(*s)
  3605. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3606. }
  3607. type OrderPaymentMethod struct {
  3608. // BillingAddress: The billing address.
  3609. BillingAddress *OrderAddress `json:"billingAddress,omitempty"`
  3610. // ExpirationMonth: The card expiration month (January = 1, February = 2
  3611. // etc.).
  3612. ExpirationMonth int64 `json:"expirationMonth,omitempty"`
  3613. // ExpirationYear: The card expiration year (4-digit, e.g. 2015).
  3614. ExpirationYear int64 `json:"expirationYear,omitempty"`
  3615. // LastFourDigits: The last four digits of the card number.
  3616. LastFourDigits string `json:"lastFourDigits,omitempty"`
  3617. // PhoneNumber: The billing phone number.
  3618. PhoneNumber string `json:"phoneNumber,omitempty"`
  3619. // Type: The type of instrument.
  3620. //
  3621. // Acceptable values are:
  3622. // - "AMEX"
  3623. // - "DISCOVER"
  3624. // - "JCB"
  3625. // - "MASTERCARD"
  3626. // - "UNIONPAY"
  3627. // - "VISA"
  3628. // - ""
  3629. Type string `json:"type,omitempty"`
  3630. // ForceSendFields is a list of field names (e.g. "BillingAddress") to
  3631. // unconditionally include in API requests. By default, fields with
  3632. // empty values are omitted from API requests. However, any non-pointer,
  3633. // non-interface field appearing in ForceSendFields will be sent to the
  3634. // server regardless of whether the field is empty or not. This may be
  3635. // used to include empty fields in Patch requests.
  3636. ForceSendFields []string `json:"-"`
  3637. // NullFields is a list of field names (e.g. "BillingAddress") to
  3638. // include in API requests with the JSON null value. By default, fields
  3639. // with empty values are omitted from API requests. However, any field
  3640. // with an empty value appearing in NullFields will be sent to the
  3641. // server as null. It is an error if a field in this list has a
  3642. // non-empty value. This may be used to include null fields in Patch
  3643. // requests.
  3644. NullFields []string `json:"-"`
  3645. }
  3646. func (s *OrderPaymentMethod) MarshalJSON() ([]byte, error) {
  3647. type NoMethod OrderPaymentMethod
  3648. raw := NoMethod(*s)
  3649. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3650. }
  3651. type OrderPromotion struct {
  3652. Benefits []*OrderPromotionBenefit `json:"benefits,omitempty"`
  3653. // EffectiveDates: The date and time frame when the promotion is active
  3654. // and ready for validation review. Note that the promotion live time
  3655. // may be delayed for a few hours due to the validation review.
  3656. // Start date and end date are separated by a forward slash (/). The
  3657. // start date is specified by the format (YYYY-MM-DD), followed by the
  3658. // letter ?T?, the time of the day when the sale starts (in Greenwich
  3659. // Mean Time, GMT), followed by an expression of the time zone for the
  3660. // sale. The end date is in the same format.
  3661. EffectiveDates string `json:"effectiveDates,omitempty"`
  3662. // GenericRedemptionCode: Optional. The text code that corresponds to
  3663. // the promotion when applied on the retailer?s website.
  3664. GenericRedemptionCode string `json:"genericRedemptionCode,omitempty"`
  3665. // Id: The unique ID of the promotion.
  3666. Id string `json:"id,omitempty"`
  3667. // LongTitle: The full title of the promotion.
  3668. LongTitle string `json:"longTitle,omitempty"`
  3669. // ProductApplicability: Whether the promotion is applicable to all
  3670. // products or only specific products.
  3671. ProductApplicability string `json:"productApplicability,omitempty"`
  3672. // RedemptionChannel: Indicates that the promotion is valid online.
  3673. RedemptionChannel string `json:"redemptionChannel,omitempty"`
  3674. // ForceSendFields is a list of field names (e.g. "Benefits") to
  3675. // unconditionally include in API requests. By default, fields with
  3676. // empty values are omitted from API requests. However, any non-pointer,
  3677. // non-interface field appearing in ForceSendFields will be sent to the
  3678. // server regardless of whether the field is empty or not. This may be
  3679. // used to include empty fields in Patch requests.
  3680. ForceSendFields []string `json:"-"`
  3681. // NullFields is a list of field names (e.g. "Benefits") to include in
  3682. // API requests with the JSON null value. By default, fields with empty
  3683. // values are omitted from API requests. However, any field with an
  3684. // empty value appearing in NullFields will be sent to the server as
  3685. // null. It is an error if a field in this list has a non-empty value.
  3686. // This may be used to include null fields in Patch requests.
  3687. NullFields []string `json:"-"`
  3688. }
  3689. func (s *OrderPromotion) MarshalJSON() ([]byte, error) {
  3690. type NoMethod OrderPromotion
  3691. raw := NoMethod(*s)
  3692. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3693. }
  3694. type OrderPromotionBenefit struct {
  3695. // Discount: The discount in the order price when the promotion is
  3696. // applied.
  3697. Discount *Price `json:"discount,omitempty"`
  3698. // OfferIds: The OfferId(s) that were purchased in this order and map to
  3699. // this specific benefit of the promotion.
  3700. OfferIds []string `json:"offerIds,omitempty"`
  3701. // SubType: Further describes the benefit of the promotion. Note that we
  3702. // will expand on this enumeration as we support new promotion
  3703. // sub-types.
  3704. SubType string `json:"subType,omitempty"`
  3705. // TaxImpact: The impact on tax when the promotion is applied.
  3706. TaxImpact *Price `json:"taxImpact,omitempty"`
  3707. // Type: Describes whether the promotion applies to products (e.g. 20%
  3708. // off) or to shipping (e.g. Free Shipping).
  3709. Type string `json:"type,omitempty"`
  3710. // ForceSendFields is a list of field names (e.g. "Discount") to
  3711. // unconditionally include in API requests. By default, fields with
  3712. // empty values are omitted from API requests. However, any non-pointer,
  3713. // non-interface field appearing in ForceSendFields will be sent to the
  3714. // server regardless of whether the field is empty or not. This may be
  3715. // used to include empty fields in Patch requests.
  3716. ForceSendFields []string `json:"-"`
  3717. // NullFields is a list of field names (e.g. "Discount") to include in
  3718. // API requests with the JSON null value. By default, fields with empty
  3719. // values are omitted from API requests. However, any field with an
  3720. // empty value appearing in NullFields will be sent to the server as
  3721. // null. It is an error if a field in this list has a non-empty value.
  3722. // This may be used to include null fields in Patch requests.
  3723. NullFields []string `json:"-"`
  3724. }
  3725. func (s *OrderPromotionBenefit) MarshalJSON() ([]byte, error) {
  3726. type NoMethod OrderPromotionBenefit
  3727. raw := NoMethod(*s)
  3728. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3729. }
  3730. type OrderRefund struct {
  3731. // Actor: The actor that created the refund.
  3732. Actor string `json:"actor,omitempty"`
  3733. // Amount: The amount that is refunded.
  3734. Amount *Price `json:"amount,omitempty"`
  3735. // CreationDate: Date on which the item has been created, in ISO 8601
  3736. // format.
  3737. CreationDate string `json:"creationDate,omitempty"`
  3738. // Reason: The reason for the refund.
  3739. Reason string `json:"reason,omitempty"`
  3740. // ReasonText: The explanation of the reason.
  3741. ReasonText string `json:"reasonText,omitempty"`
  3742. // ForceSendFields is a list of field names (e.g. "Actor") to
  3743. // unconditionally include in API requests. By default, fields with
  3744. // empty values are omitted from API requests. However, any non-pointer,
  3745. // non-interface field appearing in ForceSendFields will be sent to the
  3746. // server regardless of whether the field is empty or not. This may be
  3747. // used to include empty fields in Patch requests.
  3748. ForceSendFields []string `json:"-"`
  3749. // NullFields is a list of field names (e.g. "Actor") to include in API
  3750. // requests with the JSON null value. By default, fields with empty
  3751. // values are omitted from API requests. However, any field with an
  3752. // empty value appearing in NullFields will be sent to the server as
  3753. // null. It is an error if a field in this list has a non-empty value.
  3754. // This may be used to include null fields in Patch requests.
  3755. NullFields []string `json:"-"`
  3756. }
  3757. func (s *OrderRefund) MarshalJSON() ([]byte, error) {
  3758. type NoMethod OrderRefund
  3759. raw := NoMethod(*s)
  3760. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3761. }
  3762. type OrderReturn struct {
  3763. // Actor: The actor that created the refund.
  3764. Actor string `json:"actor,omitempty"`
  3765. // CreationDate: Date on which the item has been created, in ISO 8601
  3766. // format.
  3767. CreationDate string `json:"creationDate,omitempty"`
  3768. // Quantity: Quantity that is returned.
  3769. Quantity int64 `json:"quantity,omitempty"`
  3770. // Reason: The reason for the return.
  3771. Reason string `json:"reason,omitempty"`
  3772. // ReasonText: The explanation of the reason.
  3773. ReasonText string `json:"reasonText,omitempty"`
  3774. // ForceSendFields is a list of field names (e.g. "Actor") to
  3775. // unconditionally include in API requests. By default, fields with
  3776. // empty values are omitted from API requests. However, any non-pointer,
  3777. // non-interface field appearing in ForceSendFields will be sent to the
  3778. // server regardless of whether the field is empty or not. This may be
  3779. // used to include empty fields in Patch requests.
  3780. ForceSendFields []string `json:"-"`
  3781. // NullFields is a list of field names (e.g. "Actor") to include in API
  3782. // requests with the JSON null value. By default, fields with empty
  3783. // values are omitted from API requests. However, any field with an
  3784. // empty value appearing in NullFields will be sent to the server as
  3785. // null. It is an error if a field in this list has a non-empty value.
  3786. // This may be used to include null fields in Patch requests.
  3787. NullFields []string `json:"-"`
  3788. }
  3789. func (s *OrderReturn) MarshalJSON() ([]byte, error) {
  3790. type NoMethod OrderReturn
  3791. raw := NoMethod(*s)
  3792. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3793. }
  3794. type OrderShipment struct {
  3795. // Carrier: The carrier handling the shipment.
  3796. //
  3797. // Acceptable values are:
  3798. // - "gsx"
  3799. // - "ups"
  3800. // - "usps"
  3801. // - "fedex"
  3802. // - "dhl"
  3803. // - "ecourier"
  3804. // - "cxt"
  3805. // - "google"
  3806. // - "ontrac"
  3807. // - "emsy"
  3808. // - "ont"
  3809. // - "deliv"
  3810. // - "dynamex"
  3811. // - "lasership"
  3812. // - "mpx"
  3813. // - "uds"
  3814. Carrier string `json:"carrier,omitempty"`
  3815. // CreationDate: Date on which the shipment has been created, in ISO
  3816. // 8601 format.
  3817. CreationDate string `json:"creationDate,omitempty"`
  3818. // DeliveryDate: Date on which the shipment has been delivered, in ISO
  3819. // 8601 format. Present only if status is delievered
  3820. DeliveryDate string `json:"deliveryDate,omitempty"`
  3821. // Id: The id of the shipment.
  3822. Id string `json:"id,omitempty"`
  3823. // LineItems: The line items that are shipped.
  3824. LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"`
  3825. // Status: The status of the shipment.
  3826. Status string `json:"status,omitempty"`
  3827. // TrackingId: The tracking id for the shipment.
  3828. TrackingId string `json:"trackingId,omitempty"`
  3829. // ForceSendFields is a list of field names (e.g. "Carrier") to
  3830. // unconditionally include in API requests. By default, fields with
  3831. // empty values are omitted from API requests. However, any non-pointer,
  3832. // non-interface field appearing in ForceSendFields will be sent to the
  3833. // server regardless of whether the field is empty or not. This may be
  3834. // used to include empty fields in Patch requests.
  3835. ForceSendFields []string `json:"-"`
  3836. // NullFields is a list of field names (e.g. "Carrier") to include in
  3837. // API requests with the JSON null value. By default, fields with empty
  3838. // values are omitted from API requests. However, any field with an
  3839. // empty value appearing in NullFields will be sent to the server as
  3840. // null. It is an error if a field in this list has a non-empty value.
  3841. // This may be used to include null fields in Patch requests.
  3842. NullFields []string `json:"-"`
  3843. }
  3844. func (s *OrderShipment) MarshalJSON() ([]byte, error) {
  3845. type NoMethod OrderShipment
  3846. raw := NoMethod(*s)
  3847. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3848. }
  3849. type OrderShipmentLineItemShipment struct {
  3850. // LineItemId: The id of the line item that is shipped. Either
  3851. // lineItemId or productId is required.
  3852. LineItemId string `json:"lineItemId,omitempty"`
  3853. // ProductId: The ID of the product to ship. This is the REST ID used in
  3854. // the products service. Either lineItemId or productId is required.
  3855. ProductId string `json:"productId,omitempty"`
  3856. // Quantity: The quantity that is shipped.
  3857. Quantity int64 `json:"quantity,omitempty"`
  3858. // ForceSendFields is a list of field names (e.g. "LineItemId") to
  3859. // unconditionally include in API requests. By default, fields with
  3860. // empty values are omitted from API requests. However, any non-pointer,
  3861. // non-interface field appearing in ForceSendFields will be sent to the
  3862. // server regardless of whether the field is empty or not. This may be
  3863. // used to include empty fields in Patch requests.
  3864. ForceSendFields []string `json:"-"`
  3865. // NullFields is a list of field names (e.g. "LineItemId") to include in
  3866. // API requests with the JSON null value. By default, fields with empty
  3867. // values are omitted from API requests. However, any field with an
  3868. // empty value appearing in NullFields will be sent to the server as
  3869. // null. It is an error if a field in this list has a non-empty value.
  3870. // This may be used to include null fields in Patch requests.
  3871. NullFields []string `json:"-"`
  3872. }
  3873. func (s *OrderShipmentLineItemShipment) MarshalJSON() ([]byte, error) {
  3874. type NoMethod OrderShipmentLineItemShipment
  3875. raw := NoMethod(*s)
  3876. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3877. }
  3878. type OrderinvoicesCreateChargeInvoiceRequest struct {
  3879. // InvoiceId: The ID of the invoice.
  3880. InvoiceId string `json:"invoiceId,omitempty"`
  3881. // InvoiceSummary: Invoice summary.
  3882. InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"`
  3883. // LineItemInvoices: Invoice details per line item.
  3884. LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"`
  3885. // OperationId: The ID of the operation, unique across all operations
  3886. // for a given order.
  3887. OperationId string `json:"operationId,omitempty"`
  3888. // ShipmentGroupId: ID of the shipment group.
  3889. ShipmentGroupId string `json:"shipmentGroupId,omitempty"`
  3890. // ForceSendFields is a list of field names (e.g. "InvoiceId") to
  3891. // unconditionally include in API requests. By default, fields with
  3892. // empty values are omitted from API requests. However, any non-pointer,
  3893. // non-interface field appearing in ForceSendFields will be sent to the
  3894. // server regardless of whether the field is empty or not. This may be
  3895. // used to include empty fields in Patch requests.
  3896. ForceSendFields []string `json:"-"`
  3897. // NullFields is a list of field names (e.g. "InvoiceId") to include in
  3898. // API requests with the JSON null value. By default, fields with empty
  3899. // values are omitted from API requests. However, any field with an
  3900. // empty value appearing in NullFields will be sent to the server as
  3901. // null. It is an error if a field in this list has a non-empty value.
  3902. // This may be used to include null fields in Patch requests.
  3903. NullFields []string `json:"-"`
  3904. }
  3905. func (s *OrderinvoicesCreateChargeInvoiceRequest) MarshalJSON() ([]byte, error) {
  3906. type NoMethod OrderinvoicesCreateChargeInvoiceRequest
  3907. raw := NoMethod(*s)
  3908. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3909. }
  3910. type OrderinvoicesCreateChargeInvoiceResponse struct {
  3911. // ExecutionStatus: The status of the execution.
  3912. ExecutionStatus string `json:"executionStatus,omitempty"`
  3913. // Kind: Identifies what kind of resource this is. Value: the fixed
  3914. // string "content#orderinvoicesCreateChargeInvoiceResponse".
  3915. Kind string `json:"kind,omitempty"`
  3916. // ServerResponse contains the HTTP response code and headers from the
  3917. // server.
  3918. googleapi.ServerResponse `json:"-"`
  3919. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  3920. // unconditionally include in API requests. By default, fields with
  3921. // empty values are omitted from API requests. However, any non-pointer,
  3922. // non-interface field appearing in ForceSendFields will be sent to the
  3923. // server regardless of whether the field is empty or not. This may be
  3924. // used to include empty fields in Patch requests.
  3925. ForceSendFields []string `json:"-"`
  3926. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  3927. // include in API requests with the JSON null value. By default, fields
  3928. // with empty values are omitted from API requests. However, any field
  3929. // with an empty value appearing in NullFields will be sent to the
  3930. // server as null. It is an error if a field in this list has a
  3931. // non-empty value. This may be used to include null fields in Patch
  3932. // requests.
  3933. NullFields []string `json:"-"`
  3934. }
  3935. func (s *OrderinvoicesCreateChargeInvoiceResponse) MarshalJSON() ([]byte, error) {
  3936. type NoMethod OrderinvoicesCreateChargeInvoiceResponse
  3937. raw := NoMethod(*s)
  3938. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3939. }
  3940. type OrderinvoicesCreateRefundInvoiceRequest struct {
  3941. // InvoiceId: The ID of the invoice.
  3942. InvoiceId string `json:"invoiceId,omitempty"`
  3943. // OperationId: The ID of the operation, unique across all operations
  3944. // for a given order.
  3945. OperationId string `json:"operationId,omitempty"`
  3946. // RefundOnlyOption: Option to create a refund-only invoice. Exactly one
  3947. // of refund_option and return_option must be provided.
  3948. RefundOnlyOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption `json:"refundOnlyOption,omitempty"`
  3949. // ReturnOption: Option to create an invoice for a refund and mark all
  3950. // items within the invoice as returned. Exactly one of refund_option
  3951. // and return_option must be provided.
  3952. ReturnOption *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption `json:"returnOption,omitempty"`
  3953. // ShipmentInvoices: Invoice details for different shipment groups.
  3954. ShipmentInvoices []*ShipmentInvoice `json:"shipmentInvoices,omitempty"`
  3955. // ForceSendFields is a list of field names (e.g. "InvoiceId") to
  3956. // unconditionally include in API requests. By default, fields with
  3957. // empty values are omitted from API requests. However, any non-pointer,
  3958. // non-interface field appearing in ForceSendFields will be sent to the
  3959. // server regardless of whether the field is empty or not. This may be
  3960. // used to include empty fields in Patch requests.
  3961. ForceSendFields []string `json:"-"`
  3962. // NullFields is a list of field names (e.g. "InvoiceId") to include in
  3963. // API requests with the JSON null value. By default, fields with empty
  3964. // values are omitted from API requests. However, any field with an
  3965. // empty value appearing in NullFields will be sent to the server as
  3966. // null. It is an error if a field in this list has a non-empty value.
  3967. // This may be used to include null fields in Patch requests.
  3968. NullFields []string `json:"-"`
  3969. }
  3970. func (s *OrderinvoicesCreateRefundInvoiceRequest) MarshalJSON() ([]byte, error) {
  3971. type NoMethod OrderinvoicesCreateRefundInvoiceRequest
  3972. raw := NoMethod(*s)
  3973. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  3974. }
  3975. type OrderinvoicesCreateRefundInvoiceResponse struct {
  3976. // ExecutionStatus: The status of the execution.
  3977. ExecutionStatus string `json:"executionStatus,omitempty"`
  3978. // Kind: Identifies what kind of resource this is. Value: the fixed
  3979. // string "content#orderinvoicesCreateRefundInvoiceResponse".
  3980. Kind string `json:"kind,omitempty"`
  3981. // ServerResponse contains the HTTP response code and headers from the
  3982. // server.
  3983. googleapi.ServerResponse `json:"-"`
  3984. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  3985. // unconditionally include in API requests. By default, fields with
  3986. // empty values are omitted from API requests. However, any non-pointer,
  3987. // non-interface field appearing in ForceSendFields will be sent to the
  3988. // server regardless of whether the field is empty or not. This may be
  3989. // used to include empty fields in Patch requests.
  3990. ForceSendFields []string `json:"-"`
  3991. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  3992. // include in API requests with the JSON null value. By default, fields
  3993. // with empty values are omitted from API requests. However, any field
  3994. // with an empty value appearing in NullFields will be sent to the
  3995. // server as null. It is an error if a field in this list has a
  3996. // non-empty value. This may be used to include null fields in Patch
  3997. // requests.
  3998. NullFields []string `json:"-"`
  3999. }
  4000. func (s *OrderinvoicesCreateRefundInvoiceResponse) MarshalJSON() ([]byte, error) {
  4001. type NoMethod OrderinvoicesCreateRefundInvoiceResponse
  4002. raw := NoMethod(*s)
  4003. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4004. }
  4005. type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption struct {
  4006. // Description: Optional description of the refund reason.
  4007. Description string `json:"description,omitempty"`
  4008. // Reason: Reason for the refund.
  4009. Reason string `json:"reason,omitempty"`
  4010. // ForceSendFields is a list of field names (e.g. "Description") to
  4011. // unconditionally include in API requests. By default, fields with
  4012. // empty values are omitted from API requests. However, any non-pointer,
  4013. // non-interface field appearing in ForceSendFields will be sent to the
  4014. // server regardless of whether the field is empty or not. This may be
  4015. // used to include empty fields in Patch requests.
  4016. ForceSendFields []string `json:"-"`
  4017. // NullFields is a list of field names (e.g. "Description") to include
  4018. // in API requests with the JSON null value. By default, fields with
  4019. // empty values are omitted from API requests. However, any field with
  4020. // an empty value appearing in NullFields will be sent to the server as
  4021. // null. It is an error if a field in this list has a non-empty value.
  4022. // This may be used to include null fields in Patch requests.
  4023. NullFields []string `json:"-"`
  4024. }
  4025. func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption) MarshalJSON() ([]byte, error) {
  4026. type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceRefundOption
  4027. raw := NoMethod(*s)
  4028. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4029. }
  4030. type OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption struct {
  4031. // Description: Optional description of the return reason.
  4032. Description string `json:"description,omitempty"`
  4033. // Reason: Reason for the return.
  4034. Reason string `json:"reason,omitempty"`
  4035. // ForceSendFields is a list of field names (e.g. "Description") to
  4036. // unconditionally include in API requests. By default, fields with
  4037. // empty values are omitted from API requests. However, any non-pointer,
  4038. // non-interface field appearing in ForceSendFields will be sent to the
  4039. // server regardless of whether the field is empty or not. This may be
  4040. // used to include empty fields in Patch requests.
  4041. ForceSendFields []string `json:"-"`
  4042. // NullFields is a list of field names (e.g. "Description") to include
  4043. // in API requests with the JSON null value. By default, fields with
  4044. // empty values are omitted from API requests. However, any field with
  4045. // an empty value appearing in NullFields will be sent to the server as
  4046. // null. It is an error if a field in this list has a non-empty value.
  4047. // This may be used to include null fields in Patch requests.
  4048. NullFields []string `json:"-"`
  4049. }
  4050. func (s *OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption) MarshalJSON() ([]byte, error) {
  4051. type NoMethod OrderinvoicesCustomBatchRequestEntryCreateRefundInvoiceReturnOption
  4052. raw := NoMethod(*s)
  4053. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4054. }
  4055. type OrderpaymentsNotifyAuthApprovedRequest struct {
  4056. AuthAmountPretax *Price `json:"authAmountPretax,omitempty"`
  4057. AuthAmountTax *Price `json:"authAmountTax,omitempty"`
  4058. // ForceSendFields is a list of field names (e.g. "AuthAmountPretax") to
  4059. // unconditionally include in API requests. By default, fields with
  4060. // empty values are omitted from API requests. However, any non-pointer,
  4061. // non-interface field appearing in ForceSendFields will be sent to the
  4062. // server regardless of whether the field is empty or not. This may be
  4063. // used to include empty fields in Patch requests.
  4064. ForceSendFields []string `json:"-"`
  4065. // NullFields is a list of field names (e.g. "AuthAmountPretax") to
  4066. // include in API requests with the JSON null value. By default, fields
  4067. // with empty values are omitted from API requests. However, any field
  4068. // with an empty value appearing in NullFields will be sent to the
  4069. // server as null. It is an error if a field in this list has a
  4070. // non-empty value. This may be used to include null fields in Patch
  4071. // requests.
  4072. NullFields []string `json:"-"`
  4073. }
  4074. func (s *OrderpaymentsNotifyAuthApprovedRequest) MarshalJSON() ([]byte, error) {
  4075. type NoMethod OrderpaymentsNotifyAuthApprovedRequest
  4076. raw := NoMethod(*s)
  4077. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4078. }
  4079. type OrderpaymentsNotifyAuthApprovedResponse struct {
  4080. // ExecutionStatus: The status of the execution.
  4081. ExecutionStatus string `json:"executionStatus,omitempty"`
  4082. // Kind: Identifies what kind of resource this is. Value: the fixed
  4083. // string "content#orderpaymentsNotifyAuthApprovedResponse".
  4084. Kind string `json:"kind,omitempty"`
  4085. // ServerResponse contains the HTTP response code and headers from the
  4086. // server.
  4087. googleapi.ServerResponse `json:"-"`
  4088. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  4089. // unconditionally include in API requests. By default, fields with
  4090. // empty values are omitted from API requests. However, any non-pointer,
  4091. // non-interface field appearing in ForceSendFields will be sent to the
  4092. // server regardless of whether the field is empty or not. This may be
  4093. // used to include empty fields in Patch requests.
  4094. ForceSendFields []string `json:"-"`
  4095. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  4096. // include in API requests with the JSON null value. By default, fields
  4097. // with empty values are omitted from API requests. However, any field
  4098. // with an empty value appearing in NullFields will be sent to the
  4099. // server as null. It is an error if a field in this list has a
  4100. // non-empty value. This may be used to include null fields in Patch
  4101. // requests.
  4102. NullFields []string `json:"-"`
  4103. }
  4104. func (s *OrderpaymentsNotifyAuthApprovedResponse) MarshalJSON() ([]byte, error) {
  4105. type NoMethod OrderpaymentsNotifyAuthApprovedResponse
  4106. raw := NoMethod(*s)
  4107. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4108. }
  4109. type OrderpaymentsNotifyAuthDeclinedRequest struct {
  4110. // DeclineReason: Reason why payment authorization was declined.
  4111. DeclineReason string `json:"declineReason,omitempty"`
  4112. // ForceSendFields is a list of field names (e.g. "DeclineReason") to
  4113. // unconditionally include in API requests. By default, fields with
  4114. // empty values are omitted from API requests. However, any non-pointer,
  4115. // non-interface field appearing in ForceSendFields will be sent to the
  4116. // server regardless of whether the field is empty or not. This may be
  4117. // used to include empty fields in Patch requests.
  4118. ForceSendFields []string `json:"-"`
  4119. // NullFields is a list of field names (e.g. "DeclineReason") to include
  4120. // in API requests with the JSON null value. By default, fields with
  4121. // empty values are omitted from API requests. However, any field with
  4122. // an empty value appearing in NullFields will be sent to the server as
  4123. // null. It is an error if a field in this list has a non-empty value.
  4124. // This may be used to include null fields in Patch requests.
  4125. NullFields []string `json:"-"`
  4126. }
  4127. func (s *OrderpaymentsNotifyAuthDeclinedRequest) MarshalJSON() ([]byte, error) {
  4128. type NoMethod OrderpaymentsNotifyAuthDeclinedRequest
  4129. raw := NoMethod(*s)
  4130. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4131. }
  4132. type OrderpaymentsNotifyAuthDeclinedResponse struct {
  4133. // ExecutionStatus: The status of the execution.
  4134. ExecutionStatus string `json:"executionStatus,omitempty"`
  4135. // Kind: Identifies what kind of resource this is. Value: the fixed
  4136. // string "content#orderpaymentsNotifyAuthDeclinedResponse".
  4137. Kind string `json:"kind,omitempty"`
  4138. // ServerResponse contains the HTTP response code and headers from the
  4139. // server.
  4140. googleapi.ServerResponse `json:"-"`
  4141. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  4142. // unconditionally include in API requests. By default, fields with
  4143. // empty values are omitted from API requests. However, any non-pointer,
  4144. // non-interface field appearing in ForceSendFields will be sent to the
  4145. // server regardless of whether the field is empty or not. This may be
  4146. // used to include empty fields in Patch requests.
  4147. ForceSendFields []string `json:"-"`
  4148. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  4149. // include in API requests with the JSON null value. By default, fields
  4150. // with empty values are omitted from API requests. However, any field
  4151. // with an empty value appearing in NullFields will be sent to the
  4152. // server as null. It is an error if a field in this list has a
  4153. // non-empty value. This may be used to include null fields in Patch
  4154. // requests.
  4155. NullFields []string `json:"-"`
  4156. }
  4157. func (s *OrderpaymentsNotifyAuthDeclinedResponse) MarshalJSON() ([]byte, error) {
  4158. type NoMethod OrderpaymentsNotifyAuthDeclinedResponse
  4159. raw := NoMethod(*s)
  4160. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4161. }
  4162. type OrderpaymentsNotifyChargeRequest struct {
  4163. // ChargeState: Whether charge was successful.
  4164. ChargeState string `json:"chargeState,omitempty"`
  4165. // InvoiceId: Invoice ID from orderInvoice service that corresponds to
  4166. // the charge.
  4167. InvoiceId string `json:"invoiceId,omitempty"`
  4168. // ForceSendFields is a list of field names (e.g. "ChargeState") to
  4169. // unconditionally include in API requests. By default, fields with
  4170. // empty values are omitted from API requests. However, any non-pointer,
  4171. // non-interface field appearing in ForceSendFields will be sent to the
  4172. // server regardless of whether the field is empty or not. This may be
  4173. // used to include empty fields in Patch requests.
  4174. ForceSendFields []string `json:"-"`
  4175. // NullFields is a list of field names (e.g. "ChargeState") to include
  4176. // in API requests with the JSON null value. By default, fields with
  4177. // empty values are omitted from API requests. However, any field with
  4178. // an empty value appearing in NullFields will be sent to the server as
  4179. // null. It is an error if a field in this list has a non-empty value.
  4180. // This may be used to include null fields in Patch requests.
  4181. NullFields []string `json:"-"`
  4182. }
  4183. func (s *OrderpaymentsNotifyChargeRequest) MarshalJSON() ([]byte, error) {
  4184. type NoMethod OrderpaymentsNotifyChargeRequest
  4185. raw := NoMethod(*s)
  4186. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4187. }
  4188. type OrderpaymentsNotifyChargeResponse struct {
  4189. // ExecutionStatus: The status of the execution.
  4190. ExecutionStatus string `json:"executionStatus,omitempty"`
  4191. // Kind: Identifies what kind of resource this is. Value: the fixed
  4192. // string "content#orderpaymentsNotifyChargeResponse".
  4193. Kind string `json:"kind,omitempty"`
  4194. // ServerResponse contains the HTTP response code and headers from the
  4195. // server.
  4196. googleapi.ServerResponse `json:"-"`
  4197. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  4198. // unconditionally include in API requests. By default, fields with
  4199. // empty values are omitted from API requests. However, any non-pointer,
  4200. // non-interface field appearing in ForceSendFields will be sent to the
  4201. // server regardless of whether the field is empty or not. This may be
  4202. // used to include empty fields in Patch requests.
  4203. ForceSendFields []string `json:"-"`
  4204. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  4205. // include in API requests with the JSON null value. By default, fields
  4206. // with empty values are omitted from API requests. However, any field
  4207. // with an empty value appearing in NullFields will be sent to the
  4208. // server as null. It is an error if a field in this list has a
  4209. // non-empty value. This may be used to include null fields in Patch
  4210. // requests.
  4211. NullFields []string `json:"-"`
  4212. }
  4213. func (s *OrderpaymentsNotifyChargeResponse) MarshalJSON() ([]byte, error) {
  4214. type NoMethod OrderpaymentsNotifyChargeResponse
  4215. raw := NoMethod(*s)
  4216. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4217. }
  4218. type OrderpaymentsNotifyRefundRequest struct {
  4219. // InvoiceId: Invoice ID from orderInvoice service that corresponds to
  4220. // the charge.
  4221. InvoiceId string `json:"invoiceId,omitempty"`
  4222. // RefundState: Whether refund was successful.
  4223. RefundState string `json:"refundState,omitempty"`
  4224. // ForceSendFields is a list of field names (e.g. "InvoiceId") to
  4225. // unconditionally include in API requests. By default, fields with
  4226. // empty values are omitted from API requests. However, any non-pointer,
  4227. // non-interface field appearing in ForceSendFields will be sent to the
  4228. // server regardless of whether the field is empty or not. This may be
  4229. // used to include empty fields in Patch requests.
  4230. ForceSendFields []string `json:"-"`
  4231. // NullFields is a list of field names (e.g. "InvoiceId") to include in
  4232. // API requests with the JSON null value. By default, fields with empty
  4233. // values are omitted from API requests. However, any field with an
  4234. // empty value appearing in NullFields will be sent to the server as
  4235. // null. It is an error if a field in this list has a non-empty value.
  4236. // This may be used to include null fields in Patch requests.
  4237. NullFields []string `json:"-"`
  4238. }
  4239. func (s *OrderpaymentsNotifyRefundRequest) MarshalJSON() ([]byte, error) {
  4240. type NoMethod OrderpaymentsNotifyRefundRequest
  4241. raw := NoMethod(*s)
  4242. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4243. }
  4244. type OrderpaymentsNotifyRefundResponse struct {
  4245. // ExecutionStatus: The status of the execution.
  4246. ExecutionStatus string `json:"executionStatus,omitempty"`
  4247. // Kind: Identifies what kind of resource this is. Value: the fixed
  4248. // string "content#orderpaymentsNotifyRefundResponse".
  4249. Kind string `json:"kind,omitempty"`
  4250. // ServerResponse contains the HTTP response code and headers from the
  4251. // server.
  4252. googleapi.ServerResponse `json:"-"`
  4253. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  4254. // unconditionally include in API requests. By default, fields with
  4255. // empty values are omitted from API requests. However, any non-pointer,
  4256. // non-interface field appearing in ForceSendFields will be sent to the
  4257. // server regardless of whether the field is empty or not. This may be
  4258. // used to include empty fields in Patch requests.
  4259. ForceSendFields []string `json:"-"`
  4260. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  4261. // include in API requests with the JSON null value. By default, fields
  4262. // with empty values are omitted from API requests. However, any field
  4263. // with an empty value appearing in NullFields will be sent to the
  4264. // server as null. It is an error if a field in this list has a
  4265. // non-empty value. This may be used to include null fields in Patch
  4266. // requests.
  4267. NullFields []string `json:"-"`
  4268. }
  4269. func (s *OrderpaymentsNotifyRefundResponse) MarshalJSON() ([]byte, error) {
  4270. type NoMethod OrderpaymentsNotifyRefundResponse
  4271. raw := NoMethod(*s)
  4272. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4273. }
  4274. type OrdersAcknowledgeRequest struct {
  4275. // OperationId: The ID of the operation. Unique across all operations
  4276. // for a given order.
  4277. OperationId string `json:"operationId,omitempty"`
  4278. // ForceSendFields is a list of field names (e.g. "OperationId") to
  4279. // unconditionally include in API requests. By default, fields with
  4280. // empty values are omitted from API requests. However, any non-pointer,
  4281. // non-interface field appearing in ForceSendFields will be sent to the
  4282. // server regardless of whether the field is empty or not. This may be
  4283. // used to include empty fields in Patch requests.
  4284. ForceSendFields []string `json:"-"`
  4285. // NullFields is a list of field names (e.g. "OperationId") to include
  4286. // in API requests with the JSON null value. By default, fields with
  4287. // empty values are omitted from API requests. However, any field with
  4288. // an empty value appearing in NullFields will be sent to the server as
  4289. // null. It is an error if a field in this list has a non-empty value.
  4290. // This may be used to include null fields in Patch requests.
  4291. NullFields []string `json:"-"`
  4292. }
  4293. func (s *OrdersAcknowledgeRequest) MarshalJSON() ([]byte, error) {
  4294. type NoMethod OrdersAcknowledgeRequest
  4295. raw := NoMethod(*s)
  4296. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4297. }
  4298. type OrdersAcknowledgeResponse struct {
  4299. // ExecutionStatus: The status of the execution.
  4300. ExecutionStatus string `json:"executionStatus,omitempty"`
  4301. // Kind: Identifies what kind of resource this is. Value: the fixed
  4302. // string "content#ordersAcknowledgeResponse".
  4303. Kind string `json:"kind,omitempty"`
  4304. // ServerResponse contains the HTTP response code and headers from the
  4305. // server.
  4306. googleapi.ServerResponse `json:"-"`
  4307. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  4308. // unconditionally include in API requests. By default, fields with
  4309. // empty values are omitted from API requests. However, any non-pointer,
  4310. // non-interface field appearing in ForceSendFields will be sent to the
  4311. // server regardless of whether the field is empty or not. This may be
  4312. // used to include empty fields in Patch requests.
  4313. ForceSendFields []string `json:"-"`
  4314. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  4315. // include in API requests with the JSON null value. By default, fields
  4316. // with empty values are omitted from API requests. However, any field
  4317. // with an empty value appearing in NullFields will be sent to the
  4318. // server as null. It is an error if a field in this list has a
  4319. // non-empty value. This may be used to include null fields in Patch
  4320. // requests.
  4321. NullFields []string `json:"-"`
  4322. }
  4323. func (s *OrdersAcknowledgeResponse) MarshalJSON() ([]byte, error) {
  4324. type NoMethod OrdersAcknowledgeResponse
  4325. raw := NoMethod(*s)
  4326. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4327. }
  4328. type OrdersAdvanceTestOrderResponse struct {
  4329. // Kind: Identifies what kind of resource this is. Value: the fixed
  4330. // string "content#ordersAdvanceTestOrderResponse".
  4331. Kind string `json:"kind,omitempty"`
  4332. // ServerResponse contains the HTTP response code and headers from the
  4333. // server.
  4334. googleapi.ServerResponse `json:"-"`
  4335. // ForceSendFields is a list of field names (e.g. "Kind") to
  4336. // unconditionally include in API requests. By default, fields with
  4337. // empty values are omitted from API requests. However, any non-pointer,
  4338. // non-interface field appearing in ForceSendFields will be sent to the
  4339. // server regardless of whether the field is empty or not. This may be
  4340. // used to include empty fields in Patch requests.
  4341. ForceSendFields []string `json:"-"`
  4342. // NullFields is a list of field names (e.g. "Kind") to include in API
  4343. // requests with the JSON null value. By default, fields with empty
  4344. // values are omitted from API requests. However, any field with an
  4345. // empty value appearing in NullFields will be sent to the server as
  4346. // null. It is an error if a field in this list has a non-empty value.
  4347. // This may be used to include null fields in Patch requests.
  4348. NullFields []string `json:"-"`
  4349. }
  4350. func (s *OrdersAdvanceTestOrderResponse) MarshalJSON() ([]byte, error) {
  4351. type NoMethod OrdersAdvanceTestOrderResponse
  4352. raw := NoMethod(*s)
  4353. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4354. }
  4355. type OrdersCancelLineItemRequest struct {
  4356. // Amount: Amount to refund for the cancelation. Optional. If not set,
  4357. // Google will calculate the default based on the price and tax of the
  4358. // items involved. The amount must not be larger than the net amount
  4359. // left on the order.
  4360. Amount *Price `json:"amount,omitempty"`
  4361. // AmountPretax: Amount to refund for the cancelation. Optional. If not
  4362. // set, Google will calculate the default based on the price and tax of
  4363. // the items involved. The amount must not be larger than the net amount
  4364. // left on the order.
  4365. AmountPretax *Price `json:"amountPretax,omitempty"`
  4366. // AmountTax: Tax amount that correspond to cancellation amount in
  4367. // amountPretax.
  4368. AmountTax *Price `json:"amountTax,omitempty"`
  4369. // LineItemId: The ID of the line item to cancel. Either lineItemId or
  4370. // productId is required.
  4371. LineItemId string `json:"lineItemId,omitempty"`
  4372. // OperationId: The ID of the operation. Unique across all operations
  4373. // for a given order.
  4374. OperationId string `json:"operationId,omitempty"`
  4375. // ProductId: The ID of the product to cancel. This is the REST ID used
  4376. // in the products service. Either lineItemId or productId is required.
  4377. ProductId string `json:"productId,omitempty"`
  4378. // Quantity: The quantity to cancel.
  4379. Quantity int64 `json:"quantity,omitempty"`
  4380. // Reason: The reason for the cancellation.
  4381. Reason string `json:"reason,omitempty"`
  4382. // ReasonText: The explanation of the reason.
  4383. ReasonText string `json:"reasonText,omitempty"`
  4384. // ForceSendFields is a list of field names (e.g. "Amount") to
  4385. // unconditionally include in API requests. By default, fields with
  4386. // empty values are omitted from API requests. However, any non-pointer,
  4387. // non-interface field appearing in ForceSendFields will be sent to the
  4388. // server regardless of whether the field is empty or not. This may be
  4389. // used to include empty fields in Patch requests.
  4390. ForceSendFields []string `json:"-"`
  4391. // NullFields is a list of field names (e.g. "Amount") to include in API
  4392. // requests with the JSON null value. By default, fields with empty
  4393. // values are omitted from API requests. However, any field with an
  4394. // empty value appearing in NullFields will be sent to the server as
  4395. // null. It is an error if a field in this list has a non-empty value.
  4396. // This may be used to include null fields in Patch requests.
  4397. NullFields []string `json:"-"`
  4398. }
  4399. func (s *OrdersCancelLineItemRequest) MarshalJSON() ([]byte, error) {
  4400. type NoMethod OrdersCancelLineItemRequest
  4401. raw := NoMethod(*s)
  4402. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4403. }
  4404. type OrdersCancelLineItemResponse struct {
  4405. // ExecutionStatus: The status of the execution.
  4406. ExecutionStatus string `json:"executionStatus,omitempty"`
  4407. // Kind: Identifies what kind of resource this is. Value: the fixed
  4408. // string "content#ordersCancelLineItemResponse".
  4409. Kind string `json:"kind,omitempty"`
  4410. // ServerResponse contains the HTTP response code and headers from the
  4411. // server.
  4412. googleapi.ServerResponse `json:"-"`
  4413. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  4414. // unconditionally include in API requests. By default, fields with
  4415. // empty values are omitted from API requests. However, any non-pointer,
  4416. // non-interface field appearing in ForceSendFields will be sent to the
  4417. // server regardless of whether the field is empty or not. This may be
  4418. // used to include empty fields in Patch requests.
  4419. ForceSendFields []string `json:"-"`
  4420. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  4421. // include in API requests with the JSON null value. By default, fields
  4422. // with empty values are omitted from API requests. However, any field
  4423. // with an empty value appearing in NullFields will be sent to the
  4424. // server as null. It is an error if a field in this list has a
  4425. // non-empty value. This may be used to include null fields in Patch
  4426. // requests.
  4427. NullFields []string `json:"-"`
  4428. }
  4429. func (s *OrdersCancelLineItemResponse) MarshalJSON() ([]byte, error) {
  4430. type NoMethod OrdersCancelLineItemResponse
  4431. raw := NoMethod(*s)
  4432. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4433. }
  4434. type OrdersCancelRequest struct {
  4435. // OperationId: The ID of the operation. Unique across all operations
  4436. // for a given order.
  4437. OperationId string `json:"operationId,omitempty"`
  4438. // Reason: The reason for the cancellation.
  4439. Reason string `json:"reason,omitempty"`
  4440. // ReasonText: The explanation of the reason.
  4441. ReasonText string `json:"reasonText,omitempty"`
  4442. // ForceSendFields is a list of field names (e.g. "OperationId") to
  4443. // unconditionally include in API requests. By default, fields with
  4444. // empty values are omitted from API requests. However, any non-pointer,
  4445. // non-interface field appearing in ForceSendFields will be sent to the
  4446. // server regardless of whether the field is empty or not. This may be
  4447. // used to include empty fields in Patch requests.
  4448. ForceSendFields []string `json:"-"`
  4449. // NullFields is a list of field names (e.g. "OperationId") to include
  4450. // in API requests with the JSON null value. By default, fields with
  4451. // empty values are omitted from API requests. However, any field with
  4452. // an empty value appearing in NullFields will be sent to the server as
  4453. // null. It is an error if a field in this list has a non-empty value.
  4454. // This may be used to include null fields in Patch requests.
  4455. NullFields []string `json:"-"`
  4456. }
  4457. func (s *OrdersCancelRequest) MarshalJSON() ([]byte, error) {
  4458. type NoMethod OrdersCancelRequest
  4459. raw := NoMethod(*s)
  4460. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4461. }
  4462. type OrdersCancelResponse struct {
  4463. // ExecutionStatus: The status of the execution.
  4464. ExecutionStatus string `json:"executionStatus,omitempty"`
  4465. // Kind: Identifies what kind of resource this is. Value: the fixed
  4466. // string "content#ordersCancelResponse".
  4467. Kind string `json:"kind,omitempty"`
  4468. // ServerResponse contains the HTTP response code and headers from the
  4469. // server.
  4470. googleapi.ServerResponse `json:"-"`
  4471. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  4472. // unconditionally include in API requests. By default, fields with
  4473. // empty values are omitted from API requests. However, any non-pointer,
  4474. // non-interface field appearing in ForceSendFields will be sent to the
  4475. // server regardless of whether the field is empty or not. This may be
  4476. // used to include empty fields in Patch requests.
  4477. ForceSendFields []string `json:"-"`
  4478. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  4479. // include in API requests with the JSON null value. By default, fields
  4480. // with empty values are omitted from API requests. However, any field
  4481. // with an empty value appearing in NullFields will be sent to the
  4482. // server as null. It is an error if a field in this list has a
  4483. // non-empty value. This may be used to include null fields in Patch
  4484. // requests.
  4485. NullFields []string `json:"-"`
  4486. }
  4487. func (s *OrdersCancelResponse) MarshalJSON() ([]byte, error) {
  4488. type NoMethod OrdersCancelResponse
  4489. raw := NoMethod(*s)
  4490. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4491. }
  4492. type OrdersCreateTestOrderRequest struct {
  4493. // TemplateName: The test order template to use. Specify as an
  4494. // alternative to testOrder as a shortcut for retrieving a template and
  4495. // then creating an order using that template.
  4496. TemplateName string `json:"templateName,omitempty"`
  4497. // TestOrder: The test order to create.
  4498. TestOrder *TestOrder `json:"testOrder,omitempty"`
  4499. // ForceSendFields is a list of field names (e.g. "TemplateName") to
  4500. // unconditionally include in API requests. By default, fields with
  4501. // empty values are omitted from API requests. However, any non-pointer,
  4502. // non-interface field appearing in ForceSendFields will be sent to the
  4503. // server regardless of whether the field is empty or not. This may be
  4504. // used to include empty fields in Patch requests.
  4505. ForceSendFields []string `json:"-"`
  4506. // NullFields is a list of field names (e.g. "TemplateName") to include
  4507. // in API requests with the JSON null value. By default, fields with
  4508. // empty values are omitted from API requests. However, any field with
  4509. // an empty value appearing in NullFields will be sent to the server as
  4510. // null. It is an error if a field in this list has a non-empty value.
  4511. // This may be used to include null fields in Patch requests.
  4512. NullFields []string `json:"-"`
  4513. }
  4514. func (s *OrdersCreateTestOrderRequest) MarshalJSON() ([]byte, error) {
  4515. type NoMethod OrdersCreateTestOrderRequest
  4516. raw := NoMethod(*s)
  4517. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4518. }
  4519. type OrdersCreateTestOrderResponse struct {
  4520. // Kind: Identifies what kind of resource this is. Value: the fixed
  4521. // string "content#ordersCreateTestOrderResponse".
  4522. Kind string `json:"kind,omitempty"`
  4523. // OrderId: The ID of the newly created test order.
  4524. OrderId string `json:"orderId,omitempty"`
  4525. // ServerResponse contains the HTTP response code and headers from the
  4526. // server.
  4527. googleapi.ServerResponse `json:"-"`
  4528. // ForceSendFields is a list of field names (e.g. "Kind") to
  4529. // unconditionally include in API requests. By default, fields with
  4530. // empty values are omitted from API requests. However, any non-pointer,
  4531. // non-interface field appearing in ForceSendFields will be sent to the
  4532. // server regardless of whether the field is empty or not. This may be
  4533. // used to include empty fields in Patch requests.
  4534. ForceSendFields []string `json:"-"`
  4535. // NullFields is a list of field names (e.g. "Kind") to include in API
  4536. // requests with the JSON null value. By default, fields with empty
  4537. // values are omitted from API requests. However, any field with an
  4538. // empty value appearing in NullFields will be sent to the server as
  4539. // null. It is an error if a field in this list has a non-empty value.
  4540. // This may be used to include null fields in Patch requests.
  4541. NullFields []string `json:"-"`
  4542. }
  4543. func (s *OrdersCreateTestOrderResponse) MarshalJSON() ([]byte, error) {
  4544. type NoMethod OrdersCreateTestOrderResponse
  4545. raw := NoMethod(*s)
  4546. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4547. }
  4548. type OrdersCustomBatchRequest struct {
  4549. // Entries: The request entries to be processed in the batch.
  4550. Entries []*OrdersCustomBatchRequestEntry `json:"entries,omitempty"`
  4551. // ForceSendFields is a list of field names (e.g. "Entries") to
  4552. // unconditionally include in API requests. By default, fields with
  4553. // empty values are omitted from API requests. However, any non-pointer,
  4554. // non-interface field appearing in ForceSendFields will be sent to the
  4555. // server regardless of whether the field is empty or not. This may be
  4556. // used to include empty fields in Patch requests.
  4557. ForceSendFields []string `json:"-"`
  4558. // NullFields is a list of field names (e.g. "Entries") to include in
  4559. // API requests with the JSON null value. By default, fields with empty
  4560. // values are omitted from API requests. However, any field with an
  4561. // empty value appearing in NullFields will be sent to the server as
  4562. // null. It is an error if a field in this list has a non-empty value.
  4563. // This may be used to include null fields in Patch requests.
  4564. NullFields []string `json:"-"`
  4565. }
  4566. func (s *OrdersCustomBatchRequest) MarshalJSON() ([]byte, error) {
  4567. type NoMethod OrdersCustomBatchRequest
  4568. raw := NoMethod(*s)
  4569. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4570. }
  4571. type OrdersCustomBatchRequestEntry struct {
  4572. // BatchId: An entry ID, unique within the batch request.
  4573. BatchId int64 `json:"batchId,omitempty"`
  4574. // Cancel: Required for cancel method.
  4575. Cancel *OrdersCustomBatchRequestEntryCancel `json:"cancel,omitempty"`
  4576. // CancelLineItem: Required for cancelLineItem method.
  4577. CancelLineItem *OrdersCustomBatchRequestEntryCancelLineItem `json:"cancelLineItem,omitempty"`
  4578. // InStoreRefundLineItem: Required for inStoreReturnLineItem method.
  4579. InStoreRefundLineItem *OrdersCustomBatchRequestEntryInStoreRefundLineItem `json:"inStoreRefundLineItem,omitempty"`
  4580. // MerchantId: The ID of the managing account.
  4581. MerchantId uint64 `json:"merchantId,omitempty,string"`
  4582. // MerchantOrderId: The merchant order id. Required for
  4583. // updateMerchantOrderId and getByMerchantOrderId methods.
  4584. MerchantOrderId string `json:"merchantOrderId,omitempty"`
  4585. // Method: The method to apply.
  4586. Method string `json:"method,omitempty"`
  4587. // OperationId: The ID of the operation. Unique across all operations
  4588. // for a given order. Required for all methods beside get and
  4589. // getByMerchantOrderId.
  4590. OperationId string `json:"operationId,omitempty"`
  4591. // OrderId: The ID of the order. Required for all methods beside
  4592. // getByMerchantOrderId.
  4593. OrderId string `json:"orderId,omitempty"`
  4594. // Refund: Required for refund method.
  4595. Refund *OrdersCustomBatchRequestEntryRefund `json:"refund,omitempty"`
  4596. // RejectReturnLineItem: Required for rejectReturnLineItem method.
  4597. RejectReturnLineItem *OrdersCustomBatchRequestEntryRejectReturnLineItem `json:"rejectReturnLineItem,omitempty"`
  4598. // ReturnLineItem: Required for returnLineItem method.
  4599. ReturnLineItem *OrdersCustomBatchRequestEntryReturnLineItem `json:"returnLineItem,omitempty"`
  4600. // ReturnRefundLineItem: Required for returnRefundLineItem method.
  4601. ReturnRefundLineItem *OrdersCustomBatchRequestEntryReturnRefundLineItem `json:"returnRefundLineItem,omitempty"`
  4602. // SetLineItemMetadata: Required for setLineItemMetadata method.
  4603. SetLineItemMetadata *OrdersCustomBatchRequestEntrySetLineItemMetadata `json:"setLineItemMetadata,omitempty"`
  4604. // ShipLineItems: Required for shipLineItems method.
  4605. ShipLineItems *OrdersCustomBatchRequestEntryShipLineItems `json:"shipLineItems,omitempty"`
  4606. // UpdateLineItemShippingDetails: Required for
  4607. // updateLineItemShippingDate method.
  4608. UpdateLineItemShippingDetails *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails `json:"updateLineItemShippingDetails,omitempty"`
  4609. // UpdateShipment: Required for updateShipment method.
  4610. UpdateShipment *OrdersCustomBatchRequestEntryUpdateShipment `json:"updateShipment,omitempty"`
  4611. // ForceSendFields is a list of field names (e.g. "BatchId") to
  4612. // unconditionally include in API requests. By default, fields with
  4613. // empty values are omitted from API requests. However, any non-pointer,
  4614. // non-interface field appearing in ForceSendFields will be sent to the
  4615. // server regardless of whether the field is empty or not. This may be
  4616. // used to include empty fields in Patch requests.
  4617. ForceSendFields []string `json:"-"`
  4618. // NullFields is a list of field names (e.g. "BatchId") to include in
  4619. // API requests with the JSON null value. By default, fields with empty
  4620. // values are omitted from API requests. However, any field with an
  4621. // empty value appearing in NullFields will be sent to the server as
  4622. // null. It is an error if a field in this list has a non-empty value.
  4623. // This may be used to include null fields in Patch requests.
  4624. NullFields []string `json:"-"`
  4625. }
  4626. func (s *OrdersCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  4627. type NoMethod OrdersCustomBatchRequestEntry
  4628. raw := NoMethod(*s)
  4629. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4630. }
  4631. type OrdersCustomBatchRequestEntryCancel struct {
  4632. // Reason: The reason for the cancellation.
  4633. Reason string `json:"reason,omitempty"`
  4634. // ReasonText: The explanation of the reason.
  4635. ReasonText string `json:"reasonText,omitempty"`
  4636. // ForceSendFields is a list of field names (e.g. "Reason") to
  4637. // unconditionally include in API requests. By default, fields with
  4638. // empty values are omitted from API requests. However, any non-pointer,
  4639. // non-interface field appearing in ForceSendFields will be sent to the
  4640. // server regardless of whether the field is empty or not. This may be
  4641. // used to include empty fields in Patch requests.
  4642. ForceSendFields []string `json:"-"`
  4643. // NullFields is a list of field names (e.g. "Reason") to include in API
  4644. // requests with the JSON null value. By default, fields with empty
  4645. // values are omitted from API requests. However, any field with an
  4646. // empty value appearing in NullFields will be sent to the server as
  4647. // null. It is an error if a field in this list has a non-empty value.
  4648. // This may be used to include null fields in Patch requests.
  4649. NullFields []string `json:"-"`
  4650. }
  4651. func (s *OrdersCustomBatchRequestEntryCancel) MarshalJSON() ([]byte, error) {
  4652. type NoMethod OrdersCustomBatchRequestEntryCancel
  4653. raw := NoMethod(*s)
  4654. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4655. }
  4656. type OrdersCustomBatchRequestEntryCancelLineItem struct {
  4657. // Amount: Amount to refund for the cancelation. Optional. If not set,
  4658. // Google will calculate the default based on the price and tax of the
  4659. // items involved. The amount must not be larger than the net amount
  4660. // left on the order.
  4661. Amount *Price `json:"amount,omitempty"`
  4662. // AmountPretax: Amount to refund for the cancelation. Optional. If not
  4663. // set, Google will calculate the default based on the price and tax of
  4664. // the items involved. The amount must not be larger than the net amount
  4665. // left on the order.
  4666. AmountPretax *Price `json:"amountPretax,omitempty"`
  4667. // AmountTax: Tax amount that correspond to cancellation amount in
  4668. // amountPretax.
  4669. AmountTax *Price `json:"amountTax,omitempty"`
  4670. // LineItemId: The ID of the line item to cancel. Either lineItemId or
  4671. // productId is required.
  4672. LineItemId string `json:"lineItemId,omitempty"`
  4673. // ProductId: The ID of the product to cancel. This is the REST ID used
  4674. // in the products service. Either lineItemId or productId is required.
  4675. ProductId string `json:"productId,omitempty"`
  4676. // Quantity: The quantity to cancel.
  4677. Quantity int64 `json:"quantity,omitempty"`
  4678. // Reason: The reason for the cancellation.
  4679. Reason string `json:"reason,omitempty"`
  4680. // ReasonText: The explanation of the reason.
  4681. ReasonText string `json:"reasonText,omitempty"`
  4682. // ForceSendFields is a list of field names (e.g. "Amount") to
  4683. // unconditionally include in API requests. By default, fields with
  4684. // empty values are omitted from API requests. However, any non-pointer,
  4685. // non-interface field appearing in ForceSendFields will be sent to the
  4686. // server regardless of whether the field is empty or not. This may be
  4687. // used to include empty fields in Patch requests.
  4688. ForceSendFields []string `json:"-"`
  4689. // NullFields is a list of field names (e.g. "Amount") to include in API
  4690. // requests with the JSON null value. By default, fields with empty
  4691. // values are omitted from API requests. However, any field with an
  4692. // empty value appearing in NullFields will be sent to the server as
  4693. // null. It is an error if a field in this list has a non-empty value.
  4694. // This may be used to include null fields in Patch requests.
  4695. NullFields []string `json:"-"`
  4696. }
  4697. func (s *OrdersCustomBatchRequestEntryCancelLineItem) MarshalJSON() ([]byte, error) {
  4698. type NoMethod OrdersCustomBatchRequestEntryCancelLineItem
  4699. raw := NoMethod(*s)
  4700. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4701. }
  4702. type OrdersCustomBatchRequestEntryInStoreRefundLineItem struct {
  4703. // AmountPretax: The amount that is refunded. Required.
  4704. AmountPretax *Price `json:"amountPretax,omitempty"`
  4705. // AmountTax: Tax amount that correspond to refund amount in
  4706. // amountPretax. Required.
  4707. AmountTax *Price `json:"amountTax,omitempty"`
  4708. // LineItemId: The ID of the line item to return. Either lineItemId or
  4709. // productId is required.
  4710. LineItemId string `json:"lineItemId,omitempty"`
  4711. // ProductId: The ID of the product to return. This is the REST ID used
  4712. // in the products service. Either lineItemId or productId is required.
  4713. ProductId string `json:"productId,omitempty"`
  4714. // Quantity: The quantity to return and refund.
  4715. Quantity int64 `json:"quantity,omitempty"`
  4716. // Reason: The reason for the return.
  4717. Reason string `json:"reason,omitempty"`
  4718. // ReasonText: The explanation of the reason.
  4719. ReasonText string `json:"reasonText,omitempty"`
  4720. // ForceSendFields is a list of field names (e.g. "AmountPretax") to
  4721. // unconditionally include in API requests. By default, fields with
  4722. // empty values are omitted from API requests. However, any non-pointer,
  4723. // non-interface field appearing in ForceSendFields will be sent to the
  4724. // server regardless of whether the field is empty or not. This may be
  4725. // used to include empty fields in Patch requests.
  4726. ForceSendFields []string `json:"-"`
  4727. // NullFields is a list of field names (e.g. "AmountPretax") to include
  4728. // in API requests with the JSON null value. By default, fields with
  4729. // empty values are omitted from API requests. However, any field with
  4730. // an empty value appearing in NullFields will be sent to the server as
  4731. // null. It is an error if a field in this list has a non-empty value.
  4732. // This may be used to include null fields in Patch requests.
  4733. NullFields []string `json:"-"`
  4734. }
  4735. func (s *OrdersCustomBatchRequestEntryInStoreRefundLineItem) MarshalJSON() ([]byte, error) {
  4736. type NoMethod OrdersCustomBatchRequestEntryInStoreRefundLineItem
  4737. raw := NoMethod(*s)
  4738. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4739. }
  4740. type OrdersCustomBatchRequestEntryRefund struct {
  4741. // Amount: The amount that is refunded.
  4742. Amount *Price `json:"amount,omitempty"`
  4743. // AmountPretax: The amount that is refunded. Either amount or
  4744. // amountPretax and amountTax should be filled.
  4745. AmountPretax *Price `json:"amountPretax,omitempty"`
  4746. // AmountTax: Tax amount that correspond to refund amount in
  4747. // amountPretax.
  4748. AmountTax *Price `json:"amountTax,omitempty"`
  4749. // Reason: The reason for the refund.
  4750. Reason string `json:"reason,omitempty"`
  4751. // ReasonText: The explanation of the reason.
  4752. ReasonText string `json:"reasonText,omitempty"`
  4753. // ForceSendFields is a list of field names (e.g. "Amount") to
  4754. // unconditionally include in API requests. By default, fields with
  4755. // empty values are omitted from API requests. However, any non-pointer,
  4756. // non-interface field appearing in ForceSendFields will be sent to the
  4757. // server regardless of whether the field is empty or not. This may be
  4758. // used to include empty fields in Patch requests.
  4759. ForceSendFields []string `json:"-"`
  4760. // NullFields is a list of field names (e.g. "Amount") to include in API
  4761. // requests with the JSON null value. By default, fields with empty
  4762. // values are omitted from API requests. However, any field with an
  4763. // empty value appearing in NullFields will be sent to the server as
  4764. // null. It is an error if a field in this list has a non-empty value.
  4765. // This may be used to include null fields in Patch requests.
  4766. NullFields []string `json:"-"`
  4767. }
  4768. func (s *OrdersCustomBatchRequestEntryRefund) MarshalJSON() ([]byte, error) {
  4769. type NoMethod OrdersCustomBatchRequestEntryRefund
  4770. raw := NoMethod(*s)
  4771. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4772. }
  4773. type OrdersCustomBatchRequestEntryRejectReturnLineItem struct {
  4774. // LineItemId: The ID of the line item to return. Either lineItemId or
  4775. // productId is required.
  4776. LineItemId string `json:"lineItemId,omitempty"`
  4777. // ProductId: The ID of the product to return. This is the REST ID used
  4778. // in the products service. Either lineItemId or productId is required.
  4779. ProductId string `json:"productId,omitempty"`
  4780. // Quantity: The quantity to return and refund.
  4781. Quantity int64 `json:"quantity,omitempty"`
  4782. // Reason: The reason for the return.
  4783. Reason string `json:"reason,omitempty"`
  4784. // ReasonText: The explanation of the reason.
  4785. ReasonText string `json:"reasonText,omitempty"`
  4786. // ForceSendFields is a list of field names (e.g. "LineItemId") to
  4787. // unconditionally include in API requests. By default, fields with
  4788. // empty values are omitted from API requests. However, any non-pointer,
  4789. // non-interface field appearing in ForceSendFields will be sent to the
  4790. // server regardless of whether the field is empty or not. This may be
  4791. // used to include empty fields in Patch requests.
  4792. ForceSendFields []string `json:"-"`
  4793. // NullFields is a list of field names (e.g. "LineItemId") to include in
  4794. // API requests with the JSON null value. By default, fields with empty
  4795. // values are omitted from API requests. However, any field with an
  4796. // empty value appearing in NullFields will be sent to the server as
  4797. // null. It is an error if a field in this list has a non-empty value.
  4798. // This may be used to include null fields in Patch requests.
  4799. NullFields []string `json:"-"`
  4800. }
  4801. func (s *OrdersCustomBatchRequestEntryRejectReturnLineItem) MarshalJSON() ([]byte, error) {
  4802. type NoMethod OrdersCustomBatchRequestEntryRejectReturnLineItem
  4803. raw := NoMethod(*s)
  4804. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4805. }
  4806. type OrdersCustomBatchRequestEntryReturnLineItem struct {
  4807. // LineItemId: The ID of the line item to return. Either lineItemId or
  4808. // productId is required.
  4809. LineItemId string `json:"lineItemId,omitempty"`
  4810. // ProductId: The ID of the product to return. This is the REST ID used
  4811. // in the products service. Either lineItemId or productId is required.
  4812. ProductId string `json:"productId,omitempty"`
  4813. // Quantity: The quantity to return.
  4814. Quantity int64 `json:"quantity,omitempty"`
  4815. // Reason: The reason for the return.
  4816. Reason string `json:"reason,omitempty"`
  4817. // ReasonText: The explanation of the reason.
  4818. ReasonText string `json:"reasonText,omitempty"`
  4819. // ForceSendFields is a list of field names (e.g. "LineItemId") to
  4820. // unconditionally include in API requests. By default, fields with
  4821. // empty values are omitted from API requests. However, any non-pointer,
  4822. // non-interface field appearing in ForceSendFields will be sent to the
  4823. // server regardless of whether the field is empty or not. This may be
  4824. // used to include empty fields in Patch requests.
  4825. ForceSendFields []string `json:"-"`
  4826. // NullFields is a list of field names (e.g. "LineItemId") to include in
  4827. // API requests with the JSON null value. By default, fields with empty
  4828. // values are omitted from API requests. However, any field with an
  4829. // empty value appearing in NullFields will be sent to the server as
  4830. // null. It is an error if a field in this list has a non-empty value.
  4831. // This may be used to include null fields in Patch requests.
  4832. NullFields []string `json:"-"`
  4833. }
  4834. func (s *OrdersCustomBatchRequestEntryReturnLineItem) MarshalJSON() ([]byte, error) {
  4835. type NoMethod OrdersCustomBatchRequestEntryReturnLineItem
  4836. raw := NoMethod(*s)
  4837. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4838. }
  4839. type OrdersCustomBatchRequestEntryReturnRefundLineItem struct {
  4840. // AmountPretax: The amount that is refunded. Optional, but if filled
  4841. // then both amountPretax and amountTax must be set.
  4842. AmountPretax *Price `json:"amountPretax,omitempty"`
  4843. // AmountTax: Tax amount that correspond to refund amount in
  4844. // amountPretax.
  4845. AmountTax *Price `json:"amountTax,omitempty"`
  4846. // LineItemId: The ID of the line item to return. Either lineItemId or
  4847. // productId is required.
  4848. LineItemId string `json:"lineItemId,omitempty"`
  4849. // ProductId: The ID of the product to return. This is the REST ID used
  4850. // in the products service. Either lineItemId or productId is required.
  4851. ProductId string `json:"productId,omitempty"`
  4852. // Quantity: The quantity to return and refund.
  4853. Quantity int64 `json:"quantity,omitempty"`
  4854. // Reason: The reason for the return.
  4855. Reason string `json:"reason,omitempty"`
  4856. // ReasonText: The explanation of the reason.
  4857. ReasonText string `json:"reasonText,omitempty"`
  4858. // ForceSendFields is a list of field names (e.g. "AmountPretax") to
  4859. // unconditionally include in API requests. By default, fields with
  4860. // empty values are omitted from API requests. However, any non-pointer,
  4861. // non-interface field appearing in ForceSendFields will be sent to the
  4862. // server regardless of whether the field is empty or not. This may be
  4863. // used to include empty fields in Patch requests.
  4864. ForceSendFields []string `json:"-"`
  4865. // NullFields is a list of field names (e.g. "AmountPretax") to include
  4866. // in API requests with the JSON null value. By default, fields with
  4867. // empty values are omitted from API requests. However, any field with
  4868. // an empty value appearing in NullFields will be sent to the server as
  4869. // null. It is an error if a field in this list has a non-empty value.
  4870. // This may be used to include null fields in Patch requests.
  4871. NullFields []string `json:"-"`
  4872. }
  4873. func (s *OrdersCustomBatchRequestEntryReturnRefundLineItem) MarshalJSON() ([]byte, error) {
  4874. type NoMethod OrdersCustomBatchRequestEntryReturnRefundLineItem
  4875. raw := NoMethod(*s)
  4876. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4877. }
  4878. type OrdersCustomBatchRequestEntrySetLineItemMetadata struct {
  4879. Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"`
  4880. // LineItemId: The ID of the line item to set metadata. Either
  4881. // lineItemId or productId is required.
  4882. LineItemId string `json:"lineItemId,omitempty"`
  4883. // ProductId: The ID of the product to set metadata. This is the REST ID
  4884. // used in the products service. Either lineItemId or productId is
  4885. // required.
  4886. ProductId string `json:"productId,omitempty"`
  4887. // ForceSendFields is a list of field names (e.g. "Annotations") to
  4888. // unconditionally include in API requests. By default, fields with
  4889. // empty values are omitted from API requests. However, any non-pointer,
  4890. // non-interface field appearing in ForceSendFields will be sent to the
  4891. // server regardless of whether the field is empty or not. This may be
  4892. // used to include empty fields in Patch requests.
  4893. ForceSendFields []string `json:"-"`
  4894. // NullFields is a list of field names (e.g. "Annotations") to include
  4895. // in API requests with the JSON null value. By default, fields with
  4896. // empty values are omitted from API requests. However, any field with
  4897. // an empty value appearing in NullFields will be sent to the server as
  4898. // null. It is an error if a field in this list has a non-empty value.
  4899. // This may be used to include null fields in Patch requests.
  4900. NullFields []string `json:"-"`
  4901. }
  4902. func (s *OrdersCustomBatchRequestEntrySetLineItemMetadata) MarshalJSON() ([]byte, error) {
  4903. type NoMethod OrdersCustomBatchRequestEntrySetLineItemMetadata
  4904. raw := NoMethod(*s)
  4905. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4906. }
  4907. type OrdersCustomBatchRequestEntryShipLineItems struct {
  4908. // Carrier: Deprecated. Please use shipmentInfo instead. The carrier
  4909. // handling the shipment. See shipments[].carrier in the Orders
  4910. // resource representation for a list of acceptable values.
  4911. Carrier string `json:"carrier,omitempty"`
  4912. // LineItems: Line items to ship.
  4913. LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"`
  4914. // ShipmentGroupId: ID of the shipment group. Required for orders that
  4915. // use the orderinvoices service.
  4916. ShipmentGroupId string `json:"shipmentGroupId,omitempty"`
  4917. // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of
  4918. // the shipment.
  4919. ShipmentId string `json:"shipmentId,omitempty"`
  4920. // ShipmentInfos: Shipment information. This field is repeated because a
  4921. // single line item can be shipped in several packages (and have several
  4922. // tracking IDs).
  4923. ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"`
  4924. // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking
  4925. // id for the shipment.
  4926. TrackingId string `json:"trackingId,omitempty"`
  4927. // ForceSendFields is a list of field names (e.g. "Carrier") to
  4928. // unconditionally include in API requests. By default, fields with
  4929. // empty values are omitted from API requests. However, any non-pointer,
  4930. // non-interface field appearing in ForceSendFields will be sent to the
  4931. // server regardless of whether the field is empty or not. This may be
  4932. // used to include empty fields in Patch requests.
  4933. ForceSendFields []string `json:"-"`
  4934. // NullFields is a list of field names (e.g. "Carrier") to include in
  4935. // API requests with the JSON null value. By default, fields with empty
  4936. // values are omitted from API requests. However, any field with an
  4937. // empty value appearing in NullFields will be sent to the server as
  4938. // null. It is an error if a field in this list has a non-empty value.
  4939. // This may be used to include null fields in Patch requests.
  4940. NullFields []string `json:"-"`
  4941. }
  4942. func (s *OrdersCustomBatchRequestEntryShipLineItems) MarshalJSON() ([]byte, error) {
  4943. type NoMethod OrdersCustomBatchRequestEntryShipLineItems
  4944. raw := NoMethod(*s)
  4945. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4946. }
  4947. type OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo struct {
  4948. // Carrier: The carrier handling the shipment. See shipments[].carrier
  4949. // in the Orders resource representation for a list of acceptable
  4950. // values.
  4951. Carrier string `json:"carrier,omitempty"`
  4952. // ShipmentId: The ID of the shipment.
  4953. ShipmentId string `json:"shipmentId,omitempty"`
  4954. // TrackingId: The tracking id for the shipment.
  4955. TrackingId string `json:"trackingId,omitempty"`
  4956. // ForceSendFields is a list of field names (e.g. "Carrier") to
  4957. // unconditionally include in API requests. By default, fields with
  4958. // empty values are omitted from API requests. However, any non-pointer,
  4959. // non-interface field appearing in ForceSendFields will be sent to the
  4960. // server regardless of whether the field is empty or not. This may be
  4961. // used to include empty fields in Patch requests.
  4962. ForceSendFields []string `json:"-"`
  4963. // NullFields is a list of field names (e.g. "Carrier") to include in
  4964. // API requests with the JSON null value. By default, fields with empty
  4965. // values are omitted from API requests. However, any field with an
  4966. // empty value appearing in NullFields will be sent to the server as
  4967. // null. It is an error if a field in this list has a non-empty value.
  4968. // This may be used to include null fields in Patch requests.
  4969. NullFields []string `json:"-"`
  4970. }
  4971. func (s *OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo) MarshalJSON() ([]byte, error) {
  4972. type NoMethod OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo
  4973. raw := NoMethod(*s)
  4974. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  4975. }
  4976. type OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails struct {
  4977. // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not
  4978. // specified only ship by date is updated.
  4979. DeliverByDate string `json:"deliverByDate,omitempty"`
  4980. // LineItemId: The ID of the line item to set metadata. Either
  4981. // lineItemId or productId is required.
  4982. LineItemId string `json:"lineItemId,omitempty"`
  4983. // ProductId: The ID of the product to set metadata. This is the REST ID
  4984. // used in the products service. Either lineItemId or productId is
  4985. // required.
  4986. ProductId string `json:"productId,omitempty"`
  4987. // ShipByDate: Updated ship by date, in ISO 8601 format. If not
  4988. // specified only deliver by date is updated.
  4989. ShipByDate string `json:"shipByDate,omitempty"`
  4990. // ForceSendFields is a list of field names (e.g. "DeliverByDate") to
  4991. // unconditionally include in API requests. By default, fields with
  4992. // empty values are omitted from API requests. However, any non-pointer,
  4993. // non-interface field appearing in ForceSendFields will be sent to the
  4994. // server regardless of whether the field is empty or not. This may be
  4995. // used to include empty fields in Patch requests.
  4996. ForceSendFields []string `json:"-"`
  4997. // NullFields is a list of field names (e.g. "DeliverByDate") to include
  4998. // in API requests with the JSON null value. By default, fields with
  4999. // empty values are omitted from API requests. However, any field with
  5000. // an empty value appearing in NullFields will be sent to the server as
  5001. // null. It is an error if a field in this list has a non-empty value.
  5002. // This may be used to include null fields in Patch requests.
  5003. NullFields []string `json:"-"`
  5004. }
  5005. func (s *OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails) MarshalJSON() ([]byte, error) {
  5006. type NoMethod OrdersCustomBatchRequestEntryUpdateLineItemShippingDetails
  5007. raw := NoMethod(*s)
  5008. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5009. }
  5010. type OrdersCustomBatchRequestEntryUpdateShipment struct {
  5011. // Carrier: The carrier handling the shipment. Not updated if missing.
  5012. // See shipments[].carrier in the Orders resource representation for a
  5013. // list of acceptable values.
  5014. Carrier string `json:"carrier,omitempty"`
  5015. // ShipmentId: The ID of the shipment.
  5016. ShipmentId string `json:"shipmentId,omitempty"`
  5017. // Status: New status for the shipment. Not updated if missing.
  5018. Status string `json:"status,omitempty"`
  5019. // TrackingId: The tracking id for the shipment. Not updated if missing.
  5020. TrackingId string `json:"trackingId,omitempty"`
  5021. // ForceSendFields is a list of field names (e.g. "Carrier") to
  5022. // unconditionally include in API requests. By default, fields with
  5023. // empty values are omitted from API requests. However, any non-pointer,
  5024. // non-interface field appearing in ForceSendFields will be sent to the
  5025. // server regardless of whether the field is empty or not. This may be
  5026. // used to include empty fields in Patch requests.
  5027. ForceSendFields []string `json:"-"`
  5028. // NullFields is a list of field names (e.g. "Carrier") to include in
  5029. // API requests with the JSON null value. By default, fields with empty
  5030. // values are omitted from API requests. However, any field with an
  5031. // empty value appearing in NullFields will be sent to the server as
  5032. // null. It is an error if a field in this list has a non-empty value.
  5033. // This may be used to include null fields in Patch requests.
  5034. NullFields []string `json:"-"`
  5035. }
  5036. func (s *OrdersCustomBatchRequestEntryUpdateShipment) MarshalJSON() ([]byte, error) {
  5037. type NoMethod OrdersCustomBatchRequestEntryUpdateShipment
  5038. raw := NoMethod(*s)
  5039. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5040. }
  5041. type OrdersCustomBatchResponse struct {
  5042. // Entries: The result of the execution of the batch requests.
  5043. Entries []*OrdersCustomBatchResponseEntry `json:"entries,omitempty"`
  5044. // Kind: Identifies what kind of resource this is. Value: the fixed
  5045. // string "content#ordersCustomBatchResponse".
  5046. Kind string `json:"kind,omitempty"`
  5047. // ServerResponse contains the HTTP response code and headers from the
  5048. // server.
  5049. googleapi.ServerResponse `json:"-"`
  5050. // ForceSendFields is a list of field names (e.g. "Entries") to
  5051. // unconditionally include in API requests. By default, fields with
  5052. // empty values are omitted from API requests. However, any non-pointer,
  5053. // non-interface field appearing in ForceSendFields will be sent to the
  5054. // server regardless of whether the field is empty or not. This may be
  5055. // used to include empty fields in Patch requests.
  5056. ForceSendFields []string `json:"-"`
  5057. // NullFields is a list of field names (e.g. "Entries") to include in
  5058. // API requests with the JSON null value. By default, fields with empty
  5059. // values are omitted from API requests. However, any field with an
  5060. // empty value appearing in NullFields will be sent to the server as
  5061. // null. It is an error if a field in this list has a non-empty value.
  5062. // This may be used to include null fields in Patch requests.
  5063. NullFields []string `json:"-"`
  5064. }
  5065. func (s *OrdersCustomBatchResponse) MarshalJSON() ([]byte, error) {
  5066. type NoMethod OrdersCustomBatchResponse
  5067. raw := NoMethod(*s)
  5068. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5069. }
  5070. type OrdersCustomBatchResponseEntry struct {
  5071. // BatchId: The ID of the request entry this entry responds to.
  5072. BatchId int64 `json:"batchId,omitempty"`
  5073. // Errors: A list of errors defined if and only if the request failed.
  5074. Errors *Errors `json:"errors,omitempty"`
  5075. // ExecutionStatus: The status of the execution. Only defined if the
  5076. // method is not get or getByMerchantOrderId and if the request was
  5077. // successful.
  5078. ExecutionStatus string `json:"executionStatus,omitempty"`
  5079. // Kind: Identifies what kind of resource this is. Value: the fixed
  5080. // string "content#ordersCustomBatchResponseEntry".
  5081. Kind string `json:"kind,omitempty"`
  5082. // Order: The retrieved order. Only defined if the method is get and if
  5083. // the request was successful.
  5084. Order *Order `json:"order,omitempty"`
  5085. // ForceSendFields is a list of field names (e.g. "BatchId") to
  5086. // unconditionally include in API requests. By default, fields with
  5087. // empty values are omitted from API requests. However, any non-pointer,
  5088. // non-interface field appearing in ForceSendFields will be sent to the
  5089. // server regardless of whether the field is empty or not. This may be
  5090. // used to include empty fields in Patch requests.
  5091. ForceSendFields []string `json:"-"`
  5092. // NullFields is a list of field names (e.g. "BatchId") to include in
  5093. // API requests with the JSON null value. By default, fields with empty
  5094. // values are omitted from API requests. However, any field with an
  5095. // empty value appearing in NullFields will be sent to the server as
  5096. // null. It is an error if a field in this list has a non-empty value.
  5097. // This may be used to include null fields in Patch requests.
  5098. NullFields []string `json:"-"`
  5099. }
  5100. func (s *OrdersCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  5101. type NoMethod OrdersCustomBatchResponseEntry
  5102. raw := NoMethod(*s)
  5103. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5104. }
  5105. type OrdersGetByMerchantOrderIdResponse struct {
  5106. // Kind: Identifies what kind of resource this is. Value: the fixed
  5107. // string "content#ordersGetByMerchantOrderIdResponse".
  5108. Kind string `json:"kind,omitempty"`
  5109. // Order: The requested order.
  5110. Order *Order `json:"order,omitempty"`
  5111. // ServerResponse contains the HTTP response code and headers from the
  5112. // server.
  5113. googleapi.ServerResponse `json:"-"`
  5114. // ForceSendFields is a list of field names (e.g. "Kind") to
  5115. // unconditionally include in API requests. By default, fields with
  5116. // empty values are omitted from API requests. However, any non-pointer,
  5117. // non-interface field appearing in ForceSendFields will be sent to the
  5118. // server regardless of whether the field is empty or not. This may be
  5119. // used to include empty fields in Patch requests.
  5120. ForceSendFields []string `json:"-"`
  5121. // NullFields is a list of field names (e.g. "Kind") to include in API
  5122. // requests with the JSON null value. By default, fields with empty
  5123. // values are omitted from API requests. However, any field with an
  5124. // empty value appearing in NullFields will be sent to the server as
  5125. // null. It is an error if a field in this list has a non-empty value.
  5126. // This may be used to include null fields in Patch requests.
  5127. NullFields []string `json:"-"`
  5128. }
  5129. func (s *OrdersGetByMerchantOrderIdResponse) MarshalJSON() ([]byte, error) {
  5130. type NoMethod OrdersGetByMerchantOrderIdResponse
  5131. raw := NoMethod(*s)
  5132. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5133. }
  5134. type OrdersGetTestOrderTemplateResponse struct {
  5135. // Kind: Identifies what kind of resource this is. Value: the fixed
  5136. // string "content#ordersGetTestOrderTemplateResponse".
  5137. Kind string `json:"kind,omitempty"`
  5138. // Template: The requested test order template.
  5139. Template *TestOrder `json:"template,omitempty"`
  5140. // ServerResponse contains the HTTP response code and headers from the
  5141. // server.
  5142. googleapi.ServerResponse `json:"-"`
  5143. // ForceSendFields is a list of field names (e.g. "Kind") to
  5144. // unconditionally include in API requests. By default, fields with
  5145. // empty values are omitted from API requests. However, any non-pointer,
  5146. // non-interface field appearing in ForceSendFields will be sent to the
  5147. // server regardless of whether the field is empty or not. This may be
  5148. // used to include empty fields in Patch requests.
  5149. ForceSendFields []string `json:"-"`
  5150. // NullFields is a list of field names (e.g. "Kind") to include in API
  5151. // requests with the JSON null value. By default, fields with empty
  5152. // values are omitted from API requests. However, any field with an
  5153. // empty value appearing in NullFields will be sent to the server as
  5154. // null. It is an error if a field in this list has a non-empty value.
  5155. // This may be used to include null fields in Patch requests.
  5156. NullFields []string `json:"-"`
  5157. }
  5158. func (s *OrdersGetTestOrderTemplateResponse) MarshalJSON() ([]byte, error) {
  5159. type NoMethod OrdersGetTestOrderTemplateResponse
  5160. raw := NoMethod(*s)
  5161. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5162. }
  5163. type OrdersInStoreRefundLineItemRequest struct {
  5164. // AmountPretax: The amount that is refunded. Required.
  5165. AmountPretax *Price `json:"amountPretax,omitempty"`
  5166. // AmountTax: Tax amount that correspond to refund amount in
  5167. // amountPretax. Required.
  5168. AmountTax *Price `json:"amountTax,omitempty"`
  5169. // LineItemId: The ID of the line item to return. Either lineItemId or
  5170. // productId is required.
  5171. LineItemId string `json:"lineItemId,omitempty"`
  5172. // OperationId: The ID of the operation. Unique across all operations
  5173. // for a given order.
  5174. OperationId string `json:"operationId,omitempty"`
  5175. // ProductId: The ID of the product to return. This is the REST ID used
  5176. // in the products service. Either lineItemId or productId is required.
  5177. ProductId string `json:"productId,omitempty"`
  5178. // Quantity: The quantity to return and refund.
  5179. Quantity int64 `json:"quantity,omitempty"`
  5180. // Reason: The reason for the return.
  5181. Reason string `json:"reason,omitempty"`
  5182. // ReasonText: The explanation of the reason.
  5183. ReasonText string `json:"reasonText,omitempty"`
  5184. // ForceSendFields is a list of field names (e.g. "AmountPretax") to
  5185. // unconditionally include in API requests. By default, fields with
  5186. // empty values are omitted from API requests. However, any non-pointer,
  5187. // non-interface field appearing in ForceSendFields will be sent to the
  5188. // server regardless of whether the field is empty or not. This may be
  5189. // used to include empty fields in Patch requests.
  5190. ForceSendFields []string `json:"-"`
  5191. // NullFields is a list of field names (e.g. "AmountPretax") to include
  5192. // in API requests with the JSON null value. By default, fields with
  5193. // empty values are omitted from API requests. However, any field with
  5194. // an empty value appearing in NullFields will be sent to the server as
  5195. // null. It is an error if a field in this list has a non-empty value.
  5196. // This may be used to include null fields in Patch requests.
  5197. NullFields []string `json:"-"`
  5198. }
  5199. func (s *OrdersInStoreRefundLineItemRequest) MarshalJSON() ([]byte, error) {
  5200. type NoMethod OrdersInStoreRefundLineItemRequest
  5201. raw := NoMethod(*s)
  5202. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5203. }
  5204. type OrdersInStoreRefundLineItemResponse struct {
  5205. // ExecutionStatus: The status of the execution.
  5206. ExecutionStatus string `json:"executionStatus,omitempty"`
  5207. // Kind: Identifies what kind of resource this is. Value: the fixed
  5208. // string "content#ordersInStoreRefundLineItemResponse".
  5209. Kind string `json:"kind,omitempty"`
  5210. // ServerResponse contains the HTTP response code and headers from the
  5211. // server.
  5212. googleapi.ServerResponse `json:"-"`
  5213. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  5214. // unconditionally include in API requests. By default, fields with
  5215. // empty values are omitted from API requests. However, any non-pointer,
  5216. // non-interface field appearing in ForceSendFields will be sent to the
  5217. // server regardless of whether the field is empty or not. This may be
  5218. // used to include empty fields in Patch requests.
  5219. ForceSendFields []string `json:"-"`
  5220. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  5221. // include in API requests with the JSON null value. By default, fields
  5222. // with empty values are omitted from API requests. However, any field
  5223. // with an empty value appearing in NullFields will be sent to the
  5224. // server as null. It is an error if a field in this list has a
  5225. // non-empty value. This may be used to include null fields in Patch
  5226. // requests.
  5227. NullFields []string `json:"-"`
  5228. }
  5229. func (s *OrdersInStoreRefundLineItemResponse) MarshalJSON() ([]byte, error) {
  5230. type NoMethod OrdersInStoreRefundLineItemResponse
  5231. raw := NoMethod(*s)
  5232. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5233. }
  5234. type OrdersListResponse struct {
  5235. // Kind: Identifies what kind of resource this is. Value: the fixed
  5236. // string "content#ordersListResponse".
  5237. Kind string `json:"kind,omitempty"`
  5238. // NextPageToken: The token for the retrieval of the next page of
  5239. // orders.
  5240. NextPageToken string `json:"nextPageToken,omitempty"`
  5241. Resources []*Order `json:"resources,omitempty"`
  5242. // ServerResponse contains the HTTP response code and headers from the
  5243. // server.
  5244. googleapi.ServerResponse `json:"-"`
  5245. // ForceSendFields is a list of field names (e.g. "Kind") to
  5246. // unconditionally include in API requests. By default, fields with
  5247. // empty values are omitted from API requests. However, any non-pointer,
  5248. // non-interface field appearing in ForceSendFields will be sent to the
  5249. // server regardless of whether the field is empty or not. This may be
  5250. // used to include empty fields in Patch requests.
  5251. ForceSendFields []string `json:"-"`
  5252. // NullFields is a list of field names (e.g. "Kind") to include in API
  5253. // requests with the JSON null value. By default, fields with empty
  5254. // values are omitted from API requests. However, any field with an
  5255. // empty value appearing in NullFields will be sent to the server as
  5256. // null. It is an error if a field in this list has a non-empty value.
  5257. // This may be used to include null fields in Patch requests.
  5258. NullFields []string `json:"-"`
  5259. }
  5260. func (s *OrdersListResponse) MarshalJSON() ([]byte, error) {
  5261. type NoMethod OrdersListResponse
  5262. raw := NoMethod(*s)
  5263. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5264. }
  5265. type OrdersRefundRequest struct {
  5266. // Amount: The amount that is refunded.
  5267. Amount *Price `json:"amount,omitempty"`
  5268. // AmountPretax: The amount that is refunded. Either amount or
  5269. // amountPretax and amountTax should be filled.
  5270. AmountPretax *Price `json:"amountPretax,omitempty"`
  5271. // AmountTax: Tax amount that correspond to refund amount in
  5272. // amountPretax.
  5273. AmountTax *Price `json:"amountTax,omitempty"`
  5274. // OperationId: The ID of the operation. Unique across all operations
  5275. // for a given order.
  5276. OperationId string `json:"operationId,omitempty"`
  5277. // Reason: The reason for the refund.
  5278. Reason string `json:"reason,omitempty"`
  5279. // ReasonText: The explanation of the reason.
  5280. ReasonText string `json:"reasonText,omitempty"`
  5281. // ForceSendFields is a list of field names (e.g. "Amount") to
  5282. // unconditionally include in API requests. By default, fields with
  5283. // empty values are omitted from API requests. However, any non-pointer,
  5284. // non-interface field appearing in ForceSendFields will be sent to the
  5285. // server regardless of whether the field is empty or not. This may be
  5286. // used to include empty fields in Patch requests.
  5287. ForceSendFields []string `json:"-"`
  5288. // NullFields is a list of field names (e.g. "Amount") to include in API
  5289. // requests with the JSON null value. By default, fields with empty
  5290. // values are omitted from API requests. However, any field with an
  5291. // empty value appearing in NullFields will be sent to the server as
  5292. // null. It is an error if a field in this list has a non-empty value.
  5293. // This may be used to include null fields in Patch requests.
  5294. NullFields []string `json:"-"`
  5295. }
  5296. func (s *OrdersRefundRequest) MarshalJSON() ([]byte, error) {
  5297. type NoMethod OrdersRefundRequest
  5298. raw := NoMethod(*s)
  5299. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5300. }
  5301. type OrdersRefundResponse struct {
  5302. // ExecutionStatus: The status of the execution.
  5303. ExecutionStatus string `json:"executionStatus,omitempty"`
  5304. // Kind: Identifies what kind of resource this is. Value: the fixed
  5305. // string "content#ordersRefundResponse".
  5306. Kind string `json:"kind,omitempty"`
  5307. // ServerResponse contains the HTTP response code and headers from the
  5308. // server.
  5309. googleapi.ServerResponse `json:"-"`
  5310. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  5311. // unconditionally include in API requests. By default, fields with
  5312. // empty values are omitted from API requests. However, any non-pointer,
  5313. // non-interface field appearing in ForceSendFields will be sent to the
  5314. // server regardless of whether the field is empty or not. This may be
  5315. // used to include empty fields in Patch requests.
  5316. ForceSendFields []string `json:"-"`
  5317. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  5318. // include in API requests with the JSON null value. By default, fields
  5319. // with empty values are omitted from API requests. However, any field
  5320. // with an empty value appearing in NullFields will be sent to the
  5321. // server as null. It is an error if a field in this list has a
  5322. // non-empty value. This may be used to include null fields in Patch
  5323. // requests.
  5324. NullFields []string `json:"-"`
  5325. }
  5326. func (s *OrdersRefundResponse) MarshalJSON() ([]byte, error) {
  5327. type NoMethod OrdersRefundResponse
  5328. raw := NoMethod(*s)
  5329. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5330. }
  5331. type OrdersRejectReturnLineItemRequest struct {
  5332. // LineItemId: The ID of the line item to return. Either lineItemId or
  5333. // productId is required.
  5334. LineItemId string `json:"lineItemId,omitempty"`
  5335. // OperationId: The ID of the operation. Unique across all operations
  5336. // for a given order.
  5337. OperationId string `json:"operationId,omitempty"`
  5338. // ProductId: The ID of the product to return. This is the REST ID used
  5339. // in the products service. Either lineItemId or productId is required.
  5340. ProductId string `json:"productId,omitempty"`
  5341. // Quantity: The quantity to return and refund.
  5342. Quantity int64 `json:"quantity,omitempty"`
  5343. // Reason: The reason for the return.
  5344. Reason string `json:"reason,omitempty"`
  5345. // ReasonText: The explanation of the reason.
  5346. ReasonText string `json:"reasonText,omitempty"`
  5347. // ForceSendFields is a list of field names (e.g. "LineItemId") to
  5348. // unconditionally include in API requests. By default, fields with
  5349. // empty values are omitted from API requests. However, any non-pointer,
  5350. // non-interface field appearing in ForceSendFields will be sent to the
  5351. // server regardless of whether the field is empty or not. This may be
  5352. // used to include empty fields in Patch requests.
  5353. ForceSendFields []string `json:"-"`
  5354. // NullFields is a list of field names (e.g. "LineItemId") to include in
  5355. // API requests with the JSON null value. By default, fields with empty
  5356. // values are omitted from API requests. However, any field with an
  5357. // empty value appearing in NullFields will be sent to the server as
  5358. // null. It is an error if a field in this list has a non-empty value.
  5359. // This may be used to include null fields in Patch requests.
  5360. NullFields []string `json:"-"`
  5361. }
  5362. func (s *OrdersRejectReturnLineItemRequest) MarshalJSON() ([]byte, error) {
  5363. type NoMethod OrdersRejectReturnLineItemRequest
  5364. raw := NoMethod(*s)
  5365. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5366. }
  5367. type OrdersRejectReturnLineItemResponse struct {
  5368. // ExecutionStatus: The status of the execution.
  5369. ExecutionStatus string `json:"executionStatus,omitempty"`
  5370. // Kind: Identifies what kind of resource this is. Value: the fixed
  5371. // string "content#ordersRejectReturnLineItemResponse".
  5372. Kind string `json:"kind,omitempty"`
  5373. // ServerResponse contains the HTTP response code and headers from the
  5374. // server.
  5375. googleapi.ServerResponse `json:"-"`
  5376. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  5377. // unconditionally include in API requests. By default, fields with
  5378. // empty values are omitted from API requests. However, any non-pointer,
  5379. // non-interface field appearing in ForceSendFields will be sent to the
  5380. // server regardless of whether the field is empty or not. This may be
  5381. // used to include empty fields in Patch requests.
  5382. ForceSendFields []string `json:"-"`
  5383. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  5384. // include in API requests with the JSON null value. By default, fields
  5385. // with empty values are omitted from API requests. However, any field
  5386. // with an empty value appearing in NullFields will be sent to the
  5387. // server as null. It is an error if a field in this list has a
  5388. // non-empty value. This may be used to include null fields in Patch
  5389. // requests.
  5390. NullFields []string `json:"-"`
  5391. }
  5392. func (s *OrdersRejectReturnLineItemResponse) MarshalJSON() ([]byte, error) {
  5393. type NoMethod OrdersRejectReturnLineItemResponse
  5394. raw := NoMethod(*s)
  5395. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5396. }
  5397. type OrdersReturnLineItemRequest struct {
  5398. // LineItemId: The ID of the line item to return. Either lineItemId or
  5399. // productId is required.
  5400. LineItemId string `json:"lineItemId,omitempty"`
  5401. // OperationId: The ID of the operation. Unique across all operations
  5402. // for a given order.
  5403. OperationId string `json:"operationId,omitempty"`
  5404. // ProductId: The ID of the product to return. This is the REST ID used
  5405. // in the products service. Either lineItemId or productId is required.
  5406. ProductId string `json:"productId,omitempty"`
  5407. // Quantity: The quantity to return.
  5408. Quantity int64 `json:"quantity,omitempty"`
  5409. // Reason: The reason for the return.
  5410. Reason string `json:"reason,omitempty"`
  5411. // ReasonText: The explanation of the reason.
  5412. ReasonText string `json:"reasonText,omitempty"`
  5413. // ForceSendFields is a list of field names (e.g. "LineItemId") to
  5414. // unconditionally include in API requests. By default, fields with
  5415. // empty values are omitted from API requests. However, any non-pointer,
  5416. // non-interface field appearing in ForceSendFields will be sent to the
  5417. // server regardless of whether the field is empty or not. This may be
  5418. // used to include empty fields in Patch requests.
  5419. ForceSendFields []string `json:"-"`
  5420. // NullFields is a list of field names (e.g. "LineItemId") to include in
  5421. // API requests with the JSON null value. By default, fields with empty
  5422. // values are omitted from API requests. However, any field with an
  5423. // empty value appearing in NullFields will be sent to the server as
  5424. // null. It is an error if a field in this list has a non-empty value.
  5425. // This may be used to include null fields in Patch requests.
  5426. NullFields []string `json:"-"`
  5427. }
  5428. func (s *OrdersReturnLineItemRequest) MarshalJSON() ([]byte, error) {
  5429. type NoMethod OrdersReturnLineItemRequest
  5430. raw := NoMethod(*s)
  5431. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5432. }
  5433. type OrdersReturnLineItemResponse struct {
  5434. // ExecutionStatus: The status of the execution.
  5435. ExecutionStatus string `json:"executionStatus,omitempty"`
  5436. // Kind: Identifies what kind of resource this is. Value: the fixed
  5437. // string "content#ordersReturnLineItemResponse".
  5438. Kind string `json:"kind,omitempty"`
  5439. // ServerResponse contains the HTTP response code and headers from the
  5440. // server.
  5441. googleapi.ServerResponse `json:"-"`
  5442. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  5443. // unconditionally include in API requests. By default, fields with
  5444. // empty values are omitted from API requests. However, any non-pointer,
  5445. // non-interface field appearing in ForceSendFields will be sent to the
  5446. // server regardless of whether the field is empty or not. This may be
  5447. // used to include empty fields in Patch requests.
  5448. ForceSendFields []string `json:"-"`
  5449. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  5450. // include in API requests with the JSON null value. By default, fields
  5451. // with empty values are omitted from API requests. However, any field
  5452. // with an empty value appearing in NullFields will be sent to the
  5453. // server as null. It is an error if a field in this list has a
  5454. // non-empty value. This may be used to include null fields in Patch
  5455. // requests.
  5456. NullFields []string `json:"-"`
  5457. }
  5458. func (s *OrdersReturnLineItemResponse) MarshalJSON() ([]byte, error) {
  5459. type NoMethod OrdersReturnLineItemResponse
  5460. raw := NoMethod(*s)
  5461. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5462. }
  5463. type OrdersReturnRefundLineItemRequest struct {
  5464. // AmountPretax: The amount that is refunded. Optional, but if filled
  5465. // then both amountPretax and amountTax must be set.
  5466. AmountPretax *Price `json:"amountPretax,omitempty"`
  5467. // AmountTax: Tax amount that correspond to refund amount in
  5468. // amountPretax.
  5469. AmountTax *Price `json:"amountTax,omitempty"`
  5470. // LineItemId: The ID of the line item to return. Either lineItemId or
  5471. // productId is required.
  5472. LineItemId string `json:"lineItemId,omitempty"`
  5473. // OperationId: The ID of the operation. Unique across all operations
  5474. // for a given order.
  5475. OperationId string `json:"operationId,omitempty"`
  5476. // ProductId: The ID of the product to return. This is the REST ID used
  5477. // in the products service. Either lineItemId or productId is required.
  5478. ProductId string `json:"productId,omitempty"`
  5479. // Quantity: The quantity to return and refund.
  5480. Quantity int64 `json:"quantity,omitempty"`
  5481. // Reason: The reason for the return.
  5482. Reason string `json:"reason,omitempty"`
  5483. // ReasonText: The explanation of the reason.
  5484. ReasonText string `json:"reasonText,omitempty"`
  5485. // ForceSendFields is a list of field names (e.g. "AmountPretax") to
  5486. // unconditionally include in API requests. By default, fields with
  5487. // empty values are omitted from API requests. However, any non-pointer,
  5488. // non-interface field appearing in ForceSendFields will be sent to the
  5489. // server regardless of whether the field is empty or not. This may be
  5490. // used to include empty fields in Patch requests.
  5491. ForceSendFields []string `json:"-"`
  5492. // NullFields is a list of field names (e.g. "AmountPretax") to include
  5493. // in API requests with the JSON null value. By default, fields with
  5494. // empty values are omitted from API requests. However, any field with
  5495. // an empty value appearing in NullFields will be sent to the server as
  5496. // null. It is an error if a field in this list has a non-empty value.
  5497. // This may be used to include null fields in Patch requests.
  5498. NullFields []string `json:"-"`
  5499. }
  5500. func (s *OrdersReturnRefundLineItemRequest) MarshalJSON() ([]byte, error) {
  5501. type NoMethod OrdersReturnRefundLineItemRequest
  5502. raw := NoMethod(*s)
  5503. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5504. }
  5505. type OrdersReturnRefundLineItemResponse struct {
  5506. // ExecutionStatus: The status of the execution.
  5507. ExecutionStatus string `json:"executionStatus,omitempty"`
  5508. // Kind: Identifies what kind of resource this is. Value: the fixed
  5509. // string "content#ordersReturnRefundLineItemResponse".
  5510. Kind string `json:"kind,omitempty"`
  5511. // ServerResponse contains the HTTP response code and headers from the
  5512. // server.
  5513. googleapi.ServerResponse `json:"-"`
  5514. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  5515. // unconditionally include in API requests. By default, fields with
  5516. // empty values are omitted from API requests. However, any non-pointer,
  5517. // non-interface field appearing in ForceSendFields will be sent to the
  5518. // server regardless of whether the field is empty or not. This may be
  5519. // used to include empty fields in Patch requests.
  5520. ForceSendFields []string `json:"-"`
  5521. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  5522. // include in API requests with the JSON null value. By default, fields
  5523. // with empty values are omitted from API requests. However, any field
  5524. // with an empty value appearing in NullFields will be sent to the
  5525. // server as null. It is an error if a field in this list has a
  5526. // non-empty value. This may be used to include null fields in Patch
  5527. // requests.
  5528. NullFields []string `json:"-"`
  5529. }
  5530. func (s *OrdersReturnRefundLineItemResponse) MarshalJSON() ([]byte, error) {
  5531. type NoMethod OrdersReturnRefundLineItemResponse
  5532. raw := NoMethod(*s)
  5533. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5534. }
  5535. type OrdersSetLineItemMetadataRequest struct {
  5536. Annotations []*OrderMerchantProvidedAnnotation `json:"annotations,omitempty"`
  5537. // LineItemId: The ID of the line item to set metadata. Either
  5538. // lineItemId or productId is required.
  5539. LineItemId string `json:"lineItemId,omitempty"`
  5540. // OperationId: The ID of the operation. Unique across all operations
  5541. // for a given order.
  5542. OperationId string `json:"operationId,omitempty"`
  5543. // ProductId: The ID of the product to set metadata. This is the REST ID
  5544. // used in the products service. Either lineItemId or productId is
  5545. // required.
  5546. ProductId string `json:"productId,omitempty"`
  5547. // ForceSendFields is a list of field names (e.g. "Annotations") to
  5548. // unconditionally include in API requests. By default, fields with
  5549. // empty values are omitted from API requests. However, any non-pointer,
  5550. // non-interface field appearing in ForceSendFields will be sent to the
  5551. // server regardless of whether the field is empty or not. This may be
  5552. // used to include empty fields in Patch requests.
  5553. ForceSendFields []string `json:"-"`
  5554. // NullFields is a list of field names (e.g. "Annotations") to include
  5555. // in API requests with the JSON null value. By default, fields with
  5556. // empty values are omitted from API requests. However, any field with
  5557. // an empty value appearing in NullFields will be sent to the server as
  5558. // null. It is an error if a field in this list has a non-empty value.
  5559. // This may be used to include null fields in Patch requests.
  5560. NullFields []string `json:"-"`
  5561. }
  5562. func (s *OrdersSetLineItemMetadataRequest) MarshalJSON() ([]byte, error) {
  5563. type NoMethod OrdersSetLineItemMetadataRequest
  5564. raw := NoMethod(*s)
  5565. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5566. }
  5567. type OrdersSetLineItemMetadataResponse struct {
  5568. // ExecutionStatus: The status of the execution.
  5569. ExecutionStatus string `json:"executionStatus,omitempty"`
  5570. // Kind: Identifies what kind of resource this is. Value: the fixed
  5571. // string "content#ordersSetLineItemMetadataResponse".
  5572. Kind string `json:"kind,omitempty"`
  5573. // ServerResponse contains the HTTP response code and headers from the
  5574. // server.
  5575. googleapi.ServerResponse `json:"-"`
  5576. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  5577. // unconditionally include in API requests. By default, fields with
  5578. // empty values are omitted from API requests. However, any non-pointer,
  5579. // non-interface field appearing in ForceSendFields will be sent to the
  5580. // server regardless of whether the field is empty or not. This may be
  5581. // used to include empty fields in Patch requests.
  5582. ForceSendFields []string `json:"-"`
  5583. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  5584. // include in API requests with the JSON null value. By default, fields
  5585. // with empty values are omitted from API requests. However, any field
  5586. // with an empty value appearing in NullFields will be sent to the
  5587. // server as null. It is an error if a field in this list has a
  5588. // non-empty value. This may be used to include null fields in Patch
  5589. // requests.
  5590. NullFields []string `json:"-"`
  5591. }
  5592. func (s *OrdersSetLineItemMetadataResponse) MarshalJSON() ([]byte, error) {
  5593. type NoMethod OrdersSetLineItemMetadataResponse
  5594. raw := NoMethod(*s)
  5595. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5596. }
  5597. type OrdersShipLineItemsRequest struct {
  5598. // Carrier: Deprecated. Please use shipmentInfo instead. The carrier
  5599. // handling the shipment. See shipments[].carrier in the Orders
  5600. // resource representation for a list of acceptable values.
  5601. Carrier string `json:"carrier,omitempty"`
  5602. // LineItems: Line items to ship.
  5603. LineItems []*OrderShipmentLineItemShipment `json:"lineItems,omitempty"`
  5604. // OperationId: The ID of the operation. Unique across all operations
  5605. // for a given order.
  5606. OperationId string `json:"operationId,omitempty"`
  5607. // ShipmentGroupId: ID of the shipment group. Required for orders that
  5608. // use the orderinvoices service.
  5609. ShipmentGroupId string `json:"shipmentGroupId,omitempty"`
  5610. // ShipmentId: Deprecated. Please use shipmentInfo instead. The ID of
  5611. // the shipment.
  5612. ShipmentId string `json:"shipmentId,omitempty"`
  5613. // ShipmentInfos: Shipment information. This field is repeated because a
  5614. // single line item can be shipped in several packages (and have several
  5615. // tracking IDs).
  5616. ShipmentInfos []*OrdersCustomBatchRequestEntryShipLineItemsShipmentInfo `json:"shipmentInfos,omitempty"`
  5617. // TrackingId: Deprecated. Please use shipmentInfo instead. The tracking
  5618. // id for the shipment.
  5619. TrackingId string `json:"trackingId,omitempty"`
  5620. // ForceSendFields is a list of field names (e.g. "Carrier") to
  5621. // unconditionally include in API requests. By default, fields with
  5622. // empty values are omitted from API requests. However, any non-pointer,
  5623. // non-interface field appearing in ForceSendFields will be sent to the
  5624. // server regardless of whether the field is empty or not. This may be
  5625. // used to include empty fields in Patch requests.
  5626. ForceSendFields []string `json:"-"`
  5627. // NullFields is a list of field names (e.g. "Carrier") to include in
  5628. // API requests with the JSON null value. By default, fields with empty
  5629. // values are omitted from API requests. However, any field with an
  5630. // empty value appearing in NullFields will be sent to the server as
  5631. // null. It is an error if a field in this list has a non-empty value.
  5632. // This may be used to include null fields in Patch requests.
  5633. NullFields []string `json:"-"`
  5634. }
  5635. func (s *OrdersShipLineItemsRequest) MarshalJSON() ([]byte, error) {
  5636. type NoMethod OrdersShipLineItemsRequest
  5637. raw := NoMethod(*s)
  5638. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5639. }
  5640. type OrdersShipLineItemsResponse struct {
  5641. // ExecutionStatus: The status of the execution.
  5642. ExecutionStatus string `json:"executionStatus,omitempty"`
  5643. // Kind: Identifies what kind of resource this is. Value: the fixed
  5644. // string "content#ordersShipLineItemsResponse".
  5645. Kind string `json:"kind,omitempty"`
  5646. // ServerResponse contains the HTTP response code and headers from the
  5647. // server.
  5648. googleapi.ServerResponse `json:"-"`
  5649. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  5650. // unconditionally include in API requests. By default, fields with
  5651. // empty values are omitted from API requests. However, any non-pointer,
  5652. // non-interface field appearing in ForceSendFields will be sent to the
  5653. // server regardless of whether the field is empty or not. This may be
  5654. // used to include empty fields in Patch requests.
  5655. ForceSendFields []string `json:"-"`
  5656. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  5657. // include in API requests with the JSON null value. By default, fields
  5658. // with empty values are omitted from API requests. However, any field
  5659. // with an empty value appearing in NullFields will be sent to the
  5660. // server as null. It is an error if a field in this list has a
  5661. // non-empty value. This may be used to include null fields in Patch
  5662. // requests.
  5663. NullFields []string `json:"-"`
  5664. }
  5665. func (s *OrdersShipLineItemsResponse) MarshalJSON() ([]byte, error) {
  5666. type NoMethod OrdersShipLineItemsResponse
  5667. raw := NoMethod(*s)
  5668. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5669. }
  5670. type OrdersUpdateLineItemShippingDetailsRequest struct {
  5671. // DeliverByDate: Updated delivery by date, in ISO 8601 format. If not
  5672. // specified only ship by date is updated.
  5673. DeliverByDate string `json:"deliverByDate,omitempty"`
  5674. // LineItemId: The ID of the line item to set metadata. Either
  5675. // lineItemId or productId is required.
  5676. LineItemId string `json:"lineItemId,omitempty"`
  5677. // OperationId: The ID of the operation. Unique across all operations
  5678. // for a given order.
  5679. OperationId string `json:"operationId,omitempty"`
  5680. // ProductId: The ID of the product to set metadata. This is the REST ID
  5681. // used in the products service. Either lineItemId or productId is
  5682. // required.
  5683. ProductId string `json:"productId,omitempty"`
  5684. // ShipByDate: Updated ship by date, in ISO 8601 format. If not
  5685. // specified only deliver by date is updated.
  5686. ShipByDate string `json:"shipByDate,omitempty"`
  5687. // ForceSendFields is a list of field names (e.g. "DeliverByDate") to
  5688. // unconditionally include in API requests. By default, fields with
  5689. // empty values are omitted from API requests. However, any non-pointer,
  5690. // non-interface field appearing in ForceSendFields will be sent to the
  5691. // server regardless of whether the field is empty or not. This may be
  5692. // used to include empty fields in Patch requests.
  5693. ForceSendFields []string `json:"-"`
  5694. // NullFields is a list of field names (e.g. "DeliverByDate") to include
  5695. // in API requests with the JSON null value. By default, fields with
  5696. // empty values are omitted from API requests. However, any field with
  5697. // an empty value appearing in NullFields will be sent to the server as
  5698. // null. It is an error if a field in this list has a non-empty value.
  5699. // This may be used to include null fields in Patch requests.
  5700. NullFields []string `json:"-"`
  5701. }
  5702. func (s *OrdersUpdateLineItemShippingDetailsRequest) MarshalJSON() ([]byte, error) {
  5703. type NoMethod OrdersUpdateLineItemShippingDetailsRequest
  5704. raw := NoMethod(*s)
  5705. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5706. }
  5707. type OrdersUpdateLineItemShippingDetailsResponse struct {
  5708. // ExecutionStatus: The status of the execution.
  5709. ExecutionStatus string `json:"executionStatus,omitempty"`
  5710. // Kind: Identifies what kind of resource this is. Value: the fixed
  5711. // string "content#ordersUpdateLineItemShippingDetailsResponse".
  5712. Kind string `json:"kind,omitempty"`
  5713. // ServerResponse contains the HTTP response code and headers from the
  5714. // server.
  5715. googleapi.ServerResponse `json:"-"`
  5716. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  5717. // unconditionally include in API requests. By default, fields with
  5718. // empty values are omitted from API requests. However, any non-pointer,
  5719. // non-interface field appearing in ForceSendFields will be sent to the
  5720. // server regardless of whether the field is empty or not. This may be
  5721. // used to include empty fields in Patch requests.
  5722. ForceSendFields []string `json:"-"`
  5723. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  5724. // include in API requests with the JSON null value. By default, fields
  5725. // with empty values are omitted from API requests. However, any field
  5726. // with an empty value appearing in NullFields will be sent to the
  5727. // server as null. It is an error if a field in this list has a
  5728. // non-empty value. This may be used to include null fields in Patch
  5729. // requests.
  5730. NullFields []string `json:"-"`
  5731. }
  5732. func (s *OrdersUpdateLineItemShippingDetailsResponse) MarshalJSON() ([]byte, error) {
  5733. type NoMethod OrdersUpdateLineItemShippingDetailsResponse
  5734. raw := NoMethod(*s)
  5735. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5736. }
  5737. type OrdersUpdateMerchantOrderIdRequest struct {
  5738. // MerchantOrderId: The merchant order id to be assigned to the order.
  5739. // Must be unique per merchant.
  5740. MerchantOrderId string `json:"merchantOrderId,omitempty"`
  5741. // OperationId: The ID of the operation. Unique across all operations
  5742. // for a given order.
  5743. OperationId string `json:"operationId,omitempty"`
  5744. // ForceSendFields is a list of field names (e.g. "MerchantOrderId") to
  5745. // unconditionally include in API requests. By default, fields with
  5746. // empty values are omitted from API requests. However, any non-pointer,
  5747. // non-interface field appearing in ForceSendFields will be sent to the
  5748. // server regardless of whether the field is empty or not. This may be
  5749. // used to include empty fields in Patch requests.
  5750. ForceSendFields []string `json:"-"`
  5751. // NullFields is a list of field names (e.g. "MerchantOrderId") to
  5752. // include in API requests with the JSON null value. By default, fields
  5753. // with empty values are omitted from API requests. However, any field
  5754. // with an empty value appearing in NullFields will be sent to the
  5755. // server as null. It is an error if a field in this list has a
  5756. // non-empty value. This may be used to include null fields in Patch
  5757. // requests.
  5758. NullFields []string `json:"-"`
  5759. }
  5760. func (s *OrdersUpdateMerchantOrderIdRequest) MarshalJSON() ([]byte, error) {
  5761. type NoMethod OrdersUpdateMerchantOrderIdRequest
  5762. raw := NoMethod(*s)
  5763. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5764. }
  5765. type OrdersUpdateMerchantOrderIdResponse struct {
  5766. // ExecutionStatus: The status of the execution.
  5767. ExecutionStatus string `json:"executionStatus,omitempty"`
  5768. // Kind: Identifies what kind of resource this is. Value: the fixed
  5769. // string "content#ordersUpdateMerchantOrderIdResponse".
  5770. Kind string `json:"kind,omitempty"`
  5771. // ServerResponse contains the HTTP response code and headers from the
  5772. // server.
  5773. googleapi.ServerResponse `json:"-"`
  5774. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  5775. // unconditionally include in API requests. By default, fields with
  5776. // empty values are omitted from API requests. However, any non-pointer,
  5777. // non-interface field appearing in ForceSendFields will be sent to the
  5778. // server regardless of whether the field is empty or not. This may be
  5779. // used to include empty fields in Patch requests.
  5780. ForceSendFields []string `json:"-"`
  5781. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  5782. // include in API requests with the JSON null value. By default, fields
  5783. // with empty values are omitted from API requests. However, any field
  5784. // with an empty value appearing in NullFields will be sent to the
  5785. // server as null. It is an error if a field in this list has a
  5786. // non-empty value. This may be used to include null fields in Patch
  5787. // requests.
  5788. NullFields []string `json:"-"`
  5789. }
  5790. func (s *OrdersUpdateMerchantOrderIdResponse) MarshalJSON() ([]byte, error) {
  5791. type NoMethod OrdersUpdateMerchantOrderIdResponse
  5792. raw := NoMethod(*s)
  5793. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5794. }
  5795. type OrdersUpdateShipmentRequest struct {
  5796. // Carrier: The carrier handling the shipment. Not updated if missing.
  5797. // See shipments[].carrier in the Orders resource representation for a
  5798. // list of acceptable values.
  5799. Carrier string `json:"carrier,omitempty"`
  5800. // OperationId: The ID of the operation. Unique across all operations
  5801. // for a given order.
  5802. OperationId string `json:"operationId,omitempty"`
  5803. // ShipmentId: The ID of the shipment.
  5804. ShipmentId string `json:"shipmentId,omitempty"`
  5805. // Status: New status for the shipment. Not updated if missing.
  5806. Status string `json:"status,omitempty"`
  5807. // TrackingId: The tracking id for the shipment. Not updated if missing.
  5808. TrackingId string `json:"trackingId,omitempty"`
  5809. // ForceSendFields is a list of field names (e.g. "Carrier") to
  5810. // unconditionally include in API requests. By default, fields with
  5811. // empty values are omitted from API requests. However, any non-pointer,
  5812. // non-interface field appearing in ForceSendFields will be sent to the
  5813. // server regardless of whether the field is empty or not. This may be
  5814. // used to include empty fields in Patch requests.
  5815. ForceSendFields []string `json:"-"`
  5816. // NullFields is a list of field names (e.g. "Carrier") to include in
  5817. // API requests with the JSON null value. By default, fields with empty
  5818. // values are omitted from API requests. However, any field with an
  5819. // empty value appearing in NullFields will be sent to the server as
  5820. // null. It is an error if a field in this list has a non-empty value.
  5821. // This may be used to include null fields in Patch requests.
  5822. NullFields []string `json:"-"`
  5823. }
  5824. func (s *OrdersUpdateShipmentRequest) MarshalJSON() ([]byte, error) {
  5825. type NoMethod OrdersUpdateShipmentRequest
  5826. raw := NoMethod(*s)
  5827. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5828. }
  5829. type OrdersUpdateShipmentResponse struct {
  5830. // ExecutionStatus: The status of the execution.
  5831. ExecutionStatus string `json:"executionStatus,omitempty"`
  5832. // Kind: Identifies what kind of resource this is. Value: the fixed
  5833. // string "content#ordersUpdateShipmentResponse".
  5834. Kind string `json:"kind,omitempty"`
  5835. // ServerResponse contains the HTTP response code and headers from the
  5836. // server.
  5837. googleapi.ServerResponse `json:"-"`
  5838. // ForceSendFields is a list of field names (e.g. "ExecutionStatus") to
  5839. // unconditionally include in API requests. By default, fields with
  5840. // empty values are omitted from API requests. However, any non-pointer,
  5841. // non-interface field appearing in ForceSendFields will be sent to the
  5842. // server regardless of whether the field is empty or not. This may be
  5843. // used to include empty fields in Patch requests.
  5844. ForceSendFields []string `json:"-"`
  5845. // NullFields is a list of field names (e.g. "ExecutionStatus") to
  5846. // include in API requests with the JSON null value. By default, fields
  5847. // with empty values are omitted from API requests. However, any field
  5848. // with an empty value appearing in NullFields will be sent to the
  5849. // server as null. It is an error if a field in this list has a
  5850. // non-empty value. This may be used to include null fields in Patch
  5851. // requests.
  5852. NullFields []string `json:"-"`
  5853. }
  5854. func (s *OrdersUpdateShipmentResponse) MarshalJSON() ([]byte, error) {
  5855. type NoMethod OrdersUpdateShipmentResponse
  5856. raw := NoMethod(*s)
  5857. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5858. }
  5859. type PosCustomBatchRequest struct {
  5860. // Entries: The request entries to be processed in the batch.
  5861. Entries []*PosCustomBatchRequestEntry `json:"entries,omitempty"`
  5862. // ForceSendFields is a list of field names (e.g. "Entries") to
  5863. // unconditionally include in API requests. By default, fields with
  5864. // empty values are omitted from API requests. However, any non-pointer,
  5865. // non-interface field appearing in ForceSendFields will be sent to the
  5866. // server regardless of whether the field is empty or not. This may be
  5867. // used to include empty fields in Patch requests.
  5868. ForceSendFields []string `json:"-"`
  5869. // NullFields is a list of field names (e.g. "Entries") to include in
  5870. // API requests with the JSON null value. By default, fields with empty
  5871. // values are omitted from API requests. However, any field with an
  5872. // empty value appearing in NullFields will be sent to the server as
  5873. // null. It is an error if a field in this list has a non-empty value.
  5874. // This may be used to include null fields in Patch requests.
  5875. NullFields []string `json:"-"`
  5876. }
  5877. func (s *PosCustomBatchRequest) MarshalJSON() ([]byte, error) {
  5878. type NoMethod PosCustomBatchRequest
  5879. raw := NoMethod(*s)
  5880. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5881. }
  5882. type PosCustomBatchRequestEntry struct {
  5883. // BatchId: An entry ID, unique within the batch request.
  5884. BatchId int64 `json:"batchId,omitempty"`
  5885. // Inventory: The inventory to submit. Set this only if the method is
  5886. // inventory.
  5887. Inventory *PosInventory `json:"inventory,omitempty"`
  5888. // MerchantId: The ID of the POS data provider.
  5889. MerchantId uint64 `json:"merchantId,omitempty,string"`
  5890. Method string `json:"method,omitempty"`
  5891. // Sale: The sale information to submit. Set this only if the method is
  5892. // sale.
  5893. Sale *PosSale `json:"sale,omitempty"`
  5894. // Store: The store information to submit. Set this only if the method
  5895. // is insert.
  5896. Store *PosStore `json:"store,omitempty"`
  5897. // StoreCode: The store code. Set this only if the method is delete or
  5898. // get.
  5899. StoreCode string `json:"storeCode,omitempty"`
  5900. // TargetMerchantId: The ID of the account for which to get/submit data.
  5901. TargetMerchantId uint64 `json:"targetMerchantId,omitempty,string"`
  5902. // ForceSendFields is a list of field names (e.g. "BatchId") to
  5903. // unconditionally include in API requests. By default, fields with
  5904. // empty values are omitted from API requests. However, any non-pointer,
  5905. // non-interface field appearing in ForceSendFields will be sent to the
  5906. // server regardless of whether the field is empty or not. This may be
  5907. // used to include empty fields in Patch requests.
  5908. ForceSendFields []string `json:"-"`
  5909. // NullFields is a list of field names (e.g. "BatchId") to include in
  5910. // API requests with the JSON null value. By default, fields with empty
  5911. // values are omitted from API requests. However, any field with an
  5912. // empty value appearing in NullFields will be sent to the server as
  5913. // null. It is an error if a field in this list has a non-empty value.
  5914. // This may be used to include null fields in Patch requests.
  5915. NullFields []string `json:"-"`
  5916. }
  5917. func (s *PosCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  5918. type NoMethod PosCustomBatchRequestEntry
  5919. raw := NoMethod(*s)
  5920. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5921. }
  5922. type PosCustomBatchResponse struct {
  5923. // Entries: The result of the execution of the batch requests.
  5924. Entries []*PosCustomBatchResponseEntry `json:"entries,omitempty"`
  5925. // Kind: Identifies what kind of resource this is. Value: the fixed
  5926. // string "content#posCustomBatchResponse".
  5927. Kind string `json:"kind,omitempty"`
  5928. // ServerResponse contains the HTTP response code and headers from the
  5929. // server.
  5930. googleapi.ServerResponse `json:"-"`
  5931. // ForceSendFields is a list of field names (e.g. "Entries") to
  5932. // unconditionally include in API requests. By default, fields with
  5933. // empty values are omitted from API requests. However, any non-pointer,
  5934. // non-interface field appearing in ForceSendFields will be sent to the
  5935. // server regardless of whether the field is empty or not. This may be
  5936. // used to include empty fields in Patch requests.
  5937. ForceSendFields []string `json:"-"`
  5938. // NullFields is a list of field names (e.g. "Entries") to include in
  5939. // API requests with the JSON null value. By default, fields with empty
  5940. // values are omitted from API requests. However, any field with an
  5941. // empty value appearing in NullFields will be sent to the server as
  5942. // null. It is an error if a field in this list has a non-empty value.
  5943. // This may be used to include null fields in Patch requests.
  5944. NullFields []string `json:"-"`
  5945. }
  5946. func (s *PosCustomBatchResponse) MarshalJSON() ([]byte, error) {
  5947. type NoMethod PosCustomBatchResponse
  5948. raw := NoMethod(*s)
  5949. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5950. }
  5951. type PosCustomBatchResponseEntry struct {
  5952. // BatchId: The ID of the request entry to which this entry responds.
  5953. BatchId int64 `json:"batchId,omitempty"`
  5954. // Errors: A list of errors defined if, and only if, the request failed.
  5955. Errors *Errors `json:"errors,omitempty"`
  5956. // Inventory: The updated inventory information.
  5957. Inventory *PosInventory `json:"inventory,omitempty"`
  5958. // Kind: Identifies what kind of resource this is. Value: the fixed
  5959. // string "content#posCustomBatchResponseEntry".
  5960. Kind string `json:"kind,omitempty"`
  5961. // Sale: The updated sale information.
  5962. Sale *PosSale `json:"sale,omitempty"`
  5963. // Store: The retrieved or updated store information.
  5964. Store *PosStore `json:"store,omitempty"`
  5965. // ForceSendFields is a list of field names (e.g. "BatchId") to
  5966. // unconditionally include in API requests. By default, fields with
  5967. // empty values are omitted from API requests. However, any non-pointer,
  5968. // non-interface field appearing in ForceSendFields will be sent to the
  5969. // server regardless of whether the field is empty or not. This may be
  5970. // used to include empty fields in Patch requests.
  5971. ForceSendFields []string `json:"-"`
  5972. // NullFields is a list of field names (e.g. "BatchId") to include in
  5973. // API requests with the JSON null value. By default, fields with empty
  5974. // values are omitted from API requests. However, any field with an
  5975. // empty value appearing in NullFields will be sent to the server as
  5976. // null. It is an error if a field in this list has a non-empty value.
  5977. // This may be used to include null fields in Patch requests.
  5978. NullFields []string `json:"-"`
  5979. }
  5980. func (s *PosCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  5981. type NoMethod PosCustomBatchResponseEntry
  5982. raw := NoMethod(*s)
  5983. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  5984. }
  5985. type PosDataProviders struct {
  5986. // Country: Country code.
  5987. Country string `json:"country,omitempty"`
  5988. // PosDataProviders: A list of POS data providers.
  5989. PosDataProviders []*PosDataProvidersPosDataProvider `json:"posDataProviders,omitempty"`
  5990. // ForceSendFields is a list of field names (e.g. "Country") to
  5991. // unconditionally include in API requests. By default, fields with
  5992. // empty values are omitted from API requests. However, any non-pointer,
  5993. // non-interface field appearing in ForceSendFields will be sent to the
  5994. // server regardless of whether the field is empty or not. This may be
  5995. // used to include empty fields in Patch requests.
  5996. ForceSendFields []string `json:"-"`
  5997. // NullFields is a list of field names (e.g. "Country") to include in
  5998. // API requests with the JSON null value. By default, fields with empty
  5999. // values are omitted from API requests. However, any field with an
  6000. // empty value appearing in NullFields will be sent to the server as
  6001. // null. It is an error if a field in this list has a non-empty value.
  6002. // This may be used to include null fields in Patch requests.
  6003. NullFields []string `json:"-"`
  6004. }
  6005. func (s *PosDataProviders) MarshalJSON() ([]byte, error) {
  6006. type NoMethod PosDataProviders
  6007. raw := NoMethod(*s)
  6008. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6009. }
  6010. type PosDataProvidersPosDataProvider struct {
  6011. // DisplayName: The display name of Pos data Provider.
  6012. DisplayName string `json:"displayName,omitempty"`
  6013. // FullName: The full name of this POS data Provider.
  6014. FullName string `json:"fullName,omitempty"`
  6015. // ProviderId: The ID of the account.
  6016. ProviderId uint64 `json:"providerId,omitempty,string"`
  6017. // ForceSendFields is a list of field names (e.g. "DisplayName") to
  6018. // unconditionally include in API requests. By default, fields with
  6019. // empty values are omitted from API requests. However, any non-pointer,
  6020. // non-interface field appearing in ForceSendFields will be sent to the
  6021. // server regardless of whether the field is empty or not. This may be
  6022. // used to include empty fields in Patch requests.
  6023. ForceSendFields []string `json:"-"`
  6024. // NullFields is a list of field names (e.g. "DisplayName") to include
  6025. // in API requests with the JSON null value. By default, fields with
  6026. // empty values are omitted from API requests. However, any field with
  6027. // an empty value appearing in NullFields will be sent to the server as
  6028. // null. It is an error if a field in this list has a non-empty value.
  6029. // This may be used to include null fields in Patch requests.
  6030. NullFields []string `json:"-"`
  6031. }
  6032. func (s *PosDataProvidersPosDataProvider) MarshalJSON() ([]byte, error) {
  6033. type NoMethod PosDataProvidersPosDataProvider
  6034. raw := NoMethod(*s)
  6035. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6036. }
  6037. // PosInventory: The absolute quantity of an item available at the given
  6038. // store.
  6039. type PosInventory struct {
  6040. // ContentLanguage: The two-letter ISO 639-1 language code for the item.
  6041. ContentLanguage string `json:"contentLanguage,omitempty"`
  6042. // Gtin: Global Trade Item Number.
  6043. Gtin string `json:"gtin,omitempty"`
  6044. // ItemId: A unique identifier for the item.
  6045. ItemId string `json:"itemId,omitempty"`
  6046. // Kind: Identifies what kind of resource this is. Value: the fixed
  6047. // string "content#posInventory".
  6048. Kind string `json:"kind,omitempty"`
  6049. // Price: The current price of the item.
  6050. Price *Price `json:"price,omitempty"`
  6051. // Quantity: The available quantity of the item.
  6052. Quantity int64 `json:"quantity,omitempty,string"`
  6053. // StoreCode: The identifier of the merchant's store. Either a storeCode
  6054. // inserted via the API or the code of the store in Google My Business.
  6055. StoreCode string `json:"storeCode,omitempty"`
  6056. // TargetCountry: The CLDR territory code for the item.
  6057. TargetCountry string `json:"targetCountry,omitempty"`
  6058. // Timestamp: The inventory timestamp, in ISO 8601 format.
  6059. Timestamp string `json:"timestamp,omitempty"`
  6060. // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
  6061. // unconditionally include in API requests. By default, fields with
  6062. // empty values are omitted from API requests. However, any non-pointer,
  6063. // non-interface field appearing in ForceSendFields will be sent to the
  6064. // server regardless of whether the field is empty or not. This may be
  6065. // used to include empty fields in Patch requests.
  6066. ForceSendFields []string `json:"-"`
  6067. // NullFields is a list of field names (e.g. "ContentLanguage") to
  6068. // include in API requests with the JSON null value. By default, fields
  6069. // with empty values are omitted from API requests. However, any field
  6070. // with an empty value appearing in NullFields will be sent to the
  6071. // server as null. It is an error if a field in this list has a
  6072. // non-empty value. This may be used to include null fields in Patch
  6073. // requests.
  6074. NullFields []string `json:"-"`
  6075. }
  6076. func (s *PosInventory) MarshalJSON() ([]byte, error) {
  6077. type NoMethod PosInventory
  6078. raw := NoMethod(*s)
  6079. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6080. }
  6081. type PosInventoryRequest struct {
  6082. // ContentLanguage: The two-letter ISO 639-1 language code for the item.
  6083. ContentLanguage string `json:"contentLanguage,omitempty"`
  6084. // Gtin: Global Trade Item Number.
  6085. Gtin string `json:"gtin,omitempty"`
  6086. // ItemId: A unique identifier for the item.
  6087. ItemId string `json:"itemId,omitempty"`
  6088. // Price: The current price of the item.
  6089. Price *Price `json:"price,omitempty"`
  6090. // Quantity: The available quantity of the item.
  6091. Quantity int64 `json:"quantity,omitempty,string"`
  6092. // StoreCode: The identifier of the merchant's store. Either a storeCode
  6093. // inserted via the API or the code of the store in Google My Business.
  6094. StoreCode string `json:"storeCode,omitempty"`
  6095. // TargetCountry: The CLDR territory code for the item.
  6096. TargetCountry string `json:"targetCountry,omitempty"`
  6097. // Timestamp: The inventory timestamp, in ISO 8601 format.
  6098. Timestamp string `json:"timestamp,omitempty"`
  6099. // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
  6100. // unconditionally include in API requests. By default, fields with
  6101. // empty values are omitted from API requests. However, any non-pointer,
  6102. // non-interface field appearing in ForceSendFields will be sent to the
  6103. // server regardless of whether the field is empty or not. This may be
  6104. // used to include empty fields in Patch requests.
  6105. ForceSendFields []string `json:"-"`
  6106. // NullFields is a list of field names (e.g. "ContentLanguage") to
  6107. // include in API requests with the JSON null value. By default, fields
  6108. // with empty values are omitted from API requests. However, any field
  6109. // with an empty value appearing in NullFields will be sent to the
  6110. // server as null. It is an error if a field in this list has a
  6111. // non-empty value. This may be used to include null fields in Patch
  6112. // requests.
  6113. NullFields []string `json:"-"`
  6114. }
  6115. func (s *PosInventoryRequest) MarshalJSON() ([]byte, error) {
  6116. type NoMethod PosInventoryRequest
  6117. raw := NoMethod(*s)
  6118. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6119. }
  6120. type PosInventoryResponse struct {
  6121. // ContentLanguage: The two-letter ISO 639-1 language code for the item.
  6122. ContentLanguage string `json:"contentLanguage,omitempty"`
  6123. // Gtin: Global Trade Item Number.
  6124. Gtin string `json:"gtin,omitempty"`
  6125. // ItemId: A unique identifier for the item.
  6126. ItemId string `json:"itemId,omitempty"`
  6127. // Kind: Identifies what kind of resource this is. Value: the fixed
  6128. // string "content#posInventoryResponse".
  6129. Kind string `json:"kind,omitempty"`
  6130. // Price: The current price of the item.
  6131. Price *Price `json:"price,omitempty"`
  6132. // Quantity: The available quantity of the item.
  6133. Quantity int64 `json:"quantity,omitempty,string"`
  6134. // StoreCode: The identifier of the merchant's store. Either a storeCode
  6135. // inserted via the API or the code of the store in Google My Business.
  6136. StoreCode string `json:"storeCode,omitempty"`
  6137. // TargetCountry: The CLDR territory code for the item.
  6138. TargetCountry string `json:"targetCountry,omitempty"`
  6139. // Timestamp: The inventory timestamp, in ISO 8601 format.
  6140. Timestamp string `json:"timestamp,omitempty"`
  6141. // ServerResponse contains the HTTP response code and headers from the
  6142. // server.
  6143. googleapi.ServerResponse `json:"-"`
  6144. // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
  6145. // unconditionally include in API requests. By default, fields with
  6146. // empty values are omitted from API requests. However, any non-pointer,
  6147. // non-interface field appearing in ForceSendFields will be sent to the
  6148. // server regardless of whether the field is empty or not. This may be
  6149. // used to include empty fields in Patch requests.
  6150. ForceSendFields []string `json:"-"`
  6151. // NullFields is a list of field names (e.g. "ContentLanguage") to
  6152. // include in API requests with the JSON null value. By default, fields
  6153. // with empty values are omitted from API requests. However, any field
  6154. // with an empty value appearing in NullFields will be sent to the
  6155. // server as null. It is an error if a field in this list has a
  6156. // non-empty value. This may be used to include null fields in Patch
  6157. // requests.
  6158. NullFields []string `json:"-"`
  6159. }
  6160. func (s *PosInventoryResponse) MarshalJSON() ([]byte, error) {
  6161. type NoMethod PosInventoryResponse
  6162. raw := NoMethod(*s)
  6163. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6164. }
  6165. type PosListResponse struct {
  6166. // Kind: Identifies what kind of resource this is. Value: the fixed
  6167. // string "content#posListResponse".
  6168. Kind string `json:"kind,omitempty"`
  6169. Resources []*PosStore `json:"resources,omitempty"`
  6170. // ServerResponse contains the HTTP response code and headers from the
  6171. // server.
  6172. googleapi.ServerResponse `json:"-"`
  6173. // ForceSendFields is a list of field names (e.g. "Kind") to
  6174. // unconditionally include in API requests. By default, fields with
  6175. // empty values are omitted from API requests. However, any non-pointer,
  6176. // non-interface field appearing in ForceSendFields will be sent to the
  6177. // server regardless of whether the field is empty or not. This may be
  6178. // used to include empty fields in Patch requests.
  6179. ForceSendFields []string `json:"-"`
  6180. // NullFields is a list of field names (e.g. "Kind") to include in API
  6181. // requests with the JSON null value. By default, fields with empty
  6182. // values are omitted from API requests. However, any field with an
  6183. // empty value appearing in NullFields will be sent to the server as
  6184. // null. It is an error if a field in this list has a non-empty value.
  6185. // This may be used to include null fields in Patch requests.
  6186. NullFields []string `json:"-"`
  6187. }
  6188. func (s *PosListResponse) MarshalJSON() ([]byte, error) {
  6189. type NoMethod PosListResponse
  6190. raw := NoMethod(*s)
  6191. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6192. }
  6193. // PosSale: The change of the available quantity of an item at the given
  6194. // store.
  6195. type PosSale struct {
  6196. // ContentLanguage: The two-letter ISO 639-1 language code for the item.
  6197. ContentLanguage string `json:"contentLanguage,omitempty"`
  6198. // Gtin: Global Trade Item Number.
  6199. Gtin string `json:"gtin,omitempty"`
  6200. // ItemId: A unique identifier for the item.
  6201. ItemId string `json:"itemId,omitempty"`
  6202. // Kind: Identifies what kind of resource this is. Value: the fixed
  6203. // string "content#posSale".
  6204. Kind string `json:"kind,omitempty"`
  6205. // Price: The price of the item.
  6206. Price *Price `json:"price,omitempty"`
  6207. // Quantity: The relative change of the available quantity. Negative for
  6208. // items sold.
  6209. Quantity int64 `json:"quantity,omitempty,string"`
  6210. // SaleId: A unique ID to group items from the same sale event.
  6211. SaleId string `json:"saleId,omitempty"`
  6212. // StoreCode: The identifier of the merchant's store. Either a storeCode
  6213. // inserted via the API or the code of the store in Google My Business.
  6214. StoreCode string `json:"storeCode,omitempty"`
  6215. // TargetCountry: The CLDR territory code for the item.
  6216. TargetCountry string `json:"targetCountry,omitempty"`
  6217. // Timestamp: The inventory timestamp, in ISO 8601 format.
  6218. Timestamp string `json:"timestamp,omitempty"`
  6219. // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
  6220. // unconditionally include in API requests. By default, fields with
  6221. // empty values are omitted from API requests. However, any non-pointer,
  6222. // non-interface field appearing in ForceSendFields will be sent to the
  6223. // server regardless of whether the field is empty or not. This may be
  6224. // used to include empty fields in Patch requests.
  6225. ForceSendFields []string `json:"-"`
  6226. // NullFields is a list of field names (e.g. "ContentLanguage") to
  6227. // include in API requests with the JSON null value. By default, fields
  6228. // with empty values are omitted from API requests. However, any field
  6229. // with an empty value appearing in NullFields will be sent to the
  6230. // server as null. It is an error if a field in this list has a
  6231. // non-empty value. This may be used to include null fields in Patch
  6232. // requests.
  6233. NullFields []string `json:"-"`
  6234. }
  6235. func (s *PosSale) MarshalJSON() ([]byte, error) {
  6236. type NoMethod PosSale
  6237. raw := NoMethod(*s)
  6238. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6239. }
  6240. type PosSaleRequest struct {
  6241. // ContentLanguage: The two-letter ISO 639-1 language code for the item.
  6242. ContentLanguage string `json:"contentLanguage,omitempty"`
  6243. // Gtin: Global Trade Item Number.
  6244. Gtin string `json:"gtin,omitempty"`
  6245. // ItemId: A unique identifier for the item.
  6246. ItemId string `json:"itemId,omitempty"`
  6247. // Price: The price of the item.
  6248. Price *Price `json:"price,omitempty"`
  6249. // Quantity: The relative change of the available quantity. Negative for
  6250. // items sold.
  6251. Quantity int64 `json:"quantity,omitempty,string"`
  6252. // SaleId: A unique ID to group items from the same sale event.
  6253. SaleId string `json:"saleId,omitempty"`
  6254. // StoreCode: The identifier of the merchant's store. Either a storeCode
  6255. // inserted via the API or the code of the store in Google My Business.
  6256. StoreCode string `json:"storeCode,omitempty"`
  6257. // TargetCountry: The CLDR territory code for the item.
  6258. TargetCountry string `json:"targetCountry,omitempty"`
  6259. // Timestamp: The inventory timestamp, in ISO 8601 format.
  6260. Timestamp string `json:"timestamp,omitempty"`
  6261. // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
  6262. // unconditionally include in API requests. By default, fields with
  6263. // empty values are omitted from API requests. However, any non-pointer,
  6264. // non-interface field appearing in ForceSendFields will be sent to the
  6265. // server regardless of whether the field is empty or not. This may be
  6266. // used to include empty fields in Patch requests.
  6267. ForceSendFields []string `json:"-"`
  6268. // NullFields is a list of field names (e.g. "ContentLanguage") to
  6269. // include in API requests with the JSON null value. By default, fields
  6270. // with empty values are omitted from API requests. However, any field
  6271. // with an empty value appearing in NullFields will be sent to the
  6272. // server as null. It is an error if a field in this list has a
  6273. // non-empty value. This may be used to include null fields in Patch
  6274. // requests.
  6275. NullFields []string `json:"-"`
  6276. }
  6277. func (s *PosSaleRequest) MarshalJSON() ([]byte, error) {
  6278. type NoMethod PosSaleRequest
  6279. raw := NoMethod(*s)
  6280. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6281. }
  6282. type PosSaleResponse struct {
  6283. // ContentLanguage: The two-letter ISO 639-1 language code for the item.
  6284. ContentLanguage string `json:"contentLanguage,omitempty"`
  6285. // Gtin: Global Trade Item Number.
  6286. Gtin string `json:"gtin,omitempty"`
  6287. // ItemId: A unique identifier for the item.
  6288. ItemId string `json:"itemId,omitempty"`
  6289. // Kind: Identifies what kind of resource this is. Value: the fixed
  6290. // string "content#posSaleResponse".
  6291. Kind string `json:"kind,omitempty"`
  6292. // Price: The price of the item.
  6293. Price *Price `json:"price,omitempty"`
  6294. // Quantity: The relative change of the available quantity. Negative for
  6295. // items sold.
  6296. Quantity int64 `json:"quantity,omitempty,string"`
  6297. // SaleId: A unique ID to group items from the same sale event.
  6298. SaleId string `json:"saleId,omitempty"`
  6299. // StoreCode: The identifier of the merchant's store. Either a storeCode
  6300. // inserted via the API or the code of the store in Google My Business.
  6301. StoreCode string `json:"storeCode,omitempty"`
  6302. // TargetCountry: The CLDR territory code for the item.
  6303. TargetCountry string `json:"targetCountry,omitempty"`
  6304. // Timestamp: The inventory timestamp, in ISO 8601 format.
  6305. Timestamp string `json:"timestamp,omitempty"`
  6306. // ServerResponse contains the HTTP response code and headers from the
  6307. // server.
  6308. googleapi.ServerResponse `json:"-"`
  6309. // ForceSendFields is a list of field names (e.g. "ContentLanguage") to
  6310. // unconditionally include in API requests. By default, fields with
  6311. // empty values are omitted from API requests. However, any non-pointer,
  6312. // non-interface field appearing in ForceSendFields will be sent to the
  6313. // server regardless of whether the field is empty or not. This may be
  6314. // used to include empty fields in Patch requests.
  6315. ForceSendFields []string `json:"-"`
  6316. // NullFields is a list of field names (e.g. "ContentLanguage") to
  6317. // include in API requests with the JSON null value. By default, fields
  6318. // with empty values are omitted from API requests. However, any field
  6319. // with an empty value appearing in NullFields will be sent to the
  6320. // server as null. It is an error if a field in this list has a
  6321. // non-empty value. This may be used to include null fields in Patch
  6322. // requests.
  6323. NullFields []string `json:"-"`
  6324. }
  6325. func (s *PosSaleResponse) MarshalJSON() ([]byte, error) {
  6326. type NoMethod PosSaleResponse
  6327. raw := NoMethod(*s)
  6328. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6329. }
  6330. // PosStore: Store resource.
  6331. type PosStore struct {
  6332. // Kind: Identifies what kind of resource this is. Value: the fixed
  6333. // string "content#posStore".
  6334. Kind string `json:"kind,omitempty"`
  6335. // StoreAddress: The street address of the store.
  6336. StoreAddress string `json:"storeAddress,omitempty"`
  6337. // StoreCode: A store identifier that is unique for the given merchant.
  6338. StoreCode string `json:"storeCode,omitempty"`
  6339. // ServerResponse contains the HTTP response code and headers from the
  6340. // server.
  6341. googleapi.ServerResponse `json:"-"`
  6342. // ForceSendFields is a list of field names (e.g. "Kind") to
  6343. // unconditionally include in API requests. By default, fields with
  6344. // empty values are omitted from API requests. However, any non-pointer,
  6345. // non-interface field appearing in ForceSendFields will be sent to the
  6346. // server regardless of whether the field is empty or not. This may be
  6347. // used to include empty fields in Patch requests.
  6348. ForceSendFields []string `json:"-"`
  6349. // NullFields is a list of field names (e.g. "Kind") to include in API
  6350. // requests with the JSON null value. By default, fields with empty
  6351. // values are omitted from API requests. However, any field with an
  6352. // empty value appearing in NullFields will be sent to the server as
  6353. // null. It is an error if a field in this list has a non-empty value.
  6354. // This may be used to include null fields in Patch requests.
  6355. NullFields []string `json:"-"`
  6356. }
  6357. func (s *PosStore) MarshalJSON() ([]byte, error) {
  6358. type NoMethod PosStore
  6359. raw := NoMethod(*s)
  6360. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6361. }
  6362. type PostalCodeGroup struct {
  6363. // Country: The CLDR territory code of the country the postal code group
  6364. // applies to. Required.
  6365. Country string `json:"country,omitempty"`
  6366. // Name: The name of the postal code group, referred to in headers.
  6367. // Required.
  6368. Name string `json:"name,omitempty"`
  6369. // PostalCodeRanges: A range of postal codes. Required.
  6370. PostalCodeRanges []*PostalCodeRange `json:"postalCodeRanges,omitempty"`
  6371. // ForceSendFields is a list of field names (e.g. "Country") to
  6372. // unconditionally include in API requests. By default, fields with
  6373. // empty values are omitted from API requests. However, any non-pointer,
  6374. // non-interface field appearing in ForceSendFields will be sent to the
  6375. // server regardless of whether the field is empty or not. This may be
  6376. // used to include empty fields in Patch requests.
  6377. ForceSendFields []string `json:"-"`
  6378. // NullFields is a list of field names (e.g. "Country") to include in
  6379. // API requests with the JSON null value. By default, fields with empty
  6380. // values are omitted from API requests. However, any field with an
  6381. // empty value appearing in NullFields will be sent to the server as
  6382. // null. It is an error if a field in this list has a non-empty value.
  6383. // This may be used to include null fields in Patch requests.
  6384. NullFields []string `json:"-"`
  6385. }
  6386. func (s *PostalCodeGroup) MarshalJSON() ([]byte, error) {
  6387. type NoMethod PostalCodeGroup
  6388. raw := NoMethod(*s)
  6389. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6390. }
  6391. type PostalCodeRange struct {
  6392. // PostalCodeRangeBegin: A postal code or a pattern of the form prefix*
  6393. // denoting the inclusive lower bound of the range defining the area.
  6394. // Examples values: "94108", "9410*", "9*". Required.
  6395. PostalCodeRangeBegin string `json:"postalCodeRangeBegin,omitempty"`
  6396. // PostalCodeRangeEnd: A postal code or a pattern of the form prefix*
  6397. // denoting the inclusive upper bound of the range defining the area. It
  6398. // must have the same length as postalCodeRangeBegin: if
  6399. // postalCodeRangeBegin is a postal code then postalCodeRangeEnd must be
  6400. // a postal code too; if postalCodeRangeBegin is a pattern then
  6401. // postalCodeRangeEnd must be a pattern with the same prefix length.
  6402. // Optional: if not set, then the area is defined as being all the
  6403. // postal codes matching postalCodeRangeBegin.
  6404. PostalCodeRangeEnd string `json:"postalCodeRangeEnd,omitempty"`
  6405. // ForceSendFields is a list of field names (e.g.
  6406. // "PostalCodeRangeBegin") to unconditionally include in API requests.
  6407. // By default, fields with empty values are omitted from API requests.
  6408. // However, any non-pointer, non-interface field appearing in
  6409. // ForceSendFields will be sent to the server regardless of whether the
  6410. // field is empty or not. This may be used to include empty fields in
  6411. // Patch requests.
  6412. ForceSendFields []string `json:"-"`
  6413. // NullFields is a list of field names (e.g. "PostalCodeRangeBegin") to
  6414. // include in API requests with the JSON null value. By default, fields
  6415. // with empty values are omitted from API requests. However, any field
  6416. // with an empty value appearing in NullFields will be sent to the
  6417. // server as null. It is an error if a field in this list has a
  6418. // non-empty value. This may be used to include null fields in Patch
  6419. // requests.
  6420. NullFields []string `json:"-"`
  6421. }
  6422. func (s *PostalCodeRange) MarshalJSON() ([]byte, error) {
  6423. type NoMethod PostalCodeRange
  6424. raw := NoMethod(*s)
  6425. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6426. }
  6427. type Price struct {
  6428. // Currency: The currency of the price.
  6429. Currency string `json:"currency,omitempty"`
  6430. // Value: The price represented as a number.
  6431. Value string `json:"value,omitempty"`
  6432. // ForceSendFields is a list of field names (e.g. "Currency") to
  6433. // unconditionally include in API requests. By default, fields with
  6434. // empty values are omitted from API requests. However, any non-pointer,
  6435. // non-interface field appearing in ForceSendFields will be sent to the
  6436. // server regardless of whether the field is empty or not. This may be
  6437. // used to include empty fields in Patch requests.
  6438. ForceSendFields []string `json:"-"`
  6439. // NullFields is a list of field names (e.g. "Currency") to include in
  6440. // API requests with the JSON null value. By default, fields with empty
  6441. // values are omitted from API requests. However, any field with an
  6442. // empty value appearing in NullFields will be sent to the server as
  6443. // null. It is an error if a field in this list has a non-empty value.
  6444. // This may be used to include null fields in Patch requests.
  6445. NullFields []string `json:"-"`
  6446. }
  6447. func (s *Price) MarshalJSON() ([]byte, error) {
  6448. type NoMethod Price
  6449. raw := NoMethod(*s)
  6450. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6451. }
  6452. // Product: Product data.
  6453. type Product struct {
  6454. // AdditionalImageLinks: Additional URLs of images of the item.
  6455. AdditionalImageLinks []string `json:"additionalImageLinks,omitempty"`
  6456. // AdditionalProductTypes: Additional categories of the item (formatted
  6457. // as in products feed specification).
  6458. AdditionalProductTypes []string `json:"additionalProductTypes,omitempty"`
  6459. // Adult: Set to true if the item is targeted towards adults.
  6460. Adult bool `json:"adult,omitempty"`
  6461. // AdwordsGrouping: Used to group items in an arbitrary way. Only for
  6462. // CPA%, discouraged otherwise.
  6463. AdwordsGrouping string `json:"adwordsGrouping,omitempty"`
  6464. // AdwordsLabels: Similar to adwords_grouping, but only works on CPC.
  6465. AdwordsLabels []string `json:"adwordsLabels,omitempty"`
  6466. // AdwordsRedirect: Allows advertisers to override the item URL when the
  6467. // product is shown within the context of Product Ads.
  6468. AdwordsRedirect string `json:"adwordsRedirect,omitempty"`
  6469. // AgeGroup: Target age group of the item.
  6470. AgeGroup string `json:"ageGroup,omitempty"`
  6471. // Aspects: Specifies the intended aspects for the product.
  6472. Aspects []*ProductAspect `json:"aspects,omitempty"`
  6473. // Availability: Availability status of the item.
  6474. Availability string `json:"availability,omitempty"`
  6475. // AvailabilityDate: The day a pre-ordered product becomes available for
  6476. // delivery, in ISO 8601 format.
  6477. AvailabilityDate string `json:"availabilityDate,omitempty"`
  6478. // Brand: Brand of the item.
  6479. Brand string `json:"brand,omitempty"`
  6480. // Channel: The item's channel (online or local).
  6481. Channel string `json:"channel,omitempty"`
  6482. // Color: Color of the item.
  6483. Color string `json:"color,omitempty"`
  6484. // Condition: Condition or state of the item.
  6485. Condition string `json:"condition,omitempty"`
  6486. // ContentLanguage: The two-letter ISO 639-1 language code for the item.
  6487. ContentLanguage string `json:"contentLanguage,omitempty"`
  6488. // CustomAttributes: A list of custom (merchant-provided) attributes. It
  6489. // can also be used for submitting any attribute of the feed
  6490. // specification in its generic form (e.g., { "name": "size type",
  6491. // "type": "text", "value": "regular" }). This is useful for submitting
  6492. // attributes not explicitly exposed by the API.
  6493. CustomAttributes []*ProductCustomAttribute `json:"customAttributes,omitempty"`
  6494. // CustomGroups: A list of custom (merchant-provided) custom attribute
  6495. // groups.
  6496. CustomGroups []*ProductCustomGroup `json:"customGroups,omitempty"`
  6497. // CustomLabel0: Custom label 0 for custom grouping of items in a
  6498. // Shopping campaign.
  6499. CustomLabel0 string `json:"customLabel0,omitempty"`
  6500. // CustomLabel1: Custom label 1 for custom grouping of items in a
  6501. // Shopping campaign.
  6502. CustomLabel1 string `json:"customLabel1,omitempty"`
  6503. // CustomLabel2: Custom label 2 for custom grouping of items in a
  6504. // Shopping campaign.
  6505. CustomLabel2 string `json:"customLabel2,omitempty"`
  6506. // CustomLabel3: Custom label 3 for custom grouping of items in a
  6507. // Shopping campaign.
  6508. CustomLabel3 string `json:"customLabel3,omitempty"`
  6509. // CustomLabel4: Custom label 4 for custom grouping of items in a
  6510. // Shopping campaign.
  6511. CustomLabel4 string `json:"customLabel4,omitempty"`
  6512. // Description: Description of the item.
  6513. Description string `json:"description,omitempty"`
  6514. // Destinations: Specifies the intended destinations for the product.
  6515. Destinations []*ProductDestination `json:"destinations,omitempty"`
  6516. // DisplayAdsId: An identifier for an item for dynamic remarketing
  6517. // campaigns.
  6518. DisplayAdsId string `json:"displayAdsId,omitempty"`
  6519. // DisplayAdsLink: URL directly to your item's landing page for dynamic
  6520. // remarketing campaigns.
  6521. DisplayAdsLink string `json:"displayAdsLink,omitempty"`
  6522. // DisplayAdsSimilarIds: Advertiser-specified recommendations.
  6523. DisplayAdsSimilarIds []string `json:"displayAdsSimilarIds,omitempty"`
  6524. // DisplayAdsTitle: Title of an item for dynamic remarketing campaigns.
  6525. DisplayAdsTitle string `json:"displayAdsTitle,omitempty"`
  6526. // DisplayAdsValue: Offer margin for dynamic remarketing campaigns.
  6527. DisplayAdsValue float64 `json:"displayAdsValue,omitempty"`
  6528. // EnergyEfficiencyClass: The energy efficiency class as defined in EU
  6529. // directive 2010/30/EU.
  6530. EnergyEfficiencyClass string `json:"energyEfficiencyClass,omitempty"`
  6531. // ExpirationDate: Date on which the item should expire, as specified
  6532. // upon insertion, in ISO 8601 format. The actual expiration date in
  6533. // Google Shopping is exposed in productstatuses as googleExpirationDate
  6534. // and might be earlier if expirationDate is too far in the future.
  6535. ExpirationDate string `json:"expirationDate,omitempty"`
  6536. // Gender: Target gender of the item.
  6537. Gender string `json:"gender,omitempty"`
  6538. // GoogleProductCategory: Google's category of the item (see Google
  6539. // product taxonomy).
  6540. GoogleProductCategory string `json:"googleProductCategory,omitempty"`
  6541. // Gtin: Global Trade Item Number (GTIN) of the item.
  6542. Gtin string `json:"gtin,omitempty"`
  6543. // Id: The REST id of the product. Content API methods that operate on
  6544. // products take this as their productId parameter.
  6545. // The REST id for a product is of the form
  6546. // channel:contentLanguage:targetCountry:offerId.
  6547. Id string `json:"id,omitempty"`
  6548. // IdentifierExists: False when the item does not have unique product
  6549. // identifiers appropriate to its category, such as GTIN, MPN, and
  6550. // brand. Required according to the Unique Product Identifier Rules for
  6551. // all target countries except for Canada.
  6552. IdentifierExists bool `json:"identifierExists,omitempty"`
  6553. // ImageLink: URL of an image of the item.
  6554. ImageLink string `json:"imageLink,omitempty"`
  6555. // Installment: Number and amount of installments to pay for an item.
  6556. // Brazil only.
  6557. Installment *Installment `json:"installment,omitempty"`
  6558. // IsBundle: Whether the item is a merchant-defined bundle. A bundle is
  6559. // a custom grouping of different products sold by a merchant for a
  6560. // single price.
  6561. IsBundle bool `json:"isBundle,omitempty"`
  6562. // ItemGroupId: Shared identifier for all variants of the same product.
  6563. ItemGroupId string `json:"itemGroupId,omitempty"`
  6564. // Kind: Identifies what kind of resource this is. Value: the fixed
  6565. // string "content#product".
  6566. Kind string `json:"kind,omitempty"`
  6567. // Link: URL directly linking to your item's page on your website.
  6568. Link string `json:"link,omitempty"`
  6569. // LoyaltyPoints: Loyalty points that users receive after purchasing the
  6570. // item. Japan only.
  6571. LoyaltyPoints *LoyaltyPoints `json:"loyaltyPoints,omitempty"`
  6572. // Material: The material of which the item is made.
  6573. Material string `json:"material,omitempty"`
  6574. // MaxHandlingTime: Maximal product handling time (in business days).
  6575. MaxHandlingTime int64 `json:"maxHandlingTime,omitempty,string"`
  6576. // MinHandlingTime: Minimal product handling time (in business days).
  6577. MinHandlingTime int64 `json:"minHandlingTime,omitempty,string"`
  6578. // MobileLink: Link to a mobile-optimized version of the landing page.
  6579. MobileLink string `json:"mobileLink,omitempty"`
  6580. // Mpn: Manufacturer Part Number (MPN) of the item.
  6581. Mpn string `json:"mpn,omitempty"`
  6582. // Multipack: The number of identical products in a merchant-defined
  6583. // multipack.
  6584. Multipack int64 `json:"multipack,omitempty,string"`
  6585. // OfferId: A unique identifier for the item. Leading and trailing
  6586. // whitespaces are stripped and multiple whitespaces are replaced by a
  6587. // single whitespace upon submission. Only valid unicode characters are
  6588. // accepted. See the products feed specification for details.
  6589. // Note: Content API methods that operate on products take the REST id
  6590. // of the product, not this identifier.
  6591. OfferId string `json:"offerId,omitempty"`
  6592. // OnlineOnly: Whether an item is available for purchase only online.
  6593. OnlineOnly bool `json:"onlineOnly,omitempty"`
  6594. // Pattern: The item's pattern (e.g. polka dots).
  6595. Pattern string `json:"pattern,omitempty"`
  6596. // Price: Price of the item.
  6597. Price *Price `json:"price,omitempty"`
  6598. // ProductType: Your category of the item (formatted as in products feed
  6599. // specification).
  6600. ProductType string `json:"productType,omitempty"`
  6601. // PromotionIds: The unique ID of a promotion.
  6602. PromotionIds []string `json:"promotionIds,omitempty"`
  6603. // SalePrice: Advertised sale price of the item.
  6604. SalePrice *Price `json:"salePrice,omitempty"`
  6605. // SalePriceEffectiveDate: Date range during which the item is on sale
  6606. // (see products feed specification).
  6607. SalePriceEffectiveDate string `json:"salePriceEffectiveDate,omitempty"`
  6608. // SellOnGoogleQuantity: The quantity of the product that is reserved
  6609. // for sell-on-google ads.
  6610. SellOnGoogleQuantity int64 `json:"sellOnGoogleQuantity,omitempty,string"`
  6611. // Shipping: Shipping rules.
  6612. Shipping []*ProductShipping `json:"shipping,omitempty"`
  6613. // ShippingHeight: Height of the item for shipping.
  6614. ShippingHeight *ProductShippingDimension `json:"shippingHeight,omitempty"`
  6615. // ShippingLabel: The shipping label of the product, used to group
  6616. // product in account-level shipping rules.
  6617. ShippingLabel string `json:"shippingLabel,omitempty"`
  6618. // ShippingLength: Length of the item for shipping.
  6619. ShippingLength *ProductShippingDimension `json:"shippingLength,omitempty"`
  6620. // ShippingWeight: Weight of the item for shipping.
  6621. ShippingWeight *ProductShippingWeight `json:"shippingWeight,omitempty"`
  6622. // ShippingWidth: Width of the item for shipping.
  6623. ShippingWidth *ProductShippingDimension `json:"shippingWidth,omitempty"`
  6624. // SizeSystem: System in which the size is specified. Recommended for
  6625. // apparel items.
  6626. SizeSystem string `json:"sizeSystem,omitempty"`
  6627. // SizeType: The cut of the item. Recommended for apparel items.
  6628. SizeType string `json:"sizeType,omitempty"`
  6629. // Sizes: Size of the item.
  6630. Sizes []string `json:"sizes,omitempty"`
  6631. // TargetCountry: The CLDR territory code for the item.
  6632. TargetCountry string `json:"targetCountry,omitempty"`
  6633. // Taxes: Tax information.
  6634. Taxes []*ProductTax `json:"taxes,omitempty"`
  6635. // Title: Title of the item.
  6636. Title string `json:"title,omitempty"`
  6637. // UnitPricingBaseMeasure: The preference of the denominator of the unit
  6638. // price.
  6639. UnitPricingBaseMeasure *ProductUnitPricingBaseMeasure `json:"unitPricingBaseMeasure,omitempty"`
  6640. // UnitPricingMeasure: The measure and dimension of an item.
  6641. UnitPricingMeasure *ProductUnitPricingMeasure `json:"unitPricingMeasure,omitempty"`
  6642. // ValidatedDestinations: The read-only list of intended destinations
  6643. // which passed validation.
  6644. ValidatedDestinations []string `json:"validatedDestinations,omitempty"`
  6645. // Warnings: Read-only warnings.
  6646. Warnings []*Error `json:"warnings,omitempty"`
  6647. // ServerResponse contains the HTTP response code and headers from the
  6648. // server.
  6649. googleapi.ServerResponse `json:"-"`
  6650. // ForceSendFields is a list of field names (e.g.
  6651. // "AdditionalImageLinks") to unconditionally include in API requests.
  6652. // By default, fields with empty values are omitted from API requests.
  6653. // However, any non-pointer, non-interface field appearing in
  6654. // ForceSendFields will be sent to the server regardless of whether the
  6655. // field is empty or not. This may be used to include empty fields in
  6656. // Patch requests.
  6657. ForceSendFields []string `json:"-"`
  6658. // NullFields is a list of field names (e.g. "AdditionalImageLinks") to
  6659. // include in API requests with the JSON null value. By default, fields
  6660. // with empty values are omitted from API requests. However, any field
  6661. // with an empty value appearing in NullFields will be sent to the
  6662. // server as null. It is an error if a field in this list has a
  6663. // non-empty value. This may be used to include null fields in Patch
  6664. // requests.
  6665. NullFields []string `json:"-"`
  6666. }
  6667. func (s *Product) MarshalJSON() ([]byte, error) {
  6668. type NoMethod Product
  6669. raw := NoMethod(*s)
  6670. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6671. }
  6672. func (s *Product) UnmarshalJSON(data []byte) error {
  6673. type NoMethod Product
  6674. var s1 struct {
  6675. DisplayAdsValue gensupport.JSONFloat64 `json:"displayAdsValue"`
  6676. *NoMethod
  6677. }
  6678. s1.NoMethod = (*NoMethod)(s)
  6679. if err := json.Unmarshal(data, &s1); err != nil {
  6680. return err
  6681. }
  6682. s.DisplayAdsValue = float64(s1.DisplayAdsValue)
  6683. return nil
  6684. }
  6685. type ProductAspect struct {
  6686. // AspectName: The name of the aspect.
  6687. AspectName string `json:"aspectName,omitempty"`
  6688. // DestinationName: The name of the destination. Leave out to apply to
  6689. // all destinations.
  6690. DestinationName string `json:"destinationName,omitempty"`
  6691. // Intention: Whether the aspect is required, excluded or should be
  6692. // validated.
  6693. Intention string `json:"intention,omitempty"`
  6694. // ForceSendFields is a list of field names (e.g. "AspectName") to
  6695. // unconditionally include in API requests. By default, fields with
  6696. // empty values are omitted from API requests. However, any non-pointer,
  6697. // non-interface field appearing in ForceSendFields will be sent to the
  6698. // server regardless of whether the field is empty or not. This may be
  6699. // used to include empty fields in Patch requests.
  6700. ForceSendFields []string `json:"-"`
  6701. // NullFields is a list of field names (e.g. "AspectName") to include in
  6702. // API requests with the JSON null value. By default, fields with empty
  6703. // values are omitted from API requests. However, any field with an
  6704. // empty value appearing in NullFields will be sent to the server as
  6705. // null. It is an error if a field in this list has a non-empty value.
  6706. // This may be used to include null fields in Patch requests.
  6707. NullFields []string `json:"-"`
  6708. }
  6709. func (s *ProductAspect) MarshalJSON() ([]byte, error) {
  6710. type NoMethod ProductAspect
  6711. raw := NoMethod(*s)
  6712. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6713. }
  6714. type ProductCustomAttribute struct {
  6715. // Name: The name of the attribute. Underscores will be replaced by
  6716. // spaces upon insertion.
  6717. Name string `json:"name,omitempty"`
  6718. // Type: The type of the attribute.
  6719. Type string `json:"type,omitempty"`
  6720. // Unit: Free-form unit of the attribute. Unit can only be used for
  6721. // values of type INT or FLOAT.
  6722. Unit string `json:"unit,omitempty"`
  6723. // Value: The value of the attribute.
  6724. Value string `json:"value,omitempty"`
  6725. // ForceSendFields is a list of field names (e.g. "Name") to
  6726. // unconditionally include in API requests. By default, fields with
  6727. // empty values are omitted from API requests. However, any non-pointer,
  6728. // non-interface field appearing in ForceSendFields will be sent to the
  6729. // server regardless of whether the field is empty or not. This may be
  6730. // used to include empty fields in Patch requests.
  6731. ForceSendFields []string `json:"-"`
  6732. // NullFields is a list of field names (e.g. "Name") to include in API
  6733. // requests with the JSON null value. By default, fields with empty
  6734. // values are omitted from API requests. However, any field with an
  6735. // empty value appearing in NullFields will be sent to the server as
  6736. // null. It is an error if a field in this list has a non-empty value.
  6737. // This may be used to include null fields in Patch requests.
  6738. NullFields []string `json:"-"`
  6739. }
  6740. func (s *ProductCustomAttribute) MarshalJSON() ([]byte, error) {
  6741. type NoMethod ProductCustomAttribute
  6742. raw := NoMethod(*s)
  6743. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6744. }
  6745. type ProductCustomGroup struct {
  6746. // Attributes: The sub-attributes.
  6747. Attributes []*ProductCustomAttribute `json:"attributes,omitempty"`
  6748. // Name: The name of the group. Underscores will be replaced by spaces
  6749. // upon insertion.
  6750. Name string `json:"name,omitempty"`
  6751. // ForceSendFields is a list of field names (e.g. "Attributes") to
  6752. // unconditionally include in API requests. By default, fields with
  6753. // empty values are omitted from API requests. However, any non-pointer,
  6754. // non-interface field appearing in ForceSendFields will be sent to the
  6755. // server regardless of whether the field is empty or not. This may be
  6756. // used to include empty fields in Patch requests.
  6757. ForceSendFields []string `json:"-"`
  6758. // NullFields is a list of field names (e.g. "Attributes") to include in
  6759. // API requests with the JSON null value. By default, fields with empty
  6760. // values are omitted from API requests. However, any field with an
  6761. // empty value appearing in NullFields will be sent to the server as
  6762. // null. It is an error if a field in this list has a non-empty value.
  6763. // This may be used to include null fields in Patch requests.
  6764. NullFields []string `json:"-"`
  6765. }
  6766. func (s *ProductCustomGroup) MarshalJSON() ([]byte, error) {
  6767. type NoMethod ProductCustomGroup
  6768. raw := NoMethod(*s)
  6769. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6770. }
  6771. type ProductDestination struct {
  6772. // DestinationName: The name of the destination.
  6773. DestinationName string `json:"destinationName,omitempty"`
  6774. // Intention: Whether the destination is required, excluded or should be
  6775. // validated.
  6776. Intention string `json:"intention,omitempty"`
  6777. // ForceSendFields is a list of field names (e.g. "DestinationName") to
  6778. // unconditionally include in API requests. By default, fields with
  6779. // empty values are omitted from API requests. However, any non-pointer,
  6780. // non-interface field appearing in ForceSendFields will be sent to the
  6781. // server regardless of whether the field is empty or not. This may be
  6782. // used to include empty fields in Patch requests.
  6783. ForceSendFields []string `json:"-"`
  6784. // NullFields is a list of field names (e.g. "DestinationName") to
  6785. // include in API requests with the JSON null value. By default, fields
  6786. // with empty values are omitted from API requests. However, any field
  6787. // with an empty value appearing in NullFields will be sent to the
  6788. // server as null. It is an error if a field in this list has a
  6789. // non-empty value. This may be used to include null fields in Patch
  6790. // requests.
  6791. NullFields []string `json:"-"`
  6792. }
  6793. func (s *ProductDestination) MarshalJSON() ([]byte, error) {
  6794. type NoMethod ProductDestination
  6795. raw := NoMethod(*s)
  6796. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6797. }
  6798. type ProductShipping struct {
  6799. // Country: The CLDR territory code of the country to which an item will
  6800. // ship.
  6801. Country string `json:"country,omitempty"`
  6802. // LocationGroupName: The location where the shipping is applicable,
  6803. // represented by a location group name.
  6804. LocationGroupName string `json:"locationGroupName,omitempty"`
  6805. // LocationId: The numeric id of a location that the shipping rate
  6806. // applies to as defined in the AdWords API.
  6807. LocationId int64 `json:"locationId,omitempty,string"`
  6808. // PostalCode: The postal code range that the shipping rate applies to,
  6809. // represented by a postal code, a postal code prefix followed by a *
  6810. // wildcard, a range between two postal codes or two postal code
  6811. // prefixes of equal length.
  6812. PostalCode string `json:"postalCode,omitempty"`
  6813. // Price: Fixed shipping price, represented as a number.
  6814. Price *Price `json:"price,omitempty"`
  6815. // Region: The geographic region to which a shipping rate applies.
  6816. Region string `json:"region,omitempty"`
  6817. // Service: A free-form description of the service class or delivery
  6818. // speed.
  6819. Service string `json:"service,omitempty"`
  6820. // ForceSendFields is a list of field names (e.g. "Country") to
  6821. // unconditionally include in API requests. By default, fields with
  6822. // empty values are omitted from API requests. However, any non-pointer,
  6823. // non-interface field appearing in ForceSendFields will be sent to the
  6824. // server regardless of whether the field is empty or not. This may be
  6825. // used to include empty fields in Patch requests.
  6826. ForceSendFields []string `json:"-"`
  6827. // NullFields is a list of field names (e.g. "Country") to include in
  6828. // API requests with the JSON null value. By default, fields with empty
  6829. // values are omitted from API requests. However, any field with an
  6830. // empty value appearing in NullFields will be sent to the server as
  6831. // null. It is an error if a field in this list has a non-empty value.
  6832. // This may be used to include null fields in Patch requests.
  6833. NullFields []string `json:"-"`
  6834. }
  6835. func (s *ProductShipping) MarshalJSON() ([]byte, error) {
  6836. type NoMethod ProductShipping
  6837. raw := NoMethod(*s)
  6838. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6839. }
  6840. type ProductShippingDimension struct {
  6841. // Unit: The unit of value.
  6842. //
  6843. // Acceptable values are:
  6844. // - "cm"
  6845. // - "in"
  6846. Unit string `json:"unit,omitempty"`
  6847. // Value: The dimension of the product used to calculate the shipping
  6848. // cost of the item.
  6849. Value float64 `json:"value,omitempty"`
  6850. // ForceSendFields is a list of field names (e.g. "Unit") to
  6851. // unconditionally include in API requests. By default, fields with
  6852. // empty values are omitted from API requests. However, any non-pointer,
  6853. // non-interface field appearing in ForceSendFields will be sent to the
  6854. // server regardless of whether the field is empty or not. This may be
  6855. // used to include empty fields in Patch requests.
  6856. ForceSendFields []string `json:"-"`
  6857. // NullFields is a list of field names (e.g. "Unit") to include in API
  6858. // requests with the JSON null value. By default, fields with empty
  6859. // values are omitted from API requests. However, any field with an
  6860. // empty value appearing in NullFields will be sent to the server as
  6861. // null. It is an error if a field in this list has a non-empty value.
  6862. // This may be used to include null fields in Patch requests.
  6863. NullFields []string `json:"-"`
  6864. }
  6865. func (s *ProductShippingDimension) MarshalJSON() ([]byte, error) {
  6866. type NoMethod ProductShippingDimension
  6867. raw := NoMethod(*s)
  6868. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6869. }
  6870. func (s *ProductShippingDimension) UnmarshalJSON(data []byte) error {
  6871. type NoMethod ProductShippingDimension
  6872. var s1 struct {
  6873. Value gensupport.JSONFloat64 `json:"value"`
  6874. *NoMethod
  6875. }
  6876. s1.NoMethod = (*NoMethod)(s)
  6877. if err := json.Unmarshal(data, &s1); err != nil {
  6878. return err
  6879. }
  6880. s.Value = float64(s1.Value)
  6881. return nil
  6882. }
  6883. type ProductShippingWeight struct {
  6884. // Unit: The unit of value.
  6885. Unit string `json:"unit,omitempty"`
  6886. // Value: The weight of the product used to calculate the shipping cost
  6887. // of the item.
  6888. Value float64 `json:"value,omitempty"`
  6889. // ForceSendFields is a list of field names (e.g. "Unit") to
  6890. // unconditionally include in API requests. By default, fields with
  6891. // empty values are omitted from API requests. However, any non-pointer,
  6892. // non-interface field appearing in ForceSendFields will be sent to the
  6893. // server regardless of whether the field is empty or not. This may be
  6894. // used to include empty fields in Patch requests.
  6895. ForceSendFields []string `json:"-"`
  6896. // NullFields is a list of field names (e.g. "Unit") to include in API
  6897. // requests with the JSON null value. By default, fields with empty
  6898. // values are omitted from API requests. However, any field with an
  6899. // empty value appearing in NullFields will be sent to the server as
  6900. // null. It is an error if a field in this list has a non-empty value.
  6901. // This may be used to include null fields in Patch requests.
  6902. NullFields []string `json:"-"`
  6903. }
  6904. func (s *ProductShippingWeight) MarshalJSON() ([]byte, error) {
  6905. type NoMethod ProductShippingWeight
  6906. raw := NoMethod(*s)
  6907. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6908. }
  6909. func (s *ProductShippingWeight) UnmarshalJSON(data []byte) error {
  6910. type NoMethod ProductShippingWeight
  6911. var s1 struct {
  6912. Value gensupport.JSONFloat64 `json:"value"`
  6913. *NoMethod
  6914. }
  6915. s1.NoMethod = (*NoMethod)(s)
  6916. if err := json.Unmarshal(data, &s1); err != nil {
  6917. return err
  6918. }
  6919. s.Value = float64(s1.Value)
  6920. return nil
  6921. }
  6922. // ProductStatus: The status of a product, i.e., information about a
  6923. // product computed asynchronously by the data quality analysis.
  6924. type ProductStatus struct {
  6925. // CreationDate: Date on which the item has been created, in ISO 8601
  6926. // format.
  6927. CreationDate string `json:"creationDate,omitempty"`
  6928. // DataQualityIssues: A list of data quality issues associated with the
  6929. // product.
  6930. DataQualityIssues []*ProductStatusDataQualityIssue `json:"dataQualityIssues,omitempty"`
  6931. // DestinationStatuses: The intended destinations for the product.
  6932. DestinationStatuses []*ProductStatusDestinationStatus `json:"destinationStatuses,omitempty"`
  6933. // GoogleExpirationDate: Date on which the item expires in Google
  6934. // Shopping, in ISO 8601 format.
  6935. GoogleExpirationDate string `json:"googleExpirationDate,omitempty"`
  6936. // ItemLevelIssues: A list of all issues associated with the product.
  6937. ItemLevelIssues []*ProductStatusItemLevelIssue `json:"itemLevelIssues,omitempty"`
  6938. // Kind: Identifies what kind of resource this is. Value: the fixed
  6939. // string "content#productStatus".
  6940. Kind string `json:"kind,omitempty"`
  6941. // LastUpdateDate: Date on which the item has been last updated, in ISO
  6942. // 8601 format.
  6943. LastUpdateDate string `json:"lastUpdateDate,omitempty"`
  6944. // Link: The link to the product.
  6945. Link string `json:"link,omitempty"`
  6946. // Product: Product data after applying all the join inputs.
  6947. Product *Product `json:"product,omitempty"`
  6948. // ProductId: The id of the product for which status is reported.
  6949. ProductId string `json:"productId,omitempty"`
  6950. // Title: The title of the product.
  6951. Title string `json:"title,omitempty"`
  6952. // ServerResponse contains the HTTP response code and headers from the
  6953. // server.
  6954. googleapi.ServerResponse `json:"-"`
  6955. // ForceSendFields is a list of field names (e.g. "CreationDate") to
  6956. // unconditionally include in API requests. By default, fields with
  6957. // empty values are omitted from API requests. However, any non-pointer,
  6958. // non-interface field appearing in ForceSendFields will be sent to the
  6959. // server regardless of whether the field is empty or not. This may be
  6960. // used to include empty fields in Patch requests.
  6961. ForceSendFields []string `json:"-"`
  6962. // NullFields is a list of field names (e.g. "CreationDate") to include
  6963. // in API requests with the JSON null value. By default, fields with
  6964. // empty values are omitted from API requests. However, any field with
  6965. // an empty value appearing in NullFields will be sent to the server as
  6966. // null. It is an error if a field in this list has a non-empty value.
  6967. // This may be used to include null fields in Patch requests.
  6968. NullFields []string `json:"-"`
  6969. }
  6970. func (s *ProductStatus) MarshalJSON() ([]byte, error) {
  6971. type NoMethod ProductStatus
  6972. raw := NoMethod(*s)
  6973. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  6974. }
  6975. type ProductStatusDataQualityIssue struct {
  6976. // Destination: The destination the issue applies to.
  6977. Destination string `json:"destination,omitempty"`
  6978. // Detail: A more detailed error string.
  6979. Detail string `json:"detail,omitempty"`
  6980. // FetchStatus: The fetch status for landing_page_errors.
  6981. FetchStatus string `json:"fetchStatus,omitempty"`
  6982. // Id: The id of the data quality issue.
  6983. Id string `json:"id,omitempty"`
  6984. // Location: The attribute name that is relevant for the issue.
  6985. Location string `json:"location,omitempty"`
  6986. // Severity: The severity of the data quality issue.
  6987. Severity string `json:"severity,omitempty"`
  6988. // Timestamp: The time stamp of the data quality issue.
  6989. Timestamp string `json:"timestamp,omitempty"`
  6990. // ValueOnLandingPage: The value of that attribute that was found on the
  6991. // landing page
  6992. ValueOnLandingPage string `json:"valueOnLandingPage,omitempty"`
  6993. // ValueProvided: The value the attribute had at time of evaluation.
  6994. ValueProvided string `json:"valueProvided,omitempty"`
  6995. // ForceSendFields is a list of field names (e.g. "Destination") to
  6996. // unconditionally include in API requests. By default, fields with
  6997. // empty values are omitted from API requests. However, any non-pointer,
  6998. // non-interface field appearing in ForceSendFields will be sent to the
  6999. // server regardless of whether the field is empty or not. This may be
  7000. // used to include empty fields in Patch requests.
  7001. ForceSendFields []string `json:"-"`
  7002. // NullFields is a list of field names (e.g. "Destination") to include
  7003. // in API requests with the JSON null value. By default, fields with
  7004. // empty values are omitted from API requests. However, any field with
  7005. // an empty value appearing in NullFields will be sent to the server as
  7006. // null. It is an error if a field in this list has a non-empty value.
  7007. // This may be used to include null fields in Patch requests.
  7008. NullFields []string `json:"-"`
  7009. }
  7010. func (s *ProductStatusDataQualityIssue) MarshalJSON() ([]byte, error) {
  7011. type NoMethod ProductStatusDataQualityIssue
  7012. raw := NoMethod(*s)
  7013. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7014. }
  7015. type ProductStatusDestinationStatus struct {
  7016. // ApprovalPending: Whether the approval status might change due to
  7017. // further processing.
  7018. ApprovalPending bool `json:"approvalPending,omitempty"`
  7019. // ApprovalStatus: The destination's approval status.
  7020. ApprovalStatus string `json:"approvalStatus,omitempty"`
  7021. // Destination: The name of the destination
  7022. Destination string `json:"destination,omitempty"`
  7023. // Intention: Provided for backward compatibility only. Always set to
  7024. // "required".
  7025. Intention string `json:"intention,omitempty"`
  7026. // ForceSendFields is a list of field names (e.g. "ApprovalPending") to
  7027. // unconditionally include in API requests. By default, fields with
  7028. // empty values are omitted from API requests. However, any non-pointer,
  7029. // non-interface field appearing in ForceSendFields will be sent to the
  7030. // server regardless of whether the field is empty or not. This may be
  7031. // used to include empty fields in Patch requests.
  7032. ForceSendFields []string `json:"-"`
  7033. // NullFields is a list of field names (e.g. "ApprovalPending") to
  7034. // include in API requests with the JSON null value. By default, fields
  7035. // with empty values are omitted from API requests. However, any field
  7036. // with an empty value appearing in NullFields will be sent to the
  7037. // server as null. It is an error if a field in this list has a
  7038. // non-empty value. This may be used to include null fields in Patch
  7039. // requests.
  7040. NullFields []string `json:"-"`
  7041. }
  7042. func (s *ProductStatusDestinationStatus) MarshalJSON() ([]byte, error) {
  7043. type NoMethod ProductStatusDestinationStatus
  7044. raw := NoMethod(*s)
  7045. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7046. }
  7047. type ProductStatusItemLevelIssue struct {
  7048. // AttributeName: The attribute's name, if the issue is caused by a
  7049. // single attribute.
  7050. AttributeName string `json:"attributeName,omitempty"`
  7051. // Code: The error code of the issue.
  7052. Code string `json:"code,omitempty"`
  7053. // Description: A short issue description in English.
  7054. Description string `json:"description,omitempty"`
  7055. // Destination: The destination the issue applies to.
  7056. Destination string `json:"destination,omitempty"`
  7057. // Detail: A detailed issue description in English.
  7058. Detail string `json:"detail,omitempty"`
  7059. // Documentation: The URL of a web page to help with resolving this
  7060. // issue.
  7061. Documentation string `json:"documentation,omitempty"`
  7062. // Resolution: Whether the issue can be resolved by the merchant.
  7063. Resolution string `json:"resolution,omitempty"`
  7064. // Servability: How this issue affects serving of the offer.
  7065. Servability string `json:"servability,omitempty"`
  7066. // ForceSendFields is a list of field names (e.g. "AttributeName") to
  7067. // unconditionally include in API requests. By default, fields with
  7068. // empty values are omitted from API requests. However, any non-pointer,
  7069. // non-interface field appearing in ForceSendFields will be sent to the
  7070. // server regardless of whether the field is empty or not. This may be
  7071. // used to include empty fields in Patch requests.
  7072. ForceSendFields []string `json:"-"`
  7073. // NullFields is a list of field names (e.g. "AttributeName") to include
  7074. // in API requests with the JSON null value. By default, fields with
  7075. // empty values are omitted from API requests. However, any field with
  7076. // an empty value appearing in NullFields will be sent to the server as
  7077. // null. It is an error if a field in this list has a non-empty value.
  7078. // This may be used to include null fields in Patch requests.
  7079. NullFields []string `json:"-"`
  7080. }
  7081. func (s *ProductStatusItemLevelIssue) MarshalJSON() ([]byte, error) {
  7082. type NoMethod ProductStatusItemLevelIssue
  7083. raw := NoMethod(*s)
  7084. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7085. }
  7086. type ProductTax struct {
  7087. // Country: The country within which the item is taxed, specified as a
  7088. // CLDR territory code.
  7089. Country string `json:"country,omitempty"`
  7090. // LocationId: The numeric id of a location that the tax rate applies to
  7091. // as defined in the AdWords API.
  7092. LocationId int64 `json:"locationId,omitempty,string"`
  7093. // PostalCode: The postal code range that the tax rate applies to,
  7094. // represented by a ZIP code, a ZIP code prefix using * wildcard, a
  7095. // range between two ZIP codes or two ZIP code prefixes of equal length.
  7096. // Examples: 94114, 94*, 94002-95460, 94*-95*.
  7097. PostalCode string `json:"postalCode,omitempty"`
  7098. // Rate: The percentage of tax rate that applies to the item price.
  7099. Rate float64 `json:"rate,omitempty"`
  7100. // Region: The geographic region to which the tax rate applies.
  7101. Region string `json:"region,omitempty"`
  7102. // TaxShip: Set to true if tax is charged on shipping.
  7103. TaxShip bool `json:"taxShip,omitempty"`
  7104. // ForceSendFields is a list of field names (e.g. "Country") to
  7105. // unconditionally include in API requests. By default, fields with
  7106. // empty values are omitted from API requests. However, any non-pointer,
  7107. // non-interface field appearing in ForceSendFields will be sent to the
  7108. // server regardless of whether the field is empty or not. This may be
  7109. // used to include empty fields in Patch requests.
  7110. ForceSendFields []string `json:"-"`
  7111. // NullFields is a list of field names (e.g. "Country") to include in
  7112. // API requests with the JSON null value. By default, fields with empty
  7113. // values are omitted from API requests. However, any field with an
  7114. // empty value appearing in NullFields will be sent to the server as
  7115. // null. It is an error if a field in this list has a non-empty value.
  7116. // This may be used to include null fields in Patch requests.
  7117. NullFields []string `json:"-"`
  7118. }
  7119. func (s *ProductTax) MarshalJSON() ([]byte, error) {
  7120. type NoMethod ProductTax
  7121. raw := NoMethod(*s)
  7122. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7123. }
  7124. func (s *ProductTax) UnmarshalJSON(data []byte) error {
  7125. type NoMethod ProductTax
  7126. var s1 struct {
  7127. Rate gensupport.JSONFloat64 `json:"rate"`
  7128. *NoMethod
  7129. }
  7130. s1.NoMethod = (*NoMethod)(s)
  7131. if err := json.Unmarshal(data, &s1); err != nil {
  7132. return err
  7133. }
  7134. s.Rate = float64(s1.Rate)
  7135. return nil
  7136. }
  7137. type ProductUnitPricingBaseMeasure struct {
  7138. // Unit: The unit of the denominator.
  7139. Unit string `json:"unit,omitempty"`
  7140. // Value: The denominator of the unit price.
  7141. Value int64 `json:"value,omitempty,string"`
  7142. // ForceSendFields is a list of field names (e.g. "Unit") to
  7143. // unconditionally include in API requests. By default, fields with
  7144. // empty values are omitted from API requests. However, any non-pointer,
  7145. // non-interface field appearing in ForceSendFields will be sent to the
  7146. // server regardless of whether the field is empty or not. This may be
  7147. // used to include empty fields in Patch requests.
  7148. ForceSendFields []string `json:"-"`
  7149. // NullFields is a list of field names (e.g. "Unit") to include in API
  7150. // requests with the JSON null value. By default, fields with empty
  7151. // values are omitted from API requests. However, any field with an
  7152. // empty value appearing in NullFields will be sent to the server as
  7153. // null. It is an error if a field in this list has a non-empty value.
  7154. // This may be used to include null fields in Patch requests.
  7155. NullFields []string `json:"-"`
  7156. }
  7157. func (s *ProductUnitPricingBaseMeasure) MarshalJSON() ([]byte, error) {
  7158. type NoMethod ProductUnitPricingBaseMeasure
  7159. raw := NoMethod(*s)
  7160. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7161. }
  7162. type ProductUnitPricingMeasure struct {
  7163. // Unit: The unit of the measure.
  7164. Unit string `json:"unit,omitempty"`
  7165. // Value: The measure of an item.
  7166. Value float64 `json:"value,omitempty"`
  7167. // ForceSendFields is a list of field names (e.g. "Unit") to
  7168. // unconditionally include in API requests. By default, fields with
  7169. // empty values are omitted from API requests. However, any non-pointer,
  7170. // non-interface field appearing in ForceSendFields will be sent to the
  7171. // server regardless of whether the field is empty or not. This may be
  7172. // used to include empty fields in Patch requests.
  7173. ForceSendFields []string `json:"-"`
  7174. // NullFields is a list of field names (e.g. "Unit") to include in API
  7175. // requests with the JSON null value. By default, fields with empty
  7176. // values are omitted from API requests. However, any field with an
  7177. // empty value appearing in NullFields will be sent to the server as
  7178. // null. It is an error if a field in this list has a non-empty value.
  7179. // This may be used to include null fields in Patch requests.
  7180. NullFields []string `json:"-"`
  7181. }
  7182. func (s *ProductUnitPricingMeasure) MarshalJSON() ([]byte, error) {
  7183. type NoMethod ProductUnitPricingMeasure
  7184. raw := NoMethod(*s)
  7185. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7186. }
  7187. func (s *ProductUnitPricingMeasure) UnmarshalJSON(data []byte) error {
  7188. type NoMethod ProductUnitPricingMeasure
  7189. var s1 struct {
  7190. Value gensupport.JSONFloat64 `json:"value"`
  7191. *NoMethod
  7192. }
  7193. s1.NoMethod = (*NoMethod)(s)
  7194. if err := json.Unmarshal(data, &s1); err != nil {
  7195. return err
  7196. }
  7197. s.Value = float64(s1.Value)
  7198. return nil
  7199. }
  7200. type ProductsCustomBatchRequest struct {
  7201. // Entries: The request entries to be processed in the batch.
  7202. Entries []*ProductsCustomBatchRequestEntry `json:"entries,omitempty"`
  7203. // ForceSendFields is a list of field names (e.g. "Entries") to
  7204. // unconditionally include in API requests. By default, fields with
  7205. // empty values are omitted from API requests. However, any non-pointer,
  7206. // non-interface field appearing in ForceSendFields will be sent to the
  7207. // server regardless of whether the field is empty or not. This may be
  7208. // used to include empty fields in Patch requests.
  7209. ForceSendFields []string `json:"-"`
  7210. // NullFields is a list of field names (e.g. "Entries") to include in
  7211. // API requests with the JSON null value. By default, fields with empty
  7212. // values are omitted from API requests. However, any field with an
  7213. // empty value appearing in NullFields will be sent to the server as
  7214. // null. It is an error if a field in this list has a non-empty value.
  7215. // This may be used to include null fields in Patch requests.
  7216. NullFields []string `json:"-"`
  7217. }
  7218. func (s *ProductsCustomBatchRequest) MarshalJSON() ([]byte, error) {
  7219. type NoMethod ProductsCustomBatchRequest
  7220. raw := NoMethod(*s)
  7221. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7222. }
  7223. // ProductsCustomBatchRequestEntry: A batch entry encoding a single
  7224. // non-batch products request.
  7225. type ProductsCustomBatchRequestEntry struct {
  7226. // BatchId: An entry ID, unique within the batch request.
  7227. BatchId int64 `json:"batchId,omitempty"`
  7228. // MerchantId: The ID of the managing account.
  7229. MerchantId uint64 `json:"merchantId,omitempty,string"`
  7230. Method string `json:"method,omitempty"`
  7231. // Product: The product to insert. Only required if the method is
  7232. // insert.
  7233. Product *Product `json:"product,omitempty"`
  7234. // ProductId: The ID of the product to get or delete. Only defined if
  7235. // the method is get or delete.
  7236. ProductId string `json:"productId,omitempty"`
  7237. // ForceSendFields is a list of field names (e.g. "BatchId") to
  7238. // unconditionally include in API requests. By default, fields with
  7239. // empty values are omitted from API requests. However, any non-pointer,
  7240. // non-interface field appearing in ForceSendFields will be sent to the
  7241. // server regardless of whether the field is empty or not. This may be
  7242. // used to include empty fields in Patch requests.
  7243. ForceSendFields []string `json:"-"`
  7244. // NullFields is a list of field names (e.g. "BatchId") to include in
  7245. // API requests with the JSON null value. By default, fields with empty
  7246. // values are omitted from API requests. However, any field with an
  7247. // empty value appearing in NullFields will be sent to the server as
  7248. // null. It is an error if a field in this list has a non-empty value.
  7249. // This may be used to include null fields in Patch requests.
  7250. NullFields []string `json:"-"`
  7251. }
  7252. func (s *ProductsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  7253. type NoMethod ProductsCustomBatchRequestEntry
  7254. raw := NoMethod(*s)
  7255. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7256. }
  7257. type ProductsCustomBatchResponse struct {
  7258. // Entries: The result of the execution of the batch requests.
  7259. Entries []*ProductsCustomBatchResponseEntry `json:"entries,omitempty"`
  7260. // Kind: Identifies what kind of resource this is. Value: the fixed
  7261. // string "content#productsCustomBatchResponse".
  7262. Kind string `json:"kind,omitempty"`
  7263. // ServerResponse contains the HTTP response code and headers from the
  7264. // server.
  7265. googleapi.ServerResponse `json:"-"`
  7266. // ForceSendFields is a list of field names (e.g. "Entries") to
  7267. // unconditionally include in API requests. By default, fields with
  7268. // empty values are omitted from API requests. However, any non-pointer,
  7269. // non-interface field appearing in ForceSendFields will be sent to the
  7270. // server regardless of whether the field is empty or not. This may be
  7271. // used to include empty fields in Patch requests.
  7272. ForceSendFields []string `json:"-"`
  7273. // NullFields is a list of field names (e.g. "Entries") to include in
  7274. // API requests with the JSON null value. By default, fields with empty
  7275. // values are omitted from API requests. However, any field with an
  7276. // empty value appearing in NullFields will be sent to the server as
  7277. // null. It is an error if a field in this list has a non-empty value.
  7278. // This may be used to include null fields in Patch requests.
  7279. NullFields []string `json:"-"`
  7280. }
  7281. func (s *ProductsCustomBatchResponse) MarshalJSON() ([]byte, error) {
  7282. type NoMethod ProductsCustomBatchResponse
  7283. raw := NoMethod(*s)
  7284. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7285. }
  7286. // ProductsCustomBatchResponseEntry: A batch entry encoding a single
  7287. // non-batch products response.
  7288. type ProductsCustomBatchResponseEntry struct {
  7289. // BatchId: The ID of the request entry this entry responds to.
  7290. BatchId int64 `json:"batchId,omitempty"`
  7291. // Errors: A list of errors defined if and only if the request failed.
  7292. Errors *Errors `json:"errors,omitempty"`
  7293. // Kind: Identifies what kind of resource this is. Value: the fixed
  7294. // string "content#productsCustomBatchResponseEntry".
  7295. Kind string `json:"kind,omitempty"`
  7296. // Product: The inserted product. Only defined if the method is insert
  7297. // and if the request was successful.
  7298. Product *Product `json:"product,omitempty"`
  7299. // ForceSendFields is a list of field names (e.g. "BatchId") to
  7300. // unconditionally include in API requests. By default, fields with
  7301. // empty values are omitted from API requests. However, any non-pointer,
  7302. // non-interface field appearing in ForceSendFields will be sent to the
  7303. // server regardless of whether the field is empty or not. This may be
  7304. // used to include empty fields in Patch requests.
  7305. ForceSendFields []string `json:"-"`
  7306. // NullFields is a list of field names (e.g. "BatchId") to include in
  7307. // API requests with the JSON null value. By default, fields with empty
  7308. // values are omitted from API requests. However, any field with an
  7309. // empty value appearing in NullFields will be sent to the server as
  7310. // null. It is an error if a field in this list has a non-empty value.
  7311. // This may be used to include null fields in Patch requests.
  7312. NullFields []string `json:"-"`
  7313. }
  7314. func (s *ProductsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  7315. type NoMethod ProductsCustomBatchResponseEntry
  7316. raw := NoMethod(*s)
  7317. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7318. }
  7319. type ProductsListResponse struct {
  7320. // Kind: Identifies what kind of resource this is. Value: the fixed
  7321. // string "content#productsListResponse".
  7322. Kind string `json:"kind,omitempty"`
  7323. // NextPageToken: The token for the retrieval of the next page of
  7324. // products.
  7325. NextPageToken string `json:"nextPageToken,omitempty"`
  7326. Resources []*Product `json:"resources,omitempty"`
  7327. // ServerResponse contains the HTTP response code and headers from the
  7328. // server.
  7329. googleapi.ServerResponse `json:"-"`
  7330. // ForceSendFields is a list of field names (e.g. "Kind") to
  7331. // unconditionally include in API requests. By default, fields with
  7332. // empty values are omitted from API requests. However, any non-pointer,
  7333. // non-interface field appearing in ForceSendFields will be sent to the
  7334. // server regardless of whether the field is empty or not. This may be
  7335. // used to include empty fields in Patch requests.
  7336. ForceSendFields []string `json:"-"`
  7337. // NullFields is a list of field names (e.g. "Kind") to include in API
  7338. // requests with the JSON null value. By default, fields with empty
  7339. // values are omitted from API requests. However, any field with an
  7340. // empty value appearing in NullFields will be sent to the server as
  7341. // null. It is an error if a field in this list has a non-empty value.
  7342. // This may be used to include null fields in Patch requests.
  7343. NullFields []string `json:"-"`
  7344. }
  7345. func (s *ProductsListResponse) MarshalJSON() ([]byte, error) {
  7346. type NoMethod ProductsListResponse
  7347. raw := NoMethod(*s)
  7348. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7349. }
  7350. type ProductstatusesCustomBatchRequest struct {
  7351. // Entries: The request entries to be processed in the batch.
  7352. Entries []*ProductstatusesCustomBatchRequestEntry `json:"entries,omitempty"`
  7353. // ForceSendFields is a list of field names (e.g. "Entries") to
  7354. // unconditionally include in API requests. By default, fields with
  7355. // empty values are omitted from API requests. However, any non-pointer,
  7356. // non-interface field appearing in ForceSendFields will be sent to the
  7357. // server regardless of whether the field is empty or not. This may be
  7358. // used to include empty fields in Patch requests.
  7359. ForceSendFields []string `json:"-"`
  7360. // NullFields is a list of field names (e.g. "Entries") to include in
  7361. // API requests with the JSON null value. By default, fields with empty
  7362. // values are omitted from API requests. However, any field with an
  7363. // empty value appearing in NullFields will be sent to the server as
  7364. // null. It is an error if a field in this list has a non-empty value.
  7365. // This may be used to include null fields in Patch requests.
  7366. NullFields []string `json:"-"`
  7367. }
  7368. func (s *ProductstatusesCustomBatchRequest) MarshalJSON() ([]byte, error) {
  7369. type NoMethod ProductstatusesCustomBatchRequest
  7370. raw := NoMethod(*s)
  7371. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7372. }
  7373. // ProductstatusesCustomBatchRequestEntry: A batch entry encoding a
  7374. // single non-batch productstatuses request.
  7375. type ProductstatusesCustomBatchRequestEntry struct {
  7376. // BatchId: An entry ID, unique within the batch request.
  7377. BatchId int64 `json:"batchId,omitempty"`
  7378. // Destinations: If set, only issues for the specified destinations are
  7379. // returned, otherwise only issues for the Shopping destination.
  7380. Destinations []string `json:"destinations,omitempty"`
  7381. IncludeAttributes bool `json:"includeAttributes,omitempty"`
  7382. // MerchantId: The ID of the managing account.
  7383. MerchantId uint64 `json:"merchantId,omitempty,string"`
  7384. Method string `json:"method,omitempty"`
  7385. // ProductId: The ID of the product whose status to get.
  7386. ProductId string `json:"productId,omitempty"`
  7387. // ForceSendFields is a list of field names (e.g. "BatchId") to
  7388. // unconditionally include in API requests. By default, fields with
  7389. // empty values are omitted from API requests. However, any non-pointer,
  7390. // non-interface field appearing in ForceSendFields will be sent to the
  7391. // server regardless of whether the field is empty or not. This may be
  7392. // used to include empty fields in Patch requests.
  7393. ForceSendFields []string `json:"-"`
  7394. // NullFields is a list of field names (e.g. "BatchId") to include in
  7395. // API requests with the JSON null value. By default, fields with empty
  7396. // values are omitted from API requests. However, any field with an
  7397. // empty value appearing in NullFields will be sent to the server as
  7398. // null. It is an error if a field in this list has a non-empty value.
  7399. // This may be used to include null fields in Patch requests.
  7400. NullFields []string `json:"-"`
  7401. }
  7402. func (s *ProductstatusesCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  7403. type NoMethod ProductstatusesCustomBatchRequestEntry
  7404. raw := NoMethod(*s)
  7405. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7406. }
  7407. type ProductstatusesCustomBatchResponse struct {
  7408. // Entries: The result of the execution of the batch requests.
  7409. Entries []*ProductstatusesCustomBatchResponseEntry `json:"entries,omitempty"`
  7410. // Kind: Identifies what kind of resource this is. Value: the fixed
  7411. // string "content#productstatusesCustomBatchResponse".
  7412. Kind string `json:"kind,omitempty"`
  7413. // ServerResponse contains the HTTP response code and headers from the
  7414. // server.
  7415. googleapi.ServerResponse `json:"-"`
  7416. // ForceSendFields is a list of field names (e.g. "Entries") to
  7417. // unconditionally include in API requests. By default, fields with
  7418. // empty values are omitted from API requests. However, any non-pointer,
  7419. // non-interface field appearing in ForceSendFields will be sent to the
  7420. // server regardless of whether the field is empty or not. This may be
  7421. // used to include empty fields in Patch requests.
  7422. ForceSendFields []string `json:"-"`
  7423. // NullFields is a list of field names (e.g. "Entries") to include in
  7424. // API requests with the JSON null value. By default, fields with empty
  7425. // values are omitted from API requests. However, any field with an
  7426. // empty value appearing in NullFields will be sent to the server as
  7427. // null. It is an error if a field in this list has a non-empty value.
  7428. // This may be used to include null fields in Patch requests.
  7429. NullFields []string `json:"-"`
  7430. }
  7431. func (s *ProductstatusesCustomBatchResponse) MarshalJSON() ([]byte, error) {
  7432. type NoMethod ProductstatusesCustomBatchResponse
  7433. raw := NoMethod(*s)
  7434. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7435. }
  7436. // ProductstatusesCustomBatchResponseEntry: A batch entry encoding a
  7437. // single non-batch productstatuses response.
  7438. type ProductstatusesCustomBatchResponseEntry struct {
  7439. // BatchId: The ID of the request entry this entry responds to.
  7440. BatchId int64 `json:"batchId,omitempty"`
  7441. // Errors: A list of errors, if the request failed.
  7442. Errors *Errors `json:"errors,omitempty"`
  7443. // Kind: Identifies what kind of resource this is. Value: the fixed
  7444. // string "content#productstatusesCustomBatchResponseEntry".
  7445. Kind string `json:"kind,omitempty"`
  7446. // ProductStatus: The requested product status. Only defined if the
  7447. // request was successful.
  7448. ProductStatus *ProductStatus `json:"productStatus,omitempty"`
  7449. // ForceSendFields is a list of field names (e.g. "BatchId") to
  7450. // unconditionally include in API requests. By default, fields with
  7451. // empty values are omitted from API requests. However, any non-pointer,
  7452. // non-interface field appearing in ForceSendFields will be sent to the
  7453. // server regardless of whether the field is empty or not. This may be
  7454. // used to include empty fields in Patch requests.
  7455. ForceSendFields []string `json:"-"`
  7456. // NullFields is a list of field names (e.g. "BatchId") to include in
  7457. // API requests with the JSON null value. By default, fields with empty
  7458. // values are omitted from API requests. However, any field with an
  7459. // empty value appearing in NullFields will be sent to the server as
  7460. // null. It is an error if a field in this list has a non-empty value.
  7461. // This may be used to include null fields in Patch requests.
  7462. NullFields []string `json:"-"`
  7463. }
  7464. func (s *ProductstatusesCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  7465. type NoMethod ProductstatusesCustomBatchResponseEntry
  7466. raw := NoMethod(*s)
  7467. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7468. }
  7469. type ProductstatusesListResponse struct {
  7470. // Kind: Identifies what kind of resource this is. Value: the fixed
  7471. // string "content#productstatusesListResponse".
  7472. Kind string `json:"kind,omitempty"`
  7473. // NextPageToken: The token for the retrieval of the next page of
  7474. // products statuses.
  7475. NextPageToken string `json:"nextPageToken,omitempty"`
  7476. Resources []*ProductStatus `json:"resources,omitempty"`
  7477. // ServerResponse contains the HTTP response code and headers from the
  7478. // server.
  7479. googleapi.ServerResponse `json:"-"`
  7480. // ForceSendFields is a list of field names (e.g. "Kind") to
  7481. // unconditionally include in API requests. By default, fields with
  7482. // empty values are omitted from API requests. However, any non-pointer,
  7483. // non-interface field appearing in ForceSendFields will be sent to the
  7484. // server regardless of whether the field is empty or not. This may be
  7485. // used to include empty fields in Patch requests.
  7486. ForceSendFields []string `json:"-"`
  7487. // NullFields is a list of field names (e.g. "Kind") to include in API
  7488. // requests with the JSON null value. By default, fields with empty
  7489. // values are omitted from API requests. However, any field with an
  7490. // empty value appearing in NullFields will be sent to the server as
  7491. // null. It is an error if a field in this list has a non-empty value.
  7492. // This may be used to include null fields in Patch requests.
  7493. NullFields []string `json:"-"`
  7494. }
  7495. func (s *ProductstatusesListResponse) MarshalJSON() ([]byte, error) {
  7496. type NoMethod ProductstatusesListResponse
  7497. raw := NoMethod(*s)
  7498. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7499. }
  7500. type Promotion struct {
  7501. // PromotionAmount: Amount of the promotion. The values here are the
  7502. // promotion applied to the unit price pretax and to the total of the
  7503. // tax amounts.
  7504. PromotionAmount *Amount `json:"promotionAmount,omitempty"`
  7505. // PromotionId: ID of the promotion.
  7506. PromotionId string `json:"promotionId,omitempty"`
  7507. // ForceSendFields is a list of field names (e.g. "PromotionAmount") to
  7508. // unconditionally include in API requests. By default, fields with
  7509. // empty values are omitted from API requests. However, any non-pointer,
  7510. // non-interface field appearing in ForceSendFields will be sent to the
  7511. // server regardless of whether the field is empty or not. This may be
  7512. // used to include empty fields in Patch requests.
  7513. ForceSendFields []string `json:"-"`
  7514. // NullFields is a list of field names (e.g. "PromotionAmount") to
  7515. // include in API requests with the JSON null value. By default, fields
  7516. // with empty values are omitted from API requests. However, any field
  7517. // with an empty value appearing in NullFields will be sent to the
  7518. // server as null. It is an error if a field in this list has a
  7519. // non-empty value. This may be used to include null fields in Patch
  7520. // requests.
  7521. NullFields []string `json:"-"`
  7522. }
  7523. func (s *Promotion) MarshalJSON() ([]byte, error) {
  7524. type NoMethod Promotion
  7525. raw := NoMethod(*s)
  7526. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7527. }
  7528. type RateGroup struct {
  7529. // ApplicableShippingLabels: A list of shipping labels defining the
  7530. // products to which this rate group applies to. This is a disjunction:
  7531. // only one of the labels has to match for the rate group to apply. May
  7532. // only be empty for the last rate group of a service. Required.
  7533. ApplicableShippingLabels []string `json:"applicableShippingLabels,omitempty"`
  7534. // CarrierRates: A list of carrier rates that can be referred to by
  7535. // mainTable or singleValue.
  7536. CarrierRates []*CarrierRate `json:"carrierRates,omitempty"`
  7537. // MainTable: A table defining the rate group, when singleValue is not
  7538. // expressive enough. Can only be set if singleValue is not set.
  7539. MainTable *Table `json:"mainTable,omitempty"`
  7540. // Name: Name of the rate group. Optional. If set has to be unique
  7541. // within shipping service.
  7542. Name string `json:"name,omitempty"`
  7543. // SingleValue: The value of the rate group (e.g. flat rate $10). Can
  7544. // only be set if mainTable and subtables are not set.
  7545. SingleValue *Value `json:"singleValue,omitempty"`
  7546. // Subtables: A list of subtables referred to by mainTable. Can only be
  7547. // set if mainTable is set.
  7548. Subtables []*Table `json:"subtables,omitempty"`
  7549. // ForceSendFields is a list of field names (e.g.
  7550. // "ApplicableShippingLabels") to unconditionally include in API
  7551. // requests. By default, fields with empty values are omitted from API
  7552. // requests. However, any non-pointer, non-interface field appearing in
  7553. // ForceSendFields will be sent to the server regardless of whether the
  7554. // field is empty or not. This may be used to include empty fields in
  7555. // Patch requests.
  7556. ForceSendFields []string `json:"-"`
  7557. // NullFields is a list of field names (e.g. "ApplicableShippingLabels")
  7558. // to include in API requests with the JSON null value. By default,
  7559. // fields with empty values are omitted from API requests. However, any
  7560. // field with an empty value appearing in NullFields will be sent to the
  7561. // server as null. It is an error if a field in this list has a
  7562. // non-empty value. This may be used to include null fields in Patch
  7563. // requests.
  7564. NullFields []string `json:"-"`
  7565. }
  7566. func (s *RateGroup) MarshalJSON() ([]byte, error) {
  7567. type NoMethod RateGroup
  7568. raw := NoMethod(*s)
  7569. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7570. }
  7571. type Row struct {
  7572. // Cells: The list of cells that constitute the row. Must have the same
  7573. // length as columnHeaders for two-dimensional tables, a length of 1 for
  7574. // one-dimensional tables. Required.
  7575. Cells []*Value `json:"cells,omitempty"`
  7576. // ForceSendFields is a list of field names (e.g. "Cells") to
  7577. // unconditionally include in API requests. By default, fields with
  7578. // empty values are omitted from API requests. However, any non-pointer,
  7579. // non-interface field appearing in ForceSendFields will be sent to the
  7580. // server regardless of whether the field is empty or not. This may be
  7581. // used to include empty fields in Patch requests.
  7582. ForceSendFields []string `json:"-"`
  7583. // NullFields is a list of field names (e.g. "Cells") to include in API
  7584. // requests with the JSON null value. By default, fields with empty
  7585. // values are omitted from API requests. However, any field with an
  7586. // empty value appearing in NullFields will be sent to the server as
  7587. // null. It is an error if a field in this list has a non-empty value.
  7588. // This may be used to include null fields in Patch requests.
  7589. NullFields []string `json:"-"`
  7590. }
  7591. func (s *Row) MarshalJSON() ([]byte, error) {
  7592. type NoMethod Row
  7593. raw := NoMethod(*s)
  7594. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7595. }
  7596. type Service struct {
  7597. // Active: A boolean exposing the active status of the shipping service.
  7598. // Required.
  7599. Active bool `json:"active,omitempty"`
  7600. // Currency: The CLDR code of the currency to which this service
  7601. // applies. Must match that of the prices in rate groups.
  7602. Currency string `json:"currency,omitempty"`
  7603. // DeliveryCountry: The CLDR territory code of the country to which the
  7604. // service applies. Required.
  7605. DeliveryCountry string `json:"deliveryCountry,omitempty"`
  7606. // DeliveryTime: Time spent in various aspects from order to the
  7607. // delivery of the product. Required.
  7608. DeliveryTime *DeliveryTime `json:"deliveryTime,omitempty"`
  7609. // Eligibility: Eligibility for this service.
  7610. Eligibility string `json:"eligibility,omitempty"`
  7611. // MinimumOrderValue: Minimum order value for this service. If set,
  7612. // indicates that customers will have to spend at least this amount. All
  7613. // prices within a service must have the same currency.
  7614. MinimumOrderValue *Price `json:"minimumOrderValue,omitempty"`
  7615. // Name: Free-form name of the service. Must be unique within target
  7616. // account. Required.
  7617. Name string `json:"name,omitempty"`
  7618. // RateGroups: Shipping rate group definitions. Only the last one is
  7619. // allowed to have an empty applicableShippingLabels, which means
  7620. // "everything else". The other applicableShippingLabels must not
  7621. // overlap.
  7622. RateGroups []*RateGroup `json:"rateGroups,omitempty"`
  7623. // ForceSendFields is a list of field names (e.g. "Active") to
  7624. // unconditionally include in API requests. By default, fields with
  7625. // empty values are omitted from API requests. However, any non-pointer,
  7626. // non-interface field appearing in ForceSendFields will be sent to the
  7627. // server regardless of whether the field is empty or not. This may be
  7628. // used to include empty fields in Patch requests.
  7629. ForceSendFields []string `json:"-"`
  7630. // NullFields is a list of field names (e.g. "Active") to include in API
  7631. // requests with the JSON null value. By default, fields with empty
  7632. // values are omitted from API requests. However, any field with an
  7633. // empty value appearing in NullFields will be sent to the server as
  7634. // null. It is an error if a field in this list has a non-empty value.
  7635. // This may be used to include null fields in Patch requests.
  7636. NullFields []string `json:"-"`
  7637. }
  7638. func (s *Service) MarshalJSON() ([]byte, error) {
  7639. type NoMethod Service
  7640. raw := NoMethod(*s)
  7641. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7642. }
  7643. type ShipmentInvoice struct {
  7644. // InvoiceSummary: Invoice summary.
  7645. InvoiceSummary *InvoiceSummary `json:"invoiceSummary,omitempty"`
  7646. // LineItemInvoices: Invoice details per line item.
  7647. LineItemInvoices []*ShipmentInvoiceLineItemInvoice `json:"lineItemInvoices,omitempty"`
  7648. // ShipmentGroupId: ID of the shipment group.
  7649. ShipmentGroupId string `json:"shipmentGroupId,omitempty"`
  7650. // ForceSendFields is a list of field names (e.g. "InvoiceSummary") to
  7651. // unconditionally include in API requests. By default, fields with
  7652. // empty values are omitted from API requests. However, any non-pointer,
  7653. // non-interface field appearing in ForceSendFields will be sent to the
  7654. // server regardless of whether the field is empty or not. This may be
  7655. // used to include empty fields in Patch requests.
  7656. ForceSendFields []string `json:"-"`
  7657. // NullFields is a list of field names (e.g. "InvoiceSummary") to
  7658. // include in API requests with the JSON null value. By default, fields
  7659. // with empty values are omitted from API requests. However, any field
  7660. // with an empty value appearing in NullFields will be sent to the
  7661. // server as null. It is an error if a field in this list has a
  7662. // non-empty value. This may be used to include null fields in Patch
  7663. // requests.
  7664. NullFields []string `json:"-"`
  7665. }
  7666. func (s *ShipmentInvoice) MarshalJSON() ([]byte, error) {
  7667. type NoMethod ShipmentInvoice
  7668. raw := NoMethod(*s)
  7669. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7670. }
  7671. type ShipmentInvoiceLineItemInvoice struct {
  7672. // LineItemId: ID of the line item. Either lineItemId or productId must
  7673. // be set.
  7674. LineItemId string `json:"lineItemId,omitempty"`
  7675. // ProductId: ID of the product. This is the REST ID used in the
  7676. // products service. Either lineItemId or productId must be set.
  7677. ProductId string `json:"productId,omitempty"`
  7678. // ShipmentUnitIds: Unit IDs to define specific units within the line
  7679. // item.
  7680. ShipmentUnitIds []string `json:"shipmentUnitIds,omitempty"`
  7681. // UnitInvoice: Invoice details for a single unit.
  7682. UnitInvoice *UnitInvoice `json:"unitInvoice,omitempty"`
  7683. // ForceSendFields is a list of field names (e.g. "LineItemId") to
  7684. // unconditionally include in API requests. By default, fields with
  7685. // empty values are omitted from API requests. However, any non-pointer,
  7686. // non-interface field appearing in ForceSendFields will be sent to the
  7687. // server regardless of whether the field is empty or not. This may be
  7688. // used to include empty fields in Patch requests.
  7689. ForceSendFields []string `json:"-"`
  7690. // NullFields is a list of field names (e.g. "LineItemId") to include in
  7691. // API requests with the JSON null value. By default, fields with empty
  7692. // values are omitted from API requests. However, any field with an
  7693. // empty value appearing in NullFields will be sent to the server as
  7694. // null. It is an error if a field in this list has a non-empty value.
  7695. // This may be used to include null fields in Patch requests.
  7696. NullFields []string `json:"-"`
  7697. }
  7698. func (s *ShipmentInvoiceLineItemInvoice) MarshalJSON() ([]byte, error) {
  7699. type NoMethod ShipmentInvoiceLineItemInvoice
  7700. raw := NoMethod(*s)
  7701. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7702. }
  7703. // ShippingSettings: The merchant account's shipping settings.
  7704. type ShippingSettings struct {
  7705. // AccountId: The ID of the account to which these account shipping
  7706. // settings belong. Ignored upon update, always present in get request
  7707. // responses.
  7708. AccountId uint64 `json:"accountId,omitempty,string"`
  7709. // PostalCodeGroups: A list of postal code groups that can be referred
  7710. // to in services. Optional.
  7711. PostalCodeGroups []*PostalCodeGroup `json:"postalCodeGroups,omitempty"`
  7712. // Services: The target account's list of services. Optional.
  7713. Services []*Service `json:"services,omitempty"`
  7714. // ServerResponse contains the HTTP response code and headers from the
  7715. // server.
  7716. googleapi.ServerResponse `json:"-"`
  7717. // ForceSendFields is a list of field names (e.g. "AccountId") to
  7718. // unconditionally include in API requests. By default, fields with
  7719. // empty values are omitted from API requests. However, any non-pointer,
  7720. // non-interface field appearing in ForceSendFields will be sent to the
  7721. // server regardless of whether the field is empty or not. This may be
  7722. // used to include empty fields in Patch requests.
  7723. ForceSendFields []string `json:"-"`
  7724. // NullFields is a list of field names (e.g. "AccountId") to include in
  7725. // API requests with the JSON null value. By default, fields with empty
  7726. // values are omitted from API requests. However, any field with an
  7727. // empty value appearing in NullFields will be sent to the server as
  7728. // null. It is an error if a field in this list has a non-empty value.
  7729. // This may be used to include null fields in Patch requests.
  7730. NullFields []string `json:"-"`
  7731. }
  7732. func (s *ShippingSettings) MarshalJSON() ([]byte, error) {
  7733. type NoMethod ShippingSettings
  7734. raw := NoMethod(*s)
  7735. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7736. }
  7737. type ShippingsettingsCustomBatchRequest struct {
  7738. // Entries: The request entries to be processed in the batch.
  7739. Entries []*ShippingsettingsCustomBatchRequestEntry `json:"entries,omitempty"`
  7740. // ForceSendFields is a list of field names (e.g. "Entries") to
  7741. // unconditionally include in API requests. By default, fields with
  7742. // empty values are omitted from API requests. However, any non-pointer,
  7743. // non-interface field appearing in ForceSendFields will be sent to the
  7744. // server regardless of whether the field is empty or not. This may be
  7745. // used to include empty fields in Patch requests.
  7746. ForceSendFields []string `json:"-"`
  7747. // NullFields is a list of field names (e.g. "Entries") to include in
  7748. // API requests with the JSON null value. By default, fields with empty
  7749. // values are omitted from API requests. However, any field with an
  7750. // empty value appearing in NullFields will be sent to the server as
  7751. // null. It is an error if a field in this list has a non-empty value.
  7752. // This may be used to include null fields in Patch requests.
  7753. NullFields []string `json:"-"`
  7754. }
  7755. func (s *ShippingsettingsCustomBatchRequest) MarshalJSON() ([]byte, error) {
  7756. type NoMethod ShippingsettingsCustomBatchRequest
  7757. raw := NoMethod(*s)
  7758. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7759. }
  7760. // ShippingsettingsCustomBatchRequestEntry: A batch entry encoding a
  7761. // single non-batch shippingsettings request.
  7762. type ShippingsettingsCustomBatchRequestEntry struct {
  7763. // AccountId: The ID of the account for which to get/update account
  7764. // shipping settings.
  7765. AccountId uint64 `json:"accountId,omitempty,string"`
  7766. // BatchId: An entry ID, unique within the batch request.
  7767. BatchId int64 `json:"batchId,omitempty"`
  7768. // MerchantId: The ID of the managing account.
  7769. MerchantId uint64 `json:"merchantId,omitempty,string"`
  7770. Method string `json:"method,omitempty"`
  7771. // ShippingSettings: The account shipping settings to update. Only
  7772. // defined if the method is update.
  7773. ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"`
  7774. // ForceSendFields is a list of field names (e.g. "AccountId") to
  7775. // unconditionally include in API requests. By default, fields with
  7776. // empty values are omitted from API requests. However, any non-pointer,
  7777. // non-interface field appearing in ForceSendFields will be sent to the
  7778. // server regardless of whether the field is empty or not. This may be
  7779. // used to include empty fields in Patch requests.
  7780. ForceSendFields []string `json:"-"`
  7781. // NullFields is a list of field names (e.g. "AccountId") to include in
  7782. // API requests with the JSON null value. By default, fields with empty
  7783. // values are omitted from API requests. However, any field with an
  7784. // empty value appearing in NullFields will be sent to the server as
  7785. // null. It is an error if a field in this list has a non-empty value.
  7786. // This may be used to include null fields in Patch requests.
  7787. NullFields []string `json:"-"`
  7788. }
  7789. func (s *ShippingsettingsCustomBatchRequestEntry) MarshalJSON() ([]byte, error) {
  7790. type NoMethod ShippingsettingsCustomBatchRequestEntry
  7791. raw := NoMethod(*s)
  7792. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7793. }
  7794. type ShippingsettingsCustomBatchResponse struct {
  7795. // Entries: The result of the execution of the batch requests.
  7796. Entries []*ShippingsettingsCustomBatchResponseEntry `json:"entries,omitempty"`
  7797. // Kind: Identifies what kind of resource this is. Value: the fixed
  7798. // string "content#shippingsettingsCustomBatchResponse".
  7799. Kind string `json:"kind,omitempty"`
  7800. // ServerResponse contains the HTTP response code and headers from the
  7801. // server.
  7802. googleapi.ServerResponse `json:"-"`
  7803. // ForceSendFields is a list of field names (e.g. "Entries") to
  7804. // unconditionally include in API requests. By default, fields with
  7805. // empty values are omitted from API requests. However, any non-pointer,
  7806. // non-interface field appearing in ForceSendFields will be sent to the
  7807. // server regardless of whether the field is empty or not. This may be
  7808. // used to include empty fields in Patch requests.
  7809. ForceSendFields []string `json:"-"`
  7810. // NullFields is a list of field names (e.g. "Entries") to include in
  7811. // API requests with the JSON null value. By default, fields with empty
  7812. // values are omitted from API requests. However, any field with an
  7813. // empty value appearing in NullFields will be sent to the server as
  7814. // null. It is an error if a field in this list has a non-empty value.
  7815. // This may be used to include null fields in Patch requests.
  7816. NullFields []string `json:"-"`
  7817. }
  7818. func (s *ShippingsettingsCustomBatchResponse) MarshalJSON() ([]byte, error) {
  7819. type NoMethod ShippingsettingsCustomBatchResponse
  7820. raw := NoMethod(*s)
  7821. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7822. }
  7823. // ShippingsettingsCustomBatchResponseEntry: A batch entry encoding a
  7824. // single non-batch shipping settings response.
  7825. type ShippingsettingsCustomBatchResponseEntry struct {
  7826. // BatchId: The ID of the request entry to which this entry responds.
  7827. BatchId int64 `json:"batchId,omitempty"`
  7828. // Errors: A list of errors defined if, and only if, the request failed.
  7829. Errors *Errors `json:"errors,omitempty"`
  7830. // Kind: Identifies what kind of resource this is. Value: the fixed
  7831. // string "content#shippingsettingsCustomBatchResponseEntry".
  7832. Kind string `json:"kind,omitempty"`
  7833. // ShippingSettings: The retrieved or updated account shipping settings.
  7834. ShippingSettings *ShippingSettings `json:"shippingSettings,omitempty"`
  7835. // ForceSendFields is a list of field names (e.g. "BatchId") to
  7836. // unconditionally include in API requests. By default, fields with
  7837. // empty values are omitted from API requests. However, any non-pointer,
  7838. // non-interface field appearing in ForceSendFields will be sent to the
  7839. // server regardless of whether the field is empty or not. This may be
  7840. // used to include empty fields in Patch requests.
  7841. ForceSendFields []string `json:"-"`
  7842. // NullFields is a list of field names (e.g. "BatchId") to include in
  7843. // API requests with the JSON null value. By default, fields with empty
  7844. // values are omitted from API requests. However, any field with an
  7845. // empty value appearing in NullFields will be sent to the server as
  7846. // null. It is an error if a field in this list has a non-empty value.
  7847. // This may be used to include null fields in Patch requests.
  7848. NullFields []string `json:"-"`
  7849. }
  7850. func (s *ShippingsettingsCustomBatchResponseEntry) MarshalJSON() ([]byte, error) {
  7851. type NoMethod ShippingsettingsCustomBatchResponseEntry
  7852. raw := NoMethod(*s)
  7853. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7854. }
  7855. type ShippingsettingsGetSupportedCarriersResponse struct {
  7856. // Carriers: A list of supported carriers. May be empty.
  7857. Carriers []*CarriersCarrier `json:"carriers,omitempty"`
  7858. // Kind: Identifies what kind of resource this is. Value: the fixed
  7859. // string "content#shippingsettingsGetSupportedCarriersResponse".
  7860. Kind string `json:"kind,omitempty"`
  7861. // ServerResponse contains the HTTP response code and headers from the
  7862. // server.
  7863. googleapi.ServerResponse `json:"-"`
  7864. // ForceSendFields is a list of field names (e.g. "Carriers") to
  7865. // unconditionally include in API requests. By default, fields with
  7866. // empty values are omitted from API requests. However, any non-pointer,
  7867. // non-interface field appearing in ForceSendFields will be sent to the
  7868. // server regardless of whether the field is empty or not. This may be
  7869. // used to include empty fields in Patch requests.
  7870. ForceSendFields []string `json:"-"`
  7871. // NullFields is a list of field names (e.g. "Carriers") to include in
  7872. // API requests with the JSON null value. By default, fields with empty
  7873. // values are omitted from API requests. However, any field with an
  7874. // empty value appearing in NullFields will be sent to the server as
  7875. // null. It is an error if a field in this list has a non-empty value.
  7876. // This may be used to include null fields in Patch requests.
  7877. NullFields []string `json:"-"`
  7878. }
  7879. func (s *ShippingsettingsGetSupportedCarriersResponse) MarshalJSON() ([]byte, error) {
  7880. type NoMethod ShippingsettingsGetSupportedCarriersResponse
  7881. raw := NoMethod(*s)
  7882. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7883. }
  7884. type ShippingsettingsGetSupportedHolidaysResponse struct {
  7885. // Holidays: A list of holidays applicable for delivery guarantees. May
  7886. // be empty.
  7887. Holidays []*HolidaysHoliday `json:"holidays,omitempty"`
  7888. // Kind: Identifies what kind of resource this is. Value: the fixed
  7889. // string "content#shippingsettingsGetSupportedHolidaysResponse".
  7890. Kind string `json:"kind,omitempty"`
  7891. // ServerResponse contains the HTTP response code and headers from the
  7892. // server.
  7893. googleapi.ServerResponse `json:"-"`
  7894. // ForceSendFields is a list of field names (e.g. "Holidays") to
  7895. // unconditionally include in API requests. By default, fields with
  7896. // empty values are omitted from API requests. However, any non-pointer,
  7897. // non-interface field appearing in ForceSendFields will be sent to the
  7898. // server regardless of whether the field is empty or not. This may be
  7899. // used to include empty fields in Patch requests.
  7900. ForceSendFields []string `json:"-"`
  7901. // NullFields is a list of field names (e.g. "Holidays") to include in
  7902. // API requests with the JSON null value. By default, fields with empty
  7903. // values are omitted from API requests. However, any field with an
  7904. // empty value appearing in NullFields will be sent to the server as
  7905. // null. It is an error if a field in this list has a non-empty value.
  7906. // This may be used to include null fields in Patch requests.
  7907. NullFields []string `json:"-"`
  7908. }
  7909. func (s *ShippingsettingsGetSupportedHolidaysResponse) MarshalJSON() ([]byte, error) {
  7910. type NoMethod ShippingsettingsGetSupportedHolidaysResponse
  7911. raw := NoMethod(*s)
  7912. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7913. }
  7914. type ShippingsettingsListResponse struct {
  7915. // Kind: Identifies what kind of resource this is. Value: the fixed
  7916. // string "content#shippingsettingsListResponse".
  7917. Kind string `json:"kind,omitempty"`
  7918. // NextPageToken: The token for the retrieval of the next page of
  7919. // shipping settings.
  7920. NextPageToken string `json:"nextPageToken,omitempty"`
  7921. Resources []*ShippingSettings `json:"resources,omitempty"`
  7922. // ServerResponse contains the HTTP response code and headers from the
  7923. // server.
  7924. googleapi.ServerResponse `json:"-"`
  7925. // ForceSendFields is a list of field names (e.g. "Kind") to
  7926. // unconditionally include in API requests. By default, fields with
  7927. // empty values are omitted from API requests. However, any non-pointer,
  7928. // non-interface field appearing in ForceSendFields will be sent to the
  7929. // server regardless of whether the field is empty or not. This may be
  7930. // used to include empty fields in Patch requests.
  7931. ForceSendFields []string `json:"-"`
  7932. // NullFields is a list of field names (e.g. "Kind") to include in API
  7933. // requests with the JSON null value. By default, fields with empty
  7934. // values are omitted from API requests. However, any field with an
  7935. // empty value appearing in NullFields will be sent to the server as
  7936. // null. It is an error if a field in this list has a non-empty value.
  7937. // This may be used to include null fields in Patch requests.
  7938. NullFields []string `json:"-"`
  7939. }
  7940. func (s *ShippingsettingsListResponse) MarshalJSON() ([]byte, error) {
  7941. type NoMethod ShippingsettingsListResponse
  7942. raw := NoMethod(*s)
  7943. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7944. }
  7945. type Table struct {
  7946. // ColumnHeaders: Headers of the table's columns. Optional: if not set
  7947. // then the table has only one dimension.
  7948. ColumnHeaders *Headers `json:"columnHeaders,omitempty"`
  7949. // Name: Name of the table. Required for subtables, ignored for the main
  7950. // table.
  7951. Name string `json:"name,omitempty"`
  7952. // RowHeaders: Headers of the table's rows. Required.
  7953. RowHeaders *Headers `json:"rowHeaders,omitempty"`
  7954. // Rows: The list of rows that constitute the table. Must have the same
  7955. // length as rowHeaders. Required.
  7956. Rows []*Row `json:"rows,omitempty"`
  7957. // ForceSendFields is a list of field names (e.g. "ColumnHeaders") to
  7958. // unconditionally include in API requests. By default, fields with
  7959. // empty values are omitted from API requests. However, any non-pointer,
  7960. // non-interface field appearing in ForceSendFields will be sent to the
  7961. // server regardless of whether the field is empty or not. This may be
  7962. // used to include empty fields in Patch requests.
  7963. ForceSendFields []string `json:"-"`
  7964. // NullFields is a list of field names (e.g. "ColumnHeaders") to include
  7965. // in API requests with the JSON null value. By default, fields with
  7966. // empty values are omitted from API requests. However, any field with
  7967. // an empty value appearing in NullFields will be sent to the server as
  7968. // null. It is an error if a field in this list has a non-empty value.
  7969. // This may be used to include null fields in Patch requests.
  7970. NullFields []string `json:"-"`
  7971. }
  7972. func (s *Table) MarshalJSON() ([]byte, error) {
  7973. type NoMethod Table
  7974. raw := NoMethod(*s)
  7975. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  7976. }
  7977. type TestOrder struct {
  7978. // Customer: The details of the customer who placed the order.
  7979. Customer *TestOrderCustomer `json:"customer,omitempty"`
  7980. // EnableOrderinvoices: Whether the orderinvoices service should support
  7981. // this order.
  7982. EnableOrderinvoices bool `json:"enableOrderinvoices,omitempty"`
  7983. // Kind: Identifies what kind of resource this is. Value: the fixed
  7984. // string "content#testOrder".
  7985. Kind string `json:"kind,omitempty"`
  7986. // LineItems: Line items that are ordered. At least one line item must
  7987. // be provided.
  7988. LineItems []*TestOrderLineItem `json:"lineItems,omitempty"`
  7989. // NotificationMode: Determines if test order must be pulled by merchant
  7990. // or pushed to merchant via push integration.
  7991. NotificationMode string `json:"notificationMode,omitempty"`
  7992. // PaymentMethod: The details of the payment method.
  7993. PaymentMethod *TestOrderPaymentMethod `json:"paymentMethod,omitempty"`
  7994. // PredefinedDeliveryAddress: Identifier of one of the predefined
  7995. // delivery addresses for the delivery.
  7996. PredefinedDeliveryAddress string `json:"predefinedDeliveryAddress,omitempty"`
  7997. // Promotions: The details of the merchant provided promotions applied
  7998. // to the order. More details about the program are here.
  7999. Promotions []*OrderPromotion `json:"promotions,omitempty"`
  8000. // ShippingCost: The total cost of shipping for all items.
  8001. ShippingCost *Price `json:"shippingCost,omitempty"`
  8002. // ShippingCostTax: The tax for the total shipping cost.
  8003. ShippingCostTax *Price `json:"shippingCostTax,omitempty"`
  8004. // ShippingOption: The requested shipping option.
  8005. ShippingOption string `json:"shippingOption,omitempty"`
  8006. // ForceSendFields is a list of field names (e.g. "Customer") to
  8007. // unconditionally include in API requests. By default, fields with
  8008. // empty values are omitted from API requests. However, any non-pointer,
  8009. // non-interface field appearing in ForceSendFields will be sent to the
  8010. // server regardless of whether the field is empty or not. This may be
  8011. // used to include empty fields in Patch requests.
  8012. ForceSendFields []string `json:"-"`
  8013. // NullFields is a list of field names (e.g. "Customer") to include in
  8014. // API requests with the JSON null value. By default, fields with empty
  8015. // values are omitted from API requests. However, any field with an
  8016. // empty value appearing in NullFields will be sent to the server as
  8017. // null. It is an error if a field in this list has a non-empty value.
  8018. // This may be used to include null fields in Patch requests.
  8019. NullFields []string `json:"-"`
  8020. }
  8021. func (s *TestOrder) MarshalJSON() ([]byte, error) {
  8022. type NoMethod TestOrder
  8023. raw := NoMethod(*s)
  8024. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8025. }
  8026. type TestOrderCustomer struct {
  8027. // Email: Email address of the customer.
  8028. Email string `json:"email,omitempty"`
  8029. // ExplicitMarketingPreference: Deprecated. Please use
  8030. // marketingRightsInfo instead.
  8031. ExplicitMarketingPreference bool `json:"explicitMarketingPreference,omitempty"`
  8032. // FullName: Full name of the customer.
  8033. FullName string `json:"fullName,omitempty"`
  8034. // MarketingRightsInfo: Customer's marketing preferences.
  8035. MarketingRightsInfo *TestOrderCustomerMarketingRightsInfo `json:"marketingRightsInfo,omitempty"`
  8036. // ForceSendFields is a list of field names (e.g. "Email") to
  8037. // unconditionally include in API requests. By default, fields with
  8038. // empty values are omitted from API requests. However, any non-pointer,
  8039. // non-interface field appearing in ForceSendFields will be sent to the
  8040. // server regardless of whether the field is empty or not. This may be
  8041. // used to include empty fields in Patch requests.
  8042. ForceSendFields []string `json:"-"`
  8043. // NullFields is a list of field names (e.g. "Email") to include in API
  8044. // requests with the JSON null value. By default, fields with empty
  8045. // values are omitted from API requests. However, any field with an
  8046. // empty value appearing in NullFields will be sent to the server as
  8047. // null. It is an error if a field in this list has a non-empty value.
  8048. // This may be used to include null fields in Patch requests.
  8049. NullFields []string `json:"-"`
  8050. }
  8051. func (s *TestOrderCustomer) MarshalJSON() ([]byte, error) {
  8052. type NoMethod TestOrderCustomer
  8053. raw := NoMethod(*s)
  8054. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8055. }
  8056. type TestOrderCustomerMarketingRightsInfo struct {
  8057. // ExplicitMarketingPreference: Last know user use selection regards
  8058. // marketing preferences. In certain cases selection might not be known,
  8059. // so this field would be empty.
  8060. ExplicitMarketingPreference string `json:"explicitMarketingPreference,omitempty"`
  8061. // LastUpdatedTimestamp: Timestamp when last time marketing preference
  8062. // was updated. Could be empty, if user wasn't offered a selection yet.
  8063. LastUpdatedTimestamp string `json:"lastUpdatedTimestamp,omitempty"`
  8064. // ForceSendFields is a list of field names (e.g.
  8065. // "ExplicitMarketingPreference") to unconditionally include in API
  8066. // requests. By default, fields with empty values are omitted from API
  8067. // requests. However, any non-pointer, non-interface field appearing in
  8068. // ForceSendFields will be sent to the server regardless of whether the
  8069. // field is empty or not. This may be used to include empty fields in
  8070. // Patch requests.
  8071. ForceSendFields []string `json:"-"`
  8072. // NullFields is a list of field names (e.g.
  8073. // "ExplicitMarketingPreference") to include in API requests with the
  8074. // JSON null value. By default, fields with empty values are omitted
  8075. // from API requests. However, any field with an empty value appearing
  8076. // in NullFields will be sent to the server as null. It is an error if a
  8077. // field in this list has a non-empty value. This may be used to include
  8078. // null fields in Patch requests.
  8079. NullFields []string `json:"-"`
  8080. }
  8081. func (s *TestOrderCustomerMarketingRightsInfo) MarshalJSON() ([]byte, error) {
  8082. type NoMethod TestOrderCustomerMarketingRightsInfo
  8083. raw := NoMethod(*s)
  8084. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8085. }
  8086. type TestOrderLineItem struct {
  8087. // Product: Product data from the time of the order placement.
  8088. Product *TestOrderLineItemProduct `json:"product,omitempty"`
  8089. // QuantityOrdered: Number of items ordered.
  8090. QuantityOrdered int64 `json:"quantityOrdered,omitempty"`
  8091. // ReturnInfo: Details of the return policy for the line item.
  8092. ReturnInfo *OrderLineItemReturnInfo `json:"returnInfo,omitempty"`
  8093. // ShippingDetails: Details of the requested shipping for the line item.
  8094. ShippingDetails *OrderLineItemShippingDetails `json:"shippingDetails,omitempty"`
  8095. // UnitTax: Unit tax for the line item.
  8096. UnitTax *Price `json:"unitTax,omitempty"`
  8097. // ForceSendFields is a list of field names (e.g. "Product") to
  8098. // unconditionally include in API requests. By default, fields with
  8099. // empty values are omitted from API requests. However, any non-pointer,
  8100. // non-interface field appearing in ForceSendFields will be sent to the
  8101. // server regardless of whether the field is empty or not. This may be
  8102. // used to include empty fields in Patch requests.
  8103. ForceSendFields []string `json:"-"`
  8104. // NullFields is a list of field names (e.g. "Product") to include in
  8105. // API requests with the JSON null value. By default, fields with empty
  8106. // values are omitted from API requests. However, any field with an
  8107. // empty value appearing in NullFields will be sent to the server as
  8108. // null. It is an error if a field in this list has a non-empty value.
  8109. // This may be used to include null fields in Patch requests.
  8110. NullFields []string `json:"-"`
  8111. }
  8112. func (s *TestOrderLineItem) MarshalJSON() ([]byte, error) {
  8113. type NoMethod TestOrderLineItem
  8114. raw := NoMethod(*s)
  8115. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8116. }
  8117. type TestOrderLineItemProduct struct {
  8118. // Brand: Brand of the item.
  8119. Brand string `json:"brand,omitempty"`
  8120. // Channel: The item's channel.
  8121. Channel string `json:"channel,omitempty"`
  8122. // Condition: Condition or state of the item.
  8123. Condition string `json:"condition,omitempty"`
  8124. // ContentLanguage: The two-letter ISO 639-1 language code for the item.
  8125. ContentLanguage string `json:"contentLanguage,omitempty"`
  8126. // Gtin: Global Trade Item Number (GTIN) of the item. Optional.
  8127. Gtin string `json:"gtin,omitempty"`
  8128. // ImageLink: URL of an image of the item.
  8129. ImageLink string `json:"imageLink,omitempty"`
  8130. // ItemGroupId: Shared identifier for all variants of the same product.
  8131. // Optional.
  8132. ItemGroupId string `json:"itemGroupId,omitempty"`
  8133. // Mpn: Manufacturer Part Number (MPN) of the item. Optional.
  8134. Mpn string `json:"mpn,omitempty"`
  8135. // OfferId: An identifier of the item.
  8136. OfferId string `json:"offerId,omitempty"`
  8137. // Price: The price for the product.
  8138. Price *Price `json:"price,omitempty"`
  8139. // TargetCountry: The CLDR territory code of the target country of the
  8140. // product.
  8141. TargetCountry string `json:"targetCountry,omitempty"`
  8142. // Title: The title of the product.
  8143. Title string `json:"title,omitempty"`
  8144. // VariantAttributes: Variant attributes for the item. Optional.
  8145. VariantAttributes []*OrderLineItemProductVariantAttribute `json:"variantAttributes,omitempty"`
  8146. // ForceSendFields is a list of field names (e.g. "Brand") to
  8147. // unconditionally include in API requests. By default, fields with
  8148. // empty values are omitted from API requests. However, any non-pointer,
  8149. // non-interface field appearing in ForceSendFields will be sent to the
  8150. // server regardless of whether the field is empty or not. This may be
  8151. // used to include empty fields in Patch requests.
  8152. ForceSendFields []string `json:"-"`
  8153. // NullFields is a list of field names (e.g. "Brand") to include in API
  8154. // requests with the JSON null value. By default, fields with empty
  8155. // values are omitted from API requests. However, any field with an
  8156. // empty value appearing in NullFields will be sent to the server as
  8157. // null. It is an error if a field in this list has a non-empty value.
  8158. // This may be used to include null fields in Patch requests.
  8159. NullFields []string `json:"-"`
  8160. }
  8161. func (s *TestOrderLineItemProduct) MarshalJSON() ([]byte, error) {
  8162. type NoMethod TestOrderLineItemProduct
  8163. raw := NoMethod(*s)
  8164. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8165. }
  8166. type TestOrderPaymentMethod struct {
  8167. // ExpirationMonth: The card expiration month (January = 1, February = 2
  8168. // etc.).
  8169. ExpirationMonth int64 `json:"expirationMonth,omitempty"`
  8170. // ExpirationYear: The card expiration year (4-digit, e.g. 2015).
  8171. ExpirationYear int64 `json:"expirationYear,omitempty"`
  8172. // LastFourDigits: The last four digits of the card number.
  8173. LastFourDigits string `json:"lastFourDigits,omitempty"`
  8174. // PredefinedBillingAddress: The billing address.
  8175. PredefinedBillingAddress string `json:"predefinedBillingAddress,omitempty"`
  8176. // Type: The type of instrument. Note that real orders might have
  8177. // different values than the four values accepted by createTestOrder.
  8178. Type string `json:"type,omitempty"`
  8179. // ForceSendFields is a list of field names (e.g. "ExpirationMonth") to
  8180. // unconditionally include in API requests. By default, fields with
  8181. // empty values are omitted from API requests. However, any non-pointer,
  8182. // non-interface field appearing in ForceSendFields will be sent to the
  8183. // server regardless of whether the field is empty or not. This may be
  8184. // used to include empty fields in Patch requests.
  8185. ForceSendFields []string `json:"-"`
  8186. // NullFields is a list of field names (e.g. "ExpirationMonth") to
  8187. // include in API requests with the JSON null value. By default, fields
  8188. // with empty values are omitted from API requests. However, any field
  8189. // with an empty value appearing in NullFields will be sent to the
  8190. // server as null. It is an error if a field in this list has a
  8191. // non-empty value. This may be used to include null fields in Patch
  8192. // requests.
  8193. NullFields []string `json:"-"`
  8194. }
  8195. func (s *TestOrderPaymentMethod) MarshalJSON() ([]byte, error) {
  8196. type NoMethod TestOrderPaymentMethod
  8197. raw := NoMethod(*s)
  8198. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8199. }
  8200. type UnitInvoice struct {
  8201. // AdditionalCharges: Additional charges for a unit, e.g. shipping
  8202. // costs.
  8203. AdditionalCharges []*UnitInvoiceAdditionalCharge `json:"additionalCharges,omitempty"`
  8204. // Promotions: Promotions applied to a unit.
  8205. Promotions []*Promotion `json:"promotions,omitempty"`
  8206. // UnitPricePretax: Price of the unit, before applying taxes.
  8207. UnitPricePretax *Price `json:"unitPricePretax,omitempty"`
  8208. // UnitPriceTaxes: Tax amounts to apply to the unit price.
  8209. UnitPriceTaxes []*UnitInvoiceTaxLine `json:"unitPriceTaxes,omitempty"`
  8210. // ForceSendFields is a list of field names (e.g. "AdditionalCharges")
  8211. // to unconditionally include in API requests. By default, fields with
  8212. // empty values are omitted from API requests. However, any non-pointer,
  8213. // non-interface field appearing in ForceSendFields will be sent to the
  8214. // server regardless of whether the field is empty or not. This may be
  8215. // used to include empty fields in Patch requests.
  8216. ForceSendFields []string `json:"-"`
  8217. // NullFields is a list of field names (e.g. "AdditionalCharges") to
  8218. // include in API requests with the JSON null value. By default, fields
  8219. // with empty values are omitted from API requests. However, any field
  8220. // with an empty value appearing in NullFields will be sent to the
  8221. // server as null. It is an error if a field in this list has a
  8222. // non-empty value. This may be used to include null fields in Patch
  8223. // requests.
  8224. NullFields []string `json:"-"`
  8225. }
  8226. func (s *UnitInvoice) MarshalJSON() ([]byte, error) {
  8227. type NoMethod UnitInvoice
  8228. raw := NoMethod(*s)
  8229. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8230. }
  8231. type UnitInvoiceAdditionalCharge struct {
  8232. // AdditionalChargeAmount: Amount of the additional charge.
  8233. AdditionalChargeAmount *Amount `json:"additionalChargeAmount,omitempty"`
  8234. // AdditionalChargePromotions: Promotions applied to the additional
  8235. // charge.
  8236. AdditionalChargePromotions []*Promotion `json:"additionalChargePromotions,omitempty"`
  8237. // Type: Type of the additional charge.
  8238. Type string `json:"type,omitempty"`
  8239. // ForceSendFields is a list of field names (e.g.
  8240. // "AdditionalChargeAmount") to unconditionally include in API requests.
  8241. // By default, fields with empty values are omitted from API requests.
  8242. // However, any non-pointer, non-interface field appearing in
  8243. // ForceSendFields will be sent to the server regardless of whether the
  8244. // field is empty or not. This may be used to include empty fields in
  8245. // Patch requests.
  8246. ForceSendFields []string `json:"-"`
  8247. // NullFields is a list of field names (e.g. "AdditionalChargeAmount")
  8248. // to include in API requests with the JSON null value. By default,
  8249. // fields with empty values are omitted from API requests. However, any
  8250. // field with an empty value appearing in NullFields will be sent to the
  8251. // server as null. It is an error if a field in this list has a
  8252. // non-empty value. This may be used to include null fields in Patch
  8253. // requests.
  8254. NullFields []string `json:"-"`
  8255. }
  8256. func (s *UnitInvoiceAdditionalCharge) MarshalJSON() ([]byte, error) {
  8257. type NoMethod UnitInvoiceAdditionalCharge
  8258. raw := NoMethod(*s)
  8259. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8260. }
  8261. type UnitInvoiceTaxLine struct {
  8262. // TaxAmount: Tax amount for the tax type.
  8263. TaxAmount *Price `json:"taxAmount,omitempty"`
  8264. // TaxName: Optional name of the tax type.
  8265. TaxName string `json:"taxName,omitempty"`
  8266. // TaxType: Type of the tax.
  8267. TaxType string `json:"taxType,omitempty"`
  8268. // ForceSendFields is a list of field names (e.g. "TaxAmount") to
  8269. // unconditionally include in API requests. By default, fields with
  8270. // empty values are omitted from API requests. However, any non-pointer,
  8271. // non-interface field appearing in ForceSendFields will be sent to the
  8272. // server regardless of whether the field is empty or not. This may be
  8273. // used to include empty fields in Patch requests.
  8274. ForceSendFields []string `json:"-"`
  8275. // NullFields is a list of field names (e.g. "TaxAmount") to include in
  8276. // API requests with the JSON null value. By default, fields with empty
  8277. // values are omitted from API requests. However, any field with an
  8278. // empty value appearing in NullFields will be sent to the server as
  8279. // null. It is an error if a field in this list has a non-empty value.
  8280. // This may be used to include null fields in Patch requests.
  8281. NullFields []string `json:"-"`
  8282. }
  8283. func (s *UnitInvoiceTaxLine) MarshalJSON() ([]byte, error) {
  8284. type NoMethod UnitInvoiceTaxLine
  8285. raw := NoMethod(*s)
  8286. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8287. }
  8288. // Value: The single value of a rate group or the value of a rate group
  8289. // table's cell. Exactly one of noShipping, flatRate, pricePercentage,
  8290. // carrierRateName, subtableName must be set.
  8291. type Value struct {
  8292. // CarrierRateName: The name of a carrier rate referring to a carrier
  8293. // rate defined in the same rate group. Can only be set if all other
  8294. // fields are not set.
  8295. CarrierRateName string `json:"carrierRateName,omitempty"`
  8296. // FlatRate: A flat rate. Can only be set if all other fields are not
  8297. // set.
  8298. FlatRate *Price `json:"flatRate,omitempty"`
  8299. // NoShipping: If true, then the product can't ship. Must be true when
  8300. // set, can only be set if all other fields are not set.
  8301. NoShipping bool `json:"noShipping,omitempty"`
  8302. // PricePercentage: A percentage of the price represented as a number in
  8303. // decimal notation (e.g., "5.4"). Can only be set if all other fields
  8304. // are not set.
  8305. PricePercentage string `json:"pricePercentage,omitempty"`
  8306. // SubtableName: The name of a subtable. Can only be set in table cells
  8307. // (i.e., not for single values), and only if all other fields are not
  8308. // set.
  8309. SubtableName string `json:"subtableName,omitempty"`
  8310. // ForceSendFields is a list of field names (e.g. "CarrierRateName") to
  8311. // unconditionally include in API requests. By default, fields with
  8312. // empty values are omitted from API requests. However, any non-pointer,
  8313. // non-interface field appearing in ForceSendFields will be sent to the
  8314. // server regardless of whether the field is empty or not. This may be
  8315. // used to include empty fields in Patch requests.
  8316. ForceSendFields []string `json:"-"`
  8317. // NullFields is a list of field names (e.g. "CarrierRateName") to
  8318. // include in API requests with the JSON null value. By default, fields
  8319. // with empty values are omitted from API requests. However, any field
  8320. // with an empty value appearing in NullFields will be sent to the
  8321. // server as null. It is an error if a field in this list has a
  8322. // non-empty value. This may be used to include null fields in Patch
  8323. // requests.
  8324. NullFields []string `json:"-"`
  8325. }
  8326. func (s *Value) MarshalJSON() ([]byte, error) {
  8327. type NoMethod Value
  8328. raw := NoMethod(*s)
  8329. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8330. }
  8331. type Weight struct {
  8332. // Unit: The weight unit.
  8333. Unit string `json:"unit,omitempty"`
  8334. // Value: The weight represented as a number.
  8335. Value string `json:"value,omitempty"`
  8336. // ForceSendFields is a list of field names (e.g. "Unit") to
  8337. // unconditionally include in API requests. By default, fields with
  8338. // empty values are omitted from API requests. However, any non-pointer,
  8339. // non-interface field appearing in ForceSendFields will be sent to the
  8340. // server regardless of whether the field is empty or not. This may be
  8341. // used to include empty fields in Patch requests.
  8342. ForceSendFields []string `json:"-"`
  8343. // NullFields is a list of field names (e.g. "Unit") to include in API
  8344. // requests with the JSON null value. By default, fields with empty
  8345. // values are omitted from API requests. However, any field with an
  8346. // empty value appearing in NullFields will be sent to the server as
  8347. // null. It is an error if a field in this list has a non-empty value.
  8348. // This may be used to include null fields in Patch requests.
  8349. NullFields []string `json:"-"`
  8350. }
  8351. func (s *Weight) MarshalJSON() ([]byte, error) {
  8352. type NoMethod Weight
  8353. raw := NoMethod(*s)
  8354. return gensupport.MarshalJSON(raw, s.ForceSendFields, s.NullFields)
  8355. }
  8356. // method id "content.accounts.authinfo":
  8357. type AccountsAuthinfoCall struct {
  8358. s *APIService
  8359. urlParams_ gensupport.URLParams
  8360. ifNoneMatch_ string
  8361. ctx_ context.Context
  8362. header_ http.Header
  8363. }
  8364. // Authinfo: Returns information about the authenticated user.
  8365. func (r *AccountsService) Authinfo() *AccountsAuthinfoCall {
  8366. c := &AccountsAuthinfoCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8367. return c
  8368. }
  8369. // Fields allows partial responses to be retrieved. See
  8370. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8371. // for more information.
  8372. func (c *AccountsAuthinfoCall) Fields(s ...googleapi.Field) *AccountsAuthinfoCall {
  8373. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8374. return c
  8375. }
  8376. // IfNoneMatch sets the optional parameter which makes the operation
  8377. // fail if the object's ETag matches the given value. This is useful for
  8378. // getting updates only after the object has changed since the last
  8379. // request. Use googleapi.IsNotModified to check whether the response
  8380. // error from Do is the result of In-None-Match.
  8381. func (c *AccountsAuthinfoCall) IfNoneMatch(entityTag string) *AccountsAuthinfoCall {
  8382. c.ifNoneMatch_ = entityTag
  8383. return c
  8384. }
  8385. // Context sets the context to be used in this call's Do method. Any
  8386. // pending HTTP request will be aborted if the provided context is
  8387. // canceled.
  8388. func (c *AccountsAuthinfoCall) Context(ctx context.Context) *AccountsAuthinfoCall {
  8389. c.ctx_ = ctx
  8390. return c
  8391. }
  8392. // Header returns an http.Header that can be modified by the caller to
  8393. // add HTTP headers to the request.
  8394. func (c *AccountsAuthinfoCall) Header() http.Header {
  8395. if c.header_ == nil {
  8396. c.header_ = make(http.Header)
  8397. }
  8398. return c.header_
  8399. }
  8400. func (c *AccountsAuthinfoCall) doRequest(alt string) (*http.Response, error) {
  8401. reqHeaders := make(http.Header)
  8402. for k, v := range c.header_ {
  8403. reqHeaders[k] = v
  8404. }
  8405. reqHeaders.Set("User-Agent", c.s.userAgent())
  8406. if c.ifNoneMatch_ != "" {
  8407. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8408. }
  8409. var body io.Reader = nil
  8410. c.urlParams_.Set("alt", alt)
  8411. urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/authinfo")
  8412. urls += "?" + c.urlParams_.Encode()
  8413. req, _ := http.NewRequest("GET", urls, body)
  8414. req.Header = reqHeaders
  8415. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8416. }
  8417. // Do executes the "content.accounts.authinfo" call.
  8418. // Exactly one of *AccountsAuthInfoResponse or error will be non-nil.
  8419. // Any non-2xx status code is an error. Response headers are in either
  8420. // *AccountsAuthInfoResponse.ServerResponse.Header or (if a response was
  8421. // returned at all) in error.(*googleapi.Error).Header. Use
  8422. // googleapi.IsNotModified to check whether the returned error was
  8423. // because http.StatusNotModified was returned.
  8424. func (c *AccountsAuthinfoCall) Do(opts ...googleapi.CallOption) (*AccountsAuthInfoResponse, error) {
  8425. gensupport.SetOptions(c.urlParams_, opts...)
  8426. res, err := c.doRequest("json")
  8427. if res != nil && res.StatusCode == http.StatusNotModified {
  8428. if res.Body != nil {
  8429. res.Body.Close()
  8430. }
  8431. return nil, &googleapi.Error{
  8432. Code: res.StatusCode,
  8433. Header: res.Header,
  8434. }
  8435. }
  8436. if err != nil {
  8437. return nil, err
  8438. }
  8439. defer googleapi.CloseBody(res)
  8440. if err := googleapi.CheckResponse(res); err != nil {
  8441. return nil, err
  8442. }
  8443. ret := &AccountsAuthInfoResponse{
  8444. ServerResponse: googleapi.ServerResponse{
  8445. Header: res.Header,
  8446. HTTPStatusCode: res.StatusCode,
  8447. },
  8448. }
  8449. target := &ret
  8450. if err := gensupport.DecodeResponse(target, res); err != nil {
  8451. return nil, err
  8452. }
  8453. return ret, nil
  8454. // {
  8455. // "description": "Returns information about the authenticated user.",
  8456. // "httpMethod": "GET",
  8457. // "id": "content.accounts.authinfo",
  8458. // "path": "accounts/authinfo",
  8459. // "response": {
  8460. // "$ref": "AccountsAuthInfoResponse"
  8461. // },
  8462. // "scopes": [
  8463. // "https://www.googleapis.com/auth/content"
  8464. // ]
  8465. // }
  8466. }
  8467. // method id "content.accounts.claimwebsite":
  8468. type AccountsClaimwebsiteCall struct {
  8469. s *APIService
  8470. merchantId uint64
  8471. accountId uint64
  8472. urlParams_ gensupport.URLParams
  8473. ctx_ context.Context
  8474. header_ http.Header
  8475. }
  8476. // Claimwebsite: Claims the website of a Merchant Center sub-account.
  8477. func (r *AccountsService) Claimwebsite(merchantId uint64, accountId uint64) *AccountsClaimwebsiteCall {
  8478. c := &AccountsClaimwebsiteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8479. c.merchantId = merchantId
  8480. c.accountId = accountId
  8481. return c
  8482. }
  8483. // Overwrite sets the optional parameter "overwrite": Only available to
  8484. // selected merchants. When set to True, this flag removes any existing
  8485. // claim on the requested website by another account and replaces it
  8486. // with a claim from this account.
  8487. func (c *AccountsClaimwebsiteCall) Overwrite(overwrite bool) *AccountsClaimwebsiteCall {
  8488. c.urlParams_.Set("overwrite", fmt.Sprint(overwrite))
  8489. return c
  8490. }
  8491. // Fields allows partial responses to be retrieved. See
  8492. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8493. // for more information.
  8494. func (c *AccountsClaimwebsiteCall) Fields(s ...googleapi.Field) *AccountsClaimwebsiteCall {
  8495. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8496. return c
  8497. }
  8498. // Context sets the context to be used in this call's Do method. Any
  8499. // pending HTTP request will be aborted if the provided context is
  8500. // canceled.
  8501. func (c *AccountsClaimwebsiteCall) Context(ctx context.Context) *AccountsClaimwebsiteCall {
  8502. c.ctx_ = ctx
  8503. return c
  8504. }
  8505. // Header returns an http.Header that can be modified by the caller to
  8506. // add HTTP headers to the request.
  8507. func (c *AccountsClaimwebsiteCall) Header() http.Header {
  8508. if c.header_ == nil {
  8509. c.header_ = make(http.Header)
  8510. }
  8511. return c.header_
  8512. }
  8513. func (c *AccountsClaimwebsiteCall) doRequest(alt string) (*http.Response, error) {
  8514. reqHeaders := make(http.Header)
  8515. for k, v := range c.header_ {
  8516. reqHeaders[k] = v
  8517. }
  8518. reqHeaders.Set("User-Agent", c.s.userAgent())
  8519. var body io.Reader = nil
  8520. c.urlParams_.Set("alt", alt)
  8521. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}/claimwebsite")
  8522. urls += "?" + c.urlParams_.Encode()
  8523. req, _ := http.NewRequest("POST", urls, body)
  8524. req.Header = reqHeaders
  8525. googleapi.Expand(req.URL, map[string]string{
  8526. "merchantId": strconv.FormatUint(c.merchantId, 10),
  8527. "accountId": strconv.FormatUint(c.accountId, 10),
  8528. })
  8529. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8530. }
  8531. // Do executes the "content.accounts.claimwebsite" call.
  8532. // Exactly one of *AccountsClaimWebsiteResponse or error will be
  8533. // non-nil. Any non-2xx status code is an error. Response headers are in
  8534. // either *AccountsClaimWebsiteResponse.ServerResponse.Header or (if a
  8535. // response was returned at all) in error.(*googleapi.Error).Header. Use
  8536. // googleapi.IsNotModified to check whether the returned error was
  8537. // because http.StatusNotModified was returned.
  8538. func (c *AccountsClaimwebsiteCall) Do(opts ...googleapi.CallOption) (*AccountsClaimWebsiteResponse, error) {
  8539. gensupport.SetOptions(c.urlParams_, opts...)
  8540. res, err := c.doRequest("json")
  8541. if res != nil && res.StatusCode == http.StatusNotModified {
  8542. if res.Body != nil {
  8543. res.Body.Close()
  8544. }
  8545. return nil, &googleapi.Error{
  8546. Code: res.StatusCode,
  8547. Header: res.Header,
  8548. }
  8549. }
  8550. if err != nil {
  8551. return nil, err
  8552. }
  8553. defer googleapi.CloseBody(res)
  8554. if err := googleapi.CheckResponse(res); err != nil {
  8555. return nil, err
  8556. }
  8557. ret := &AccountsClaimWebsiteResponse{
  8558. ServerResponse: googleapi.ServerResponse{
  8559. Header: res.Header,
  8560. HTTPStatusCode: res.StatusCode,
  8561. },
  8562. }
  8563. target := &ret
  8564. if err := gensupport.DecodeResponse(target, res); err != nil {
  8565. return nil, err
  8566. }
  8567. return ret, nil
  8568. // {
  8569. // "description": "Claims the website of a Merchant Center sub-account.",
  8570. // "httpMethod": "POST",
  8571. // "id": "content.accounts.claimwebsite",
  8572. // "parameterOrder": [
  8573. // "merchantId",
  8574. // "accountId"
  8575. // ],
  8576. // "parameters": {
  8577. // "accountId": {
  8578. // "description": "The ID of the account whose website is claimed.",
  8579. // "format": "uint64",
  8580. // "location": "path",
  8581. // "required": true,
  8582. // "type": "string"
  8583. // },
  8584. // "merchantId": {
  8585. // "description": "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.",
  8586. // "format": "uint64",
  8587. // "location": "path",
  8588. // "required": true,
  8589. // "type": "string"
  8590. // },
  8591. // "overwrite": {
  8592. // "description": "Only available to selected merchants. When set to True, this flag removes any existing claim on the requested website by another account and replaces it with a claim from this account.",
  8593. // "location": "query",
  8594. // "type": "boolean"
  8595. // }
  8596. // },
  8597. // "path": "{merchantId}/accounts/{accountId}/claimwebsite",
  8598. // "response": {
  8599. // "$ref": "AccountsClaimWebsiteResponse"
  8600. // },
  8601. // "scopes": [
  8602. // "https://www.googleapis.com/auth/content"
  8603. // ]
  8604. // }
  8605. }
  8606. // method id "content.accounts.custombatch":
  8607. type AccountsCustombatchCall struct {
  8608. s *APIService
  8609. accountscustombatchrequest *AccountsCustomBatchRequest
  8610. urlParams_ gensupport.URLParams
  8611. ctx_ context.Context
  8612. header_ http.Header
  8613. }
  8614. // Custombatch: Retrieves, inserts, updates, and deletes multiple
  8615. // Merchant Center (sub-)accounts in a single request.
  8616. func (r *AccountsService) Custombatch(accountscustombatchrequest *AccountsCustomBatchRequest) *AccountsCustombatchCall {
  8617. c := &AccountsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8618. c.accountscustombatchrequest = accountscustombatchrequest
  8619. return c
  8620. }
  8621. // DryRun sets the optional parameter "dryRun": Flag to run the request
  8622. // in dry-run mode.
  8623. func (c *AccountsCustombatchCall) DryRun(dryRun bool) *AccountsCustombatchCall {
  8624. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  8625. return c
  8626. }
  8627. // Fields allows partial responses to be retrieved. See
  8628. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8629. // for more information.
  8630. func (c *AccountsCustombatchCall) Fields(s ...googleapi.Field) *AccountsCustombatchCall {
  8631. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8632. return c
  8633. }
  8634. // Context sets the context to be used in this call's Do method. Any
  8635. // pending HTTP request will be aborted if the provided context is
  8636. // canceled.
  8637. func (c *AccountsCustombatchCall) Context(ctx context.Context) *AccountsCustombatchCall {
  8638. c.ctx_ = ctx
  8639. return c
  8640. }
  8641. // Header returns an http.Header that can be modified by the caller to
  8642. // add HTTP headers to the request.
  8643. func (c *AccountsCustombatchCall) Header() http.Header {
  8644. if c.header_ == nil {
  8645. c.header_ = make(http.Header)
  8646. }
  8647. return c.header_
  8648. }
  8649. func (c *AccountsCustombatchCall) doRequest(alt string) (*http.Response, error) {
  8650. reqHeaders := make(http.Header)
  8651. for k, v := range c.header_ {
  8652. reqHeaders[k] = v
  8653. }
  8654. reqHeaders.Set("User-Agent", c.s.userAgent())
  8655. var body io.Reader = nil
  8656. body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountscustombatchrequest)
  8657. if err != nil {
  8658. return nil, err
  8659. }
  8660. reqHeaders.Set("Content-Type", "application/json")
  8661. c.urlParams_.Set("alt", alt)
  8662. urls := googleapi.ResolveRelative(c.s.BasePath, "accounts/batch")
  8663. urls += "?" + c.urlParams_.Encode()
  8664. req, _ := http.NewRequest("POST", urls, body)
  8665. req.Header = reqHeaders
  8666. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8667. }
  8668. // Do executes the "content.accounts.custombatch" call.
  8669. // Exactly one of *AccountsCustomBatchResponse or error will be non-nil.
  8670. // Any non-2xx status code is an error. Response headers are in either
  8671. // *AccountsCustomBatchResponse.ServerResponse.Header or (if a response
  8672. // was returned at all) in error.(*googleapi.Error).Header. Use
  8673. // googleapi.IsNotModified to check whether the returned error was
  8674. // because http.StatusNotModified was returned.
  8675. func (c *AccountsCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountsCustomBatchResponse, error) {
  8676. gensupport.SetOptions(c.urlParams_, opts...)
  8677. res, err := c.doRequest("json")
  8678. if res != nil && res.StatusCode == http.StatusNotModified {
  8679. if res.Body != nil {
  8680. res.Body.Close()
  8681. }
  8682. return nil, &googleapi.Error{
  8683. Code: res.StatusCode,
  8684. Header: res.Header,
  8685. }
  8686. }
  8687. if err != nil {
  8688. return nil, err
  8689. }
  8690. defer googleapi.CloseBody(res)
  8691. if err := googleapi.CheckResponse(res); err != nil {
  8692. return nil, err
  8693. }
  8694. ret := &AccountsCustomBatchResponse{
  8695. ServerResponse: googleapi.ServerResponse{
  8696. Header: res.Header,
  8697. HTTPStatusCode: res.StatusCode,
  8698. },
  8699. }
  8700. target := &ret
  8701. if err := gensupport.DecodeResponse(target, res); err != nil {
  8702. return nil, err
  8703. }
  8704. return ret, nil
  8705. // {
  8706. // "description": "Retrieves, inserts, updates, and deletes multiple Merchant Center (sub-)accounts in a single request.",
  8707. // "httpMethod": "POST",
  8708. // "id": "content.accounts.custombatch",
  8709. // "parameters": {
  8710. // "dryRun": {
  8711. // "description": "Flag to run the request in dry-run mode.",
  8712. // "location": "query",
  8713. // "type": "boolean"
  8714. // }
  8715. // },
  8716. // "path": "accounts/batch",
  8717. // "request": {
  8718. // "$ref": "AccountsCustomBatchRequest"
  8719. // },
  8720. // "response": {
  8721. // "$ref": "AccountsCustomBatchResponse"
  8722. // },
  8723. // "scopes": [
  8724. // "https://www.googleapis.com/auth/content"
  8725. // ]
  8726. // }
  8727. }
  8728. // method id "content.accounts.delete":
  8729. type AccountsDeleteCall struct {
  8730. s *APIService
  8731. merchantId uint64
  8732. accountId uint64
  8733. urlParams_ gensupport.URLParams
  8734. ctx_ context.Context
  8735. header_ http.Header
  8736. }
  8737. // Delete: Deletes a Merchant Center sub-account.
  8738. func (r *AccountsService) Delete(merchantId uint64, accountId uint64) *AccountsDeleteCall {
  8739. c := &AccountsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8740. c.merchantId = merchantId
  8741. c.accountId = accountId
  8742. return c
  8743. }
  8744. // DryRun sets the optional parameter "dryRun": Flag to run the request
  8745. // in dry-run mode.
  8746. func (c *AccountsDeleteCall) DryRun(dryRun bool) *AccountsDeleteCall {
  8747. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  8748. return c
  8749. }
  8750. // Force sets the optional parameter "force": Flag to delete
  8751. // sub-accounts with products. The default value is false.
  8752. func (c *AccountsDeleteCall) Force(force bool) *AccountsDeleteCall {
  8753. c.urlParams_.Set("force", fmt.Sprint(force))
  8754. return c
  8755. }
  8756. // Fields allows partial responses to be retrieved. See
  8757. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8758. // for more information.
  8759. func (c *AccountsDeleteCall) Fields(s ...googleapi.Field) *AccountsDeleteCall {
  8760. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8761. return c
  8762. }
  8763. // Context sets the context to be used in this call's Do method. Any
  8764. // pending HTTP request will be aborted if the provided context is
  8765. // canceled.
  8766. func (c *AccountsDeleteCall) Context(ctx context.Context) *AccountsDeleteCall {
  8767. c.ctx_ = ctx
  8768. return c
  8769. }
  8770. // Header returns an http.Header that can be modified by the caller to
  8771. // add HTTP headers to the request.
  8772. func (c *AccountsDeleteCall) Header() http.Header {
  8773. if c.header_ == nil {
  8774. c.header_ = make(http.Header)
  8775. }
  8776. return c.header_
  8777. }
  8778. func (c *AccountsDeleteCall) doRequest(alt string) (*http.Response, error) {
  8779. reqHeaders := make(http.Header)
  8780. for k, v := range c.header_ {
  8781. reqHeaders[k] = v
  8782. }
  8783. reqHeaders.Set("User-Agent", c.s.userAgent())
  8784. var body io.Reader = nil
  8785. c.urlParams_.Set("alt", alt)
  8786. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}")
  8787. urls += "?" + c.urlParams_.Encode()
  8788. req, _ := http.NewRequest("DELETE", urls, body)
  8789. req.Header = reqHeaders
  8790. googleapi.Expand(req.URL, map[string]string{
  8791. "merchantId": strconv.FormatUint(c.merchantId, 10),
  8792. "accountId": strconv.FormatUint(c.accountId, 10),
  8793. })
  8794. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8795. }
  8796. // Do executes the "content.accounts.delete" call.
  8797. func (c *AccountsDeleteCall) Do(opts ...googleapi.CallOption) error {
  8798. gensupport.SetOptions(c.urlParams_, opts...)
  8799. res, err := c.doRequest("json")
  8800. if err != nil {
  8801. return err
  8802. }
  8803. defer googleapi.CloseBody(res)
  8804. if err := googleapi.CheckResponse(res); err != nil {
  8805. return err
  8806. }
  8807. return nil
  8808. // {
  8809. // "description": "Deletes a Merchant Center sub-account.",
  8810. // "httpMethod": "DELETE",
  8811. // "id": "content.accounts.delete",
  8812. // "parameterOrder": [
  8813. // "merchantId",
  8814. // "accountId"
  8815. // ],
  8816. // "parameters": {
  8817. // "accountId": {
  8818. // "description": "The ID of the account.",
  8819. // "format": "uint64",
  8820. // "location": "path",
  8821. // "required": true,
  8822. // "type": "string"
  8823. // },
  8824. // "dryRun": {
  8825. // "description": "Flag to run the request in dry-run mode.",
  8826. // "location": "query",
  8827. // "type": "boolean"
  8828. // },
  8829. // "force": {
  8830. // "default": "false",
  8831. // "description": "Flag to delete sub-accounts with products. The default value is false.",
  8832. // "location": "query",
  8833. // "type": "boolean"
  8834. // },
  8835. // "merchantId": {
  8836. // "description": "The ID of the managing account. This must be a multi-client account, and accountId must be the ID of a sub-account of this account.",
  8837. // "format": "uint64",
  8838. // "location": "path",
  8839. // "required": true,
  8840. // "type": "string"
  8841. // }
  8842. // },
  8843. // "path": "{merchantId}/accounts/{accountId}",
  8844. // "scopes": [
  8845. // "https://www.googleapis.com/auth/content"
  8846. // ]
  8847. // }
  8848. }
  8849. // method id "content.accounts.get":
  8850. type AccountsGetCall struct {
  8851. s *APIService
  8852. merchantId uint64
  8853. accountId uint64
  8854. urlParams_ gensupport.URLParams
  8855. ifNoneMatch_ string
  8856. ctx_ context.Context
  8857. header_ http.Header
  8858. }
  8859. // Get: Retrieves a Merchant Center account.
  8860. func (r *AccountsService) Get(merchantId uint64, accountId uint64) *AccountsGetCall {
  8861. c := &AccountsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  8862. c.merchantId = merchantId
  8863. c.accountId = accountId
  8864. return c
  8865. }
  8866. // Fields allows partial responses to be retrieved. See
  8867. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  8868. // for more information.
  8869. func (c *AccountsGetCall) Fields(s ...googleapi.Field) *AccountsGetCall {
  8870. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  8871. return c
  8872. }
  8873. // IfNoneMatch sets the optional parameter which makes the operation
  8874. // fail if the object's ETag matches the given value. This is useful for
  8875. // getting updates only after the object has changed since the last
  8876. // request. Use googleapi.IsNotModified to check whether the response
  8877. // error from Do is the result of In-None-Match.
  8878. func (c *AccountsGetCall) IfNoneMatch(entityTag string) *AccountsGetCall {
  8879. c.ifNoneMatch_ = entityTag
  8880. return c
  8881. }
  8882. // Context sets the context to be used in this call's Do method. Any
  8883. // pending HTTP request will be aborted if the provided context is
  8884. // canceled.
  8885. func (c *AccountsGetCall) Context(ctx context.Context) *AccountsGetCall {
  8886. c.ctx_ = ctx
  8887. return c
  8888. }
  8889. // Header returns an http.Header that can be modified by the caller to
  8890. // add HTTP headers to the request.
  8891. func (c *AccountsGetCall) Header() http.Header {
  8892. if c.header_ == nil {
  8893. c.header_ = make(http.Header)
  8894. }
  8895. return c.header_
  8896. }
  8897. func (c *AccountsGetCall) doRequest(alt string) (*http.Response, error) {
  8898. reqHeaders := make(http.Header)
  8899. for k, v := range c.header_ {
  8900. reqHeaders[k] = v
  8901. }
  8902. reqHeaders.Set("User-Agent", c.s.userAgent())
  8903. if c.ifNoneMatch_ != "" {
  8904. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  8905. }
  8906. var body io.Reader = nil
  8907. c.urlParams_.Set("alt", alt)
  8908. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}")
  8909. urls += "?" + c.urlParams_.Encode()
  8910. req, _ := http.NewRequest("GET", urls, body)
  8911. req.Header = reqHeaders
  8912. googleapi.Expand(req.URL, map[string]string{
  8913. "merchantId": strconv.FormatUint(c.merchantId, 10),
  8914. "accountId": strconv.FormatUint(c.accountId, 10),
  8915. })
  8916. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  8917. }
  8918. // Do executes the "content.accounts.get" call.
  8919. // Exactly one of *Account or error will be non-nil. Any non-2xx status
  8920. // code is an error. Response headers are in either
  8921. // *Account.ServerResponse.Header or (if a response was returned at all)
  8922. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  8923. // check whether the returned error was because http.StatusNotModified
  8924. // was returned.
  8925. func (c *AccountsGetCall) Do(opts ...googleapi.CallOption) (*Account, error) {
  8926. gensupport.SetOptions(c.urlParams_, opts...)
  8927. res, err := c.doRequest("json")
  8928. if res != nil && res.StatusCode == http.StatusNotModified {
  8929. if res.Body != nil {
  8930. res.Body.Close()
  8931. }
  8932. return nil, &googleapi.Error{
  8933. Code: res.StatusCode,
  8934. Header: res.Header,
  8935. }
  8936. }
  8937. if err != nil {
  8938. return nil, err
  8939. }
  8940. defer googleapi.CloseBody(res)
  8941. if err := googleapi.CheckResponse(res); err != nil {
  8942. return nil, err
  8943. }
  8944. ret := &Account{
  8945. ServerResponse: googleapi.ServerResponse{
  8946. Header: res.Header,
  8947. HTTPStatusCode: res.StatusCode,
  8948. },
  8949. }
  8950. target := &ret
  8951. if err := gensupport.DecodeResponse(target, res); err != nil {
  8952. return nil, err
  8953. }
  8954. return ret, nil
  8955. // {
  8956. // "description": "Retrieves a Merchant Center account.",
  8957. // "httpMethod": "GET",
  8958. // "id": "content.accounts.get",
  8959. // "parameterOrder": [
  8960. // "merchantId",
  8961. // "accountId"
  8962. // ],
  8963. // "parameters": {
  8964. // "accountId": {
  8965. // "description": "The ID of the account.",
  8966. // "format": "uint64",
  8967. // "location": "path",
  8968. // "required": true,
  8969. // "type": "string"
  8970. // },
  8971. // "merchantId": {
  8972. // "description": "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.",
  8973. // "format": "uint64",
  8974. // "location": "path",
  8975. // "required": true,
  8976. // "type": "string"
  8977. // }
  8978. // },
  8979. // "path": "{merchantId}/accounts/{accountId}",
  8980. // "response": {
  8981. // "$ref": "Account"
  8982. // },
  8983. // "scopes": [
  8984. // "https://www.googleapis.com/auth/content"
  8985. // ]
  8986. // }
  8987. }
  8988. // method id "content.accounts.insert":
  8989. type AccountsInsertCall struct {
  8990. s *APIService
  8991. merchantId uint64
  8992. account *Account
  8993. urlParams_ gensupport.URLParams
  8994. ctx_ context.Context
  8995. header_ http.Header
  8996. }
  8997. // Insert: Creates a Merchant Center sub-account.
  8998. func (r *AccountsService) Insert(merchantId uint64, account *Account) *AccountsInsertCall {
  8999. c := &AccountsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9000. c.merchantId = merchantId
  9001. c.account = account
  9002. return c
  9003. }
  9004. // DryRun sets the optional parameter "dryRun": Flag to run the request
  9005. // in dry-run mode.
  9006. func (c *AccountsInsertCall) DryRun(dryRun bool) *AccountsInsertCall {
  9007. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  9008. return c
  9009. }
  9010. // Fields allows partial responses to be retrieved. See
  9011. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9012. // for more information.
  9013. func (c *AccountsInsertCall) Fields(s ...googleapi.Field) *AccountsInsertCall {
  9014. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9015. return c
  9016. }
  9017. // Context sets the context to be used in this call's Do method. Any
  9018. // pending HTTP request will be aborted if the provided context is
  9019. // canceled.
  9020. func (c *AccountsInsertCall) Context(ctx context.Context) *AccountsInsertCall {
  9021. c.ctx_ = ctx
  9022. return c
  9023. }
  9024. // Header returns an http.Header that can be modified by the caller to
  9025. // add HTTP headers to the request.
  9026. func (c *AccountsInsertCall) Header() http.Header {
  9027. if c.header_ == nil {
  9028. c.header_ = make(http.Header)
  9029. }
  9030. return c.header_
  9031. }
  9032. func (c *AccountsInsertCall) doRequest(alt string) (*http.Response, error) {
  9033. reqHeaders := make(http.Header)
  9034. for k, v := range c.header_ {
  9035. reqHeaders[k] = v
  9036. }
  9037. reqHeaders.Set("User-Agent", c.s.userAgent())
  9038. var body io.Reader = nil
  9039. body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
  9040. if err != nil {
  9041. return nil, err
  9042. }
  9043. reqHeaders.Set("Content-Type", "application/json")
  9044. c.urlParams_.Set("alt", alt)
  9045. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts")
  9046. urls += "?" + c.urlParams_.Encode()
  9047. req, _ := http.NewRequest("POST", urls, body)
  9048. req.Header = reqHeaders
  9049. googleapi.Expand(req.URL, map[string]string{
  9050. "merchantId": strconv.FormatUint(c.merchantId, 10),
  9051. })
  9052. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9053. }
  9054. // Do executes the "content.accounts.insert" call.
  9055. // Exactly one of *Account or error will be non-nil. Any non-2xx status
  9056. // code is an error. Response headers are in either
  9057. // *Account.ServerResponse.Header or (if a response was returned at all)
  9058. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9059. // check whether the returned error was because http.StatusNotModified
  9060. // was returned.
  9061. func (c *AccountsInsertCall) Do(opts ...googleapi.CallOption) (*Account, error) {
  9062. gensupport.SetOptions(c.urlParams_, opts...)
  9063. res, err := c.doRequest("json")
  9064. if res != nil && res.StatusCode == http.StatusNotModified {
  9065. if res.Body != nil {
  9066. res.Body.Close()
  9067. }
  9068. return nil, &googleapi.Error{
  9069. Code: res.StatusCode,
  9070. Header: res.Header,
  9071. }
  9072. }
  9073. if err != nil {
  9074. return nil, err
  9075. }
  9076. defer googleapi.CloseBody(res)
  9077. if err := googleapi.CheckResponse(res); err != nil {
  9078. return nil, err
  9079. }
  9080. ret := &Account{
  9081. ServerResponse: googleapi.ServerResponse{
  9082. Header: res.Header,
  9083. HTTPStatusCode: res.StatusCode,
  9084. },
  9085. }
  9086. target := &ret
  9087. if err := gensupport.DecodeResponse(target, res); err != nil {
  9088. return nil, err
  9089. }
  9090. return ret, nil
  9091. // {
  9092. // "description": "Creates a Merchant Center sub-account.",
  9093. // "httpMethod": "POST",
  9094. // "id": "content.accounts.insert",
  9095. // "parameterOrder": [
  9096. // "merchantId"
  9097. // ],
  9098. // "parameters": {
  9099. // "dryRun": {
  9100. // "description": "Flag to run the request in dry-run mode.",
  9101. // "location": "query",
  9102. // "type": "boolean"
  9103. // },
  9104. // "merchantId": {
  9105. // "description": "The ID of the managing account. This must be a multi-client account.",
  9106. // "format": "uint64",
  9107. // "location": "path",
  9108. // "required": true,
  9109. // "type": "string"
  9110. // }
  9111. // },
  9112. // "path": "{merchantId}/accounts",
  9113. // "request": {
  9114. // "$ref": "Account"
  9115. // },
  9116. // "response": {
  9117. // "$ref": "Account"
  9118. // },
  9119. // "scopes": [
  9120. // "https://www.googleapis.com/auth/content"
  9121. // ]
  9122. // }
  9123. }
  9124. // method id "content.accounts.list":
  9125. type AccountsListCall struct {
  9126. s *APIService
  9127. merchantId uint64
  9128. urlParams_ gensupport.URLParams
  9129. ifNoneMatch_ string
  9130. ctx_ context.Context
  9131. header_ http.Header
  9132. }
  9133. // List: Lists the sub-accounts in your Merchant Center account.
  9134. func (r *AccountsService) List(merchantId uint64) *AccountsListCall {
  9135. c := &AccountsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9136. c.merchantId = merchantId
  9137. return c
  9138. }
  9139. // MaxResults sets the optional parameter "maxResults": The maximum
  9140. // number of accounts to return in the response, used for paging.
  9141. func (c *AccountsListCall) MaxResults(maxResults int64) *AccountsListCall {
  9142. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  9143. return c
  9144. }
  9145. // PageToken sets the optional parameter "pageToken": The token returned
  9146. // by the previous request.
  9147. func (c *AccountsListCall) PageToken(pageToken string) *AccountsListCall {
  9148. c.urlParams_.Set("pageToken", pageToken)
  9149. return c
  9150. }
  9151. // Fields allows partial responses to be retrieved. See
  9152. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9153. // for more information.
  9154. func (c *AccountsListCall) Fields(s ...googleapi.Field) *AccountsListCall {
  9155. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9156. return c
  9157. }
  9158. // IfNoneMatch sets the optional parameter which makes the operation
  9159. // fail if the object's ETag matches the given value. This is useful for
  9160. // getting updates only after the object has changed since the last
  9161. // request. Use googleapi.IsNotModified to check whether the response
  9162. // error from Do is the result of In-None-Match.
  9163. func (c *AccountsListCall) IfNoneMatch(entityTag string) *AccountsListCall {
  9164. c.ifNoneMatch_ = entityTag
  9165. return c
  9166. }
  9167. // Context sets the context to be used in this call's Do method. Any
  9168. // pending HTTP request will be aborted if the provided context is
  9169. // canceled.
  9170. func (c *AccountsListCall) Context(ctx context.Context) *AccountsListCall {
  9171. c.ctx_ = ctx
  9172. return c
  9173. }
  9174. // Header returns an http.Header that can be modified by the caller to
  9175. // add HTTP headers to the request.
  9176. func (c *AccountsListCall) Header() http.Header {
  9177. if c.header_ == nil {
  9178. c.header_ = make(http.Header)
  9179. }
  9180. return c.header_
  9181. }
  9182. func (c *AccountsListCall) doRequest(alt string) (*http.Response, error) {
  9183. reqHeaders := make(http.Header)
  9184. for k, v := range c.header_ {
  9185. reqHeaders[k] = v
  9186. }
  9187. reqHeaders.Set("User-Agent", c.s.userAgent())
  9188. if c.ifNoneMatch_ != "" {
  9189. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9190. }
  9191. var body io.Reader = nil
  9192. c.urlParams_.Set("alt", alt)
  9193. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts")
  9194. urls += "?" + c.urlParams_.Encode()
  9195. req, _ := http.NewRequest("GET", urls, body)
  9196. req.Header = reqHeaders
  9197. googleapi.Expand(req.URL, map[string]string{
  9198. "merchantId": strconv.FormatUint(c.merchantId, 10),
  9199. })
  9200. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9201. }
  9202. // Do executes the "content.accounts.list" call.
  9203. // Exactly one of *AccountsListResponse or error will be non-nil. Any
  9204. // non-2xx status code is an error. Response headers are in either
  9205. // *AccountsListResponse.ServerResponse.Header or (if a response was
  9206. // returned at all) in error.(*googleapi.Error).Header. Use
  9207. // googleapi.IsNotModified to check whether the returned error was
  9208. // because http.StatusNotModified was returned.
  9209. func (c *AccountsListCall) Do(opts ...googleapi.CallOption) (*AccountsListResponse, error) {
  9210. gensupport.SetOptions(c.urlParams_, opts...)
  9211. res, err := c.doRequest("json")
  9212. if res != nil && res.StatusCode == http.StatusNotModified {
  9213. if res.Body != nil {
  9214. res.Body.Close()
  9215. }
  9216. return nil, &googleapi.Error{
  9217. Code: res.StatusCode,
  9218. Header: res.Header,
  9219. }
  9220. }
  9221. if err != nil {
  9222. return nil, err
  9223. }
  9224. defer googleapi.CloseBody(res)
  9225. if err := googleapi.CheckResponse(res); err != nil {
  9226. return nil, err
  9227. }
  9228. ret := &AccountsListResponse{
  9229. ServerResponse: googleapi.ServerResponse{
  9230. Header: res.Header,
  9231. HTTPStatusCode: res.StatusCode,
  9232. },
  9233. }
  9234. target := &ret
  9235. if err := gensupport.DecodeResponse(target, res); err != nil {
  9236. return nil, err
  9237. }
  9238. return ret, nil
  9239. // {
  9240. // "description": "Lists the sub-accounts in your Merchant Center account.",
  9241. // "httpMethod": "GET",
  9242. // "id": "content.accounts.list",
  9243. // "parameterOrder": [
  9244. // "merchantId"
  9245. // ],
  9246. // "parameters": {
  9247. // "maxResults": {
  9248. // "description": "The maximum number of accounts to return in the response, used for paging.",
  9249. // "format": "uint32",
  9250. // "location": "query",
  9251. // "type": "integer"
  9252. // },
  9253. // "merchantId": {
  9254. // "description": "The ID of the managing account. This must be a multi-client account.",
  9255. // "format": "uint64",
  9256. // "location": "path",
  9257. // "required": true,
  9258. // "type": "string"
  9259. // },
  9260. // "pageToken": {
  9261. // "description": "The token returned by the previous request.",
  9262. // "location": "query",
  9263. // "type": "string"
  9264. // }
  9265. // },
  9266. // "path": "{merchantId}/accounts",
  9267. // "response": {
  9268. // "$ref": "AccountsListResponse"
  9269. // },
  9270. // "scopes": [
  9271. // "https://www.googleapis.com/auth/content"
  9272. // ]
  9273. // }
  9274. }
  9275. // Pages invokes f for each page of results.
  9276. // A non-nil error returned from f will halt the iteration.
  9277. // The provided context supersedes any context provided to the Context method.
  9278. func (c *AccountsListCall) Pages(ctx context.Context, f func(*AccountsListResponse) error) error {
  9279. c.ctx_ = ctx
  9280. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  9281. for {
  9282. x, err := c.Do()
  9283. if err != nil {
  9284. return err
  9285. }
  9286. if err := f(x); err != nil {
  9287. return err
  9288. }
  9289. if x.NextPageToken == "" {
  9290. return nil
  9291. }
  9292. c.PageToken(x.NextPageToken)
  9293. }
  9294. }
  9295. // method id "content.accounts.patch":
  9296. type AccountsPatchCall struct {
  9297. s *APIService
  9298. merchantId uint64
  9299. accountId uint64
  9300. account *Account
  9301. urlParams_ gensupport.URLParams
  9302. ctx_ context.Context
  9303. header_ http.Header
  9304. }
  9305. // Patch: Updates a Merchant Center account. This method supports patch
  9306. // semantics.
  9307. func (r *AccountsService) Patch(merchantId uint64, accountId uint64, account *Account) *AccountsPatchCall {
  9308. c := &AccountsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9309. c.merchantId = merchantId
  9310. c.accountId = accountId
  9311. c.account = account
  9312. return c
  9313. }
  9314. // DryRun sets the optional parameter "dryRun": Flag to run the request
  9315. // in dry-run mode.
  9316. func (c *AccountsPatchCall) DryRun(dryRun bool) *AccountsPatchCall {
  9317. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  9318. return c
  9319. }
  9320. // Fields allows partial responses to be retrieved. See
  9321. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9322. // for more information.
  9323. func (c *AccountsPatchCall) Fields(s ...googleapi.Field) *AccountsPatchCall {
  9324. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9325. return c
  9326. }
  9327. // Context sets the context to be used in this call's Do method. Any
  9328. // pending HTTP request will be aborted if the provided context is
  9329. // canceled.
  9330. func (c *AccountsPatchCall) Context(ctx context.Context) *AccountsPatchCall {
  9331. c.ctx_ = ctx
  9332. return c
  9333. }
  9334. // Header returns an http.Header that can be modified by the caller to
  9335. // add HTTP headers to the request.
  9336. func (c *AccountsPatchCall) Header() http.Header {
  9337. if c.header_ == nil {
  9338. c.header_ = make(http.Header)
  9339. }
  9340. return c.header_
  9341. }
  9342. func (c *AccountsPatchCall) doRequest(alt string) (*http.Response, error) {
  9343. reqHeaders := make(http.Header)
  9344. for k, v := range c.header_ {
  9345. reqHeaders[k] = v
  9346. }
  9347. reqHeaders.Set("User-Agent", c.s.userAgent())
  9348. var body io.Reader = nil
  9349. body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
  9350. if err != nil {
  9351. return nil, err
  9352. }
  9353. reqHeaders.Set("Content-Type", "application/json")
  9354. c.urlParams_.Set("alt", alt)
  9355. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}")
  9356. urls += "?" + c.urlParams_.Encode()
  9357. req, _ := http.NewRequest("PATCH", urls, body)
  9358. req.Header = reqHeaders
  9359. googleapi.Expand(req.URL, map[string]string{
  9360. "merchantId": strconv.FormatUint(c.merchantId, 10),
  9361. "accountId": strconv.FormatUint(c.accountId, 10),
  9362. })
  9363. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9364. }
  9365. // Do executes the "content.accounts.patch" call.
  9366. // Exactly one of *Account or error will be non-nil. Any non-2xx status
  9367. // code is an error. Response headers are in either
  9368. // *Account.ServerResponse.Header or (if a response was returned at all)
  9369. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9370. // check whether the returned error was because http.StatusNotModified
  9371. // was returned.
  9372. func (c *AccountsPatchCall) Do(opts ...googleapi.CallOption) (*Account, error) {
  9373. gensupport.SetOptions(c.urlParams_, opts...)
  9374. res, err := c.doRequest("json")
  9375. if res != nil && res.StatusCode == http.StatusNotModified {
  9376. if res.Body != nil {
  9377. res.Body.Close()
  9378. }
  9379. return nil, &googleapi.Error{
  9380. Code: res.StatusCode,
  9381. Header: res.Header,
  9382. }
  9383. }
  9384. if err != nil {
  9385. return nil, err
  9386. }
  9387. defer googleapi.CloseBody(res)
  9388. if err := googleapi.CheckResponse(res); err != nil {
  9389. return nil, err
  9390. }
  9391. ret := &Account{
  9392. ServerResponse: googleapi.ServerResponse{
  9393. Header: res.Header,
  9394. HTTPStatusCode: res.StatusCode,
  9395. },
  9396. }
  9397. target := &ret
  9398. if err := gensupport.DecodeResponse(target, res); err != nil {
  9399. return nil, err
  9400. }
  9401. return ret, nil
  9402. // {
  9403. // "description": "Updates a Merchant Center account. This method supports patch semantics.",
  9404. // "httpMethod": "PATCH",
  9405. // "id": "content.accounts.patch",
  9406. // "parameterOrder": [
  9407. // "merchantId",
  9408. // "accountId"
  9409. // ],
  9410. // "parameters": {
  9411. // "accountId": {
  9412. // "description": "The ID of the account.",
  9413. // "format": "uint64",
  9414. // "location": "path",
  9415. // "required": true,
  9416. // "type": "string"
  9417. // },
  9418. // "dryRun": {
  9419. // "description": "Flag to run the request in dry-run mode.",
  9420. // "location": "query",
  9421. // "type": "boolean"
  9422. // },
  9423. // "merchantId": {
  9424. // "description": "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.",
  9425. // "format": "uint64",
  9426. // "location": "path",
  9427. // "required": true,
  9428. // "type": "string"
  9429. // }
  9430. // },
  9431. // "path": "{merchantId}/accounts/{accountId}",
  9432. // "request": {
  9433. // "$ref": "Account"
  9434. // },
  9435. // "response": {
  9436. // "$ref": "Account"
  9437. // },
  9438. // "scopes": [
  9439. // "https://www.googleapis.com/auth/content"
  9440. // ]
  9441. // }
  9442. }
  9443. // method id "content.accounts.update":
  9444. type AccountsUpdateCall struct {
  9445. s *APIService
  9446. merchantId uint64
  9447. accountId uint64
  9448. account *Account
  9449. urlParams_ gensupport.URLParams
  9450. ctx_ context.Context
  9451. header_ http.Header
  9452. }
  9453. // Update: Updates a Merchant Center account.
  9454. func (r *AccountsService) Update(merchantId uint64, accountId uint64, account *Account) *AccountsUpdateCall {
  9455. c := &AccountsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9456. c.merchantId = merchantId
  9457. c.accountId = accountId
  9458. c.account = account
  9459. return c
  9460. }
  9461. // DryRun sets the optional parameter "dryRun": Flag to run the request
  9462. // in dry-run mode.
  9463. func (c *AccountsUpdateCall) DryRun(dryRun bool) *AccountsUpdateCall {
  9464. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  9465. return c
  9466. }
  9467. // Fields allows partial responses to be retrieved. See
  9468. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9469. // for more information.
  9470. func (c *AccountsUpdateCall) Fields(s ...googleapi.Field) *AccountsUpdateCall {
  9471. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9472. return c
  9473. }
  9474. // Context sets the context to be used in this call's Do method. Any
  9475. // pending HTTP request will be aborted if the provided context is
  9476. // canceled.
  9477. func (c *AccountsUpdateCall) Context(ctx context.Context) *AccountsUpdateCall {
  9478. c.ctx_ = ctx
  9479. return c
  9480. }
  9481. // Header returns an http.Header that can be modified by the caller to
  9482. // add HTTP headers to the request.
  9483. func (c *AccountsUpdateCall) Header() http.Header {
  9484. if c.header_ == nil {
  9485. c.header_ = make(http.Header)
  9486. }
  9487. return c.header_
  9488. }
  9489. func (c *AccountsUpdateCall) doRequest(alt string) (*http.Response, error) {
  9490. reqHeaders := make(http.Header)
  9491. for k, v := range c.header_ {
  9492. reqHeaders[k] = v
  9493. }
  9494. reqHeaders.Set("User-Agent", c.s.userAgent())
  9495. var body io.Reader = nil
  9496. body, err := googleapi.WithoutDataWrapper.JSONReader(c.account)
  9497. if err != nil {
  9498. return nil, err
  9499. }
  9500. reqHeaders.Set("Content-Type", "application/json")
  9501. c.urlParams_.Set("alt", alt)
  9502. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounts/{accountId}")
  9503. urls += "?" + c.urlParams_.Encode()
  9504. req, _ := http.NewRequest("PUT", urls, body)
  9505. req.Header = reqHeaders
  9506. googleapi.Expand(req.URL, map[string]string{
  9507. "merchantId": strconv.FormatUint(c.merchantId, 10),
  9508. "accountId": strconv.FormatUint(c.accountId, 10),
  9509. })
  9510. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9511. }
  9512. // Do executes the "content.accounts.update" call.
  9513. // Exactly one of *Account or error will be non-nil. Any non-2xx status
  9514. // code is an error. Response headers are in either
  9515. // *Account.ServerResponse.Header or (if a response was returned at all)
  9516. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  9517. // check whether the returned error was because http.StatusNotModified
  9518. // was returned.
  9519. func (c *AccountsUpdateCall) Do(opts ...googleapi.CallOption) (*Account, error) {
  9520. gensupport.SetOptions(c.urlParams_, opts...)
  9521. res, err := c.doRequest("json")
  9522. if res != nil && res.StatusCode == http.StatusNotModified {
  9523. if res.Body != nil {
  9524. res.Body.Close()
  9525. }
  9526. return nil, &googleapi.Error{
  9527. Code: res.StatusCode,
  9528. Header: res.Header,
  9529. }
  9530. }
  9531. if err != nil {
  9532. return nil, err
  9533. }
  9534. defer googleapi.CloseBody(res)
  9535. if err := googleapi.CheckResponse(res); err != nil {
  9536. return nil, err
  9537. }
  9538. ret := &Account{
  9539. ServerResponse: googleapi.ServerResponse{
  9540. Header: res.Header,
  9541. HTTPStatusCode: res.StatusCode,
  9542. },
  9543. }
  9544. target := &ret
  9545. if err := gensupport.DecodeResponse(target, res); err != nil {
  9546. return nil, err
  9547. }
  9548. return ret, nil
  9549. // {
  9550. // "description": "Updates a Merchant Center account.",
  9551. // "httpMethod": "PUT",
  9552. // "id": "content.accounts.update",
  9553. // "parameterOrder": [
  9554. // "merchantId",
  9555. // "accountId"
  9556. // ],
  9557. // "parameters": {
  9558. // "accountId": {
  9559. // "description": "The ID of the account.",
  9560. // "format": "uint64",
  9561. // "location": "path",
  9562. // "required": true,
  9563. // "type": "string"
  9564. // },
  9565. // "dryRun": {
  9566. // "description": "Flag to run the request in dry-run mode.",
  9567. // "location": "query",
  9568. // "type": "boolean"
  9569. // },
  9570. // "merchantId": {
  9571. // "description": "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.",
  9572. // "format": "uint64",
  9573. // "location": "path",
  9574. // "required": true,
  9575. // "type": "string"
  9576. // }
  9577. // },
  9578. // "path": "{merchantId}/accounts/{accountId}",
  9579. // "request": {
  9580. // "$ref": "Account"
  9581. // },
  9582. // "response": {
  9583. // "$ref": "Account"
  9584. // },
  9585. // "scopes": [
  9586. // "https://www.googleapis.com/auth/content"
  9587. // ]
  9588. // }
  9589. }
  9590. // method id "content.accountstatuses.custombatch":
  9591. type AccountstatusesCustombatchCall struct {
  9592. s *APIService
  9593. accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest
  9594. urlParams_ gensupport.URLParams
  9595. ctx_ context.Context
  9596. header_ http.Header
  9597. }
  9598. // Custombatch:
  9599. func (r *AccountstatusesService) Custombatch(accountstatusescustombatchrequest *AccountstatusesCustomBatchRequest) *AccountstatusesCustombatchCall {
  9600. c := &AccountstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9601. c.accountstatusescustombatchrequest = accountstatusescustombatchrequest
  9602. return c
  9603. }
  9604. // Fields allows partial responses to be retrieved. See
  9605. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9606. // for more information.
  9607. func (c *AccountstatusesCustombatchCall) Fields(s ...googleapi.Field) *AccountstatusesCustombatchCall {
  9608. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9609. return c
  9610. }
  9611. // Context sets the context to be used in this call's Do method. Any
  9612. // pending HTTP request will be aborted if the provided context is
  9613. // canceled.
  9614. func (c *AccountstatusesCustombatchCall) Context(ctx context.Context) *AccountstatusesCustombatchCall {
  9615. c.ctx_ = ctx
  9616. return c
  9617. }
  9618. // Header returns an http.Header that can be modified by the caller to
  9619. // add HTTP headers to the request.
  9620. func (c *AccountstatusesCustombatchCall) Header() http.Header {
  9621. if c.header_ == nil {
  9622. c.header_ = make(http.Header)
  9623. }
  9624. return c.header_
  9625. }
  9626. func (c *AccountstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) {
  9627. reqHeaders := make(http.Header)
  9628. for k, v := range c.header_ {
  9629. reqHeaders[k] = v
  9630. }
  9631. reqHeaders.Set("User-Agent", c.s.userAgent())
  9632. var body io.Reader = nil
  9633. body, err := googleapi.WithoutDataWrapper.JSONReader(c.accountstatusescustombatchrequest)
  9634. if err != nil {
  9635. return nil, err
  9636. }
  9637. reqHeaders.Set("Content-Type", "application/json")
  9638. c.urlParams_.Set("alt", alt)
  9639. urls := googleapi.ResolveRelative(c.s.BasePath, "accountstatuses/batch")
  9640. urls += "?" + c.urlParams_.Encode()
  9641. req, _ := http.NewRequest("POST", urls, body)
  9642. req.Header = reqHeaders
  9643. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9644. }
  9645. // Do executes the "content.accountstatuses.custombatch" call.
  9646. // Exactly one of *AccountstatusesCustomBatchResponse or error will be
  9647. // non-nil. Any non-2xx status code is an error. Response headers are in
  9648. // either *AccountstatusesCustomBatchResponse.ServerResponse.Header or
  9649. // (if a response was returned at all) in
  9650. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  9651. // whether the returned error was because http.StatusNotModified was
  9652. // returned.
  9653. func (c *AccountstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*AccountstatusesCustomBatchResponse, error) {
  9654. gensupport.SetOptions(c.urlParams_, opts...)
  9655. res, err := c.doRequest("json")
  9656. if res != nil && res.StatusCode == http.StatusNotModified {
  9657. if res.Body != nil {
  9658. res.Body.Close()
  9659. }
  9660. return nil, &googleapi.Error{
  9661. Code: res.StatusCode,
  9662. Header: res.Header,
  9663. }
  9664. }
  9665. if err != nil {
  9666. return nil, err
  9667. }
  9668. defer googleapi.CloseBody(res)
  9669. if err := googleapi.CheckResponse(res); err != nil {
  9670. return nil, err
  9671. }
  9672. ret := &AccountstatusesCustomBatchResponse{
  9673. ServerResponse: googleapi.ServerResponse{
  9674. Header: res.Header,
  9675. HTTPStatusCode: res.StatusCode,
  9676. },
  9677. }
  9678. target := &ret
  9679. if err := gensupport.DecodeResponse(target, res); err != nil {
  9680. return nil, err
  9681. }
  9682. return ret, nil
  9683. // {
  9684. // "httpMethod": "POST",
  9685. // "id": "content.accountstatuses.custombatch",
  9686. // "path": "accountstatuses/batch",
  9687. // "request": {
  9688. // "$ref": "AccountstatusesCustomBatchRequest"
  9689. // },
  9690. // "response": {
  9691. // "$ref": "AccountstatusesCustomBatchResponse"
  9692. // },
  9693. // "scopes": [
  9694. // "https://www.googleapis.com/auth/content"
  9695. // ]
  9696. // }
  9697. }
  9698. // method id "content.accountstatuses.get":
  9699. type AccountstatusesGetCall struct {
  9700. s *APIService
  9701. merchantId uint64
  9702. accountId uint64
  9703. urlParams_ gensupport.URLParams
  9704. ifNoneMatch_ string
  9705. ctx_ context.Context
  9706. header_ http.Header
  9707. }
  9708. // Get: Retrieves the status of a Merchant Center account. Multi-client
  9709. // accounts can only call this method for sub-accounts.
  9710. func (r *AccountstatusesService) Get(merchantId uint64, accountId uint64) *AccountstatusesGetCall {
  9711. c := &AccountstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9712. c.merchantId = merchantId
  9713. c.accountId = accountId
  9714. return c
  9715. }
  9716. // Destinations sets the optional parameter "destinations": If set, only
  9717. // issues for the specified destinations are returned, otherwise only
  9718. // issues for the Shopping destination.
  9719. func (c *AccountstatusesGetCall) Destinations(destinations ...string) *AccountstatusesGetCall {
  9720. c.urlParams_.SetMulti("destinations", append([]string{}, destinations...))
  9721. return c
  9722. }
  9723. // Fields allows partial responses to be retrieved. See
  9724. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9725. // for more information.
  9726. func (c *AccountstatusesGetCall) Fields(s ...googleapi.Field) *AccountstatusesGetCall {
  9727. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9728. return c
  9729. }
  9730. // IfNoneMatch sets the optional parameter which makes the operation
  9731. // fail if the object's ETag matches the given value. This is useful for
  9732. // getting updates only after the object has changed since the last
  9733. // request. Use googleapi.IsNotModified to check whether the response
  9734. // error from Do is the result of In-None-Match.
  9735. func (c *AccountstatusesGetCall) IfNoneMatch(entityTag string) *AccountstatusesGetCall {
  9736. c.ifNoneMatch_ = entityTag
  9737. return c
  9738. }
  9739. // Context sets the context to be used in this call's Do method. Any
  9740. // pending HTTP request will be aborted if the provided context is
  9741. // canceled.
  9742. func (c *AccountstatusesGetCall) Context(ctx context.Context) *AccountstatusesGetCall {
  9743. c.ctx_ = ctx
  9744. return c
  9745. }
  9746. // Header returns an http.Header that can be modified by the caller to
  9747. // add HTTP headers to the request.
  9748. func (c *AccountstatusesGetCall) Header() http.Header {
  9749. if c.header_ == nil {
  9750. c.header_ = make(http.Header)
  9751. }
  9752. return c.header_
  9753. }
  9754. func (c *AccountstatusesGetCall) doRequest(alt string) (*http.Response, error) {
  9755. reqHeaders := make(http.Header)
  9756. for k, v := range c.header_ {
  9757. reqHeaders[k] = v
  9758. }
  9759. reqHeaders.Set("User-Agent", c.s.userAgent())
  9760. if c.ifNoneMatch_ != "" {
  9761. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9762. }
  9763. var body io.Reader = nil
  9764. c.urlParams_.Set("alt", alt)
  9765. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses/{accountId}")
  9766. urls += "?" + c.urlParams_.Encode()
  9767. req, _ := http.NewRequest("GET", urls, body)
  9768. req.Header = reqHeaders
  9769. googleapi.Expand(req.URL, map[string]string{
  9770. "merchantId": strconv.FormatUint(c.merchantId, 10),
  9771. "accountId": strconv.FormatUint(c.accountId, 10),
  9772. })
  9773. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9774. }
  9775. // Do executes the "content.accountstatuses.get" call.
  9776. // Exactly one of *AccountStatus or error will be non-nil. Any non-2xx
  9777. // status code is an error. Response headers are in either
  9778. // *AccountStatus.ServerResponse.Header or (if a response was returned
  9779. // at all) in error.(*googleapi.Error).Header. Use
  9780. // googleapi.IsNotModified to check whether the returned error was
  9781. // because http.StatusNotModified was returned.
  9782. func (c *AccountstatusesGetCall) Do(opts ...googleapi.CallOption) (*AccountStatus, error) {
  9783. gensupport.SetOptions(c.urlParams_, opts...)
  9784. res, err := c.doRequest("json")
  9785. if res != nil && res.StatusCode == http.StatusNotModified {
  9786. if res.Body != nil {
  9787. res.Body.Close()
  9788. }
  9789. return nil, &googleapi.Error{
  9790. Code: res.StatusCode,
  9791. Header: res.Header,
  9792. }
  9793. }
  9794. if err != nil {
  9795. return nil, err
  9796. }
  9797. defer googleapi.CloseBody(res)
  9798. if err := googleapi.CheckResponse(res); err != nil {
  9799. return nil, err
  9800. }
  9801. ret := &AccountStatus{
  9802. ServerResponse: googleapi.ServerResponse{
  9803. Header: res.Header,
  9804. HTTPStatusCode: res.StatusCode,
  9805. },
  9806. }
  9807. target := &ret
  9808. if err := gensupport.DecodeResponse(target, res); err != nil {
  9809. return nil, err
  9810. }
  9811. return ret, nil
  9812. // {
  9813. // "description": "Retrieves the status of a Merchant Center account. Multi-client accounts can only call this method for sub-accounts.",
  9814. // "httpMethod": "GET",
  9815. // "id": "content.accountstatuses.get",
  9816. // "parameterOrder": [
  9817. // "merchantId",
  9818. // "accountId"
  9819. // ],
  9820. // "parameters": {
  9821. // "accountId": {
  9822. // "description": "The ID of the account.",
  9823. // "format": "uint64",
  9824. // "location": "path",
  9825. // "required": true,
  9826. // "type": "string"
  9827. // },
  9828. // "destinations": {
  9829. // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
  9830. // "location": "query",
  9831. // "repeated": true,
  9832. // "type": "string"
  9833. // },
  9834. // "merchantId": {
  9835. // "description": "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.",
  9836. // "format": "uint64",
  9837. // "location": "path",
  9838. // "required": true,
  9839. // "type": "string"
  9840. // }
  9841. // },
  9842. // "path": "{merchantId}/accountstatuses/{accountId}",
  9843. // "response": {
  9844. // "$ref": "AccountStatus"
  9845. // },
  9846. // "scopes": [
  9847. // "https://www.googleapis.com/auth/content"
  9848. // ]
  9849. // }
  9850. }
  9851. // method id "content.accountstatuses.list":
  9852. type AccountstatusesListCall struct {
  9853. s *APIService
  9854. merchantId uint64
  9855. urlParams_ gensupport.URLParams
  9856. ifNoneMatch_ string
  9857. ctx_ context.Context
  9858. header_ http.Header
  9859. }
  9860. // List: Lists the statuses of the sub-accounts in your Merchant Center
  9861. // account.
  9862. func (r *AccountstatusesService) List(merchantId uint64) *AccountstatusesListCall {
  9863. c := &AccountstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  9864. c.merchantId = merchantId
  9865. return c
  9866. }
  9867. // Destinations sets the optional parameter "destinations": If set, only
  9868. // issues for the specified destinations are returned, otherwise only
  9869. // issues for the Shopping destination.
  9870. func (c *AccountstatusesListCall) Destinations(destinations ...string) *AccountstatusesListCall {
  9871. c.urlParams_.SetMulti("destinations", append([]string{}, destinations...))
  9872. return c
  9873. }
  9874. // MaxResults sets the optional parameter "maxResults": The maximum
  9875. // number of account statuses to return in the response, used for
  9876. // paging.
  9877. func (c *AccountstatusesListCall) MaxResults(maxResults int64) *AccountstatusesListCall {
  9878. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  9879. return c
  9880. }
  9881. // PageToken sets the optional parameter "pageToken": The token returned
  9882. // by the previous request.
  9883. func (c *AccountstatusesListCall) PageToken(pageToken string) *AccountstatusesListCall {
  9884. c.urlParams_.Set("pageToken", pageToken)
  9885. return c
  9886. }
  9887. // Fields allows partial responses to be retrieved. See
  9888. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  9889. // for more information.
  9890. func (c *AccountstatusesListCall) Fields(s ...googleapi.Field) *AccountstatusesListCall {
  9891. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  9892. return c
  9893. }
  9894. // IfNoneMatch sets the optional parameter which makes the operation
  9895. // fail if the object's ETag matches the given value. This is useful for
  9896. // getting updates only after the object has changed since the last
  9897. // request. Use googleapi.IsNotModified to check whether the response
  9898. // error from Do is the result of In-None-Match.
  9899. func (c *AccountstatusesListCall) IfNoneMatch(entityTag string) *AccountstatusesListCall {
  9900. c.ifNoneMatch_ = entityTag
  9901. return c
  9902. }
  9903. // Context sets the context to be used in this call's Do method. Any
  9904. // pending HTTP request will be aborted if the provided context is
  9905. // canceled.
  9906. func (c *AccountstatusesListCall) Context(ctx context.Context) *AccountstatusesListCall {
  9907. c.ctx_ = ctx
  9908. return c
  9909. }
  9910. // Header returns an http.Header that can be modified by the caller to
  9911. // add HTTP headers to the request.
  9912. func (c *AccountstatusesListCall) Header() http.Header {
  9913. if c.header_ == nil {
  9914. c.header_ = make(http.Header)
  9915. }
  9916. return c.header_
  9917. }
  9918. func (c *AccountstatusesListCall) doRequest(alt string) (*http.Response, error) {
  9919. reqHeaders := make(http.Header)
  9920. for k, v := range c.header_ {
  9921. reqHeaders[k] = v
  9922. }
  9923. reqHeaders.Set("User-Agent", c.s.userAgent())
  9924. if c.ifNoneMatch_ != "" {
  9925. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  9926. }
  9927. var body io.Reader = nil
  9928. c.urlParams_.Set("alt", alt)
  9929. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accountstatuses")
  9930. urls += "?" + c.urlParams_.Encode()
  9931. req, _ := http.NewRequest("GET", urls, body)
  9932. req.Header = reqHeaders
  9933. googleapi.Expand(req.URL, map[string]string{
  9934. "merchantId": strconv.FormatUint(c.merchantId, 10),
  9935. })
  9936. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  9937. }
  9938. // Do executes the "content.accountstatuses.list" call.
  9939. // Exactly one of *AccountstatusesListResponse or error will be non-nil.
  9940. // Any non-2xx status code is an error. Response headers are in either
  9941. // *AccountstatusesListResponse.ServerResponse.Header or (if a response
  9942. // was returned at all) in error.(*googleapi.Error).Header. Use
  9943. // googleapi.IsNotModified to check whether the returned error was
  9944. // because http.StatusNotModified was returned.
  9945. func (c *AccountstatusesListCall) Do(opts ...googleapi.CallOption) (*AccountstatusesListResponse, error) {
  9946. gensupport.SetOptions(c.urlParams_, opts...)
  9947. res, err := c.doRequest("json")
  9948. if res != nil && res.StatusCode == http.StatusNotModified {
  9949. if res.Body != nil {
  9950. res.Body.Close()
  9951. }
  9952. return nil, &googleapi.Error{
  9953. Code: res.StatusCode,
  9954. Header: res.Header,
  9955. }
  9956. }
  9957. if err != nil {
  9958. return nil, err
  9959. }
  9960. defer googleapi.CloseBody(res)
  9961. if err := googleapi.CheckResponse(res); err != nil {
  9962. return nil, err
  9963. }
  9964. ret := &AccountstatusesListResponse{
  9965. ServerResponse: googleapi.ServerResponse{
  9966. Header: res.Header,
  9967. HTTPStatusCode: res.StatusCode,
  9968. },
  9969. }
  9970. target := &ret
  9971. if err := gensupport.DecodeResponse(target, res); err != nil {
  9972. return nil, err
  9973. }
  9974. return ret, nil
  9975. // {
  9976. // "description": "Lists the statuses of the sub-accounts in your Merchant Center account.",
  9977. // "httpMethod": "GET",
  9978. // "id": "content.accountstatuses.list",
  9979. // "parameterOrder": [
  9980. // "merchantId"
  9981. // ],
  9982. // "parameters": {
  9983. // "destinations": {
  9984. // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
  9985. // "location": "query",
  9986. // "repeated": true,
  9987. // "type": "string"
  9988. // },
  9989. // "maxResults": {
  9990. // "description": "The maximum number of account statuses to return in the response, used for paging.",
  9991. // "format": "uint32",
  9992. // "location": "query",
  9993. // "type": "integer"
  9994. // },
  9995. // "merchantId": {
  9996. // "description": "The ID of the managing account. This must be a multi-client account.",
  9997. // "format": "uint64",
  9998. // "location": "path",
  9999. // "required": true,
  10000. // "type": "string"
  10001. // },
  10002. // "pageToken": {
  10003. // "description": "The token returned by the previous request.",
  10004. // "location": "query",
  10005. // "type": "string"
  10006. // }
  10007. // },
  10008. // "path": "{merchantId}/accountstatuses",
  10009. // "response": {
  10010. // "$ref": "AccountstatusesListResponse"
  10011. // },
  10012. // "scopes": [
  10013. // "https://www.googleapis.com/auth/content"
  10014. // ]
  10015. // }
  10016. }
  10017. // Pages invokes f for each page of results.
  10018. // A non-nil error returned from f will halt the iteration.
  10019. // The provided context supersedes any context provided to the Context method.
  10020. func (c *AccountstatusesListCall) Pages(ctx context.Context, f func(*AccountstatusesListResponse) error) error {
  10021. c.ctx_ = ctx
  10022. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  10023. for {
  10024. x, err := c.Do()
  10025. if err != nil {
  10026. return err
  10027. }
  10028. if err := f(x); err != nil {
  10029. return err
  10030. }
  10031. if x.NextPageToken == "" {
  10032. return nil
  10033. }
  10034. c.PageToken(x.NextPageToken)
  10035. }
  10036. }
  10037. // method id "content.accounttax.custombatch":
  10038. type AccounttaxCustombatchCall struct {
  10039. s *APIService
  10040. accounttaxcustombatchrequest *AccounttaxCustomBatchRequest
  10041. urlParams_ gensupport.URLParams
  10042. ctx_ context.Context
  10043. header_ http.Header
  10044. }
  10045. // Custombatch: Retrieves and updates tax settings of multiple accounts
  10046. // in a single request.
  10047. func (r *AccounttaxService) Custombatch(accounttaxcustombatchrequest *AccounttaxCustomBatchRequest) *AccounttaxCustombatchCall {
  10048. c := &AccounttaxCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10049. c.accounttaxcustombatchrequest = accounttaxcustombatchrequest
  10050. return c
  10051. }
  10052. // DryRun sets the optional parameter "dryRun": Flag to run the request
  10053. // in dry-run mode.
  10054. func (c *AccounttaxCustombatchCall) DryRun(dryRun bool) *AccounttaxCustombatchCall {
  10055. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  10056. return c
  10057. }
  10058. // Fields allows partial responses to be retrieved. See
  10059. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10060. // for more information.
  10061. func (c *AccounttaxCustombatchCall) Fields(s ...googleapi.Field) *AccounttaxCustombatchCall {
  10062. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10063. return c
  10064. }
  10065. // Context sets the context to be used in this call's Do method. Any
  10066. // pending HTTP request will be aborted if the provided context is
  10067. // canceled.
  10068. func (c *AccounttaxCustombatchCall) Context(ctx context.Context) *AccounttaxCustombatchCall {
  10069. c.ctx_ = ctx
  10070. return c
  10071. }
  10072. // Header returns an http.Header that can be modified by the caller to
  10073. // add HTTP headers to the request.
  10074. func (c *AccounttaxCustombatchCall) Header() http.Header {
  10075. if c.header_ == nil {
  10076. c.header_ = make(http.Header)
  10077. }
  10078. return c.header_
  10079. }
  10080. func (c *AccounttaxCustombatchCall) doRequest(alt string) (*http.Response, error) {
  10081. reqHeaders := make(http.Header)
  10082. for k, v := range c.header_ {
  10083. reqHeaders[k] = v
  10084. }
  10085. reqHeaders.Set("User-Agent", c.s.userAgent())
  10086. var body io.Reader = nil
  10087. body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttaxcustombatchrequest)
  10088. if err != nil {
  10089. return nil, err
  10090. }
  10091. reqHeaders.Set("Content-Type", "application/json")
  10092. c.urlParams_.Set("alt", alt)
  10093. urls := googleapi.ResolveRelative(c.s.BasePath, "accounttax/batch")
  10094. urls += "?" + c.urlParams_.Encode()
  10095. req, _ := http.NewRequest("POST", urls, body)
  10096. req.Header = reqHeaders
  10097. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10098. }
  10099. // Do executes the "content.accounttax.custombatch" call.
  10100. // Exactly one of *AccounttaxCustomBatchResponse or error will be
  10101. // non-nil. Any non-2xx status code is an error. Response headers are in
  10102. // either *AccounttaxCustomBatchResponse.ServerResponse.Header or (if a
  10103. // response was returned at all) in error.(*googleapi.Error).Header. Use
  10104. // googleapi.IsNotModified to check whether the returned error was
  10105. // because http.StatusNotModified was returned.
  10106. func (c *AccounttaxCustombatchCall) Do(opts ...googleapi.CallOption) (*AccounttaxCustomBatchResponse, error) {
  10107. gensupport.SetOptions(c.urlParams_, opts...)
  10108. res, err := c.doRequest("json")
  10109. if res != nil && res.StatusCode == http.StatusNotModified {
  10110. if res.Body != nil {
  10111. res.Body.Close()
  10112. }
  10113. return nil, &googleapi.Error{
  10114. Code: res.StatusCode,
  10115. Header: res.Header,
  10116. }
  10117. }
  10118. if err != nil {
  10119. return nil, err
  10120. }
  10121. defer googleapi.CloseBody(res)
  10122. if err := googleapi.CheckResponse(res); err != nil {
  10123. return nil, err
  10124. }
  10125. ret := &AccounttaxCustomBatchResponse{
  10126. ServerResponse: googleapi.ServerResponse{
  10127. Header: res.Header,
  10128. HTTPStatusCode: res.StatusCode,
  10129. },
  10130. }
  10131. target := &ret
  10132. if err := gensupport.DecodeResponse(target, res); err != nil {
  10133. return nil, err
  10134. }
  10135. return ret, nil
  10136. // {
  10137. // "description": "Retrieves and updates tax settings of multiple accounts in a single request.",
  10138. // "httpMethod": "POST",
  10139. // "id": "content.accounttax.custombatch",
  10140. // "parameters": {
  10141. // "dryRun": {
  10142. // "description": "Flag to run the request in dry-run mode.",
  10143. // "location": "query",
  10144. // "type": "boolean"
  10145. // }
  10146. // },
  10147. // "path": "accounttax/batch",
  10148. // "request": {
  10149. // "$ref": "AccounttaxCustomBatchRequest"
  10150. // },
  10151. // "response": {
  10152. // "$ref": "AccounttaxCustomBatchResponse"
  10153. // },
  10154. // "scopes": [
  10155. // "https://www.googleapis.com/auth/content"
  10156. // ]
  10157. // }
  10158. }
  10159. // method id "content.accounttax.get":
  10160. type AccounttaxGetCall struct {
  10161. s *APIService
  10162. merchantId uint64
  10163. accountId uint64
  10164. urlParams_ gensupport.URLParams
  10165. ifNoneMatch_ string
  10166. ctx_ context.Context
  10167. header_ http.Header
  10168. }
  10169. // Get: Retrieves the tax settings of the account.
  10170. func (r *AccounttaxService) Get(merchantId uint64, accountId uint64) *AccounttaxGetCall {
  10171. c := &AccounttaxGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10172. c.merchantId = merchantId
  10173. c.accountId = accountId
  10174. return c
  10175. }
  10176. // Fields allows partial responses to be retrieved. See
  10177. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10178. // for more information.
  10179. func (c *AccounttaxGetCall) Fields(s ...googleapi.Field) *AccounttaxGetCall {
  10180. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10181. return c
  10182. }
  10183. // IfNoneMatch sets the optional parameter which makes the operation
  10184. // fail if the object's ETag matches the given value. This is useful for
  10185. // getting updates only after the object has changed since the last
  10186. // request. Use googleapi.IsNotModified to check whether the response
  10187. // error from Do is the result of In-None-Match.
  10188. func (c *AccounttaxGetCall) IfNoneMatch(entityTag string) *AccounttaxGetCall {
  10189. c.ifNoneMatch_ = entityTag
  10190. return c
  10191. }
  10192. // Context sets the context to be used in this call's Do method. Any
  10193. // pending HTTP request will be aborted if the provided context is
  10194. // canceled.
  10195. func (c *AccounttaxGetCall) Context(ctx context.Context) *AccounttaxGetCall {
  10196. c.ctx_ = ctx
  10197. return c
  10198. }
  10199. // Header returns an http.Header that can be modified by the caller to
  10200. // add HTTP headers to the request.
  10201. func (c *AccounttaxGetCall) Header() http.Header {
  10202. if c.header_ == nil {
  10203. c.header_ = make(http.Header)
  10204. }
  10205. return c.header_
  10206. }
  10207. func (c *AccounttaxGetCall) doRequest(alt string) (*http.Response, error) {
  10208. reqHeaders := make(http.Header)
  10209. for k, v := range c.header_ {
  10210. reqHeaders[k] = v
  10211. }
  10212. reqHeaders.Set("User-Agent", c.s.userAgent())
  10213. if c.ifNoneMatch_ != "" {
  10214. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10215. }
  10216. var body io.Reader = nil
  10217. c.urlParams_.Set("alt", alt)
  10218. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}")
  10219. urls += "?" + c.urlParams_.Encode()
  10220. req, _ := http.NewRequest("GET", urls, body)
  10221. req.Header = reqHeaders
  10222. googleapi.Expand(req.URL, map[string]string{
  10223. "merchantId": strconv.FormatUint(c.merchantId, 10),
  10224. "accountId": strconv.FormatUint(c.accountId, 10),
  10225. })
  10226. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10227. }
  10228. // Do executes the "content.accounttax.get" call.
  10229. // Exactly one of *AccountTax or error will be non-nil. Any non-2xx
  10230. // status code is an error. Response headers are in either
  10231. // *AccountTax.ServerResponse.Header or (if a response was returned at
  10232. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10233. // to check whether the returned error was because
  10234. // http.StatusNotModified was returned.
  10235. func (c *AccounttaxGetCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) {
  10236. gensupport.SetOptions(c.urlParams_, opts...)
  10237. res, err := c.doRequest("json")
  10238. if res != nil && res.StatusCode == http.StatusNotModified {
  10239. if res.Body != nil {
  10240. res.Body.Close()
  10241. }
  10242. return nil, &googleapi.Error{
  10243. Code: res.StatusCode,
  10244. Header: res.Header,
  10245. }
  10246. }
  10247. if err != nil {
  10248. return nil, err
  10249. }
  10250. defer googleapi.CloseBody(res)
  10251. if err := googleapi.CheckResponse(res); err != nil {
  10252. return nil, err
  10253. }
  10254. ret := &AccountTax{
  10255. ServerResponse: googleapi.ServerResponse{
  10256. Header: res.Header,
  10257. HTTPStatusCode: res.StatusCode,
  10258. },
  10259. }
  10260. target := &ret
  10261. if err := gensupport.DecodeResponse(target, res); err != nil {
  10262. return nil, err
  10263. }
  10264. return ret, nil
  10265. // {
  10266. // "description": "Retrieves the tax settings of the account.",
  10267. // "httpMethod": "GET",
  10268. // "id": "content.accounttax.get",
  10269. // "parameterOrder": [
  10270. // "merchantId",
  10271. // "accountId"
  10272. // ],
  10273. // "parameters": {
  10274. // "accountId": {
  10275. // "description": "The ID of the account for which to get/update account tax settings.",
  10276. // "format": "uint64",
  10277. // "location": "path",
  10278. // "required": true,
  10279. // "type": "string"
  10280. // },
  10281. // "merchantId": {
  10282. // "description": "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.",
  10283. // "format": "uint64",
  10284. // "location": "path",
  10285. // "required": true,
  10286. // "type": "string"
  10287. // }
  10288. // },
  10289. // "path": "{merchantId}/accounttax/{accountId}",
  10290. // "response": {
  10291. // "$ref": "AccountTax"
  10292. // },
  10293. // "scopes": [
  10294. // "https://www.googleapis.com/auth/content"
  10295. // ]
  10296. // }
  10297. }
  10298. // method id "content.accounttax.list":
  10299. type AccounttaxListCall struct {
  10300. s *APIService
  10301. merchantId uint64
  10302. urlParams_ gensupport.URLParams
  10303. ifNoneMatch_ string
  10304. ctx_ context.Context
  10305. header_ http.Header
  10306. }
  10307. // List: Lists the tax settings of the sub-accounts in your Merchant
  10308. // Center account.
  10309. func (r *AccounttaxService) List(merchantId uint64) *AccounttaxListCall {
  10310. c := &AccounttaxListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10311. c.merchantId = merchantId
  10312. return c
  10313. }
  10314. // MaxResults sets the optional parameter "maxResults": The maximum
  10315. // number of tax settings to return in the response, used for paging.
  10316. func (c *AccounttaxListCall) MaxResults(maxResults int64) *AccounttaxListCall {
  10317. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  10318. return c
  10319. }
  10320. // PageToken sets the optional parameter "pageToken": The token returned
  10321. // by the previous request.
  10322. func (c *AccounttaxListCall) PageToken(pageToken string) *AccounttaxListCall {
  10323. c.urlParams_.Set("pageToken", pageToken)
  10324. return c
  10325. }
  10326. // Fields allows partial responses to be retrieved. See
  10327. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10328. // for more information.
  10329. func (c *AccounttaxListCall) Fields(s ...googleapi.Field) *AccounttaxListCall {
  10330. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10331. return c
  10332. }
  10333. // IfNoneMatch sets the optional parameter which makes the operation
  10334. // fail if the object's ETag matches the given value. This is useful for
  10335. // getting updates only after the object has changed since the last
  10336. // request. Use googleapi.IsNotModified to check whether the response
  10337. // error from Do is the result of In-None-Match.
  10338. func (c *AccounttaxListCall) IfNoneMatch(entityTag string) *AccounttaxListCall {
  10339. c.ifNoneMatch_ = entityTag
  10340. return c
  10341. }
  10342. // Context sets the context to be used in this call's Do method. Any
  10343. // pending HTTP request will be aborted if the provided context is
  10344. // canceled.
  10345. func (c *AccounttaxListCall) Context(ctx context.Context) *AccounttaxListCall {
  10346. c.ctx_ = ctx
  10347. return c
  10348. }
  10349. // Header returns an http.Header that can be modified by the caller to
  10350. // add HTTP headers to the request.
  10351. func (c *AccounttaxListCall) Header() http.Header {
  10352. if c.header_ == nil {
  10353. c.header_ = make(http.Header)
  10354. }
  10355. return c.header_
  10356. }
  10357. func (c *AccounttaxListCall) doRequest(alt string) (*http.Response, error) {
  10358. reqHeaders := make(http.Header)
  10359. for k, v := range c.header_ {
  10360. reqHeaders[k] = v
  10361. }
  10362. reqHeaders.Set("User-Agent", c.s.userAgent())
  10363. if c.ifNoneMatch_ != "" {
  10364. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  10365. }
  10366. var body io.Reader = nil
  10367. c.urlParams_.Set("alt", alt)
  10368. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax")
  10369. urls += "?" + c.urlParams_.Encode()
  10370. req, _ := http.NewRequest("GET", urls, body)
  10371. req.Header = reqHeaders
  10372. googleapi.Expand(req.URL, map[string]string{
  10373. "merchantId": strconv.FormatUint(c.merchantId, 10),
  10374. })
  10375. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10376. }
  10377. // Do executes the "content.accounttax.list" call.
  10378. // Exactly one of *AccounttaxListResponse or error will be non-nil. Any
  10379. // non-2xx status code is an error. Response headers are in either
  10380. // *AccounttaxListResponse.ServerResponse.Header or (if a response was
  10381. // returned at all) in error.(*googleapi.Error).Header. Use
  10382. // googleapi.IsNotModified to check whether the returned error was
  10383. // because http.StatusNotModified was returned.
  10384. func (c *AccounttaxListCall) Do(opts ...googleapi.CallOption) (*AccounttaxListResponse, error) {
  10385. gensupport.SetOptions(c.urlParams_, opts...)
  10386. res, err := c.doRequest("json")
  10387. if res != nil && res.StatusCode == http.StatusNotModified {
  10388. if res.Body != nil {
  10389. res.Body.Close()
  10390. }
  10391. return nil, &googleapi.Error{
  10392. Code: res.StatusCode,
  10393. Header: res.Header,
  10394. }
  10395. }
  10396. if err != nil {
  10397. return nil, err
  10398. }
  10399. defer googleapi.CloseBody(res)
  10400. if err := googleapi.CheckResponse(res); err != nil {
  10401. return nil, err
  10402. }
  10403. ret := &AccounttaxListResponse{
  10404. ServerResponse: googleapi.ServerResponse{
  10405. Header: res.Header,
  10406. HTTPStatusCode: res.StatusCode,
  10407. },
  10408. }
  10409. target := &ret
  10410. if err := gensupport.DecodeResponse(target, res); err != nil {
  10411. return nil, err
  10412. }
  10413. return ret, nil
  10414. // {
  10415. // "description": "Lists the tax settings of the sub-accounts in your Merchant Center account.",
  10416. // "httpMethod": "GET",
  10417. // "id": "content.accounttax.list",
  10418. // "parameterOrder": [
  10419. // "merchantId"
  10420. // ],
  10421. // "parameters": {
  10422. // "maxResults": {
  10423. // "description": "The maximum number of tax settings to return in the response, used for paging.",
  10424. // "format": "uint32",
  10425. // "location": "query",
  10426. // "type": "integer"
  10427. // },
  10428. // "merchantId": {
  10429. // "description": "The ID of the managing account. This must be a multi-client account.",
  10430. // "format": "uint64",
  10431. // "location": "path",
  10432. // "required": true,
  10433. // "type": "string"
  10434. // },
  10435. // "pageToken": {
  10436. // "description": "The token returned by the previous request.",
  10437. // "location": "query",
  10438. // "type": "string"
  10439. // }
  10440. // },
  10441. // "path": "{merchantId}/accounttax",
  10442. // "response": {
  10443. // "$ref": "AccounttaxListResponse"
  10444. // },
  10445. // "scopes": [
  10446. // "https://www.googleapis.com/auth/content"
  10447. // ]
  10448. // }
  10449. }
  10450. // Pages invokes f for each page of results.
  10451. // A non-nil error returned from f will halt the iteration.
  10452. // The provided context supersedes any context provided to the Context method.
  10453. func (c *AccounttaxListCall) Pages(ctx context.Context, f func(*AccounttaxListResponse) error) error {
  10454. c.ctx_ = ctx
  10455. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  10456. for {
  10457. x, err := c.Do()
  10458. if err != nil {
  10459. return err
  10460. }
  10461. if err := f(x); err != nil {
  10462. return err
  10463. }
  10464. if x.NextPageToken == "" {
  10465. return nil
  10466. }
  10467. c.PageToken(x.NextPageToken)
  10468. }
  10469. }
  10470. // method id "content.accounttax.patch":
  10471. type AccounttaxPatchCall struct {
  10472. s *APIService
  10473. merchantId uint64
  10474. accountId uint64
  10475. accounttax *AccountTax
  10476. urlParams_ gensupport.URLParams
  10477. ctx_ context.Context
  10478. header_ http.Header
  10479. }
  10480. // Patch: Updates the tax settings of the account. This method supports
  10481. // patch semantics.
  10482. func (r *AccounttaxService) Patch(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxPatchCall {
  10483. c := &AccounttaxPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10484. c.merchantId = merchantId
  10485. c.accountId = accountId
  10486. c.accounttax = accounttax
  10487. return c
  10488. }
  10489. // DryRun sets the optional parameter "dryRun": Flag to run the request
  10490. // in dry-run mode.
  10491. func (c *AccounttaxPatchCall) DryRun(dryRun bool) *AccounttaxPatchCall {
  10492. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  10493. return c
  10494. }
  10495. // Fields allows partial responses to be retrieved. See
  10496. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10497. // for more information.
  10498. func (c *AccounttaxPatchCall) Fields(s ...googleapi.Field) *AccounttaxPatchCall {
  10499. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10500. return c
  10501. }
  10502. // Context sets the context to be used in this call's Do method. Any
  10503. // pending HTTP request will be aborted if the provided context is
  10504. // canceled.
  10505. func (c *AccounttaxPatchCall) Context(ctx context.Context) *AccounttaxPatchCall {
  10506. c.ctx_ = ctx
  10507. return c
  10508. }
  10509. // Header returns an http.Header that can be modified by the caller to
  10510. // add HTTP headers to the request.
  10511. func (c *AccounttaxPatchCall) Header() http.Header {
  10512. if c.header_ == nil {
  10513. c.header_ = make(http.Header)
  10514. }
  10515. return c.header_
  10516. }
  10517. func (c *AccounttaxPatchCall) doRequest(alt string) (*http.Response, error) {
  10518. reqHeaders := make(http.Header)
  10519. for k, v := range c.header_ {
  10520. reqHeaders[k] = v
  10521. }
  10522. reqHeaders.Set("User-Agent", c.s.userAgent())
  10523. var body io.Reader = nil
  10524. body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax)
  10525. if err != nil {
  10526. return nil, err
  10527. }
  10528. reqHeaders.Set("Content-Type", "application/json")
  10529. c.urlParams_.Set("alt", alt)
  10530. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}")
  10531. urls += "?" + c.urlParams_.Encode()
  10532. req, _ := http.NewRequest("PATCH", urls, body)
  10533. req.Header = reqHeaders
  10534. googleapi.Expand(req.URL, map[string]string{
  10535. "merchantId": strconv.FormatUint(c.merchantId, 10),
  10536. "accountId": strconv.FormatUint(c.accountId, 10),
  10537. })
  10538. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10539. }
  10540. // Do executes the "content.accounttax.patch" call.
  10541. // Exactly one of *AccountTax or error will be non-nil. Any non-2xx
  10542. // status code is an error. Response headers are in either
  10543. // *AccountTax.ServerResponse.Header or (if a response was returned at
  10544. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10545. // to check whether the returned error was because
  10546. // http.StatusNotModified was returned.
  10547. func (c *AccounttaxPatchCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) {
  10548. gensupport.SetOptions(c.urlParams_, opts...)
  10549. res, err := c.doRequest("json")
  10550. if res != nil && res.StatusCode == http.StatusNotModified {
  10551. if res.Body != nil {
  10552. res.Body.Close()
  10553. }
  10554. return nil, &googleapi.Error{
  10555. Code: res.StatusCode,
  10556. Header: res.Header,
  10557. }
  10558. }
  10559. if err != nil {
  10560. return nil, err
  10561. }
  10562. defer googleapi.CloseBody(res)
  10563. if err := googleapi.CheckResponse(res); err != nil {
  10564. return nil, err
  10565. }
  10566. ret := &AccountTax{
  10567. ServerResponse: googleapi.ServerResponse{
  10568. Header: res.Header,
  10569. HTTPStatusCode: res.StatusCode,
  10570. },
  10571. }
  10572. target := &ret
  10573. if err := gensupport.DecodeResponse(target, res); err != nil {
  10574. return nil, err
  10575. }
  10576. return ret, nil
  10577. // {
  10578. // "description": "Updates the tax settings of the account. This method supports patch semantics.",
  10579. // "httpMethod": "PATCH",
  10580. // "id": "content.accounttax.patch",
  10581. // "parameterOrder": [
  10582. // "merchantId",
  10583. // "accountId"
  10584. // ],
  10585. // "parameters": {
  10586. // "accountId": {
  10587. // "description": "The ID of the account for which to get/update account tax settings.",
  10588. // "format": "uint64",
  10589. // "location": "path",
  10590. // "required": true,
  10591. // "type": "string"
  10592. // },
  10593. // "dryRun": {
  10594. // "description": "Flag to run the request in dry-run mode.",
  10595. // "location": "query",
  10596. // "type": "boolean"
  10597. // },
  10598. // "merchantId": {
  10599. // "description": "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.",
  10600. // "format": "uint64",
  10601. // "location": "path",
  10602. // "required": true,
  10603. // "type": "string"
  10604. // }
  10605. // },
  10606. // "path": "{merchantId}/accounttax/{accountId}",
  10607. // "request": {
  10608. // "$ref": "AccountTax"
  10609. // },
  10610. // "response": {
  10611. // "$ref": "AccountTax"
  10612. // },
  10613. // "scopes": [
  10614. // "https://www.googleapis.com/auth/content"
  10615. // ]
  10616. // }
  10617. }
  10618. // method id "content.accounttax.update":
  10619. type AccounttaxUpdateCall struct {
  10620. s *APIService
  10621. merchantId uint64
  10622. accountId uint64
  10623. accounttax *AccountTax
  10624. urlParams_ gensupport.URLParams
  10625. ctx_ context.Context
  10626. header_ http.Header
  10627. }
  10628. // Update: Updates the tax settings of the account.
  10629. func (r *AccounttaxService) Update(merchantId uint64, accountId uint64, accounttax *AccountTax) *AccounttaxUpdateCall {
  10630. c := &AccounttaxUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10631. c.merchantId = merchantId
  10632. c.accountId = accountId
  10633. c.accounttax = accounttax
  10634. return c
  10635. }
  10636. // DryRun sets the optional parameter "dryRun": Flag to run the request
  10637. // in dry-run mode.
  10638. func (c *AccounttaxUpdateCall) DryRun(dryRun bool) *AccounttaxUpdateCall {
  10639. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  10640. return c
  10641. }
  10642. // Fields allows partial responses to be retrieved. See
  10643. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10644. // for more information.
  10645. func (c *AccounttaxUpdateCall) Fields(s ...googleapi.Field) *AccounttaxUpdateCall {
  10646. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10647. return c
  10648. }
  10649. // Context sets the context to be used in this call's Do method. Any
  10650. // pending HTTP request will be aborted if the provided context is
  10651. // canceled.
  10652. func (c *AccounttaxUpdateCall) Context(ctx context.Context) *AccounttaxUpdateCall {
  10653. c.ctx_ = ctx
  10654. return c
  10655. }
  10656. // Header returns an http.Header that can be modified by the caller to
  10657. // add HTTP headers to the request.
  10658. func (c *AccounttaxUpdateCall) Header() http.Header {
  10659. if c.header_ == nil {
  10660. c.header_ = make(http.Header)
  10661. }
  10662. return c.header_
  10663. }
  10664. func (c *AccounttaxUpdateCall) doRequest(alt string) (*http.Response, error) {
  10665. reqHeaders := make(http.Header)
  10666. for k, v := range c.header_ {
  10667. reqHeaders[k] = v
  10668. }
  10669. reqHeaders.Set("User-Agent", c.s.userAgent())
  10670. var body io.Reader = nil
  10671. body, err := googleapi.WithoutDataWrapper.JSONReader(c.accounttax)
  10672. if err != nil {
  10673. return nil, err
  10674. }
  10675. reqHeaders.Set("Content-Type", "application/json")
  10676. c.urlParams_.Set("alt", alt)
  10677. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/accounttax/{accountId}")
  10678. urls += "?" + c.urlParams_.Encode()
  10679. req, _ := http.NewRequest("PUT", urls, body)
  10680. req.Header = reqHeaders
  10681. googleapi.Expand(req.URL, map[string]string{
  10682. "merchantId": strconv.FormatUint(c.merchantId, 10),
  10683. "accountId": strconv.FormatUint(c.accountId, 10),
  10684. })
  10685. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10686. }
  10687. // Do executes the "content.accounttax.update" call.
  10688. // Exactly one of *AccountTax or error will be non-nil. Any non-2xx
  10689. // status code is an error. Response headers are in either
  10690. // *AccountTax.ServerResponse.Header or (if a response was returned at
  10691. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  10692. // to check whether the returned error was because
  10693. // http.StatusNotModified was returned.
  10694. func (c *AccounttaxUpdateCall) Do(opts ...googleapi.CallOption) (*AccountTax, error) {
  10695. gensupport.SetOptions(c.urlParams_, opts...)
  10696. res, err := c.doRequest("json")
  10697. if res != nil && res.StatusCode == http.StatusNotModified {
  10698. if res.Body != nil {
  10699. res.Body.Close()
  10700. }
  10701. return nil, &googleapi.Error{
  10702. Code: res.StatusCode,
  10703. Header: res.Header,
  10704. }
  10705. }
  10706. if err != nil {
  10707. return nil, err
  10708. }
  10709. defer googleapi.CloseBody(res)
  10710. if err := googleapi.CheckResponse(res); err != nil {
  10711. return nil, err
  10712. }
  10713. ret := &AccountTax{
  10714. ServerResponse: googleapi.ServerResponse{
  10715. Header: res.Header,
  10716. HTTPStatusCode: res.StatusCode,
  10717. },
  10718. }
  10719. target := &ret
  10720. if err := gensupport.DecodeResponse(target, res); err != nil {
  10721. return nil, err
  10722. }
  10723. return ret, nil
  10724. // {
  10725. // "description": "Updates the tax settings of the account.",
  10726. // "httpMethod": "PUT",
  10727. // "id": "content.accounttax.update",
  10728. // "parameterOrder": [
  10729. // "merchantId",
  10730. // "accountId"
  10731. // ],
  10732. // "parameters": {
  10733. // "accountId": {
  10734. // "description": "The ID of the account for which to get/update account tax settings.",
  10735. // "format": "uint64",
  10736. // "location": "path",
  10737. // "required": true,
  10738. // "type": "string"
  10739. // },
  10740. // "dryRun": {
  10741. // "description": "Flag to run the request in dry-run mode.",
  10742. // "location": "query",
  10743. // "type": "boolean"
  10744. // },
  10745. // "merchantId": {
  10746. // "description": "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.",
  10747. // "format": "uint64",
  10748. // "location": "path",
  10749. // "required": true,
  10750. // "type": "string"
  10751. // }
  10752. // },
  10753. // "path": "{merchantId}/accounttax/{accountId}",
  10754. // "request": {
  10755. // "$ref": "AccountTax"
  10756. // },
  10757. // "response": {
  10758. // "$ref": "AccountTax"
  10759. // },
  10760. // "scopes": [
  10761. // "https://www.googleapis.com/auth/content"
  10762. // ]
  10763. // }
  10764. }
  10765. // method id "content.datafeeds.custombatch":
  10766. type DatafeedsCustombatchCall struct {
  10767. s *APIService
  10768. datafeedscustombatchrequest *DatafeedsCustomBatchRequest
  10769. urlParams_ gensupport.URLParams
  10770. ctx_ context.Context
  10771. header_ http.Header
  10772. }
  10773. // Custombatch:
  10774. func (r *DatafeedsService) Custombatch(datafeedscustombatchrequest *DatafeedsCustomBatchRequest) *DatafeedsCustombatchCall {
  10775. c := &DatafeedsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10776. c.datafeedscustombatchrequest = datafeedscustombatchrequest
  10777. return c
  10778. }
  10779. // DryRun sets the optional parameter "dryRun": Flag to run the request
  10780. // in dry-run mode.
  10781. func (c *DatafeedsCustombatchCall) DryRun(dryRun bool) *DatafeedsCustombatchCall {
  10782. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  10783. return c
  10784. }
  10785. // Fields allows partial responses to be retrieved. See
  10786. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10787. // for more information.
  10788. func (c *DatafeedsCustombatchCall) Fields(s ...googleapi.Field) *DatafeedsCustombatchCall {
  10789. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10790. return c
  10791. }
  10792. // Context sets the context to be used in this call's Do method. Any
  10793. // pending HTTP request will be aborted if the provided context is
  10794. // canceled.
  10795. func (c *DatafeedsCustombatchCall) Context(ctx context.Context) *DatafeedsCustombatchCall {
  10796. c.ctx_ = ctx
  10797. return c
  10798. }
  10799. // Header returns an http.Header that can be modified by the caller to
  10800. // add HTTP headers to the request.
  10801. func (c *DatafeedsCustombatchCall) Header() http.Header {
  10802. if c.header_ == nil {
  10803. c.header_ = make(http.Header)
  10804. }
  10805. return c.header_
  10806. }
  10807. func (c *DatafeedsCustombatchCall) doRequest(alt string) (*http.Response, error) {
  10808. reqHeaders := make(http.Header)
  10809. for k, v := range c.header_ {
  10810. reqHeaders[k] = v
  10811. }
  10812. reqHeaders.Set("User-Agent", c.s.userAgent())
  10813. var body io.Reader = nil
  10814. body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedscustombatchrequest)
  10815. if err != nil {
  10816. return nil, err
  10817. }
  10818. reqHeaders.Set("Content-Type", "application/json")
  10819. c.urlParams_.Set("alt", alt)
  10820. urls := googleapi.ResolveRelative(c.s.BasePath, "datafeeds/batch")
  10821. urls += "?" + c.urlParams_.Encode()
  10822. req, _ := http.NewRequest("POST", urls, body)
  10823. req.Header = reqHeaders
  10824. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10825. }
  10826. // Do executes the "content.datafeeds.custombatch" call.
  10827. // Exactly one of *DatafeedsCustomBatchResponse or error will be
  10828. // non-nil. Any non-2xx status code is an error. Response headers are in
  10829. // either *DatafeedsCustomBatchResponse.ServerResponse.Header or (if a
  10830. // response was returned at all) in error.(*googleapi.Error).Header. Use
  10831. // googleapi.IsNotModified to check whether the returned error was
  10832. // because http.StatusNotModified was returned.
  10833. func (c *DatafeedsCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedsCustomBatchResponse, error) {
  10834. gensupport.SetOptions(c.urlParams_, opts...)
  10835. res, err := c.doRequest("json")
  10836. if res != nil && res.StatusCode == http.StatusNotModified {
  10837. if res.Body != nil {
  10838. res.Body.Close()
  10839. }
  10840. return nil, &googleapi.Error{
  10841. Code: res.StatusCode,
  10842. Header: res.Header,
  10843. }
  10844. }
  10845. if err != nil {
  10846. return nil, err
  10847. }
  10848. defer googleapi.CloseBody(res)
  10849. if err := googleapi.CheckResponse(res); err != nil {
  10850. return nil, err
  10851. }
  10852. ret := &DatafeedsCustomBatchResponse{
  10853. ServerResponse: googleapi.ServerResponse{
  10854. Header: res.Header,
  10855. HTTPStatusCode: res.StatusCode,
  10856. },
  10857. }
  10858. target := &ret
  10859. if err := gensupport.DecodeResponse(target, res); err != nil {
  10860. return nil, err
  10861. }
  10862. return ret, nil
  10863. // {
  10864. // "httpMethod": "POST",
  10865. // "id": "content.datafeeds.custombatch",
  10866. // "parameters": {
  10867. // "dryRun": {
  10868. // "description": "Flag to run the request in dry-run mode.",
  10869. // "location": "query",
  10870. // "type": "boolean"
  10871. // }
  10872. // },
  10873. // "path": "datafeeds/batch",
  10874. // "request": {
  10875. // "$ref": "DatafeedsCustomBatchRequest"
  10876. // },
  10877. // "response": {
  10878. // "$ref": "DatafeedsCustomBatchResponse"
  10879. // },
  10880. // "scopes": [
  10881. // "https://www.googleapis.com/auth/content"
  10882. // ]
  10883. // }
  10884. }
  10885. // method id "content.datafeeds.delete":
  10886. type DatafeedsDeleteCall struct {
  10887. s *APIService
  10888. merchantId uint64
  10889. datafeedId uint64
  10890. urlParams_ gensupport.URLParams
  10891. ctx_ context.Context
  10892. header_ http.Header
  10893. }
  10894. // Delete: Deletes a datafeed configuration from your Merchant Center
  10895. // account.
  10896. func (r *DatafeedsService) Delete(merchantId uint64, datafeedId uint64) *DatafeedsDeleteCall {
  10897. c := &DatafeedsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  10898. c.merchantId = merchantId
  10899. c.datafeedId = datafeedId
  10900. return c
  10901. }
  10902. // DryRun sets the optional parameter "dryRun": Flag to run the request
  10903. // in dry-run mode.
  10904. func (c *DatafeedsDeleteCall) DryRun(dryRun bool) *DatafeedsDeleteCall {
  10905. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  10906. return c
  10907. }
  10908. // Fields allows partial responses to be retrieved. See
  10909. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  10910. // for more information.
  10911. func (c *DatafeedsDeleteCall) Fields(s ...googleapi.Field) *DatafeedsDeleteCall {
  10912. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  10913. return c
  10914. }
  10915. // Context sets the context to be used in this call's Do method. Any
  10916. // pending HTTP request will be aborted if the provided context is
  10917. // canceled.
  10918. func (c *DatafeedsDeleteCall) Context(ctx context.Context) *DatafeedsDeleteCall {
  10919. c.ctx_ = ctx
  10920. return c
  10921. }
  10922. // Header returns an http.Header that can be modified by the caller to
  10923. // add HTTP headers to the request.
  10924. func (c *DatafeedsDeleteCall) Header() http.Header {
  10925. if c.header_ == nil {
  10926. c.header_ = make(http.Header)
  10927. }
  10928. return c.header_
  10929. }
  10930. func (c *DatafeedsDeleteCall) doRequest(alt string) (*http.Response, error) {
  10931. reqHeaders := make(http.Header)
  10932. for k, v := range c.header_ {
  10933. reqHeaders[k] = v
  10934. }
  10935. reqHeaders.Set("User-Agent", c.s.userAgent())
  10936. var body io.Reader = nil
  10937. c.urlParams_.Set("alt", alt)
  10938. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}")
  10939. urls += "?" + c.urlParams_.Encode()
  10940. req, _ := http.NewRequest("DELETE", urls, body)
  10941. req.Header = reqHeaders
  10942. googleapi.Expand(req.URL, map[string]string{
  10943. "merchantId": strconv.FormatUint(c.merchantId, 10),
  10944. "datafeedId": strconv.FormatUint(c.datafeedId, 10),
  10945. })
  10946. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  10947. }
  10948. // Do executes the "content.datafeeds.delete" call.
  10949. func (c *DatafeedsDeleteCall) Do(opts ...googleapi.CallOption) error {
  10950. gensupport.SetOptions(c.urlParams_, opts...)
  10951. res, err := c.doRequest("json")
  10952. if err != nil {
  10953. return err
  10954. }
  10955. defer googleapi.CloseBody(res)
  10956. if err := googleapi.CheckResponse(res); err != nil {
  10957. return err
  10958. }
  10959. return nil
  10960. // {
  10961. // "description": "Deletes a datafeed configuration from your Merchant Center account.",
  10962. // "httpMethod": "DELETE",
  10963. // "id": "content.datafeeds.delete",
  10964. // "parameterOrder": [
  10965. // "merchantId",
  10966. // "datafeedId"
  10967. // ],
  10968. // "parameters": {
  10969. // "datafeedId": {
  10970. // "description": "The ID of the datafeed.",
  10971. // "format": "uint64",
  10972. // "location": "path",
  10973. // "required": true,
  10974. // "type": "string"
  10975. // },
  10976. // "dryRun": {
  10977. // "description": "Flag to run the request in dry-run mode.",
  10978. // "location": "query",
  10979. // "type": "boolean"
  10980. // },
  10981. // "merchantId": {
  10982. // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
  10983. // "format": "uint64",
  10984. // "location": "path",
  10985. // "required": true,
  10986. // "type": "string"
  10987. // }
  10988. // },
  10989. // "path": "{merchantId}/datafeeds/{datafeedId}",
  10990. // "scopes": [
  10991. // "https://www.googleapis.com/auth/content"
  10992. // ]
  10993. // }
  10994. }
  10995. // method id "content.datafeeds.fetchnow":
  10996. type DatafeedsFetchnowCall struct {
  10997. s *APIService
  10998. merchantId uint64
  10999. datafeedId uint64
  11000. urlParams_ gensupport.URLParams
  11001. ctx_ context.Context
  11002. header_ http.Header
  11003. }
  11004. // Fetchnow: Invokes a fetch for the datafeed in your Merchant Center
  11005. // account.
  11006. func (r *DatafeedsService) Fetchnow(merchantId uint64, datafeedId uint64) *DatafeedsFetchnowCall {
  11007. c := &DatafeedsFetchnowCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11008. c.merchantId = merchantId
  11009. c.datafeedId = datafeedId
  11010. return c
  11011. }
  11012. // DryRun sets the optional parameter "dryRun": Flag to run the request
  11013. // in dry-run mode.
  11014. func (c *DatafeedsFetchnowCall) DryRun(dryRun bool) *DatafeedsFetchnowCall {
  11015. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  11016. return c
  11017. }
  11018. // Fields allows partial responses to be retrieved. See
  11019. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11020. // for more information.
  11021. func (c *DatafeedsFetchnowCall) Fields(s ...googleapi.Field) *DatafeedsFetchnowCall {
  11022. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11023. return c
  11024. }
  11025. // Context sets the context to be used in this call's Do method. Any
  11026. // pending HTTP request will be aborted if the provided context is
  11027. // canceled.
  11028. func (c *DatafeedsFetchnowCall) Context(ctx context.Context) *DatafeedsFetchnowCall {
  11029. c.ctx_ = ctx
  11030. return c
  11031. }
  11032. // Header returns an http.Header that can be modified by the caller to
  11033. // add HTTP headers to the request.
  11034. func (c *DatafeedsFetchnowCall) Header() http.Header {
  11035. if c.header_ == nil {
  11036. c.header_ = make(http.Header)
  11037. }
  11038. return c.header_
  11039. }
  11040. func (c *DatafeedsFetchnowCall) doRequest(alt string) (*http.Response, error) {
  11041. reqHeaders := make(http.Header)
  11042. for k, v := range c.header_ {
  11043. reqHeaders[k] = v
  11044. }
  11045. reqHeaders.Set("User-Agent", c.s.userAgent())
  11046. var body io.Reader = nil
  11047. c.urlParams_.Set("alt", alt)
  11048. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}/fetchNow")
  11049. urls += "?" + c.urlParams_.Encode()
  11050. req, _ := http.NewRequest("POST", urls, body)
  11051. req.Header = reqHeaders
  11052. googleapi.Expand(req.URL, map[string]string{
  11053. "merchantId": strconv.FormatUint(c.merchantId, 10),
  11054. "datafeedId": strconv.FormatUint(c.datafeedId, 10),
  11055. })
  11056. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11057. }
  11058. // Do executes the "content.datafeeds.fetchnow" call.
  11059. // Exactly one of *DatafeedsFetchNowResponse or error will be non-nil.
  11060. // Any non-2xx status code is an error. Response headers are in either
  11061. // *DatafeedsFetchNowResponse.ServerResponse.Header or (if a response
  11062. // was returned at all) in error.(*googleapi.Error).Header. Use
  11063. // googleapi.IsNotModified to check whether the returned error was
  11064. // because http.StatusNotModified was returned.
  11065. func (c *DatafeedsFetchnowCall) Do(opts ...googleapi.CallOption) (*DatafeedsFetchNowResponse, error) {
  11066. gensupport.SetOptions(c.urlParams_, opts...)
  11067. res, err := c.doRequest("json")
  11068. if res != nil && res.StatusCode == http.StatusNotModified {
  11069. if res.Body != nil {
  11070. res.Body.Close()
  11071. }
  11072. return nil, &googleapi.Error{
  11073. Code: res.StatusCode,
  11074. Header: res.Header,
  11075. }
  11076. }
  11077. if err != nil {
  11078. return nil, err
  11079. }
  11080. defer googleapi.CloseBody(res)
  11081. if err := googleapi.CheckResponse(res); err != nil {
  11082. return nil, err
  11083. }
  11084. ret := &DatafeedsFetchNowResponse{
  11085. ServerResponse: googleapi.ServerResponse{
  11086. Header: res.Header,
  11087. HTTPStatusCode: res.StatusCode,
  11088. },
  11089. }
  11090. target := &ret
  11091. if err := gensupport.DecodeResponse(target, res); err != nil {
  11092. return nil, err
  11093. }
  11094. return ret, nil
  11095. // {
  11096. // "description": "Invokes a fetch for the datafeed in your Merchant Center account.",
  11097. // "httpMethod": "POST",
  11098. // "id": "content.datafeeds.fetchnow",
  11099. // "parameterOrder": [
  11100. // "merchantId",
  11101. // "datafeedId"
  11102. // ],
  11103. // "parameters": {
  11104. // "datafeedId": {
  11105. // "description": "The ID of the datafeed to be fetched.",
  11106. // "format": "uint64",
  11107. // "location": "path",
  11108. // "required": true,
  11109. // "type": "string"
  11110. // },
  11111. // "dryRun": {
  11112. // "description": "Flag to run the request in dry-run mode.",
  11113. // "location": "query",
  11114. // "type": "boolean"
  11115. // },
  11116. // "merchantId": {
  11117. // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
  11118. // "format": "uint64",
  11119. // "location": "path",
  11120. // "required": true,
  11121. // "type": "string"
  11122. // }
  11123. // },
  11124. // "path": "{merchantId}/datafeeds/{datafeedId}/fetchNow",
  11125. // "response": {
  11126. // "$ref": "DatafeedsFetchNowResponse"
  11127. // },
  11128. // "scopes": [
  11129. // "https://www.googleapis.com/auth/content"
  11130. // ]
  11131. // }
  11132. }
  11133. // method id "content.datafeeds.get":
  11134. type DatafeedsGetCall struct {
  11135. s *APIService
  11136. merchantId uint64
  11137. datafeedId uint64
  11138. urlParams_ gensupport.URLParams
  11139. ifNoneMatch_ string
  11140. ctx_ context.Context
  11141. header_ http.Header
  11142. }
  11143. // Get: Retrieves a datafeed configuration from your Merchant Center
  11144. // account.
  11145. func (r *DatafeedsService) Get(merchantId uint64, datafeedId uint64) *DatafeedsGetCall {
  11146. c := &DatafeedsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11147. c.merchantId = merchantId
  11148. c.datafeedId = datafeedId
  11149. return c
  11150. }
  11151. // Fields allows partial responses to be retrieved. See
  11152. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11153. // for more information.
  11154. func (c *DatafeedsGetCall) Fields(s ...googleapi.Field) *DatafeedsGetCall {
  11155. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11156. return c
  11157. }
  11158. // IfNoneMatch sets the optional parameter which makes the operation
  11159. // fail if the object's ETag matches the given value. This is useful for
  11160. // getting updates only after the object has changed since the last
  11161. // request. Use googleapi.IsNotModified to check whether the response
  11162. // error from Do is the result of In-None-Match.
  11163. func (c *DatafeedsGetCall) IfNoneMatch(entityTag string) *DatafeedsGetCall {
  11164. c.ifNoneMatch_ = entityTag
  11165. return c
  11166. }
  11167. // Context sets the context to be used in this call's Do method. Any
  11168. // pending HTTP request will be aborted if the provided context is
  11169. // canceled.
  11170. func (c *DatafeedsGetCall) Context(ctx context.Context) *DatafeedsGetCall {
  11171. c.ctx_ = ctx
  11172. return c
  11173. }
  11174. // Header returns an http.Header that can be modified by the caller to
  11175. // add HTTP headers to the request.
  11176. func (c *DatafeedsGetCall) Header() http.Header {
  11177. if c.header_ == nil {
  11178. c.header_ = make(http.Header)
  11179. }
  11180. return c.header_
  11181. }
  11182. func (c *DatafeedsGetCall) doRequest(alt string) (*http.Response, error) {
  11183. reqHeaders := make(http.Header)
  11184. for k, v := range c.header_ {
  11185. reqHeaders[k] = v
  11186. }
  11187. reqHeaders.Set("User-Agent", c.s.userAgent())
  11188. if c.ifNoneMatch_ != "" {
  11189. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11190. }
  11191. var body io.Reader = nil
  11192. c.urlParams_.Set("alt", alt)
  11193. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}")
  11194. urls += "?" + c.urlParams_.Encode()
  11195. req, _ := http.NewRequest("GET", urls, body)
  11196. req.Header = reqHeaders
  11197. googleapi.Expand(req.URL, map[string]string{
  11198. "merchantId": strconv.FormatUint(c.merchantId, 10),
  11199. "datafeedId": strconv.FormatUint(c.datafeedId, 10),
  11200. })
  11201. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11202. }
  11203. // Do executes the "content.datafeeds.get" call.
  11204. // Exactly one of *Datafeed or error will be non-nil. Any non-2xx status
  11205. // code is an error. Response headers are in either
  11206. // *Datafeed.ServerResponse.Header or (if a response was returned at
  11207. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11208. // to check whether the returned error was because
  11209. // http.StatusNotModified was returned.
  11210. func (c *DatafeedsGetCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) {
  11211. gensupport.SetOptions(c.urlParams_, opts...)
  11212. res, err := c.doRequest("json")
  11213. if res != nil && res.StatusCode == http.StatusNotModified {
  11214. if res.Body != nil {
  11215. res.Body.Close()
  11216. }
  11217. return nil, &googleapi.Error{
  11218. Code: res.StatusCode,
  11219. Header: res.Header,
  11220. }
  11221. }
  11222. if err != nil {
  11223. return nil, err
  11224. }
  11225. defer googleapi.CloseBody(res)
  11226. if err := googleapi.CheckResponse(res); err != nil {
  11227. return nil, err
  11228. }
  11229. ret := &Datafeed{
  11230. ServerResponse: googleapi.ServerResponse{
  11231. Header: res.Header,
  11232. HTTPStatusCode: res.StatusCode,
  11233. },
  11234. }
  11235. target := &ret
  11236. if err := gensupport.DecodeResponse(target, res); err != nil {
  11237. return nil, err
  11238. }
  11239. return ret, nil
  11240. // {
  11241. // "description": "Retrieves a datafeed configuration from your Merchant Center account.",
  11242. // "httpMethod": "GET",
  11243. // "id": "content.datafeeds.get",
  11244. // "parameterOrder": [
  11245. // "merchantId",
  11246. // "datafeedId"
  11247. // ],
  11248. // "parameters": {
  11249. // "datafeedId": {
  11250. // "description": "The ID of the datafeed.",
  11251. // "format": "uint64",
  11252. // "location": "path",
  11253. // "required": true,
  11254. // "type": "string"
  11255. // },
  11256. // "merchantId": {
  11257. // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
  11258. // "format": "uint64",
  11259. // "location": "path",
  11260. // "required": true,
  11261. // "type": "string"
  11262. // }
  11263. // },
  11264. // "path": "{merchantId}/datafeeds/{datafeedId}",
  11265. // "response": {
  11266. // "$ref": "Datafeed"
  11267. // },
  11268. // "scopes": [
  11269. // "https://www.googleapis.com/auth/content"
  11270. // ]
  11271. // }
  11272. }
  11273. // method id "content.datafeeds.insert":
  11274. type DatafeedsInsertCall struct {
  11275. s *APIService
  11276. merchantId uint64
  11277. datafeed *Datafeed
  11278. urlParams_ gensupport.URLParams
  11279. ctx_ context.Context
  11280. header_ http.Header
  11281. }
  11282. // Insert: Registers a datafeed configuration with your Merchant Center
  11283. // account.
  11284. func (r *DatafeedsService) Insert(merchantId uint64, datafeed *Datafeed) *DatafeedsInsertCall {
  11285. c := &DatafeedsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11286. c.merchantId = merchantId
  11287. c.datafeed = datafeed
  11288. return c
  11289. }
  11290. // DryRun sets the optional parameter "dryRun": Flag to run the request
  11291. // in dry-run mode.
  11292. func (c *DatafeedsInsertCall) DryRun(dryRun bool) *DatafeedsInsertCall {
  11293. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  11294. return c
  11295. }
  11296. // Fields allows partial responses to be retrieved. See
  11297. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11298. // for more information.
  11299. func (c *DatafeedsInsertCall) Fields(s ...googleapi.Field) *DatafeedsInsertCall {
  11300. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11301. return c
  11302. }
  11303. // Context sets the context to be used in this call's Do method. Any
  11304. // pending HTTP request will be aborted if the provided context is
  11305. // canceled.
  11306. func (c *DatafeedsInsertCall) Context(ctx context.Context) *DatafeedsInsertCall {
  11307. c.ctx_ = ctx
  11308. return c
  11309. }
  11310. // Header returns an http.Header that can be modified by the caller to
  11311. // add HTTP headers to the request.
  11312. func (c *DatafeedsInsertCall) Header() http.Header {
  11313. if c.header_ == nil {
  11314. c.header_ = make(http.Header)
  11315. }
  11316. return c.header_
  11317. }
  11318. func (c *DatafeedsInsertCall) doRequest(alt string) (*http.Response, error) {
  11319. reqHeaders := make(http.Header)
  11320. for k, v := range c.header_ {
  11321. reqHeaders[k] = v
  11322. }
  11323. reqHeaders.Set("User-Agent", c.s.userAgent())
  11324. var body io.Reader = nil
  11325. body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed)
  11326. if err != nil {
  11327. return nil, err
  11328. }
  11329. reqHeaders.Set("Content-Type", "application/json")
  11330. c.urlParams_.Set("alt", alt)
  11331. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds")
  11332. urls += "?" + c.urlParams_.Encode()
  11333. req, _ := http.NewRequest("POST", urls, body)
  11334. req.Header = reqHeaders
  11335. googleapi.Expand(req.URL, map[string]string{
  11336. "merchantId": strconv.FormatUint(c.merchantId, 10),
  11337. })
  11338. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11339. }
  11340. // Do executes the "content.datafeeds.insert" call.
  11341. // Exactly one of *Datafeed or error will be non-nil. Any non-2xx status
  11342. // code is an error. Response headers are in either
  11343. // *Datafeed.ServerResponse.Header or (if a response was returned at
  11344. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11345. // to check whether the returned error was because
  11346. // http.StatusNotModified was returned.
  11347. func (c *DatafeedsInsertCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) {
  11348. gensupport.SetOptions(c.urlParams_, opts...)
  11349. res, err := c.doRequest("json")
  11350. if res != nil && res.StatusCode == http.StatusNotModified {
  11351. if res.Body != nil {
  11352. res.Body.Close()
  11353. }
  11354. return nil, &googleapi.Error{
  11355. Code: res.StatusCode,
  11356. Header: res.Header,
  11357. }
  11358. }
  11359. if err != nil {
  11360. return nil, err
  11361. }
  11362. defer googleapi.CloseBody(res)
  11363. if err := googleapi.CheckResponse(res); err != nil {
  11364. return nil, err
  11365. }
  11366. ret := &Datafeed{
  11367. ServerResponse: googleapi.ServerResponse{
  11368. Header: res.Header,
  11369. HTTPStatusCode: res.StatusCode,
  11370. },
  11371. }
  11372. target := &ret
  11373. if err := gensupport.DecodeResponse(target, res); err != nil {
  11374. return nil, err
  11375. }
  11376. return ret, nil
  11377. // {
  11378. // "description": "Registers a datafeed configuration with your Merchant Center account.",
  11379. // "httpMethod": "POST",
  11380. // "id": "content.datafeeds.insert",
  11381. // "parameterOrder": [
  11382. // "merchantId"
  11383. // ],
  11384. // "parameters": {
  11385. // "dryRun": {
  11386. // "description": "Flag to run the request in dry-run mode.",
  11387. // "location": "query",
  11388. // "type": "boolean"
  11389. // },
  11390. // "merchantId": {
  11391. // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
  11392. // "format": "uint64",
  11393. // "location": "path",
  11394. // "required": true,
  11395. // "type": "string"
  11396. // }
  11397. // },
  11398. // "path": "{merchantId}/datafeeds",
  11399. // "request": {
  11400. // "$ref": "Datafeed"
  11401. // },
  11402. // "response": {
  11403. // "$ref": "Datafeed"
  11404. // },
  11405. // "scopes": [
  11406. // "https://www.googleapis.com/auth/content"
  11407. // ]
  11408. // }
  11409. }
  11410. // method id "content.datafeeds.list":
  11411. type DatafeedsListCall struct {
  11412. s *APIService
  11413. merchantId uint64
  11414. urlParams_ gensupport.URLParams
  11415. ifNoneMatch_ string
  11416. ctx_ context.Context
  11417. header_ http.Header
  11418. }
  11419. // List: Lists the configurations for datafeeds in your Merchant Center
  11420. // account.
  11421. func (r *DatafeedsService) List(merchantId uint64) *DatafeedsListCall {
  11422. c := &DatafeedsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11423. c.merchantId = merchantId
  11424. return c
  11425. }
  11426. // MaxResults sets the optional parameter "maxResults": The maximum
  11427. // number of products to return in the response, used for paging.
  11428. func (c *DatafeedsListCall) MaxResults(maxResults int64) *DatafeedsListCall {
  11429. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  11430. return c
  11431. }
  11432. // PageToken sets the optional parameter "pageToken": The token returned
  11433. // by the previous request.
  11434. func (c *DatafeedsListCall) PageToken(pageToken string) *DatafeedsListCall {
  11435. c.urlParams_.Set("pageToken", pageToken)
  11436. return c
  11437. }
  11438. // Fields allows partial responses to be retrieved. See
  11439. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11440. // for more information.
  11441. func (c *DatafeedsListCall) Fields(s ...googleapi.Field) *DatafeedsListCall {
  11442. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11443. return c
  11444. }
  11445. // IfNoneMatch sets the optional parameter which makes the operation
  11446. // fail if the object's ETag matches the given value. This is useful for
  11447. // getting updates only after the object has changed since the last
  11448. // request. Use googleapi.IsNotModified to check whether the response
  11449. // error from Do is the result of In-None-Match.
  11450. func (c *DatafeedsListCall) IfNoneMatch(entityTag string) *DatafeedsListCall {
  11451. c.ifNoneMatch_ = entityTag
  11452. return c
  11453. }
  11454. // Context sets the context to be used in this call's Do method. Any
  11455. // pending HTTP request will be aborted if the provided context is
  11456. // canceled.
  11457. func (c *DatafeedsListCall) Context(ctx context.Context) *DatafeedsListCall {
  11458. c.ctx_ = ctx
  11459. return c
  11460. }
  11461. // Header returns an http.Header that can be modified by the caller to
  11462. // add HTTP headers to the request.
  11463. func (c *DatafeedsListCall) Header() http.Header {
  11464. if c.header_ == nil {
  11465. c.header_ = make(http.Header)
  11466. }
  11467. return c.header_
  11468. }
  11469. func (c *DatafeedsListCall) doRequest(alt string) (*http.Response, error) {
  11470. reqHeaders := make(http.Header)
  11471. for k, v := range c.header_ {
  11472. reqHeaders[k] = v
  11473. }
  11474. reqHeaders.Set("User-Agent", c.s.userAgent())
  11475. if c.ifNoneMatch_ != "" {
  11476. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  11477. }
  11478. var body io.Reader = nil
  11479. c.urlParams_.Set("alt", alt)
  11480. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds")
  11481. urls += "?" + c.urlParams_.Encode()
  11482. req, _ := http.NewRequest("GET", urls, body)
  11483. req.Header = reqHeaders
  11484. googleapi.Expand(req.URL, map[string]string{
  11485. "merchantId": strconv.FormatUint(c.merchantId, 10),
  11486. })
  11487. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11488. }
  11489. // Do executes the "content.datafeeds.list" call.
  11490. // Exactly one of *DatafeedsListResponse or error will be non-nil. Any
  11491. // non-2xx status code is an error. Response headers are in either
  11492. // *DatafeedsListResponse.ServerResponse.Header or (if a response was
  11493. // returned at all) in error.(*googleapi.Error).Header. Use
  11494. // googleapi.IsNotModified to check whether the returned error was
  11495. // because http.StatusNotModified was returned.
  11496. func (c *DatafeedsListCall) Do(opts ...googleapi.CallOption) (*DatafeedsListResponse, error) {
  11497. gensupport.SetOptions(c.urlParams_, opts...)
  11498. res, err := c.doRequest("json")
  11499. if res != nil && res.StatusCode == http.StatusNotModified {
  11500. if res.Body != nil {
  11501. res.Body.Close()
  11502. }
  11503. return nil, &googleapi.Error{
  11504. Code: res.StatusCode,
  11505. Header: res.Header,
  11506. }
  11507. }
  11508. if err != nil {
  11509. return nil, err
  11510. }
  11511. defer googleapi.CloseBody(res)
  11512. if err := googleapi.CheckResponse(res); err != nil {
  11513. return nil, err
  11514. }
  11515. ret := &DatafeedsListResponse{
  11516. ServerResponse: googleapi.ServerResponse{
  11517. Header: res.Header,
  11518. HTTPStatusCode: res.StatusCode,
  11519. },
  11520. }
  11521. target := &ret
  11522. if err := gensupport.DecodeResponse(target, res); err != nil {
  11523. return nil, err
  11524. }
  11525. return ret, nil
  11526. // {
  11527. // "description": "Lists the configurations for datafeeds in your Merchant Center account.",
  11528. // "httpMethod": "GET",
  11529. // "id": "content.datafeeds.list",
  11530. // "parameterOrder": [
  11531. // "merchantId"
  11532. // ],
  11533. // "parameters": {
  11534. // "maxResults": {
  11535. // "description": "The maximum number of products to return in the response, used for paging.",
  11536. // "format": "uint32",
  11537. // "location": "query",
  11538. // "type": "integer"
  11539. // },
  11540. // "merchantId": {
  11541. // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.",
  11542. // "format": "uint64",
  11543. // "location": "path",
  11544. // "required": true,
  11545. // "type": "string"
  11546. // },
  11547. // "pageToken": {
  11548. // "description": "The token returned by the previous request.",
  11549. // "location": "query",
  11550. // "type": "string"
  11551. // }
  11552. // },
  11553. // "path": "{merchantId}/datafeeds",
  11554. // "response": {
  11555. // "$ref": "DatafeedsListResponse"
  11556. // },
  11557. // "scopes": [
  11558. // "https://www.googleapis.com/auth/content"
  11559. // ]
  11560. // }
  11561. }
  11562. // Pages invokes f for each page of results.
  11563. // A non-nil error returned from f will halt the iteration.
  11564. // The provided context supersedes any context provided to the Context method.
  11565. func (c *DatafeedsListCall) Pages(ctx context.Context, f func(*DatafeedsListResponse) error) error {
  11566. c.ctx_ = ctx
  11567. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  11568. for {
  11569. x, err := c.Do()
  11570. if err != nil {
  11571. return err
  11572. }
  11573. if err := f(x); err != nil {
  11574. return err
  11575. }
  11576. if x.NextPageToken == "" {
  11577. return nil
  11578. }
  11579. c.PageToken(x.NextPageToken)
  11580. }
  11581. }
  11582. // method id "content.datafeeds.patch":
  11583. type DatafeedsPatchCall struct {
  11584. s *APIService
  11585. merchantId uint64
  11586. datafeedId uint64
  11587. datafeed *Datafeed
  11588. urlParams_ gensupport.URLParams
  11589. ctx_ context.Context
  11590. header_ http.Header
  11591. }
  11592. // Patch: Updates a datafeed configuration of your Merchant Center
  11593. // account. This method supports patch semantics.
  11594. func (r *DatafeedsService) Patch(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsPatchCall {
  11595. c := &DatafeedsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11596. c.merchantId = merchantId
  11597. c.datafeedId = datafeedId
  11598. c.datafeed = datafeed
  11599. return c
  11600. }
  11601. // DryRun sets the optional parameter "dryRun": Flag to run the request
  11602. // in dry-run mode.
  11603. func (c *DatafeedsPatchCall) DryRun(dryRun bool) *DatafeedsPatchCall {
  11604. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  11605. return c
  11606. }
  11607. // Fields allows partial responses to be retrieved. See
  11608. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11609. // for more information.
  11610. func (c *DatafeedsPatchCall) Fields(s ...googleapi.Field) *DatafeedsPatchCall {
  11611. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11612. return c
  11613. }
  11614. // Context sets the context to be used in this call's Do method. Any
  11615. // pending HTTP request will be aborted if the provided context is
  11616. // canceled.
  11617. func (c *DatafeedsPatchCall) Context(ctx context.Context) *DatafeedsPatchCall {
  11618. c.ctx_ = ctx
  11619. return c
  11620. }
  11621. // Header returns an http.Header that can be modified by the caller to
  11622. // add HTTP headers to the request.
  11623. func (c *DatafeedsPatchCall) Header() http.Header {
  11624. if c.header_ == nil {
  11625. c.header_ = make(http.Header)
  11626. }
  11627. return c.header_
  11628. }
  11629. func (c *DatafeedsPatchCall) doRequest(alt string) (*http.Response, error) {
  11630. reqHeaders := make(http.Header)
  11631. for k, v := range c.header_ {
  11632. reqHeaders[k] = v
  11633. }
  11634. reqHeaders.Set("User-Agent", c.s.userAgent())
  11635. var body io.Reader = nil
  11636. body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed)
  11637. if err != nil {
  11638. return nil, err
  11639. }
  11640. reqHeaders.Set("Content-Type", "application/json")
  11641. c.urlParams_.Set("alt", alt)
  11642. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}")
  11643. urls += "?" + c.urlParams_.Encode()
  11644. req, _ := http.NewRequest("PATCH", urls, body)
  11645. req.Header = reqHeaders
  11646. googleapi.Expand(req.URL, map[string]string{
  11647. "merchantId": strconv.FormatUint(c.merchantId, 10),
  11648. "datafeedId": strconv.FormatUint(c.datafeedId, 10),
  11649. })
  11650. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11651. }
  11652. // Do executes the "content.datafeeds.patch" call.
  11653. // Exactly one of *Datafeed or error will be non-nil. Any non-2xx status
  11654. // code is an error. Response headers are in either
  11655. // *Datafeed.ServerResponse.Header or (if a response was returned at
  11656. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11657. // to check whether the returned error was because
  11658. // http.StatusNotModified was returned.
  11659. func (c *DatafeedsPatchCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) {
  11660. gensupport.SetOptions(c.urlParams_, opts...)
  11661. res, err := c.doRequest("json")
  11662. if res != nil && res.StatusCode == http.StatusNotModified {
  11663. if res.Body != nil {
  11664. res.Body.Close()
  11665. }
  11666. return nil, &googleapi.Error{
  11667. Code: res.StatusCode,
  11668. Header: res.Header,
  11669. }
  11670. }
  11671. if err != nil {
  11672. return nil, err
  11673. }
  11674. defer googleapi.CloseBody(res)
  11675. if err := googleapi.CheckResponse(res); err != nil {
  11676. return nil, err
  11677. }
  11678. ret := &Datafeed{
  11679. ServerResponse: googleapi.ServerResponse{
  11680. Header: res.Header,
  11681. HTTPStatusCode: res.StatusCode,
  11682. },
  11683. }
  11684. target := &ret
  11685. if err := gensupport.DecodeResponse(target, res); err != nil {
  11686. return nil, err
  11687. }
  11688. return ret, nil
  11689. // {
  11690. // "description": "Updates a datafeed configuration of your Merchant Center account. This method supports patch semantics.",
  11691. // "httpMethod": "PATCH",
  11692. // "id": "content.datafeeds.patch",
  11693. // "parameterOrder": [
  11694. // "merchantId",
  11695. // "datafeedId"
  11696. // ],
  11697. // "parameters": {
  11698. // "datafeedId": {
  11699. // "description": "The ID of the datafeed.",
  11700. // "format": "uint64",
  11701. // "location": "path",
  11702. // "required": true,
  11703. // "type": "string"
  11704. // },
  11705. // "dryRun": {
  11706. // "description": "Flag to run the request in dry-run mode.",
  11707. // "location": "query",
  11708. // "type": "boolean"
  11709. // },
  11710. // "merchantId": {
  11711. // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
  11712. // "format": "uint64",
  11713. // "location": "path",
  11714. // "required": true,
  11715. // "type": "string"
  11716. // }
  11717. // },
  11718. // "path": "{merchantId}/datafeeds/{datafeedId}",
  11719. // "request": {
  11720. // "$ref": "Datafeed"
  11721. // },
  11722. // "response": {
  11723. // "$ref": "Datafeed"
  11724. // },
  11725. // "scopes": [
  11726. // "https://www.googleapis.com/auth/content"
  11727. // ]
  11728. // }
  11729. }
  11730. // method id "content.datafeeds.update":
  11731. type DatafeedsUpdateCall struct {
  11732. s *APIService
  11733. merchantId uint64
  11734. datafeedId uint64
  11735. datafeed *Datafeed
  11736. urlParams_ gensupport.URLParams
  11737. ctx_ context.Context
  11738. header_ http.Header
  11739. }
  11740. // Update: Updates a datafeed configuration of your Merchant Center
  11741. // account.
  11742. func (r *DatafeedsService) Update(merchantId uint64, datafeedId uint64, datafeed *Datafeed) *DatafeedsUpdateCall {
  11743. c := &DatafeedsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11744. c.merchantId = merchantId
  11745. c.datafeedId = datafeedId
  11746. c.datafeed = datafeed
  11747. return c
  11748. }
  11749. // DryRun sets the optional parameter "dryRun": Flag to run the request
  11750. // in dry-run mode.
  11751. func (c *DatafeedsUpdateCall) DryRun(dryRun bool) *DatafeedsUpdateCall {
  11752. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  11753. return c
  11754. }
  11755. // Fields allows partial responses to be retrieved. See
  11756. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11757. // for more information.
  11758. func (c *DatafeedsUpdateCall) Fields(s ...googleapi.Field) *DatafeedsUpdateCall {
  11759. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11760. return c
  11761. }
  11762. // Context sets the context to be used in this call's Do method. Any
  11763. // pending HTTP request will be aborted if the provided context is
  11764. // canceled.
  11765. func (c *DatafeedsUpdateCall) Context(ctx context.Context) *DatafeedsUpdateCall {
  11766. c.ctx_ = ctx
  11767. return c
  11768. }
  11769. // Header returns an http.Header that can be modified by the caller to
  11770. // add HTTP headers to the request.
  11771. func (c *DatafeedsUpdateCall) Header() http.Header {
  11772. if c.header_ == nil {
  11773. c.header_ = make(http.Header)
  11774. }
  11775. return c.header_
  11776. }
  11777. func (c *DatafeedsUpdateCall) doRequest(alt string) (*http.Response, error) {
  11778. reqHeaders := make(http.Header)
  11779. for k, v := range c.header_ {
  11780. reqHeaders[k] = v
  11781. }
  11782. reqHeaders.Set("User-Agent", c.s.userAgent())
  11783. var body io.Reader = nil
  11784. body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeed)
  11785. if err != nil {
  11786. return nil, err
  11787. }
  11788. reqHeaders.Set("Content-Type", "application/json")
  11789. c.urlParams_.Set("alt", alt)
  11790. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeeds/{datafeedId}")
  11791. urls += "?" + c.urlParams_.Encode()
  11792. req, _ := http.NewRequest("PUT", urls, body)
  11793. req.Header = reqHeaders
  11794. googleapi.Expand(req.URL, map[string]string{
  11795. "merchantId": strconv.FormatUint(c.merchantId, 10),
  11796. "datafeedId": strconv.FormatUint(c.datafeedId, 10),
  11797. })
  11798. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11799. }
  11800. // Do executes the "content.datafeeds.update" call.
  11801. // Exactly one of *Datafeed or error will be non-nil. Any non-2xx status
  11802. // code is an error. Response headers are in either
  11803. // *Datafeed.ServerResponse.Header or (if a response was returned at
  11804. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  11805. // to check whether the returned error was because
  11806. // http.StatusNotModified was returned.
  11807. func (c *DatafeedsUpdateCall) Do(opts ...googleapi.CallOption) (*Datafeed, error) {
  11808. gensupport.SetOptions(c.urlParams_, opts...)
  11809. res, err := c.doRequest("json")
  11810. if res != nil && res.StatusCode == http.StatusNotModified {
  11811. if res.Body != nil {
  11812. res.Body.Close()
  11813. }
  11814. return nil, &googleapi.Error{
  11815. Code: res.StatusCode,
  11816. Header: res.Header,
  11817. }
  11818. }
  11819. if err != nil {
  11820. return nil, err
  11821. }
  11822. defer googleapi.CloseBody(res)
  11823. if err := googleapi.CheckResponse(res); err != nil {
  11824. return nil, err
  11825. }
  11826. ret := &Datafeed{
  11827. ServerResponse: googleapi.ServerResponse{
  11828. Header: res.Header,
  11829. HTTPStatusCode: res.StatusCode,
  11830. },
  11831. }
  11832. target := &ret
  11833. if err := gensupport.DecodeResponse(target, res); err != nil {
  11834. return nil, err
  11835. }
  11836. return ret, nil
  11837. // {
  11838. // "description": "Updates a datafeed configuration of your Merchant Center account.",
  11839. // "httpMethod": "PUT",
  11840. // "id": "content.datafeeds.update",
  11841. // "parameterOrder": [
  11842. // "merchantId",
  11843. // "datafeedId"
  11844. // ],
  11845. // "parameters": {
  11846. // "datafeedId": {
  11847. // "description": "The ID of the datafeed.",
  11848. // "format": "uint64",
  11849. // "location": "path",
  11850. // "required": true,
  11851. // "type": "string"
  11852. // },
  11853. // "dryRun": {
  11854. // "description": "Flag to run the request in dry-run mode.",
  11855. // "location": "query",
  11856. // "type": "boolean"
  11857. // },
  11858. // "merchantId": {
  11859. // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
  11860. // "format": "uint64",
  11861. // "location": "path",
  11862. // "required": true,
  11863. // "type": "string"
  11864. // }
  11865. // },
  11866. // "path": "{merchantId}/datafeeds/{datafeedId}",
  11867. // "request": {
  11868. // "$ref": "Datafeed"
  11869. // },
  11870. // "response": {
  11871. // "$ref": "Datafeed"
  11872. // },
  11873. // "scopes": [
  11874. // "https://www.googleapis.com/auth/content"
  11875. // ]
  11876. // }
  11877. }
  11878. // method id "content.datafeedstatuses.custombatch":
  11879. type DatafeedstatusesCustombatchCall struct {
  11880. s *APIService
  11881. datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest
  11882. urlParams_ gensupport.URLParams
  11883. ctx_ context.Context
  11884. header_ http.Header
  11885. }
  11886. // Custombatch:
  11887. func (r *DatafeedstatusesService) Custombatch(datafeedstatusescustombatchrequest *DatafeedstatusesCustomBatchRequest) *DatafeedstatusesCustombatchCall {
  11888. c := &DatafeedstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  11889. c.datafeedstatusescustombatchrequest = datafeedstatusescustombatchrequest
  11890. return c
  11891. }
  11892. // Fields allows partial responses to be retrieved. See
  11893. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  11894. // for more information.
  11895. func (c *DatafeedstatusesCustombatchCall) Fields(s ...googleapi.Field) *DatafeedstatusesCustombatchCall {
  11896. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  11897. return c
  11898. }
  11899. // Context sets the context to be used in this call's Do method. Any
  11900. // pending HTTP request will be aborted if the provided context is
  11901. // canceled.
  11902. func (c *DatafeedstatusesCustombatchCall) Context(ctx context.Context) *DatafeedstatusesCustombatchCall {
  11903. c.ctx_ = ctx
  11904. return c
  11905. }
  11906. // Header returns an http.Header that can be modified by the caller to
  11907. // add HTTP headers to the request.
  11908. func (c *DatafeedstatusesCustombatchCall) Header() http.Header {
  11909. if c.header_ == nil {
  11910. c.header_ = make(http.Header)
  11911. }
  11912. return c.header_
  11913. }
  11914. func (c *DatafeedstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) {
  11915. reqHeaders := make(http.Header)
  11916. for k, v := range c.header_ {
  11917. reqHeaders[k] = v
  11918. }
  11919. reqHeaders.Set("User-Agent", c.s.userAgent())
  11920. var body io.Reader = nil
  11921. body, err := googleapi.WithoutDataWrapper.JSONReader(c.datafeedstatusescustombatchrequest)
  11922. if err != nil {
  11923. return nil, err
  11924. }
  11925. reqHeaders.Set("Content-Type", "application/json")
  11926. c.urlParams_.Set("alt", alt)
  11927. urls := googleapi.ResolveRelative(c.s.BasePath, "datafeedstatuses/batch")
  11928. urls += "?" + c.urlParams_.Encode()
  11929. req, _ := http.NewRequest("POST", urls, body)
  11930. req.Header = reqHeaders
  11931. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  11932. }
  11933. // Do executes the "content.datafeedstatuses.custombatch" call.
  11934. // Exactly one of *DatafeedstatusesCustomBatchResponse or error will be
  11935. // non-nil. Any non-2xx status code is an error. Response headers are in
  11936. // either *DatafeedstatusesCustomBatchResponse.ServerResponse.Header or
  11937. // (if a response was returned at all) in
  11938. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  11939. // whether the returned error was because http.StatusNotModified was
  11940. // returned.
  11941. func (c *DatafeedstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesCustomBatchResponse, error) {
  11942. gensupport.SetOptions(c.urlParams_, opts...)
  11943. res, err := c.doRequest("json")
  11944. if res != nil && res.StatusCode == http.StatusNotModified {
  11945. if res.Body != nil {
  11946. res.Body.Close()
  11947. }
  11948. return nil, &googleapi.Error{
  11949. Code: res.StatusCode,
  11950. Header: res.Header,
  11951. }
  11952. }
  11953. if err != nil {
  11954. return nil, err
  11955. }
  11956. defer googleapi.CloseBody(res)
  11957. if err := googleapi.CheckResponse(res); err != nil {
  11958. return nil, err
  11959. }
  11960. ret := &DatafeedstatusesCustomBatchResponse{
  11961. ServerResponse: googleapi.ServerResponse{
  11962. Header: res.Header,
  11963. HTTPStatusCode: res.StatusCode,
  11964. },
  11965. }
  11966. target := &ret
  11967. if err := gensupport.DecodeResponse(target, res); err != nil {
  11968. return nil, err
  11969. }
  11970. return ret, nil
  11971. // {
  11972. // "httpMethod": "POST",
  11973. // "id": "content.datafeedstatuses.custombatch",
  11974. // "path": "datafeedstatuses/batch",
  11975. // "request": {
  11976. // "$ref": "DatafeedstatusesCustomBatchRequest"
  11977. // },
  11978. // "response": {
  11979. // "$ref": "DatafeedstatusesCustomBatchResponse"
  11980. // },
  11981. // "scopes": [
  11982. // "https://www.googleapis.com/auth/content"
  11983. // ]
  11984. // }
  11985. }
  11986. // method id "content.datafeedstatuses.get":
  11987. type DatafeedstatusesGetCall struct {
  11988. s *APIService
  11989. merchantId uint64
  11990. datafeedId uint64
  11991. urlParams_ gensupport.URLParams
  11992. ifNoneMatch_ string
  11993. ctx_ context.Context
  11994. header_ http.Header
  11995. }
  11996. // Get: Retrieves the status of a datafeed from your Merchant Center
  11997. // account.
  11998. func (r *DatafeedstatusesService) Get(merchantId uint64, datafeedId uint64) *DatafeedstatusesGetCall {
  11999. c := &DatafeedstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12000. c.merchantId = merchantId
  12001. c.datafeedId = datafeedId
  12002. return c
  12003. }
  12004. // Country sets the optional parameter "country": The country for which
  12005. // to get the datafeed status. If this parameter is provided then
  12006. // language must also be provided. Note that this parameter is required
  12007. // for feeds targeting multiple countries and languages, since a feed
  12008. // may have a different status for each target.
  12009. func (c *DatafeedstatusesGetCall) Country(country string) *DatafeedstatusesGetCall {
  12010. c.urlParams_.Set("country", country)
  12011. return c
  12012. }
  12013. // Language sets the optional parameter "language": The language for
  12014. // which to get the datafeed status. If this parameter is provided then
  12015. // country must also be provided. Note that this parameter is required
  12016. // for feeds targeting multiple countries and languages, since a feed
  12017. // may have a different status for each target.
  12018. func (c *DatafeedstatusesGetCall) Language(language string) *DatafeedstatusesGetCall {
  12019. c.urlParams_.Set("language", language)
  12020. return c
  12021. }
  12022. // Fields allows partial responses to be retrieved. See
  12023. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12024. // for more information.
  12025. func (c *DatafeedstatusesGetCall) Fields(s ...googleapi.Field) *DatafeedstatusesGetCall {
  12026. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12027. return c
  12028. }
  12029. // IfNoneMatch sets the optional parameter which makes the operation
  12030. // fail if the object's ETag matches the given value. This is useful for
  12031. // getting updates only after the object has changed since the last
  12032. // request. Use googleapi.IsNotModified to check whether the response
  12033. // error from Do is the result of In-None-Match.
  12034. func (c *DatafeedstatusesGetCall) IfNoneMatch(entityTag string) *DatafeedstatusesGetCall {
  12035. c.ifNoneMatch_ = entityTag
  12036. return c
  12037. }
  12038. // Context sets the context to be used in this call's Do method. Any
  12039. // pending HTTP request will be aborted if the provided context is
  12040. // canceled.
  12041. func (c *DatafeedstatusesGetCall) Context(ctx context.Context) *DatafeedstatusesGetCall {
  12042. c.ctx_ = ctx
  12043. return c
  12044. }
  12045. // Header returns an http.Header that can be modified by the caller to
  12046. // add HTTP headers to the request.
  12047. func (c *DatafeedstatusesGetCall) Header() http.Header {
  12048. if c.header_ == nil {
  12049. c.header_ = make(http.Header)
  12050. }
  12051. return c.header_
  12052. }
  12053. func (c *DatafeedstatusesGetCall) doRequest(alt string) (*http.Response, error) {
  12054. reqHeaders := make(http.Header)
  12055. for k, v := range c.header_ {
  12056. reqHeaders[k] = v
  12057. }
  12058. reqHeaders.Set("User-Agent", c.s.userAgent())
  12059. if c.ifNoneMatch_ != "" {
  12060. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  12061. }
  12062. var body io.Reader = nil
  12063. c.urlParams_.Set("alt", alt)
  12064. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses/{datafeedId}")
  12065. urls += "?" + c.urlParams_.Encode()
  12066. req, _ := http.NewRequest("GET", urls, body)
  12067. req.Header = reqHeaders
  12068. googleapi.Expand(req.URL, map[string]string{
  12069. "merchantId": strconv.FormatUint(c.merchantId, 10),
  12070. "datafeedId": strconv.FormatUint(c.datafeedId, 10),
  12071. })
  12072. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12073. }
  12074. // Do executes the "content.datafeedstatuses.get" call.
  12075. // Exactly one of *DatafeedStatus or error will be non-nil. Any non-2xx
  12076. // status code is an error. Response headers are in either
  12077. // *DatafeedStatus.ServerResponse.Header or (if a response was returned
  12078. // at all) in error.(*googleapi.Error).Header. Use
  12079. // googleapi.IsNotModified to check whether the returned error was
  12080. // because http.StatusNotModified was returned.
  12081. func (c *DatafeedstatusesGetCall) Do(opts ...googleapi.CallOption) (*DatafeedStatus, error) {
  12082. gensupport.SetOptions(c.urlParams_, opts...)
  12083. res, err := c.doRequest("json")
  12084. if res != nil && res.StatusCode == http.StatusNotModified {
  12085. if res.Body != nil {
  12086. res.Body.Close()
  12087. }
  12088. return nil, &googleapi.Error{
  12089. Code: res.StatusCode,
  12090. Header: res.Header,
  12091. }
  12092. }
  12093. if err != nil {
  12094. return nil, err
  12095. }
  12096. defer googleapi.CloseBody(res)
  12097. if err := googleapi.CheckResponse(res); err != nil {
  12098. return nil, err
  12099. }
  12100. ret := &DatafeedStatus{
  12101. ServerResponse: googleapi.ServerResponse{
  12102. Header: res.Header,
  12103. HTTPStatusCode: res.StatusCode,
  12104. },
  12105. }
  12106. target := &ret
  12107. if err := gensupport.DecodeResponse(target, res); err != nil {
  12108. return nil, err
  12109. }
  12110. return ret, nil
  12111. // {
  12112. // "description": "Retrieves the status of a datafeed from your Merchant Center account.",
  12113. // "httpMethod": "GET",
  12114. // "id": "content.datafeedstatuses.get",
  12115. // "parameterOrder": [
  12116. // "merchantId",
  12117. // "datafeedId"
  12118. // ],
  12119. // "parameters": {
  12120. // "country": {
  12121. // "description": "The country for which to get the datafeed status. If this parameter is provided then language must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.",
  12122. // "location": "query",
  12123. // "type": "string"
  12124. // },
  12125. // "datafeedId": {
  12126. // "description": "The ID of the datafeed.",
  12127. // "format": "uint64",
  12128. // "location": "path",
  12129. // "required": true,
  12130. // "type": "string"
  12131. // },
  12132. // "language": {
  12133. // "description": "The language for which to get the datafeed status. If this parameter is provided then country must also be provided. Note that this parameter is required for feeds targeting multiple countries and languages, since a feed may have a different status for each target.",
  12134. // "location": "query",
  12135. // "type": "string"
  12136. // },
  12137. // "merchantId": {
  12138. // "description": "The ID of the account that manages the datafeed. This account cannot be a multi-client account.",
  12139. // "format": "uint64",
  12140. // "location": "path",
  12141. // "required": true,
  12142. // "type": "string"
  12143. // }
  12144. // },
  12145. // "path": "{merchantId}/datafeedstatuses/{datafeedId}",
  12146. // "response": {
  12147. // "$ref": "DatafeedStatus"
  12148. // },
  12149. // "scopes": [
  12150. // "https://www.googleapis.com/auth/content"
  12151. // ]
  12152. // }
  12153. }
  12154. // method id "content.datafeedstatuses.list":
  12155. type DatafeedstatusesListCall struct {
  12156. s *APIService
  12157. merchantId uint64
  12158. urlParams_ gensupport.URLParams
  12159. ifNoneMatch_ string
  12160. ctx_ context.Context
  12161. header_ http.Header
  12162. }
  12163. // List: Lists the statuses of the datafeeds in your Merchant Center
  12164. // account.
  12165. func (r *DatafeedstatusesService) List(merchantId uint64) *DatafeedstatusesListCall {
  12166. c := &DatafeedstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12167. c.merchantId = merchantId
  12168. return c
  12169. }
  12170. // MaxResults sets the optional parameter "maxResults": The maximum
  12171. // number of products to return in the response, used for paging.
  12172. func (c *DatafeedstatusesListCall) MaxResults(maxResults int64) *DatafeedstatusesListCall {
  12173. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  12174. return c
  12175. }
  12176. // PageToken sets the optional parameter "pageToken": The token returned
  12177. // by the previous request.
  12178. func (c *DatafeedstatusesListCall) PageToken(pageToken string) *DatafeedstatusesListCall {
  12179. c.urlParams_.Set("pageToken", pageToken)
  12180. return c
  12181. }
  12182. // Fields allows partial responses to be retrieved. See
  12183. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12184. // for more information.
  12185. func (c *DatafeedstatusesListCall) Fields(s ...googleapi.Field) *DatafeedstatusesListCall {
  12186. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12187. return c
  12188. }
  12189. // IfNoneMatch sets the optional parameter which makes the operation
  12190. // fail if the object's ETag matches the given value. This is useful for
  12191. // getting updates only after the object has changed since the last
  12192. // request. Use googleapi.IsNotModified to check whether the response
  12193. // error from Do is the result of In-None-Match.
  12194. func (c *DatafeedstatusesListCall) IfNoneMatch(entityTag string) *DatafeedstatusesListCall {
  12195. c.ifNoneMatch_ = entityTag
  12196. return c
  12197. }
  12198. // Context sets the context to be used in this call's Do method. Any
  12199. // pending HTTP request will be aborted if the provided context is
  12200. // canceled.
  12201. func (c *DatafeedstatusesListCall) Context(ctx context.Context) *DatafeedstatusesListCall {
  12202. c.ctx_ = ctx
  12203. return c
  12204. }
  12205. // Header returns an http.Header that can be modified by the caller to
  12206. // add HTTP headers to the request.
  12207. func (c *DatafeedstatusesListCall) Header() http.Header {
  12208. if c.header_ == nil {
  12209. c.header_ = make(http.Header)
  12210. }
  12211. return c.header_
  12212. }
  12213. func (c *DatafeedstatusesListCall) doRequest(alt string) (*http.Response, error) {
  12214. reqHeaders := make(http.Header)
  12215. for k, v := range c.header_ {
  12216. reqHeaders[k] = v
  12217. }
  12218. reqHeaders.Set("User-Agent", c.s.userAgent())
  12219. if c.ifNoneMatch_ != "" {
  12220. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  12221. }
  12222. var body io.Reader = nil
  12223. c.urlParams_.Set("alt", alt)
  12224. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/datafeedstatuses")
  12225. urls += "?" + c.urlParams_.Encode()
  12226. req, _ := http.NewRequest("GET", urls, body)
  12227. req.Header = reqHeaders
  12228. googleapi.Expand(req.URL, map[string]string{
  12229. "merchantId": strconv.FormatUint(c.merchantId, 10),
  12230. })
  12231. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12232. }
  12233. // Do executes the "content.datafeedstatuses.list" call.
  12234. // Exactly one of *DatafeedstatusesListResponse or error will be
  12235. // non-nil. Any non-2xx status code is an error. Response headers are in
  12236. // either *DatafeedstatusesListResponse.ServerResponse.Header or (if a
  12237. // response was returned at all) in error.(*googleapi.Error).Header. Use
  12238. // googleapi.IsNotModified to check whether the returned error was
  12239. // because http.StatusNotModified was returned.
  12240. func (c *DatafeedstatusesListCall) Do(opts ...googleapi.CallOption) (*DatafeedstatusesListResponse, error) {
  12241. gensupport.SetOptions(c.urlParams_, opts...)
  12242. res, err := c.doRequest("json")
  12243. if res != nil && res.StatusCode == http.StatusNotModified {
  12244. if res.Body != nil {
  12245. res.Body.Close()
  12246. }
  12247. return nil, &googleapi.Error{
  12248. Code: res.StatusCode,
  12249. Header: res.Header,
  12250. }
  12251. }
  12252. if err != nil {
  12253. return nil, err
  12254. }
  12255. defer googleapi.CloseBody(res)
  12256. if err := googleapi.CheckResponse(res); err != nil {
  12257. return nil, err
  12258. }
  12259. ret := &DatafeedstatusesListResponse{
  12260. ServerResponse: googleapi.ServerResponse{
  12261. Header: res.Header,
  12262. HTTPStatusCode: res.StatusCode,
  12263. },
  12264. }
  12265. target := &ret
  12266. if err := gensupport.DecodeResponse(target, res); err != nil {
  12267. return nil, err
  12268. }
  12269. return ret, nil
  12270. // {
  12271. // "description": "Lists the statuses of the datafeeds in your Merchant Center account.",
  12272. // "httpMethod": "GET",
  12273. // "id": "content.datafeedstatuses.list",
  12274. // "parameterOrder": [
  12275. // "merchantId"
  12276. // ],
  12277. // "parameters": {
  12278. // "maxResults": {
  12279. // "description": "The maximum number of products to return in the response, used for paging.",
  12280. // "format": "uint32",
  12281. // "location": "query",
  12282. // "type": "integer"
  12283. // },
  12284. // "merchantId": {
  12285. // "description": "The ID of the account that manages the datafeeds. This account cannot be a multi-client account.",
  12286. // "format": "uint64",
  12287. // "location": "path",
  12288. // "required": true,
  12289. // "type": "string"
  12290. // },
  12291. // "pageToken": {
  12292. // "description": "The token returned by the previous request.",
  12293. // "location": "query",
  12294. // "type": "string"
  12295. // }
  12296. // },
  12297. // "path": "{merchantId}/datafeedstatuses",
  12298. // "response": {
  12299. // "$ref": "DatafeedstatusesListResponse"
  12300. // },
  12301. // "scopes": [
  12302. // "https://www.googleapis.com/auth/content"
  12303. // ]
  12304. // }
  12305. }
  12306. // Pages invokes f for each page of results.
  12307. // A non-nil error returned from f will halt the iteration.
  12308. // The provided context supersedes any context provided to the Context method.
  12309. func (c *DatafeedstatusesListCall) Pages(ctx context.Context, f func(*DatafeedstatusesListResponse) error) error {
  12310. c.ctx_ = ctx
  12311. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  12312. for {
  12313. x, err := c.Do()
  12314. if err != nil {
  12315. return err
  12316. }
  12317. if err := f(x); err != nil {
  12318. return err
  12319. }
  12320. if x.NextPageToken == "" {
  12321. return nil
  12322. }
  12323. c.PageToken(x.NextPageToken)
  12324. }
  12325. }
  12326. // method id "content.inventory.custombatch":
  12327. type InventoryCustombatchCall struct {
  12328. s *APIService
  12329. inventorycustombatchrequest *InventoryCustomBatchRequest
  12330. urlParams_ gensupport.URLParams
  12331. ctx_ context.Context
  12332. header_ http.Header
  12333. }
  12334. // Custombatch: Updates price and availability for multiple products or
  12335. // stores in a single request. This operation does not update the
  12336. // expiration date of the products.
  12337. func (r *InventoryService) Custombatch(inventorycustombatchrequest *InventoryCustomBatchRequest) *InventoryCustombatchCall {
  12338. c := &InventoryCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12339. c.inventorycustombatchrequest = inventorycustombatchrequest
  12340. return c
  12341. }
  12342. // DryRun sets the optional parameter "dryRun": Flag to run the request
  12343. // in dry-run mode.
  12344. func (c *InventoryCustombatchCall) DryRun(dryRun bool) *InventoryCustombatchCall {
  12345. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  12346. return c
  12347. }
  12348. // Fields allows partial responses to be retrieved. See
  12349. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12350. // for more information.
  12351. func (c *InventoryCustombatchCall) Fields(s ...googleapi.Field) *InventoryCustombatchCall {
  12352. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12353. return c
  12354. }
  12355. // Context sets the context to be used in this call's Do method. Any
  12356. // pending HTTP request will be aborted if the provided context is
  12357. // canceled.
  12358. func (c *InventoryCustombatchCall) Context(ctx context.Context) *InventoryCustombatchCall {
  12359. c.ctx_ = ctx
  12360. return c
  12361. }
  12362. // Header returns an http.Header that can be modified by the caller to
  12363. // add HTTP headers to the request.
  12364. func (c *InventoryCustombatchCall) Header() http.Header {
  12365. if c.header_ == nil {
  12366. c.header_ = make(http.Header)
  12367. }
  12368. return c.header_
  12369. }
  12370. func (c *InventoryCustombatchCall) doRequest(alt string) (*http.Response, error) {
  12371. reqHeaders := make(http.Header)
  12372. for k, v := range c.header_ {
  12373. reqHeaders[k] = v
  12374. }
  12375. reqHeaders.Set("User-Agent", c.s.userAgent())
  12376. var body io.Reader = nil
  12377. body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorycustombatchrequest)
  12378. if err != nil {
  12379. return nil, err
  12380. }
  12381. reqHeaders.Set("Content-Type", "application/json")
  12382. c.urlParams_.Set("alt", alt)
  12383. urls := googleapi.ResolveRelative(c.s.BasePath, "inventory/batch")
  12384. urls += "?" + c.urlParams_.Encode()
  12385. req, _ := http.NewRequest("POST", urls, body)
  12386. req.Header = reqHeaders
  12387. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12388. }
  12389. // Do executes the "content.inventory.custombatch" call.
  12390. // Exactly one of *InventoryCustomBatchResponse or error will be
  12391. // non-nil. Any non-2xx status code is an error. Response headers are in
  12392. // either *InventoryCustomBatchResponse.ServerResponse.Header or (if a
  12393. // response was returned at all) in error.(*googleapi.Error).Header. Use
  12394. // googleapi.IsNotModified to check whether the returned error was
  12395. // because http.StatusNotModified was returned.
  12396. func (c *InventoryCustombatchCall) Do(opts ...googleapi.CallOption) (*InventoryCustomBatchResponse, error) {
  12397. gensupport.SetOptions(c.urlParams_, opts...)
  12398. res, err := c.doRequest("json")
  12399. if res != nil && res.StatusCode == http.StatusNotModified {
  12400. if res.Body != nil {
  12401. res.Body.Close()
  12402. }
  12403. return nil, &googleapi.Error{
  12404. Code: res.StatusCode,
  12405. Header: res.Header,
  12406. }
  12407. }
  12408. if err != nil {
  12409. return nil, err
  12410. }
  12411. defer googleapi.CloseBody(res)
  12412. if err := googleapi.CheckResponse(res); err != nil {
  12413. return nil, err
  12414. }
  12415. ret := &InventoryCustomBatchResponse{
  12416. ServerResponse: googleapi.ServerResponse{
  12417. Header: res.Header,
  12418. HTTPStatusCode: res.StatusCode,
  12419. },
  12420. }
  12421. target := &ret
  12422. if err := gensupport.DecodeResponse(target, res); err != nil {
  12423. return nil, err
  12424. }
  12425. return ret, nil
  12426. // {
  12427. // "description": "Updates price and availability for multiple products or stores in a single request. This operation does not update the expiration date of the products.",
  12428. // "httpMethod": "POST",
  12429. // "id": "content.inventory.custombatch",
  12430. // "parameters": {
  12431. // "dryRun": {
  12432. // "description": "Flag to run the request in dry-run mode.",
  12433. // "location": "query",
  12434. // "type": "boolean"
  12435. // }
  12436. // },
  12437. // "path": "inventory/batch",
  12438. // "request": {
  12439. // "$ref": "InventoryCustomBatchRequest"
  12440. // },
  12441. // "response": {
  12442. // "$ref": "InventoryCustomBatchResponse"
  12443. // },
  12444. // "scopes": [
  12445. // "https://www.googleapis.com/auth/content"
  12446. // ]
  12447. // }
  12448. }
  12449. // method id "content.inventory.set":
  12450. type InventorySetCall struct {
  12451. s *APIService
  12452. merchantId uint64
  12453. storeCode string
  12454. productId string
  12455. inventorysetrequest *InventorySetRequest
  12456. urlParams_ gensupport.URLParams
  12457. ctx_ context.Context
  12458. header_ http.Header
  12459. }
  12460. // Set: Updates price and availability of a product in your Merchant
  12461. // Center account.
  12462. func (r *InventoryService) Set(merchantId uint64, storeCode string, productId string, inventorysetrequest *InventorySetRequest) *InventorySetCall {
  12463. c := &InventorySetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12464. c.merchantId = merchantId
  12465. c.storeCode = storeCode
  12466. c.productId = productId
  12467. c.inventorysetrequest = inventorysetrequest
  12468. return c
  12469. }
  12470. // DryRun sets the optional parameter "dryRun": Flag to run the request
  12471. // in dry-run mode.
  12472. func (c *InventorySetCall) DryRun(dryRun bool) *InventorySetCall {
  12473. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  12474. return c
  12475. }
  12476. // Fields allows partial responses to be retrieved. See
  12477. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12478. // for more information.
  12479. func (c *InventorySetCall) Fields(s ...googleapi.Field) *InventorySetCall {
  12480. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12481. return c
  12482. }
  12483. // Context sets the context to be used in this call's Do method. Any
  12484. // pending HTTP request will be aborted if the provided context is
  12485. // canceled.
  12486. func (c *InventorySetCall) Context(ctx context.Context) *InventorySetCall {
  12487. c.ctx_ = ctx
  12488. return c
  12489. }
  12490. // Header returns an http.Header that can be modified by the caller to
  12491. // add HTTP headers to the request.
  12492. func (c *InventorySetCall) Header() http.Header {
  12493. if c.header_ == nil {
  12494. c.header_ = make(http.Header)
  12495. }
  12496. return c.header_
  12497. }
  12498. func (c *InventorySetCall) doRequest(alt string) (*http.Response, error) {
  12499. reqHeaders := make(http.Header)
  12500. for k, v := range c.header_ {
  12501. reqHeaders[k] = v
  12502. }
  12503. reqHeaders.Set("User-Agent", c.s.userAgent())
  12504. var body io.Reader = nil
  12505. body, err := googleapi.WithoutDataWrapper.JSONReader(c.inventorysetrequest)
  12506. if err != nil {
  12507. return nil, err
  12508. }
  12509. reqHeaders.Set("Content-Type", "application/json")
  12510. c.urlParams_.Set("alt", alt)
  12511. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/inventory/{storeCode}/products/{productId}")
  12512. urls += "?" + c.urlParams_.Encode()
  12513. req, _ := http.NewRequest("POST", urls, body)
  12514. req.Header = reqHeaders
  12515. googleapi.Expand(req.URL, map[string]string{
  12516. "merchantId": strconv.FormatUint(c.merchantId, 10),
  12517. "storeCode": c.storeCode,
  12518. "productId": c.productId,
  12519. })
  12520. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12521. }
  12522. // Do executes the "content.inventory.set" call.
  12523. // Exactly one of *InventorySetResponse or error will be non-nil. Any
  12524. // non-2xx status code is an error. Response headers are in either
  12525. // *InventorySetResponse.ServerResponse.Header or (if a response was
  12526. // returned at all) in error.(*googleapi.Error).Header. Use
  12527. // googleapi.IsNotModified to check whether the returned error was
  12528. // because http.StatusNotModified was returned.
  12529. func (c *InventorySetCall) Do(opts ...googleapi.CallOption) (*InventorySetResponse, error) {
  12530. gensupport.SetOptions(c.urlParams_, opts...)
  12531. res, err := c.doRequest("json")
  12532. if res != nil && res.StatusCode == http.StatusNotModified {
  12533. if res.Body != nil {
  12534. res.Body.Close()
  12535. }
  12536. return nil, &googleapi.Error{
  12537. Code: res.StatusCode,
  12538. Header: res.Header,
  12539. }
  12540. }
  12541. if err != nil {
  12542. return nil, err
  12543. }
  12544. defer googleapi.CloseBody(res)
  12545. if err := googleapi.CheckResponse(res); err != nil {
  12546. return nil, err
  12547. }
  12548. ret := &InventorySetResponse{
  12549. ServerResponse: googleapi.ServerResponse{
  12550. Header: res.Header,
  12551. HTTPStatusCode: res.StatusCode,
  12552. },
  12553. }
  12554. target := &ret
  12555. if err := gensupport.DecodeResponse(target, res); err != nil {
  12556. return nil, err
  12557. }
  12558. return ret, nil
  12559. // {
  12560. // "description": "Updates price and availability of a product in your Merchant Center account.",
  12561. // "httpMethod": "POST",
  12562. // "id": "content.inventory.set",
  12563. // "parameterOrder": [
  12564. // "merchantId",
  12565. // "storeCode",
  12566. // "productId"
  12567. // ],
  12568. // "parameters": {
  12569. // "dryRun": {
  12570. // "description": "Flag to run the request in dry-run mode.",
  12571. // "location": "query",
  12572. // "type": "boolean"
  12573. // },
  12574. // "merchantId": {
  12575. // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
  12576. // "format": "uint64",
  12577. // "location": "path",
  12578. // "required": true,
  12579. // "type": "string"
  12580. // },
  12581. // "productId": {
  12582. // "description": "The REST id of the product for which to update price and availability.",
  12583. // "location": "path",
  12584. // "required": true,
  12585. // "type": "string"
  12586. // },
  12587. // "storeCode": {
  12588. // "description": "The code of the store for which to update price and availability. Use online to update price and availability of an online product.",
  12589. // "location": "path",
  12590. // "required": true,
  12591. // "type": "string"
  12592. // }
  12593. // },
  12594. // "path": "{merchantId}/inventory/{storeCode}/products/{productId}",
  12595. // "request": {
  12596. // "$ref": "InventorySetRequest"
  12597. // },
  12598. // "response": {
  12599. // "$ref": "InventorySetResponse"
  12600. // },
  12601. // "scopes": [
  12602. // "https://www.googleapis.com/auth/content"
  12603. // ]
  12604. // }
  12605. }
  12606. // method id "content.liasettings.custombatch":
  12607. type LiasettingsCustombatchCall struct {
  12608. s *APIService
  12609. liasettingscustombatchrequest *LiasettingsCustomBatchRequest
  12610. urlParams_ gensupport.URLParams
  12611. ctx_ context.Context
  12612. header_ http.Header
  12613. }
  12614. // Custombatch: Retrieves and/or updates the LIA settings of multiple
  12615. // accounts in a single request.
  12616. func (r *LiasettingsService) Custombatch(liasettingscustombatchrequest *LiasettingsCustomBatchRequest) *LiasettingsCustombatchCall {
  12617. c := &LiasettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12618. c.liasettingscustombatchrequest = liasettingscustombatchrequest
  12619. return c
  12620. }
  12621. // DryRun sets the optional parameter "dryRun": Flag to run the request
  12622. // in dry-run mode.
  12623. func (c *LiasettingsCustombatchCall) DryRun(dryRun bool) *LiasettingsCustombatchCall {
  12624. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  12625. return c
  12626. }
  12627. // Fields allows partial responses to be retrieved. See
  12628. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12629. // for more information.
  12630. func (c *LiasettingsCustombatchCall) Fields(s ...googleapi.Field) *LiasettingsCustombatchCall {
  12631. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12632. return c
  12633. }
  12634. // Context sets the context to be used in this call's Do method. Any
  12635. // pending HTTP request will be aborted if the provided context is
  12636. // canceled.
  12637. func (c *LiasettingsCustombatchCall) Context(ctx context.Context) *LiasettingsCustombatchCall {
  12638. c.ctx_ = ctx
  12639. return c
  12640. }
  12641. // Header returns an http.Header that can be modified by the caller to
  12642. // add HTTP headers to the request.
  12643. func (c *LiasettingsCustombatchCall) Header() http.Header {
  12644. if c.header_ == nil {
  12645. c.header_ = make(http.Header)
  12646. }
  12647. return c.header_
  12648. }
  12649. func (c *LiasettingsCustombatchCall) doRequest(alt string) (*http.Response, error) {
  12650. reqHeaders := make(http.Header)
  12651. for k, v := range c.header_ {
  12652. reqHeaders[k] = v
  12653. }
  12654. reqHeaders.Set("User-Agent", c.s.userAgent())
  12655. var body io.Reader = nil
  12656. body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettingscustombatchrequest)
  12657. if err != nil {
  12658. return nil, err
  12659. }
  12660. reqHeaders.Set("Content-Type", "application/json")
  12661. c.urlParams_.Set("alt", alt)
  12662. urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/batch")
  12663. urls += "?" + c.urlParams_.Encode()
  12664. req, _ := http.NewRequest("POST", urls, body)
  12665. req.Header = reqHeaders
  12666. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12667. }
  12668. // Do executes the "content.liasettings.custombatch" call.
  12669. // Exactly one of *LiasettingsCustomBatchResponse or error will be
  12670. // non-nil. Any non-2xx status code is an error. Response headers are in
  12671. // either *LiasettingsCustomBatchResponse.ServerResponse.Header or (if a
  12672. // response was returned at all) in error.(*googleapi.Error).Header. Use
  12673. // googleapi.IsNotModified to check whether the returned error was
  12674. // because http.StatusNotModified was returned.
  12675. func (c *LiasettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*LiasettingsCustomBatchResponse, error) {
  12676. gensupport.SetOptions(c.urlParams_, opts...)
  12677. res, err := c.doRequest("json")
  12678. if res != nil && res.StatusCode == http.StatusNotModified {
  12679. if res.Body != nil {
  12680. res.Body.Close()
  12681. }
  12682. return nil, &googleapi.Error{
  12683. Code: res.StatusCode,
  12684. Header: res.Header,
  12685. }
  12686. }
  12687. if err != nil {
  12688. return nil, err
  12689. }
  12690. defer googleapi.CloseBody(res)
  12691. if err := googleapi.CheckResponse(res); err != nil {
  12692. return nil, err
  12693. }
  12694. ret := &LiasettingsCustomBatchResponse{
  12695. ServerResponse: googleapi.ServerResponse{
  12696. Header: res.Header,
  12697. HTTPStatusCode: res.StatusCode,
  12698. },
  12699. }
  12700. target := &ret
  12701. if err := gensupport.DecodeResponse(target, res); err != nil {
  12702. return nil, err
  12703. }
  12704. return ret, nil
  12705. // {
  12706. // "description": "Retrieves and/or updates the LIA settings of multiple accounts in a single request.",
  12707. // "httpMethod": "POST",
  12708. // "id": "content.liasettings.custombatch",
  12709. // "parameters": {
  12710. // "dryRun": {
  12711. // "description": "Flag to run the request in dry-run mode.",
  12712. // "location": "query",
  12713. // "type": "boolean"
  12714. // }
  12715. // },
  12716. // "path": "liasettings/batch",
  12717. // "request": {
  12718. // "$ref": "LiasettingsCustomBatchRequest"
  12719. // },
  12720. // "response": {
  12721. // "$ref": "LiasettingsCustomBatchResponse"
  12722. // },
  12723. // "scopes": [
  12724. // "https://www.googleapis.com/auth/content"
  12725. // ]
  12726. // }
  12727. }
  12728. // method id "content.liasettings.get":
  12729. type LiasettingsGetCall struct {
  12730. s *APIService
  12731. merchantId uint64
  12732. accountId uint64
  12733. urlParams_ gensupport.URLParams
  12734. ifNoneMatch_ string
  12735. ctx_ context.Context
  12736. header_ http.Header
  12737. }
  12738. // Get: Retrieves the LIA settings of the account.
  12739. func (r *LiasettingsService) Get(merchantId uint64, accountId uint64) *LiasettingsGetCall {
  12740. c := &LiasettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12741. c.merchantId = merchantId
  12742. c.accountId = accountId
  12743. return c
  12744. }
  12745. // Fields allows partial responses to be retrieved. See
  12746. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12747. // for more information.
  12748. func (c *LiasettingsGetCall) Fields(s ...googleapi.Field) *LiasettingsGetCall {
  12749. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12750. return c
  12751. }
  12752. // IfNoneMatch sets the optional parameter which makes the operation
  12753. // fail if the object's ETag matches the given value. This is useful for
  12754. // getting updates only after the object has changed since the last
  12755. // request. Use googleapi.IsNotModified to check whether the response
  12756. // error from Do is the result of In-None-Match.
  12757. func (c *LiasettingsGetCall) IfNoneMatch(entityTag string) *LiasettingsGetCall {
  12758. c.ifNoneMatch_ = entityTag
  12759. return c
  12760. }
  12761. // Context sets the context to be used in this call's Do method. Any
  12762. // pending HTTP request will be aborted if the provided context is
  12763. // canceled.
  12764. func (c *LiasettingsGetCall) Context(ctx context.Context) *LiasettingsGetCall {
  12765. c.ctx_ = ctx
  12766. return c
  12767. }
  12768. // Header returns an http.Header that can be modified by the caller to
  12769. // add HTTP headers to the request.
  12770. func (c *LiasettingsGetCall) Header() http.Header {
  12771. if c.header_ == nil {
  12772. c.header_ = make(http.Header)
  12773. }
  12774. return c.header_
  12775. }
  12776. func (c *LiasettingsGetCall) doRequest(alt string) (*http.Response, error) {
  12777. reqHeaders := make(http.Header)
  12778. for k, v := range c.header_ {
  12779. reqHeaders[k] = v
  12780. }
  12781. reqHeaders.Set("User-Agent", c.s.userAgent())
  12782. if c.ifNoneMatch_ != "" {
  12783. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  12784. }
  12785. var body io.Reader = nil
  12786. c.urlParams_.Set("alt", alt)
  12787. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}")
  12788. urls += "?" + c.urlParams_.Encode()
  12789. req, _ := http.NewRequest("GET", urls, body)
  12790. req.Header = reqHeaders
  12791. googleapi.Expand(req.URL, map[string]string{
  12792. "merchantId": strconv.FormatUint(c.merchantId, 10),
  12793. "accountId": strconv.FormatUint(c.accountId, 10),
  12794. })
  12795. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12796. }
  12797. // Do executes the "content.liasettings.get" call.
  12798. // Exactly one of *LiaSettings or error will be non-nil. Any non-2xx
  12799. // status code is an error. Response headers are in either
  12800. // *LiaSettings.ServerResponse.Header or (if a response was returned at
  12801. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  12802. // to check whether the returned error was because
  12803. // http.StatusNotModified was returned.
  12804. func (c *LiasettingsGetCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) {
  12805. gensupport.SetOptions(c.urlParams_, opts...)
  12806. res, err := c.doRequest("json")
  12807. if res != nil && res.StatusCode == http.StatusNotModified {
  12808. if res.Body != nil {
  12809. res.Body.Close()
  12810. }
  12811. return nil, &googleapi.Error{
  12812. Code: res.StatusCode,
  12813. Header: res.Header,
  12814. }
  12815. }
  12816. if err != nil {
  12817. return nil, err
  12818. }
  12819. defer googleapi.CloseBody(res)
  12820. if err := googleapi.CheckResponse(res); err != nil {
  12821. return nil, err
  12822. }
  12823. ret := &LiaSettings{
  12824. ServerResponse: googleapi.ServerResponse{
  12825. Header: res.Header,
  12826. HTTPStatusCode: res.StatusCode,
  12827. },
  12828. }
  12829. target := &ret
  12830. if err := gensupport.DecodeResponse(target, res); err != nil {
  12831. return nil, err
  12832. }
  12833. return ret, nil
  12834. // {
  12835. // "description": "Retrieves the LIA settings of the account.",
  12836. // "httpMethod": "GET",
  12837. // "id": "content.liasettings.get",
  12838. // "parameterOrder": [
  12839. // "merchantId",
  12840. // "accountId"
  12841. // ],
  12842. // "parameters": {
  12843. // "accountId": {
  12844. // "description": "The ID of the account for which to get or update LIA settings.",
  12845. // "format": "uint64",
  12846. // "location": "path",
  12847. // "required": true,
  12848. // "type": "string"
  12849. // },
  12850. // "merchantId": {
  12851. // "description": "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.",
  12852. // "format": "uint64",
  12853. // "location": "path",
  12854. // "required": true,
  12855. // "type": "string"
  12856. // }
  12857. // },
  12858. // "path": "{merchantId}/liasettings/{accountId}",
  12859. // "response": {
  12860. // "$ref": "LiaSettings"
  12861. // },
  12862. // "scopes": [
  12863. // "https://www.googleapis.com/auth/content"
  12864. // ]
  12865. // }
  12866. }
  12867. // method id "content.liasettings.getaccessiblegmbaccounts":
  12868. type LiasettingsGetaccessiblegmbaccountsCall struct {
  12869. s *APIService
  12870. merchantId uint64
  12871. accountId uint64
  12872. urlParams_ gensupport.URLParams
  12873. ifNoneMatch_ string
  12874. ctx_ context.Context
  12875. header_ http.Header
  12876. }
  12877. // Getaccessiblegmbaccounts: Retrieves the list of accessible Google My
  12878. // Business accounts.
  12879. func (r *LiasettingsService) Getaccessiblegmbaccounts(merchantId uint64, accountId uint64) *LiasettingsGetaccessiblegmbaccountsCall {
  12880. c := &LiasettingsGetaccessiblegmbaccountsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  12881. c.merchantId = merchantId
  12882. c.accountId = accountId
  12883. return c
  12884. }
  12885. // Fields allows partial responses to be retrieved. See
  12886. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  12887. // for more information.
  12888. func (c *LiasettingsGetaccessiblegmbaccountsCall) Fields(s ...googleapi.Field) *LiasettingsGetaccessiblegmbaccountsCall {
  12889. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  12890. return c
  12891. }
  12892. // IfNoneMatch sets the optional parameter which makes the operation
  12893. // fail if the object's ETag matches the given value. This is useful for
  12894. // getting updates only after the object has changed since the last
  12895. // request. Use googleapi.IsNotModified to check whether the response
  12896. // error from Do is the result of In-None-Match.
  12897. func (c *LiasettingsGetaccessiblegmbaccountsCall) IfNoneMatch(entityTag string) *LiasettingsGetaccessiblegmbaccountsCall {
  12898. c.ifNoneMatch_ = entityTag
  12899. return c
  12900. }
  12901. // Context sets the context to be used in this call's Do method. Any
  12902. // pending HTTP request will be aborted if the provided context is
  12903. // canceled.
  12904. func (c *LiasettingsGetaccessiblegmbaccountsCall) Context(ctx context.Context) *LiasettingsGetaccessiblegmbaccountsCall {
  12905. c.ctx_ = ctx
  12906. return c
  12907. }
  12908. // Header returns an http.Header that can be modified by the caller to
  12909. // add HTTP headers to the request.
  12910. func (c *LiasettingsGetaccessiblegmbaccountsCall) Header() http.Header {
  12911. if c.header_ == nil {
  12912. c.header_ = make(http.Header)
  12913. }
  12914. return c.header_
  12915. }
  12916. func (c *LiasettingsGetaccessiblegmbaccountsCall) doRequest(alt string) (*http.Response, error) {
  12917. reqHeaders := make(http.Header)
  12918. for k, v := range c.header_ {
  12919. reqHeaders[k] = v
  12920. }
  12921. reqHeaders.Set("User-Agent", c.s.userAgent())
  12922. if c.ifNoneMatch_ != "" {
  12923. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  12924. }
  12925. var body io.Reader = nil
  12926. c.urlParams_.Set("alt", alt)
  12927. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts")
  12928. urls += "?" + c.urlParams_.Encode()
  12929. req, _ := http.NewRequest("GET", urls, body)
  12930. req.Header = reqHeaders
  12931. googleapi.Expand(req.URL, map[string]string{
  12932. "merchantId": strconv.FormatUint(c.merchantId, 10),
  12933. "accountId": strconv.FormatUint(c.accountId, 10),
  12934. })
  12935. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  12936. }
  12937. // Do executes the "content.liasettings.getaccessiblegmbaccounts" call.
  12938. // Exactly one of *LiasettingsGetAccessibleGmbAccountsResponse or error
  12939. // will be non-nil. Any non-2xx status code is an error. Response
  12940. // headers are in either
  12941. // *LiasettingsGetAccessibleGmbAccountsResponse.ServerResponse.Header or
  12942. // (if a response was returned at all) in
  12943. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  12944. // whether the returned error was because http.StatusNotModified was
  12945. // returned.
  12946. func (c *LiasettingsGetaccessiblegmbaccountsCall) Do(opts ...googleapi.CallOption) (*LiasettingsGetAccessibleGmbAccountsResponse, error) {
  12947. gensupport.SetOptions(c.urlParams_, opts...)
  12948. res, err := c.doRequest("json")
  12949. if res != nil && res.StatusCode == http.StatusNotModified {
  12950. if res.Body != nil {
  12951. res.Body.Close()
  12952. }
  12953. return nil, &googleapi.Error{
  12954. Code: res.StatusCode,
  12955. Header: res.Header,
  12956. }
  12957. }
  12958. if err != nil {
  12959. return nil, err
  12960. }
  12961. defer googleapi.CloseBody(res)
  12962. if err := googleapi.CheckResponse(res); err != nil {
  12963. return nil, err
  12964. }
  12965. ret := &LiasettingsGetAccessibleGmbAccountsResponse{
  12966. ServerResponse: googleapi.ServerResponse{
  12967. Header: res.Header,
  12968. HTTPStatusCode: res.StatusCode,
  12969. },
  12970. }
  12971. target := &ret
  12972. if err := gensupport.DecodeResponse(target, res); err != nil {
  12973. return nil, err
  12974. }
  12975. return ret, nil
  12976. // {
  12977. // "description": "Retrieves the list of accessible Google My Business accounts.",
  12978. // "httpMethod": "GET",
  12979. // "id": "content.liasettings.getaccessiblegmbaccounts",
  12980. // "parameterOrder": [
  12981. // "merchantId",
  12982. // "accountId"
  12983. // ],
  12984. // "parameters": {
  12985. // "accountId": {
  12986. // "description": "The ID of the account for which to retrieve accessible Google My Business accounts.",
  12987. // "format": "uint64",
  12988. // "location": "path",
  12989. // "required": true,
  12990. // "type": "string"
  12991. // },
  12992. // "merchantId": {
  12993. // "description": "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.",
  12994. // "format": "uint64",
  12995. // "location": "path",
  12996. // "required": true,
  12997. // "type": "string"
  12998. // }
  12999. // },
  13000. // "path": "{merchantId}/liasettings/{accountId}/accessiblegmbaccounts",
  13001. // "response": {
  13002. // "$ref": "LiasettingsGetAccessibleGmbAccountsResponse"
  13003. // },
  13004. // "scopes": [
  13005. // "https://www.googleapis.com/auth/content"
  13006. // ]
  13007. // }
  13008. }
  13009. // method id "content.liasettings.list":
  13010. type LiasettingsListCall struct {
  13011. s *APIService
  13012. merchantId uint64
  13013. urlParams_ gensupport.URLParams
  13014. ifNoneMatch_ string
  13015. ctx_ context.Context
  13016. header_ http.Header
  13017. }
  13018. // List: Lists the LIA settings of the sub-accounts in your Merchant
  13019. // Center account.
  13020. func (r *LiasettingsService) List(merchantId uint64) *LiasettingsListCall {
  13021. c := &LiasettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13022. c.merchantId = merchantId
  13023. return c
  13024. }
  13025. // MaxResults sets the optional parameter "maxResults": The maximum
  13026. // number of LIA settings to return in the response, used for paging.
  13027. func (c *LiasettingsListCall) MaxResults(maxResults int64) *LiasettingsListCall {
  13028. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  13029. return c
  13030. }
  13031. // PageToken sets the optional parameter "pageToken": The token returned
  13032. // by the previous request.
  13033. func (c *LiasettingsListCall) PageToken(pageToken string) *LiasettingsListCall {
  13034. c.urlParams_.Set("pageToken", pageToken)
  13035. return c
  13036. }
  13037. // Fields allows partial responses to be retrieved. See
  13038. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13039. // for more information.
  13040. func (c *LiasettingsListCall) Fields(s ...googleapi.Field) *LiasettingsListCall {
  13041. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13042. return c
  13043. }
  13044. // IfNoneMatch sets the optional parameter which makes the operation
  13045. // fail if the object's ETag matches the given value. This is useful for
  13046. // getting updates only after the object has changed since the last
  13047. // request. Use googleapi.IsNotModified to check whether the response
  13048. // error from Do is the result of In-None-Match.
  13049. func (c *LiasettingsListCall) IfNoneMatch(entityTag string) *LiasettingsListCall {
  13050. c.ifNoneMatch_ = entityTag
  13051. return c
  13052. }
  13053. // Context sets the context to be used in this call's Do method. Any
  13054. // pending HTTP request will be aborted if the provided context is
  13055. // canceled.
  13056. func (c *LiasettingsListCall) Context(ctx context.Context) *LiasettingsListCall {
  13057. c.ctx_ = ctx
  13058. return c
  13059. }
  13060. // Header returns an http.Header that can be modified by the caller to
  13061. // add HTTP headers to the request.
  13062. func (c *LiasettingsListCall) Header() http.Header {
  13063. if c.header_ == nil {
  13064. c.header_ = make(http.Header)
  13065. }
  13066. return c.header_
  13067. }
  13068. func (c *LiasettingsListCall) doRequest(alt string) (*http.Response, error) {
  13069. reqHeaders := make(http.Header)
  13070. for k, v := range c.header_ {
  13071. reqHeaders[k] = v
  13072. }
  13073. reqHeaders.Set("User-Agent", c.s.userAgent())
  13074. if c.ifNoneMatch_ != "" {
  13075. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  13076. }
  13077. var body io.Reader = nil
  13078. c.urlParams_.Set("alt", alt)
  13079. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings")
  13080. urls += "?" + c.urlParams_.Encode()
  13081. req, _ := http.NewRequest("GET", urls, body)
  13082. req.Header = reqHeaders
  13083. googleapi.Expand(req.URL, map[string]string{
  13084. "merchantId": strconv.FormatUint(c.merchantId, 10),
  13085. })
  13086. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13087. }
  13088. // Do executes the "content.liasettings.list" call.
  13089. // Exactly one of *LiasettingsListResponse or error will be non-nil. Any
  13090. // non-2xx status code is an error. Response headers are in either
  13091. // *LiasettingsListResponse.ServerResponse.Header or (if a response was
  13092. // returned at all) in error.(*googleapi.Error).Header. Use
  13093. // googleapi.IsNotModified to check whether the returned error was
  13094. // because http.StatusNotModified was returned.
  13095. func (c *LiasettingsListCall) Do(opts ...googleapi.CallOption) (*LiasettingsListResponse, error) {
  13096. gensupport.SetOptions(c.urlParams_, opts...)
  13097. res, err := c.doRequest("json")
  13098. if res != nil && res.StatusCode == http.StatusNotModified {
  13099. if res.Body != nil {
  13100. res.Body.Close()
  13101. }
  13102. return nil, &googleapi.Error{
  13103. Code: res.StatusCode,
  13104. Header: res.Header,
  13105. }
  13106. }
  13107. if err != nil {
  13108. return nil, err
  13109. }
  13110. defer googleapi.CloseBody(res)
  13111. if err := googleapi.CheckResponse(res); err != nil {
  13112. return nil, err
  13113. }
  13114. ret := &LiasettingsListResponse{
  13115. ServerResponse: googleapi.ServerResponse{
  13116. Header: res.Header,
  13117. HTTPStatusCode: res.StatusCode,
  13118. },
  13119. }
  13120. target := &ret
  13121. if err := gensupport.DecodeResponse(target, res); err != nil {
  13122. return nil, err
  13123. }
  13124. return ret, nil
  13125. // {
  13126. // "description": "Lists the LIA settings of the sub-accounts in your Merchant Center account.",
  13127. // "httpMethod": "GET",
  13128. // "id": "content.liasettings.list",
  13129. // "parameterOrder": [
  13130. // "merchantId"
  13131. // ],
  13132. // "parameters": {
  13133. // "maxResults": {
  13134. // "description": "The maximum number of LIA settings to return in the response, used for paging.",
  13135. // "format": "uint32",
  13136. // "location": "query",
  13137. // "type": "integer"
  13138. // },
  13139. // "merchantId": {
  13140. // "description": "The ID of the managing account. This must be a multi-client account.",
  13141. // "format": "uint64",
  13142. // "location": "path",
  13143. // "required": true,
  13144. // "type": "string"
  13145. // },
  13146. // "pageToken": {
  13147. // "description": "The token returned by the previous request.",
  13148. // "location": "query",
  13149. // "type": "string"
  13150. // }
  13151. // },
  13152. // "path": "{merchantId}/liasettings",
  13153. // "response": {
  13154. // "$ref": "LiasettingsListResponse"
  13155. // },
  13156. // "scopes": [
  13157. // "https://www.googleapis.com/auth/content"
  13158. // ]
  13159. // }
  13160. }
  13161. // Pages invokes f for each page of results.
  13162. // A non-nil error returned from f will halt the iteration.
  13163. // The provided context supersedes any context provided to the Context method.
  13164. func (c *LiasettingsListCall) Pages(ctx context.Context, f func(*LiasettingsListResponse) error) error {
  13165. c.ctx_ = ctx
  13166. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  13167. for {
  13168. x, err := c.Do()
  13169. if err != nil {
  13170. return err
  13171. }
  13172. if err := f(x); err != nil {
  13173. return err
  13174. }
  13175. if x.NextPageToken == "" {
  13176. return nil
  13177. }
  13178. c.PageToken(x.NextPageToken)
  13179. }
  13180. }
  13181. // method id "content.liasettings.listposdataproviders":
  13182. type LiasettingsListposdataprovidersCall struct {
  13183. s *APIService
  13184. urlParams_ gensupport.URLParams
  13185. ifNoneMatch_ string
  13186. ctx_ context.Context
  13187. header_ http.Header
  13188. }
  13189. // Listposdataproviders: Retrieves the list of POS data providers that
  13190. // have active settings for the all eiligible countries.
  13191. func (r *LiasettingsService) Listposdataproviders() *LiasettingsListposdataprovidersCall {
  13192. c := &LiasettingsListposdataprovidersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13193. return c
  13194. }
  13195. // Fields allows partial responses to be retrieved. See
  13196. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13197. // for more information.
  13198. func (c *LiasettingsListposdataprovidersCall) Fields(s ...googleapi.Field) *LiasettingsListposdataprovidersCall {
  13199. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13200. return c
  13201. }
  13202. // IfNoneMatch sets the optional parameter which makes the operation
  13203. // fail if the object's ETag matches the given value. This is useful for
  13204. // getting updates only after the object has changed since the last
  13205. // request. Use googleapi.IsNotModified to check whether the response
  13206. // error from Do is the result of In-None-Match.
  13207. func (c *LiasettingsListposdataprovidersCall) IfNoneMatch(entityTag string) *LiasettingsListposdataprovidersCall {
  13208. c.ifNoneMatch_ = entityTag
  13209. return c
  13210. }
  13211. // Context sets the context to be used in this call's Do method. Any
  13212. // pending HTTP request will be aborted if the provided context is
  13213. // canceled.
  13214. func (c *LiasettingsListposdataprovidersCall) Context(ctx context.Context) *LiasettingsListposdataprovidersCall {
  13215. c.ctx_ = ctx
  13216. return c
  13217. }
  13218. // Header returns an http.Header that can be modified by the caller to
  13219. // add HTTP headers to the request.
  13220. func (c *LiasettingsListposdataprovidersCall) Header() http.Header {
  13221. if c.header_ == nil {
  13222. c.header_ = make(http.Header)
  13223. }
  13224. return c.header_
  13225. }
  13226. func (c *LiasettingsListposdataprovidersCall) doRequest(alt string) (*http.Response, error) {
  13227. reqHeaders := make(http.Header)
  13228. for k, v := range c.header_ {
  13229. reqHeaders[k] = v
  13230. }
  13231. reqHeaders.Set("User-Agent", c.s.userAgent())
  13232. if c.ifNoneMatch_ != "" {
  13233. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  13234. }
  13235. var body io.Reader = nil
  13236. c.urlParams_.Set("alt", alt)
  13237. urls := googleapi.ResolveRelative(c.s.BasePath, "liasettings/posdataproviders")
  13238. urls += "?" + c.urlParams_.Encode()
  13239. req, _ := http.NewRequest("GET", urls, body)
  13240. req.Header = reqHeaders
  13241. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13242. }
  13243. // Do executes the "content.liasettings.listposdataproviders" call.
  13244. // Exactly one of *LiasettingsListPosDataProvidersResponse or error will
  13245. // be non-nil. Any non-2xx status code is an error. Response headers are
  13246. // in either
  13247. // *LiasettingsListPosDataProvidersResponse.ServerResponse.Header or (if
  13248. // a response was returned at all) in error.(*googleapi.Error).Header.
  13249. // Use googleapi.IsNotModified to check whether the returned error was
  13250. // because http.StatusNotModified was returned.
  13251. func (c *LiasettingsListposdataprovidersCall) Do(opts ...googleapi.CallOption) (*LiasettingsListPosDataProvidersResponse, error) {
  13252. gensupport.SetOptions(c.urlParams_, opts...)
  13253. res, err := c.doRequest("json")
  13254. if res != nil && res.StatusCode == http.StatusNotModified {
  13255. if res.Body != nil {
  13256. res.Body.Close()
  13257. }
  13258. return nil, &googleapi.Error{
  13259. Code: res.StatusCode,
  13260. Header: res.Header,
  13261. }
  13262. }
  13263. if err != nil {
  13264. return nil, err
  13265. }
  13266. defer googleapi.CloseBody(res)
  13267. if err := googleapi.CheckResponse(res); err != nil {
  13268. return nil, err
  13269. }
  13270. ret := &LiasettingsListPosDataProvidersResponse{
  13271. ServerResponse: googleapi.ServerResponse{
  13272. Header: res.Header,
  13273. HTTPStatusCode: res.StatusCode,
  13274. },
  13275. }
  13276. target := &ret
  13277. if err := gensupport.DecodeResponse(target, res); err != nil {
  13278. return nil, err
  13279. }
  13280. return ret, nil
  13281. // {
  13282. // "description": "Retrieves the list of POS data providers that have active settings for the all eiligible countries.",
  13283. // "httpMethod": "GET",
  13284. // "id": "content.liasettings.listposdataproviders",
  13285. // "path": "liasettings/posdataproviders",
  13286. // "response": {
  13287. // "$ref": "LiasettingsListPosDataProvidersResponse"
  13288. // },
  13289. // "scopes": [
  13290. // "https://www.googleapis.com/auth/content"
  13291. // ]
  13292. // }
  13293. }
  13294. // method id "content.liasettings.patch":
  13295. type LiasettingsPatchCall struct {
  13296. s *APIService
  13297. merchantId uint64
  13298. accountId uint64
  13299. liasettings *LiaSettings
  13300. urlParams_ gensupport.URLParams
  13301. ctx_ context.Context
  13302. header_ http.Header
  13303. }
  13304. // Patch: Updates the LIA settings of the account. This method supports
  13305. // patch semantics.
  13306. func (r *LiasettingsService) Patch(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsPatchCall {
  13307. c := &LiasettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13308. c.merchantId = merchantId
  13309. c.accountId = accountId
  13310. c.liasettings = liasettings
  13311. return c
  13312. }
  13313. // DryRun sets the optional parameter "dryRun": Flag to run the request
  13314. // in dry-run mode.
  13315. func (c *LiasettingsPatchCall) DryRun(dryRun bool) *LiasettingsPatchCall {
  13316. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  13317. return c
  13318. }
  13319. // Fields allows partial responses to be retrieved. See
  13320. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13321. // for more information.
  13322. func (c *LiasettingsPatchCall) Fields(s ...googleapi.Field) *LiasettingsPatchCall {
  13323. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13324. return c
  13325. }
  13326. // Context sets the context to be used in this call's Do method. Any
  13327. // pending HTTP request will be aborted if the provided context is
  13328. // canceled.
  13329. func (c *LiasettingsPatchCall) Context(ctx context.Context) *LiasettingsPatchCall {
  13330. c.ctx_ = ctx
  13331. return c
  13332. }
  13333. // Header returns an http.Header that can be modified by the caller to
  13334. // add HTTP headers to the request.
  13335. func (c *LiasettingsPatchCall) Header() http.Header {
  13336. if c.header_ == nil {
  13337. c.header_ = make(http.Header)
  13338. }
  13339. return c.header_
  13340. }
  13341. func (c *LiasettingsPatchCall) doRequest(alt string) (*http.Response, error) {
  13342. reqHeaders := make(http.Header)
  13343. for k, v := range c.header_ {
  13344. reqHeaders[k] = v
  13345. }
  13346. reqHeaders.Set("User-Agent", c.s.userAgent())
  13347. var body io.Reader = nil
  13348. body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings)
  13349. if err != nil {
  13350. return nil, err
  13351. }
  13352. reqHeaders.Set("Content-Type", "application/json")
  13353. c.urlParams_.Set("alt", alt)
  13354. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}")
  13355. urls += "?" + c.urlParams_.Encode()
  13356. req, _ := http.NewRequest("PATCH", urls, body)
  13357. req.Header = reqHeaders
  13358. googleapi.Expand(req.URL, map[string]string{
  13359. "merchantId": strconv.FormatUint(c.merchantId, 10),
  13360. "accountId": strconv.FormatUint(c.accountId, 10),
  13361. })
  13362. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13363. }
  13364. // Do executes the "content.liasettings.patch" call.
  13365. // Exactly one of *LiaSettings or error will be non-nil. Any non-2xx
  13366. // status code is an error. Response headers are in either
  13367. // *LiaSettings.ServerResponse.Header or (if a response was returned at
  13368. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  13369. // to check whether the returned error was because
  13370. // http.StatusNotModified was returned.
  13371. func (c *LiasettingsPatchCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) {
  13372. gensupport.SetOptions(c.urlParams_, opts...)
  13373. res, err := c.doRequest("json")
  13374. if res != nil && res.StatusCode == http.StatusNotModified {
  13375. if res.Body != nil {
  13376. res.Body.Close()
  13377. }
  13378. return nil, &googleapi.Error{
  13379. Code: res.StatusCode,
  13380. Header: res.Header,
  13381. }
  13382. }
  13383. if err != nil {
  13384. return nil, err
  13385. }
  13386. defer googleapi.CloseBody(res)
  13387. if err := googleapi.CheckResponse(res); err != nil {
  13388. return nil, err
  13389. }
  13390. ret := &LiaSettings{
  13391. ServerResponse: googleapi.ServerResponse{
  13392. Header: res.Header,
  13393. HTTPStatusCode: res.StatusCode,
  13394. },
  13395. }
  13396. target := &ret
  13397. if err := gensupport.DecodeResponse(target, res); err != nil {
  13398. return nil, err
  13399. }
  13400. return ret, nil
  13401. // {
  13402. // "description": "Updates the LIA settings of the account. This method supports patch semantics.",
  13403. // "httpMethod": "PATCH",
  13404. // "id": "content.liasettings.patch",
  13405. // "parameterOrder": [
  13406. // "merchantId",
  13407. // "accountId"
  13408. // ],
  13409. // "parameters": {
  13410. // "accountId": {
  13411. // "description": "The ID of the account for which to get or update LIA settings.",
  13412. // "format": "uint64",
  13413. // "location": "path",
  13414. // "required": true,
  13415. // "type": "string"
  13416. // },
  13417. // "dryRun": {
  13418. // "description": "Flag to run the request in dry-run mode.",
  13419. // "location": "query",
  13420. // "type": "boolean"
  13421. // },
  13422. // "merchantId": {
  13423. // "description": "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.",
  13424. // "format": "uint64",
  13425. // "location": "path",
  13426. // "required": true,
  13427. // "type": "string"
  13428. // }
  13429. // },
  13430. // "path": "{merchantId}/liasettings/{accountId}",
  13431. // "request": {
  13432. // "$ref": "LiaSettings"
  13433. // },
  13434. // "response": {
  13435. // "$ref": "LiaSettings"
  13436. // },
  13437. // "scopes": [
  13438. // "https://www.googleapis.com/auth/content"
  13439. // ]
  13440. // }
  13441. }
  13442. // method id "content.liasettings.requestgmbaccess":
  13443. type LiasettingsRequestgmbaccessCall struct {
  13444. s *APIService
  13445. merchantId uint64
  13446. accountId uint64
  13447. urlParams_ gensupport.URLParams
  13448. ctx_ context.Context
  13449. header_ http.Header
  13450. }
  13451. // Requestgmbaccess: Requests access to a specified Google My Business
  13452. // account.
  13453. func (r *LiasettingsService) Requestgmbaccess(merchantId uint64, accountId uint64) *LiasettingsRequestgmbaccessCall {
  13454. c := &LiasettingsRequestgmbaccessCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13455. c.merchantId = merchantId
  13456. c.accountId = accountId
  13457. return c
  13458. }
  13459. // GmbEmail sets the optional parameter "gmbEmail": The email of the
  13460. // Google My Business account.
  13461. func (c *LiasettingsRequestgmbaccessCall) GmbEmail(gmbEmail string) *LiasettingsRequestgmbaccessCall {
  13462. c.urlParams_.Set("gmbEmail", gmbEmail)
  13463. return c
  13464. }
  13465. // Fields allows partial responses to be retrieved. See
  13466. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13467. // for more information.
  13468. func (c *LiasettingsRequestgmbaccessCall) Fields(s ...googleapi.Field) *LiasettingsRequestgmbaccessCall {
  13469. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13470. return c
  13471. }
  13472. // Context sets the context to be used in this call's Do method. Any
  13473. // pending HTTP request will be aborted if the provided context is
  13474. // canceled.
  13475. func (c *LiasettingsRequestgmbaccessCall) Context(ctx context.Context) *LiasettingsRequestgmbaccessCall {
  13476. c.ctx_ = ctx
  13477. return c
  13478. }
  13479. // Header returns an http.Header that can be modified by the caller to
  13480. // add HTTP headers to the request.
  13481. func (c *LiasettingsRequestgmbaccessCall) Header() http.Header {
  13482. if c.header_ == nil {
  13483. c.header_ = make(http.Header)
  13484. }
  13485. return c.header_
  13486. }
  13487. func (c *LiasettingsRequestgmbaccessCall) doRequest(alt string) (*http.Response, error) {
  13488. reqHeaders := make(http.Header)
  13489. for k, v := range c.header_ {
  13490. reqHeaders[k] = v
  13491. }
  13492. reqHeaders.Set("User-Agent", c.s.userAgent())
  13493. var body io.Reader = nil
  13494. c.urlParams_.Set("alt", alt)
  13495. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestgmbaccess")
  13496. urls += "?" + c.urlParams_.Encode()
  13497. req, _ := http.NewRequest("POST", urls, body)
  13498. req.Header = reqHeaders
  13499. googleapi.Expand(req.URL, map[string]string{
  13500. "merchantId": strconv.FormatUint(c.merchantId, 10),
  13501. "accountId": strconv.FormatUint(c.accountId, 10),
  13502. })
  13503. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13504. }
  13505. // Do executes the "content.liasettings.requestgmbaccess" call.
  13506. // Exactly one of *LiasettingsRequestGmbAccessResponse or error will be
  13507. // non-nil. Any non-2xx status code is an error. Response headers are in
  13508. // either *LiasettingsRequestGmbAccessResponse.ServerResponse.Header or
  13509. // (if a response was returned at all) in
  13510. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  13511. // whether the returned error was because http.StatusNotModified was
  13512. // returned.
  13513. func (c *LiasettingsRequestgmbaccessCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestGmbAccessResponse, error) {
  13514. gensupport.SetOptions(c.urlParams_, opts...)
  13515. res, err := c.doRequest("json")
  13516. if res != nil && res.StatusCode == http.StatusNotModified {
  13517. if res.Body != nil {
  13518. res.Body.Close()
  13519. }
  13520. return nil, &googleapi.Error{
  13521. Code: res.StatusCode,
  13522. Header: res.Header,
  13523. }
  13524. }
  13525. if err != nil {
  13526. return nil, err
  13527. }
  13528. defer googleapi.CloseBody(res)
  13529. if err := googleapi.CheckResponse(res); err != nil {
  13530. return nil, err
  13531. }
  13532. ret := &LiasettingsRequestGmbAccessResponse{
  13533. ServerResponse: googleapi.ServerResponse{
  13534. Header: res.Header,
  13535. HTTPStatusCode: res.StatusCode,
  13536. },
  13537. }
  13538. target := &ret
  13539. if err := gensupport.DecodeResponse(target, res); err != nil {
  13540. return nil, err
  13541. }
  13542. return ret, nil
  13543. // {
  13544. // "description": "Requests access to a specified Google My Business account.",
  13545. // "httpMethod": "POST",
  13546. // "id": "content.liasettings.requestgmbaccess",
  13547. // "parameterOrder": [
  13548. // "merchantId",
  13549. // "accountId"
  13550. // ],
  13551. // "parameters": {
  13552. // "accountId": {
  13553. // "description": "The ID of the account for which GMB access is requested.",
  13554. // "format": "uint64",
  13555. // "location": "path",
  13556. // "required": true,
  13557. // "type": "string"
  13558. // },
  13559. // "gmbEmail": {
  13560. // "description": "The email of the Google My Business account.",
  13561. // "location": "query",
  13562. // "type": "string"
  13563. // },
  13564. // "merchantId": {
  13565. // "description": "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.",
  13566. // "format": "uint64",
  13567. // "location": "path",
  13568. // "required": true,
  13569. // "type": "string"
  13570. // }
  13571. // },
  13572. // "path": "{merchantId}/liasettings/{accountId}/requestgmbaccess",
  13573. // "response": {
  13574. // "$ref": "LiasettingsRequestGmbAccessResponse"
  13575. // },
  13576. // "scopes": [
  13577. // "https://www.googleapis.com/auth/content"
  13578. // ]
  13579. // }
  13580. }
  13581. // method id "content.liasettings.requestinventoryverification":
  13582. type LiasettingsRequestinventoryverificationCall struct {
  13583. s *APIService
  13584. merchantId uint64
  13585. accountId uint64
  13586. country string
  13587. urlParams_ gensupport.URLParams
  13588. ctx_ context.Context
  13589. header_ http.Header
  13590. }
  13591. // Requestinventoryverification: Requests inventory validation for the
  13592. // specified country.
  13593. func (r *LiasettingsService) Requestinventoryverification(merchantId uint64, accountId uint64, country string) *LiasettingsRequestinventoryverificationCall {
  13594. c := &LiasettingsRequestinventoryverificationCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13595. c.merchantId = merchantId
  13596. c.accountId = accountId
  13597. c.country = country
  13598. return c
  13599. }
  13600. // Fields allows partial responses to be retrieved. See
  13601. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13602. // for more information.
  13603. func (c *LiasettingsRequestinventoryverificationCall) Fields(s ...googleapi.Field) *LiasettingsRequestinventoryverificationCall {
  13604. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13605. return c
  13606. }
  13607. // Context sets the context to be used in this call's Do method. Any
  13608. // pending HTTP request will be aborted if the provided context is
  13609. // canceled.
  13610. func (c *LiasettingsRequestinventoryverificationCall) Context(ctx context.Context) *LiasettingsRequestinventoryverificationCall {
  13611. c.ctx_ = ctx
  13612. return c
  13613. }
  13614. // Header returns an http.Header that can be modified by the caller to
  13615. // add HTTP headers to the request.
  13616. func (c *LiasettingsRequestinventoryverificationCall) Header() http.Header {
  13617. if c.header_ == nil {
  13618. c.header_ = make(http.Header)
  13619. }
  13620. return c.header_
  13621. }
  13622. func (c *LiasettingsRequestinventoryverificationCall) doRequest(alt string) (*http.Response, error) {
  13623. reqHeaders := make(http.Header)
  13624. for k, v := range c.header_ {
  13625. reqHeaders[k] = v
  13626. }
  13627. reqHeaders.Set("User-Agent", c.s.userAgent())
  13628. var body io.Reader = nil
  13629. c.urlParams_.Set("alt", alt)
  13630. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}")
  13631. urls += "?" + c.urlParams_.Encode()
  13632. req, _ := http.NewRequest("POST", urls, body)
  13633. req.Header = reqHeaders
  13634. googleapi.Expand(req.URL, map[string]string{
  13635. "merchantId": strconv.FormatUint(c.merchantId, 10),
  13636. "accountId": strconv.FormatUint(c.accountId, 10),
  13637. "country": c.country,
  13638. })
  13639. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13640. }
  13641. // Do executes the "content.liasettings.requestinventoryverification" call.
  13642. // Exactly one of *LiasettingsRequestInventoryVerificationResponse or
  13643. // error will be non-nil. Any non-2xx status code is an error. Response
  13644. // headers are in either
  13645. // *LiasettingsRequestInventoryVerificationResponse.ServerResponse.Header
  13646. // or (if a response was returned at all) in
  13647. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  13648. // whether the returned error was because http.StatusNotModified was
  13649. // returned.
  13650. func (c *LiasettingsRequestinventoryverificationCall) Do(opts ...googleapi.CallOption) (*LiasettingsRequestInventoryVerificationResponse, error) {
  13651. gensupport.SetOptions(c.urlParams_, opts...)
  13652. res, err := c.doRequest("json")
  13653. if res != nil && res.StatusCode == http.StatusNotModified {
  13654. if res.Body != nil {
  13655. res.Body.Close()
  13656. }
  13657. return nil, &googleapi.Error{
  13658. Code: res.StatusCode,
  13659. Header: res.Header,
  13660. }
  13661. }
  13662. if err != nil {
  13663. return nil, err
  13664. }
  13665. defer googleapi.CloseBody(res)
  13666. if err := googleapi.CheckResponse(res); err != nil {
  13667. return nil, err
  13668. }
  13669. ret := &LiasettingsRequestInventoryVerificationResponse{
  13670. ServerResponse: googleapi.ServerResponse{
  13671. Header: res.Header,
  13672. HTTPStatusCode: res.StatusCode,
  13673. },
  13674. }
  13675. target := &ret
  13676. if err := gensupport.DecodeResponse(target, res); err != nil {
  13677. return nil, err
  13678. }
  13679. return ret, nil
  13680. // {
  13681. // "description": "Requests inventory validation for the specified country.",
  13682. // "httpMethod": "POST",
  13683. // "id": "content.liasettings.requestinventoryverification",
  13684. // "parameterOrder": [
  13685. // "merchantId",
  13686. // "accountId",
  13687. // "country"
  13688. // ],
  13689. // "parameters": {
  13690. // "accountId": {
  13691. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  13692. // "format": "uint64",
  13693. // "location": "path",
  13694. // "required": true,
  13695. // "type": "string"
  13696. // },
  13697. // "country": {
  13698. // "description": "The country for which inventory validation is requested.",
  13699. // "location": "path",
  13700. // "required": true,
  13701. // "type": "string"
  13702. // },
  13703. // "merchantId": {
  13704. // "description": "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.",
  13705. // "format": "uint64",
  13706. // "location": "path",
  13707. // "required": true,
  13708. // "type": "string"
  13709. // }
  13710. // },
  13711. // "path": "{merchantId}/liasettings/{accountId}/requestinventoryverification/{country}",
  13712. // "response": {
  13713. // "$ref": "LiasettingsRequestInventoryVerificationResponse"
  13714. // },
  13715. // "scopes": [
  13716. // "https://www.googleapis.com/auth/content"
  13717. // ]
  13718. // }
  13719. }
  13720. // method id "content.liasettings.setinventoryverificationcontact":
  13721. type LiasettingsSetinventoryverificationcontactCall struct {
  13722. s *APIService
  13723. merchantId uint64
  13724. accountId uint64
  13725. urlParams_ gensupport.URLParams
  13726. ctx_ context.Context
  13727. header_ http.Header
  13728. }
  13729. // Setinventoryverificationcontact: Sets the inventory verification
  13730. // contract for the specified country.
  13731. func (r *LiasettingsService) Setinventoryverificationcontact(merchantId uint64, accountId uint64) *LiasettingsSetinventoryverificationcontactCall {
  13732. c := &LiasettingsSetinventoryverificationcontactCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13733. c.merchantId = merchantId
  13734. c.accountId = accountId
  13735. return c
  13736. }
  13737. // ContactEmail sets the optional parameter "contactEmail": The email of
  13738. // the inventory verification contact.
  13739. func (c *LiasettingsSetinventoryverificationcontactCall) ContactEmail(contactEmail string) *LiasettingsSetinventoryverificationcontactCall {
  13740. c.urlParams_.Set("contactEmail", contactEmail)
  13741. return c
  13742. }
  13743. // ContactName sets the optional parameter "contactName": The name of
  13744. // the inventory verification contact.
  13745. func (c *LiasettingsSetinventoryverificationcontactCall) ContactName(contactName string) *LiasettingsSetinventoryverificationcontactCall {
  13746. c.urlParams_.Set("contactName", contactName)
  13747. return c
  13748. }
  13749. // Country sets the optional parameter "country": The country for which
  13750. // inventory verification is requested.
  13751. func (c *LiasettingsSetinventoryverificationcontactCall) Country(country string) *LiasettingsSetinventoryverificationcontactCall {
  13752. c.urlParams_.Set("country", country)
  13753. return c
  13754. }
  13755. // Language sets the optional parameter "language": The language for
  13756. // which inventory verification is requested.
  13757. func (c *LiasettingsSetinventoryverificationcontactCall) Language(language string) *LiasettingsSetinventoryverificationcontactCall {
  13758. c.urlParams_.Set("language", language)
  13759. return c
  13760. }
  13761. // Fields allows partial responses to be retrieved. See
  13762. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13763. // for more information.
  13764. func (c *LiasettingsSetinventoryverificationcontactCall) Fields(s ...googleapi.Field) *LiasettingsSetinventoryverificationcontactCall {
  13765. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13766. return c
  13767. }
  13768. // Context sets the context to be used in this call's Do method. Any
  13769. // pending HTTP request will be aborted if the provided context is
  13770. // canceled.
  13771. func (c *LiasettingsSetinventoryverificationcontactCall) Context(ctx context.Context) *LiasettingsSetinventoryverificationcontactCall {
  13772. c.ctx_ = ctx
  13773. return c
  13774. }
  13775. // Header returns an http.Header that can be modified by the caller to
  13776. // add HTTP headers to the request.
  13777. func (c *LiasettingsSetinventoryverificationcontactCall) Header() http.Header {
  13778. if c.header_ == nil {
  13779. c.header_ = make(http.Header)
  13780. }
  13781. return c.header_
  13782. }
  13783. func (c *LiasettingsSetinventoryverificationcontactCall) doRequest(alt string) (*http.Response, error) {
  13784. reqHeaders := make(http.Header)
  13785. for k, v := range c.header_ {
  13786. reqHeaders[k] = v
  13787. }
  13788. reqHeaders.Set("User-Agent", c.s.userAgent())
  13789. var body io.Reader = nil
  13790. c.urlParams_.Set("alt", alt)
  13791. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact")
  13792. urls += "?" + c.urlParams_.Encode()
  13793. req, _ := http.NewRequest("POST", urls, body)
  13794. req.Header = reqHeaders
  13795. googleapi.Expand(req.URL, map[string]string{
  13796. "merchantId": strconv.FormatUint(c.merchantId, 10),
  13797. "accountId": strconv.FormatUint(c.accountId, 10),
  13798. })
  13799. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13800. }
  13801. // Do executes the "content.liasettings.setinventoryverificationcontact" call.
  13802. // Exactly one of *LiasettingsSetInventoryVerificationContactResponse or
  13803. // error will be non-nil. Any non-2xx status code is an error. Response
  13804. // headers are in either
  13805. // *LiasettingsSetInventoryVerificationContactResponse.ServerResponse.Hea
  13806. // der or (if a response was returned at all) in
  13807. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  13808. // whether the returned error was because http.StatusNotModified was
  13809. // returned.
  13810. func (c *LiasettingsSetinventoryverificationcontactCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetInventoryVerificationContactResponse, error) {
  13811. gensupport.SetOptions(c.urlParams_, opts...)
  13812. res, err := c.doRequest("json")
  13813. if res != nil && res.StatusCode == http.StatusNotModified {
  13814. if res.Body != nil {
  13815. res.Body.Close()
  13816. }
  13817. return nil, &googleapi.Error{
  13818. Code: res.StatusCode,
  13819. Header: res.Header,
  13820. }
  13821. }
  13822. if err != nil {
  13823. return nil, err
  13824. }
  13825. defer googleapi.CloseBody(res)
  13826. if err := googleapi.CheckResponse(res); err != nil {
  13827. return nil, err
  13828. }
  13829. ret := &LiasettingsSetInventoryVerificationContactResponse{
  13830. ServerResponse: googleapi.ServerResponse{
  13831. Header: res.Header,
  13832. HTTPStatusCode: res.StatusCode,
  13833. },
  13834. }
  13835. target := &ret
  13836. if err := gensupport.DecodeResponse(target, res); err != nil {
  13837. return nil, err
  13838. }
  13839. return ret, nil
  13840. // {
  13841. // "description": "Sets the inventory verification contract for the specified country.",
  13842. // "httpMethod": "POST",
  13843. // "id": "content.liasettings.setinventoryverificationcontact",
  13844. // "parameterOrder": [
  13845. // "merchantId",
  13846. // "accountId"
  13847. // ],
  13848. // "parameters": {
  13849. // "accountId": {
  13850. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  13851. // "format": "uint64",
  13852. // "location": "path",
  13853. // "required": true,
  13854. // "type": "string"
  13855. // },
  13856. // "contactEmail": {
  13857. // "description": "The email of the inventory verification contact.",
  13858. // "location": "query",
  13859. // "type": "string"
  13860. // },
  13861. // "contactName": {
  13862. // "description": "The name of the inventory verification contact.",
  13863. // "location": "query",
  13864. // "type": "string"
  13865. // },
  13866. // "country": {
  13867. // "description": "The country for which inventory verification is requested.",
  13868. // "location": "query",
  13869. // "type": "string"
  13870. // },
  13871. // "language": {
  13872. // "description": "The language for which inventory verification is requested.",
  13873. // "location": "query",
  13874. // "type": "string"
  13875. // },
  13876. // "merchantId": {
  13877. // "description": "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.",
  13878. // "format": "uint64",
  13879. // "location": "path",
  13880. // "required": true,
  13881. // "type": "string"
  13882. // }
  13883. // },
  13884. // "path": "{merchantId}/liasettings/{accountId}/setinventoryverificationcontact",
  13885. // "response": {
  13886. // "$ref": "LiasettingsSetInventoryVerificationContactResponse"
  13887. // },
  13888. // "scopes": [
  13889. // "https://www.googleapis.com/auth/content"
  13890. // ]
  13891. // }
  13892. }
  13893. // method id "content.liasettings.setposdataprovider":
  13894. type LiasettingsSetposdataproviderCall struct {
  13895. s *APIService
  13896. merchantId uint64
  13897. accountId uint64
  13898. urlParams_ gensupport.URLParams
  13899. ctx_ context.Context
  13900. header_ http.Header
  13901. }
  13902. // Setposdataprovider: Sets the POS data provider for the specified
  13903. // country.
  13904. func (r *LiasettingsService) Setposdataprovider(merchantId uint64, accountId uint64) *LiasettingsSetposdataproviderCall {
  13905. c := &LiasettingsSetposdataproviderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  13906. c.merchantId = merchantId
  13907. c.accountId = accountId
  13908. return c
  13909. }
  13910. // Country sets the optional parameter "country": The country for which
  13911. // the POS data provider is selected.
  13912. func (c *LiasettingsSetposdataproviderCall) Country(country string) *LiasettingsSetposdataproviderCall {
  13913. c.urlParams_.Set("country", country)
  13914. return c
  13915. }
  13916. // PosDataProviderId sets the optional parameter "posDataProviderId":
  13917. // The ID of POS data provider.
  13918. func (c *LiasettingsSetposdataproviderCall) PosDataProviderId(posDataProviderId uint64) *LiasettingsSetposdataproviderCall {
  13919. c.urlParams_.Set("posDataProviderId", fmt.Sprint(posDataProviderId))
  13920. return c
  13921. }
  13922. // PosExternalAccountId sets the optional parameter
  13923. // "posExternalAccountId": The account ID by which this merchant is
  13924. // known to the POS data provider.
  13925. func (c *LiasettingsSetposdataproviderCall) PosExternalAccountId(posExternalAccountId string) *LiasettingsSetposdataproviderCall {
  13926. c.urlParams_.Set("posExternalAccountId", posExternalAccountId)
  13927. return c
  13928. }
  13929. // Fields allows partial responses to be retrieved. See
  13930. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  13931. // for more information.
  13932. func (c *LiasettingsSetposdataproviderCall) Fields(s ...googleapi.Field) *LiasettingsSetposdataproviderCall {
  13933. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  13934. return c
  13935. }
  13936. // Context sets the context to be used in this call's Do method. Any
  13937. // pending HTTP request will be aborted if the provided context is
  13938. // canceled.
  13939. func (c *LiasettingsSetposdataproviderCall) Context(ctx context.Context) *LiasettingsSetposdataproviderCall {
  13940. c.ctx_ = ctx
  13941. return c
  13942. }
  13943. // Header returns an http.Header that can be modified by the caller to
  13944. // add HTTP headers to the request.
  13945. func (c *LiasettingsSetposdataproviderCall) Header() http.Header {
  13946. if c.header_ == nil {
  13947. c.header_ = make(http.Header)
  13948. }
  13949. return c.header_
  13950. }
  13951. func (c *LiasettingsSetposdataproviderCall) doRequest(alt string) (*http.Response, error) {
  13952. reqHeaders := make(http.Header)
  13953. for k, v := range c.header_ {
  13954. reqHeaders[k] = v
  13955. }
  13956. reqHeaders.Set("User-Agent", c.s.userAgent())
  13957. var body io.Reader = nil
  13958. c.urlParams_.Set("alt", alt)
  13959. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}/setposdataprovider")
  13960. urls += "?" + c.urlParams_.Encode()
  13961. req, _ := http.NewRequest("POST", urls, body)
  13962. req.Header = reqHeaders
  13963. googleapi.Expand(req.URL, map[string]string{
  13964. "merchantId": strconv.FormatUint(c.merchantId, 10),
  13965. "accountId": strconv.FormatUint(c.accountId, 10),
  13966. })
  13967. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  13968. }
  13969. // Do executes the "content.liasettings.setposdataprovider" call.
  13970. // Exactly one of *LiasettingsSetPosDataProviderResponse or error will
  13971. // be non-nil. Any non-2xx status code is an error. Response headers are
  13972. // in either
  13973. // *LiasettingsSetPosDataProviderResponse.ServerResponse.Header or (if a
  13974. // response was returned at all) in error.(*googleapi.Error).Header. Use
  13975. // googleapi.IsNotModified to check whether the returned error was
  13976. // because http.StatusNotModified was returned.
  13977. func (c *LiasettingsSetposdataproviderCall) Do(opts ...googleapi.CallOption) (*LiasettingsSetPosDataProviderResponse, error) {
  13978. gensupport.SetOptions(c.urlParams_, opts...)
  13979. res, err := c.doRequest("json")
  13980. if res != nil && res.StatusCode == http.StatusNotModified {
  13981. if res.Body != nil {
  13982. res.Body.Close()
  13983. }
  13984. return nil, &googleapi.Error{
  13985. Code: res.StatusCode,
  13986. Header: res.Header,
  13987. }
  13988. }
  13989. if err != nil {
  13990. return nil, err
  13991. }
  13992. defer googleapi.CloseBody(res)
  13993. if err := googleapi.CheckResponse(res); err != nil {
  13994. return nil, err
  13995. }
  13996. ret := &LiasettingsSetPosDataProviderResponse{
  13997. ServerResponse: googleapi.ServerResponse{
  13998. Header: res.Header,
  13999. HTTPStatusCode: res.StatusCode,
  14000. },
  14001. }
  14002. target := &ret
  14003. if err := gensupport.DecodeResponse(target, res); err != nil {
  14004. return nil, err
  14005. }
  14006. return ret, nil
  14007. // {
  14008. // "description": "Sets the POS data provider for the specified country.",
  14009. // "httpMethod": "POST",
  14010. // "id": "content.liasettings.setposdataprovider",
  14011. // "parameterOrder": [
  14012. // "merchantId",
  14013. // "accountId"
  14014. // ],
  14015. // "parameters": {
  14016. // "accountId": {
  14017. // "description": "The ID of the account for which to retrieve accessible Google My Business accounts.",
  14018. // "format": "uint64",
  14019. // "location": "path",
  14020. // "required": true,
  14021. // "type": "string"
  14022. // },
  14023. // "country": {
  14024. // "description": "The country for which the POS data provider is selected.",
  14025. // "location": "query",
  14026. // "type": "string"
  14027. // },
  14028. // "merchantId": {
  14029. // "description": "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.",
  14030. // "format": "uint64",
  14031. // "location": "path",
  14032. // "required": true,
  14033. // "type": "string"
  14034. // },
  14035. // "posDataProviderId": {
  14036. // "description": "The ID of POS data provider.",
  14037. // "format": "uint64",
  14038. // "location": "query",
  14039. // "type": "string"
  14040. // },
  14041. // "posExternalAccountId": {
  14042. // "description": "The account ID by which this merchant is known to the POS data provider.",
  14043. // "location": "query",
  14044. // "type": "string"
  14045. // }
  14046. // },
  14047. // "path": "{merchantId}/liasettings/{accountId}/setposdataprovider",
  14048. // "response": {
  14049. // "$ref": "LiasettingsSetPosDataProviderResponse"
  14050. // },
  14051. // "scopes": [
  14052. // "https://www.googleapis.com/auth/content"
  14053. // ]
  14054. // }
  14055. }
  14056. // method id "content.liasettings.update":
  14057. type LiasettingsUpdateCall struct {
  14058. s *APIService
  14059. merchantId uint64
  14060. accountId uint64
  14061. liasettings *LiaSettings
  14062. urlParams_ gensupport.URLParams
  14063. ctx_ context.Context
  14064. header_ http.Header
  14065. }
  14066. // Update: Updates the LIA settings of the account.
  14067. func (r *LiasettingsService) Update(merchantId uint64, accountId uint64, liasettings *LiaSettings) *LiasettingsUpdateCall {
  14068. c := &LiasettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14069. c.merchantId = merchantId
  14070. c.accountId = accountId
  14071. c.liasettings = liasettings
  14072. return c
  14073. }
  14074. // DryRun sets the optional parameter "dryRun": Flag to run the request
  14075. // in dry-run mode.
  14076. func (c *LiasettingsUpdateCall) DryRun(dryRun bool) *LiasettingsUpdateCall {
  14077. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  14078. return c
  14079. }
  14080. // Fields allows partial responses to be retrieved. See
  14081. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14082. // for more information.
  14083. func (c *LiasettingsUpdateCall) Fields(s ...googleapi.Field) *LiasettingsUpdateCall {
  14084. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14085. return c
  14086. }
  14087. // Context sets the context to be used in this call's Do method. Any
  14088. // pending HTTP request will be aborted if the provided context is
  14089. // canceled.
  14090. func (c *LiasettingsUpdateCall) Context(ctx context.Context) *LiasettingsUpdateCall {
  14091. c.ctx_ = ctx
  14092. return c
  14093. }
  14094. // Header returns an http.Header that can be modified by the caller to
  14095. // add HTTP headers to the request.
  14096. func (c *LiasettingsUpdateCall) Header() http.Header {
  14097. if c.header_ == nil {
  14098. c.header_ = make(http.Header)
  14099. }
  14100. return c.header_
  14101. }
  14102. func (c *LiasettingsUpdateCall) doRequest(alt string) (*http.Response, error) {
  14103. reqHeaders := make(http.Header)
  14104. for k, v := range c.header_ {
  14105. reqHeaders[k] = v
  14106. }
  14107. reqHeaders.Set("User-Agent", c.s.userAgent())
  14108. var body io.Reader = nil
  14109. body, err := googleapi.WithoutDataWrapper.JSONReader(c.liasettings)
  14110. if err != nil {
  14111. return nil, err
  14112. }
  14113. reqHeaders.Set("Content-Type", "application/json")
  14114. c.urlParams_.Set("alt", alt)
  14115. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/liasettings/{accountId}")
  14116. urls += "?" + c.urlParams_.Encode()
  14117. req, _ := http.NewRequest("PUT", urls, body)
  14118. req.Header = reqHeaders
  14119. googleapi.Expand(req.URL, map[string]string{
  14120. "merchantId": strconv.FormatUint(c.merchantId, 10),
  14121. "accountId": strconv.FormatUint(c.accountId, 10),
  14122. })
  14123. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14124. }
  14125. // Do executes the "content.liasettings.update" call.
  14126. // Exactly one of *LiaSettings or error will be non-nil. Any non-2xx
  14127. // status code is an error. Response headers are in either
  14128. // *LiaSettings.ServerResponse.Header or (if a response was returned at
  14129. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  14130. // to check whether the returned error was because
  14131. // http.StatusNotModified was returned.
  14132. func (c *LiasettingsUpdateCall) Do(opts ...googleapi.CallOption) (*LiaSettings, error) {
  14133. gensupport.SetOptions(c.urlParams_, opts...)
  14134. res, err := c.doRequest("json")
  14135. if res != nil && res.StatusCode == http.StatusNotModified {
  14136. if res.Body != nil {
  14137. res.Body.Close()
  14138. }
  14139. return nil, &googleapi.Error{
  14140. Code: res.StatusCode,
  14141. Header: res.Header,
  14142. }
  14143. }
  14144. if err != nil {
  14145. return nil, err
  14146. }
  14147. defer googleapi.CloseBody(res)
  14148. if err := googleapi.CheckResponse(res); err != nil {
  14149. return nil, err
  14150. }
  14151. ret := &LiaSettings{
  14152. ServerResponse: googleapi.ServerResponse{
  14153. Header: res.Header,
  14154. HTTPStatusCode: res.StatusCode,
  14155. },
  14156. }
  14157. target := &ret
  14158. if err := gensupport.DecodeResponse(target, res); err != nil {
  14159. return nil, err
  14160. }
  14161. return ret, nil
  14162. // {
  14163. // "description": "Updates the LIA settings of the account.",
  14164. // "httpMethod": "PUT",
  14165. // "id": "content.liasettings.update",
  14166. // "parameterOrder": [
  14167. // "merchantId",
  14168. // "accountId"
  14169. // ],
  14170. // "parameters": {
  14171. // "accountId": {
  14172. // "description": "The ID of the account for which to get or update LIA settings.",
  14173. // "format": "uint64",
  14174. // "location": "path",
  14175. // "required": true,
  14176. // "type": "string"
  14177. // },
  14178. // "dryRun": {
  14179. // "description": "Flag to run the request in dry-run mode.",
  14180. // "location": "query",
  14181. // "type": "boolean"
  14182. // },
  14183. // "merchantId": {
  14184. // "description": "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.",
  14185. // "format": "uint64",
  14186. // "location": "path",
  14187. // "required": true,
  14188. // "type": "string"
  14189. // }
  14190. // },
  14191. // "path": "{merchantId}/liasettings/{accountId}",
  14192. // "request": {
  14193. // "$ref": "LiaSettings"
  14194. // },
  14195. // "response": {
  14196. // "$ref": "LiaSettings"
  14197. // },
  14198. // "scopes": [
  14199. // "https://www.googleapis.com/auth/content"
  14200. // ]
  14201. // }
  14202. }
  14203. // method id "content.orderinvoices.createchargeinvoice":
  14204. type OrderinvoicesCreatechargeinvoiceCall struct {
  14205. s *APIService
  14206. merchantId uint64
  14207. orderId string
  14208. orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest
  14209. urlParams_ gensupport.URLParams
  14210. ctx_ context.Context
  14211. header_ http.Header
  14212. }
  14213. // Createchargeinvoice: Creates a charge invoice for a shipment group,
  14214. // and triggers a charge capture for non-facilitated payment orders.
  14215. func (r *OrderinvoicesService) Createchargeinvoice(merchantId uint64, orderId string, orderinvoicescreatechargeinvoicerequest *OrderinvoicesCreateChargeInvoiceRequest) *OrderinvoicesCreatechargeinvoiceCall {
  14216. c := &OrderinvoicesCreatechargeinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14217. c.merchantId = merchantId
  14218. c.orderId = orderId
  14219. c.orderinvoicescreatechargeinvoicerequest = orderinvoicescreatechargeinvoicerequest
  14220. return c
  14221. }
  14222. // Fields allows partial responses to be retrieved. See
  14223. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14224. // for more information.
  14225. func (c *OrderinvoicesCreatechargeinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreatechargeinvoiceCall {
  14226. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14227. return c
  14228. }
  14229. // Context sets the context to be used in this call's Do method. Any
  14230. // pending HTTP request will be aborted if the provided context is
  14231. // canceled.
  14232. func (c *OrderinvoicesCreatechargeinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreatechargeinvoiceCall {
  14233. c.ctx_ = ctx
  14234. return c
  14235. }
  14236. // Header returns an http.Header that can be modified by the caller to
  14237. // add HTTP headers to the request.
  14238. func (c *OrderinvoicesCreatechargeinvoiceCall) Header() http.Header {
  14239. if c.header_ == nil {
  14240. c.header_ = make(http.Header)
  14241. }
  14242. return c.header_
  14243. }
  14244. func (c *OrderinvoicesCreatechargeinvoiceCall) doRequest(alt string) (*http.Response, error) {
  14245. reqHeaders := make(http.Header)
  14246. for k, v := range c.header_ {
  14247. reqHeaders[k] = v
  14248. }
  14249. reqHeaders.Set("User-Agent", c.s.userAgent())
  14250. var body io.Reader = nil
  14251. body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreatechargeinvoicerequest)
  14252. if err != nil {
  14253. return nil, err
  14254. }
  14255. reqHeaders.Set("Content-Type", "application/json")
  14256. c.urlParams_.Set("alt", alt)
  14257. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createChargeInvoice")
  14258. urls += "?" + c.urlParams_.Encode()
  14259. req, _ := http.NewRequest("POST", urls, body)
  14260. req.Header = reqHeaders
  14261. googleapi.Expand(req.URL, map[string]string{
  14262. "merchantId": strconv.FormatUint(c.merchantId, 10),
  14263. "orderId": c.orderId,
  14264. })
  14265. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14266. }
  14267. // Do executes the "content.orderinvoices.createchargeinvoice" call.
  14268. // Exactly one of *OrderinvoicesCreateChargeInvoiceResponse or error
  14269. // will be non-nil. Any non-2xx status code is an error. Response
  14270. // headers are in either
  14271. // *OrderinvoicesCreateChargeInvoiceResponse.ServerResponse.Header or
  14272. // (if a response was returned at all) in
  14273. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  14274. // whether the returned error was because http.StatusNotModified was
  14275. // returned.
  14276. func (c *OrderinvoicesCreatechargeinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateChargeInvoiceResponse, error) {
  14277. gensupport.SetOptions(c.urlParams_, opts...)
  14278. res, err := c.doRequest("json")
  14279. if res != nil && res.StatusCode == http.StatusNotModified {
  14280. if res.Body != nil {
  14281. res.Body.Close()
  14282. }
  14283. return nil, &googleapi.Error{
  14284. Code: res.StatusCode,
  14285. Header: res.Header,
  14286. }
  14287. }
  14288. if err != nil {
  14289. return nil, err
  14290. }
  14291. defer googleapi.CloseBody(res)
  14292. if err := googleapi.CheckResponse(res); err != nil {
  14293. return nil, err
  14294. }
  14295. ret := &OrderinvoicesCreateChargeInvoiceResponse{
  14296. ServerResponse: googleapi.ServerResponse{
  14297. Header: res.Header,
  14298. HTTPStatusCode: res.StatusCode,
  14299. },
  14300. }
  14301. target := &ret
  14302. if err := gensupport.DecodeResponse(target, res); err != nil {
  14303. return nil, err
  14304. }
  14305. return ret, nil
  14306. // {
  14307. // "description": "Creates a charge invoice for a shipment group, and triggers a charge capture for non-facilitated payment orders.",
  14308. // "httpMethod": "POST",
  14309. // "id": "content.orderinvoices.createchargeinvoice",
  14310. // "parameterOrder": [
  14311. // "merchantId",
  14312. // "orderId"
  14313. // ],
  14314. // "parameters": {
  14315. // "merchantId": {
  14316. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  14317. // "format": "uint64",
  14318. // "location": "path",
  14319. // "required": true,
  14320. // "type": "string"
  14321. // },
  14322. // "orderId": {
  14323. // "description": "The ID of the order.",
  14324. // "location": "path",
  14325. // "required": true,
  14326. // "type": "string"
  14327. // }
  14328. // },
  14329. // "path": "{merchantId}/orderinvoices/{orderId}/createChargeInvoice",
  14330. // "request": {
  14331. // "$ref": "OrderinvoicesCreateChargeInvoiceRequest"
  14332. // },
  14333. // "response": {
  14334. // "$ref": "OrderinvoicesCreateChargeInvoiceResponse"
  14335. // },
  14336. // "scopes": [
  14337. // "https://www.googleapis.com/auth/content"
  14338. // ]
  14339. // }
  14340. }
  14341. // method id "content.orderinvoices.createrefundinvoice":
  14342. type OrderinvoicesCreaterefundinvoiceCall struct {
  14343. s *APIService
  14344. merchantId uint64
  14345. orderId string
  14346. orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest
  14347. urlParams_ gensupport.URLParams
  14348. ctx_ context.Context
  14349. header_ http.Header
  14350. }
  14351. // Createrefundinvoice: Creates a refund invoice for one or more
  14352. // shipment groups, and triggers a refund for non-facilitated payment
  14353. // orders.
  14354. func (r *OrderinvoicesService) Createrefundinvoice(merchantId uint64, orderId string, orderinvoicescreaterefundinvoicerequest *OrderinvoicesCreateRefundInvoiceRequest) *OrderinvoicesCreaterefundinvoiceCall {
  14355. c := &OrderinvoicesCreaterefundinvoiceCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14356. c.merchantId = merchantId
  14357. c.orderId = orderId
  14358. c.orderinvoicescreaterefundinvoicerequest = orderinvoicescreaterefundinvoicerequest
  14359. return c
  14360. }
  14361. // Fields allows partial responses to be retrieved. See
  14362. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14363. // for more information.
  14364. func (c *OrderinvoicesCreaterefundinvoiceCall) Fields(s ...googleapi.Field) *OrderinvoicesCreaterefundinvoiceCall {
  14365. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14366. return c
  14367. }
  14368. // Context sets the context to be used in this call's Do method. Any
  14369. // pending HTTP request will be aborted if the provided context is
  14370. // canceled.
  14371. func (c *OrderinvoicesCreaterefundinvoiceCall) Context(ctx context.Context) *OrderinvoicesCreaterefundinvoiceCall {
  14372. c.ctx_ = ctx
  14373. return c
  14374. }
  14375. // Header returns an http.Header that can be modified by the caller to
  14376. // add HTTP headers to the request.
  14377. func (c *OrderinvoicesCreaterefundinvoiceCall) Header() http.Header {
  14378. if c.header_ == nil {
  14379. c.header_ = make(http.Header)
  14380. }
  14381. return c.header_
  14382. }
  14383. func (c *OrderinvoicesCreaterefundinvoiceCall) doRequest(alt string) (*http.Response, error) {
  14384. reqHeaders := make(http.Header)
  14385. for k, v := range c.header_ {
  14386. reqHeaders[k] = v
  14387. }
  14388. reqHeaders.Set("User-Agent", c.s.userAgent())
  14389. var body io.Reader = nil
  14390. body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderinvoicescreaterefundinvoicerequest)
  14391. if err != nil {
  14392. return nil, err
  14393. }
  14394. reqHeaders.Set("Content-Type", "application/json")
  14395. c.urlParams_.Set("alt", alt)
  14396. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderinvoices/{orderId}/createRefundInvoice")
  14397. urls += "?" + c.urlParams_.Encode()
  14398. req, _ := http.NewRequest("POST", urls, body)
  14399. req.Header = reqHeaders
  14400. googleapi.Expand(req.URL, map[string]string{
  14401. "merchantId": strconv.FormatUint(c.merchantId, 10),
  14402. "orderId": c.orderId,
  14403. })
  14404. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14405. }
  14406. // Do executes the "content.orderinvoices.createrefundinvoice" call.
  14407. // Exactly one of *OrderinvoicesCreateRefundInvoiceResponse or error
  14408. // will be non-nil. Any non-2xx status code is an error. Response
  14409. // headers are in either
  14410. // *OrderinvoicesCreateRefundInvoiceResponse.ServerResponse.Header or
  14411. // (if a response was returned at all) in
  14412. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  14413. // whether the returned error was because http.StatusNotModified was
  14414. // returned.
  14415. func (c *OrderinvoicesCreaterefundinvoiceCall) Do(opts ...googleapi.CallOption) (*OrderinvoicesCreateRefundInvoiceResponse, error) {
  14416. gensupport.SetOptions(c.urlParams_, opts...)
  14417. res, err := c.doRequest("json")
  14418. if res != nil && res.StatusCode == http.StatusNotModified {
  14419. if res.Body != nil {
  14420. res.Body.Close()
  14421. }
  14422. return nil, &googleapi.Error{
  14423. Code: res.StatusCode,
  14424. Header: res.Header,
  14425. }
  14426. }
  14427. if err != nil {
  14428. return nil, err
  14429. }
  14430. defer googleapi.CloseBody(res)
  14431. if err := googleapi.CheckResponse(res); err != nil {
  14432. return nil, err
  14433. }
  14434. ret := &OrderinvoicesCreateRefundInvoiceResponse{
  14435. ServerResponse: googleapi.ServerResponse{
  14436. Header: res.Header,
  14437. HTTPStatusCode: res.StatusCode,
  14438. },
  14439. }
  14440. target := &ret
  14441. if err := gensupport.DecodeResponse(target, res); err != nil {
  14442. return nil, err
  14443. }
  14444. return ret, nil
  14445. // {
  14446. // "description": "Creates a refund invoice for one or more shipment groups, and triggers a refund for non-facilitated payment orders.",
  14447. // "httpMethod": "POST",
  14448. // "id": "content.orderinvoices.createrefundinvoice",
  14449. // "parameterOrder": [
  14450. // "merchantId",
  14451. // "orderId"
  14452. // ],
  14453. // "parameters": {
  14454. // "merchantId": {
  14455. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  14456. // "format": "uint64",
  14457. // "location": "path",
  14458. // "required": true,
  14459. // "type": "string"
  14460. // },
  14461. // "orderId": {
  14462. // "description": "The ID of the order.",
  14463. // "location": "path",
  14464. // "required": true,
  14465. // "type": "string"
  14466. // }
  14467. // },
  14468. // "path": "{merchantId}/orderinvoices/{orderId}/createRefundInvoice",
  14469. // "request": {
  14470. // "$ref": "OrderinvoicesCreateRefundInvoiceRequest"
  14471. // },
  14472. // "response": {
  14473. // "$ref": "OrderinvoicesCreateRefundInvoiceResponse"
  14474. // },
  14475. // "scopes": [
  14476. // "https://www.googleapis.com/auth/content"
  14477. // ]
  14478. // }
  14479. }
  14480. // method id "content.orderpayments.notifyauthapproved":
  14481. type OrderpaymentsNotifyauthapprovedCall struct {
  14482. s *APIService
  14483. merchantId uint64
  14484. orderId string
  14485. orderpaymentsnotifyauthapprovedrequest *OrderpaymentsNotifyAuthApprovedRequest
  14486. urlParams_ gensupport.URLParams
  14487. ctx_ context.Context
  14488. header_ http.Header
  14489. }
  14490. // Notifyauthapproved: Notify about successfully authorizing user's
  14491. // payment method for a given amount.
  14492. func (r *OrderpaymentsService) Notifyauthapproved(merchantId uint64, orderId string, orderpaymentsnotifyauthapprovedrequest *OrderpaymentsNotifyAuthApprovedRequest) *OrderpaymentsNotifyauthapprovedCall {
  14493. c := &OrderpaymentsNotifyauthapprovedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14494. c.merchantId = merchantId
  14495. c.orderId = orderId
  14496. c.orderpaymentsnotifyauthapprovedrequest = orderpaymentsnotifyauthapprovedrequest
  14497. return c
  14498. }
  14499. // Fields allows partial responses to be retrieved. See
  14500. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14501. // for more information.
  14502. func (c *OrderpaymentsNotifyauthapprovedCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifyauthapprovedCall {
  14503. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14504. return c
  14505. }
  14506. // Context sets the context to be used in this call's Do method. Any
  14507. // pending HTTP request will be aborted if the provided context is
  14508. // canceled.
  14509. func (c *OrderpaymentsNotifyauthapprovedCall) Context(ctx context.Context) *OrderpaymentsNotifyauthapprovedCall {
  14510. c.ctx_ = ctx
  14511. return c
  14512. }
  14513. // Header returns an http.Header that can be modified by the caller to
  14514. // add HTTP headers to the request.
  14515. func (c *OrderpaymentsNotifyauthapprovedCall) Header() http.Header {
  14516. if c.header_ == nil {
  14517. c.header_ = make(http.Header)
  14518. }
  14519. return c.header_
  14520. }
  14521. func (c *OrderpaymentsNotifyauthapprovedCall) doRequest(alt string) (*http.Response, error) {
  14522. reqHeaders := make(http.Header)
  14523. for k, v := range c.header_ {
  14524. reqHeaders[k] = v
  14525. }
  14526. reqHeaders.Set("User-Agent", c.s.userAgent())
  14527. var body io.Reader = nil
  14528. body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifyauthapprovedrequest)
  14529. if err != nil {
  14530. return nil, err
  14531. }
  14532. reqHeaders.Set("Content-Type", "application/json")
  14533. c.urlParams_.Set("alt", alt)
  14534. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyAuthApproved")
  14535. urls += "?" + c.urlParams_.Encode()
  14536. req, _ := http.NewRequest("POST", urls, body)
  14537. req.Header = reqHeaders
  14538. googleapi.Expand(req.URL, map[string]string{
  14539. "merchantId": strconv.FormatUint(c.merchantId, 10),
  14540. "orderId": c.orderId,
  14541. })
  14542. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14543. }
  14544. // Do executes the "content.orderpayments.notifyauthapproved" call.
  14545. // Exactly one of *OrderpaymentsNotifyAuthApprovedResponse or error will
  14546. // be non-nil. Any non-2xx status code is an error. Response headers are
  14547. // in either
  14548. // *OrderpaymentsNotifyAuthApprovedResponse.ServerResponse.Header or (if
  14549. // a response was returned at all) in error.(*googleapi.Error).Header.
  14550. // Use googleapi.IsNotModified to check whether the returned error was
  14551. // because http.StatusNotModified was returned.
  14552. func (c *OrderpaymentsNotifyauthapprovedCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyAuthApprovedResponse, error) {
  14553. gensupport.SetOptions(c.urlParams_, opts...)
  14554. res, err := c.doRequest("json")
  14555. if res != nil && res.StatusCode == http.StatusNotModified {
  14556. if res.Body != nil {
  14557. res.Body.Close()
  14558. }
  14559. return nil, &googleapi.Error{
  14560. Code: res.StatusCode,
  14561. Header: res.Header,
  14562. }
  14563. }
  14564. if err != nil {
  14565. return nil, err
  14566. }
  14567. defer googleapi.CloseBody(res)
  14568. if err := googleapi.CheckResponse(res); err != nil {
  14569. return nil, err
  14570. }
  14571. ret := &OrderpaymentsNotifyAuthApprovedResponse{
  14572. ServerResponse: googleapi.ServerResponse{
  14573. Header: res.Header,
  14574. HTTPStatusCode: res.StatusCode,
  14575. },
  14576. }
  14577. target := &ret
  14578. if err := gensupport.DecodeResponse(target, res); err != nil {
  14579. return nil, err
  14580. }
  14581. return ret, nil
  14582. // {
  14583. // "description": "Notify about successfully authorizing user's payment method for a given amount.",
  14584. // "httpMethod": "POST",
  14585. // "id": "content.orderpayments.notifyauthapproved",
  14586. // "parameterOrder": [
  14587. // "merchantId",
  14588. // "orderId"
  14589. // ],
  14590. // "parameters": {
  14591. // "merchantId": {
  14592. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  14593. // "format": "uint64",
  14594. // "location": "path",
  14595. // "required": true,
  14596. // "type": "string"
  14597. // },
  14598. // "orderId": {
  14599. // "description": "The ID of the order for for which payment authorization is happening.",
  14600. // "location": "path",
  14601. // "required": true,
  14602. // "type": "string"
  14603. // }
  14604. // },
  14605. // "path": "{merchantId}/orderpayments/{orderId}/notifyAuthApproved",
  14606. // "request": {
  14607. // "$ref": "OrderpaymentsNotifyAuthApprovedRequest"
  14608. // },
  14609. // "response": {
  14610. // "$ref": "OrderpaymentsNotifyAuthApprovedResponse"
  14611. // },
  14612. // "scopes": [
  14613. // "https://www.googleapis.com/auth/content"
  14614. // ]
  14615. // }
  14616. }
  14617. // method id "content.orderpayments.notifyauthdeclined":
  14618. type OrderpaymentsNotifyauthdeclinedCall struct {
  14619. s *APIService
  14620. merchantId uint64
  14621. orderId string
  14622. orderpaymentsnotifyauthdeclinedrequest *OrderpaymentsNotifyAuthDeclinedRequest
  14623. urlParams_ gensupport.URLParams
  14624. ctx_ context.Context
  14625. header_ http.Header
  14626. }
  14627. // Notifyauthdeclined: Notify about failure to authorize user's payment
  14628. // method.
  14629. func (r *OrderpaymentsService) Notifyauthdeclined(merchantId uint64, orderId string, orderpaymentsnotifyauthdeclinedrequest *OrderpaymentsNotifyAuthDeclinedRequest) *OrderpaymentsNotifyauthdeclinedCall {
  14630. c := &OrderpaymentsNotifyauthdeclinedCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14631. c.merchantId = merchantId
  14632. c.orderId = orderId
  14633. c.orderpaymentsnotifyauthdeclinedrequest = orderpaymentsnotifyauthdeclinedrequest
  14634. return c
  14635. }
  14636. // Fields allows partial responses to be retrieved. See
  14637. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14638. // for more information.
  14639. func (c *OrderpaymentsNotifyauthdeclinedCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifyauthdeclinedCall {
  14640. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14641. return c
  14642. }
  14643. // Context sets the context to be used in this call's Do method. Any
  14644. // pending HTTP request will be aborted if the provided context is
  14645. // canceled.
  14646. func (c *OrderpaymentsNotifyauthdeclinedCall) Context(ctx context.Context) *OrderpaymentsNotifyauthdeclinedCall {
  14647. c.ctx_ = ctx
  14648. return c
  14649. }
  14650. // Header returns an http.Header that can be modified by the caller to
  14651. // add HTTP headers to the request.
  14652. func (c *OrderpaymentsNotifyauthdeclinedCall) Header() http.Header {
  14653. if c.header_ == nil {
  14654. c.header_ = make(http.Header)
  14655. }
  14656. return c.header_
  14657. }
  14658. func (c *OrderpaymentsNotifyauthdeclinedCall) doRequest(alt string) (*http.Response, error) {
  14659. reqHeaders := make(http.Header)
  14660. for k, v := range c.header_ {
  14661. reqHeaders[k] = v
  14662. }
  14663. reqHeaders.Set("User-Agent", c.s.userAgent())
  14664. var body io.Reader = nil
  14665. body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifyauthdeclinedrequest)
  14666. if err != nil {
  14667. return nil, err
  14668. }
  14669. reqHeaders.Set("Content-Type", "application/json")
  14670. c.urlParams_.Set("alt", alt)
  14671. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyAuthDeclined")
  14672. urls += "?" + c.urlParams_.Encode()
  14673. req, _ := http.NewRequest("POST", urls, body)
  14674. req.Header = reqHeaders
  14675. googleapi.Expand(req.URL, map[string]string{
  14676. "merchantId": strconv.FormatUint(c.merchantId, 10),
  14677. "orderId": c.orderId,
  14678. })
  14679. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14680. }
  14681. // Do executes the "content.orderpayments.notifyauthdeclined" call.
  14682. // Exactly one of *OrderpaymentsNotifyAuthDeclinedResponse or error will
  14683. // be non-nil. Any non-2xx status code is an error. Response headers are
  14684. // in either
  14685. // *OrderpaymentsNotifyAuthDeclinedResponse.ServerResponse.Header or (if
  14686. // a response was returned at all) in error.(*googleapi.Error).Header.
  14687. // Use googleapi.IsNotModified to check whether the returned error was
  14688. // because http.StatusNotModified was returned.
  14689. func (c *OrderpaymentsNotifyauthdeclinedCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyAuthDeclinedResponse, error) {
  14690. gensupport.SetOptions(c.urlParams_, opts...)
  14691. res, err := c.doRequest("json")
  14692. if res != nil && res.StatusCode == http.StatusNotModified {
  14693. if res.Body != nil {
  14694. res.Body.Close()
  14695. }
  14696. return nil, &googleapi.Error{
  14697. Code: res.StatusCode,
  14698. Header: res.Header,
  14699. }
  14700. }
  14701. if err != nil {
  14702. return nil, err
  14703. }
  14704. defer googleapi.CloseBody(res)
  14705. if err := googleapi.CheckResponse(res); err != nil {
  14706. return nil, err
  14707. }
  14708. ret := &OrderpaymentsNotifyAuthDeclinedResponse{
  14709. ServerResponse: googleapi.ServerResponse{
  14710. Header: res.Header,
  14711. HTTPStatusCode: res.StatusCode,
  14712. },
  14713. }
  14714. target := &ret
  14715. if err := gensupport.DecodeResponse(target, res); err != nil {
  14716. return nil, err
  14717. }
  14718. return ret, nil
  14719. // {
  14720. // "description": "Notify about failure to authorize user's payment method.",
  14721. // "httpMethod": "POST",
  14722. // "id": "content.orderpayments.notifyauthdeclined",
  14723. // "parameterOrder": [
  14724. // "merchantId",
  14725. // "orderId"
  14726. // ],
  14727. // "parameters": {
  14728. // "merchantId": {
  14729. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  14730. // "format": "uint64",
  14731. // "location": "path",
  14732. // "required": true,
  14733. // "type": "string"
  14734. // },
  14735. // "orderId": {
  14736. // "description": "The ID of the order for which payment authorization was declined.",
  14737. // "location": "path",
  14738. // "required": true,
  14739. // "type": "string"
  14740. // }
  14741. // },
  14742. // "path": "{merchantId}/orderpayments/{orderId}/notifyAuthDeclined",
  14743. // "request": {
  14744. // "$ref": "OrderpaymentsNotifyAuthDeclinedRequest"
  14745. // },
  14746. // "response": {
  14747. // "$ref": "OrderpaymentsNotifyAuthDeclinedResponse"
  14748. // },
  14749. // "scopes": [
  14750. // "https://www.googleapis.com/auth/content"
  14751. // ]
  14752. // }
  14753. }
  14754. // method id "content.orderpayments.notifycharge":
  14755. type OrderpaymentsNotifychargeCall struct {
  14756. s *APIService
  14757. merchantId uint64
  14758. orderId string
  14759. orderpaymentsnotifychargerequest *OrderpaymentsNotifyChargeRequest
  14760. urlParams_ gensupport.URLParams
  14761. ctx_ context.Context
  14762. header_ http.Header
  14763. }
  14764. // Notifycharge: Notify about charge on user's selected payments method.
  14765. func (r *OrderpaymentsService) Notifycharge(merchantId uint64, orderId string, orderpaymentsnotifychargerequest *OrderpaymentsNotifyChargeRequest) *OrderpaymentsNotifychargeCall {
  14766. c := &OrderpaymentsNotifychargeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14767. c.merchantId = merchantId
  14768. c.orderId = orderId
  14769. c.orderpaymentsnotifychargerequest = orderpaymentsnotifychargerequest
  14770. return c
  14771. }
  14772. // Fields allows partial responses to be retrieved. See
  14773. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14774. // for more information.
  14775. func (c *OrderpaymentsNotifychargeCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifychargeCall {
  14776. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14777. return c
  14778. }
  14779. // Context sets the context to be used in this call's Do method. Any
  14780. // pending HTTP request will be aborted if the provided context is
  14781. // canceled.
  14782. func (c *OrderpaymentsNotifychargeCall) Context(ctx context.Context) *OrderpaymentsNotifychargeCall {
  14783. c.ctx_ = ctx
  14784. return c
  14785. }
  14786. // Header returns an http.Header that can be modified by the caller to
  14787. // add HTTP headers to the request.
  14788. func (c *OrderpaymentsNotifychargeCall) Header() http.Header {
  14789. if c.header_ == nil {
  14790. c.header_ = make(http.Header)
  14791. }
  14792. return c.header_
  14793. }
  14794. func (c *OrderpaymentsNotifychargeCall) doRequest(alt string) (*http.Response, error) {
  14795. reqHeaders := make(http.Header)
  14796. for k, v := range c.header_ {
  14797. reqHeaders[k] = v
  14798. }
  14799. reqHeaders.Set("User-Agent", c.s.userAgent())
  14800. var body io.Reader = nil
  14801. body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifychargerequest)
  14802. if err != nil {
  14803. return nil, err
  14804. }
  14805. reqHeaders.Set("Content-Type", "application/json")
  14806. c.urlParams_.Set("alt", alt)
  14807. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyCharge")
  14808. urls += "?" + c.urlParams_.Encode()
  14809. req, _ := http.NewRequest("POST", urls, body)
  14810. req.Header = reqHeaders
  14811. googleapi.Expand(req.URL, map[string]string{
  14812. "merchantId": strconv.FormatUint(c.merchantId, 10),
  14813. "orderId": c.orderId,
  14814. })
  14815. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14816. }
  14817. // Do executes the "content.orderpayments.notifycharge" call.
  14818. // Exactly one of *OrderpaymentsNotifyChargeResponse or error will be
  14819. // non-nil. Any non-2xx status code is an error. Response headers are in
  14820. // either *OrderpaymentsNotifyChargeResponse.ServerResponse.Header or
  14821. // (if a response was returned at all) in
  14822. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  14823. // whether the returned error was because http.StatusNotModified was
  14824. // returned.
  14825. func (c *OrderpaymentsNotifychargeCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyChargeResponse, error) {
  14826. gensupport.SetOptions(c.urlParams_, opts...)
  14827. res, err := c.doRequest("json")
  14828. if res != nil && res.StatusCode == http.StatusNotModified {
  14829. if res.Body != nil {
  14830. res.Body.Close()
  14831. }
  14832. return nil, &googleapi.Error{
  14833. Code: res.StatusCode,
  14834. Header: res.Header,
  14835. }
  14836. }
  14837. if err != nil {
  14838. return nil, err
  14839. }
  14840. defer googleapi.CloseBody(res)
  14841. if err := googleapi.CheckResponse(res); err != nil {
  14842. return nil, err
  14843. }
  14844. ret := &OrderpaymentsNotifyChargeResponse{
  14845. ServerResponse: googleapi.ServerResponse{
  14846. Header: res.Header,
  14847. HTTPStatusCode: res.StatusCode,
  14848. },
  14849. }
  14850. target := &ret
  14851. if err := gensupport.DecodeResponse(target, res); err != nil {
  14852. return nil, err
  14853. }
  14854. return ret, nil
  14855. // {
  14856. // "description": "Notify about charge on user's selected payments method.",
  14857. // "httpMethod": "POST",
  14858. // "id": "content.orderpayments.notifycharge",
  14859. // "parameterOrder": [
  14860. // "merchantId",
  14861. // "orderId"
  14862. // ],
  14863. // "parameters": {
  14864. // "merchantId": {
  14865. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  14866. // "format": "uint64",
  14867. // "location": "path",
  14868. // "required": true,
  14869. // "type": "string"
  14870. // },
  14871. // "orderId": {
  14872. // "description": "The ID of the order for which charge is happening.",
  14873. // "location": "path",
  14874. // "required": true,
  14875. // "type": "string"
  14876. // }
  14877. // },
  14878. // "path": "{merchantId}/orderpayments/{orderId}/notifyCharge",
  14879. // "request": {
  14880. // "$ref": "OrderpaymentsNotifyChargeRequest"
  14881. // },
  14882. // "response": {
  14883. // "$ref": "OrderpaymentsNotifyChargeResponse"
  14884. // },
  14885. // "scopes": [
  14886. // "https://www.googleapis.com/auth/content"
  14887. // ]
  14888. // }
  14889. }
  14890. // method id "content.orderpayments.notifyrefund":
  14891. type OrderpaymentsNotifyrefundCall struct {
  14892. s *APIService
  14893. merchantId uint64
  14894. orderId string
  14895. orderpaymentsnotifyrefundrequest *OrderpaymentsNotifyRefundRequest
  14896. urlParams_ gensupport.URLParams
  14897. ctx_ context.Context
  14898. header_ http.Header
  14899. }
  14900. // Notifyrefund: Notify about refund on user's selected payments method.
  14901. func (r *OrderpaymentsService) Notifyrefund(merchantId uint64, orderId string, orderpaymentsnotifyrefundrequest *OrderpaymentsNotifyRefundRequest) *OrderpaymentsNotifyrefundCall {
  14902. c := &OrderpaymentsNotifyrefundCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  14903. c.merchantId = merchantId
  14904. c.orderId = orderId
  14905. c.orderpaymentsnotifyrefundrequest = orderpaymentsnotifyrefundrequest
  14906. return c
  14907. }
  14908. // Fields allows partial responses to be retrieved. See
  14909. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  14910. // for more information.
  14911. func (c *OrderpaymentsNotifyrefundCall) Fields(s ...googleapi.Field) *OrderpaymentsNotifyrefundCall {
  14912. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  14913. return c
  14914. }
  14915. // Context sets the context to be used in this call's Do method. Any
  14916. // pending HTTP request will be aborted if the provided context is
  14917. // canceled.
  14918. func (c *OrderpaymentsNotifyrefundCall) Context(ctx context.Context) *OrderpaymentsNotifyrefundCall {
  14919. c.ctx_ = ctx
  14920. return c
  14921. }
  14922. // Header returns an http.Header that can be modified by the caller to
  14923. // add HTTP headers to the request.
  14924. func (c *OrderpaymentsNotifyrefundCall) Header() http.Header {
  14925. if c.header_ == nil {
  14926. c.header_ = make(http.Header)
  14927. }
  14928. return c.header_
  14929. }
  14930. func (c *OrderpaymentsNotifyrefundCall) doRequest(alt string) (*http.Response, error) {
  14931. reqHeaders := make(http.Header)
  14932. for k, v := range c.header_ {
  14933. reqHeaders[k] = v
  14934. }
  14935. reqHeaders.Set("User-Agent", c.s.userAgent())
  14936. var body io.Reader = nil
  14937. body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderpaymentsnotifyrefundrequest)
  14938. if err != nil {
  14939. return nil, err
  14940. }
  14941. reqHeaders.Set("Content-Type", "application/json")
  14942. c.urlParams_.Set("alt", alt)
  14943. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orderpayments/{orderId}/notifyRefund")
  14944. urls += "?" + c.urlParams_.Encode()
  14945. req, _ := http.NewRequest("POST", urls, body)
  14946. req.Header = reqHeaders
  14947. googleapi.Expand(req.URL, map[string]string{
  14948. "merchantId": strconv.FormatUint(c.merchantId, 10),
  14949. "orderId": c.orderId,
  14950. })
  14951. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  14952. }
  14953. // Do executes the "content.orderpayments.notifyrefund" call.
  14954. // Exactly one of *OrderpaymentsNotifyRefundResponse or error will be
  14955. // non-nil. Any non-2xx status code is an error. Response headers are in
  14956. // either *OrderpaymentsNotifyRefundResponse.ServerResponse.Header or
  14957. // (if a response was returned at all) in
  14958. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  14959. // whether the returned error was because http.StatusNotModified was
  14960. // returned.
  14961. func (c *OrderpaymentsNotifyrefundCall) Do(opts ...googleapi.CallOption) (*OrderpaymentsNotifyRefundResponse, error) {
  14962. gensupport.SetOptions(c.urlParams_, opts...)
  14963. res, err := c.doRequest("json")
  14964. if res != nil && res.StatusCode == http.StatusNotModified {
  14965. if res.Body != nil {
  14966. res.Body.Close()
  14967. }
  14968. return nil, &googleapi.Error{
  14969. Code: res.StatusCode,
  14970. Header: res.Header,
  14971. }
  14972. }
  14973. if err != nil {
  14974. return nil, err
  14975. }
  14976. defer googleapi.CloseBody(res)
  14977. if err := googleapi.CheckResponse(res); err != nil {
  14978. return nil, err
  14979. }
  14980. ret := &OrderpaymentsNotifyRefundResponse{
  14981. ServerResponse: googleapi.ServerResponse{
  14982. Header: res.Header,
  14983. HTTPStatusCode: res.StatusCode,
  14984. },
  14985. }
  14986. target := &ret
  14987. if err := gensupport.DecodeResponse(target, res); err != nil {
  14988. return nil, err
  14989. }
  14990. return ret, nil
  14991. // {
  14992. // "description": "Notify about refund on user's selected payments method.",
  14993. // "httpMethod": "POST",
  14994. // "id": "content.orderpayments.notifyrefund",
  14995. // "parameterOrder": [
  14996. // "merchantId",
  14997. // "orderId"
  14998. // ],
  14999. // "parameters": {
  15000. // "merchantId": {
  15001. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  15002. // "format": "uint64",
  15003. // "location": "path",
  15004. // "required": true,
  15005. // "type": "string"
  15006. // },
  15007. // "orderId": {
  15008. // "description": "The ID of the order for which charge is happening.",
  15009. // "location": "path",
  15010. // "required": true,
  15011. // "type": "string"
  15012. // }
  15013. // },
  15014. // "path": "{merchantId}/orderpayments/{orderId}/notifyRefund",
  15015. // "request": {
  15016. // "$ref": "OrderpaymentsNotifyRefundRequest"
  15017. // },
  15018. // "response": {
  15019. // "$ref": "OrderpaymentsNotifyRefundResponse"
  15020. // },
  15021. // "scopes": [
  15022. // "https://www.googleapis.com/auth/content"
  15023. // ]
  15024. // }
  15025. }
  15026. // method id "content.orders.acknowledge":
  15027. type OrdersAcknowledgeCall struct {
  15028. s *APIService
  15029. merchantId uint64
  15030. orderId string
  15031. ordersacknowledgerequest *OrdersAcknowledgeRequest
  15032. urlParams_ gensupport.URLParams
  15033. ctx_ context.Context
  15034. header_ http.Header
  15035. }
  15036. // Acknowledge: Marks an order as acknowledged.
  15037. func (r *OrdersService) Acknowledge(merchantId uint64, orderId string, ordersacknowledgerequest *OrdersAcknowledgeRequest) *OrdersAcknowledgeCall {
  15038. c := &OrdersAcknowledgeCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15039. c.merchantId = merchantId
  15040. c.orderId = orderId
  15041. c.ordersacknowledgerequest = ordersacknowledgerequest
  15042. return c
  15043. }
  15044. // Fields allows partial responses to be retrieved. See
  15045. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15046. // for more information.
  15047. func (c *OrdersAcknowledgeCall) Fields(s ...googleapi.Field) *OrdersAcknowledgeCall {
  15048. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15049. return c
  15050. }
  15051. // Context sets the context to be used in this call's Do method. Any
  15052. // pending HTTP request will be aborted if the provided context is
  15053. // canceled.
  15054. func (c *OrdersAcknowledgeCall) Context(ctx context.Context) *OrdersAcknowledgeCall {
  15055. c.ctx_ = ctx
  15056. return c
  15057. }
  15058. // Header returns an http.Header that can be modified by the caller to
  15059. // add HTTP headers to the request.
  15060. func (c *OrdersAcknowledgeCall) Header() http.Header {
  15061. if c.header_ == nil {
  15062. c.header_ = make(http.Header)
  15063. }
  15064. return c.header_
  15065. }
  15066. func (c *OrdersAcknowledgeCall) doRequest(alt string) (*http.Response, error) {
  15067. reqHeaders := make(http.Header)
  15068. for k, v := range c.header_ {
  15069. reqHeaders[k] = v
  15070. }
  15071. reqHeaders.Set("User-Agent", c.s.userAgent())
  15072. var body io.Reader = nil
  15073. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersacknowledgerequest)
  15074. if err != nil {
  15075. return nil, err
  15076. }
  15077. reqHeaders.Set("Content-Type", "application/json")
  15078. c.urlParams_.Set("alt", alt)
  15079. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/acknowledge")
  15080. urls += "?" + c.urlParams_.Encode()
  15081. req, _ := http.NewRequest("POST", urls, body)
  15082. req.Header = reqHeaders
  15083. googleapi.Expand(req.URL, map[string]string{
  15084. "merchantId": strconv.FormatUint(c.merchantId, 10),
  15085. "orderId": c.orderId,
  15086. })
  15087. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15088. }
  15089. // Do executes the "content.orders.acknowledge" call.
  15090. // Exactly one of *OrdersAcknowledgeResponse or error will be non-nil.
  15091. // Any non-2xx status code is an error. Response headers are in either
  15092. // *OrdersAcknowledgeResponse.ServerResponse.Header or (if a response
  15093. // was returned at all) in error.(*googleapi.Error).Header. Use
  15094. // googleapi.IsNotModified to check whether the returned error was
  15095. // because http.StatusNotModified was returned.
  15096. func (c *OrdersAcknowledgeCall) Do(opts ...googleapi.CallOption) (*OrdersAcknowledgeResponse, error) {
  15097. gensupport.SetOptions(c.urlParams_, opts...)
  15098. res, err := c.doRequest("json")
  15099. if res != nil && res.StatusCode == http.StatusNotModified {
  15100. if res.Body != nil {
  15101. res.Body.Close()
  15102. }
  15103. return nil, &googleapi.Error{
  15104. Code: res.StatusCode,
  15105. Header: res.Header,
  15106. }
  15107. }
  15108. if err != nil {
  15109. return nil, err
  15110. }
  15111. defer googleapi.CloseBody(res)
  15112. if err := googleapi.CheckResponse(res); err != nil {
  15113. return nil, err
  15114. }
  15115. ret := &OrdersAcknowledgeResponse{
  15116. ServerResponse: googleapi.ServerResponse{
  15117. Header: res.Header,
  15118. HTTPStatusCode: res.StatusCode,
  15119. },
  15120. }
  15121. target := &ret
  15122. if err := gensupport.DecodeResponse(target, res); err != nil {
  15123. return nil, err
  15124. }
  15125. return ret, nil
  15126. // {
  15127. // "description": "Marks an order as acknowledged.",
  15128. // "httpMethod": "POST",
  15129. // "id": "content.orders.acknowledge",
  15130. // "parameterOrder": [
  15131. // "merchantId",
  15132. // "orderId"
  15133. // ],
  15134. // "parameters": {
  15135. // "merchantId": {
  15136. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  15137. // "format": "uint64",
  15138. // "location": "path",
  15139. // "required": true,
  15140. // "type": "string"
  15141. // },
  15142. // "orderId": {
  15143. // "description": "The ID of the order.",
  15144. // "location": "path",
  15145. // "required": true,
  15146. // "type": "string"
  15147. // }
  15148. // },
  15149. // "path": "{merchantId}/orders/{orderId}/acknowledge",
  15150. // "request": {
  15151. // "$ref": "OrdersAcknowledgeRequest"
  15152. // },
  15153. // "response": {
  15154. // "$ref": "OrdersAcknowledgeResponse"
  15155. // },
  15156. // "scopes": [
  15157. // "https://www.googleapis.com/auth/content"
  15158. // ]
  15159. // }
  15160. }
  15161. // method id "content.orders.advancetestorder":
  15162. type OrdersAdvancetestorderCall struct {
  15163. s *APIService
  15164. merchantId uint64
  15165. orderId string
  15166. urlParams_ gensupport.URLParams
  15167. ctx_ context.Context
  15168. header_ http.Header
  15169. }
  15170. // Advancetestorder: Sandbox only. Moves a test order from state
  15171. // "inProgress" to state "pendingShipment".
  15172. func (r *OrdersService) Advancetestorder(merchantId uint64, orderId string) *OrdersAdvancetestorderCall {
  15173. c := &OrdersAdvancetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15174. c.merchantId = merchantId
  15175. c.orderId = orderId
  15176. return c
  15177. }
  15178. // Fields allows partial responses to be retrieved. See
  15179. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15180. // for more information.
  15181. func (c *OrdersAdvancetestorderCall) Fields(s ...googleapi.Field) *OrdersAdvancetestorderCall {
  15182. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15183. return c
  15184. }
  15185. // Context sets the context to be used in this call's Do method. Any
  15186. // pending HTTP request will be aborted if the provided context is
  15187. // canceled.
  15188. func (c *OrdersAdvancetestorderCall) Context(ctx context.Context) *OrdersAdvancetestorderCall {
  15189. c.ctx_ = ctx
  15190. return c
  15191. }
  15192. // Header returns an http.Header that can be modified by the caller to
  15193. // add HTTP headers to the request.
  15194. func (c *OrdersAdvancetestorderCall) Header() http.Header {
  15195. if c.header_ == nil {
  15196. c.header_ = make(http.Header)
  15197. }
  15198. return c.header_
  15199. }
  15200. func (c *OrdersAdvancetestorderCall) doRequest(alt string) (*http.Response, error) {
  15201. reqHeaders := make(http.Header)
  15202. for k, v := range c.header_ {
  15203. reqHeaders[k] = v
  15204. }
  15205. reqHeaders.Set("User-Agent", c.s.userAgent())
  15206. var body io.Reader = nil
  15207. c.urlParams_.Set("alt", alt)
  15208. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders/{orderId}/advance")
  15209. urls += "?" + c.urlParams_.Encode()
  15210. req, _ := http.NewRequest("POST", urls, body)
  15211. req.Header = reqHeaders
  15212. googleapi.Expand(req.URL, map[string]string{
  15213. "merchantId": strconv.FormatUint(c.merchantId, 10),
  15214. "orderId": c.orderId,
  15215. })
  15216. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15217. }
  15218. // Do executes the "content.orders.advancetestorder" call.
  15219. // Exactly one of *OrdersAdvanceTestOrderResponse or error will be
  15220. // non-nil. Any non-2xx status code is an error. Response headers are in
  15221. // either *OrdersAdvanceTestOrderResponse.ServerResponse.Header or (if a
  15222. // response was returned at all) in error.(*googleapi.Error).Header. Use
  15223. // googleapi.IsNotModified to check whether the returned error was
  15224. // because http.StatusNotModified was returned.
  15225. func (c *OrdersAdvancetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersAdvanceTestOrderResponse, error) {
  15226. gensupport.SetOptions(c.urlParams_, opts...)
  15227. res, err := c.doRequest("json")
  15228. if res != nil && res.StatusCode == http.StatusNotModified {
  15229. if res.Body != nil {
  15230. res.Body.Close()
  15231. }
  15232. return nil, &googleapi.Error{
  15233. Code: res.StatusCode,
  15234. Header: res.Header,
  15235. }
  15236. }
  15237. if err != nil {
  15238. return nil, err
  15239. }
  15240. defer googleapi.CloseBody(res)
  15241. if err := googleapi.CheckResponse(res); err != nil {
  15242. return nil, err
  15243. }
  15244. ret := &OrdersAdvanceTestOrderResponse{
  15245. ServerResponse: googleapi.ServerResponse{
  15246. Header: res.Header,
  15247. HTTPStatusCode: res.StatusCode,
  15248. },
  15249. }
  15250. target := &ret
  15251. if err := gensupport.DecodeResponse(target, res); err != nil {
  15252. return nil, err
  15253. }
  15254. return ret, nil
  15255. // {
  15256. // "description": "Sandbox only. Moves a test order from state \"inProgress\" to state \"pendingShipment\".",
  15257. // "httpMethod": "POST",
  15258. // "id": "content.orders.advancetestorder",
  15259. // "parameterOrder": [
  15260. // "merchantId",
  15261. // "orderId"
  15262. // ],
  15263. // "parameters": {
  15264. // "merchantId": {
  15265. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  15266. // "format": "uint64",
  15267. // "location": "path",
  15268. // "required": true,
  15269. // "type": "string"
  15270. // },
  15271. // "orderId": {
  15272. // "description": "The ID of the test order to modify.",
  15273. // "location": "path",
  15274. // "required": true,
  15275. // "type": "string"
  15276. // }
  15277. // },
  15278. // "path": "{merchantId}/testorders/{orderId}/advance",
  15279. // "response": {
  15280. // "$ref": "OrdersAdvanceTestOrderResponse"
  15281. // },
  15282. // "scopes": [
  15283. // "https://www.googleapis.com/auth/content"
  15284. // ]
  15285. // }
  15286. }
  15287. // method id "content.orders.cancel":
  15288. type OrdersCancelCall struct {
  15289. s *APIService
  15290. merchantId uint64
  15291. orderId string
  15292. orderscancelrequest *OrdersCancelRequest
  15293. urlParams_ gensupport.URLParams
  15294. ctx_ context.Context
  15295. header_ http.Header
  15296. }
  15297. // Cancel: Cancels all line items in an order, making a full refund.
  15298. func (r *OrdersService) Cancel(merchantId uint64, orderId string, orderscancelrequest *OrdersCancelRequest) *OrdersCancelCall {
  15299. c := &OrdersCancelCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15300. c.merchantId = merchantId
  15301. c.orderId = orderId
  15302. c.orderscancelrequest = orderscancelrequest
  15303. return c
  15304. }
  15305. // Fields allows partial responses to be retrieved. See
  15306. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15307. // for more information.
  15308. func (c *OrdersCancelCall) Fields(s ...googleapi.Field) *OrdersCancelCall {
  15309. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15310. return c
  15311. }
  15312. // Context sets the context to be used in this call's Do method. Any
  15313. // pending HTTP request will be aborted if the provided context is
  15314. // canceled.
  15315. func (c *OrdersCancelCall) Context(ctx context.Context) *OrdersCancelCall {
  15316. c.ctx_ = ctx
  15317. return c
  15318. }
  15319. // Header returns an http.Header that can be modified by the caller to
  15320. // add HTTP headers to the request.
  15321. func (c *OrdersCancelCall) Header() http.Header {
  15322. if c.header_ == nil {
  15323. c.header_ = make(http.Header)
  15324. }
  15325. return c.header_
  15326. }
  15327. func (c *OrdersCancelCall) doRequest(alt string) (*http.Response, error) {
  15328. reqHeaders := make(http.Header)
  15329. for k, v := range c.header_ {
  15330. reqHeaders[k] = v
  15331. }
  15332. reqHeaders.Set("User-Agent", c.s.userAgent())
  15333. var body io.Reader = nil
  15334. body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancelrequest)
  15335. if err != nil {
  15336. return nil, err
  15337. }
  15338. reqHeaders.Set("Content-Type", "application/json")
  15339. c.urlParams_.Set("alt", alt)
  15340. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancel")
  15341. urls += "?" + c.urlParams_.Encode()
  15342. req, _ := http.NewRequest("POST", urls, body)
  15343. req.Header = reqHeaders
  15344. googleapi.Expand(req.URL, map[string]string{
  15345. "merchantId": strconv.FormatUint(c.merchantId, 10),
  15346. "orderId": c.orderId,
  15347. })
  15348. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15349. }
  15350. // Do executes the "content.orders.cancel" call.
  15351. // Exactly one of *OrdersCancelResponse or error will be non-nil. Any
  15352. // non-2xx status code is an error. Response headers are in either
  15353. // *OrdersCancelResponse.ServerResponse.Header or (if a response was
  15354. // returned at all) in error.(*googleapi.Error).Header. Use
  15355. // googleapi.IsNotModified to check whether the returned error was
  15356. // because http.StatusNotModified was returned.
  15357. func (c *OrdersCancelCall) Do(opts ...googleapi.CallOption) (*OrdersCancelResponse, error) {
  15358. gensupport.SetOptions(c.urlParams_, opts...)
  15359. res, err := c.doRequest("json")
  15360. if res != nil && res.StatusCode == http.StatusNotModified {
  15361. if res.Body != nil {
  15362. res.Body.Close()
  15363. }
  15364. return nil, &googleapi.Error{
  15365. Code: res.StatusCode,
  15366. Header: res.Header,
  15367. }
  15368. }
  15369. if err != nil {
  15370. return nil, err
  15371. }
  15372. defer googleapi.CloseBody(res)
  15373. if err := googleapi.CheckResponse(res); err != nil {
  15374. return nil, err
  15375. }
  15376. ret := &OrdersCancelResponse{
  15377. ServerResponse: googleapi.ServerResponse{
  15378. Header: res.Header,
  15379. HTTPStatusCode: res.StatusCode,
  15380. },
  15381. }
  15382. target := &ret
  15383. if err := gensupport.DecodeResponse(target, res); err != nil {
  15384. return nil, err
  15385. }
  15386. return ret, nil
  15387. // {
  15388. // "description": "Cancels all line items in an order, making a full refund.",
  15389. // "httpMethod": "POST",
  15390. // "id": "content.orders.cancel",
  15391. // "parameterOrder": [
  15392. // "merchantId",
  15393. // "orderId"
  15394. // ],
  15395. // "parameters": {
  15396. // "merchantId": {
  15397. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  15398. // "format": "uint64",
  15399. // "location": "path",
  15400. // "required": true,
  15401. // "type": "string"
  15402. // },
  15403. // "orderId": {
  15404. // "description": "The ID of the order to cancel.",
  15405. // "location": "path",
  15406. // "required": true,
  15407. // "type": "string"
  15408. // }
  15409. // },
  15410. // "path": "{merchantId}/orders/{orderId}/cancel",
  15411. // "request": {
  15412. // "$ref": "OrdersCancelRequest"
  15413. // },
  15414. // "response": {
  15415. // "$ref": "OrdersCancelResponse"
  15416. // },
  15417. // "scopes": [
  15418. // "https://www.googleapis.com/auth/content"
  15419. // ]
  15420. // }
  15421. }
  15422. // method id "content.orders.cancellineitem":
  15423. type OrdersCancellineitemCall struct {
  15424. s *APIService
  15425. merchantId uint64
  15426. orderId string
  15427. orderscancellineitemrequest *OrdersCancelLineItemRequest
  15428. urlParams_ gensupport.URLParams
  15429. ctx_ context.Context
  15430. header_ http.Header
  15431. }
  15432. // Cancellineitem: Cancels a line item, making a full refund.
  15433. func (r *OrdersService) Cancellineitem(merchantId uint64, orderId string, orderscancellineitemrequest *OrdersCancelLineItemRequest) *OrdersCancellineitemCall {
  15434. c := &OrdersCancellineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15435. c.merchantId = merchantId
  15436. c.orderId = orderId
  15437. c.orderscancellineitemrequest = orderscancellineitemrequest
  15438. return c
  15439. }
  15440. // Fields allows partial responses to be retrieved. See
  15441. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15442. // for more information.
  15443. func (c *OrdersCancellineitemCall) Fields(s ...googleapi.Field) *OrdersCancellineitemCall {
  15444. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15445. return c
  15446. }
  15447. // Context sets the context to be used in this call's Do method. Any
  15448. // pending HTTP request will be aborted if the provided context is
  15449. // canceled.
  15450. func (c *OrdersCancellineitemCall) Context(ctx context.Context) *OrdersCancellineitemCall {
  15451. c.ctx_ = ctx
  15452. return c
  15453. }
  15454. // Header returns an http.Header that can be modified by the caller to
  15455. // add HTTP headers to the request.
  15456. func (c *OrdersCancellineitemCall) Header() http.Header {
  15457. if c.header_ == nil {
  15458. c.header_ = make(http.Header)
  15459. }
  15460. return c.header_
  15461. }
  15462. func (c *OrdersCancellineitemCall) doRequest(alt string) (*http.Response, error) {
  15463. reqHeaders := make(http.Header)
  15464. for k, v := range c.header_ {
  15465. reqHeaders[k] = v
  15466. }
  15467. reqHeaders.Set("User-Agent", c.s.userAgent())
  15468. var body io.Reader = nil
  15469. body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscancellineitemrequest)
  15470. if err != nil {
  15471. return nil, err
  15472. }
  15473. reqHeaders.Set("Content-Type", "application/json")
  15474. c.urlParams_.Set("alt", alt)
  15475. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/cancelLineItem")
  15476. urls += "?" + c.urlParams_.Encode()
  15477. req, _ := http.NewRequest("POST", urls, body)
  15478. req.Header = reqHeaders
  15479. googleapi.Expand(req.URL, map[string]string{
  15480. "merchantId": strconv.FormatUint(c.merchantId, 10),
  15481. "orderId": c.orderId,
  15482. })
  15483. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15484. }
  15485. // Do executes the "content.orders.cancellineitem" call.
  15486. // Exactly one of *OrdersCancelLineItemResponse or error will be
  15487. // non-nil. Any non-2xx status code is an error. Response headers are in
  15488. // either *OrdersCancelLineItemResponse.ServerResponse.Header or (if a
  15489. // response was returned at all) in error.(*googleapi.Error).Header. Use
  15490. // googleapi.IsNotModified to check whether the returned error was
  15491. // because http.StatusNotModified was returned.
  15492. func (c *OrdersCancellineitemCall) Do(opts ...googleapi.CallOption) (*OrdersCancelLineItemResponse, error) {
  15493. gensupport.SetOptions(c.urlParams_, opts...)
  15494. res, err := c.doRequest("json")
  15495. if res != nil && res.StatusCode == http.StatusNotModified {
  15496. if res.Body != nil {
  15497. res.Body.Close()
  15498. }
  15499. return nil, &googleapi.Error{
  15500. Code: res.StatusCode,
  15501. Header: res.Header,
  15502. }
  15503. }
  15504. if err != nil {
  15505. return nil, err
  15506. }
  15507. defer googleapi.CloseBody(res)
  15508. if err := googleapi.CheckResponse(res); err != nil {
  15509. return nil, err
  15510. }
  15511. ret := &OrdersCancelLineItemResponse{
  15512. ServerResponse: googleapi.ServerResponse{
  15513. Header: res.Header,
  15514. HTTPStatusCode: res.StatusCode,
  15515. },
  15516. }
  15517. target := &ret
  15518. if err := gensupport.DecodeResponse(target, res); err != nil {
  15519. return nil, err
  15520. }
  15521. return ret, nil
  15522. // {
  15523. // "description": "Cancels a line item, making a full refund.",
  15524. // "httpMethod": "POST",
  15525. // "id": "content.orders.cancellineitem",
  15526. // "parameterOrder": [
  15527. // "merchantId",
  15528. // "orderId"
  15529. // ],
  15530. // "parameters": {
  15531. // "merchantId": {
  15532. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  15533. // "format": "uint64",
  15534. // "location": "path",
  15535. // "required": true,
  15536. // "type": "string"
  15537. // },
  15538. // "orderId": {
  15539. // "description": "The ID of the order.",
  15540. // "location": "path",
  15541. // "required": true,
  15542. // "type": "string"
  15543. // }
  15544. // },
  15545. // "path": "{merchantId}/orders/{orderId}/cancelLineItem",
  15546. // "request": {
  15547. // "$ref": "OrdersCancelLineItemRequest"
  15548. // },
  15549. // "response": {
  15550. // "$ref": "OrdersCancelLineItemResponse"
  15551. // },
  15552. // "scopes": [
  15553. // "https://www.googleapis.com/auth/content"
  15554. // ]
  15555. // }
  15556. }
  15557. // method id "content.orders.createtestorder":
  15558. type OrdersCreatetestorderCall struct {
  15559. s *APIService
  15560. merchantId uint64
  15561. orderscreatetestorderrequest *OrdersCreateTestOrderRequest
  15562. urlParams_ gensupport.URLParams
  15563. ctx_ context.Context
  15564. header_ http.Header
  15565. }
  15566. // Createtestorder: Sandbox only. Creates a test order.
  15567. func (r *OrdersService) Createtestorder(merchantId uint64, orderscreatetestorderrequest *OrdersCreateTestOrderRequest) *OrdersCreatetestorderCall {
  15568. c := &OrdersCreatetestorderCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15569. c.merchantId = merchantId
  15570. c.orderscreatetestorderrequest = orderscreatetestorderrequest
  15571. return c
  15572. }
  15573. // Fields allows partial responses to be retrieved. See
  15574. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15575. // for more information.
  15576. func (c *OrdersCreatetestorderCall) Fields(s ...googleapi.Field) *OrdersCreatetestorderCall {
  15577. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15578. return c
  15579. }
  15580. // Context sets the context to be used in this call's Do method. Any
  15581. // pending HTTP request will be aborted if the provided context is
  15582. // canceled.
  15583. func (c *OrdersCreatetestorderCall) Context(ctx context.Context) *OrdersCreatetestorderCall {
  15584. c.ctx_ = ctx
  15585. return c
  15586. }
  15587. // Header returns an http.Header that can be modified by the caller to
  15588. // add HTTP headers to the request.
  15589. func (c *OrdersCreatetestorderCall) Header() http.Header {
  15590. if c.header_ == nil {
  15591. c.header_ = make(http.Header)
  15592. }
  15593. return c.header_
  15594. }
  15595. func (c *OrdersCreatetestorderCall) doRequest(alt string) (*http.Response, error) {
  15596. reqHeaders := make(http.Header)
  15597. for k, v := range c.header_ {
  15598. reqHeaders[k] = v
  15599. }
  15600. reqHeaders.Set("User-Agent", c.s.userAgent())
  15601. var body io.Reader = nil
  15602. body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscreatetestorderrequest)
  15603. if err != nil {
  15604. return nil, err
  15605. }
  15606. reqHeaders.Set("Content-Type", "application/json")
  15607. c.urlParams_.Set("alt", alt)
  15608. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testorders")
  15609. urls += "?" + c.urlParams_.Encode()
  15610. req, _ := http.NewRequest("POST", urls, body)
  15611. req.Header = reqHeaders
  15612. googleapi.Expand(req.URL, map[string]string{
  15613. "merchantId": strconv.FormatUint(c.merchantId, 10),
  15614. })
  15615. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15616. }
  15617. // Do executes the "content.orders.createtestorder" call.
  15618. // Exactly one of *OrdersCreateTestOrderResponse or error will be
  15619. // non-nil. Any non-2xx status code is an error. Response headers are in
  15620. // either *OrdersCreateTestOrderResponse.ServerResponse.Header or (if a
  15621. // response was returned at all) in error.(*googleapi.Error).Header. Use
  15622. // googleapi.IsNotModified to check whether the returned error was
  15623. // because http.StatusNotModified was returned.
  15624. func (c *OrdersCreatetestorderCall) Do(opts ...googleapi.CallOption) (*OrdersCreateTestOrderResponse, error) {
  15625. gensupport.SetOptions(c.urlParams_, opts...)
  15626. res, err := c.doRequest("json")
  15627. if res != nil && res.StatusCode == http.StatusNotModified {
  15628. if res.Body != nil {
  15629. res.Body.Close()
  15630. }
  15631. return nil, &googleapi.Error{
  15632. Code: res.StatusCode,
  15633. Header: res.Header,
  15634. }
  15635. }
  15636. if err != nil {
  15637. return nil, err
  15638. }
  15639. defer googleapi.CloseBody(res)
  15640. if err := googleapi.CheckResponse(res); err != nil {
  15641. return nil, err
  15642. }
  15643. ret := &OrdersCreateTestOrderResponse{
  15644. ServerResponse: googleapi.ServerResponse{
  15645. Header: res.Header,
  15646. HTTPStatusCode: res.StatusCode,
  15647. },
  15648. }
  15649. target := &ret
  15650. if err := gensupport.DecodeResponse(target, res); err != nil {
  15651. return nil, err
  15652. }
  15653. return ret, nil
  15654. // {
  15655. // "description": "Sandbox only. Creates a test order.",
  15656. // "httpMethod": "POST",
  15657. // "id": "content.orders.createtestorder",
  15658. // "parameterOrder": [
  15659. // "merchantId"
  15660. // ],
  15661. // "parameters": {
  15662. // "merchantId": {
  15663. // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.",
  15664. // "format": "uint64",
  15665. // "location": "path",
  15666. // "required": true,
  15667. // "type": "string"
  15668. // }
  15669. // },
  15670. // "path": "{merchantId}/testorders",
  15671. // "request": {
  15672. // "$ref": "OrdersCreateTestOrderRequest"
  15673. // },
  15674. // "response": {
  15675. // "$ref": "OrdersCreateTestOrderResponse"
  15676. // },
  15677. // "scopes": [
  15678. // "https://www.googleapis.com/auth/content"
  15679. // ]
  15680. // }
  15681. }
  15682. // method id "content.orders.custombatch":
  15683. type OrdersCustombatchCall struct {
  15684. s *APIService
  15685. orderscustombatchrequest *OrdersCustomBatchRequest
  15686. urlParams_ gensupport.URLParams
  15687. ctx_ context.Context
  15688. header_ http.Header
  15689. }
  15690. // Custombatch: Retrieves or modifies multiple orders in a single
  15691. // request.
  15692. func (r *OrdersService) Custombatch(orderscustombatchrequest *OrdersCustomBatchRequest) *OrdersCustombatchCall {
  15693. c := &OrdersCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15694. c.orderscustombatchrequest = orderscustombatchrequest
  15695. return c
  15696. }
  15697. // Fields allows partial responses to be retrieved. See
  15698. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15699. // for more information.
  15700. func (c *OrdersCustombatchCall) Fields(s ...googleapi.Field) *OrdersCustombatchCall {
  15701. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15702. return c
  15703. }
  15704. // Context sets the context to be used in this call's Do method. Any
  15705. // pending HTTP request will be aborted if the provided context is
  15706. // canceled.
  15707. func (c *OrdersCustombatchCall) Context(ctx context.Context) *OrdersCustombatchCall {
  15708. c.ctx_ = ctx
  15709. return c
  15710. }
  15711. // Header returns an http.Header that can be modified by the caller to
  15712. // add HTTP headers to the request.
  15713. func (c *OrdersCustombatchCall) Header() http.Header {
  15714. if c.header_ == nil {
  15715. c.header_ = make(http.Header)
  15716. }
  15717. return c.header_
  15718. }
  15719. func (c *OrdersCustombatchCall) doRequest(alt string) (*http.Response, error) {
  15720. reqHeaders := make(http.Header)
  15721. for k, v := range c.header_ {
  15722. reqHeaders[k] = v
  15723. }
  15724. reqHeaders.Set("User-Agent", c.s.userAgent())
  15725. var body io.Reader = nil
  15726. body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderscustombatchrequest)
  15727. if err != nil {
  15728. return nil, err
  15729. }
  15730. reqHeaders.Set("Content-Type", "application/json")
  15731. c.urlParams_.Set("alt", alt)
  15732. urls := googleapi.ResolveRelative(c.s.BasePath, "orders/batch")
  15733. urls += "?" + c.urlParams_.Encode()
  15734. req, _ := http.NewRequest("POST", urls, body)
  15735. req.Header = reqHeaders
  15736. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15737. }
  15738. // Do executes the "content.orders.custombatch" call.
  15739. // Exactly one of *OrdersCustomBatchResponse or error will be non-nil.
  15740. // Any non-2xx status code is an error. Response headers are in either
  15741. // *OrdersCustomBatchResponse.ServerResponse.Header or (if a response
  15742. // was returned at all) in error.(*googleapi.Error).Header. Use
  15743. // googleapi.IsNotModified to check whether the returned error was
  15744. // because http.StatusNotModified was returned.
  15745. func (c *OrdersCustombatchCall) Do(opts ...googleapi.CallOption) (*OrdersCustomBatchResponse, error) {
  15746. gensupport.SetOptions(c.urlParams_, opts...)
  15747. res, err := c.doRequest("json")
  15748. if res != nil && res.StatusCode == http.StatusNotModified {
  15749. if res.Body != nil {
  15750. res.Body.Close()
  15751. }
  15752. return nil, &googleapi.Error{
  15753. Code: res.StatusCode,
  15754. Header: res.Header,
  15755. }
  15756. }
  15757. if err != nil {
  15758. return nil, err
  15759. }
  15760. defer googleapi.CloseBody(res)
  15761. if err := googleapi.CheckResponse(res); err != nil {
  15762. return nil, err
  15763. }
  15764. ret := &OrdersCustomBatchResponse{
  15765. ServerResponse: googleapi.ServerResponse{
  15766. Header: res.Header,
  15767. HTTPStatusCode: res.StatusCode,
  15768. },
  15769. }
  15770. target := &ret
  15771. if err := gensupport.DecodeResponse(target, res); err != nil {
  15772. return nil, err
  15773. }
  15774. return ret, nil
  15775. // {
  15776. // "description": "Retrieves or modifies multiple orders in a single request.",
  15777. // "httpMethod": "POST",
  15778. // "id": "content.orders.custombatch",
  15779. // "path": "orders/batch",
  15780. // "request": {
  15781. // "$ref": "OrdersCustomBatchRequest"
  15782. // },
  15783. // "response": {
  15784. // "$ref": "OrdersCustomBatchResponse"
  15785. // },
  15786. // "scopes": [
  15787. // "https://www.googleapis.com/auth/content"
  15788. // ]
  15789. // }
  15790. }
  15791. // method id "content.orders.get":
  15792. type OrdersGetCall struct {
  15793. s *APIService
  15794. merchantId uint64
  15795. orderId string
  15796. urlParams_ gensupport.URLParams
  15797. ifNoneMatch_ string
  15798. ctx_ context.Context
  15799. header_ http.Header
  15800. }
  15801. // Get: Retrieves an order from your Merchant Center account.
  15802. func (r *OrdersService) Get(merchantId uint64, orderId string) *OrdersGetCall {
  15803. c := &OrdersGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15804. c.merchantId = merchantId
  15805. c.orderId = orderId
  15806. return c
  15807. }
  15808. // Fields allows partial responses to be retrieved. See
  15809. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15810. // for more information.
  15811. func (c *OrdersGetCall) Fields(s ...googleapi.Field) *OrdersGetCall {
  15812. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15813. return c
  15814. }
  15815. // IfNoneMatch sets the optional parameter which makes the operation
  15816. // fail if the object's ETag matches the given value. This is useful for
  15817. // getting updates only after the object has changed since the last
  15818. // request. Use googleapi.IsNotModified to check whether the response
  15819. // error from Do is the result of In-None-Match.
  15820. func (c *OrdersGetCall) IfNoneMatch(entityTag string) *OrdersGetCall {
  15821. c.ifNoneMatch_ = entityTag
  15822. return c
  15823. }
  15824. // Context sets the context to be used in this call's Do method. Any
  15825. // pending HTTP request will be aborted if the provided context is
  15826. // canceled.
  15827. func (c *OrdersGetCall) Context(ctx context.Context) *OrdersGetCall {
  15828. c.ctx_ = ctx
  15829. return c
  15830. }
  15831. // Header returns an http.Header that can be modified by the caller to
  15832. // add HTTP headers to the request.
  15833. func (c *OrdersGetCall) Header() http.Header {
  15834. if c.header_ == nil {
  15835. c.header_ = make(http.Header)
  15836. }
  15837. return c.header_
  15838. }
  15839. func (c *OrdersGetCall) doRequest(alt string) (*http.Response, error) {
  15840. reqHeaders := make(http.Header)
  15841. for k, v := range c.header_ {
  15842. reqHeaders[k] = v
  15843. }
  15844. reqHeaders.Set("User-Agent", c.s.userAgent())
  15845. if c.ifNoneMatch_ != "" {
  15846. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  15847. }
  15848. var body io.Reader = nil
  15849. c.urlParams_.Set("alt", alt)
  15850. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}")
  15851. urls += "?" + c.urlParams_.Encode()
  15852. req, _ := http.NewRequest("GET", urls, body)
  15853. req.Header = reqHeaders
  15854. googleapi.Expand(req.URL, map[string]string{
  15855. "merchantId": strconv.FormatUint(c.merchantId, 10),
  15856. "orderId": c.orderId,
  15857. })
  15858. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15859. }
  15860. // Do executes the "content.orders.get" call.
  15861. // Exactly one of *Order or error will be non-nil. Any non-2xx status
  15862. // code is an error. Response headers are in either
  15863. // *Order.ServerResponse.Header or (if a response was returned at all)
  15864. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  15865. // check whether the returned error was because http.StatusNotModified
  15866. // was returned.
  15867. func (c *OrdersGetCall) Do(opts ...googleapi.CallOption) (*Order, error) {
  15868. gensupport.SetOptions(c.urlParams_, opts...)
  15869. res, err := c.doRequest("json")
  15870. if res != nil && res.StatusCode == http.StatusNotModified {
  15871. if res.Body != nil {
  15872. res.Body.Close()
  15873. }
  15874. return nil, &googleapi.Error{
  15875. Code: res.StatusCode,
  15876. Header: res.Header,
  15877. }
  15878. }
  15879. if err != nil {
  15880. return nil, err
  15881. }
  15882. defer googleapi.CloseBody(res)
  15883. if err := googleapi.CheckResponse(res); err != nil {
  15884. return nil, err
  15885. }
  15886. ret := &Order{
  15887. ServerResponse: googleapi.ServerResponse{
  15888. Header: res.Header,
  15889. HTTPStatusCode: res.StatusCode,
  15890. },
  15891. }
  15892. target := &ret
  15893. if err := gensupport.DecodeResponse(target, res); err != nil {
  15894. return nil, err
  15895. }
  15896. return ret, nil
  15897. // {
  15898. // "description": "Retrieves an order from your Merchant Center account.",
  15899. // "httpMethod": "GET",
  15900. // "id": "content.orders.get",
  15901. // "parameterOrder": [
  15902. // "merchantId",
  15903. // "orderId"
  15904. // ],
  15905. // "parameters": {
  15906. // "merchantId": {
  15907. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  15908. // "format": "uint64",
  15909. // "location": "path",
  15910. // "required": true,
  15911. // "type": "string"
  15912. // },
  15913. // "orderId": {
  15914. // "description": "The ID of the order.",
  15915. // "location": "path",
  15916. // "required": true,
  15917. // "type": "string"
  15918. // }
  15919. // },
  15920. // "path": "{merchantId}/orders/{orderId}",
  15921. // "response": {
  15922. // "$ref": "Order"
  15923. // },
  15924. // "scopes": [
  15925. // "https://www.googleapis.com/auth/content"
  15926. // ]
  15927. // }
  15928. }
  15929. // method id "content.orders.getbymerchantorderid":
  15930. type OrdersGetbymerchantorderidCall struct {
  15931. s *APIService
  15932. merchantId uint64
  15933. merchantOrderId string
  15934. urlParams_ gensupport.URLParams
  15935. ifNoneMatch_ string
  15936. ctx_ context.Context
  15937. header_ http.Header
  15938. }
  15939. // Getbymerchantorderid: Retrieves an order using merchant order id.
  15940. func (r *OrdersService) Getbymerchantorderid(merchantId uint64, merchantOrderId string) *OrdersGetbymerchantorderidCall {
  15941. c := &OrdersGetbymerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  15942. c.merchantId = merchantId
  15943. c.merchantOrderId = merchantOrderId
  15944. return c
  15945. }
  15946. // Fields allows partial responses to be retrieved. See
  15947. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  15948. // for more information.
  15949. func (c *OrdersGetbymerchantorderidCall) Fields(s ...googleapi.Field) *OrdersGetbymerchantorderidCall {
  15950. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  15951. return c
  15952. }
  15953. // IfNoneMatch sets the optional parameter which makes the operation
  15954. // fail if the object's ETag matches the given value. This is useful for
  15955. // getting updates only after the object has changed since the last
  15956. // request. Use googleapi.IsNotModified to check whether the response
  15957. // error from Do is the result of In-None-Match.
  15958. func (c *OrdersGetbymerchantorderidCall) IfNoneMatch(entityTag string) *OrdersGetbymerchantorderidCall {
  15959. c.ifNoneMatch_ = entityTag
  15960. return c
  15961. }
  15962. // Context sets the context to be used in this call's Do method. Any
  15963. // pending HTTP request will be aborted if the provided context is
  15964. // canceled.
  15965. func (c *OrdersGetbymerchantorderidCall) Context(ctx context.Context) *OrdersGetbymerchantorderidCall {
  15966. c.ctx_ = ctx
  15967. return c
  15968. }
  15969. // Header returns an http.Header that can be modified by the caller to
  15970. // add HTTP headers to the request.
  15971. func (c *OrdersGetbymerchantorderidCall) Header() http.Header {
  15972. if c.header_ == nil {
  15973. c.header_ = make(http.Header)
  15974. }
  15975. return c.header_
  15976. }
  15977. func (c *OrdersGetbymerchantorderidCall) doRequest(alt string) (*http.Response, error) {
  15978. reqHeaders := make(http.Header)
  15979. for k, v := range c.header_ {
  15980. reqHeaders[k] = v
  15981. }
  15982. reqHeaders.Set("User-Agent", c.s.userAgent())
  15983. if c.ifNoneMatch_ != "" {
  15984. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  15985. }
  15986. var body io.Reader = nil
  15987. c.urlParams_.Set("alt", alt)
  15988. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/ordersbymerchantid/{merchantOrderId}")
  15989. urls += "?" + c.urlParams_.Encode()
  15990. req, _ := http.NewRequest("GET", urls, body)
  15991. req.Header = reqHeaders
  15992. googleapi.Expand(req.URL, map[string]string{
  15993. "merchantId": strconv.FormatUint(c.merchantId, 10),
  15994. "merchantOrderId": c.merchantOrderId,
  15995. })
  15996. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  15997. }
  15998. // Do executes the "content.orders.getbymerchantorderid" call.
  15999. // Exactly one of *OrdersGetByMerchantOrderIdResponse or error will be
  16000. // non-nil. Any non-2xx status code is an error. Response headers are in
  16001. // either *OrdersGetByMerchantOrderIdResponse.ServerResponse.Header or
  16002. // (if a response was returned at all) in
  16003. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  16004. // whether the returned error was because http.StatusNotModified was
  16005. // returned.
  16006. func (c *OrdersGetbymerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersGetByMerchantOrderIdResponse, error) {
  16007. gensupport.SetOptions(c.urlParams_, opts...)
  16008. res, err := c.doRequest("json")
  16009. if res != nil && res.StatusCode == http.StatusNotModified {
  16010. if res.Body != nil {
  16011. res.Body.Close()
  16012. }
  16013. return nil, &googleapi.Error{
  16014. Code: res.StatusCode,
  16015. Header: res.Header,
  16016. }
  16017. }
  16018. if err != nil {
  16019. return nil, err
  16020. }
  16021. defer googleapi.CloseBody(res)
  16022. if err := googleapi.CheckResponse(res); err != nil {
  16023. return nil, err
  16024. }
  16025. ret := &OrdersGetByMerchantOrderIdResponse{
  16026. ServerResponse: googleapi.ServerResponse{
  16027. Header: res.Header,
  16028. HTTPStatusCode: res.StatusCode,
  16029. },
  16030. }
  16031. target := &ret
  16032. if err := gensupport.DecodeResponse(target, res); err != nil {
  16033. return nil, err
  16034. }
  16035. return ret, nil
  16036. // {
  16037. // "description": "Retrieves an order using merchant order id.",
  16038. // "httpMethod": "GET",
  16039. // "id": "content.orders.getbymerchantorderid",
  16040. // "parameterOrder": [
  16041. // "merchantId",
  16042. // "merchantOrderId"
  16043. // ],
  16044. // "parameters": {
  16045. // "merchantId": {
  16046. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  16047. // "format": "uint64",
  16048. // "location": "path",
  16049. // "required": true,
  16050. // "type": "string"
  16051. // },
  16052. // "merchantOrderId": {
  16053. // "description": "The merchant order id to be looked for.",
  16054. // "location": "path",
  16055. // "required": true,
  16056. // "type": "string"
  16057. // }
  16058. // },
  16059. // "path": "{merchantId}/ordersbymerchantid/{merchantOrderId}",
  16060. // "response": {
  16061. // "$ref": "OrdersGetByMerchantOrderIdResponse"
  16062. // },
  16063. // "scopes": [
  16064. // "https://www.googleapis.com/auth/content"
  16065. // ]
  16066. // }
  16067. }
  16068. // method id "content.orders.gettestordertemplate":
  16069. type OrdersGettestordertemplateCall struct {
  16070. s *APIService
  16071. merchantId uint64
  16072. templateName string
  16073. urlParams_ gensupport.URLParams
  16074. ifNoneMatch_ string
  16075. ctx_ context.Context
  16076. header_ http.Header
  16077. }
  16078. // Gettestordertemplate: Sandbox only. Retrieves an order template that
  16079. // can be used to quickly create a new order in sandbox.
  16080. func (r *OrdersService) Gettestordertemplate(merchantId uint64, templateName string) *OrdersGettestordertemplateCall {
  16081. c := &OrdersGettestordertemplateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16082. c.merchantId = merchantId
  16083. c.templateName = templateName
  16084. return c
  16085. }
  16086. // Fields allows partial responses to be retrieved. See
  16087. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16088. // for more information.
  16089. func (c *OrdersGettestordertemplateCall) Fields(s ...googleapi.Field) *OrdersGettestordertemplateCall {
  16090. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16091. return c
  16092. }
  16093. // IfNoneMatch sets the optional parameter which makes the operation
  16094. // fail if the object's ETag matches the given value. This is useful for
  16095. // getting updates only after the object has changed since the last
  16096. // request. Use googleapi.IsNotModified to check whether the response
  16097. // error from Do is the result of In-None-Match.
  16098. func (c *OrdersGettestordertemplateCall) IfNoneMatch(entityTag string) *OrdersGettestordertemplateCall {
  16099. c.ifNoneMatch_ = entityTag
  16100. return c
  16101. }
  16102. // Context sets the context to be used in this call's Do method. Any
  16103. // pending HTTP request will be aborted if the provided context is
  16104. // canceled.
  16105. func (c *OrdersGettestordertemplateCall) Context(ctx context.Context) *OrdersGettestordertemplateCall {
  16106. c.ctx_ = ctx
  16107. return c
  16108. }
  16109. // Header returns an http.Header that can be modified by the caller to
  16110. // add HTTP headers to the request.
  16111. func (c *OrdersGettestordertemplateCall) Header() http.Header {
  16112. if c.header_ == nil {
  16113. c.header_ = make(http.Header)
  16114. }
  16115. return c.header_
  16116. }
  16117. func (c *OrdersGettestordertemplateCall) doRequest(alt string) (*http.Response, error) {
  16118. reqHeaders := make(http.Header)
  16119. for k, v := range c.header_ {
  16120. reqHeaders[k] = v
  16121. }
  16122. reqHeaders.Set("User-Agent", c.s.userAgent())
  16123. if c.ifNoneMatch_ != "" {
  16124. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  16125. }
  16126. var body io.Reader = nil
  16127. c.urlParams_.Set("alt", alt)
  16128. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/testordertemplates/{templateName}")
  16129. urls += "?" + c.urlParams_.Encode()
  16130. req, _ := http.NewRequest("GET", urls, body)
  16131. req.Header = reqHeaders
  16132. googleapi.Expand(req.URL, map[string]string{
  16133. "merchantId": strconv.FormatUint(c.merchantId, 10),
  16134. "templateName": c.templateName,
  16135. })
  16136. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16137. }
  16138. // Do executes the "content.orders.gettestordertemplate" call.
  16139. // Exactly one of *OrdersGetTestOrderTemplateResponse or error will be
  16140. // non-nil. Any non-2xx status code is an error. Response headers are in
  16141. // either *OrdersGetTestOrderTemplateResponse.ServerResponse.Header or
  16142. // (if a response was returned at all) in
  16143. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  16144. // whether the returned error was because http.StatusNotModified was
  16145. // returned.
  16146. func (c *OrdersGettestordertemplateCall) Do(opts ...googleapi.CallOption) (*OrdersGetTestOrderTemplateResponse, error) {
  16147. gensupport.SetOptions(c.urlParams_, opts...)
  16148. res, err := c.doRequest("json")
  16149. if res != nil && res.StatusCode == http.StatusNotModified {
  16150. if res.Body != nil {
  16151. res.Body.Close()
  16152. }
  16153. return nil, &googleapi.Error{
  16154. Code: res.StatusCode,
  16155. Header: res.Header,
  16156. }
  16157. }
  16158. if err != nil {
  16159. return nil, err
  16160. }
  16161. defer googleapi.CloseBody(res)
  16162. if err := googleapi.CheckResponse(res); err != nil {
  16163. return nil, err
  16164. }
  16165. ret := &OrdersGetTestOrderTemplateResponse{
  16166. ServerResponse: googleapi.ServerResponse{
  16167. Header: res.Header,
  16168. HTTPStatusCode: res.StatusCode,
  16169. },
  16170. }
  16171. target := &ret
  16172. if err := gensupport.DecodeResponse(target, res); err != nil {
  16173. return nil, err
  16174. }
  16175. return ret, nil
  16176. // {
  16177. // "description": "Sandbox only. Retrieves an order template that can be used to quickly create a new order in sandbox.",
  16178. // "httpMethod": "GET",
  16179. // "id": "content.orders.gettestordertemplate",
  16180. // "parameterOrder": [
  16181. // "merchantId",
  16182. // "templateName"
  16183. // ],
  16184. // "parameters": {
  16185. // "merchantId": {
  16186. // "description": "The ID of the account that should manage the order. This cannot be a multi-client account.",
  16187. // "format": "uint64",
  16188. // "location": "path",
  16189. // "required": true,
  16190. // "type": "string"
  16191. // },
  16192. // "templateName": {
  16193. // "description": "The name of the template to retrieve.",
  16194. // "enum": [
  16195. // "template1",
  16196. // "template1a",
  16197. // "template1b",
  16198. // "template2"
  16199. // ],
  16200. // "enumDescriptions": [
  16201. // "",
  16202. // "",
  16203. // "",
  16204. // ""
  16205. // ],
  16206. // "location": "path",
  16207. // "required": true,
  16208. // "type": "string"
  16209. // }
  16210. // },
  16211. // "path": "{merchantId}/testordertemplates/{templateName}",
  16212. // "response": {
  16213. // "$ref": "OrdersGetTestOrderTemplateResponse"
  16214. // },
  16215. // "scopes": [
  16216. // "https://www.googleapis.com/auth/content"
  16217. // ]
  16218. // }
  16219. }
  16220. // method id "content.orders.instorerefundlineitem":
  16221. type OrdersInstorerefundlineitemCall struct {
  16222. s *APIService
  16223. merchantId uint64
  16224. orderId string
  16225. ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest
  16226. urlParams_ gensupport.URLParams
  16227. ctx_ context.Context
  16228. header_ http.Header
  16229. }
  16230. // Instorerefundlineitem: Notifies that item return and refund was
  16231. // handled directly in store.
  16232. func (r *OrdersService) Instorerefundlineitem(merchantId uint64, orderId string, ordersinstorerefundlineitemrequest *OrdersInStoreRefundLineItemRequest) *OrdersInstorerefundlineitemCall {
  16233. c := &OrdersInstorerefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16234. c.merchantId = merchantId
  16235. c.orderId = orderId
  16236. c.ordersinstorerefundlineitemrequest = ordersinstorerefundlineitemrequest
  16237. return c
  16238. }
  16239. // Fields allows partial responses to be retrieved. See
  16240. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16241. // for more information.
  16242. func (c *OrdersInstorerefundlineitemCall) Fields(s ...googleapi.Field) *OrdersInstorerefundlineitemCall {
  16243. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16244. return c
  16245. }
  16246. // Context sets the context to be used in this call's Do method. Any
  16247. // pending HTTP request will be aborted if the provided context is
  16248. // canceled.
  16249. func (c *OrdersInstorerefundlineitemCall) Context(ctx context.Context) *OrdersInstorerefundlineitemCall {
  16250. c.ctx_ = ctx
  16251. return c
  16252. }
  16253. // Header returns an http.Header that can be modified by the caller to
  16254. // add HTTP headers to the request.
  16255. func (c *OrdersInstorerefundlineitemCall) Header() http.Header {
  16256. if c.header_ == nil {
  16257. c.header_ = make(http.Header)
  16258. }
  16259. return c.header_
  16260. }
  16261. func (c *OrdersInstorerefundlineitemCall) doRequest(alt string) (*http.Response, error) {
  16262. reqHeaders := make(http.Header)
  16263. for k, v := range c.header_ {
  16264. reqHeaders[k] = v
  16265. }
  16266. reqHeaders.Set("User-Agent", c.s.userAgent())
  16267. var body io.Reader = nil
  16268. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersinstorerefundlineitemrequest)
  16269. if err != nil {
  16270. return nil, err
  16271. }
  16272. reqHeaders.Set("Content-Type", "application/json")
  16273. c.urlParams_.Set("alt", alt)
  16274. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/inStoreRefundLineItem")
  16275. urls += "?" + c.urlParams_.Encode()
  16276. req, _ := http.NewRequest("POST", urls, body)
  16277. req.Header = reqHeaders
  16278. googleapi.Expand(req.URL, map[string]string{
  16279. "merchantId": strconv.FormatUint(c.merchantId, 10),
  16280. "orderId": c.orderId,
  16281. })
  16282. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16283. }
  16284. // Do executes the "content.orders.instorerefundlineitem" call.
  16285. // Exactly one of *OrdersInStoreRefundLineItemResponse or error will be
  16286. // non-nil. Any non-2xx status code is an error. Response headers are in
  16287. // either *OrdersInStoreRefundLineItemResponse.ServerResponse.Header or
  16288. // (if a response was returned at all) in
  16289. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  16290. // whether the returned error was because http.StatusNotModified was
  16291. // returned.
  16292. func (c *OrdersInstorerefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersInStoreRefundLineItemResponse, error) {
  16293. gensupport.SetOptions(c.urlParams_, opts...)
  16294. res, err := c.doRequest("json")
  16295. if res != nil && res.StatusCode == http.StatusNotModified {
  16296. if res.Body != nil {
  16297. res.Body.Close()
  16298. }
  16299. return nil, &googleapi.Error{
  16300. Code: res.StatusCode,
  16301. Header: res.Header,
  16302. }
  16303. }
  16304. if err != nil {
  16305. return nil, err
  16306. }
  16307. defer googleapi.CloseBody(res)
  16308. if err := googleapi.CheckResponse(res); err != nil {
  16309. return nil, err
  16310. }
  16311. ret := &OrdersInStoreRefundLineItemResponse{
  16312. ServerResponse: googleapi.ServerResponse{
  16313. Header: res.Header,
  16314. HTTPStatusCode: res.StatusCode,
  16315. },
  16316. }
  16317. target := &ret
  16318. if err := gensupport.DecodeResponse(target, res); err != nil {
  16319. return nil, err
  16320. }
  16321. return ret, nil
  16322. // {
  16323. // "description": "Notifies that item return and refund was handled directly in store.",
  16324. // "httpMethod": "POST",
  16325. // "id": "content.orders.instorerefundlineitem",
  16326. // "parameterOrder": [
  16327. // "merchantId",
  16328. // "orderId"
  16329. // ],
  16330. // "parameters": {
  16331. // "merchantId": {
  16332. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  16333. // "format": "uint64",
  16334. // "location": "path",
  16335. // "required": true,
  16336. // "type": "string"
  16337. // },
  16338. // "orderId": {
  16339. // "description": "The ID of the order.",
  16340. // "location": "path",
  16341. // "required": true,
  16342. // "type": "string"
  16343. // }
  16344. // },
  16345. // "path": "{merchantId}/orders/{orderId}/inStoreRefundLineItem",
  16346. // "request": {
  16347. // "$ref": "OrdersInStoreRefundLineItemRequest"
  16348. // },
  16349. // "response": {
  16350. // "$ref": "OrdersInStoreRefundLineItemResponse"
  16351. // },
  16352. // "scopes": [
  16353. // "https://www.googleapis.com/auth/content"
  16354. // ]
  16355. // }
  16356. }
  16357. // method id "content.orders.list":
  16358. type OrdersListCall struct {
  16359. s *APIService
  16360. merchantId uint64
  16361. urlParams_ gensupport.URLParams
  16362. ifNoneMatch_ string
  16363. ctx_ context.Context
  16364. header_ http.Header
  16365. }
  16366. // List: Lists the orders in your Merchant Center account.
  16367. func (r *OrdersService) List(merchantId uint64) *OrdersListCall {
  16368. c := &OrdersListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16369. c.merchantId = merchantId
  16370. return c
  16371. }
  16372. // Acknowledged sets the optional parameter "acknowledged": Obtains
  16373. // orders that match the acknowledgement status. When set to true,
  16374. // obtains orders that have been acknowledged. When false, obtains
  16375. // orders that have not been acknowledged.
  16376. // We recommend using this filter set to false, in conjunction with the
  16377. // acknowledge call, such that only un-acknowledged orders are returned.
  16378. func (c *OrdersListCall) Acknowledged(acknowledged bool) *OrdersListCall {
  16379. c.urlParams_.Set("acknowledged", fmt.Sprint(acknowledged))
  16380. return c
  16381. }
  16382. // MaxResults sets the optional parameter "maxResults": The maximum
  16383. // number of orders to return in the response, used for paging. The
  16384. // default value is 25 orders per page, and the maximum allowed value is
  16385. // 250 orders per page.
  16386. // Known issue: All List calls will return all Orders without limit
  16387. // regardless of the value of this field.
  16388. func (c *OrdersListCall) MaxResults(maxResults int64) *OrdersListCall {
  16389. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  16390. return c
  16391. }
  16392. // OrderBy sets the optional parameter "orderBy": The ordering of the
  16393. // returned list. The only supported value are placedDate desc and
  16394. // placedDate asc for now, which returns orders sorted by placement
  16395. // date. "placedDate desc" stands for listing orders by placement date,
  16396. // from oldest to most recent. "placedDate asc" stands for listing
  16397. // orders by placement date, from most recent to oldest. In future
  16398. // releases we'll support other sorting criteria.
  16399. //
  16400. // Possible values:
  16401. // "placedDate asc"
  16402. // "placedDate desc"
  16403. func (c *OrdersListCall) OrderBy(orderBy string) *OrdersListCall {
  16404. c.urlParams_.Set("orderBy", orderBy)
  16405. return c
  16406. }
  16407. // PageToken sets the optional parameter "pageToken": The token returned
  16408. // by the previous request.
  16409. func (c *OrdersListCall) PageToken(pageToken string) *OrdersListCall {
  16410. c.urlParams_.Set("pageToken", pageToken)
  16411. return c
  16412. }
  16413. // PlacedDateEnd sets the optional parameter "placedDateEnd": Obtains
  16414. // orders placed before this date (exclusively), in ISO 8601 format.
  16415. func (c *OrdersListCall) PlacedDateEnd(placedDateEnd string) *OrdersListCall {
  16416. c.urlParams_.Set("placedDateEnd", placedDateEnd)
  16417. return c
  16418. }
  16419. // PlacedDateStart sets the optional parameter "placedDateStart":
  16420. // Obtains orders placed after this date (inclusively), in ISO 8601
  16421. // format.
  16422. func (c *OrdersListCall) PlacedDateStart(placedDateStart string) *OrdersListCall {
  16423. c.urlParams_.Set("placedDateStart", placedDateStart)
  16424. return c
  16425. }
  16426. // Statuses sets the optional parameter "statuses": Obtains orders that
  16427. // match any of the specified statuses. Multiple values can be specified
  16428. // with comma separation. Additionally, please note that active is a
  16429. // shortcut for pendingShipment and partiallyShipped, and completed is a
  16430. // shortcut for shipped , partiallyDelivered, delivered,
  16431. // partiallyReturned, returned, and canceled.
  16432. //
  16433. // Possible values:
  16434. // "active"
  16435. // "canceled"
  16436. // "completed"
  16437. // "delivered"
  16438. // "inProgress"
  16439. // "partiallyDelivered"
  16440. // "partiallyReturned"
  16441. // "partiallyShipped"
  16442. // "pendingShipment"
  16443. // "returned"
  16444. // "shipped"
  16445. func (c *OrdersListCall) Statuses(statuses ...string) *OrdersListCall {
  16446. c.urlParams_.SetMulti("statuses", append([]string{}, statuses...))
  16447. return c
  16448. }
  16449. // Fields allows partial responses to be retrieved. See
  16450. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16451. // for more information.
  16452. func (c *OrdersListCall) Fields(s ...googleapi.Field) *OrdersListCall {
  16453. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16454. return c
  16455. }
  16456. // IfNoneMatch sets the optional parameter which makes the operation
  16457. // fail if the object's ETag matches the given value. This is useful for
  16458. // getting updates only after the object has changed since the last
  16459. // request. Use googleapi.IsNotModified to check whether the response
  16460. // error from Do is the result of In-None-Match.
  16461. func (c *OrdersListCall) IfNoneMatch(entityTag string) *OrdersListCall {
  16462. c.ifNoneMatch_ = entityTag
  16463. return c
  16464. }
  16465. // Context sets the context to be used in this call's Do method. Any
  16466. // pending HTTP request will be aborted if the provided context is
  16467. // canceled.
  16468. func (c *OrdersListCall) Context(ctx context.Context) *OrdersListCall {
  16469. c.ctx_ = ctx
  16470. return c
  16471. }
  16472. // Header returns an http.Header that can be modified by the caller to
  16473. // add HTTP headers to the request.
  16474. func (c *OrdersListCall) Header() http.Header {
  16475. if c.header_ == nil {
  16476. c.header_ = make(http.Header)
  16477. }
  16478. return c.header_
  16479. }
  16480. func (c *OrdersListCall) doRequest(alt string) (*http.Response, error) {
  16481. reqHeaders := make(http.Header)
  16482. for k, v := range c.header_ {
  16483. reqHeaders[k] = v
  16484. }
  16485. reqHeaders.Set("User-Agent", c.s.userAgent())
  16486. if c.ifNoneMatch_ != "" {
  16487. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  16488. }
  16489. var body io.Reader = nil
  16490. c.urlParams_.Set("alt", alt)
  16491. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders")
  16492. urls += "?" + c.urlParams_.Encode()
  16493. req, _ := http.NewRequest("GET", urls, body)
  16494. req.Header = reqHeaders
  16495. googleapi.Expand(req.URL, map[string]string{
  16496. "merchantId": strconv.FormatUint(c.merchantId, 10),
  16497. })
  16498. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16499. }
  16500. // Do executes the "content.orders.list" call.
  16501. // Exactly one of *OrdersListResponse or error will be non-nil. Any
  16502. // non-2xx status code is an error. Response headers are in either
  16503. // *OrdersListResponse.ServerResponse.Header or (if a response was
  16504. // returned at all) in error.(*googleapi.Error).Header. Use
  16505. // googleapi.IsNotModified to check whether the returned error was
  16506. // because http.StatusNotModified was returned.
  16507. func (c *OrdersListCall) Do(opts ...googleapi.CallOption) (*OrdersListResponse, error) {
  16508. gensupport.SetOptions(c.urlParams_, opts...)
  16509. res, err := c.doRequest("json")
  16510. if res != nil && res.StatusCode == http.StatusNotModified {
  16511. if res.Body != nil {
  16512. res.Body.Close()
  16513. }
  16514. return nil, &googleapi.Error{
  16515. Code: res.StatusCode,
  16516. Header: res.Header,
  16517. }
  16518. }
  16519. if err != nil {
  16520. return nil, err
  16521. }
  16522. defer googleapi.CloseBody(res)
  16523. if err := googleapi.CheckResponse(res); err != nil {
  16524. return nil, err
  16525. }
  16526. ret := &OrdersListResponse{
  16527. ServerResponse: googleapi.ServerResponse{
  16528. Header: res.Header,
  16529. HTTPStatusCode: res.StatusCode,
  16530. },
  16531. }
  16532. target := &ret
  16533. if err := gensupport.DecodeResponse(target, res); err != nil {
  16534. return nil, err
  16535. }
  16536. return ret, nil
  16537. // {
  16538. // "description": "Lists the orders in your Merchant Center account.",
  16539. // "httpMethod": "GET",
  16540. // "id": "content.orders.list",
  16541. // "parameterOrder": [
  16542. // "merchantId"
  16543. // ],
  16544. // "parameters": {
  16545. // "acknowledged": {
  16546. // "description": "Obtains orders that match the acknowledgement status. When set to true, obtains orders that have been acknowledged. When false, obtains orders that have not been acknowledged.\nWe recommend using this filter set to false, in conjunction with the acknowledge call, such that only un-acknowledged orders are returned.",
  16547. // "location": "query",
  16548. // "type": "boolean"
  16549. // },
  16550. // "maxResults": {
  16551. // "description": "The maximum number of orders to return in the response, used for paging. The default value is 25 orders per page, and the maximum allowed value is 250 orders per page.\nKnown issue: All List calls will return all Orders without limit regardless of the value of this field.",
  16552. // "format": "uint32",
  16553. // "location": "query",
  16554. // "type": "integer"
  16555. // },
  16556. // "merchantId": {
  16557. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  16558. // "format": "uint64",
  16559. // "location": "path",
  16560. // "required": true,
  16561. // "type": "string"
  16562. // },
  16563. // "orderBy": {
  16564. // "description": "The ordering of the returned list. The only supported value are placedDate desc and placedDate asc for now, which returns orders sorted by placement date. \"placedDate desc\" stands for listing orders by placement date, from oldest to most recent. \"placedDate asc\" stands for listing orders by placement date, from most recent to oldest. In future releases we'll support other sorting criteria.",
  16565. // "enum": [
  16566. // "placedDate asc",
  16567. // "placedDate desc"
  16568. // ],
  16569. // "enumDescriptions": [
  16570. // "",
  16571. // ""
  16572. // ],
  16573. // "location": "query",
  16574. // "type": "string"
  16575. // },
  16576. // "pageToken": {
  16577. // "description": "The token returned by the previous request.",
  16578. // "location": "query",
  16579. // "type": "string"
  16580. // },
  16581. // "placedDateEnd": {
  16582. // "description": "Obtains orders placed before this date (exclusively), in ISO 8601 format.",
  16583. // "location": "query",
  16584. // "type": "string"
  16585. // },
  16586. // "placedDateStart": {
  16587. // "description": "Obtains orders placed after this date (inclusively), in ISO 8601 format.",
  16588. // "location": "query",
  16589. // "type": "string"
  16590. // },
  16591. // "statuses": {
  16592. // "description": "Obtains orders that match any of the specified statuses. Multiple values can be specified with comma separation. Additionally, please note that active is a shortcut for pendingShipment and partiallyShipped, and completed is a shortcut for shipped , partiallyDelivered, delivered, partiallyReturned, returned, and canceled.",
  16593. // "enum": [
  16594. // "active",
  16595. // "canceled",
  16596. // "completed",
  16597. // "delivered",
  16598. // "inProgress",
  16599. // "partiallyDelivered",
  16600. // "partiallyReturned",
  16601. // "partiallyShipped",
  16602. // "pendingShipment",
  16603. // "returned",
  16604. // "shipped"
  16605. // ],
  16606. // "enumDescriptions": [
  16607. // "",
  16608. // "",
  16609. // "",
  16610. // "",
  16611. // "",
  16612. // "",
  16613. // "",
  16614. // "",
  16615. // "",
  16616. // "",
  16617. // ""
  16618. // ],
  16619. // "location": "query",
  16620. // "repeated": true,
  16621. // "type": "string"
  16622. // }
  16623. // },
  16624. // "path": "{merchantId}/orders",
  16625. // "response": {
  16626. // "$ref": "OrdersListResponse"
  16627. // },
  16628. // "scopes": [
  16629. // "https://www.googleapis.com/auth/content"
  16630. // ]
  16631. // }
  16632. }
  16633. // Pages invokes f for each page of results.
  16634. // A non-nil error returned from f will halt the iteration.
  16635. // The provided context supersedes any context provided to the Context method.
  16636. func (c *OrdersListCall) Pages(ctx context.Context, f func(*OrdersListResponse) error) error {
  16637. c.ctx_ = ctx
  16638. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  16639. for {
  16640. x, err := c.Do()
  16641. if err != nil {
  16642. return err
  16643. }
  16644. if err := f(x); err != nil {
  16645. return err
  16646. }
  16647. if x.NextPageToken == "" {
  16648. return nil
  16649. }
  16650. c.PageToken(x.NextPageToken)
  16651. }
  16652. }
  16653. // method id "content.orders.refund":
  16654. type OrdersRefundCall struct {
  16655. s *APIService
  16656. merchantId uint64
  16657. orderId string
  16658. ordersrefundrequest *OrdersRefundRequest
  16659. urlParams_ gensupport.URLParams
  16660. ctx_ context.Context
  16661. header_ http.Header
  16662. }
  16663. // Refund: Refund a portion of the order, up to the full amount paid.
  16664. func (r *OrdersService) Refund(merchantId uint64, orderId string, ordersrefundrequest *OrdersRefundRequest) *OrdersRefundCall {
  16665. c := &OrdersRefundCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16666. c.merchantId = merchantId
  16667. c.orderId = orderId
  16668. c.ordersrefundrequest = ordersrefundrequest
  16669. return c
  16670. }
  16671. // Fields allows partial responses to be retrieved. See
  16672. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16673. // for more information.
  16674. func (c *OrdersRefundCall) Fields(s ...googleapi.Field) *OrdersRefundCall {
  16675. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16676. return c
  16677. }
  16678. // Context sets the context to be used in this call's Do method. Any
  16679. // pending HTTP request will be aborted if the provided context is
  16680. // canceled.
  16681. func (c *OrdersRefundCall) Context(ctx context.Context) *OrdersRefundCall {
  16682. c.ctx_ = ctx
  16683. return c
  16684. }
  16685. // Header returns an http.Header that can be modified by the caller to
  16686. // add HTTP headers to the request.
  16687. func (c *OrdersRefundCall) Header() http.Header {
  16688. if c.header_ == nil {
  16689. c.header_ = make(http.Header)
  16690. }
  16691. return c.header_
  16692. }
  16693. func (c *OrdersRefundCall) doRequest(alt string) (*http.Response, error) {
  16694. reqHeaders := make(http.Header)
  16695. for k, v := range c.header_ {
  16696. reqHeaders[k] = v
  16697. }
  16698. reqHeaders.Set("User-Agent", c.s.userAgent())
  16699. var body io.Reader = nil
  16700. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrefundrequest)
  16701. if err != nil {
  16702. return nil, err
  16703. }
  16704. reqHeaders.Set("Content-Type", "application/json")
  16705. c.urlParams_.Set("alt", alt)
  16706. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/refund")
  16707. urls += "?" + c.urlParams_.Encode()
  16708. req, _ := http.NewRequest("POST", urls, body)
  16709. req.Header = reqHeaders
  16710. googleapi.Expand(req.URL, map[string]string{
  16711. "merchantId": strconv.FormatUint(c.merchantId, 10),
  16712. "orderId": c.orderId,
  16713. })
  16714. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16715. }
  16716. // Do executes the "content.orders.refund" call.
  16717. // Exactly one of *OrdersRefundResponse or error will be non-nil. Any
  16718. // non-2xx status code is an error. Response headers are in either
  16719. // *OrdersRefundResponse.ServerResponse.Header or (if a response was
  16720. // returned at all) in error.(*googleapi.Error).Header. Use
  16721. // googleapi.IsNotModified to check whether the returned error was
  16722. // because http.StatusNotModified was returned.
  16723. func (c *OrdersRefundCall) Do(opts ...googleapi.CallOption) (*OrdersRefundResponse, error) {
  16724. gensupport.SetOptions(c.urlParams_, opts...)
  16725. res, err := c.doRequest("json")
  16726. if res != nil && res.StatusCode == http.StatusNotModified {
  16727. if res.Body != nil {
  16728. res.Body.Close()
  16729. }
  16730. return nil, &googleapi.Error{
  16731. Code: res.StatusCode,
  16732. Header: res.Header,
  16733. }
  16734. }
  16735. if err != nil {
  16736. return nil, err
  16737. }
  16738. defer googleapi.CloseBody(res)
  16739. if err := googleapi.CheckResponse(res); err != nil {
  16740. return nil, err
  16741. }
  16742. ret := &OrdersRefundResponse{
  16743. ServerResponse: googleapi.ServerResponse{
  16744. Header: res.Header,
  16745. HTTPStatusCode: res.StatusCode,
  16746. },
  16747. }
  16748. target := &ret
  16749. if err := gensupport.DecodeResponse(target, res); err != nil {
  16750. return nil, err
  16751. }
  16752. return ret, nil
  16753. // {
  16754. // "description": "Refund a portion of the order, up to the full amount paid.",
  16755. // "httpMethod": "POST",
  16756. // "id": "content.orders.refund",
  16757. // "parameterOrder": [
  16758. // "merchantId",
  16759. // "orderId"
  16760. // ],
  16761. // "parameters": {
  16762. // "merchantId": {
  16763. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  16764. // "format": "uint64",
  16765. // "location": "path",
  16766. // "required": true,
  16767. // "type": "string"
  16768. // },
  16769. // "orderId": {
  16770. // "description": "The ID of the order to refund.",
  16771. // "location": "path",
  16772. // "required": true,
  16773. // "type": "string"
  16774. // }
  16775. // },
  16776. // "path": "{merchantId}/orders/{orderId}/refund",
  16777. // "request": {
  16778. // "$ref": "OrdersRefundRequest"
  16779. // },
  16780. // "response": {
  16781. // "$ref": "OrdersRefundResponse"
  16782. // },
  16783. // "scopes": [
  16784. // "https://www.googleapis.com/auth/content"
  16785. // ]
  16786. // }
  16787. }
  16788. // method id "content.orders.rejectreturnlineitem":
  16789. type OrdersRejectreturnlineitemCall struct {
  16790. s *APIService
  16791. merchantId uint64
  16792. orderId string
  16793. ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest
  16794. urlParams_ gensupport.URLParams
  16795. ctx_ context.Context
  16796. header_ http.Header
  16797. }
  16798. // Rejectreturnlineitem: Rejects return on an line item.
  16799. func (r *OrdersService) Rejectreturnlineitem(merchantId uint64, orderId string, ordersrejectreturnlineitemrequest *OrdersRejectReturnLineItemRequest) *OrdersRejectreturnlineitemCall {
  16800. c := &OrdersRejectreturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16801. c.merchantId = merchantId
  16802. c.orderId = orderId
  16803. c.ordersrejectreturnlineitemrequest = ordersrejectreturnlineitemrequest
  16804. return c
  16805. }
  16806. // Fields allows partial responses to be retrieved. See
  16807. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16808. // for more information.
  16809. func (c *OrdersRejectreturnlineitemCall) Fields(s ...googleapi.Field) *OrdersRejectreturnlineitemCall {
  16810. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16811. return c
  16812. }
  16813. // Context sets the context to be used in this call's Do method. Any
  16814. // pending HTTP request will be aborted if the provided context is
  16815. // canceled.
  16816. func (c *OrdersRejectreturnlineitemCall) Context(ctx context.Context) *OrdersRejectreturnlineitemCall {
  16817. c.ctx_ = ctx
  16818. return c
  16819. }
  16820. // Header returns an http.Header that can be modified by the caller to
  16821. // add HTTP headers to the request.
  16822. func (c *OrdersRejectreturnlineitemCall) Header() http.Header {
  16823. if c.header_ == nil {
  16824. c.header_ = make(http.Header)
  16825. }
  16826. return c.header_
  16827. }
  16828. func (c *OrdersRejectreturnlineitemCall) doRequest(alt string) (*http.Response, error) {
  16829. reqHeaders := make(http.Header)
  16830. for k, v := range c.header_ {
  16831. reqHeaders[k] = v
  16832. }
  16833. reqHeaders.Set("User-Agent", c.s.userAgent())
  16834. var body io.Reader = nil
  16835. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersrejectreturnlineitemrequest)
  16836. if err != nil {
  16837. return nil, err
  16838. }
  16839. reqHeaders.Set("Content-Type", "application/json")
  16840. c.urlParams_.Set("alt", alt)
  16841. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/rejectReturnLineItem")
  16842. urls += "?" + c.urlParams_.Encode()
  16843. req, _ := http.NewRequest("POST", urls, body)
  16844. req.Header = reqHeaders
  16845. googleapi.Expand(req.URL, map[string]string{
  16846. "merchantId": strconv.FormatUint(c.merchantId, 10),
  16847. "orderId": c.orderId,
  16848. })
  16849. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16850. }
  16851. // Do executes the "content.orders.rejectreturnlineitem" call.
  16852. // Exactly one of *OrdersRejectReturnLineItemResponse or error will be
  16853. // non-nil. Any non-2xx status code is an error. Response headers are in
  16854. // either *OrdersRejectReturnLineItemResponse.ServerResponse.Header or
  16855. // (if a response was returned at all) in
  16856. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  16857. // whether the returned error was because http.StatusNotModified was
  16858. // returned.
  16859. func (c *OrdersRejectreturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersRejectReturnLineItemResponse, error) {
  16860. gensupport.SetOptions(c.urlParams_, opts...)
  16861. res, err := c.doRequest("json")
  16862. if res != nil && res.StatusCode == http.StatusNotModified {
  16863. if res.Body != nil {
  16864. res.Body.Close()
  16865. }
  16866. return nil, &googleapi.Error{
  16867. Code: res.StatusCode,
  16868. Header: res.Header,
  16869. }
  16870. }
  16871. if err != nil {
  16872. return nil, err
  16873. }
  16874. defer googleapi.CloseBody(res)
  16875. if err := googleapi.CheckResponse(res); err != nil {
  16876. return nil, err
  16877. }
  16878. ret := &OrdersRejectReturnLineItemResponse{
  16879. ServerResponse: googleapi.ServerResponse{
  16880. Header: res.Header,
  16881. HTTPStatusCode: res.StatusCode,
  16882. },
  16883. }
  16884. target := &ret
  16885. if err := gensupport.DecodeResponse(target, res); err != nil {
  16886. return nil, err
  16887. }
  16888. return ret, nil
  16889. // {
  16890. // "description": "Rejects return on an line item.",
  16891. // "httpMethod": "POST",
  16892. // "id": "content.orders.rejectreturnlineitem",
  16893. // "parameterOrder": [
  16894. // "merchantId",
  16895. // "orderId"
  16896. // ],
  16897. // "parameters": {
  16898. // "merchantId": {
  16899. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  16900. // "format": "uint64",
  16901. // "location": "path",
  16902. // "required": true,
  16903. // "type": "string"
  16904. // },
  16905. // "orderId": {
  16906. // "description": "The ID of the order.",
  16907. // "location": "path",
  16908. // "required": true,
  16909. // "type": "string"
  16910. // }
  16911. // },
  16912. // "path": "{merchantId}/orders/{orderId}/rejectReturnLineItem",
  16913. // "request": {
  16914. // "$ref": "OrdersRejectReturnLineItemRequest"
  16915. // },
  16916. // "response": {
  16917. // "$ref": "OrdersRejectReturnLineItemResponse"
  16918. // },
  16919. // "scopes": [
  16920. // "https://www.googleapis.com/auth/content"
  16921. // ]
  16922. // }
  16923. }
  16924. // method id "content.orders.returnlineitem":
  16925. type OrdersReturnlineitemCall struct {
  16926. s *APIService
  16927. merchantId uint64
  16928. orderId string
  16929. ordersreturnlineitemrequest *OrdersReturnLineItemRequest
  16930. urlParams_ gensupport.URLParams
  16931. ctx_ context.Context
  16932. header_ http.Header
  16933. }
  16934. // Returnlineitem: Returns a line item.
  16935. func (r *OrdersService) Returnlineitem(merchantId uint64, orderId string, ordersreturnlineitemrequest *OrdersReturnLineItemRequest) *OrdersReturnlineitemCall {
  16936. c := &OrdersReturnlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  16937. c.merchantId = merchantId
  16938. c.orderId = orderId
  16939. c.ordersreturnlineitemrequest = ordersreturnlineitemrequest
  16940. return c
  16941. }
  16942. // Fields allows partial responses to be retrieved. See
  16943. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  16944. // for more information.
  16945. func (c *OrdersReturnlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnlineitemCall {
  16946. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  16947. return c
  16948. }
  16949. // Context sets the context to be used in this call's Do method. Any
  16950. // pending HTTP request will be aborted if the provided context is
  16951. // canceled.
  16952. func (c *OrdersReturnlineitemCall) Context(ctx context.Context) *OrdersReturnlineitemCall {
  16953. c.ctx_ = ctx
  16954. return c
  16955. }
  16956. // Header returns an http.Header that can be modified by the caller to
  16957. // add HTTP headers to the request.
  16958. func (c *OrdersReturnlineitemCall) Header() http.Header {
  16959. if c.header_ == nil {
  16960. c.header_ = make(http.Header)
  16961. }
  16962. return c.header_
  16963. }
  16964. func (c *OrdersReturnlineitemCall) doRequest(alt string) (*http.Response, error) {
  16965. reqHeaders := make(http.Header)
  16966. for k, v := range c.header_ {
  16967. reqHeaders[k] = v
  16968. }
  16969. reqHeaders.Set("User-Agent", c.s.userAgent())
  16970. var body io.Reader = nil
  16971. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnlineitemrequest)
  16972. if err != nil {
  16973. return nil, err
  16974. }
  16975. reqHeaders.Set("Content-Type", "application/json")
  16976. c.urlParams_.Set("alt", alt)
  16977. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnLineItem")
  16978. urls += "?" + c.urlParams_.Encode()
  16979. req, _ := http.NewRequest("POST", urls, body)
  16980. req.Header = reqHeaders
  16981. googleapi.Expand(req.URL, map[string]string{
  16982. "merchantId": strconv.FormatUint(c.merchantId, 10),
  16983. "orderId": c.orderId,
  16984. })
  16985. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  16986. }
  16987. // Do executes the "content.orders.returnlineitem" call.
  16988. // Exactly one of *OrdersReturnLineItemResponse or error will be
  16989. // non-nil. Any non-2xx status code is an error. Response headers are in
  16990. // either *OrdersReturnLineItemResponse.ServerResponse.Header or (if a
  16991. // response was returned at all) in error.(*googleapi.Error).Header. Use
  16992. // googleapi.IsNotModified to check whether the returned error was
  16993. // because http.StatusNotModified was returned.
  16994. func (c *OrdersReturnlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnLineItemResponse, error) {
  16995. gensupport.SetOptions(c.urlParams_, opts...)
  16996. res, err := c.doRequest("json")
  16997. if res != nil && res.StatusCode == http.StatusNotModified {
  16998. if res.Body != nil {
  16999. res.Body.Close()
  17000. }
  17001. return nil, &googleapi.Error{
  17002. Code: res.StatusCode,
  17003. Header: res.Header,
  17004. }
  17005. }
  17006. if err != nil {
  17007. return nil, err
  17008. }
  17009. defer googleapi.CloseBody(res)
  17010. if err := googleapi.CheckResponse(res); err != nil {
  17011. return nil, err
  17012. }
  17013. ret := &OrdersReturnLineItemResponse{
  17014. ServerResponse: googleapi.ServerResponse{
  17015. Header: res.Header,
  17016. HTTPStatusCode: res.StatusCode,
  17017. },
  17018. }
  17019. target := &ret
  17020. if err := gensupport.DecodeResponse(target, res); err != nil {
  17021. return nil, err
  17022. }
  17023. return ret, nil
  17024. // {
  17025. // "description": "Returns a line item.",
  17026. // "httpMethod": "POST",
  17027. // "id": "content.orders.returnlineitem",
  17028. // "parameterOrder": [
  17029. // "merchantId",
  17030. // "orderId"
  17031. // ],
  17032. // "parameters": {
  17033. // "merchantId": {
  17034. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  17035. // "format": "uint64",
  17036. // "location": "path",
  17037. // "required": true,
  17038. // "type": "string"
  17039. // },
  17040. // "orderId": {
  17041. // "description": "The ID of the order.",
  17042. // "location": "path",
  17043. // "required": true,
  17044. // "type": "string"
  17045. // }
  17046. // },
  17047. // "path": "{merchantId}/orders/{orderId}/returnLineItem",
  17048. // "request": {
  17049. // "$ref": "OrdersReturnLineItemRequest"
  17050. // },
  17051. // "response": {
  17052. // "$ref": "OrdersReturnLineItemResponse"
  17053. // },
  17054. // "scopes": [
  17055. // "https://www.googleapis.com/auth/content"
  17056. // ]
  17057. // }
  17058. }
  17059. // method id "content.orders.returnrefundlineitem":
  17060. type OrdersReturnrefundlineitemCall struct {
  17061. s *APIService
  17062. merchantId uint64
  17063. orderId string
  17064. ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest
  17065. urlParams_ gensupport.URLParams
  17066. ctx_ context.Context
  17067. header_ http.Header
  17068. }
  17069. // Returnrefundlineitem: Returns and refunds a line item. Note that this
  17070. // method can only be called on fully shipped orders.
  17071. func (r *OrdersService) Returnrefundlineitem(merchantId uint64, orderId string, ordersreturnrefundlineitemrequest *OrdersReturnRefundLineItemRequest) *OrdersReturnrefundlineitemCall {
  17072. c := &OrdersReturnrefundlineitemCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17073. c.merchantId = merchantId
  17074. c.orderId = orderId
  17075. c.ordersreturnrefundlineitemrequest = ordersreturnrefundlineitemrequest
  17076. return c
  17077. }
  17078. // Fields allows partial responses to be retrieved. See
  17079. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17080. // for more information.
  17081. func (c *OrdersReturnrefundlineitemCall) Fields(s ...googleapi.Field) *OrdersReturnrefundlineitemCall {
  17082. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17083. return c
  17084. }
  17085. // Context sets the context to be used in this call's Do method. Any
  17086. // pending HTTP request will be aborted if the provided context is
  17087. // canceled.
  17088. func (c *OrdersReturnrefundlineitemCall) Context(ctx context.Context) *OrdersReturnrefundlineitemCall {
  17089. c.ctx_ = ctx
  17090. return c
  17091. }
  17092. // Header returns an http.Header that can be modified by the caller to
  17093. // add HTTP headers to the request.
  17094. func (c *OrdersReturnrefundlineitemCall) Header() http.Header {
  17095. if c.header_ == nil {
  17096. c.header_ = make(http.Header)
  17097. }
  17098. return c.header_
  17099. }
  17100. func (c *OrdersReturnrefundlineitemCall) doRequest(alt string) (*http.Response, error) {
  17101. reqHeaders := make(http.Header)
  17102. for k, v := range c.header_ {
  17103. reqHeaders[k] = v
  17104. }
  17105. reqHeaders.Set("User-Agent", c.s.userAgent())
  17106. var body io.Reader = nil
  17107. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersreturnrefundlineitemrequest)
  17108. if err != nil {
  17109. return nil, err
  17110. }
  17111. reqHeaders.Set("Content-Type", "application/json")
  17112. c.urlParams_.Set("alt", alt)
  17113. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/returnRefundLineItem")
  17114. urls += "?" + c.urlParams_.Encode()
  17115. req, _ := http.NewRequest("POST", urls, body)
  17116. req.Header = reqHeaders
  17117. googleapi.Expand(req.URL, map[string]string{
  17118. "merchantId": strconv.FormatUint(c.merchantId, 10),
  17119. "orderId": c.orderId,
  17120. })
  17121. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17122. }
  17123. // Do executes the "content.orders.returnrefundlineitem" call.
  17124. // Exactly one of *OrdersReturnRefundLineItemResponse or error will be
  17125. // non-nil. Any non-2xx status code is an error. Response headers are in
  17126. // either *OrdersReturnRefundLineItemResponse.ServerResponse.Header or
  17127. // (if a response was returned at all) in
  17128. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  17129. // whether the returned error was because http.StatusNotModified was
  17130. // returned.
  17131. func (c *OrdersReturnrefundlineitemCall) Do(opts ...googleapi.CallOption) (*OrdersReturnRefundLineItemResponse, error) {
  17132. gensupport.SetOptions(c.urlParams_, opts...)
  17133. res, err := c.doRequest("json")
  17134. if res != nil && res.StatusCode == http.StatusNotModified {
  17135. if res.Body != nil {
  17136. res.Body.Close()
  17137. }
  17138. return nil, &googleapi.Error{
  17139. Code: res.StatusCode,
  17140. Header: res.Header,
  17141. }
  17142. }
  17143. if err != nil {
  17144. return nil, err
  17145. }
  17146. defer googleapi.CloseBody(res)
  17147. if err := googleapi.CheckResponse(res); err != nil {
  17148. return nil, err
  17149. }
  17150. ret := &OrdersReturnRefundLineItemResponse{
  17151. ServerResponse: googleapi.ServerResponse{
  17152. Header: res.Header,
  17153. HTTPStatusCode: res.StatusCode,
  17154. },
  17155. }
  17156. target := &ret
  17157. if err := gensupport.DecodeResponse(target, res); err != nil {
  17158. return nil, err
  17159. }
  17160. return ret, nil
  17161. // {
  17162. // "description": "Returns and refunds a line item. Note that this method can only be called on fully shipped orders.",
  17163. // "httpMethod": "POST",
  17164. // "id": "content.orders.returnrefundlineitem",
  17165. // "parameterOrder": [
  17166. // "merchantId",
  17167. // "orderId"
  17168. // ],
  17169. // "parameters": {
  17170. // "merchantId": {
  17171. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  17172. // "format": "uint64",
  17173. // "location": "path",
  17174. // "required": true,
  17175. // "type": "string"
  17176. // },
  17177. // "orderId": {
  17178. // "description": "The ID of the order.",
  17179. // "location": "path",
  17180. // "required": true,
  17181. // "type": "string"
  17182. // }
  17183. // },
  17184. // "path": "{merchantId}/orders/{orderId}/returnRefundLineItem",
  17185. // "request": {
  17186. // "$ref": "OrdersReturnRefundLineItemRequest"
  17187. // },
  17188. // "response": {
  17189. // "$ref": "OrdersReturnRefundLineItemResponse"
  17190. // },
  17191. // "scopes": [
  17192. // "https://www.googleapis.com/auth/content"
  17193. // ]
  17194. // }
  17195. }
  17196. // method id "content.orders.setlineitemmetadata":
  17197. type OrdersSetlineitemmetadataCall struct {
  17198. s *APIService
  17199. merchantId uint64
  17200. orderId string
  17201. orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest
  17202. urlParams_ gensupport.URLParams
  17203. ctx_ context.Context
  17204. header_ http.Header
  17205. }
  17206. // Setlineitemmetadata: Sets (overrides) merchant provided annotations
  17207. // on the line item.
  17208. func (r *OrdersService) Setlineitemmetadata(merchantId uint64, orderId string, orderssetlineitemmetadatarequest *OrdersSetLineItemMetadataRequest) *OrdersSetlineitemmetadataCall {
  17209. c := &OrdersSetlineitemmetadataCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17210. c.merchantId = merchantId
  17211. c.orderId = orderId
  17212. c.orderssetlineitemmetadatarequest = orderssetlineitemmetadatarequest
  17213. return c
  17214. }
  17215. // Fields allows partial responses to be retrieved. See
  17216. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17217. // for more information.
  17218. func (c *OrdersSetlineitemmetadataCall) Fields(s ...googleapi.Field) *OrdersSetlineitemmetadataCall {
  17219. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17220. return c
  17221. }
  17222. // Context sets the context to be used in this call's Do method. Any
  17223. // pending HTTP request will be aborted if the provided context is
  17224. // canceled.
  17225. func (c *OrdersSetlineitemmetadataCall) Context(ctx context.Context) *OrdersSetlineitemmetadataCall {
  17226. c.ctx_ = ctx
  17227. return c
  17228. }
  17229. // Header returns an http.Header that can be modified by the caller to
  17230. // add HTTP headers to the request.
  17231. func (c *OrdersSetlineitemmetadataCall) Header() http.Header {
  17232. if c.header_ == nil {
  17233. c.header_ = make(http.Header)
  17234. }
  17235. return c.header_
  17236. }
  17237. func (c *OrdersSetlineitemmetadataCall) doRequest(alt string) (*http.Response, error) {
  17238. reqHeaders := make(http.Header)
  17239. for k, v := range c.header_ {
  17240. reqHeaders[k] = v
  17241. }
  17242. reqHeaders.Set("User-Agent", c.s.userAgent())
  17243. var body io.Reader = nil
  17244. body, err := googleapi.WithoutDataWrapper.JSONReader(c.orderssetlineitemmetadatarequest)
  17245. if err != nil {
  17246. return nil, err
  17247. }
  17248. reqHeaders.Set("Content-Type", "application/json")
  17249. c.urlParams_.Set("alt", alt)
  17250. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/setLineItemMetadata")
  17251. urls += "?" + c.urlParams_.Encode()
  17252. req, _ := http.NewRequest("POST", urls, body)
  17253. req.Header = reqHeaders
  17254. googleapi.Expand(req.URL, map[string]string{
  17255. "merchantId": strconv.FormatUint(c.merchantId, 10),
  17256. "orderId": c.orderId,
  17257. })
  17258. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17259. }
  17260. // Do executes the "content.orders.setlineitemmetadata" call.
  17261. // Exactly one of *OrdersSetLineItemMetadataResponse or error will be
  17262. // non-nil. Any non-2xx status code is an error. Response headers are in
  17263. // either *OrdersSetLineItemMetadataResponse.ServerResponse.Header or
  17264. // (if a response was returned at all) in
  17265. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  17266. // whether the returned error was because http.StatusNotModified was
  17267. // returned.
  17268. func (c *OrdersSetlineitemmetadataCall) Do(opts ...googleapi.CallOption) (*OrdersSetLineItemMetadataResponse, error) {
  17269. gensupport.SetOptions(c.urlParams_, opts...)
  17270. res, err := c.doRequest("json")
  17271. if res != nil && res.StatusCode == http.StatusNotModified {
  17272. if res.Body != nil {
  17273. res.Body.Close()
  17274. }
  17275. return nil, &googleapi.Error{
  17276. Code: res.StatusCode,
  17277. Header: res.Header,
  17278. }
  17279. }
  17280. if err != nil {
  17281. return nil, err
  17282. }
  17283. defer googleapi.CloseBody(res)
  17284. if err := googleapi.CheckResponse(res); err != nil {
  17285. return nil, err
  17286. }
  17287. ret := &OrdersSetLineItemMetadataResponse{
  17288. ServerResponse: googleapi.ServerResponse{
  17289. Header: res.Header,
  17290. HTTPStatusCode: res.StatusCode,
  17291. },
  17292. }
  17293. target := &ret
  17294. if err := gensupport.DecodeResponse(target, res); err != nil {
  17295. return nil, err
  17296. }
  17297. return ret, nil
  17298. // {
  17299. // "description": "Sets (overrides) merchant provided annotations on the line item.",
  17300. // "httpMethod": "POST",
  17301. // "id": "content.orders.setlineitemmetadata",
  17302. // "parameterOrder": [
  17303. // "merchantId",
  17304. // "orderId"
  17305. // ],
  17306. // "parameters": {
  17307. // "merchantId": {
  17308. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  17309. // "format": "uint64",
  17310. // "location": "path",
  17311. // "required": true,
  17312. // "type": "string"
  17313. // },
  17314. // "orderId": {
  17315. // "description": "The ID of the order.",
  17316. // "location": "path",
  17317. // "required": true,
  17318. // "type": "string"
  17319. // }
  17320. // },
  17321. // "path": "{merchantId}/orders/{orderId}/setLineItemMetadata",
  17322. // "request": {
  17323. // "$ref": "OrdersSetLineItemMetadataRequest"
  17324. // },
  17325. // "response": {
  17326. // "$ref": "OrdersSetLineItemMetadataResponse"
  17327. // },
  17328. // "scopes": [
  17329. // "https://www.googleapis.com/auth/content"
  17330. // ]
  17331. // }
  17332. }
  17333. // method id "content.orders.shiplineitems":
  17334. type OrdersShiplineitemsCall struct {
  17335. s *APIService
  17336. merchantId uint64
  17337. orderId string
  17338. ordersshiplineitemsrequest *OrdersShipLineItemsRequest
  17339. urlParams_ gensupport.URLParams
  17340. ctx_ context.Context
  17341. header_ http.Header
  17342. }
  17343. // Shiplineitems: Marks line item(s) as shipped.
  17344. func (r *OrdersService) Shiplineitems(merchantId uint64, orderId string, ordersshiplineitemsrequest *OrdersShipLineItemsRequest) *OrdersShiplineitemsCall {
  17345. c := &OrdersShiplineitemsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17346. c.merchantId = merchantId
  17347. c.orderId = orderId
  17348. c.ordersshiplineitemsrequest = ordersshiplineitemsrequest
  17349. return c
  17350. }
  17351. // Fields allows partial responses to be retrieved. See
  17352. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17353. // for more information.
  17354. func (c *OrdersShiplineitemsCall) Fields(s ...googleapi.Field) *OrdersShiplineitemsCall {
  17355. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17356. return c
  17357. }
  17358. // Context sets the context to be used in this call's Do method. Any
  17359. // pending HTTP request will be aborted if the provided context is
  17360. // canceled.
  17361. func (c *OrdersShiplineitemsCall) Context(ctx context.Context) *OrdersShiplineitemsCall {
  17362. c.ctx_ = ctx
  17363. return c
  17364. }
  17365. // Header returns an http.Header that can be modified by the caller to
  17366. // add HTTP headers to the request.
  17367. func (c *OrdersShiplineitemsCall) Header() http.Header {
  17368. if c.header_ == nil {
  17369. c.header_ = make(http.Header)
  17370. }
  17371. return c.header_
  17372. }
  17373. func (c *OrdersShiplineitemsCall) doRequest(alt string) (*http.Response, error) {
  17374. reqHeaders := make(http.Header)
  17375. for k, v := range c.header_ {
  17376. reqHeaders[k] = v
  17377. }
  17378. reqHeaders.Set("User-Agent", c.s.userAgent())
  17379. var body io.Reader = nil
  17380. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersshiplineitemsrequest)
  17381. if err != nil {
  17382. return nil, err
  17383. }
  17384. reqHeaders.Set("Content-Type", "application/json")
  17385. c.urlParams_.Set("alt", alt)
  17386. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/shipLineItems")
  17387. urls += "?" + c.urlParams_.Encode()
  17388. req, _ := http.NewRequest("POST", urls, body)
  17389. req.Header = reqHeaders
  17390. googleapi.Expand(req.URL, map[string]string{
  17391. "merchantId": strconv.FormatUint(c.merchantId, 10),
  17392. "orderId": c.orderId,
  17393. })
  17394. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17395. }
  17396. // Do executes the "content.orders.shiplineitems" call.
  17397. // Exactly one of *OrdersShipLineItemsResponse or error will be non-nil.
  17398. // Any non-2xx status code is an error. Response headers are in either
  17399. // *OrdersShipLineItemsResponse.ServerResponse.Header or (if a response
  17400. // was returned at all) in error.(*googleapi.Error).Header. Use
  17401. // googleapi.IsNotModified to check whether the returned error was
  17402. // because http.StatusNotModified was returned.
  17403. func (c *OrdersShiplineitemsCall) Do(opts ...googleapi.CallOption) (*OrdersShipLineItemsResponse, error) {
  17404. gensupport.SetOptions(c.urlParams_, opts...)
  17405. res, err := c.doRequest("json")
  17406. if res != nil && res.StatusCode == http.StatusNotModified {
  17407. if res.Body != nil {
  17408. res.Body.Close()
  17409. }
  17410. return nil, &googleapi.Error{
  17411. Code: res.StatusCode,
  17412. Header: res.Header,
  17413. }
  17414. }
  17415. if err != nil {
  17416. return nil, err
  17417. }
  17418. defer googleapi.CloseBody(res)
  17419. if err := googleapi.CheckResponse(res); err != nil {
  17420. return nil, err
  17421. }
  17422. ret := &OrdersShipLineItemsResponse{
  17423. ServerResponse: googleapi.ServerResponse{
  17424. Header: res.Header,
  17425. HTTPStatusCode: res.StatusCode,
  17426. },
  17427. }
  17428. target := &ret
  17429. if err := gensupport.DecodeResponse(target, res); err != nil {
  17430. return nil, err
  17431. }
  17432. return ret, nil
  17433. // {
  17434. // "description": "Marks line item(s) as shipped.",
  17435. // "httpMethod": "POST",
  17436. // "id": "content.orders.shiplineitems",
  17437. // "parameterOrder": [
  17438. // "merchantId",
  17439. // "orderId"
  17440. // ],
  17441. // "parameters": {
  17442. // "merchantId": {
  17443. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  17444. // "format": "uint64",
  17445. // "location": "path",
  17446. // "required": true,
  17447. // "type": "string"
  17448. // },
  17449. // "orderId": {
  17450. // "description": "The ID of the order.",
  17451. // "location": "path",
  17452. // "required": true,
  17453. // "type": "string"
  17454. // }
  17455. // },
  17456. // "path": "{merchantId}/orders/{orderId}/shipLineItems",
  17457. // "request": {
  17458. // "$ref": "OrdersShipLineItemsRequest"
  17459. // },
  17460. // "response": {
  17461. // "$ref": "OrdersShipLineItemsResponse"
  17462. // },
  17463. // "scopes": [
  17464. // "https://www.googleapis.com/auth/content"
  17465. // ]
  17466. // }
  17467. }
  17468. // method id "content.orders.updatelineitemshippingdetails":
  17469. type OrdersUpdatelineitemshippingdetailsCall struct {
  17470. s *APIService
  17471. merchantId uint64
  17472. orderId string
  17473. ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest
  17474. urlParams_ gensupport.URLParams
  17475. ctx_ context.Context
  17476. header_ http.Header
  17477. }
  17478. // Updatelineitemshippingdetails: Updates ship by and delivery by dates
  17479. // for a line item.
  17480. func (r *OrdersService) Updatelineitemshippingdetails(merchantId uint64, orderId string, ordersupdatelineitemshippingdetailsrequest *OrdersUpdateLineItemShippingDetailsRequest) *OrdersUpdatelineitemshippingdetailsCall {
  17481. c := &OrdersUpdatelineitemshippingdetailsCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17482. c.merchantId = merchantId
  17483. c.orderId = orderId
  17484. c.ordersupdatelineitemshippingdetailsrequest = ordersupdatelineitemshippingdetailsrequest
  17485. return c
  17486. }
  17487. // Fields allows partial responses to be retrieved. See
  17488. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17489. // for more information.
  17490. func (c *OrdersUpdatelineitemshippingdetailsCall) Fields(s ...googleapi.Field) *OrdersUpdatelineitemshippingdetailsCall {
  17491. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17492. return c
  17493. }
  17494. // Context sets the context to be used in this call's Do method. Any
  17495. // pending HTTP request will be aborted if the provided context is
  17496. // canceled.
  17497. func (c *OrdersUpdatelineitemshippingdetailsCall) Context(ctx context.Context) *OrdersUpdatelineitemshippingdetailsCall {
  17498. c.ctx_ = ctx
  17499. return c
  17500. }
  17501. // Header returns an http.Header that can be modified by the caller to
  17502. // add HTTP headers to the request.
  17503. func (c *OrdersUpdatelineitemshippingdetailsCall) Header() http.Header {
  17504. if c.header_ == nil {
  17505. c.header_ = make(http.Header)
  17506. }
  17507. return c.header_
  17508. }
  17509. func (c *OrdersUpdatelineitemshippingdetailsCall) doRequest(alt string) (*http.Response, error) {
  17510. reqHeaders := make(http.Header)
  17511. for k, v := range c.header_ {
  17512. reqHeaders[k] = v
  17513. }
  17514. reqHeaders.Set("User-Agent", c.s.userAgent())
  17515. var body io.Reader = nil
  17516. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatelineitemshippingdetailsrequest)
  17517. if err != nil {
  17518. return nil, err
  17519. }
  17520. reqHeaders.Set("Content-Type", "application/json")
  17521. c.urlParams_.Set("alt", alt)
  17522. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateLineItemShippingDetails")
  17523. urls += "?" + c.urlParams_.Encode()
  17524. req, _ := http.NewRequest("POST", urls, body)
  17525. req.Header = reqHeaders
  17526. googleapi.Expand(req.URL, map[string]string{
  17527. "merchantId": strconv.FormatUint(c.merchantId, 10),
  17528. "orderId": c.orderId,
  17529. })
  17530. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17531. }
  17532. // Do executes the "content.orders.updatelineitemshippingdetails" call.
  17533. // Exactly one of *OrdersUpdateLineItemShippingDetailsResponse or error
  17534. // will be non-nil. Any non-2xx status code is an error. Response
  17535. // headers are in either
  17536. // *OrdersUpdateLineItemShippingDetailsResponse.ServerResponse.Header or
  17537. // (if a response was returned at all) in
  17538. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  17539. // whether the returned error was because http.StatusNotModified was
  17540. // returned.
  17541. func (c *OrdersUpdatelineitemshippingdetailsCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateLineItemShippingDetailsResponse, error) {
  17542. gensupport.SetOptions(c.urlParams_, opts...)
  17543. res, err := c.doRequest("json")
  17544. if res != nil && res.StatusCode == http.StatusNotModified {
  17545. if res.Body != nil {
  17546. res.Body.Close()
  17547. }
  17548. return nil, &googleapi.Error{
  17549. Code: res.StatusCode,
  17550. Header: res.Header,
  17551. }
  17552. }
  17553. if err != nil {
  17554. return nil, err
  17555. }
  17556. defer googleapi.CloseBody(res)
  17557. if err := googleapi.CheckResponse(res); err != nil {
  17558. return nil, err
  17559. }
  17560. ret := &OrdersUpdateLineItemShippingDetailsResponse{
  17561. ServerResponse: googleapi.ServerResponse{
  17562. Header: res.Header,
  17563. HTTPStatusCode: res.StatusCode,
  17564. },
  17565. }
  17566. target := &ret
  17567. if err := gensupport.DecodeResponse(target, res); err != nil {
  17568. return nil, err
  17569. }
  17570. return ret, nil
  17571. // {
  17572. // "description": "Updates ship by and delivery by dates for a line item.",
  17573. // "httpMethod": "POST",
  17574. // "id": "content.orders.updatelineitemshippingdetails",
  17575. // "parameterOrder": [
  17576. // "merchantId",
  17577. // "orderId"
  17578. // ],
  17579. // "parameters": {
  17580. // "merchantId": {
  17581. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  17582. // "format": "uint64",
  17583. // "location": "path",
  17584. // "required": true,
  17585. // "type": "string"
  17586. // },
  17587. // "orderId": {
  17588. // "description": "The ID of the order.",
  17589. // "location": "path",
  17590. // "required": true,
  17591. // "type": "string"
  17592. // }
  17593. // },
  17594. // "path": "{merchantId}/orders/{orderId}/updateLineItemShippingDetails",
  17595. // "request": {
  17596. // "$ref": "OrdersUpdateLineItemShippingDetailsRequest"
  17597. // },
  17598. // "response": {
  17599. // "$ref": "OrdersUpdateLineItemShippingDetailsResponse"
  17600. // },
  17601. // "scopes": [
  17602. // "https://www.googleapis.com/auth/content"
  17603. // ]
  17604. // }
  17605. }
  17606. // method id "content.orders.updatemerchantorderid":
  17607. type OrdersUpdatemerchantorderidCall struct {
  17608. s *APIService
  17609. merchantId uint64
  17610. orderId string
  17611. ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest
  17612. urlParams_ gensupport.URLParams
  17613. ctx_ context.Context
  17614. header_ http.Header
  17615. }
  17616. // Updatemerchantorderid: Updates the merchant order ID for a given
  17617. // order.
  17618. func (r *OrdersService) Updatemerchantorderid(merchantId uint64, orderId string, ordersupdatemerchantorderidrequest *OrdersUpdateMerchantOrderIdRequest) *OrdersUpdatemerchantorderidCall {
  17619. c := &OrdersUpdatemerchantorderidCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17620. c.merchantId = merchantId
  17621. c.orderId = orderId
  17622. c.ordersupdatemerchantorderidrequest = ordersupdatemerchantorderidrequest
  17623. return c
  17624. }
  17625. // Fields allows partial responses to be retrieved. See
  17626. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17627. // for more information.
  17628. func (c *OrdersUpdatemerchantorderidCall) Fields(s ...googleapi.Field) *OrdersUpdatemerchantorderidCall {
  17629. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17630. return c
  17631. }
  17632. // Context sets the context to be used in this call's Do method. Any
  17633. // pending HTTP request will be aborted if the provided context is
  17634. // canceled.
  17635. func (c *OrdersUpdatemerchantorderidCall) Context(ctx context.Context) *OrdersUpdatemerchantorderidCall {
  17636. c.ctx_ = ctx
  17637. return c
  17638. }
  17639. // Header returns an http.Header that can be modified by the caller to
  17640. // add HTTP headers to the request.
  17641. func (c *OrdersUpdatemerchantorderidCall) Header() http.Header {
  17642. if c.header_ == nil {
  17643. c.header_ = make(http.Header)
  17644. }
  17645. return c.header_
  17646. }
  17647. func (c *OrdersUpdatemerchantorderidCall) doRequest(alt string) (*http.Response, error) {
  17648. reqHeaders := make(http.Header)
  17649. for k, v := range c.header_ {
  17650. reqHeaders[k] = v
  17651. }
  17652. reqHeaders.Set("User-Agent", c.s.userAgent())
  17653. var body io.Reader = nil
  17654. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdatemerchantorderidrequest)
  17655. if err != nil {
  17656. return nil, err
  17657. }
  17658. reqHeaders.Set("Content-Type", "application/json")
  17659. c.urlParams_.Set("alt", alt)
  17660. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateMerchantOrderId")
  17661. urls += "?" + c.urlParams_.Encode()
  17662. req, _ := http.NewRequest("POST", urls, body)
  17663. req.Header = reqHeaders
  17664. googleapi.Expand(req.URL, map[string]string{
  17665. "merchantId": strconv.FormatUint(c.merchantId, 10),
  17666. "orderId": c.orderId,
  17667. })
  17668. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17669. }
  17670. // Do executes the "content.orders.updatemerchantorderid" call.
  17671. // Exactly one of *OrdersUpdateMerchantOrderIdResponse or error will be
  17672. // non-nil. Any non-2xx status code is an error. Response headers are in
  17673. // either *OrdersUpdateMerchantOrderIdResponse.ServerResponse.Header or
  17674. // (if a response was returned at all) in
  17675. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  17676. // whether the returned error was because http.StatusNotModified was
  17677. // returned.
  17678. func (c *OrdersUpdatemerchantorderidCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateMerchantOrderIdResponse, error) {
  17679. gensupport.SetOptions(c.urlParams_, opts...)
  17680. res, err := c.doRequest("json")
  17681. if res != nil && res.StatusCode == http.StatusNotModified {
  17682. if res.Body != nil {
  17683. res.Body.Close()
  17684. }
  17685. return nil, &googleapi.Error{
  17686. Code: res.StatusCode,
  17687. Header: res.Header,
  17688. }
  17689. }
  17690. if err != nil {
  17691. return nil, err
  17692. }
  17693. defer googleapi.CloseBody(res)
  17694. if err := googleapi.CheckResponse(res); err != nil {
  17695. return nil, err
  17696. }
  17697. ret := &OrdersUpdateMerchantOrderIdResponse{
  17698. ServerResponse: googleapi.ServerResponse{
  17699. Header: res.Header,
  17700. HTTPStatusCode: res.StatusCode,
  17701. },
  17702. }
  17703. target := &ret
  17704. if err := gensupport.DecodeResponse(target, res); err != nil {
  17705. return nil, err
  17706. }
  17707. return ret, nil
  17708. // {
  17709. // "description": "Updates the merchant order ID for a given order.",
  17710. // "httpMethod": "POST",
  17711. // "id": "content.orders.updatemerchantorderid",
  17712. // "parameterOrder": [
  17713. // "merchantId",
  17714. // "orderId"
  17715. // ],
  17716. // "parameters": {
  17717. // "merchantId": {
  17718. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  17719. // "format": "uint64",
  17720. // "location": "path",
  17721. // "required": true,
  17722. // "type": "string"
  17723. // },
  17724. // "orderId": {
  17725. // "description": "The ID of the order.",
  17726. // "location": "path",
  17727. // "required": true,
  17728. // "type": "string"
  17729. // }
  17730. // },
  17731. // "path": "{merchantId}/orders/{orderId}/updateMerchantOrderId",
  17732. // "request": {
  17733. // "$ref": "OrdersUpdateMerchantOrderIdRequest"
  17734. // },
  17735. // "response": {
  17736. // "$ref": "OrdersUpdateMerchantOrderIdResponse"
  17737. // },
  17738. // "scopes": [
  17739. // "https://www.googleapis.com/auth/content"
  17740. // ]
  17741. // }
  17742. }
  17743. // method id "content.orders.updateshipment":
  17744. type OrdersUpdateshipmentCall struct {
  17745. s *APIService
  17746. merchantId uint64
  17747. orderId string
  17748. ordersupdateshipmentrequest *OrdersUpdateShipmentRequest
  17749. urlParams_ gensupport.URLParams
  17750. ctx_ context.Context
  17751. header_ http.Header
  17752. }
  17753. // Updateshipment: Updates a shipment's status, carrier, and/or tracking
  17754. // ID.
  17755. func (r *OrdersService) Updateshipment(merchantId uint64, orderId string, ordersupdateshipmentrequest *OrdersUpdateShipmentRequest) *OrdersUpdateshipmentCall {
  17756. c := &OrdersUpdateshipmentCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17757. c.merchantId = merchantId
  17758. c.orderId = orderId
  17759. c.ordersupdateshipmentrequest = ordersupdateshipmentrequest
  17760. return c
  17761. }
  17762. // Fields allows partial responses to be retrieved. See
  17763. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17764. // for more information.
  17765. func (c *OrdersUpdateshipmentCall) Fields(s ...googleapi.Field) *OrdersUpdateshipmentCall {
  17766. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17767. return c
  17768. }
  17769. // Context sets the context to be used in this call's Do method. Any
  17770. // pending HTTP request will be aborted if the provided context is
  17771. // canceled.
  17772. func (c *OrdersUpdateshipmentCall) Context(ctx context.Context) *OrdersUpdateshipmentCall {
  17773. c.ctx_ = ctx
  17774. return c
  17775. }
  17776. // Header returns an http.Header that can be modified by the caller to
  17777. // add HTTP headers to the request.
  17778. func (c *OrdersUpdateshipmentCall) Header() http.Header {
  17779. if c.header_ == nil {
  17780. c.header_ = make(http.Header)
  17781. }
  17782. return c.header_
  17783. }
  17784. func (c *OrdersUpdateshipmentCall) doRequest(alt string) (*http.Response, error) {
  17785. reqHeaders := make(http.Header)
  17786. for k, v := range c.header_ {
  17787. reqHeaders[k] = v
  17788. }
  17789. reqHeaders.Set("User-Agent", c.s.userAgent())
  17790. var body io.Reader = nil
  17791. body, err := googleapi.WithoutDataWrapper.JSONReader(c.ordersupdateshipmentrequest)
  17792. if err != nil {
  17793. return nil, err
  17794. }
  17795. reqHeaders.Set("Content-Type", "application/json")
  17796. c.urlParams_.Set("alt", alt)
  17797. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/orders/{orderId}/updateShipment")
  17798. urls += "?" + c.urlParams_.Encode()
  17799. req, _ := http.NewRequest("POST", urls, body)
  17800. req.Header = reqHeaders
  17801. googleapi.Expand(req.URL, map[string]string{
  17802. "merchantId": strconv.FormatUint(c.merchantId, 10),
  17803. "orderId": c.orderId,
  17804. })
  17805. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17806. }
  17807. // Do executes the "content.orders.updateshipment" call.
  17808. // Exactly one of *OrdersUpdateShipmentResponse or error will be
  17809. // non-nil. Any non-2xx status code is an error. Response headers are in
  17810. // either *OrdersUpdateShipmentResponse.ServerResponse.Header or (if a
  17811. // response was returned at all) in error.(*googleapi.Error).Header. Use
  17812. // googleapi.IsNotModified to check whether the returned error was
  17813. // because http.StatusNotModified was returned.
  17814. func (c *OrdersUpdateshipmentCall) Do(opts ...googleapi.CallOption) (*OrdersUpdateShipmentResponse, error) {
  17815. gensupport.SetOptions(c.urlParams_, opts...)
  17816. res, err := c.doRequest("json")
  17817. if res != nil && res.StatusCode == http.StatusNotModified {
  17818. if res.Body != nil {
  17819. res.Body.Close()
  17820. }
  17821. return nil, &googleapi.Error{
  17822. Code: res.StatusCode,
  17823. Header: res.Header,
  17824. }
  17825. }
  17826. if err != nil {
  17827. return nil, err
  17828. }
  17829. defer googleapi.CloseBody(res)
  17830. if err := googleapi.CheckResponse(res); err != nil {
  17831. return nil, err
  17832. }
  17833. ret := &OrdersUpdateShipmentResponse{
  17834. ServerResponse: googleapi.ServerResponse{
  17835. Header: res.Header,
  17836. HTTPStatusCode: res.StatusCode,
  17837. },
  17838. }
  17839. target := &ret
  17840. if err := gensupport.DecodeResponse(target, res); err != nil {
  17841. return nil, err
  17842. }
  17843. return ret, nil
  17844. // {
  17845. // "description": "Updates a shipment's status, carrier, and/or tracking ID.",
  17846. // "httpMethod": "POST",
  17847. // "id": "content.orders.updateshipment",
  17848. // "parameterOrder": [
  17849. // "merchantId",
  17850. // "orderId"
  17851. // ],
  17852. // "parameters": {
  17853. // "merchantId": {
  17854. // "description": "The ID of the account that manages the order. This cannot be a multi-client account.",
  17855. // "format": "uint64",
  17856. // "location": "path",
  17857. // "required": true,
  17858. // "type": "string"
  17859. // },
  17860. // "orderId": {
  17861. // "description": "The ID of the order.",
  17862. // "location": "path",
  17863. // "required": true,
  17864. // "type": "string"
  17865. // }
  17866. // },
  17867. // "path": "{merchantId}/orders/{orderId}/updateShipment",
  17868. // "request": {
  17869. // "$ref": "OrdersUpdateShipmentRequest"
  17870. // },
  17871. // "response": {
  17872. // "$ref": "OrdersUpdateShipmentResponse"
  17873. // },
  17874. // "scopes": [
  17875. // "https://www.googleapis.com/auth/content"
  17876. // ]
  17877. // }
  17878. }
  17879. // method id "content.pos.custombatch":
  17880. type PosCustombatchCall struct {
  17881. s *APIService
  17882. poscustombatchrequest *PosCustomBatchRequest
  17883. urlParams_ gensupport.URLParams
  17884. ctx_ context.Context
  17885. header_ http.Header
  17886. }
  17887. // Custombatch: Batches multiple POS-related calls in a single request.
  17888. func (r *PosService) Custombatch(poscustombatchrequest *PosCustomBatchRequest) *PosCustombatchCall {
  17889. c := &PosCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  17890. c.poscustombatchrequest = poscustombatchrequest
  17891. return c
  17892. }
  17893. // DryRun sets the optional parameter "dryRun": Flag to run the request
  17894. // in dry-run mode.
  17895. func (c *PosCustombatchCall) DryRun(dryRun bool) *PosCustombatchCall {
  17896. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  17897. return c
  17898. }
  17899. // Fields allows partial responses to be retrieved. See
  17900. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  17901. // for more information.
  17902. func (c *PosCustombatchCall) Fields(s ...googleapi.Field) *PosCustombatchCall {
  17903. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  17904. return c
  17905. }
  17906. // Context sets the context to be used in this call's Do method. Any
  17907. // pending HTTP request will be aborted if the provided context is
  17908. // canceled.
  17909. func (c *PosCustombatchCall) Context(ctx context.Context) *PosCustombatchCall {
  17910. c.ctx_ = ctx
  17911. return c
  17912. }
  17913. // Header returns an http.Header that can be modified by the caller to
  17914. // add HTTP headers to the request.
  17915. func (c *PosCustombatchCall) Header() http.Header {
  17916. if c.header_ == nil {
  17917. c.header_ = make(http.Header)
  17918. }
  17919. return c.header_
  17920. }
  17921. func (c *PosCustombatchCall) doRequest(alt string) (*http.Response, error) {
  17922. reqHeaders := make(http.Header)
  17923. for k, v := range c.header_ {
  17924. reqHeaders[k] = v
  17925. }
  17926. reqHeaders.Set("User-Agent", c.s.userAgent())
  17927. var body io.Reader = nil
  17928. body, err := googleapi.WithoutDataWrapper.JSONReader(c.poscustombatchrequest)
  17929. if err != nil {
  17930. return nil, err
  17931. }
  17932. reqHeaders.Set("Content-Type", "application/json")
  17933. c.urlParams_.Set("alt", alt)
  17934. urls := googleapi.ResolveRelative(c.s.BasePath, "pos/batch")
  17935. urls += "?" + c.urlParams_.Encode()
  17936. req, _ := http.NewRequest("POST", urls, body)
  17937. req.Header = reqHeaders
  17938. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  17939. }
  17940. // Do executes the "content.pos.custombatch" call.
  17941. // Exactly one of *PosCustomBatchResponse or error will be non-nil. Any
  17942. // non-2xx status code is an error. Response headers are in either
  17943. // *PosCustomBatchResponse.ServerResponse.Header or (if a response was
  17944. // returned at all) in error.(*googleapi.Error).Header. Use
  17945. // googleapi.IsNotModified to check whether the returned error was
  17946. // because http.StatusNotModified was returned.
  17947. func (c *PosCustombatchCall) Do(opts ...googleapi.CallOption) (*PosCustomBatchResponse, error) {
  17948. gensupport.SetOptions(c.urlParams_, opts...)
  17949. res, err := c.doRequest("json")
  17950. if res != nil && res.StatusCode == http.StatusNotModified {
  17951. if res.Body != nil {
  17952. res.Body.Close()
  17953. }
  17954. return nil, &googleapi.Error{
  17955. Code: res.StatusCode,
  17956. Header: res.Header,
  17957. }
  17958. }
  17959. if err != nil {
  17960. return nil, err
  17961. }
  17962. defer googleapi.CloseBody(res)
  17963. if err := googleapi.CheckResponse(res); err != nil {
  17964. return nil, err
  17965. }
  17966. ret := &PosCustomBatchResponse{
  17967. ServerResponse: googleapi.ServerResponse{
  17968. Header: res.Header,
  17969. HTTPStatusCode: res.StatusCode,
  17970. },
  17971. }
  17972. target := &ret
  17973. if err := gensupport.DecodeResponse(target, res); err != nil {
  17974. return nil, err
  17975. }
  17976. return ret, nil
  17977. // {
  17978. // "description": "Batches multiple POS-related calls in a single request.",
  17979. // "httpMethod": "POST",
  17980. // "id": "content.pos.custombatch",
  17981. // "parameters": {
  17982. // "dryRun": {
  17983. // "description": "Flag to run the request in dry-run mode.",
  17984. // "location": "query",
  17985. // "type": "boolean"
  17986. // }
  17987. // },
  17988. // "path": "pos/batch",
  17989. // "request": {
  17990. // "$ref": "PosCustomBatchRequest"
  17991. // },
  17992. // "response": {
  17993. // "$ref": "PosCustomBatchResponse"
  17994. // },
  17995. // "scopes": [
  17996. // "https://www.googleapis.com/auth/content"
  17997. // ]
  17998. // }
  17999. }
  18000. // method id "content.pos.delete":
  18001. type PosDeleteCall struct {
  18002. s *APIService
  18003. merchantId uint64
  18004. targetMerchantId uint64
  18005. storeCode string
  18006. urlParams_ gensupport.URLParams
  18007. ctx_ context.Context
  18008. header_ http.Header
  18009. }
  18010. // Delete: Deletes a store for the given merchant.
  18011. func (r *PosService) Delete(merchantId uint64, targetMerchantId uint64, storeCode string) *PosDeleteCall {
  18012. c := &PosDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  18013. c.merchantId = merchantId
  18014. c.targetMerchantId = targetMerchantId
  18015. c.storeCode = storeCode
  18016. return c
  18017. }
  18018. // DryRun sets the optional parameter "dryRun": Flag to run the request
  18019. // in dry-run mode.
  18020. func (c *PosDeleteCall) DryRun(dryRun bool) *PosDeleteCall {
  18021. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  18022. return c
  18023. }
  18024. // Fields allows partial responses to be retrieved. See
  18025. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  18026. // for more information.
  18027. func (c *PosDeleteCall) Fields(s ...googleapi.Field) *PosDeleteCall {
  18028. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  18029. return c
  18030. }
  18031. // Context sets the context to be used in this call's Do method. Any
  18032. // pending HTTP request will be aborted if the provided context is
  18033. // canceled.
  18034. func (c *PosDeleteCall) Context(ctx context.Context) *PosDeleteCall {
  18035. c.ctx_ = ctx
  18036. return c
  18037. }
  18038. // Header returns an http.Header that can be modified by the caller to
  18039. // add HTTP headers to the request.
  18040. func (c *PosDeleteCall) Header() http.Header {
  18041. if c.header_ == nil {
  18042. c.header_ = make(http.Header)
  18043. }
  18044. return c.header_
  18045. }
  18046. func (c *PosDeleteCall) doRequest(alt string) (*http.Response, error) {
  18047. reqHeaders := make(http.Header)
  18048. for k, v := range c.header_ {
  18049. reqHeaders[k] = v
  18050. }
  18051. reqHeaders.Set("User-Agent", c.s.userAgent())
  18052. var body io.Reader = nil
  18053. c.urlParams_.Set("alt", alt)
  18054. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}")
  18055. urls += "?" + c.urlParams_.Encode()
  18056. req, _ := http.NewRequest("DELETE", urls, body)
  18057. req.Header = reqHeaders
  18058. googleapi.Expand(req.URL, map[string]string{
  18059. "merchantId": strconv.FormatUint(c.merchantId, 10),
  18060. "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
  18061. "storeCode": c.storeCode,
  18062. })
  18063. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  18064. }
  18065. // Do executes the "content.pos.delete" call.
  18066. func (c *PosDeleteCall) Do(opts ...googleapi.CallOption) error {
  18067. gensupport.SetOptions(c.urlParams_, opts...)
  18068. res, err := c.doRequest("json")
  18069. if err != nil {
  18070. return err
  18071. }
  18072. defer googleapi.CloseBody(res)
  18073. if err := googleapi.CheckResponse(res); err != nil {
  18074. return err
  18075. }
  18076. return nil
  18077. // {
  18078. // "description": "Deletes a store for the given merchant.",
  18079. // "httpMethod": "DELETE",
  18080. // "id": "content.pos.delete",
  18081. // "parameterOrder": [
  18082. // "merchantId",
  18083. // "targetMerchantId",
  18084. // "storeCode"
  18085. // ],
  18086. // "parameters": {
  18087. // "dryRun": {
  18088. // "description": "Flag to run the request in dry-run mode.",
  18089. // "location": "query",
  18090. // "type": "boolean"
  18091. // },
  18092. // "merchantId": {
  18093. // "description": "The ID of the POS or inventory data provider.",
  18094. // "format": "uint64",
  18095. // "location": "path",
  18096. // "required": true,
  18097. // "type": "string"
  18098. // },
  18099. // "storeCode": {
  18100. // "description": "A store code that is unique per merchant.",
  18101. // "location": "path",
  18102. // "required": true,
  18103. // "type": "string"
  18104. // },
  18105. // "targetMerchantId": {
  18106. // "description": "The ID of the target merchant.",
  18107. // "format": "uint64",
  18108. // "location": "path",
  18109. // "required": true,
  18110. // "type": "string"
  18111. // }
  18112. // },
  18113. // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}",
  18114. // "scopes": [
  18115. // "https://www.googleapis.com/auth/content"
  18116. // ]
  18117. // }
  18118. }
  18119. // method id "content.pos.get":
  18120. type PosGetCall struct {
  18121. s *APIService
  18122. merchantId uint64
  18123. targetMerchantId uint64
  18124. storeCode string
  18125. urlParams_ gensupport.URLParams
  18126. ifNoneMatch_ string
  18127. ctx_ context.Context
  18128. header_ http.Header
  18129. }
  18130. // Get: Retrieves information about the given store.
  18131. func (r *PosService) Get(merchantId uint64, targetMerchantId uint64, storeCode string) *PosGetCall {
  18132. c := &PosGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  18133. c.merchantId = merchantId
  18134. c.targetMerchantId = targetMerchantId
  18135. c.storeCode = storeCode
  18136. return c
  18137. }
  18138. // Fields allows partial responses to be retrieved. See
  18139. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  18140. // for more information.
  18141. func (c *PosGetCall) Fields(s ...googleapi.Field) *PosGetCall {
  18142. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  18143. return c
  18144. }
  18145. // IfNoneMatch sets the optional parameter which makes the operation
  18146. // fail if the object's ETag matches the given value. This is useful for
  18147. // getting updates only after the object has changed since the last
  18148. // request. Use googleapi.IsNotModified to check whether the response
  18149. // error from Do is the result of In-None-Match.
  18150. func (c *PosGetCall) IfNoneMatch(entityTag string) *PosGetCall {
  18151. c.ifNoneMatch_ = entityTag
  18152. return c
  18153. }
  18154. // Context sets the context to be used in this call's Do method. Any
  18155. // pending HTTP request will be aborted if the provided context is
  18156. // canceled.
  18157. func (c *PosGetCall) Context(ctx context.Context) *PosGetCall {
  18158. c.ctx_ = ctx
  18159. return c
  18160. }
  18161. // Header returns an http.Header that can be modified by the caller to
  18162. // add HTTP headers to the request.
  18163. func (c *PosGetCall) Header() http.Header {
  18164. if c.header_ == nil {
  18165. c.header_ = make(http.Header)
  18166. }
  18167. return c.header_
  18168. }
  18169. func (c *PosGetCall) doRequest(alt string) (*http.Response, error) {
  18170. reqHeaders := make(http.Header)
  18171. for k, v := range c.header_ {
  18172. reqHeaders[k] = v
  18173. }
  18174. reqHeaders.Set("User-Agent", c.s.userAgent())
  18175. if c.ifNoneMatch_ != "" {
  18176. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  18177. }
  18178. var body io.Reader = nil
  18179. c.urlParams_.Set("alt", alt)
  18180. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store/{storeCode}")
  18181. urls += "?" + c.urlParams_.Encode()
  18182. req, _ := http.NewRequest("GET", urls, body)
  18183. req.Header = reqHeaders
  18184. googleapi.Expand(req.URL, map[string]string{
  18185. "merchantId": strconv.FormatUint(c.merchantId, 10),
  18186. "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
  18187. "storeCode": c.storeCode,
  18188. })
  18189. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  18190. }
  18191. // Do executes the "content.pos.get" call.
  18192. // Exactly one of *PosStore or error will be non-nil. Any non-2xx status
  18193. // code is an error. Response headers are in either
  18194. // *PosStore.ServerResponse.Header or (if a response was returned at
  18195. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  18196. // to check whether the returned error was because
  18197. // http.StatusNotModified was returned.
  18198. func (c *PosGetCall) Do(opts ...googleapi.CallOption) (*PosStore, error) {
  18199. gensupport.SetOptions(c.urlParams_, opts...)
  18200. res, err := c.doRequest("json")
  18201. if res != nil && res.StatusCode == http.StatusNotModified {
  18202. if res.Body != nil {
  18203. res.Body.Close()
  18204. }
  18205. return nil, &googleapi.Error{
  18206. Code: res.StatusCode,
  18207. Header: res.Header,
  18208. }
  18209. }
  18210. if err != nil {
  18211. return nil, err
  18212. }
  18213. defer googleapi.CloseBody(res)
  18214. if err := googleapi.CheckResponse(res); err != nil {
  18215. return nil, err
  18216. }
  18217. ret := &PosStore{
  18218. ServerResponse: googleapi.ServerResponse{
  18219. Header: res.Header,
  18220. HTTPStatusCode: res.StatusCode,
  18221. },
  18222. }
  18223. target := &ret
  18224. if err := gensupport.DecodeResponse(target, res); err != nil {
  18225. return nil, err
  18226. }
  18227. return ret, nil
  18228. // {
  18229. // "description": "Retrieves information about the given store.",
  18230. // "httpMethod": "GET",
  18231. // "id": "content.pos.get",
  18232. // "parameterOrder": [
  18233. // "merchantId",
  18234. // "targetMerchantId",
  18235. // "storeCode"
  18236. // ],
  18237. // "parameters": {
  18238. // "merchantId": {
  18239. // "description": "The ID of the POS or inventory data provider.",
  18240. // "format": "uint64",
  18241. // "location": "path",
  18242. // "required": true,
  18243. // "type": "string"
  18244. // },
  18245. // "storeCode": {
  18246. // "description": "A store code that is unique per merchant.",
  18247. // "location": "path",
  18248. // "required": true,
  18249. // "type": "string"
  18250. // },
  18251. // "targetMerchantId": {
  18252. // "description": "The ID of the target merchant.",
  18253. // "format": "uint64",
  18254. // "location": "path",
  18255. // "required": true,
  18256. // "type": "string"
  18257. // }
  18258. // },
  18259. // "path": "{merchantId}/pos/{targetMerchantId}/store/{storeCode}",
  18260. // "response": {
  18261. // "$ref": "PosStore"
  18262. // },
  18263. // "scopes": [
  18264. // "https://www.googleapis.com/auth/content"
  18265. // ]
  18266. // }
  18267. }
  18268. // method id "content.pos.insert":
  18269. type PosInsertCall struct {
  18270. s *APIService
  18271. merchantId uint64
  18272. targetMerchantId uint64
  18273. posstore *PosStore
  18274. urlParams_ gensupport.URLParams
  18275. ctx_ context.Context
  18276. header_ http.Header
  18277. }
  18278. // Insert: Creates a store for the given merchant.
  18279. func (r *PosService) Insert(merchantId uint64, targetMerchantId uint64, posstore *PosStore) *PosInsertCall {
  18280. c := &PosInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  18281. c.merchantId = merchantId
  18282. c.targetMerchantId = targetMerchantId
  18283. c.posstore = posstore
  18284. return c
  18285. }
  18286. // DryRun sets the optional parameter "dryRun": Flag to run the request
  18287. // in dry-run mode.
  18288. func (c *PosInsertCall) DryRun(dryRun bool) *PosInsertCall {
  18289. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  18290. return c
  18291. }
  18292. // Fields allows partial responses to be retrieved. See
  18293. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  18294. // for more information.
  18295. func (c *PosInsertCall) Fields(s ...googleapi.Field) *PosInsertCall {
  18296. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  18297. return c
  18298. }
  18299. // Context sets the context to be used in this call's Do method. Any
  18300. // pending HTTP request will be aborted if the provided context is
  18301. // canceled.
  18302. func (c *PosInsertCall) Context(ctx context.Context) *PosInsertCall {
  18303. c.ctx_ = ctx
  18304. return c
  18305. }
  18306. // Header returns an http.Header that can be modified by the caller to
  18307. // add HTTP headers to the request.
  18308. func (c *PosInsertCall) Header() http.Header {
  18309. if c.header_ == nil {
  18310. c.header_ = make(http.Header)
  18311. }
  18312. return c.header_
  18313. }
  18314. func (c *PosInsertCall) doRequest(alt string) (*http.Response, error) {
  18315. reqHeaders := make(http.Header)
  18316. for k, v := range c.header_ {
  18317. reqHeaders[k] = v
  18318. }
  18319. reqHeaders.Set("User-Agent", c.s.userAgent())
  18320. var body io.Reader = nil
  18321. body, err := googleapi.WithoutDataWrapper.JSONReader(c.posstore)
  18322. if err != nil {
  18323. return nil, err
  18324. }
  18325. reqHeaders.Set("Content-Type", "application/json")
  18326. c.urlParams_.Set("alt", alt)
  18327. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store")
  18328. urls += "?" + c.urlParams_.Encode()
  18329. req, _ := http.NewRequest("POST", urls, body)
  18330. req.Header = reqHeaders
  18331. googleapi.Expand(req.URL, map[string]string{
  18332. "merchantId": strconv.FormatUint(c.merchantId, 10),
  18333. "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
  18334. })
  18335. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  18336. }
  18337. // Do executes the "content.pos.insert" call.
  18338. // Exactly one of *PosStore or error will be non-nil. Any non-2xx status
  18339. // code is an error. Response headers are in either
  18340. // *PosStore.ServerResponse.Header or (if a response was returned at
  18341. // all) in error.(*googleapi.Error).Header. Use googleapi.IsNotModified
  18342. // to check whether the returned error was because
  18343. // http.StatusNotModified was returned.
  18344. func (c *PosInsertCall) Do(opts ...googleapi.CallOption) (*PosStore, error) {
  18345. gensupport.SetOptions(c.urlParams_, opts...)
  18346. res, err := c.doRequest("json")
  18347. if res != nil && res.StatusCode == http.StatusNotModified {
  18348. if res.Body != nil {
  18349. res.Body.Close()
  18350. }
  18351. return nil, &googleapi.Error{
  18352. Code: res.StatusCode,
  18353. Header: res.Header,
  18354. }
  18355. }
  18356. if err != nil {
  18357. return nil, err
  18358. }
  18359. defer googleapi.CloseBody(res)
  18360. if err := googleapi.CheckResponse(res); err != nil {
  18361. return nil, err
  18362. }
  18363. ret := &PosStore{
  18364. ServerResponse: googleapi.ServerResponse{
  18365. Header: res.Header,
  18366. HTTPStatusCode: res.StatusCode,
  18367. },
  18368. }
  18369. target := &ret
  18370. if err := gensupport.DecodeResponse(target, res); err != nil {
  18371. return nil, err
  18372. }
  18373. return ret, nil
  18374. // {
  18375. // "description": "Creates a store for the given merchant.",
  18376. // "httpMethod": "POST",
  18377. // "id": "content.pos.insert",
  18378. // "parameterOrder": [
  18379. // "merchantId",
  18380. // "targetMerchantId"
  18381. // ],
  18382. // "parameters": {
  18383. // "dryRun": {
  18384. // "description": "Flag to run the request in dry-run mode.",
  18385. // "location": "query",
  18386. // "type": "boolean"
  18387. // },
  18388. // "merchantId": {
  18389. // "description": "The ID of the POS or inventory data provider.",
  18390. // "format": "uint64",
  18391. // "location": "path",
  18392. // "required": true,
  18393. // "type": "string"
  18394. // },
  18395. // "targetMerchantId": {
  18396. // "description": "The ID of the target merchant.",
  18397. // "format": "uint64",
  18398. // "location": "path",
  18399. // "required": true,
  18400. // "type": "string"
  18401. // }
  18402. // },
  18403. // "path": "{merchantId}/pos/{targetMerchantId}/store",
  18404. // "request": {
  18405. // "$ref": "PosStore"
  18406. // },
  18407. // "response": {
  18408. // "$ref": "PosStore"
  18409. // },
  18410. // "scopes": [
  18411. // "https://www.googleapis.com/auth/content"
  18412. // ]
  18413. // }
  18414. }
  18415. // method id "content.pos.inventory":
  18416. type PosInventoryCall struct {
  18417. s *APIService
  18418. merchantId uint64
  18419. targetMerchantId uint64
  18420. posinventoryrequest *PosInventoryRequest
  18421. urlParams_ gensupport.URLParams
  18422. ctx_ context.Context
  18423. header_ http.Header
  18424. }
  18425. // Inventory: Submit inventory for the given merchant.
  18426. func (r *PosService) Inventory(merchantId uint64, targetMerchantId uint64, posinventoryrequest *PosInventoryRequest) *PosInventoryCall {
  18427. c := &PosInventoryCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  18428. c.merchantId = merchantId
  18429. c.targetMerchantId = targetMerchantId
  18430. c.posinventoryrequest = posinventoryrequest
  18431. return c
  18432. }
  18433. // DryRun sets the optional parameter "dryRun": Flag to run the request
  18434. // in dry-run mode.
  18435. func (c *PosInventoryCall) DryRun(dryRun bool) *PosInventoryCall {
  18436. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  18437. return c
  18438. }
  18439. // Fields allows partial responses to be retrieved. See
  18440. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  18441. // for more information.
  18442. func (c *PosInventoryCall) Fields(s ...googleapi.Field) *PosInventoryCall {
  18443. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  18444. return c
  18445. }
  18446. // Context sets the context to be used in this call's Do method. Any
  18447. // pending HTTP request will be aborted if the provided context is
  18448. // canceled.
  18449. func (c *PosInventoryCall) Context(ctx context.Context) *PosInventoryCall {
  18450. c.ctx_ = ctx
  18451. return c
  18452. }
  18453. // Header returns an http.Header that can be modified by the caller to
  18454. // add HTTP headers to the request.
  18455. func (c *PosInventoryCall) Header() http.Header {
  18456. if c.header_ == nil {
  18457. c.header_ = make(http.Header)
  18458. }
  18459. return c.header_
  18460. }
  18461. func (c *PosInventoryCall) doRequest(alt string) (*http.Response, error) {
  18462. reqHeaders := make(http.Header)
  18463. for k, v := range c.header_ {
  18464. reqHeaders[k] = v
  18465. }
  18466. reqHeaders.Set("User-Agent", c.s.userAgent())
  18467. var body io.Reader = nil
  18468. body, err := googleapi.WithoutDataWrapper.JSONReader(c.posinventoryrequest)
  18469. if err != nil {
  18470. return nil, err
  18471. }
  18472. reqHeaders.Set("Content-Type", "application/json")
  18473. c.urlParams_.Set("alt", alt)
  18474. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/inventory")
  18475. urls += "?" + c.urlParams_.Encode()
  18476. req, _ := http.NewRequest("POST", urls, body)
  18477. req.Header = reqHeaders
  18478. googleapi.Expand(req.URL, map[string]string{
  18479. "merchantId": strconv.FormatUint(c.merchantId, 10),
  18480. "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
  18481. })
  18482. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  18483. }
  18484. // Do executes the "content.pos.inventory" call.
  18485. // Exactly one of *PosInventoryResponse or error will be non-nil. Any
  18486. // non-2xx status code is an error. Response headers are in either
  18487. // *PosInventoryResponse.ServerResponse.Header or (if a response was
  18488. // returned at all) in error.(*googleapi.Error).Header. Use
  18489. // googleapi.IsNotModified to check whether the returned error was
  18490. // because http.StatusNotModified was returned.
  18491. func (c *PosInventoryCall) Do(opts ...googleapi.CallOption) (*PosInventoryResponse, error) {
  18492. gensupport.SetOptions(c.urlParams_, opts...)
  18493. res, err := c.doRequest("json")
  18494. if res != nil && res.StatusCode == http.StatusNotModified {
  18495. if res.Body != nil {
  18496. res.Body.Close()
  18497. }
  18498. return nil, &googleapi.Error{
  18499. Code: res.StatusCode,
  18500. Header: res.Header,
  18501. }
  18502. }
  18503. if err != nil {
  18504. return nil, err
  18505. }
  18506. defer googleapi.CloseBody(res)
  18507. if err := googleapi.CheckResponse(res); err != nil {
  18508. return nil, err
  18509. }
  18510. ret := &PosInventoryResponse{
  18511. ServerResponse: googleapi.ServerResponse{
  18512. Header: res.Header,
  18513. HTTPStatusCode: res.StatusCode,
  18514. },
  18515. }
  18516. target := &ret
  18517. if err := gensupport.DecodeResponse(target, res); err != nil {
  18518. return nil, err
  18519. }
  18520. return ret, nil
  18521. // {
  18522. // "description": "Submit inventory for the given merchant.",
  18523. // "httpMethod": "POST",
  18524. // "id": "content.pos.inventory",
  18525. // "parameterOrder": [
  18526. // "merchantId",
  18527. // "targetMerchantId"
  18528. // ],
  18529. // "parameters": {
  18530. // "dryRun": {
  18531. // "description": "Flag to run the request in dry-run mode.",
  18532. // "location": "query",
  18533. // "type": "boolean"
  18534. // },
  18535. // "merchantId": {
  18536. // "description": "The ID of the POS or inventory data provider.",
  18537. // "format": "uint64",
  18538. // "location": "path",
  18539. // "required": true,
  18540. // "type": "string"
  18541. // },
  18542. // "targetMerchantId": {
  18543. // "description": "The ID of the target merchant.",
  18544. // "format": "uint64",
  18545. // "location": "path",
  18546. // "required": true,
  18547. // "type": "string"
  18548. // }
  18549. // },
  18550. // "path": "{merchantId}/pos/{targetMerchantId}/inventory",
  18551. // "request": {
  18552. // "$ref": "PosInventoryRequest"
  18553. // },
  18554. // "response": {
  18555. // "$ref": "PosInventoryResponse"
  18556. // },
  18557. // "scopes": [
  18558. // "https://www.googleapis.com/auth/content"
  18559. // ]
  18560. // }
  18561. }
  18562. // method id "content.pos.list":
  18563. type PosListCall struct {
  18564. s *APIService
  18565. merchantId uint64
  18566. targetMerchantId uint64
  18567. urlParams_ gensupport.URLParams
  18568. ifNoneMatch_ string
  18569. ctx_ context.Context
  18570. header_ http.Header
  18571. }
  18572. // List: Lists the stores of the target merchant.
  18573. func (r *PosService) List(merchantId uint64, targetMerchantId uint64) *PosListCall {
  18574. c := &PosListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  18575. c.merchantId = merchantId
  18576. c.targetMerchantId = targetMerchantId
  18577. return c
  18578. }
  18579. // Fields allows partial responses to be retrieved. See
  18580. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  18581. // for more information.
  18582. func (c *PosListCall) Fields(s ...googleapi.Field) *PosListCall {
  18583. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  18584. return c
  18585. }
  18586. // IfNoneMatch sets the optional parameter which makes the operation
  18587. // fail if the object's ETag matches the given value. This is useful for
  18588. // getting updates only after the object has changed since the last
  18589. // request. Use googleapi.IsNotModified to check whether the response
  18590. // error from Do is the result of In-None-Match.
  18591. func (c *PosListCall) IfNoneMatch(entityTag string) *PosListCall {
  18592. c.ifNoneMatch_ = entityTag
  18593. return c
  18594. }
  18595. // Context sets the context to be used in this call's Do method. Any
  18596. // pending HTTP request will be aborted if the provided context is
  18597. // canceled.
  18598. func (c *PosListCall) Context(ctx context.Context) *PosListCall {
  18599. c.ctx_ = ctx
  18600. return c
  18601. }
  18602. // Header returns an http.Header that can be modified by the caller to
  18603. // add HTTP headers to the request.
  18604. func (c *PosListCall) Header() http.Header {
  18605. if c.header_ == nil {
  18606. c.header_ = make(http.Header)
  18607. }
  18608. return c.header_
  18609. }
  18610. func (c *PosListCall) doRequest(alt string) (*http.Response, error) {
  18611. reqHeaders := make(http.Header)
  18612. for k, v := range c.header_ {
  18613. reqHeaders[k] = v
  18614. }
  18615. reqHeaders.Set("User-Agent", c.s.userAgent())
  18616. if c.ifNoneMatch_ != "" {
  18617. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  18618. }
  18619. var body io.Reader = nil
  18620. c.urlParams_.Set("alt", alt)
  18621. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/store")
  18622. urls += "?" + c.urlParams_.Encode()
  18623. req, _ := http.NewRequest("GET", urls, body)
  18624. req.Header = reqHeaders
  18625. googleapi.Expand(req.URL, map[string]string{
  18626. "merchantId": strconv.FormatUint(c.merchantId, 10),
  18627. "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
  18628. })
  18629. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  18630. }
  18631. // Do executes the "content.pos.list" call.
  18632. // Exactly one of *PosListResponse or error will be non-nil. Any non-2xx
  18633. // status code is an error. Response headers are in either
  18634. // *PosListResponse.ServerResponse.Header or (if a response was returned
  18635. // at all) in error.(*googleapi.Error).Header. Use
  18636. // googleapi.IsNotModified to check whether the returned error was
  18637. // because http.StatusNotModified was returned.
  18638. func (c *PosListCall) Do(opts ...googleapi.CallOption) (*PosListResponse, error) {
  18639. gensupport.SetOptions(c.urlParams_, opts...)
  18640. res, err := c.doRequest("json")
  18641. if res != nil && res.StatusCode == http.StatusNotModified {
  18642. if res.Body != nil {
  18643. res.Body.Close()
  18644. }
  18645. return nil, &googleapi.Error{
  18646. Code: res.StatusCode,
  18647. Header: res.Header,
  18648. }
  18649. }
  18650. if err != nil {
  18651. return nil, err
  18652. }
  18653. defer googleapi.CloseBody(res)
  18654. if err := googleapi.CheckResponse(res); err != nil {
  18655. return nil, err
  18656. }
  18657. ret := &PosListResponse{
  18658. ServerResponse: googleapi.ServerResponse{
  18659. Header: res.Header,
  18660. HTTPStatusCode: res.StatusCode,
  18661. },
  18662. }
  18663. target := &ret
  18664. if err := gensupport.DecodeResponse(target, res); err != nil {
  18665. return nil, err
  18666. }
  18667. return ret, nil
  18668. // {
  18669. // "description": "Lists the stores of the target merchant.",
  18670. // "httpMethod": "GET",
  18671. // "id": "content.pos.list",
  18672. // "parameterOrder": [
  18673. // "merchantId",
  18674. // "targetMerchantId"
  18675. // ],
  18676. // "parameters": {
  18677. // "merchantId": {
  18678. // "description": "The ID of the POS or inventory data provider.",
  18679. // "format": "uint64",
  18680. // "location": "path",
  18681. // "required": true,
  18682. // "type": "string"
  18683. // },
  18684. // "targetMerchantId": {
  18685. // "description": "The ID of the target merchant.",
  18686. // "format": "uint64",
  18687. // "location": "path",
  18688. // "required": true,
  18689. // "type": "string"
  18690. // }
  18691. // },
  18692. // "path": "{merchantId}/pos/{targetMerchantId}/store",
  18693. // "response": {
  18694. // "$ref": "PosListResponse"
  18695. // },
  18696. // "scopes": [
  18697. // "https://www.googleapis.com/auth/content"
  18698. // ]
  18699. // }
  18700. }
  18701. // method id "content.pos.sale":
  18702. type PosSaleCall struct {
  18703. s *APIService
  18704. merchantId uint64
  18705. targetMerchantId uint64
  18706. possalerequest *PosSaleRequest
  18707. urlParams_ gensupport.URLParams
  18708. ctx_ context.Context
  18709. header_ http.Header
  18710. }
  18711. // Sale: Submit a sale event for the given merchant.
  18712. func (r *PosService) Sale(merchantId uint64, targetMerchantId uint64, possalerequest *PosSaleRequest) *PosSaleCall {
  18713. c := &PosSaleCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  18714. c.merchantId = merchantId
  18715. c.targetMerchantId = targetMerchantId
  18716. c.possalerequest = possalerequest
  18717. return c
  18718. }
  18719. // DryRun sets the optional parameter "dryRun": Flag to run the request
  18720. // in dry-run mode.
  18721. func (c *PosSaleCall) DryRun(dryRun bool) *PosSaleCall {
  18722. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  18723. return c
  18724. }
  18725. // Fields allows partial responses to be retrieved. See
  18726. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  18727. // for more information.
  18728. func (c *PosSaleCall) Fields(s ...googleapi.Field) *PosSaleCall {
  18729. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  18730. return c
  18731. }
  18732. // Context sets the context to be used in this call's Do method. Any
  18733. // pending HTTP request will be aborted if the provided context is
  18734. // canceled.
  18735. func (c *PosSaleCall) Context(ctx context.Context) *PosSaleCall {
  18736. c.ctx_ = ctx
  18737. return c
  18738. }
  18739. // Header returns an http.Header that can be modified by the caller to
  18740. // add HTTP headers to the request.
  18741. func (c *PosSaleCall) Header() http.Header {
  18742. if c.header_ == nil {
  18743. c.header_ = make(http.Header)
  18744. }
  18745. return c.header_
  18746. }
  18747. func (c *PosSaleCall) doRequest(alt string) (*http.Response, error) {
  18748. reqHeaders := make(http.Header)
  18749. for k, v := range c.header_ {
  18750. reqHeaders[k] = v
  18751. }
  18752. reqHeaders.Set("User-Agent", c.s.userAgent())
  18753. var body io.Reader = nil
  18754. body, err := googleapi.WithoutDataWrapper.JSONReader(c.possalerequest)
  18755. if err != nil {
  18756. return nil, err
  18757. }
  18758. reqHeaders.Set("Content-Type", "application/json")
  18759. c.urlParams_.Set("alt", alt)
  18760. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/pos/{targetMerchantId}/sale")
  18761. urls += "?" + c.urlParams_.Encode()
  18762. req, _ := http.NewRequest("POST", urls, body)
  18763. req.Header = reqHeaders
  18764. googleapi.Expand(req.URL, map[string]string{
  18765. "merchantId": strconv.FormatUint(c.merchantId, 10),
  18766. "targetMerchantId": strconv.FormatUint(c.targetMerchantId, 10),
  18767. })
  18768. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  18769. }
  18770. // Do executes the "content.pos.sale" call.
  18771. // Exactly one of *PosSaleResponse or error will be non-nil. Any non-2xx
  18772. // status code is an error. Response headers are in either
  18773. // *PosSaleResponse.ServerResponse.Header or (if a response was returned
  18774. // at all) in error.(*googleapi.Error).Header. Use
  18775. // googleapi.IsNotModified to check whether the returned error was
  18776. // because http.StatusNotModified was returned.
  18777. func (c *PosSaleCall) Do(opts ...googleapi.CallOption) (*PosSaleResponse, error) {
  18778. gensupport.SetOptions(c.urlParams_, opts...)
  18779. res, err := c.doRequest("json")
  18780. if res != nil && res.StatusCode == http.StatusNotModified {
  18781. if res.Body != nil {
  18782. res.Body.Close()
  18783. }
  18784. return nil, &googleapi.Error{
  18785. Code: res.StatusCode,
  18786. Header: res.Header,
  18787. }
  18788. }
  18789. if err != nil {
  18790. return nil, err
  18791. }
  18792. defer googleapi.CloseBody(res)
  18793. if err := googleapi.CheckResponse(res); err != nil {
  18794. return nil, err
  18795. }
  18796. ret := &PosSaleResponse{
  18797. ServerResponse: googleapi.ServerResponse{
  18798. Header: res.Header,
  18799. HTTPStatusCode: res.StatusCode,
  18800. },
  18801. }
  18802. target := &ret
  18803. if err := gensupport.DecodeResponse(target, res); err != nil {
  18804. return nil, err
  18805. }
  18806. return ret, nil
  18807. // {
  18808. // "description": "Submit a sale event for the given merchant.",
  18809. // "httpMethod": "POST",
  18810. // "id": "content.pos.sale",
  18811. // "parameterOrder": [
  18812. // "merchantId",
  18813. // "targetMerchantId"
  18814. // ],
  18815. // "parameters": {
  18816. // "dryRun": {
  18817. // "description": "Flag to run the request in dry-run mode.",
  18818. // "location": "query",
  18819. // "type": "boolean"
  18820. // },
  18821. // "merchantId": {
  18822. // "description": "The ID of the POS or inventory data provider.",
  18823. // "format": "uint64",
  18824. // "location": "path",
  18825. // "required": true,
  18826. // "type": "string"
  18827. // },
  18828. // "targetMerchantId": {
  18829. // "description": "The ID of the target merchant.",
  18830. // "format": "uint64",
  18831. // "location": "path",
  18832. // "required": true,
  18833. // "type": "string"
  18834. // }
  18835. // },
  18836. // "path": "{merchantId}/pos/{targetMerchantId}/sale",
  18837. // "request": {
  18838. // "$ref": "PosSaleRequest"
  18839. // },
  18840. // "response": {
  18841. // "$ref": "PosSaleResponse"
  18842. // },
  18843. // "scopes": [
  18844. // "https://www.googleapis.com/auth/content"
  18845. // ]
  18846. // }
  18847. }
  18848. // method id "content.products.custombatch":
  18849. type ProductsCustombatchCall struct {
  18850. s *APIService
  18851. productscustombatchrequest *ProductsCustomBatchRequest
  18852. urlParams_ gensupport.URLParams
  18853. ctx_ context.Context
  18854. header_ http.Header
  18855. }
  18856. // Custombatch: Retrieves, inserts, and deletes multiple products in a
  18857. // single request.
  18858. func (r *ProductsService) Custombatch(productscustombatchrequest *ProductsCustomBatchRequest) *ProductsCustombatchCall {
  18859. c := &ProductsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  18860. c.productscustombatchrequest = productscustombatchrequest
  18861. return c
  18862. }
  18863. // DryRun sets the optional parameter "dryRun": Flag to run the request
  18864. // in dry-run mode.
  18865. func (c *ProductsCustombatchCall) DryRun(dryRun bool) *ProductsCustombatchCall {
  18866. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  18867. return c
  18868. }
  18869. // Fields allows partial responses to be retrieved. See
  18870. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  18871. // for more information.
  18872. func (c *ProductsCustombatchCall) Fields(s ...googleapi.Field) *ProductsCustombatchCall {
  18873. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  18874. return c
  18875. }
  18876. // Context sets the context to be used in this call's Do method. Any
  18877. // pending HTTP request will be aborted if the provided context is
  18878. // canceled.
  18879. func (c *ProductsCustombatchCall) Context(ctx context.Context) *ProductsCustombatchCall {
  18880. c.ctx_ = ctx
  18881. return c
  18882. }
  18883. // Header returns an http.Header that can be modified by the caller to
  18884. // add HTTP headers to the request.
  18885. func (c *ProductsCustombatchCall) Header() http.Header {
  18886. if c.header_ == nil {
  18887. c.header_ = make(http.Header)
  18888. }
  18889. return c.header_
  18890. }
  18891. func (c *ProductsCustombatchCall) doRequest(alt string) (*http.Response, error) {
  18892. reqHeaders := make(http.Header)
  18893. for k, v := range c.header_ {
  18894. reqHeaders[k] = v
  18895. }
  18896. reqHeaders.Set("User-Agent", c.s.userAgent())
  18897. var body io.Reader = nil
  18898. body, err := googleapi.WithoutDataWrapper.JSONReader(c.productscustombatchrequest)
  18899. if err != nil {
  18900. return nil, err
  18901. }
  18902. reqHeaders.Set("Content-Type", "application/json")
  18903. c.urlParams_.Set("alt", alt)
  18904. urls := googleapi.ResolveRelative(c.s.BasePath, "products/batch")
  18905. urls += "?" + c.urlParams_.Encode()
  18906. req, _ := http.NewRequest("POST", urls, body)
  18907. req.Header = reqHeaders
  18908. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  18909. }
  18910. // Do executes the "content.products.custombatch" call.
  18911. // Exactly one of *ProductsCustomBatchResponse or error will be non-nil.
  18912. // Any non-2xx status code is an error. Response headers are in either
  18913. // *ProductsCustomBatchResponse.ServerResponse.Header or (if a response
  18914. // was returned at all) in error.(*googleapi.Error).Header. Use
  18915. // googleapi.IsNotModified to check whether the returned error was
  18916. // because http.StatusNotModified was returned.
  18917. func (c *ProductsCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductsCustomBatchResponse, error) {
  18918. gensupport.SetOptions(c.urlParams_, opts...)
  18919. res, err := c.doRequest("json")
  18920. if res != nil && res.StatusCode == http.StatusNotModified {
  18921. if res.Body != nil {
  18922. res.Body.Close()
  18923. }
  18924. return nil, &googleapi.Error{
  18925. Code: res.StatusCode,
  18926. Header: res.Header,
  18927. }
  18928. }
  18929. if err != nil {
  18930. return nil, err
  18931. }
  18932. defer googleapi.CloseBody(res)
  18933. if err := googleapi.CheckResponse(res); err != nil {
  18934. return nil, err
  18935. }
  18936. ret := &ProductsCustomBatchResponse{
  18937. ServerResponse: googleapi.ServerResponse{
  18938. Header: res.Header,
  18939. HTTPStatusCode: res.StatusCode,
  18940. },
  18941. }
  18942. target := &ret
  18943. if err := gensupport.DecodeResponse(target, res); err != nil {
  18944. return nil, err
  18945. }
  18946. return ret, nil
  18947. // {
  18948. // "description": "Retrieves, inserts, and deletes multiple products in a single request.",
  18949. // "httpMethod": "POST",
  18950. // "id": "content.products.custombatch",
  18951. // "parameters": {
  18952. // "dryRun": {
  18953. // "description": "Flag to run the request in dry-run mode.",
  18954. // "location": "query",
  18955. // "type": "boolean"
  18956. // }
  18957. // },
  18958. // "path": "products/batch",
  18959. // "request": {
  18960. // "$ref": "ProductsCustomBatchRequest"
  18961. // },
  18962. // "response": {
  18963. // "$ref": "ProductsCustomBatchResponse"
  18964. // },
  18965. // "scopes": [
  18966. // "https://www.googleapis.com/auth/content"
  18967. // ]
  18968. // }
  18969. }
  18970. // method id "content.products.delete":
  18971. type ProductsDeleteCall struct {
  18972. s *APIService
  18973. merchantId uint64
  18974. productId string
  18975. urlParams_ gensupport.URLParams
  18976. ctx_ context.Context
  18977. header_ http.Header
  18978. }
  18979. // Delete: Deletes a product from your Merchant Center account.
  18980. func (r *ProductsService) Delete(merchantId uint64, productId string) *ProductsDeleteCall {
  18981. c := &ProductsDeleteCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  18982. c.merchantId = merchantId
  18983. c.productId = productId
  18984. return c
  18985. }
  18986. // DryRun sets the optional parameter "dryRun": Flag to run the request
  18987. // in dry-run mode.
  18988. func (c *ProductsDeleteCall) DryRun(dryRun bool) *ProductsDeleteCall {
  18989. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  18990. return c
  18991. }
  18992. // Fields allows partial responses to be retrieved. See
  18993. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  18994. // for more information.
  18995. func (c *ProductsDeleteCall) Fields(s ...googleapi.Field) *ProductsDeleteCall {
  18996. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  18997. return c
  18998. }
  18999. // Context sets the context to be used in this call's Do method. Any
  19000. // pending HTTP request will be aborted if the provided context is
  19001. // canceled.
  19002. func (c *ProductsDeleteCall) Context(ctx context.Context) *ProductsDeleteCall {
  19003. c.ctx_ = ctx
  19004. return c
  19005. }
  19006. // Header returns an http.Header that can be modified by the caller to
  19007. // add HTTP headers to the request.
  19008. func (c *ProductsDeleteCall) Header() http.Header {
  19009. if c.header_ == nil {
  19010. c.header_ = make(http.Header)
  19011. }
  19012. return c.header_
  19013. }
  19014. func (c *ProductsDeleteCall) doRequest(alt string) (*http.Response, error) {
  19015. reqHeaders := make(http.Header)
  19016. for k, v := range c.header_ {
  19017. reqHeaders[k] = v
  19018. }
  19019. reqHeaders.Set("User-Agent", c.s.userAgent())
  19020. var body io.Reader = nil
  19021. c.urlParams_.Set("alt", alt)
  19022. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}")
  19023. urls += "?" + c.urlParams_.Encode()
  19024. req, _ := http.NewRequest("DELETE", urls, body)
  19025. req.Header = reqHeaders
  19026. googleapi.Expand(req.URL, map[string]string{
  19027. "merchantId": strconv.FormatUint(c.merchantId, 10),
  19028. "productId": c.productId,
  19029. })
  19030. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  19031. }
  19032. // Do executes the "content.products.delete" call.
  19033. func (c *ProductsDeleteCall) Do(opts ...googleapi.CallOption) error {
  19034. gensupport.SetOptions(c.urlParams_, opts...)
  19035. res, err := c.doRequest("json")
  19036. if err != nil {
  19037. return err
  19038. }
  19039. defer googleapi.CloseBody(res)
  19040. if err := googleapi.CheckResponse(res); err != nil {
  19041. return err
  19042. }
  19043. return nil
  19044. // {
  19045. // "description": "Deletes a product from your Merchant Center account.",
  19046. // "httpMethod": "DELETE",
  19047. // "id": "content.products.delete",
  19048. // "parameterOrder": [
  19049. // "merchantId",
  19050. // "productId"
  19051. // ],
  19052. // "parameters": {
  19053. // "dryRun": {
  19054. // "description": "Flag to run the request in dry-run mode.",
  19055. // "location": "query",
  19056. // "type": "boolean"
  19057. // },
  19058. // "merchantId": {
  19059. // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
  19060. // "format": "uint64",
  19061. // "location": "path",
  19062. // "required": true,
  19063. // "type": "string"
  19064. // },
  19065. // "productId": {
  19066. // "description": "The REST id of the product.",
  19067. // "location": "path",
  19068. // "required": true,
  19069. // "type": "string"
  19070. // }
  19071. // },
  19072. // "path": "{merchantId}/products/{productId}",
  19073. // "scopes": [
  19074. // "https://www.googleapis.com/auth/content"
  19075. // ]
  19076. // }
  19077. }
  19078. // method id "content.products.get":
  19079. type ProductsGetCall struct {
  19080. s *APIService
  19081. merchantId uint64
  19082. productId string
  19083. urlParams_ gensupport.URLParams
  19084. ifNoneMatch_ string
  19085. ctx_ context.Context
  19086. header_ http.Header
  19087. }
  19088. // Get: Retrieves a product from your Merchant Center account.
  19089. func (r *ProductsService) Get(merchantId uint64, productId string) *ProductsGetCall {
  19090. c := &ProductsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  19091. c.merchantId = merchantId
  19092. c.productId = productId
  19093. return c
  19094. }
  19095. // Fields allows partial responses to be retrieved. See
  19096. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  19097. // for more information.
  19098. func (c *ProductsGetCall) Fields(s ...googleapi.Field) *ProductsGetCall {
  19099. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  19100. return c
  19101. }
  19102. // IfNoneMatch sets the optional parameter which makes the operation
  19103. // fail if the object's ETag matches the given value. This is useful for
  19104. // getting updates only after the object has changed since the last
  19105. // request. Use googleapi.IsNotModified to check whether the response
  19106. // error from Do is the result of In-None-Match.
  19107. func (c *ProductsGetCall) IfNoneMatch(entityTag string) *ProductsGetCall {
  19108. c.ifNoneMatch_ = entityTag
  19109. return c
  19110. }
  19111. // Context sets the context to be used in this call's Do method. Any
  19112. // pending HTTP request will be aborted if the provided context is
  19113. // canceled.
  19114. func (c *ProductsGetCall) Context(ctx context.Context) *ProductsGetCall {
  19115. c.ctx_ = ctx
  19116. return c
  19117. }
  19118. // Header returns an http.Header that can be modified by the caller to
  19119. // add HTTP headers to the request.
  19120. func (c *ProductsGetCall) Header() http.Header {
  19121. if c.header_ == nil {
  19122. c.header_ = make(http.Header)
  19123. }
  19124. return c.header_
  19125. }
  19126. func (c *ProductsGetCall) doRequest(alt string) (*http.Response, error) {
  19127. reqHeaders := make(http.Header)
  19128. for k, v := range c.header_ {
  19129. reqHeaders[k] = v
  19130. }
  19131. reqHeaders.Set("User-Agent", c.s.userAgent())
  19132. if c.ifNoneMatch_ != "" {
  19133. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  19134. }
  19135. var body io.Reader = nil
  19136. c.urlParams_.Set("alt", alt)
  19137. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products/{productId}")
  19138. urls += "?" + c.urlParams_.Encode()
  19139. req, _ := http.NewRequest("GET", urls, body)
  19140. req.Header = reqHeaders
  19141. googleapi.Expand(req.URL, map[string]string{
  19142. "merchantId": strconv.FormatUint(c.merchantId, 10),
  19143. "productId": c.productId,
  19144. })
  19145. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  19146. }
  19147. // Do executes the "content.products.get" call.
  19148. // Exactly one of *Product or error will be non-nil. Any non-2xx status
  19149. // code is an error. Response headers are in either
  19150. // *Product.ServerResponse.Header or (if a response was returned at all)
  19151. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  19152. // check whether the returned error was because http.StatusNotModified
  19153. // was returned.
  19154. func (c *ProductsGetCall) Do(opts ...googleapi.CallOption) (*Product, error) {
  19155. gensupport.SetOptions(c.urlParams_, opts...)
  19156. res, err := c.doRequest("json")
  19157. if res != nil && res.StatusCode == http.StatusNotModified {
  19158. if res.Body != nil {
  19159. res.Body.Close()
  19160. }
  19161. return nil, &googleapi.Error{
  19162. Code: res.StatusCode,
  19163. Header: res.Header,
  19164. }
  19165. }
  19166. if err != nil {
  19167. return nil, err
  19168. }
  19169. defer googleapi.CloseBody(res)
  19170. if err := googleapi.CheckResponse(res); err != nil {
  19171. return nil, err
  19172. }
  19173. ret := &Product{
  19174. ServerResponse: googleapi.ServerResponse{
  19175. Header: res.Header,
  19176. HTTPStatusCode: res.StatusCode,
  19177. },
  19178. }
  19179. target := &ret
  19180. if err := gensupport.DecodeResponse(target, res); err != nil {
  19181. return nil, err
  19182. }
  19183. return ret, nil
  19184. // {
  19185. // "description": "Retrieves a product from your Merchant Center account.",
  19186. // "httpMethod": "GET",
  19187. // "id": "content.products.get",
  19188. // "parameterOrder": [
  19189. // "merchantId",
  19190. // "productId"
  19191. // ],
  19192. // "parameters": {
  19193. // "merchantId": {
  19194. // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
  19195. // "format": "uint64",
  19196. // "location": "path",
  19197. // "required": true,
  19198. // "type": "string"
  19199. // },
  19200. // "productId": {
  19201. // "description": "The REST id of the product.",
  19202. // "location": "path",
  19203. // "required": true,
  19204. // "type": "string"
  19205. // }
  19206. // },
  19207. // "path": "{merchantId}/products/{productId}",
  19208. // "response": {
  19209. // "$ref": "Product"
  19210. // },
  19211. // "scopes": [
  19212. // "https://www.googleapis.com/auth/content"
  19213. // ]
  19214. // }
  19215. }
  19216. // method id "content.products.insert":
  19217. type ProductsInsertCall struct {
  19218. s *APIService
  19219. merchantId uint64
  19220. product *Product
  19221. urlParams_ gensupport.URLParams
  19222. ctx_ context.Context
  19223. header_ http.Header
  19224. }
  19225. // Insert: Uploads a product to your Merchant Center account. If an item
  19226. // with the same channel, contentLanguage, offerId, and targetCountry
  19227. // already exists, this method updates that entry.
  19228. func (r *ProductsService) Insert(merchantId uint64, product *Product) *ProductsInsertCall {
  19229. c := &ProductsInsertCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  19230. c.merchantId = merchantId
  19231. c.product = product
  19232. return c
  19233. }
  19234. // DryRun sets the optional parameter "dryRun": Flag to run the request
  19235. // in dry-run mode.
  19236. func (c *ProductsInsertCall) DryRun(dryRun bool) *ProductsInsertCall {
  19237. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  19238. return c
  19239. }
  19240. // Fields allows partial responses to be retrieved. See
  19241. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  19242. // for more information.
  19243. func (c *ProductsInsertCall) Fields(s ...googleapi.Field) *ProductsInsertCall {
  19244. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  19245. return c
  19246. }
  19247. // Context sets the context to be used in this call's Do method. Any
  19248. // pending HTTP request will be aborted if the provided context is
  19249. // canceled.
  19250. func (c *ProductsInsertCall) Context(ctx context.Context) *ProductsInsertCall {
  19251. c.ctx_ = ctx
  19252. return c
  19253. }
  19254. // Header returns an http.Header that can be modified by the caller to
  19255. // add HTTP headers to the request.
  19256. func (c *ProductsInsertCall) Header() http.Header {
  19257. if c.header_ == nil {
  19258. c.header_ = make(http.Header)
  19259. }
  19260. return c.header_
  19261. }
  19262. func (c *ProductsInsertCall) doRequest(alt string) (*http.Response, error) {
  19263. reqHeaders := make(http.Header)
  19264. for k, v := range c.header_ {
  19265. reqHeaders[k] = v
  19266. }
  19267. reqHeaders.Set("User-Agent", c.s.userAgent())
  19268. var body io.Reader = nil
  19269. body, err := googleapi.WithoutDataWrapper.JSONReader(c.product)
  19270. if err != nil {
  19271. return nil, err
  19272. }
  19273. reqHeaders.Set("Content-Type", "application/json")
  19274. c.urlParams_.Set("alt", alt)
  19275. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products")
  19276. urls += "?" + c.urlParams_.Encode()
  19277. req, _ := http.NewRequest("POST", urls, body)
  19278. req.Header = reqHeaders
  19279. googleapi.Expand(req.URL, map[string]string{
  19280. "merchantId": strconv.FormatUint(c.merchantId, 10),
  19281. })
  19282. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  19283. }
  19284. // Do executes the "content.products.insert" call.
  19285. // Exactly one of *Product or error will be non-nil. Any non-2xx status
  19286. // code is an error. Response headers are in either
  19287. // *Product.ServerResponse.Header or (if a response was returned at all)
  19288. // in error.(*googleapi.Error).Header. Use googleapi.IsNotModified to
  19289. // check whether the returned error was because http.StatusNotModified
  19290. // was returned.
  19291. func (c *ProductsInsertCall) Do(opts ...googleapi.CallOption) (*Product, error) {
  19292. gensupport.SetOptions(c.urlParams_, opts...)
  19293. res, err := c.doRequest("json")
  19294. if res != nil && res.StatusCode == http.StatusNotModified {
  19295. if res.Body != nil {
  19296. res.Body.Close()
  19297. }
  19298. return nil, &googleapi.Error{
  19299. Code: res.StatusCode,
  19300. Header: res.Header,
  19301. }
  19302. }
  19303. if err != nil {
  19304. return nil, err
  19305. }
  19306. defer googleapi.CloseBody(res)
  19307. if err := googleapi.CheckResponse(res); err != nil {
  19308. return nil, err
  19309. }
  19310. ret := &Product{
  19311. ServerResponse: googleapi.ServerResponse{
  19312. Header: res.Header,
  19313. HTTPStatusCode: res.StatusCode,
  19314. },
  19315. }
  19316. target := &ret
  19317. if err := gensupport.DecodeResponse(target, res); err != nil {
  19318. return nil, err
  19319. }
  19320. return ret, nil
  19321. // {
  19322. // "description": "Uploads a product to your Merchant Center account. If an item with the same channel, contentLanguage, offerId, and targetCountry already exists, this method updates that entry.",
  19323. // "httpMethod": "POST",
  19324. // "id": "content.products.insert",
  19325. // "parameterOrder": [
  19326. // "merchantId"
  19327. // ],
  19328. // "parameters": {
  19329. // "dryRun": {
  19330. // "description": "Flag to run the request in dry-run mode.",
  19331. // "location": "query",
  19332. // "type": "boolean"
  19333. // },
  19334. // "merchantId": {
  19335. // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
  19336. // "format": "uint64",
  19337. // "location": "path",
  19338. // "required": true,
  19339. // "type": "string"
  19340. // }
  19341. // },
  19342. // "path": "{merchantId}/products",
  19343. // "request": {
  19344. // "$ref": "Product"
  19345. // },
  19346. // "response": {
  19347. // "$ref": "Product"
  19348. // },
  19349. // "scopes": [
  19350. // "https://www.googleapis.com/auth/content"
  19351. // ]
  19352. // }
  19353. }
  19354. // method id "content.products.list":
  19355. type ProductsListCall struct {
  19356. s *APIService
  19357. merchantId uint64
  19358. urlParams_ gensupport.URLParams
  19359. ifNoneMatch_ string
  19360. ctx_ context.Context
  19361. header_ http.Header
  19362. }
  19363. // List: Lists the products in your Merchant Center account.
  19364. func (r *ProductsService) List(merchantId uint64) *ProductsListCall {
  19365. c := &ProductsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  19366. c.merchantId = merchantId
  19367. return c
  19368. }
  19369. // IncludeInvalidInsertedItems sets the optional parameter
  19370. // "includeInvalidInsertedItems": Flag to include the invalid inserted
  19371. // items in the result of the list request. By default the invalid items
  19372. // are not shown (the default value is false).
  19373. func (c *ProductsListCall) IncludeInvalidInsertedItems(includeInvalidInsertedItems bool) *ProductsListCall {
  19374. c.urlParams_.Set("includeInvalidInsertedItems", fmt.Sprint(includeInvalidInsertedItems))
  19375. return c
  19376. }
  19377. // MaxResults sets the optional parameter "maxResults": The maximum
  19378. // number of products to return in the response, used for paging.
  19379. func (c *ProductsListCall) MaxResults(maxResults int64) *ProductsListCall {
  19380. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  19381. return c
  19382. }
  19383. // PageToken sets the optional parameter "pageToken": The token returned
  19384. // by the previous request.
  19385. func (c *ProductsListCall) PageToken(pageToken string) *ProductsListCall {
  19386. c.urlParams_.Set("pageToken", pageToken)
  19387. return c
  19388. }
  19389. // Fields allows partial responses to be retrieved. See
  19390. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  19391. // for more information.
  19392. func (c *ProductsListCall) Fields(s ...googleapi.Field) *ProductsListCall {
  19393. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  19394. return c
  19395. }
  19396. // IfNoneMatch sets the optional parameter which makes the operation
  19397. // fail if the object's ETag matches the given value. This is useful for
  19398. // getting updates only after the object has changed since the last
  19399. // request. Use googleapi.IsNotModified to check whether the response
  19400. // error from Do is the result of In-None-Match.
  19401. func (c *ProductsListCall) IfNoneMatch(entityTag string) *ProductsListCall {
  19402. c.ifNoneMatch_ = entityTag
  19403. return c
  19404. }
  19405. // Context sets the context to be used in this call's Do method. Any
  19406. // pending HTTP request will be aborted if the provided context is
  19407. // canceled.
  19408. func (c *ProductsListCall) Context(ctx context.Context) *ProductsListCall {
  19409. c.ctx_ = ctx
  19410. return c
  19411. }
  19412. // Header returns an http.Header that can be modified by the caller to
  19413. // add HTTP headers to the request.
  19414. func (c *ProductsListCall) Header() http.Header {
  19415. if c.header_ == nil {
  19416. c.header_ = make(http.Header)
  19417. }
  19418. return c.header_
  19419. }
  19420. func (c *ProductsListCall) doRequest(alt string) (*http.Response, error) {
  19421. reqHeaders := make(http.Header)
  19422. for k, v := range c.header_ {
  19423. reqHeaders[k] = v
  19424. }
  19425. reqHeaders.Set("User-Agent", c.s.userAgent())
  19426. if c.ifNoneMatch_ != "" {
  19427. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  19428. }
  19429. var body io.Reader = nil
  19430. c.urlParams_.Set("alt", alt)
  19431. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/products")
  19432. urls += "?" + c.urlParams_.Encode()
  19433. req, _ := http.NewRequest("GET", urls, body)
  19434. req.Header = reqHeaders
  19435. googleapi.Expand(req.URL, map[string]string{
  19436. "merchantId": strconv.FormatUint(c.merchantId, 10),
  19437. })
  19438. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  19439. }
  19440. // Do executes the "content.products.list" call.
  19441. // Exactly one of *ProductsListResponse or error will be non-nil. Any
  19442. // non-2xx status code is an error. Response headers are in either
  19443. // *ProductsListResponse.ServerResponse.Header or (if a response was
  19444. // returned at all) in error.(*googleapi.Error).Header. Use
  19445. // googleapi.IsNotModified to check whether the returned error was
  19446. // because http.StatusNotModified was returned.
  19447. func (c *ProductsListCall) Do(opts ...googleapi.CallOption) (*ProductsListResponse, error) {
  19448. gensupport.SetOptions(c.urlParams_, opts...)
  19449. res, err := c.doRequest("json")
  19450. if res != nil && res.StatusCode == http.StatusNotModified {
  19451. if res.Body != nil {
  19452. res.Body.Close()
  19453. }
  19454. return nil, &googleapi.Error{
  19455. Code: res.StatusCode,
  19456. Header: res.Header,
  19457. }
  19458. }
  19459. if err != nil {
  19460. return nil, err
  19461. }
  19462. defer googleapi.CloseBody(res)
  19463. if err := googleapi.CheckResponse(res); err != nil {
  19464. return nil, err
  19465. }
  19466. ret := &ProductsListResponse{
  19467. ServerResponse: googleapi.ServerResponse{
  19468. Header: res.Header,
  19469. HTTPStatusCode: res.StatusCode,
  19470. },
  19471. }
  19472. target := &ret
  19473. if err := gensupport.DecodeResponse(target, res); err != nil {
  19474. return nil, err
  19475. }
  19476. return ret, nil
  19477. // {
  19478. // "description": "Lists the products in your Merchant Center account.",
  19479. // "httpMethod": "GET",
  19480. // "id": "content.products.list",
  19481. // "parameterOrder": [
  19482. // "merchantId"
  19483. // ],
  19484. // "parameters": {
  19485. // "includeInvalidInsertedItems": {
  19486. // "description": "Flag to include the invalid inserted items in the result of the list request. By default the invalid items are not shown (the default value is false).",
  19487. // "location": "query",
  19488. // "type": "boolean"
  19489. // },
  19490. // "maxResults": {
  19491. // "description": "The maximum number of products to return in the response, used for paging.",
  19492. // "format": "uint32",
  19493. // "location": "query",
  19494. // "type": "integer"
  19495. // },
  19496. // "merchantId": {
  19497. // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.",
  19498. // "format": "uint64",
  19499. // "location": "path",
  19500. // "required": true,
  19501. // "type": "string"
  19502. // },
  19503. // "pageToken": {
  19504. // "description": "The token returned by the previous request.",
  19505. // "location": "query",
  19506. // "type": "string"
  19507. // }
  19508. // },
  19509. // "path": "{merchantId}/products",
  19510. // "response": {
  19511. // "$ref": "ProductsListResponse"
  19512. // },
  19513. // "scopes": [
  19514. // "https://www.googleapis.com/auth/content"
  19515. // ]
  19516. // }
  19517. }
  19518. // Pages invokes f for each page of results.
  19519. // A non-nil error returned from f will halt the iteration.
  19520. // The provided context supersedes any context provided to the Context method.
  19521. func (c *ProductsListCall) Pages(ctx context.Context, f func(*ProductsListResponse) error) error {
  19522. c.ctx_ = ctx
  19523. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  19524. for {
  19525. x, err := c.Do()
  19526. if err != nil {
  19527. return err
  19528. }
  19529. if err := f(x); err != nil {
  19530. return err
  19531. }
  19532. if x.NextPageToken == "" {
  19533. return nil
  19534. }
  19535. c.PageToken(x.NextPageToken)
  19536. }
  19537. }
  19538. // method id "content.productstatuses.custombatch":
  19539. type ProductstatusesCustombatchCall struct {
  19540. s *APIService
  19541. productstatusescustombatchrequest *ProductstatusesCustomBatchRequest
  19542. urlParams_ gensupport.URLParams
  19543. ctx_ context.Context
  19544. header_ http.Header
  19545. }
  19546. // Custombatch: Gets the statuses of multiple products in a single
  19547. // request.
  19548. func (r *ProductstatusesService) Custombatch(productstatusescustombatchrequest *ProductstatusesCustomBatchRequest) *ProductstatusesCustombatchCall {
  19549. c := &ProductstatusesCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  19550. c.productstatusescustombatchrequest = productstatusescustombatchrequest
  19551. return c
  19552. }
  19553. // IncludeAttributes sets the optional parameter "includeAttributes":
  19554. // Flag to include full product data in the results of this request. The
  19555. // default value is false.
  19556. func (c *ProductstatusesCustombatchCall) IncludeAttributes(includeAttributes bool) *ProductstatusesCustombatchCall {
  19557. c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes))
  19558. return c
  19559. }
  19560. // Fields allows partial responses to be retrieved. See
  19561. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  19562. // for more information.
  19563. func (c *ProductstatusesCustombatchCall) Fields(s ...googleapi.Field) *ProductstatusesCustombatchCall {
  19564. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  19565. return c
  19566. }
  19567. // Context sets the context to be used in this call's Do method. Any
  19568. // pending HTTP request will be aborted if the provided context is
  19569. // canceled.
  19570. func (c *ProductstatusesCustombatchCall) Context(ctx context.Context) *ProductstatusesCustombatchCall {
  19571. c.ctx_ = ctx
  19572. return c
  19573. }
  19574. // Header returns an http.Header that can be modified by the caller to
  19575. // add HTTP headers to the request.
  19576. func (c *ProductstatusesCustombatchCall) Header() http.Header {
  19577. if c.header_ == nil {
  19578. c.header_ = make(http.Header)
  19579. }
  19580. return c.header_
  19581. }
  19582. func (c *ProductstatusesCustombatchCall) doRequest(alt string) (*http.Response, error) {
  19583. reqHeaders := make(http.Header)
  19584. for k, v := range c.header_ {
  19585. reqHeaders[k] = v
  19586. }
  19587. reqHeaders.Set("User-Agent", c.s.userAgent())
  19588. var body io.Reader = nil
  19589. body, err := googleapi.WithoutDataWrapper.JSONReader(c.productstatusescustombatchrequest)
  19590. if err != nil {
  19591. return nil, err
  19592. }
  19593. reqHeaders.Set("Content-Type", "application/json")
  19594. c.urlParams_.Set("alt", alt)
  19595. urls := googleapi.ResolveRelative(c.s.BasePath, "productstatuses/batch")
  19596. urls += "?" + c.urlParams_.Encode()
  19597. req, _ := http.NewRequest("POST", urls, body)
  19598. req.Header = reqHeaders
  19599. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  19600. }
  19601. // Do executes the "content.productstatuses.custombatch" call.
  19602. // Exactly one of *ProductstatusesCustomBatchResponse or error will be
  19603. // non-nil. Any non-2xx status code is an error. Response headers are in
  19604. // either *ProductstatusesCustomBatchResponse.ServerResponse.Header or
  19605. // (if a response was returned at all) in
  19606. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  19607. // whether the returned error was because http.StatusNotModified was
  19608. // returned.
  19609. func (c *ProductstatusesCustombatchCall) Do(opts ...googleapi.CallOption) (*ProductstatusesCustomBatchResponse, error) {
  19610. gensupport.SetOptions(c.urlParams_, opts...)
  19611. res, err := c.doRequest("json")
  19612. if res != nil && res.StatusCode == http.StatusNotModified {
  19613. if res.Body != nil {
  19614. res.Body.Close()
  19615. }
  19616. return nil, &googleapi.Error{
  19617. Code: res.StatusCode,
  19618. Header: res.Header,
  19619. }
  19620. }
  19621. if err != nil {
  19622. return nil, err
  19623. }
  19624. defer googleapi.CloseBody(res)
  19625. if err := googleapi.CheckResponse(res); err != nil {
  19626. return nil, err
  19627. }
  19628. ret := &ProductstatusesCustomBatchResponse{
  19629. ServerResponse: googleapi.ServerResponse{
  19630. Header: res.Header,
  19631. HTTPStatusCode: res.StatusCode,
  19632. },
  19633. }
  19634. target := &ret
  19635. if err := gensupport.DecodeResponse(target, res); err != nil {
  19636. return nil, err
  19637. }
  19638. return ret, nil
  19639. // {
  19640. // "description": "Gets the statuses of multiple products in a single request.",
  19641. // "httpMethod": "POST",
  19642. // "id": "content.productstatuses.custombatch",
  19643. // "parameters": {
  19644. // "includeAttributes": {
  19645. // "description": "Flag to include full product data in the results of this request. The default value is false.",
  19646. // "location": "query",
  19647. // "type": "boolean"
  19648. // }
  19649. // },
  19650. // "path": "productstatuses/batch",
  19651. // "request": {
  19652. // "$ref": "ProductstatusesCustomBatchRequest"
  19653. // },
  19654. // "response": {
  19655. // "$ref": "ProductstatusesCustomBatchResponse"
  19656. // },
  19657. // "scopes": [
  19658. // "https://www.googleapis.com/auth/content"
  19659. // ]
  19660. // }
  19661. }
  19662. // method id "content.productstatuses.get":
  19663. type ProductstatusesGetCall struct {
  19664. s *APIService
  19665. merchantId uint64
  19666. productId string
  19667. urlParams_ gensupport.URLParams
  19668. ifNoneMatch_ string
  19669. ctx_ context.Context
  19670. header_ http.Header
  19671. }
  19672. // Get: Gets the status of a product from your Merchant Center account.
  19673. func (r *ProductstatusesService) Get(merchantId uint64, productId string) *ProductstatusesGetCall {
  19674. c := &ProductstatusesGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  19675. c.merchantId = merchantId
  19676. c.productId = productId
  19677. return c
  19678. }
  19679. // Destinations sets the optional parameter "destinations": If set, only
  19680. // issues for the specified destinations are returned, otherwise only
  19681. // issues for the Shopping destination.
  19682. func (c *ProductstatusesGetCall) Destinations(destinations ...string) *ProductstatusesGetCall {
  19683. c.urlParams_.SetMulti("destinations", append([]string{}, destinations...))
  19684. return c
  19685. }
  19686. // IncludeAttributes sets the optional parameter "includeAttributes":
  19687. // Flag to include full product data in the result of this get request.
  19688. // The default value is false.
  19689. func (c *ProductstatusesGetCall) IncludeAttributes(includeAttributes bool) *ProductstatusesGetCall {
  19690. c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes))
  19691. return c
  19692. }
  19693. // Fields allows partial responses to be retrieved. See
  19694. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  19695. // for more information.
  19696. func (c *ProductstatusesGetCall) Fields(s ...googleapi.Field) *ProductstatusesGetCall {
  19697. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  19698. return c
  19699. }
  19700. // IfNoneMatch sets the optional parameter which makes the operation
  19701. // fail if the object's ETag matches the given value. This is useful for
  19702. // getting updates only after the object has changed since the last
  19703. // request. Use googleapi.IsNotModified to check whether the response
  19704. // error from Do is the result of In-None-Match.
  19705. func (c *ProductstatusesGetCall) IfNoneMatch(entityTag string) *ProductstatusesGetCall {
  19706. c.ifNoneMatch_ = entityTag
  19707. return c
  19708. }
  19709. // Context sets the context to be used in this call's Do method. Any
  19710. // pending HTTP request will be aborted if the provided context is
  19711. // canceled.
  19712. func (c *ProductstatusesGetCall) Context(ctx context.Context) *ProductstatusesGetCall {
  19713. c.ctx_ = ctx
  19714. return c
  19715. }
  19716. // Header returns an http.Header that can be modified by the caller to
  19717. // add HTTP headers to the request.
  19718. func (c *ProductstatusesGetCall) Header() http.Header {
  19719. if c.header_ == nil {
  19720. c.header_ = make(http.Header)
  19721. }
  19722. return c.header_
  19723. }
  19724. func (c *ProductstatusesGetCall) doRequest(alt string) (*http.Response, error) {
  19725. reqHeaders := make(http.Header)
  19726. for k, v := range c.header_ {
  19727. reqHeaders[k] = v
  19728. }
  19729. reqHeaders.Set("User-Agent", c.s.userAgent())
  19730. if c.ifNoneMatch_ != "" {
  19731. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  19732. }
  19733. var body io.Reader = nil
  19734. c.urlParams_.Set("alt", alt)
  19735. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses/{productId}")
  19736. urls += "?" + c.urlParams_.Encode()
  19737. req, _ := http.NewRequest("GET", urls, body)
  19738. req.Header = reqHeaders
  19739. googleapi.Expand(req.URL, map[string]string{
  19740. "merchantId": strconv.FormatUint(c.merchantId, 10),
  19741. "productId": c.productId,
  19742. })
  19743. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  19744. }
  19745. // Do executes the "content.productstatuses.get" call.
  19746. // Exactly one of *ProductStatus or error will be non-nil. Any non-2xx
  19747. // status code is an error. Response headers are in either
  19748. // *ProductStatus.ServerResponse.Header or (if a response was returned
  19749. // at all) in error.(*googleapi.Error).Header. Use
  19750. // googleapi.IsNotModified to check whether the returned error was
  19751. // because http.StatusNotModified was returned.
  19752. func (c *ProductstatusesGetCall) Do(opts ...googleapi.CallOption) (*ProductStatus, error) {
  19753. gensupport.SetOptions(c.urlParams_, opts...)
  19754. res, err := c.doRequest("json")
  19755. if res != nil && res.StatusCode == http.StatusNotModified {
  19756. if res.Body != nil {
  19757. res.Body.Close()
  19758. }
  19759. return nil, &googleapi.Error{
  19760. Code: res.StatusCode,
  19761. Header: res.Header,
  19762. }
  19763. }
  19764. if err != nil {
  19765. return nil, err
  19766. }
  19767. defer googleapi.CloseBody(res)
  19768. if err := googleapi.CheckResponse(res); err != nil {
  19769. return nil, err
  19770. }
  19771. ret := &ProductStatus{
  19772. ServerResponse: googleapi.ServerResponse{
  19773. Header: res.Header,
  19774. HTTPStatusCode: res.StatusCode,
  19775. },
  19776. }
  19777. target := &ret
  19778. if err := gensupport.DecodeResponse(target, res); err != nil {
  19779. return nil, err
  19780. }
  19781. return ret, nil
  19782. // {
  19783. // "description": "Gets the status of a product from your Merchant Center account.",
  19784. // "httpMethod": "GET",
  19785. // "id": "content.productstatuses.get",
  19786. // "parameterOrder": [
  19787. // "merchantId",
  19788. // "productId"
  19789. // ],
  19790. // "parameters": {
  19791. // "destinations": {
  19792. // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
  19793. // "location": "query",
  19794. // "repeated": true,
  19795. // "type": "string"
  19796. // },
  19797. // "includeAttributes": {
  19798. // "description": "Flag to include full product data in the result of this get request. The default value is false.",
  19799. // "location": "query",
  19800. // "type": "boolean"
  19801. // },
  19802. // "merchantId": {
  19803. // "description": "The ID of the account that contains the product. This account cannot be a multi-client account.",
  19804. // "format": "uint64",
  19805. // "location": "path",
  19806. // "required": true,
  19807. // "type": "string"
  19808. // },
  19809. // "productId": {
  19810. // "description": "The REST id of the product.",
  19811. // "location": "path",
  19812. // "required": true,
  19813. // "type": "string"
  19814. // }
  19815. // },
  19816. // "path": "{merchantId}/productstatuses/{productId}",
  19817. // "response": {
  19818. // "$ref": "ProductStatus"
  19819. // },
  19820. // "scopes": [
  19821. // "https://www.googleapis.com/auth/content"
  19822. // ]
  19823. // }
  19824. }
  19825. // method id "content.productstatuses.list":
  19826. type ProductstatusesListCall struct {
  19827. s *APIService
  19828. merchantId uint64
  19829. urlParams_ gensupport.URLParams
  19830. ifNoneMatch_ string
  19831. ctx_ context.Context
  19832. header_ http.Header
  19833. }
  19834. // List: Lists the statuses of the products in your Merchant Center
  19835. // account.
  19836. func (r *ProductstatusesService) List(merchantId uint64) *ProductstatusesListCall {
  19837. c := &ProductstatusesListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  19838. c.merchantId = merchantId
  19839. return c
  19840. }
  19841. // Destinations sets the optional parameter "destinations": If set, only
  19842. // issues for the specified destinations are returned, otherwise only
  19843. // issues for the Shopping destination.
  19844. func (c *ProductstatusesListCall) Destinations(destinations ...string) *ProductstatusesListCall {
  19845. c.urlParams_.SetMulti("destinations", append([]string{}, destinations...))
  19846. return c
  19847. }
  19848. // IncludeAttributes sets the optional parameter "includeAttributes":
  19849. // Flag to include full product data in the results of the list request.
  19850. // The default value is false.
  19851. func (c *ProductstatusesListCall) IncludeAttributes(includeAttributes bool) *ProductstatusesListCall {
  19852. c.urlParams_.Set("includeAttributes", fmt.Sprint(includeAttributes))
  19853. return c
  19854. }
  19855. // IncludeInvalidInsertedItems sets the optional parameter
  19856. // "includeInvalidInsertedItems": Flag to include the invalid inserted
  19857. // items in the result of the list request. By default the invalid items
  19858. // are not shown (the default value is false).
  19859. func (c *ProductstatusesListCall) IncludeInvalidInsertedItems(includeInvalidInsertedItems bool) *ProductstatusesListCall {
  19860. c.urlParams_.Set("includeInvalidInsertedItems", fmt.Sprint(includeInvalidInsertedItems))
  19861. return c
  19862. }
  19863. // MaxResults sets the optional parameter "maxResults": The maximum
  19864. // number of product statuses to return in the response, used for
  19865. // paging.
  19866. func (c *ProductstatusesListCall) MaxResults(maxResults int64) *ProductstatusesListCall {
  19867. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  19868. return c
  19869. }
  19870. // PageToken sets the optional parameter "pageToken": The token returned
  19871. // by the previous request.
  19872. func (c *ProductstatusesListCall) PageToken(pageToken string) *ProductstatusesListCall {
  19873. c.urlParams_.Set("pageToken", pageToken)
  19874. return c
  19875. }
  19876. // Fields allows partial responses to be retrieved. See
  19877. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  19878. // for more information.
  19879. func (c *ProductstatusesListCall) Fields(s ...googleapi.Field) *ProductstatusesListCall {
  19880. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  19881. return c
  19882. }
  19883. // IfNoneMatch sets the optional parameter which makes the operation
  19884. // fail if the object's ETag matches the given value. This is useful for
  19885. // getting updates only after the object has changed since the last
  19886. // request. Use googleapi.IsNotModified to check whether the response
  19887. // error from Do is the result of In-None-Match.
  19888. func (c *ProductstatusesListCall) IfNoneMatch(entityTag string) *ProductstatusesListCall {
  19889. c.ifNoneMatch_ = entityTag
  19890. return c
  19891. }
  19892. // Context sets the context to be used in this call's Do method. Any
  19893. // pending HTTP request will be aborted if the provided context is
  19894. // canceled.
  19895. func (c *ProductstatusesListCall) Context(ctx context.Context) *ProductstatusesListCall {
  19896. c.ctx_ = ctx
  19897. return c
  19898. }
  19899. // Header returns an http.Header that can be modified by the caller to
  19900. // add HTTP headers to the request.
  19901. func (c *ProductstatusesListCall) Header() http.Header {
  19902. if c.header_ == nil {
  19903. c.header_ = make(http.Header)
  19904. }
  19905. return c.header_
  19906. }
  19907. func (c *ProductstatusesListCall) doRequest(alt string) (*http.Response, error) {
  19908. reqHeaders := make(http.Header)
  19909. for k, v := range c.header_ {
  19910. reqHeaders[k] = v
  19911. }
  19912. reqHeaders.Set("User-Agent", c.s.userAgent())
  19913. if c.ifNoneMatch_ != "" {
  19914. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  19915. }
  19916. var body io.Reader = nil
  19917. c.urlParams_.Set("alt", alt)
  19918. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/productstatuses")
  19919. urls += "?" + c.urlParams_.Encode()
  19920. req, _ := http.NewRequest("GET", urls, body)
  19921. req.Header = reqHeaders
  19922. googleapi.Expand(req.URL, map[string]string{
  19923. "merchantId": strconv.FormatUint(c.merchantId, 10),
  19924. })
  19925. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  19926. }
  19927. // Do executes the "content.productstatuses.list" call.
  19928. // Exactly one of *ProductstatusesListResponse or error will be non-nil.
  19929. // Any non-2xx status code is an error. Response headers are in either
  19930. // *ProductstatusesListResponse.ServerResponse.Header or (if a response
  19931. // was returned at all) in error.(*googleapi.Error).Header. Use
  19932. // googleapi.IsNotModified to check whether the returned error was
  19933. // because http.StatusNotModified was returned.
  19934. func (c *ProductstatusesListCall) Do(opts ...googleapi.CallOption) (*ProductstatusesListResponse, error) {
  19935. gensupport.SetOptions(c.urlParams_, opts...)
  19936. res, err := c.doRequest("json")
  19937. if res != nil && res.StatusCode == http.StatusNotModified {
  19938. if res.Body != nil {
  19939. res.Body.Close()
  19940. }
  19941. return nil, &googleapi.Error{
  19942. Code: res.StatusCode,
  19943. Header: res.Header,
  19944. }
  19945. }
  19946. if err != nil {
  19947. return nil, err
  19948. }
  19949. defer googleapi.CloseBody(res)
  19950. if err := googleapi.CheckResponse(res); err != nil {
  19951. return nil, err
  19952. }
  19953. ret := &ProductstatusesListResponse{
  19954. ServerResponse: googleapi.ServerResponse{
  19955. Header: res.Header,
  19956. HTTPStatusCode: res.StatusCode,
  19957. },
  19958. }
  19959. target := &ret
  19960. if err := gensupport.DecodeResponse(target, res); err != nil {
  19961. return nil, err
  19962. }
  19963. return ret, nil
  19964. // {
  19965. // "description": "Lists the statuses of the products in your Merchant Center account.",
  19966. // "httpMethod": "GET",
  19967. // "id": "content.productstatuses.list",
  19968. // "parameterOrder": [
  19969. // "merchantId"
  19970. // ],
  19971. // "parameters": {
  19972. // "destinations": {
  19973. // "description": "If set, only issues for the specified destinations are returned, otherwise only issues for the Shopping destination.",
  19974. // "location": "query",
  19975. // "repeated": true,
  19976. // "type": "string"
  19977. // },
  19978. // "includeAttributes": {
  19979. // "description": "Flag to include full product data in the results of the list request. The default value is false.",
  19980. // "location": "query",
  19981. // "type": "boolean"
  19982. // },
  19983. // "includeInvalidInsertedItems": {
  19984. // "description": "Flag to include the invalid inserted items in the result of the list request. By default the invalid items are not shown (the default value is false).",
  19985. // "location": "query",
  19986. // "type": "boolean"
  19987. // },
  19988. // "maxResults": {
  19989. // "description": "The maximum number of product statuses to return in the response, used for paging.",
  19990. // "format": "uint32",
  19991. // "location": "query",
  19992. // "type": "integer"
  19993. // },
  19994. // "merchantId": {
  19995. // "description": "The ID of the account that contains the products. This account cannot be a multi-client account.",
  19996. // "format": "uint64",
  19997. // "location": "path",
  19998. // "required": true,
  19999. // "type": "string"
  20000. // },
  20001. // "pageToken": {
  20002. // "description": "The token returned by the previous request.",
  20003. // "location": "query",
  20004. // "type": "string"
  20005. // }
  20006. // },
  20007. // "path": "{merchantId}/productstatuses",
  20008. // "response": {
  20009. // "$ref": "ProductstatusesListResponse"
  20010. // },
  20011. // "scopes": [
  20012. // "https://www.googleapis.com/auth/content"
  20013. // ]
  20014. // }
  20015. }
  20016. // Pages invokes f for each page of results.
  20017. // A non-nil error returned from f will halt the iteration.
  20018. // The provided context supersedes any context provided to the Context method.
  20019. func (c *ProductstatusesListCall) Pages(ctx context.Context, f func(*ProductstatusesListResponse) error) error {
  20020. c.ctx_ = ctx
  20021. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  20022. for {
  20023. x, err := c.Do()
  20024. if err != nil {
  20025. return err
  20026. }
  20027. if err := f(x); err != nil {
  20028. return err
  20029. }
  20030. if x.NextPageToken == "" {
  20031. return nil
  20032. }
  20033. c.PageToken(x.NextPageToken)
  20034. }
  20035. }
  20036. // method id "content.shippingsettings.custombatch":
  20037. type ShippingsettingsCustombatchCall struct {
  20038. s *APIService
  20039. shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest
  20040. urlParams_ gensupport.URLParams
  20041. ctx_ context.Context
  20042. header_ http.Header
  20043. }
  20044. // Custombatch: Retrieves and updates the shipping settings of multiple
  20045. // accounts in a single request.
  20046. func (r *ShippingsettingsService) Custombatch(shippingsettingscustombatchrequest *ShippingsettingsCustomBatchRequest) *ShippingsettingsCustombatchCall {
  20047. c := &ShippingsettingsCustombatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  20048. c.shippingsettingscustombatchrequest = shippingsettingscustombatchrequest
  20049. return c
  20050. }
  20051. // DryRun sets the optional parameter "dryRun": Flag to run the request
  20052. // in dry-run mode.
  20053. func (c *ShippingsettingsCustombatchCall) DryRun(dryRun bool) *ShippingsettingsCustombatchCall {
  20054. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  20055. return c
  20056. }
  20057. // Fields allows partial responses to be retrieved. See
  20058. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  20059. // for more information.
  20060. func (c *ShippingsettingsCustombatchCall) Fields(s ...googleapi.Field) *ShippingsettingsCustombatchCall {
  20061. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  20062. return c
  20063. }
  20064. // Context sets the context to be used in this call's Do method. Any
  20065. // pending HTTP request will be aborted if the provided context is
  20066. // canceled.
  20067. func (c *ShippingsettingsCustombatchCall) Context(ctx context.Context) *ShippingsettingsCustombatchCall {
  20068. c.ctx_ = ctx
  20069. return c
  20070. }
  20071. // Header returns an http.Header that can be modified by the caller to
  20072. // add HTTP headers to the request.
  20073. func (c *ShippingsettingsCustombatchCall) Header() http.Header {
  20074. if c.header_ == nil {
  20075. c.header_ = make(http.Header)
  20076. }
  20077. return c.header_
  20078. }
  20079. func (c *ShippingsettingsCustombatchCall) doRequest(alt string) (*http.Response, error) {
  20080. reqHeaders := make(http.Header)
  20081. for k, v := range c.header_ {
  20082. reqHeaders[k] = v
  20083. }
  20084. reqHeaders.Set("User-Agent", c.s.userAgent())
  20085. var body io.Reader = nil
  20086. body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettingscustombatchrequest)
  20087. if err != nil {
  20088. return nil, err
  20089. }
  20090. reqHeaders.Set("Content-Type", "application/json")
  20091. c.urlParams_.Set("alt", alt)
  20092. urls := googleapi.ResolveRelative(c.s.BasePath, "shippingsettings/batch")
  20093. urls += "?" + c.urlParams_.Encode()
  20094. req, _ := http.NewRequest("POST", urls, body)
  20095. req.Header = reqHeaders
  20096. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  20097. }
  20098. // Do executes the "content.shippingsettings.custombatch" call.
  20099. // Exactly one of *ShippingsettingsCustomBatchResponse or error will be
  20100. // non-nil. Any non-2xx status code is an error. Response headers are in
  20101. // either *ShippingsettingsCustomBatchResponse.ServerResponse.Header or
  20102. // (if a response was returned at all) in
  20103. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  20104. // whether the returned error was because http.StatusNotModified was
  20105. // returned.
  20106. func (c *ShippingsettingsCustombatchCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsCustomBatchResponse, error) {
  20107. gensupport.SetOptions(c.urlParams_, opts...)
  20108. res, err := c.doRequest("json")
  20109. if res != nil && res.StatusCode == http.StatusNotModified {
  20110. if res.Body != nil {
  20111. res.Body.Close()
  20112. }
  20113. return nil, &googleapi.Error{
  20114. Code: res.StatusCode,
  20115. Header: res.Header,
  20116. }
  20117. }
  20118. if err != nil {
  20119. return nil, err
  20120. }
  20121. defer googleapi.CloseBody(res)
  20122. if err := googleapi.CheckResponse(res); err != nil {
  20123. return nil, err
  20124. }
  20125. ret := &ShippingsettingsCustomBatchResponse{
  20126. ServerResponse: googleapi.ServerResponse{
  20127. Header: res.Header,
  20128. HTTPStatusCode: res.StatusCode,
  20129. },
  20130. }
  20131. target := &ret
  20132. if err := gensupport.DecodeResponse(target, res); err != nil {
  20133. return nil, err
  20134. }
  20135. return ret, nil
  20136. // {
  20137. // "description": "Retrieves and updates the shipping settings of multiple accounts in a single request.",
  20138. // "httpMethod": "POST",
  20139. // "id": "content.shippingsettings.custombatch",
  20140. // "parameters": {
  20141. // "dryRun": {
  20142. // "description": "Flag to run the request in dry-run mode.",
  20143. // "location": "query",
  20144. // "type": "boolean"
  20145. // }
  20146. // },
  20147. // "path": "shippingsettings/batch",
  20148. // "request": {
  20149. // "$ref": "ShippingsettingsCustomBatchRequest"
  20150. // },
  20151. // "response": {
  20152. // "$ref": "ShippingsettingsCustomBatchResponse"
  20153. // },
  20154. // "scopes": [
  20155. // "https://www.googleapis.com/auth/content"
  20156. // ]
  20157. // }
  20158. }
  20159. // method id "content.shippingsettings.get":
  20160. type ShippingsettingsGetCall struct {
  20161. s *APIService
  20162. merchantId uint64
  20163. accountId uint64
  20164. urlParams_ gensupport.URLParams
  20165. ifNoneMatch_ string
  20166. ctx_ context.Context
  20167. header_ http.Header
  20168. }
  20169. // Get: Retrieves the shipping settings of the account.
  20170. func (r *ShippingsettingsService) Get(merchantId uint64, accountId uint64) *ShippingsettingsGetCall {
  20171. c := &ShippingsettingsGetCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  20172. c.merchantId = merchantId
  20173. c.accountId = accountId
  20174. return c
  20175. }
  20176. // Fields allows partial responses to be retrieved. See
  20177. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  20178. // for more information.
  20179. func (c *ShippingsettingsGetCall) Fields(s ...googleapi.Field) *ShippingsettingsGetCall {
  20180. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  20181. return c
  20182. }
  20183. // IfNoneMatch sets the optional parameter which makes the operation
  20184. // fail if the object's ETag matches the given value. This is useful for
  20185. // getting updates only after the object has changed since the last
  20186. // request. Use googleapi.IsNotModified to check whether the response
  20187. // error from Do is the result of In-None-Match.
  20188. func (c *ShippingsettingsGetCall) IfNoneMatch(entityTag string) *ShippingsettingsGetCall {
  20189. c.ifNoneMatch_ = entityTag
  20190. return c
  20191. }
  20192. // Context sets the context to be used in this call's Do method. Any
  20193. // pending HTTP request will be aborted if the provided context is
  20194. // canceled.
  20195. func (c *ShippingsettingsGetCall) Context(ctx context.Context) *ShippingsettingsGetCall {
  20196. c.ctx_ = ctx
  20197. return c
  20198. }
  20199. // Header returns an http.Header that can be modified by the caller to
  20200. // add HTTP headers to the request.
  20201. func (c *ShippingsettingsGetCall) Header() http.Header {
  20202. if c.header_ == nil {
  20203. c.header_ = make(http.Header)
  20204. }
  20205. return c.header_
  20206. }
  20207. func (c *ShippingsettingsGetCall) doRequest(alt string) (*http.Response, error) {
  20208. reqHeaders := make(http.Header)
  20209. for k, v := range c.header_ {
  20210. reqHeaders[k] = v
  20211. }
  20212. reqHeaders.Set("User-Agent", c.s.userAgent())
  20213. if c.ifNoneMatch_ != "" {
  20214. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  20215. }
  20216. var body io.Reader = nil
  20217. c.urlParams_.Set("alt", alt)
  20218. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}")
  20219. urls += "?" + c.urlParams_.Encode()
  20220. req, _ := http.NewRequest("GET", urls, body)
  20221. req.Header = reqHeaders
  20222. googleapi.Expand(req.URL, map[string]string{
  20223. "merchantId": strconv.FormatUint(c.merchantId, 10),
  20224. "accountId": strconv.FormatUint(c.accountId, 10),
  20225. })
  20226. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  20227. }
  20228. // Do executes the "content.shippingsettings.get" call.
  20229. // Exactly one of *ShippingSettings or error will be non-nil. Any
  20230. // non-2xx status code is an error. Response headers are in either
  20231. // *ShippingSettings.ServerResponse.Header or (if a response was
  20232. // returned at all) in error.(*googleapi.Error).Header. Use
  20233. // googleapi.IsNotModified to check whether the returned error was
  20234. // because http.StatusNotModified was returned.
  20235. func (c *ShippingsettingsGetCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) {
  20236. gensupport.SetOptions(c.urlParams_, opts...)
  20237. res, err := c.doRequest("json")
  20238. if res != nil && res.StatusCode == http.StatusNotModified {
  20239. if res.Body != nil {
  20240. res.Body.Close()
  20241. }
  20242. return nil, &googleapi.Error{
  20243. Code: res.StatusCode,
  20244. Header: res.Header,
  20245. }
  20246. }
  20247. if err != nil {
  20248. return nil, err
  20249. }
  20250. defer googleapi.CloseBody(res)
  20251. if err := googleapi.CheckResponse(res); err != nil {
  20252. return nil, err
  20253. }
  20254. ret := &ShippingSettings{
  20255. ServerResponse: googleapi.ServerResponse{
  20256. Header: res.Header,
  20257. HTTPStatusCode: res.StatusCode,
  20258. },
  20259. }
  20260. target := &ret
  20261. if err := gensupport.DecodeResponse(target, res); err != nil {
  20262. return nil, err
  20263. }
  20264. return ret, nil
  20265. // {
  20266. // "description": "Retrieves the shipping settings of the account.",
  20267. // "httpMethod": "GET",
  20268. // "id": "content.shippingsettings.get",
  20269. // "parameterOrder": [
  20270. // "merchantId",
  20271. // "accountId"
  20272. // ],
  20273. // "parameters": {
  20274. // "accountId": {
  20275. // "description": "The ID of the account for which to get/update shipping settings.",
  20276. // "format": "uint64",
  20277. // "location": "path",
  20278. // "required": true,
  20279. // "type": "string"
  20280. // },
  20281. // "merchantId": {
  20282. // "description": "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.",
  20283. // "format": "uint64",
  20284. // "location": "path",
  20285. // "required": true,
  20286. // "type": "string"
  20287. // }
  20288. // },
  20289. // "path": "{merchantId}/shippingsettings/{accountId}",
  20290. // "response": {
  20291. // "$ref": "ShippingSettings"
  20292. // },
  20293. // "scopes": [
  20294. // "https://www.googleapis.com/auth/content"
  20295. // ]
  20296. // }
  20297. }
  20298. // method id "content.shippingsettings.getsupportedcarriers":
  20299. type ShippingsettingsGetsupportedcarriersCall struct {
  20300. s *APIService
  20301. merchantId uint64
  20302. urlParams_ gensupport.URLParams
  20303. ifNoneMatch_ string
  20304. ctx_ context.Context
  20305. header_ http.Header
  20306. }
  20307. // Getsupportedcarriers: Retrieves supported carriers and carrier
  20308. // services for an account.
  20309. func (r *ShippingsettingsService) Getsupportedcarriers(merchantId uint64) *ShippingsettingsGetsupportedcarriersCall {
  20310. c := &ShippingsettingsGetsupportedcarriersCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  20311. c.merchantId = merchantId
  20312. return c
  20313. }
  20314. // Fields allows partial responses to be retrieved. See
  20315. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  20316. // for more information.
  20317. func (c *ShippingsettingsGetsupportedcarriersCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedcarriersCall {
  20318. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  20319. return c
  20320. }
  20321. // IfNoneMatch sets the optional parameter which makes the operation
  20322. // fail if the object's ETag matches the given value. This is useful for
  20323. // getting updates only after the object has changed since the last
  20324. // request. Use googleapi.IsNotModified to check whether the response
  20325. // error from Do is the result of In-None-Match.
  20326. func (c *ShippingsettingsGetsupportedcarriersCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedcarriersCall {
  20327. c.ifNoneMatch_ = entityTag
  20328. return c
  20329. }
  20330. // Context sets the context to be used in this call's Do method. Any
  20331. // pending HTTP request will be aborted if the provided context is
  20332. // canceled.
  20333. func (c *ShippingsettingsGetsupportedcarriersCall) Context(ctx context.Context) *ShippingsettingsGetsupportedcarriersCall {
  20334. c.ctx_ = ctx
  20335. return c
  20336. }
  20337. // Header returns an http.Header that can be modified by the caller to
  20338. // add HTTP headers to the request.
  20339. func (c *ShippingsettingsGetsupportedcarriersCall) Header() http.Header {
  20340. if c.header_ == nil {
  20341. c.header_ = make(http.Header)
  20342. }
  20343. return c.header_
  20344. }
  20345. func (c *ShippingsettingsGetsupportedcarriersCall) doRequest(alt string) (*http.Response, error) {
  20346. reqHeaders := make(http.Header)
  20347. for k, v := range c.header_ {
  20348. reqHeaders[k] = v
  20349. }
  20350. reqHeaders.Set("User-Agent", c.s.userAgent())
  20351. if c.ifNoneMatch_ != "" {
  20352. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  20353. }
  20354. var body io.Reader = nil
  20355. c.urlParams_.Set("alt", alt)
  20356. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedCarriers")
  20357. urls += "?" + c.urlParams_.Encode()
  20358. req, _ := http.NewRequest("GET", urls, body)
  20359. req.Header = reqHeaders
  20360. googleapi.Expand(req.URL, map[string]string{
  20361. "merchantId": strconv.FormatUint(c.merchantId, 10),
  20362. })
  20363. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  20364. }
  20365. // Do executes the "content.shippingsettings.getsupportedcarriers" call.
  20366. // Exactly one of *ShippingsettingsGetSupportedCarriersResponse or error
  20367. // will be non-nil. Any non-2xx status code is an error. Response
  20368. // headers are in either
  20369. // *ShippingsettingsGetSupportedCarriersResponse.ServerResponse.Header
  20370. // or (if a response was returned at all) in
  20371. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  20372. // whether the returned error was because http.StatusNotModified was
  20373. // returned.
  20374. func (c *ShippingsettingsGetsupportedcarriersCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedCarriersResponse, error) {
  20375. gensupport.SetOptions(c.urlParams_, opts...)
  20376. res, err := c.doRequest("json")
  20377. if res != nil && res.StatusCode == http.StatusNotModified {
  20378. if res.Body != nil {
  20379. res.Body.Close()
  20380. }
  20381. return nil, &googleapi.Error{
  20382. Code: res.StatusCode,
  20383. Header: res.Header,
  20384. }
  20385. }
  20386. if err != nil {
  20387. return nil, err
  20388. }
  20389. defer googleapi.CloseBody(res)
  20390. if err := googleapi.CheckResponse(res); err != nil {
  20391. return nil, err
  20392. }
  20393. ret := &ShippingsettingsGetSupportedCarriersResponse{
  20394. ServerResponse: googleapi.ServerResponse{
  20395. Header: res.Header,
  20396. HTTPStatusCode: res.StatusCode,
  20397. },
  20398. }
  20399. target := &ret
  20400. if err := gensupport.DecodeResponse(target, res); err != nil {
  20401. return nil, err
  20402. }
  20403. return ret, nil
  20404. // {
  20405. // "description": "Retrieves supported carriers and carrier services for an account.",
  20406. // "httpMethod": "GET",
  20407. // "id": "content.shippingsettings.getsupportedcarriers",
  20408. // "parameterOrder": [
  20409. // "merchantId"
  20410. // ],
  20411. // "parameters": {
  20412. // "merchantId": {
  20413. // "description": "The ID of the account for which to retrieve the supported carriers.",
  20414. // "format": "uint64",
  20415. // "location": "path",
  20416. // "required": true,
  20417. // "type": "string"
  20418. // }
  20419. // },
  20420. // "path": "{merchantId}/supportedCarriers",
  20421. // "response": {
  20422. // "$ref": "ShippingsettingsGetSupportedCarriersResponse"
  20423. // },
  20424. // "scopes": [
  20425. // "https://www.googleapis.com/auth/content"
  20426. // ]
  20427. // }
  20428. }
  20429. // method id "content.shippingsettings.getsupportedholidays":
  20430. type ShippingsettingsGetsupportedholidaysCall struct {
  20431. s *APIService
  20432. merchantId uint64
  20433. urlParams_ gensupport.URLParams
  20434. ifNoneMatch_ string
  20435. ctx_ context.Context
  20436. header_ http.Header
  20437. }
  20438. // Getsupportedholidays: Retrieves supported holidays for an account.
  20439. func (r *ShippingsettingsService) Getsupportedholidays(merchantId uint64) *ShippingsettingsGetsupportedholidaysCall {
  20440. c := &ShippingsettingsGetsupportedholidaysCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  20441. c.merchantId = merchantId
  20442. return c
  20443. }
  20444. // Fields allows partial responses to be retrieved. See
  20445. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  20446. // for more information.
  20447. func (c *ShippingsettingsGetsupportedholidaysCall) Fields(s ...googleapi.Field) *ShippingsettingsGetsupportedholidaysCall {
  20448. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  20449. return c
  20450. }
  20451. // IfNoneMatch sets the optional parameter which makes the operation
  20452. // fail if the object's ETag matches the given value. This is useful for
  20453. // getting updates only after the object has changed since the last
  20454. // request. Use googleapi.IsNotModified to check whether the response
  20455. // error from Do is the result of In-None-Match.
  20456. func (c *ShippingsettingsGetsupportedholidaysCall) IfNoneMatch(entityTag string) *ShippingsettingsGetsupportedholidaysCall {
  20457. c.ifNoneMatch_ = entityTag
  20458. return c
  20459. }
  20460. // Context sets the context to be used in this call's Do method. Any
  20461. // pending HTTP request will be aborted if the provided context is
  20462. // canceled.
  20463. func (c *ShippingsettingsGetsupportedholidaysCall) Context(ctx context.Context) *ShippingsettingsGetsupportedholidaysCall {
  20464. c.ctx_ = ctx
  20465. return c
  20466. }
  20467. // Header returns an http.Header that can be modified by the caller to
  20468. // add HTTP headers to the request.
  20469. func (c *ShippingsettingsGetsupportedholidaysCall) Header() http.Header {
  20470. if c.header_ == nil {
  20471. c.header_ = make(http.Header)
  20472. }
  20473. return c.header_
  20474. }
  20475. func (c *ShippingsettingsGetsupportedholidaysCall) doRequest(alt string) (*http.Response, error) {
  20476. reqHeaders := make(http.Header)
  20477. for k, v := range c.header_ {
  20478. reqHeaders[k] = v
  20479. }
  20480. reqHeaders.Set("User-Agent", c.s.userAgent())
  20481. if c.ifNoneMatch_ != "" {
  20482. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  20483. }
  20484. var body io.Reader = nil
  20485. c.urlParams_.Set("alt", alt)
  20486. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/supportedHolidays")
  20487. urls += "?" + c.urlParams_.Encode()
  20488. req, _ := http.NewRequest("GET", urls, body)
  20489. req.Header = reqHeaders
  20490. googleapi.Expand(req.URL, map[string]string{
  20491. "merchantId": strconv.FormatUint(c.merchantId, 10),
  20492. })
  20493. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  20494. }
  20495. // Do executes the "content.shippingsettings.getsupportedholidays" call.
  20496. // Exactly one of *ShippingsettingsGetSupportedHolidaysResponse or error
  20497. // will be non-nil. Any non-2xx status code is an error. Response
  20498. // headers are in either
  20499. // *ShippingsettingsGetSupportedHolidaysResponse.ServerResponse.Header
  20500. // or (if a response was returned at all) in
  20501. // error.(*googleapi.Error).Header. Use googleapi.IsNotModified to check
  20502. // whether the returned error was because http.StatusNotModified was
  20503. // returned.
  20504. func (c *ShippingsettingsGetsupportedholidaysCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsGetSupportedHolidaysResponse, error) {
  20505. gensupport.SetOptions(c.urlParams_, opts...)
  20506. res, err := c.doRequest("json")
  20507. if res != nil && res.StatusCode == http.StatusNotModified {
  20508. if res.Body != nil {
  20509. res.Body.Close()
  20510. }
  20511. return nil, &googleapi.Error{
  20512. Code: res.StatusCode,
  20513. Header: res.Header,
  20514. }
  20515. }
  20516. if err != nil {
  20517. return nil, err
  20518. }
  20519. defer googleapi.CloseBody(res)
  20520. if err := googleapi.CheckResponse(res); err != nil {
  20521. return nil, err
  20522. }
  20523. ret := &ShippingsettingsGetSupportedHolidaysResponse{
  20524. ServerResponse: googleapi.ServerResponse{
  20525. Header: res.Header,
  20526. HTTPStatusCode: res.StatusCode,
  20527. },
  20528. }
  20529. target := &ret
  20530. if err := gensupport.DecodeResponse(target, res); err != nil {
  20531. return nil, err
  20532. }
  20533. return ret, nil
  20534. // {
  20535. // "description": "Retrieves supported holidays for an account.",
  20536. // "httpMethod": "GET",
  20537. // "id": "content.shippingsettings.getsupportedholidays",
  20538. // "parameterOrder": [
  20539. // "merchantId"
  20540. // ],
  20541. // "parameters": {
  20542. // "merchantId": {
  20543. // "description": "The ID of the account for which to retrieve the supported holidays.",
  20544. // "format": "uint64",
  20545. // "location": "path",
  20546. // "required": true,
  20547. // "type": "string"
  20548. // }
  20549. // },
  20550. // "path": "{merchantId}/supportedHolidays",
  20551. // "response": {
  20552. // "$ref": "ShippingsettingsGetSupportedHolidaysResponse"
  20553. // },
  20554. // "scopes": [
  20555. // "https://www.googleapis.com/auth/content"
  20556. // ]
  20557. // }
  20558. }
  20559. // method id "content.shippingsettings.list":
  20560. type ShippingsettingsListCall struct {
  20561. s *APIService
  20562. merchantId uint64
  20563. urlParams_ gensupport.URLParams
  20564. ifNoneMatch_ string
  20565. ctx_ context.Context
  20566. header_ http.Header
  20567. }
  20568. // List: Lists the shipping settings of the sub-accounts in your
  20569. // Merchant Center account.
  20570. func (r *ShippingsettingsService) List(merchantId uint64) *ShippingsettingsListCall {
  20571. c := &ShippingsettingsListCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  20572. c.merchantId = merchantId
  20573. return c
  20574. }
  20575. // MaxResults sets the optional parameter "maxResults": The maximum
  20576. // number of shipping settings to return in the response, used for
  20577. // paging.
  20578. func (c *ShippingsettingsListCall) MaxResults(maxResults int64) *ShippingsettingsListCall {
  20579. c.urlParams_.Set("maxResults", fmt.Sprint(maxResults))
  20580. return c
  20581. }
  20582. // PageToken sets the optional parameter "pageToken": The token returned
  20583. // by the previous request.
  20584. func (c *ShippingsettingsListCall) PageToken(pageToken string) *ShippingsettingsListCall {
  20585. c.urlParams_.Set("pageToken", pageToken)
  20586. return c
  20587. }
  20588. // Fields allows partial responses to be retrieved. See
  20589. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  20590. // for more information.
  20591. func (c *ShippingsettingsListCall) Fields(s ...googleapi.Field) *ShippingsettingsListCall {
  20592. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  20593. return c
  20594. }
  20595. // IfNoneMatch sets the optional parameter which makes the operation
  20596. // fail if the object's ETag matches the given value. This is useful for
  20597. // getting updates only after the object has changed since the last
  20598. // request. Use googleapi.IsNotModified to check whether the response
  20599. // error from Do is the result of In-None-Match.
  20600. func (c *ShippingsettingsListCall) IfNoneMatch(entityTag string) *ShippingsettingsListCall {
  20601. c.ifNoneMatch_ = entityTag
  20602. return c
  20603. }
  20604. // Context sets the context to be used in this call's Do method. Any
  20605. // pending HTTP request will be aborted if the provided context is
  20606. // canceled.
  20607. func (c *ShippingsettingsListCall) Context(ctx context.Context) *ShippingsettingsListCall {
  20608. c.ctx_ = ctx
  20609. return c
  20610. }
  20611. // Header returns an http.Header that can be modified by the caller to
  20612. // add HTTP headers to the request.
  20613. func (c *ShippingsettingsListCall) Header() http.Header {
  20614. if c.header_ == nil {
  20615. c.header_ = make(http.Header)
  20616. }
  20617. return c.header_
  20618. }
  20619. func (c *ShippingsettingsListCall) doRequest(alt string) (*http.Response, error) {
  20620. reqHeaders := make(http.Header)
  20621. for k, v := range c.header_ {
  20622. reqHeaders[k] = v
  20623. }
  20624. reqHeaders.Set("User-Agent", c.s.userAgent())
  20625. if c.ifNoneMatch_ != "" {
  20626. reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
  20627. }
  20628. var body io.Reader = nil
  20629. c.urlParams_.Set("alt", alt)
  20630. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings")
  20631. urls += "?" + c.urlParams_.Encode()
  20632. req, _ := http.NewRequest("GET", urls, body)
  20633. req.Header = reqHeaders
  20634. googleapi.Expand(req.URL, map[string]string{
  20635. "merchantId": strconv.FormatUint(c.merchantId, 10),
  20636. })
  20637. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  20638. }
  20639. // Do executes the "content.shippingsettings.list" call.
  20640. // Exactly one of *ShippingsettingsListResponse or error will be
  20641. // non-nil. Any non-2xx status code is an error. Response headers are in
  20642. // either *ShippingsettingsListResponse.ServerResponse.Header or (if a
  20643. // response was returned at all) in error.(*googleapi.Error).Header. Use
  20644. // googleapi.IsNotModified to check whether the returned error was
  20645. // because http.StatusNotModified was returned.
  20646. func (c *ShippingsettingsListCall) Do(opts ...googleapi.CallOption) (*ShippingsettingsListResponse, error) {
  20647. gensupport.SetOptions(c.urlParams_, opts...)
  20648. res, err := c.doRequest("json")
  20649. if res != nil && res.StatusCode == http.StatusNotModified {
  20650. if res.Body != nil {
  20651. res.Body.Close()
  20652. }
  20653. return nil, &googleapi.Error{
  20654. Code: res.StatusCode,
  20655. Header: res.Header,
  20656. }
  20657. }
  20658. if err != nil {
  20659. return nil, err
  20660. }
  20661. defer googleapi.CloseBody(res)
  20662. if err := googleapi.CheckResponse(res); err != nil {
  20663. return nil, err
  20664. }
  20665. ret := &ShippingsettingsListResponse{
  20666. ServerResponse: googleapi.ServerResponse{
  20667. Header: res.Header,
  20668. HTTPStatusCode: res.StatusCode,
  20669. },
  20670. }
  20671. target := &ret
  20672. if err := gensupport.DecodeResponse(target, res); err != nil {
  20673. return nil, err
  20674. }
  20675. return ret, nil
  20676. // {
  20677. // "description": "Lists the shipping settings of the sub-accounts in your Merchant Center account.",
  20678. // "httpMethod": "GET",
  20679. // "id": "content.shippingsettings.list",
  20680. // "parameterOrder": [
  20681. // "merchantId"
  20682. // ],
  20683. // "parameters": {
  20684. // "maxResults": {
  20685. // "description": "The maximum number of shipping settings to return in the response, used for paging.",
  20686. // "format": "uint32",
  20687. // "location": "query",
  20688. // "type": "integer"
  20689. // },
  20690. // "merchantId": {
  20691. // "description": "The ID of the managing account. This must be a multi-client account.",
  20692. // "format": "uint64",
  20693. // "location": "path",
  20694. // "required": true,
  20695. // "type": "string"
  20696. // },
  20697. // "pageToken": {
  20698. // "description": "The token returned by the previous request.",
  20699. // "location": "query",
  20700. // "type": "string"
  20701. // }
  20702. // },
  20703. // "path": "{merchantId}/shippingsettings",
  20704. // "response": {
  20705. // "$ref": "ShippingsettingsListResponse"
  20706. // },
  20707. // "scopes": [
  20708. // "https://www.googleapis.com/auth/content"
  20709. // ]
  20710. // }
  20711. }
  20712. // Pages invokes f for each page of results.
  20713. // A non-nil error returned from f will halt the iteration.
  20714. // The provided context supersedes any context provided to the Context method.
  20715. func (c *ShippingsettingsListCall) Pages(ctx context.Context, f func(*ShippingsettingsListResponse) error) error {
  20716. c.ctx_ = ctx
  20717. defer c.PageToken(c.urlParams_.Get("pageToken")) // reset paging to original point
  20718. for {
  20719. x, err := c.Do()
  20720. if err != nil {
  20721. return err
  20722. }
  20723. if err := f(x); err != nil {
  20724. return err
  20725. }
  20726. if x.NextPageToken == "" {
  20727. return nil
  20728. }
  20729. c.PageToken(x.NextPageToken)
  20730. }
  20731. }
  20732. // method id "content.shippingsettings.patch":
  20733. type ShippingsettingsPatchCall struct {
  20734. s *APIService
  20735. merchantId uint64
  20736. accountId uint64
  20737. shippingsettings *ShippingSettings
  20738. urlParams_ gensupport.URLParams
  20739. ctx_ context.Context
  20740. header_ http.Header
  20741. }
  20742. // Patch: Updates the shipping settings of the account. This method
  20743. // supports patch semantics.
  20744. func (r *ShippingsettingsService) Patch(merchantId uint64, accountId uint64, shippingsettings *ShippingSettings) *ShippingsettingsPatchCall {
  20745. c := &ShippingsettingsPatchCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  20746. c.merchantId = merchantId
  20747. c.accountId = accountId
  20748. c.shippingsettings = shippingsettings
  20749. return c
  20750. }
  20751. // DryRun sets the optional parameter "dryRun": Flag to run the request
  20752. // in dry-run mode.
  20753. func (c *ShippingsettingsPatchCall) DryRun(dryRun bool) *ShippingsettingsPatchCall {
  20754. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  20755. return c
  20756. }
  20757. // Fields allows partial responses to be retrieved. See
  20758. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  20759. // for more information.
  20760. func (c *ShippingsettingsPatchCall) Fields(s ...googleapi.Field) *ShippingsettingsPatchCall {
  20761. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  20762. return c
  20763. }
  20764. // Context sets the context to be used in this call's Do method. Any
  20765. // pending HTTP request will be aborted if the provided context is
  20766. // canceled.
  20767. func (c *ShippingsettingsPatchCall) Context(ctx context.Context) *ShippingsettingsPatchCall {
  20768. c.ctx_ = ctx
  20769. return c
  20770. }
  20771. // Header returns an http.Header that can be modified by the caller to
  20772. // add HTTP headers to the request.
  20773. func (c *ShippingsettingsPatchCall) Header() http.Header {
  20774. if c.header_ == nil {
  20775. c.header_ = make(http.Header)
  20776. }
  20777. return c.header_
  20778. }
  20779. func (c *ShippingsettingsPatchCall) doRequest(alt string) (*http.Response, error) {
  20780. reqHeaders := make(http.Header)
  20781. for k, v := range c.header_ {
  20782. reqHeaders[k] = v
  20783. }
  20784. reqHeaders.Set("User-Agent", c.s.userAgent())
  20785. var body io.Reader = nil
  20786. body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettings)
  20787. if err != nil {
  20788. return nil, err
  20789. }
  20790. reqHeaders.Set("Content-Type", "application/json")
  20791. c.urlParams_.Set("alt", alt)
  20792. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}")
  20793. urls += "?" + c.urlParams_.Encode()
  20794. req, _ := http.NewRequest("PATCH", urls, body)
  20795. req.Header = reqHeaders
  20796. googleapi.Expand(req.URL, map[string]string{
  20797. "merchantId": strconv.FormatUint(c.merchantId, 10),
  20798. "accountId": strconv.FormatUint(c.accountId, 10),
  20799. })
  20800. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  20801. }
  20802. // Do executes the "content.shippingsettings.patch" call.
  20803. // Exactly one of *ShippingSettings or error will be non-nil. Any
  20804. // non-2xx status code is an error. Response headers are in either
  20805. // *ShippingSettings.ServerResponse.Header or (if a response was
  20806. // returned at all) in error.(*googleapi.Error).Header. Use
  20807. // googleapi.IsNotModified to check whether the returned error was
  20808. // because http.StatusNotModified was returned.
  20809. func (c *ShippingsettingsPatchCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) {
  20810. gensupport.SetOptions(c.urlParams_, opts...)
  20811. res, err := c.doRequest("json")
  20812. if res != nil && res.StatusCode == http.StatusNotModified {
  20813. if res.Body != nil {
  20814. res.Body.Close()
  20815. }
  20816. return nil, &googleapi.Error{
  20817. Code: res.StatusCode,
  20818. Header: res.Header,
  20819. }
  20820. }
  20821. if err != nil {
  20822. return nil, err
  20823. }
  20824. defer googleapi.CloseBody(res)
  20825. if err := googleapi.CheckResponse(res); err != nil {
  20826. return nil, err
  20827. }
  20828. ret := &ShippingSettings{
  20829. ServerResponse: googleapi.ServerResponse{
  20830. Header: res.Header,
  20831. HTTPStatusCode: res.StatusCode,
  20832. },
  20833. }
  20834. target := &ret
  20835. if err := gensupport.DecodeResponse(target, res); err != nil {
  20836. return nil, err
  20837. }
  20838. return ret, nil
  20839. // {
  20840. // "description": "Updates the shipping settings of the account. This method supports patch semantics.",
  20841. // "httpMethod": "PATCH",
  20842. // "id": "content.shippingsettings.patch",
  20843. // "parameterOrder": [
  20844. // "merchantId",
  20845. // "accountId"
  20846. // ],
  20847. // "parameters": {
  20848. // "accountId": {
  20849. // "description": "The ID of the account for which to get/update shipping settings.",
  20850. // "format": "uint64",
  20851. // "location": "path",
  20852. // "required": true,
  20853. // "type": "string"
  20854. // },
  20855. // "dryRun": {
  20856. // "description": "Flag to run the request in dry-run mode.",
  20857. // "location": "query",
  20858. // "type": "boolean"
  20859. // },
  20860. // "merchantId": {
  20861. // "description": "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.",
  20862. // "format": "uint64",
  20863. // "location": "path",
  20864. // "required": true,
  20865. // "type": "string"
  20866. // }
  20867. // },
  20868. // "path": "{merchantId}/shippingsettings/{accountId}",
  20869. // "request": {
  20870. // "$ref": "ShippingSettings"
  20871. // },
  20872. // "response": {
  20873. // "$ref": "ShippingSettings"
  20874. // },
  20875. // "scopes": [
  20876. // "https://www.googleapis.com/auth/content"
  20877. // ]
  20878. // }
  20879. }
  20880. // method id "content.shippingsettings.update":
  20881. type ShippingsettingsUpdateCall struct {
  20882. s *APIService
  20883. merchantId uint64
  20884. accountId uint64
  20885. shippingsettings *ShippingSettings
  20886. urlParams_ gensupport.URLParams
  20887. ctx_ context.Context
  20888. header_ http.Header
  20889. }
  20890. // Update: Updates the shipping settings of the account.
  20891. func (r *ShippingsettingsService) Update(merchantId uint64, accountId uint64, shippingsettings *ShippingSettings) *ShippingsettingsUpdateCall {
  20892. c := &ShippingsettingsUpdateCall{s: r.s, urlParams_: make(gensupport.URLParams)}
  20893. c.merchantId = merchantId
  20894. c.accountId = accountId
  20895. c.shippingsettings = shippingsettings
  20896. return c
  20897. }
  20898. // DryRun sets the optional parameter "dryRun": Flag to run the request
  20899. // in dry-run mode.
  20900. func (c *ShippingsettingsUpdateCall) DryRun(dryRun bool) *ShippingsettingsUpdateCall {
  20901. c.urlParams_.Set("dryRun", fmt.Sprint(dryRun))
  20902. return c
  20903. }
  20904. // Fields allows partial responses to be retrieved. See
  20905. // https://developers.google.com/gdata/docs/2.0/basics#PartialResponse
  20906. // for more information.
  20907. func (c *ShippingsettingsUpdateCall) Fields(s ...googleapi.Field) *ShippingsettingsUpdateCall {
  20908. c.urlParams_.Set("fields", googleapi.CombineFields(s))
  20909. return c
  20910. }
  20911. // Context sets the context to be used in this call's Do method. Any
  20912. // pending HTTP request will be aborted if the provided context is
  20913. // canceled.
  20914. func (c *ShippingsettingsUpdateCall) Context(ctx context.Context) *ShippingsettingsUpdateCall {
  20915. c.ctx_ = ctx
  20916. return c
  20917. }
  20918. // Header returns an http.Header that can be modified by the caller to
  20919. // add HTTP headers to the request.
  20920. func (c *ShippingsettingsUpdateCall) Header() http.Header {
  20921. if c.header_ == nil {
  20922. c.header_ = make(http.Header)
  20923. }
  20924. return c.header_
  20925. }
  20926. func (c *ShippingsettingsUpdateCall) doRequest(alt string) (*http.Response, error) {
  20927. reqHeaders := make(http.Header)
  20928. for k, v := range c.header_ {
  20929. reqHeaders[k] = v
  20930. }
  20931. reqHeaders.Set("User-Agent", c.s.userAgent())
  20932. var body io.Reader = nil
  20933. body, err := googleapi.WithoutDataWrapper.JSONReader(c.shippingsettings)
  20934. if err != nil {
  20935. return nil, err
  20936. }
  20937. reqHeaders.Set("Content-Type", "application/json")
  20938. c.urlParams_.Set("alt", alt)
  20939. urls := googleapi.ResolveRelative(c.s.BasePath, "{merchantId}/shippingsettings/{accountId}")
  20940. urls += "?" + c.urlParams_.Encode()
  20941. req, _ := http.NewRequest("PUT", urls, body)
  20942. req.Header = reqHeaders
  20943. googleapi.Expand(req.URL, map[string]string{
  20944. "merchantId": strconv.FormatUint(c.merchantId, 10),
  20945. "accountId": strconv.FormatUint(c.accountId, 10),
  20946. })
  20947. return gensupport.SendRequest(c.ctx_, c.s.client, req)
  20948. }
  20949. // Do executes the "content.shippingsettings.update" call.
  20950. // Exactly one of *ShippingSettings or error will be non-nil. Any
  20951. // non-2xx status code is an error. Response headers are in either
  20952. // *ShippingSettings.ServerResponse.Header or (if a response was
  20953. // returned at all) in error.(*googleapi.Error).Header. Use
  20954. // googleapi.IsNotModified to check whether the returned error was
  20955. // because http.StatusNotModified was returned.
  20956. func (c *ShippingsettingsUpdateCall) Do(opts ...googleapi.CallOption) (*ShippingSettings, error) {
  20957. gensupport.SetOptions(c.urlParams_, opts...)
  20958. res, err := c.doRequest("json")
  20959. if res != nil && res.StatusCode == http.StatusNotModified {
  20960. if res.Body != nil {
  20961. res.Body.Close()
  20962. }
  20963. return nil, &googleapi.Error{
  20964. Code: res.StatusCode,
  20965. Header: res.Header,
  20966. }
  20967. }
  20968. if err != nil {
  20969. return nil, err
  20970. }
  20971. defer googleapi.CloseBody(res)
  20972. if err := googleapi.CheckResponse(res); err != nil {
  20973. return nil, err
  20974. }
  20975. ret := &ShippingSettings{
  20976. ServerResponse: googleapi.ServerResponse{
  20977. Header: res.Header,
  20978. HTTPStatusCode: res.StatusCode,
  20979. },
  20980. }
  20981. target := &ret
  20982. if err := gensupport.DecodeResponse(target, res); err != nil {
  20983. return nil, err
  20984. }
  20985. return ret, nil
  20986. // {
  20987. // "description": "Updates the shipping settings of the account.",
  20988. // "httpMethod": "PUT",
  20989. // "id": "content.shippingsettings.update",
  20990. // "parameterOrder": [
  20991. // "merchantId",
  20992. // "accountId"
  20993. // ],
  20994. // "parameters": {
  20995. // "accountId": {
  20996. // "description": "The ID of the account for which to get/update shipping settings.",
  20997. // "format": "uint64",
  20998. // "location": "path",
  20999. // "required": true,
  21000. // "type": "string"
  21001. // },
  21002. // "dryRun": {
  21003. // "description": "Flag to run the request in dry-run mode.",
  21004. // "location": "query",
  21005. // "type": "boolean"
  21006. // },
  21007. // "merchantId": {
  21008. // "description": "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.",
  21009. // "format": "uint64",
  21010. // "location": "path",
  21011. // "required": true,
  21012. // "type": "string"
  21013. // }
  21014. // },
  21015. // "path": "{merchantId}/shippingsettings/{accountId}",
  21016. // "request": {
  21017. // "$ref": "ShippingSettings"
  21018. // },
  21019. // "response": {
  21020. // "$ref": "ShippingSettings"
  21021. // },
  21022. // "scopes": [
  21023. // "https://www.googleapis.com/auth/content"
  21024. // ]
  21025. // }
  21026. }