Cloud Commerce Producer V1BETA API - Class Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::Commitment (v0.1.0)

Reference documentation and code samples for the Cloud Commerce Producer V1BETA API class Google::Cloud::CommerceProducer::V1beta::PrivateOffer::SingleProductOffer::PriceModel::Commitment.

The price configurations for the commitment based subscriptions.

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#additional_credit

def additional_credit() -> ::Google::Type::Money
Returns
  • (::Google::Type::Money) — Optional. Additional credit granted to the customer. Additional credits are only supported for custom interval offers. Equivalent behavior can be achieved for standard interval offers by varying the commitment_amount and discount_percent.

    Value cannot be negative. The currency must be "USD" and precision is limited to cents. The maximum allowed value is 1,000,000 USD.

#additional_credit=

def additional_credit=(value) -> ::Google::Type::Money
Parameter
  • value (::Google::Type::Money) — Optional. Additional credit granted to the customer. Additional credits are only supported for custom interval offers. Equivalent behavior can be achieved for standard interval offers by varying the commitment_amount and discount_percent.

    Value cannot be negative. The currency must be "USD" and precision is limited to cents. The maximum allowed value is 1,000,000 USD.

Returns
  • (::Google::Type::Money) — Optional. Additional credit granted to the customer. Additional credits are only supported for custom interval offers. Equivalent behavior can be achieved for standard interval offers by varying the commitment_amount and discount_percent.

    Value cannot be negative. The currency must be "USD" and precision is limited to cents. The maximum allowed value is 1,000,000 USD.

#commitment_amount

def commitment_amount() -> ::Google::Type::Money
Returns
  • (::Google::Type::Money) — Optional. The commitment balance that the customer will receive. Value cannot be negative. The currency must be "USD" and precision is limited to cents. Must be present to publish the offer, if the parent message is set. The maximum allowed value is 1,000,000,000 USD.

    If the current offer amends a private offer where the term has not ended, and if the field single_product_offer.standard_interval_price.price_model.commitment.commitment_amount is set on both the current offer and the amended private offer, then the commitment amount must be equal or higher on the current offer, compared to the amended private offer.

#commitment_amount=

def commitment_amount=(value) -> ::Google::Type::Money
Parameter
  • value (::Google::Type::Money) — Optional. The commitment balance that the customer will receive. Value cannot be negative. The currency must be "USD" and precision is limited to cents. Must be present to publish the offer, if the parent message is set. The maximum allowed value is 1,000,000,000 USD.

    If the current offer amends a private offer where the term has not ended, and if the field single_product_offer.standard_interval_price.price_model.commitment.commitment_amount is set on both the current offer and the amended private offer, then the commitment amount must be equal or higher on the current offer, compared to the amended private offer.

Returns
  • (::Google::Type::Money) — Optional. The commitment balance that the customer will receive. Value cannot be negative. The currency must be "USD" and precision is limited to cents. Must be present to publish the offer, if the parent message is set. The maximum allowed value is 1,000,000,000 USD.

    If the current offer amends a private offer where the term has not ended, and if the field single_product_offer.standard_interval_price.price_model.commitment.commitment_amount is set on both the current offer and the amended private offer, then the commitment amount must be equal or higher on the current offer, compared to the amended private offer.

#discard_previous_credit_balance

def discard_previous_credit_balance() -> ::Boolean
Returns
  • (::Boolean) — Optional. Whether to discard the previous credit balance when the associated installment starts. If not set, the previous credit balance will be rolled over to the current installment.

    If there are no previous installments, then the value of this field will not matter - since it has no effect when no credits exist.

#discard_previous_credit_balance=

def discard_previous_credit_balance=(value) -> ::Boolean
Parameter
  • value (::Boolean) — Optional. Whether to discard the previous credit balance when the associated installment starts. If not set, the previous credit balance will be rolled over to the current installment.

    If there are no previous installments, then the value of this field will not matter - since it has no effect when no credits exist.

Returns
  • (::Boolean) — Optional. Whether to discard the previous credit balance when the associated installment starts. If not set, the previous credit balance will be rolled over to the current installment.

    If there are no previous installments, then the value of this field will not matter - since it has no effect when no credits exist.

#discount_percent

def discount_percent() -> ::Google::Type::Decimal
Returns
  • (::Google::Type::Decimal) — Optional. The discount percent on commitment_amount.

    For example, 10 means a discount of 10%. If the original commitment_amount is $100 then the discounted amount will be $90. The customer is charged $90 and receives $100 in credits.

    All reported usage will be charged at the standard price. If this field is set, the price_model.usage must be unset. A private offer can apply a discount to all usage or to a usage commitment, but not both.

    Must be between 0 and 100 inclusive, with precision up to 2 decimal places. If this field is set, then the allowed pattern for 'value' is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$. Examples of valid values: "0", "100.0", "12.34", "40.0". Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".

    Must be present to publish the offer.

#discount_percent=

def discount_percent=(value) -> ::Google::Type::Decimal
Parameter
  • value (::Google::Type::Decimal) — Optional. The discount percent on commitment_amount.

    For example, 10 means a discount of 10%. If the original commitment_amount is $100 then the discounted amount will be $90. The customer is charged $90 and receives $100 in credits.

    All reported usage will be charged at the standard price. If this field is set, the price_model.usage must be unset. A private offer can apply a discount to all usage or to a usage commitment, but not both.

    Must be between 0 and 100 inclusive, with precision up to 2 decimal places. If this field is set, then the allowed pattern for 'value' is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$. Examples of valid values: "0", "100.0", "12.34", "40.0". Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".

    Must be present to publish the offer.

Returns
  • (::Google::Type::Decimal) — Optional. The discount percent on commitment_amount.

    For example, 10 means a discount of 10%. If the original commitment_amount is $100 then the discounted amount will be $90. The customer is charged $90 and receives $100 in credits.

    All reported usage will be charged at the standard price. If this field is set, the price_model.usage must be unset. A private offer can apply a discount to all usage or to a usage commitment, but not both.

    Must be between 0 and 100 inclusive, with precision up to 2 decimal places. If this field is set, then the allowed pattern for 'value' is ^([0-9]{1,2}(\\.\\d{1,2})?|100(\\.0{1,2})?)$. Examples of valid values: "0", "100.0", "12.34", "40.0". Example of invalid values: ".3", "-1", "100.1", "12.345", "+12", "".

    Must be present to publish the offer.