Module: MetronomeSDK::Internal::Type::Enum Private

Includes:
Converter, Util::SorbetRuntimeSupport
Included in:
Models::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type, Models::Commit::Ledger::PostpaidCommitExpirationLedgerEntry::Type, Models::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry::Type, Models::Commit::Ledger::PostpaidCommitManualLedgerEntry::Type, Models::Commit::Ledger::PostpaidCommitRolloverLedgerEntry::Type, Models::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type, Models::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type, Models::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type, Models::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type, Models::Commit::Ledger::PrepaidCommitExpirationLedgerEntry::Type, Models::Commit::Ledger::PrepaidCommitManualLedgerEntry::Type, Models::Commit::Ledger::PrepaidCommitRolloverLedgerEntry::Type, Models::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry::Type, Models::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry::Type, Models::Commit::RateType, Models::Commit::Type, Models::CommitHierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessAll::Type, Models::CommitHierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessContractIDs::Type, Models::CommitHierarchyConfiguration::ChildAccess::CommitHierarchyChildAccessNone::Type, Models::CommitRate::RateType, Models::Contract::Amendment::ResellerRoyalty::ResellerType, Models::Contract::CustomerBillingProviderConfiguration::BillingProvider, Models::Contract::CustomerBillingProviderConfiguration::DeliveryMethod, Models::Contract::ScheduledChargesOnUsageInvoices, Models::ContractV2::Commit::Ledger::PostpaidCommitAutomatedInvoiceDeductionLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PostpaidCommitExpirationLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PostpaidCommitInitialBalanceLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PostpaidCommitManualLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PostpaidCommitRolloverLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PostpaidCommitTrueupLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PrepaidCommitAutomatedInvoiceDeductionLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PrepaidCommitCanceledLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PrepaidCommitCreditedLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PrepaidCommitExpirationLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PrepaidCommitManualLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PrepaidCommitRolloverLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PrepaidCommitSeatBasedAdjustmentLedgerEntry::Type, Models::ContractV2::Commit::Ledger::PrepaidCommitSegmentStartLedgerEntry::Type, Models::ContractV2::Commit::RateType, Models::ContractV2::Commit::Type, Models::ContractV2::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type, Models::ContractV2::Credit::Ledger::CreditCanceledLedgerEntry::Type, Models::ContractV2::Credit::Ledger::CreditCreditedLedgerEntry::Type, Models::ContractV2::Credit::Ledger::CreditExpirationLedgerEntry::Type, Models::ContractV2::Credit::Ledger::CreditManualLedgerEntry::Type, Models::ContractV2::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry::Type, Models::ContractV2::Credit::Ledger::CreditSegmentStartLedgerEntry::Type, Models::ContractV2::Credit::Type, Models::ContractV2::CustomerBillingProviderConfiguration::BillingProvider, Models::ContractV2::CustomerBillingProviderConfiguration::DeliveryMethod, Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2::Payer, Models::ContractV2::HierarchyConfiguration::ChildHierarchyConfigurationV2::UsageStatementBehavior, Models::ContractV2::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior::InvoiceConsolidationType, Models::ContractV2::MultiplierOverridePrioritization, Models::ContractV2::Override::OverrideSpecifier::BillingFrequency, Models::ContractV2::Override::OverwriteRate::RateType, Models::ContractV2::Override::Target, Models::ContractV2::Override::Type, Models::ContractV2::RecurringCommit::CommitDuration::Unit, Models::ContractV2::RecurringCommit::Proration, Models::ContractV2::RecurringCommit::RateType, Models::ContractV2::RecurringCommit::RecurrenceFrequency, Models::ContractV2::RecurringCredit::CommitDuration::Unit, Models::ContractV2::RecurringCredit::Proration, Models::ContractV2::RecurringCredit::RateType, Models::ContractV2::RecurringCredit::RecurrenceFrequency, Models::ContractV2::ResellerRoyalty::ResellerType, Models::ContractV2::ResellerRoyalty::Segment::ResellerType, Models::ContractV2::ScheduledChargesOnUsageInvoices, Models::ContractV2::Transition::Type, Models::ContractV2::UsageStatementSchedule::Frequency, Models::ContractWithoutAmendments::RecurringCommit::CommitDuration::Unit, Models::ContractWithoutAmendments::RecurringCommit::Proration, Models::ContractWithoutAmendments::RecurringCommit::RateType, Models::ContractWithoutAmendments::RecurringCommit::RecurrenceFrequency, Models::ContractWithoutAmendments::RecurringCredit::CommitDuration::Unit, Models::ContractWithoutAmendments::RecurringCredit::Proration, Models::ContractWithoutAmendments::RecurringCredit::RateType, Models::ContractWithoutAmendments::RecurringCredit::RecurrenceFrequency, Models::ContractWithoutAmendments::ResellerRoyalty::ResellerType, Models::ContractWithoutAmendments::ScheduledChargesOnUsageInvoices, Models::ContractWithoutAmendments::Transition::Type, Models::ContractWithoutAmendments::UsageStatementSchedule::Frequency, Models::Credit::Ledger::CreditAutomatedInvoiceDeductionLedgerEntry::Type, Models::Credit::Ledger::CreditCanceledLedgerEntry::Type, Models::Credit::Ledger::CreditCreditedLedgerEntry::Type, Models::Credit::Ledger::CreditExpirationLedgerEntry::Type, Models::Credit::Ledger::CreditManualLedgerEntry::Type, Models::Credit::Ledger::CreditSeatBasedAdjustmentLedgerEntry::Type, Models::Credit::Ledger::CreditSegmentStartLedgerEntry::Type, Models::Credit::RateType, Models::Credit::Type, Models::HierarchyConfiguration::ChildHierarchyConfiguration::Payer, Models::HierarchyConfiguration::ChildHierarchyConfiguration::UsageStatementBehavior, Models::HierarchyConfiguration::ParentHierarchyConfiguration::ParentBehavior::InvoiceConsolidationType, Models::Override::OverrideSpecifier::BillingFrequency, Models::Override::RateType, Models::Override::Target, Models::Override::Type, Models::OverwriteRate::RateType, Models::PaymentGateConfig::PaymentGateType, Models::PaymentGateConfig::StripeConfig::PaymentType, Models::PaymentGateConfig::TaxType, Models::PaymentGateConfigV2::PaymentGateType, Models::PaymentGateConfigV2::StripeConfig::PaymentType, Models::PaymentGateConfigV2::TaxType, Models::Rate::RateType, Models::RecurringCommitSubscriptionConfig::Allocation, Models::Subscription::CollectionSchedule, Models::Subscription::Proration::InvoiceBehavior, Models::Subscription::QuantityManagementMode, Models::Subscription::SubscriptionRate::BillingFrequency, Models::V1::AlertCreateParams::AlertType, Models::V1::AlertCreateParams::CustomFieldFilter::Entity, Models::V1::AuditLogListParams::Sort, Models::V1::AuditLogListResponse::Status, Models::V1::BillableMetricCreateParams::AggregationType, Models::V1::BillableMetricListResponse::AggregationType, Models::V1::BillableMetricRetrieveResponse::Data::AggregationType, Models::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule::AmountDistribution, Models::V1::ContractAmendParams::Commit::InvoiceSchedule::RecurringSchedule::Frequency, Models::V1::ContractAmendParams::Commit::PaymentGateConfig::PaymentGateType, Models::V1::ContractAmendParams::Commit::PaymentGateConfig::StripeConfig::PaymentType, Models::V1::ContractAmendParams::Commit::PaymentGateConfig::TaxType, Models::V1::ContractAmendParams::Commit::RateType, Models::V1::ContractAmendParams::Commit::Type, Models::V1::ContractAmendParams::Credit::RateType, Models::V1::ContractAmendParams::Discount::Schedule::RecurringSchedule::AmountDistribution, Models::V1::ContractAmendParams::Discount::Schedule::RecurringSchedule::Frequency, Models::V1::ContractAmendParams::Override::OverrideSpecifier::BillingFrequency, Models::V1::ContractAmendParams::Override::OverwriteRate::RateType, Models::V1::ContractAmendParams::Override::Target, Models::V1::ContractAmendParams::Override::Type, Models::V1::ContractAmendParams::ResellerRoyalty::ResellerType, Models::V1::ContractAmendParams::ScheduledCharge::Schedule::RecurringSchedule::AmountDistribution, Models::V1::ContractAmendParams::ScheduledCharge::Schedule::RecurringSchedule::Frequency, Models::V1::ContractCreateHistoricalInvoicesParams::Invoice::BillableStatus, Models::V1::ContractCreateHistoricalInvoicesParams::Invoice::BreakdownGranularity, Models::V1::ContractCreateParams::BillingProviderConfiguration::BillingProvider, Models::V1::ContractCreateParams::BillingProviderConfiguration::DeliveryMethod, Models::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule::AmountDistribution, Models::V1::ContractCreateParams::Commit::InvoiceSchedule::RecurringSchedule::Frequency, Models::V1::ContractCreateParams::Commit::PaymentGateConfig::PaymentGateType, Models::V1::ContractCreateParams::Commit::PaymentGateConfig::StripeConfig::PaymentType, Models::V1::ContractCreateParams::Commit::PaymentGateConfig::TaxType, Models::V1::ContractCreateParams::Commit::RateType, Models::V1::ContractCreateParams::Commit::Type, Models::V1::ContractCreateParams::Credit::RateType, Models::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule::AmountDistribution, Models::V1::ContractCreateParams::Discount::Schedule::RecurringSchedule::Frequency, Models::V1::ContractCreateParams::HierarchyConfiguration::ParentBehavior::InvoiceConsolidationType, Models::V1::ContractCreateParams::HierarchyConfiguration::Payer, Models::V1::ContractCreateParams::HierarchyConfiguration::UsageStatementBehavior, Models::V1::ContractCreateParams::MultiplierOverridePrioritization, Models::V1::ContractCreateParams::Override::OverrideSpecifier::BillingFrequency, Models::V1::ContractCreateParams::Override::OverwriteRate::RateType, Models::V1::ContractCreateParams::Override::Target, Models::V1::ContractCreateParams::Override::Type, Models::V1::ContractCreateParams::RecurringCommit::CommitDuration::Unit, Models::V1::ContractCreateParams::RecurringCommit::Proration, Models::V1::ContractCreateParams::RecurringCommit::RateType, Models::V1::ContractCreateParams::RecurringCommit::RecurrenceFrequency, Models::V1::ContractCreateParams::RecurringCommit::SubscriptionConfig::Allocation, Models::V1::ContractCreateParams::RecurringCredit::CommitDuration::Unit, Models::V1::ContractCreateParams::RecurringCredit::Proration, Models::V1::ContractCreateParams::RecurringCredit::RateType, Models::V1::ContractCreateParams::RecurringCredit::RecurrenceFrequency, Models::V1::ContractCreateParams::RecurringCredit::SubscriptionConfig::Allocation, Models::V1::ContractCreateParams::ResellerRoyalty::ResellerType, Models::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule::AmountDistribution, Models::V1::ContractCreateParams::ScheduledCharge::Schedule::RecurringSchedule::Frequency, Models::V1::ContractCreateParams::ScheduledChargesOnUsageInvoices, Models::V1::ContractCreateParams::Subscription::CollectionSchedule, Models::V1::ContractCreateParams::Subscription::Proration::InvoiceBehavior, Models::V1::ContractCreateParams::Subscription::QuantityManagementMode, Models::V1::ContractCreateParams::Subscription::SubscriptionRate::BillingFrequency, Models::V1::ContractCreateParams::Transition::FutureInvoiceBehavior::Trueup, Models::V1::ContractCreateParams::Transition::Type, Models::V1::ContractCreateParams::UsageStatementSchedule::Day, Models::V1::ContractCreateParams::UsageStatementSchedule::Frequency, Models::V1::ContractRetrieveRateScheduleParams::Selector::BillingFrequency, Models::V1::ContractRetrieveRateScheduleResponse::Data::BillingFrequency, Models::V1::Contracts::ProductCreateParams::Type, Models::V1::Contracts::ProductListParams::ArchiveFilter, Models::V1::Contracts::ProductListResponse::Type, Models::V1::Contracts::ProductRetrieveResponse::Data::Type, Models::V1::Contracts::QuantityConversion::Operation, Models::V1::Contracts::QuantityRounding::RoundingMethod, Models::V1::Contracts::RateCardRetrieveRateScheduleParams::Selector::BillingFrequency, Models::V1::Contracts::RateCardRetrieveRateScheduleResponse::Data::BillingFrequency, Models::V1::Contracts::RateCards::RateAddManyParams::Rate::BillingFrequency, Models::V1::Contracts::RateCards::RateAddManyParams::Rate::RateType, Models::V1::Contracts::RateCards::RateAddParams::BillingFrequency, Models::V1::Contracts::RateCards::RateAddParams::RateType, Models::V1::Contracts::RateCards::RateAddResponse::Data::RateType, Models::V1::Contracts::RateCards::RateListParams::Selector::BillingFrequency, Models::V1::Contracts::RateCards::RateListResponse::BillingFrequency, Models::V1::CreditGrantListEntriesParams::Sort, Models::V1::CustomFieldAddKeyParams::Entity, Models::V1::CustomFieldDeleteValuesParams::Entity, Models::V1::CustomFieldListKeysParams::Entity, Models::V1::CustomFieldListKeysResponse::Entity, Models::V1::CustomFieldRemoveKeyParams::Entity, Models::V1::CustomFieldSetValuesParams::Entity, Models::V1::CustomerCreateParams::BillingConfig::AwsRegion, Models::V1::CustomerCreateParams::BillingConfig::BillingProviderType, Models::V1::CustomerCreateParams::BillingConfig::StripeCollectionMethod, Models::V1::CustomerCreateParams::CustomerBillingProviderConfiguration::BillingProvider, Models::V1::CustomerCreateParams::CustomerBillingProviderConfiguration::DeliveryMethod, Models::V1::CustomerCreateParams::CustomerBillingProviderConfiguration::TaxProvider, Models::V1::CustomerDetail::CurrentBillableStatus::Value, Models::V1::CustomerListBillableMetricsResponse::AggregationType, Models::V1::CustomerPreviewEventsParams::Mode, Models::V1::CustomerRetrieveBillingConfigurationsResponse::Data::BillingProvider, Models::V1::CustomerRetrieveBillingConfigurationsResponse::Data::DeliveryMethod, Models::V1::CustomerSetBillingConfigurationsParams::Data::BillingProvider, Models::V1::CustomerSetBillingConfigurationsParams::Data::DeliveryMethod, Models::V1::CustomerSetBillingConfigurationsParams::Data::TaxProvider, Models::V1::Customers::AlertListParams::AlertStatus, Models::V1::Customers::AlertRetrieveParams::PlansOrContracts, Models::V1::Customers::BillingConfigCreateParams::AwsRegion, Models::V1::Customers::BillingConfigCreateParams::BillingProviderType, Models::V1::Customers::BillingConfigCreateParams::StripeCollectionMethod, Models::V1::Customers::BillingConfigDeleteParams::BillingProviderType, Models::V1::Customers::BillingConfigRetrieveParams::BillingProviderType, Models::V1::Customers::BillingConfigRetrieveResponse::Data::AwsRegion, Models::V1::Customers::BillingConfigRetrieveResponse::Data::AzureSubscriptionStatus, Models::V1::Customers::BillingConfigRetrieveResponse::Data::StripeCollectionMethod, Models::V1::Customers::CommitCreateParams::InvoiceSchedule::RecurringSchedule::AmountDistribution, Models::V1::Customers::CommitCreateParams::InvoiceSchedule::RecurringSchedule::Frequency, Models::V1::Customers::CommitCreateParams::RateType, Models::V1::Customers::CommitCreateParams::Type, Models::V1::Customers::CreditCreateParams::RateType, Models::V1::Customers::CustomerAlert::Alert::CustomFieldFilter::Entity, Models::V1::Customers::CustomerAlert::Alert::Status, Models::V1::Customers::CustomerAlert::Alert::Type, Models::V1::Customers::CustomerAlert::CustomerStatus, Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::BillingProviderType, Models::V1::Customers::Invoice::CorrectionRecord::CorrectedExternalInvoice::ExternalStatus, Models::V1::Customers::Invoice::ExternalInvoice::BillingProviderType, Models::V1::Customers::Invoice::ExternalInvoice::ExternalStatus, Models::V1::Customers::Invoice::LineItem::AppliedCommitOrCredit::Type, Models::V1::Customers::Invoice::LineItem::ResellerType, Models::V1::Customers::Invoice::ResellerRoyalty::ResellerType, Models::V1::Customers::InvoiceListBreakdownsParams::Sort, Models::V1::Customers::InvoiceListBreakdownsParams::WindowSize, Models::V1::Customers::InvoiceListParams::Sort, Models::V1::Customers::PlanAddParams::PriceAdjustment::AdjustmentType, Models::V1::Customers::PlanListPriceAdjustmentsResponse::ChargeType, Models::V1::Customers::PlanListPriceAdjustmentsResponse::Price::AdjustmentType, Models::V1::DashboardGetEmbeddableURLParams::ColorOverride::Name, Models::V1::DashboardGetEmbeddableURLParams::Dashboard, Models::V1::Payment::PaymentGateway::Type, Models::V1::PaymentStatus, Models::V1::PlanListChargesResponse::ChargeType, Models::V1::PlanListChargesResponse::UnitConversion::RoundingBehavior, Models::V1::PlanListCustomersParams::Status, Models::V1::RolloverAmountMaxAmount::Type, Models::V1::RolloverAmountMaxPercentage::Type, Models::V1::ServiceListResponse::Service::Usage, Models::V1::SettingUpsertAvalaraCredentialsParams::AvalaraEnvironment, Models::V1::Settings::BillingProviderCreateParams::BillingProvider, Models::V1::Settings::BillingProviderCreateParams::DeliveryMethod, Models::V1::Settings::BillingProviderListResponse::Data::BillingProvider, Models::V1::Settings::BillingProviderListResponse::Data::DeliveryMethod, Models::V1::UsageListParams::WindowSize, Models::V1::UsageListWithGroupsParams::WindowSize, Models::V1::UsageSearchResponseItem::MatchedBillableMetric::AggregationType, Models::V2::ContractEditCommitParams::RateType, Models::V2::ContractEditCreditParams::RateType, Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration::BillingProvider, Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::BillingProviderConfiguration::DeliveryMethod, Models::V2::ContractEditParams::AddBillingProviderConfigurationUpdate::Schedule::EffectiveAt, Models::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule::AmountDistribution, Models::V2::ContractEditParams::AddCommit::InvoiceSchedule::RecurringSchedule::Frequency, Models::V2::ContractEditParams::AddCommit::PaymentGateConfig::PaymentGateType, Models::V2::ContractEditParams::AddCommit::PaymentGateConfig::StripeConfig::PaymentType, Models::V2::ContractEditParams::AddCommit::PaymentGateConfig::TaxType, Models::V2::ContractEditParams::AddCommit::RateType, Models::V2::ContractEditParams::AddCommit::Type, Models::V2::ContractEditParams::AddCredit::RateType, Models::V2::ContractEditParams::AddDiscount::Schedule::RecurringSchedule::AmountDistribution, Models::V2::ContractEditParams::AddDiscount::Schedule::RecurringSchedule::Frequency, Models::V2::ContractEditParams::AddOverride::OverrideSpecifier::BillingFrequency, Models::V2::ContractEditParams::AddOverride::OverwriteRate::RateType, Models::V2::ContractEditParams::AddOverride::Target, Models::V2::ContractEditParams::AddOverride::Type, Models::V2::ContractEditParams::AddRecurringCommit::CommitDuration::Unit, Models::V2::ContractEditParams::AddRecurringCommit::Proration, Models::V2::ContractEditParams::AddRecurringCommit::RateType, Models::V2::ContractEditParams::AddRecurringCommit::RecurrenceFrequency, Models::V2::ContractEditParams::AddRecurringCommit::SubscriptionConfig::Allocation, Models::V2::ContractEditParams::AddRecurringCredit::CommitDuration::Unit, Models::V2::ContractEditParams::AddRecurringCredit::Proration, Models::V2::ContractEditParams::AddRecurringCredit::RateType, Models::V2::ContractEditParams::AddRecurringCredit::RecurrenceFrequency, Models::V2::ContractEditParams::AddRecurringCredit::SubscriptionConfig::Allocation, Models::V2::ContractEditParams::AddResellerRoyalty::ResellerType, Models::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule::AmountDistribution, Models::V2::ContractEditParams::AddScheduledCharge::Schedule::RecurringSchedule::Frequency, Models::V2::ContractEditParams::AddSubscription::CollectionSchedule, Models::V2::ContractEditParams::AddSubscription::Proration::InvoiceBehavior, Models::V2::ContractEditParams::AddSubscription::QuantityManagementMode, Models::V2::ContractEditParams::AddSubscription::SubscriptionRate::BillingFrequency, Models::V2::ContractEditParams::UpdateCommit::RateType, Models::V2::ContractEditParams::UpdateCredit::RateType, Models::V2::ContractEditParams::UpdateRecurringCommit::RateType, Models::V2::ContractEditParams::UpdateRecurringCredit::RateType, Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::RateType, Models::V2::ContractGetEditHistoryResponse::Data::AddCommit::Type, Models::V2::ContractGetEditHistoryResponse::Data::AddCredit::Type, Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverrideSpecifier::BillingFrequency, Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::OverwriteRate::RateType, Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Target, Models::V2::ContractGetEditHistoryResponse::Data::AddOverride::Type, Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::CommitDuration::Unit, Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::Proration, Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RateType, Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCommit::RecurrenceFrequency, Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::CommitDuration::Unit, Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::Proration, Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::RateType, Models::V2::ContractGetEditHistoryResponse::Data::AddRecurringCredit::RecurrenceFrequency, Models::V2::ContractGetEditHistoryResponse::Data::AddResellerRoyalty::ResellerType, Models::V2::ContractGetEditHistoryResponse::Data::UpdateCommit::RateType, Models::V2::ContractGetEditHistoryResponse::Data::UpdateCredit::RateType, Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule::AmountDistribution, Models::V2::ContractGetEditHistoryResponse::Data::UpdateDiscount::Schedule::RecurringSchedule::Frequency, Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCommit::RateType, Models::V2::ContractGetEditHistoryResponse::Data::UpdateRecurringCredit::RateType
Defined in:
lib/metronome_sdk/internal/type/enum.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

