Google Cloud Commerce Producer V1beta Client - Class PrivateOffer (0.2.0)

Reference documentation and code samples for the Google Cloud Commerce Producer V1beta Client class PrivateOffer.

Message describing PrivateOffer resource.

Note on OPTIONAL fields: To facilitate saving incomplete draft offers, most fields are categorized as OPTIONAL irrespective of whether they are necessary for a private offer to be valid. Many fields labeled OPTIONAL must be set to publish the offer.

Generated from protobuf message google.cloud.commerceproducer.v1beta.PrivateOffer

Namespace

Google \ Cloud \ CommerceProducer \ V1beta

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ single_product_offer PrivateOffer\SingleProductOffer

Optional. Configurations for the offer that is associated with a single product.

↳ name string

Identifier. Name of the resource.

↳ state int

Output only. The state of the private offer.

↳ publish_requirement_google_review PrivateOffer\PublishRequirementGoogleReview

Output only. Information about the Google review process. Present only when the offer is determined to require review by Google.

↳ create_time Google\Protobuf\Timestamp

Output only. The creation time.

↳ update_time Google\Protobuf\Timestamp

Output only. The last update time.

↳ publish_time Google\Protobuf\Timestamp

Output only. The time the offer transitioned to PUBLISHED state.

↳ accept_time Google\Protobuf\Timestamp

Output only. The time the offer transitioned to ACCEPTED state.

↳ cancel_time Google\Protobuf\Timestamp

Output only. The time the offer transited to CANCELLED state.

↳ end_time Google\Protobuf\Timestamp

Output only. The time when the offer ended. This can only be set for offers with ENDED state.

↳ cancellation_note string

Output only. Internal note supplied when the offer was cancelled. Present only for cancelled offers and only if a note was supplied.

↳ reseller_contact PrivateOffer\ResellerContact

Output only. Information about the reseller contact. Present only for offers created by a reseller.

↳ internal_note string

Optional. Unstructured text content that is not visible to the customer. Intended to be used by partners for storing notes about the private offer. Maximum length: 1500 characters.

↳ offer_deal_type int

Optional. The type of the deal transacted with the offer. The deal type is not visible to customers. Must be present to publish the offer.

↳ title string

Optional. A title that describes the offer and helps your customers identify it. This title will be visible to the customer. Maximum length: 256 characters. Must be present to publish the offer.

↳ customer_note string

Optional. Unstructured text content that is visible to the customer. Maximum length: 120 characters.

↳ partner_contact PrivateOffer\PartnerContact

Optional. Information about the partner contact. Must be provided when publishing the offer.

↳ customer PrivateOffer\Customer

Optional. Information identifying the intended recipient of the offer. Must be provided when publishing the offer.

↳ accept_deadline_time Google\Type\DateTime

