---
title: "DiscountAutomaticBxgy"
description: "自动折扣，为客户提供买 X，送 Y (BXGY) 折扣。"
doc_type: graphql
doc_category: adminGraphQL
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-automatic-bxgy'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-automatic-bxgy.md'
---
# DiscountAutomaticBxgy

自动折扣，为客户提供买 X，送 Y (BXGY) 折扣。

- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** GraphQL
- **Operation Type:** Object

## Type Signature

`DiscountAutomaticBxgy`

## Fields

* `asyncUsageCount`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/int.md)

  折扣已使用的次数。该值是异步更新的，可能与实际使用计数不同

* `combinesWith`

  [DiscountCombinesWith](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-combines-with.md)

  确定折扣可以与哪些折扣级别结合

* `createdAt`

  [Date](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/date.md)

  创建折扣的日期和时间

* `customerBuys`

  [DiscountCustomerBuys](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-customer-buys.md)

  符合折扣资格的商品以及客户必须购买的每件商品的数量

* `customerGets`

  [DiscountCustomerGets](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/objects/discount-customer-gets.md)

  订单中符合条件的商品、每件商品的数量以及折扣总价值

* `discountClass`

  [MerchandiseDiscountClass](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/enums/merchandise-discount-class.md)

  用于合并目的的折扣类别

* `endsAt`

  [Date](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/date.md)

  折扣结束的日期和时间。对于无限期折扣，请使用 null。

* `startsAt`

  [Date](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/date.md)

  折扣开始的日期和时间

* `status`

  [DiscountStatus](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/discounts-and-marketing/enums/discount-status.md)

  折扣的状态

* `summary`

  [String](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/string.md)

  折扣的详细摘要

* `title`

  [String](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/string.md)

  折扣的标题

* `updatedAt`

  [Date](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/date.md)

  折扣更新的日期和时间

* `usesPerOrderLimit`

  [Int](https://developer.shopline.com/zh-hans-cn/docs/admin-graph-ql-api/common/scalars/int.md)

  折扣可应用于订单的最大次数

## Schema Definition

```graphql
type DiscountAutomaticBxgy { 
	asyncUsageCount: Int
	combinesWith: DiscountCombinesWith
	createdAt: Date
	customerBuys: DiscountCustomerBuys
	customerGets: DiscountCustomerGets
	discountClass: MerchandiseDiscountClass
	endsAt: Date
	startsAt: Date
	status: DiscountStatus
	summary: String
	title: String
	updatedAt: Date
	usesPerOrderLimit: Int 
}
```

## Error Handling

关于更多通用错误码说明，参考：[状态码和错误码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/graph-ql-admin-api/overview.md#status-and-error-codes)。