A value from among a specified list of options. OpenAPI enum values map to Ruby values in the SDK as follows:

  1. boolean => true | false

  2. integer => Integer

  3. float => Float

  4. string => Symbol

We can therefore convert string values to Symbols, but can’t convert other values safely.

Examples:

# `payment_status` is a `MetronomeSDK::V1::PaymentStatus`
case payment_status
when MetronomeSDK::V1::PaymentStatus::PENDING
  # ...
when MetronomeSDK::V1::PaymentStatus::REQUIRES_INTERVENTION
  # ...
when MetronomeSDK::V1::PaymentStatus::PAID
  # ...
else
  puts(payment_status)
end
case payment_status
in :pending
  # ...
in :requires_intervention
  # ...
in :paid
  # ...
else
  puts(payment_status)
end

Instance Method Summary collapse

Methods included from Util::SorbetRuntimeSupport

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

Methods included from Converter

coerce, dump, inspect, meta_info, new_coerce_state, type_info

Instance Method Details

#==(other) ⇒ Boolean

Parameters:

  • other (Object)

Returns:



64
65
66
67
68
# File 'lib/metronome_sdk/internal/type/enum.rb', line 64

def ==(other)
  # rubocop:disable Style/CaseEquality
  MetronomeSDK::Internal::Type::Enum === other && other.values.to_set == values.to_set
  # rubocop:enable Style/CaseEquality