Optional. Deadline for acceptance of published offers. A published offer not accepted by this time will expire. Only day boundaries in the America/Los_Angeles time zone are supported. Must be present to publish the offer. When publishing an offer the deadline must be set to a time in the future not more than 3 months from the time of publishing. For example, if the offer is published on 03/05 at 1PM, then the deadline must be at or before 06/05 12AM America/Los_Angeles time. The deadline must also be: * * Before or equal to the scheduled start time of this offer (if term.scheduled_start_time is set and the term's start policy is SCHEDULED_START_TIME). * * Before or equal to the scheduled end time of this offer, if term.scheduled_end_time is set and the term's end policy is SCHEDULED_END_TIME. * * Before or equal to the upcoming installment start times on this offer. * * Before or equal to the amended offer's end time, if the offer amends another private or standard offer. * * Before or equal to the start time of the next pending installment of the amended offer, if amending a private offer with custom installments. For example, if the amended offer has installments on 01/01, 02/01, 03/01, 04/01, and today is 02/15, then this offer's accept_deadline_time must be at or before 03/01. In addition, if the offer amends another private offer, but there is already an accepted upcoming amendment against that private offer, then this deadline must be before or equal to the start time of the accepted upcoming offer. For example, today is 02/15, and this offer (offer C) amends private offer A, and private offer B has already been accepted which also amends private offer A. Private offer B has a start time of 03/01. Then this deadline must be at or before 03/01. Otherwise, on 03/01, private offer B would take effect, superseding offer A. This would mean offer C is no longer amending the currently active offer (Offer A), which is required for valid amendments. Once the offer is published, this field is still updatable to extend the deadline of the offer. However, the extension is still limited to be at most 3 months from the time of publishing.

↳ term PrivateOffer\Term

Optional. Configuration for the offer term. Must be set when publishing the offer.

getSingleProductOffer

Optional. Configurations for the offer that is associated with a single product.

Returns
Type Description
PrivateOffer\SingleProductOffer|null

hasSingleProductOffer

setSingleProductOffer

Optional. Configurations for the offer that is associated with a single product.

Parameter
Name Description
var PrivateOffer\SingleProductOffer
Returns
Type Description
$this

getName

Identifier. Name of the resource.

Returns
Type Description
string

setName

Identifier. Name of the resource.

Parameter
Name Description
var string
Returns
Type Description
$this

getState

Output only. The state of the private offer.

Returns
Type Description
int Enum of type State.

setState

Output only. The state of the private offer.

Parameter
Name Description
var int

Enum of type State.

Returns
Type Description
$this

getPublishRequirementGoogleReview

Output only. Information about the Google review process.

Present only when the offer is determined to require review by Google.

Returns
Type Description
PrivateOffer\PublishRequirementGoogleReview|null

hasPublishRequirementGoogleReview

clearPublishRequirementGoogleReview

setPublishRequirementGoogleReview

Output only. Information about the Google review process.

Present only when the offer is determined to require review by Google.

Parameter
Name Description
var PrivateOffer\PublishRequirementGoogleReview
Returns
Type Description
$this

getCreateTime

Output only. The creation time.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. The creation time.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getUpdateTime

Output only. The last update time.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasUpdateTime

clearUpdateTime

setUpdateTime

Output only. The last update time.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getPublishTime

Output only. The time the offer transitioned to PUBLISHED state.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasPublishTime

clearPublishTime

setPublishTime

Output only. The time the offer transitioned to PUBLISHED state.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getAcceptTime

Output only. The time the offer transitioned to ACCEPTED state.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasAcceptTime

clearAcceptTime

setAcceptTime

Output only. The time the offer transitioned to ACCEPTED state.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getCancelTime

Output only. The time the offer transited to CANCELLED state.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCancelTime

clearCancelTime

setCancelTime

Output only. The time the offer transited to CANCELLED state.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getEndTime

Output only. The time when the offer ended. This can only be set for offers with ENDED state.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasEndTime

clearEndTime

setEndTime

Output only. The time when the offer ended. This can only be set for offers with ENDED state.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getCancellationNote

Output only. Internal note supplied when the offer was cancelled.

Present only for cancelled offers and only if a note was supplied.

Returns
Type Description
string

setCancellationNote

Output only. Internal note supplied when the offer was cancelled.

Present only for cancelled offers and only if a note was supplied.

Parameter
Name Description
var string
Returns
Type Description
$this

getResellerContact

Output only. Information about the reseller contact.

Present only for offers created by a reseller.

Returns
Type Description
PrivateOffer\ResellerContact|null

hasResellerContact

clearResellerContact

setResellerContact

Output only. Information about the reseller contact.

Present only for offers created by a reseller.

Parameter
Name Description
var PrivateOffer\ResellerContact
Returns
Type Description
$this

getInternalNote

Optional. Unstructured text content that is not visible to the customer.

Intended to be used by partners for storing notes about the private offer. Maximum length: 1500 characters.

Returns
Type Description
string

setInternalNote

Optional. Unstructured text content that is not visible to the customer.

Intended to be used by partners for storing notes about the private offer. Maximum length: 1500 characters.

Parameter
Name Description
var string
Returns
Type Description
$this

getOfferDealType

Optional. The type of the deal transacted with the offer.

The deal type is not visible to customers. Must be present to publish the offer.

Returns
Type Description
int Enum of type OfferDealType.

setOfferDealType

Optional. The type of the deal transacted with the offer.

The deal type is not visible to customers. Must be present to publish the offer.

Parameter
Name Description
var int

Enum of type OfferDealType.

Returns
Type Description
$this

getTitle

Optional. A title that describes the offer and helps your customers identify it. This title will be visible to the customer. Maximum length: 256 characters. Must be present to publish the offer.

Returns
Type Description
string

setTitle

Optional. A title that describes the offer and helps your customers identify it. This title will be visible to the customer. Maximum length: 256 characters. Must be present to publish the offer.

Parameter
Name Description
var string
Returns
Type Description
$this

getCustomerNote

Optional. Unstructured text content that is visible to the customer.

Maximum length: 120 characters.

Returns
Type Description
string

setCustomerNote

Optional. Unstructured text content that is visible to the customer.

Maximum length: 120 characters.

Parameter
Name Description
var string
Returns
Type Description
$this

getPartnerContact

Optional. Information about the partner contact.

Must be provided when publishing the offer.

Returns
Type Description
PrivateOffer\PartnerContact|null

hasPartnerContact

clearPartnerContact

setPartnerContact

Optional. Information about the partner contact.

Must be provided when publishing the offer.

Parameter
Name Description
var PrivateOffer\PartnerContact
Returns
Type Description
$this

getCustomer

Optional. Information identifying the intended recipient of the offer.

Must be provided when publishing the offer.

Returns
Type Description
PrivateOffer\Customer|null

hasCustomer

clearCustomer

setCustomer

Optional. Information identifying the intended recipient of the offer.

Must be provided when publishing the offer.

Parameter
Name Description
var PrivateOffer\Customer
Returns
Type Description
$this

getAcceptDeadlineTime

Optional. Deadline for acceptance of published offers.

A published offer not accepted by this time will expire. Only day boundaries in the America/Los_Angeles time zone are supported. Must be present to publish the offer. When publishing an offer the deadline must be set to a time in the future not more than 3 months from the time of publishing. For example, if the offer is published on 03/05 at 1PM, then the deadline must be at or before 06/05 12AM America/Los_Angeles time. The deadline must also be:

  • Before or equal to the scheduled start time of this offer (if term.scheduled_start_time is set and the term's start policy is SCHEDULED_START_TIME).
  • Before or equal to the scheduled end time of this offer, if term.scheduled_end_time is set and the term's end policy is SCHEDULED_END_TIME.
  • Before or equal to the upcoming installment start times on this offer.
  • Before or equal to the amended offer's end time, if the offer amends another private or standard offer.
  • Before or equal to the start time of the next pending installment of the amended offer, if amending a private offer with custom installments. For example, if the amended offer has installments on 01/01, 02/01, 03/01, 04/01, and today is 02/15, then this offer's accept_deadline_time must be at or before 03/01. In addition, if the offer amends another private offer, but there is already an accepted upcoming amendment against that private offer, then this deadline must be before or equal to the start time of the accepted upcoming offer. For example, today is 02/15, and this offer (offer C) amends private offer A, and private offer B has already been accepted which also amends private offer A. Private offer B has a start time of 03/01. Then this deadline must be at or before 03/01. Otherwise, on 03/01, private offer B would take effect, superseding offer A. This would mean offer C is no longer amending the currently active offer (Offer A), which is required for valid amendments. Once the offer is published, this field is still updatable to extend the deadline of the offer. However, the extension is still limited to be at most 3 months from the time of publishing.
Returns
Type Description
Google\Type\DateTime|null

hasAcceptDeadlineTime

clearAcceptDeadlineTime

setAcceptDeadlineTime

Optional. Deadline for acceptance of published offers.

A published offer not accepted by this time will expire. Only day boundaries in the America/Los_Angeles time zone are supported. Must be present to publish the offer. When publishing an offer the deadline must be set to a time in the future not more than 3 months from the time of publishing. For example, if the offer is published on 03/05 at 1PM, then the deadline must be at or before 06/05 12AM America/Los_Angeles time. The deadline must also be:

  • Before or equal to the scheduled start time of this offer (if term.scheduled_start_time is set and the term's start policy is SCHEDULED_START_TIME).
  • Before or equal to the scheduled end time of this offer, if term.scheduled_end_time is set and the term's end policy is SCHEDULED_END_TIME.
  • Before or equal to the upcoming installment start times on this offer.
  • Before or equal to the amended offer's end time, if the offer amends another private or standard offer.
  • Before or equal to the start time of the next pending installment of the amended offer, if amending a private offer with custom installments. For example, if the amended offer has installments on 01/01, 02/01, 03/01, 04/01, and today is 02/15, then this offer's accept_deadline_time must be at or before 03/01. In addition, if the offer amends another private offer, but there is already an accepted upcoming amendment against that private offer, then this deadline must be before or equal to the start time of the accepted upcoming offer. For example, today is 02/15, and this offer (offer C) amends private offer A, and private offer B has already been accepted which also amends private offer A. Private offer B has a start time of 03/01. Then this deadline must be at or before 03/01. Otherwise, on 03/01, private offer B would take effect, superseding offer A. This would mean offer C is no longer amending the currently active offer (Offer A), which is required for valid amendments. Once the offer is published, this field is still updatable to extend the deadline of the offer. However, the extension is still limited to be at most 3 months from the time of publishing.
Parameter
Name Description
var Google\Type\DateTime
Returns
Type Description
$this

getTerm

Optional. Configuration for the offer term.

Must be set when publishing the offer.

Returns
Type Description
PrivateOffer\Term|null

hasTerm

clearTerm

setTerm

Optional. Configuration for the offer term.

Must be set when publishing the offer.

Parameter
Name Description
var PrivateOffer\Term
Returns
Type Description
$this

getContent

Returns
Type Description
string