Class: Orb::Models::CouponCreateParams
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::CouponCreateParams
- Extended by:
- Internal::Type::RequestParameters::Converter
- Includes:
- Internal::Type::RequestParameters
- Defined in:
- lib/orb/models/coupon_create_params.rb,
sig/orb/models/coupon_create_params.rbs
Overview
Defined Under Namespace
Modules: Discount
Instance Attribute Summary collapse
- #discount ⇒ Orb::Models::CouponCreateParams::Discount::Percentage, Orb::Models::CouponCreateParams::Discount::Amount
-
#duration_in_months ⇒ Integer?
This allows for a coupon's discount to apply for a limited time (determined in months); a
nullvalue here means "unlimited time". -
#max_redemptions ⇒ Integer?
The maximum number of redemptions allowed for this coupon before it is exhausted;
nullhere means "unlimited". -
#redemption_code ⇒ String
This string can be used to redeem this coupon for a given subscription.
Attributes included from Internal::Type::RequestParameters
Instance Method Summary collapse
- #initialize ⇒ Object constructor
- #to_hash ⇒ {
Methods included from Internal::Type::RequestParameters::Converter
Methods included from Internal::Type::RequestParameters
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, 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
#initialize ⇒ Object
24 |
# File 'sig/orb/models/coupon_create_params.rbs', line 24
def initialize: (
|
Instance Attribute Details
#discount ⇒ Orb::Models::CouponCreateParams::Discount::Percentage, Orb::Models::CouponCreateParams::Discount::Amount
13 |
# File 'lib/orb/models/coupon_create_params.rb', line 13 required :discount, union: -> { Orb::CouponCreateParams::Discount } |
#duration_in_months ⇒ Integer?
This allows for a coupon's discount to apply for a limited time (determined in
months); a null value here means "unlimited time".
26 |
# File 'lib/orb/models/coupon_create_params.rb', line 26 optional :duration_in_months, Integer, nil?: true |
#max_redemptions ⇒ Integer?
The maximum number of redemptions allowed for this coupon before it is
exhausted;null here means "unlimited".
33 |
# File 'lib/orb/models/coupon_create_params.rb', line 33 optional :max_redemptions, Integer, nil?: true |
#redemption_code ⇒ String
This string can be used to redeem this coupon for a given subscription.
19 |
# File 'lib/orb/models/coupon_create_params.rb', line 19 required :redemption_code, String |
Instance Method Details
#to_hash ⇒ {
32 |
# File 'sig/orb/models/coupon_create_params.rbs', line 32
def to_hash: -> {
|