end

#===(other) ⇒ Boolean

Parameters:

  • other (Object)

Returns:



57
# File 'lib/metronome_sdk/internal/type/enum.rb', line 57

def ===(other) = values.include?(other)

#coerce(value, state:) ⇒ Symbol, Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Unlike with primitives, ‘Enum` additionally validates that the value is a member of the enum.

Parameters:

  • value (String, Symbol, Object)
  • state (Hash{Symbol=>Object})

    .

    @option state [Boolean] :translate_names

    @option state [Boolean] :strictness

    @option state [HashSymbol=>Object] :exactness

    @option state [Class<StandardError>] :error

    @option state [Integer] :branched

Returns:

  • (Symbol, Object)


95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/metronome_sdk/internal/type/enum.rb', line 95

def coerce(value, state:)
  exactness = state.fetch(:exactness)
  val = value.is_a?(String) ? value.to_sym : value

  if values.include?(val)
    exactness[:yes] += 1
    val
  elsif values.first&.class == val.class
    exactness[:maybe] += 1
    value
  else
    exactness[:no] += 1
    state[:error] = TypeError.new("#{value.class} can't be coerced into #{self}")
    value
  end
end

#dump(value, state: ) ⇒ Symbol, Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • value (Symbol, Object)
  • state (Hash{Symbol=>Object}) (defaults to: )

    .

    @option state [Boolean] :can_retry

