Class: Stigg::Models::V1::PlanListChargesResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/stigg/models/v1/plan_list_charges_response.rb

Overview

Defined Under Namespace

Modules: BillingCadence, BillingModel, BillingPeriod, CreditGrantCadence, TiersMode Classes: CreditRate, Price, Tier

Instance Attribute Summary collapse

Class Method 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

#initialize(amount:, currency_id:, cost_formula: nil) ⇒ Object

Credit rate configuration for credit-based pricing

Parameters:

  • amount (Float)

    Credit rate amount

  • currency_id (String)

    Custom currency identifier

  • cost_formula (String, nil) (defaults to: nil)

    Optional cost formula expression



# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 148

Instance Attribute Details

#billing_cadenceSymbol, Stigg::Models::V1::PlanListChargesResponse::BillingCadence

The billing cadence (RECURRING or ONE_OFF)



18
19
20
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 18

required :billing_cadence,
enum: -> { Stigg::Models::V1::PlanListChargesResponse::BillingCadence },
api_name: :billingCadence

#billing_country_codeString?

ISO country code for localized pricing, if any

Returns:

  • (String, nil)


48
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 48

optional :billing_country_code, String, api_name: :billingCountryCode, nil?: true

#billing_idString?

Identifier in the external billing integration (e.g. Stripe price id), if any

Returns:

  • (String, nil)


54
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 54

optional :billing_id, String, api_name: :billingId, nil?: true

#billing_modelSymbol, Stigg::Models::V1::PlanListChargesResponse::BillingModel

The billing model (FLAT_FEE, PER_UNIT, USAGE_BASED, CREDIT_BASED, MINIMUM_SPEND)



26
27
28
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 26

required :billing_model,
enum: -> { Stigg::Models::V1::PlanListChargesResponse::BillingModel },
api_name: :billingModel

#billing_periodSymbol, Stigg::Models::V1::PlanListChargesResponse::BillingPeriod

The billing period (MONTHLY or ANNUALLY)



34
35
36
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 34

required :billing_period,
enum: -> { Stigg::Models::V1::PlanListChargesResponse::BillingPeriod },
api_name: :billingPeriod

#block_sizeFloat?

Block size for usage-based pricing

Returns:

  • (Float, nil)


60
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 60

optional :block_size, Float, api_name: :blockSize, nil?: true

#created_atTime

Timestamp when the charge was created

Returns:

  • (Time)


42
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 42

required :created_at, Time, api_name: :createdAt

#credit_grant_cadenceSymbol, ...

When credits are granted (for credit-based pricing)



66
67
68
69
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 66

optional :credit_grant_cadence,
enum: -> { Stigg::Models::V1::PlanListChargesResponse::CreditGrantCadence },
api_name: :creditGrantCadence,
nil?: true

#credit_rateStigg::Models::V1::PlanListChargesResponse::CreditRate?

Credit rate configuration for credit-based pricing



75
76
77
78
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 75

optional :credit_rate,
-> { Stigg::Models::V1::PlanListChargesResponse::CreditRate },
api_name: :creditRate,
nil?: true

#crm_idString?

Identifier in the linked CRM, if any

Returns:

  • (String, nil)


84
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 84

optional :crm_id, String, api_name: :crmId, nil?: true

Deep link to the charge in the linked CRM, if any

Returns:

  • (String, nil)


90
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 90

optional :crm_link_url, String, api_name: :crmLinkUrl, nil?: true

#feature_idString?

The feature this charge meters, if metered

Returns:

  • (String, nil)


96
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 96

optional :feature_id, String, api_name: :featureId, nil?: true

#idString

Unique identifier of the charge

Returns:

  • (String)


12
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 12

required :id, String

#max_unit_quantityFloat?

Maximum unit quantity that can be purchased

Returns:

  • (Float, nil)


102
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 102

optional :max_unit_quantity, Float, api_name: :maxUnitQuantity, nil?: true

#min_unit_quantityFloat?

Minimum unit quantity that can be purchased

Returns:

  • (Float, nil)


108
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 108

optional :min_unit_quantity, Float, api_name: :minUnitQuantity, nil?: true

#priceStigg::Models::V1::PlanListChargesResponse::Price?

The flat price amount and currency, when applicable



114
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 114

optional :price, -> { Stigg::Models::V1::PlanListChargesResponse::Price }, nil?: true

#tiersArray<Stigg::Models::V1::PlanListChargesResponse::Tier>?

Tiered pricing rows when the charge is tiered



120
121
122
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 120

optional :tiers,
-> { Stigg::Internal::Type::ArrayOf[Stigg::Models::V1::PlanListChargesResponse::Tier] },
nil?: true

#tiers_modeSymbol, ...

Tiered pricing mode (VOLUME or GRADUATED) when the charge is tiered



128
129
130
131
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 128

optional :tiers_mode,
enum: -> { Stigg::Models::V1::PlanListChargesResponse::TiersMode },
api_name: :tiersMode,
nil?: true

#top_up_custom_currency_idString?

Custom currency identifier for top-up pricing, if any

Returns:

  • (String, nil)


137
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 137

optional :top_up_custom_currency_id, String, api_name: :topUpCustomCurrencyId, nil?: true

#used_in_subscriptionsBoolean?

True if this charge is referenced by at least one subscription

Returns:

  • (Boolean, nil)


143
144
145
146
# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 143

optional :used_in_subscriptions,
Stigg::Internal::Type::Boolean,
api_name: :usedInSubscriptions,
nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/stigg/models/v1/plan_list_charges_response.rb', line 205