Class: Stigg::Models::V1::ContractCreateParams::Subscription::NewSubscription::AppliedCoupon::Discount

Inherits:
Internal::Type::BaseModel
  • Object
show all
Defined in:
lib/stigg/models/v1/contract_create_params.rb,
sig/stigg/models/v1/contract_create_params.rbs

Overview

See Also:

  • Stigg::Models::V1::ContractCreateParams::Subscription::NewSubscription::AppliedCoupon#discount

Defined Under Namespace

Classes: AmountsOff

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#initializeObject



411
# File 'sig/stigg/models/v1/contract_create_params.rbs', line 411

def initialize: (

Instance Attribute Details

#amounts_offArray<Stigg::Models::V1::ContractCreateParams::Subscription::NewSubscription::AppliedCoupon::Discount::AmountsOff>?

Fixed amounts off by currency

Parameters:

  • value (::Array[Stigg::V1::ContractCreateParams::Subscription::NewSubscription::AppliedCoupon::Discount::AmountsOff], nil)

Returns:



465
466
467
468
469
470
# File 'lib/stigg/models/v1/contract_create_params.rb', line 465

optional :amounts_off,
-> {
  Stigg::Internal::Type::ArrayOf[Stigg::V1::ContractCreateParams::Subscription::NewSubscription::AppliedCoupon::Discount::AmountsOff]
},
api_name: :amountsOff,
nil?: true

#descriptionString?

Ad-hoc discount

Parameters:

  • (String)

Returns:

  • (String, nil)


476
# File 'lib/stigg/models/v1/contract_create_params.rb', line 476

optional :description, String

#duration_in_monthsFloat?

Duration in months

Parameters:

  • (Float)

Returns:

  • (Float, nil)


482
# File 'lib/stigg/models/v1/contract_create_params.rb', line 482

optional :duration_in_months, Float, api_name: :durationInMonths

#nameString?

Discount name

Parameters:

  • (String)

Returns:

  • (String, nil)


488
# File 'lib/stigg/models/v1/contract_create_params.rb', line 488

optional :name, String

#percent_offFloat?

Percentage discount

Parameters:

  • (Float)

Returns:

  • (Float, nil)


494
# File 'lib/stigg/models/v1/contract_create_params.rb', line 494

optional :percent_off, Float, api_name: :percentOff

Instance Method Details

#to_hash{

Returns:

  • ({)


419
# File 'sig/stigg/models/v1/contract_create_params.rbs', line 419

def to_hash: -> {