Returns:

  • (Symbol, Object)


# File 'lib/metronome_sdk/internal/type/enum.rb', line 112

#hashInteger

Returns:

  • (Integer)


73
# File 'lib/metronome_sdk/internal/type/enum.rb', line 73

def hash = values.to_set.hash

#inspect(depth: 0) ⇒ String

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Parameters:

  • depth (Integer) (defaults to: 0)

Returns:

  • (String)


143
144
145
146
147
148
149
150
151
152
# File 'lib/metronome_sdk/internal/type/enum.rb', line 143

def inspect(depth: 0)
  if depth.positive?
    return is_a?(Module) ? super() : self.class.name
  end

  members = values.map { MetronomeSDK::Internal::Type::Converter.inspect(_1, depth: depth.succ) }
  prefix = is_a?(Module) ? name : self.class.name

  "#{prefix}[#{members.join(' | ')}]"
end

#to_sorbet_typeObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:

  • (Object)


126
127
128
129
130
131
132
133
134
135
136
# File 'lib/metronome_sdk/internal/type/enum.rb', line 126

def to_sorbet_type
  types = values.map { MetronomeSDK::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
  case types
  in []
    T.noreturn
  in [type]
    type
  else
    T.any(*types)
  end
end

#valuesArray<NilClass, Boolean, Integer, Float, Symbol>

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

All of the valid Symbol values for this enum.

Returns:

  • (Array<NilClass, Boolean, Integer, Float, Symbol>)


50
# File 'lib/metronome_sdk/internal/type/enum.rb', line 50

def values = constants.map { const_get(_1) }