Class: WhopSDK::Models::Payment::PromoCode

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/payment.rb

Overview

See Also:

Instance Attribute Summary collapse

Method Summary

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, #initialize, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

This class inherits a constructor from WhopSDK::Internal::Type::BaseModel

Instance Attribute Details

#amount_offFloat

The amount off (% or flat amount) for the promo.

Returns:

  • (Float)


552
# File 'lib/whop_sdk/models/payment.rb', line 552

required :amount_off, Float

#base_currencySymbol, WhopSDK::Models::Currency

The monetary currency of the promo code.

Returns:



558
# File 'lib/whop_sdk/models/payment.rb', line 558

required :base_currency, enum: -> { WhopSDK::Currency }

#codeString?

The specific code used to apply the promo at checkout.

Returns:

  • (String, nil)


564
# File 'lib/whop_sdk/models/payment.rb', line 564

required :code, String, nil?: true

#idString

The ID of the promo.

Returns:

  • (String)


546
# File 'lib/whop_sdk/models/payment.rb', line 546

required :id, String

#number_of_intervalsInteger?

The number of months the promo is applied for.

Returns:

  • (Integer, nil)


570
# File 'lib/whop_sdk/models/payment.rb', line 570

required :number_of_intervals, Integer, nil?: true

#promo_typeSymbol, WhopSDK::Models::PromoType

The type (% or flat amount) of the promo.

Returns:



576
# File 'lib/whop_sdk/models/payment.rb', line 576

required :promo_type, enum: -> { WhopSDK::PromoType }