Class: Orb::Models::SubscriptionChangeApplyResponse

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/subscription_change_apply_response.rb,
sig/orb/models/subscription_change_apply_response.rbs

Overview

See Also:

  • Orb::Resources::SubscriptionChanges#apply

Defined Under Namespace

Modules: Status

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

#initialize(id:, change_type:, expiration_time:, status:, subscription:, applied_at: nil, billing_cycle_alignment: nil, cancelled_at: nil, change_option: nil, effective_date: nil, plan_id: nil) ⇒ Object

Some parameter documentations has been truncated, see Orb::Models::SubscriptionChangeApplyResponse for more details.

A subscription change represents a desired new subscription / pending change to an existing subscription. It is a way to first preview the effects on the subscription as well as any changes/creation of invoices (see subscription.changed_resources).

Parameters:

  • id (String)
  • change_type (String)

    The type of change (e.g., 'schedule_plan_change', 'create_subscription').

  • expiration_time (Time)

    Subscription change will be cancelled at this time and can no longer be applied.

  • status (Symbol, Orb::Models::SubscriptionChangeApplyResponse::Status)
  • subscription (Orb::Models::MutatedSubscription, nil)
  • applied_at (Time, nil) (defaults to: nil)

    When this change was applied.

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

    Billing cycle alignment for plan changes.

  • cancelled_at (Time, nil) (defaults to: nil)

    When this change was cancelled.

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

    How the change is scheduled (e.g., 'immediate', 'end_of_subscription_term', 'req

  • effective_date (Time, nil) (defaults to: nil)

    When this change will take effect.

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

    The target plan ID for plan changes.



# File 'lib/orb/models/subscription_change_apply_response.rb', line 71

Instance Attribute Details

#applied_atTime?

When this change was applied.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


38
# File 'lib/orb/models/subscription_change_apply_response.rb', line 38

optional :applied_at, Time, nil?: true

#billing_cycle_alignmentString?

Billing cycle alignment for plan changes.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


44
# File 'lib/orb/models/subscription_change_apply_response.rb', line 44

optional :billing_cycle_alignment, String, nil?: true

#cancelled_atTime?

When this change was cancelled.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


50
# File 'lib/orb/models/subscription_change_apply_response.rb', line 50

optional :cancelled_at, Time, nil?: true

#change_optionString?

How the change is scheduled (e.g., 'immediate', 'end_of_subscription_term', 'requested_date').

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


57
# File 'lib/orb/models/subscription_change_apply_response.rb', line 57

optional :change_option, String, nil?: true

#change_typeString

The type of change (e.g., 'schedule_plan_change', 'create_subscription').

Parameters:

  • value (String)

Returns:

  • (String)


16
# File 'lib/orb/models/subscription_change_apply_response.rb', line 16

required :change_type, String

#effective_dateTime?

When this change will take effect.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


63
# File 'lib/orb/models/subscription_change_apply_response.rb', line 63

optional :effective_date, Time, nil?: true

#expiration_timeTime

Subscription change will be cancelled at this time and can no longer be applied.

Parameters:

  • value (Time)

Returns:

  • (Time)


22
# File 'lib/orb/models/subscription_change_apply_response.rb', line 22

required :expiration_time, Time

#idString

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/orb/models/subscription_change_apply_response.rb', line 10

required :id, String

#plan_idString?

The target plan ID for plan changes.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


69
# File 'lib/orb/models/subscription_change_apply_response.rb', line 69

optional :plan_id, String, nil?: true

#statusSymbol, Orb::Models::SubscriptionChangeApplyResponse::Status

Parameters:

  • value (Orb::Models::SubscriptionChangeApplyResponse::status)

Returns:



27
# File 'lib/orb/models/subscription_change_apply_response.rb', line 27

required :status, enum: -> { Orb::Models::SubscriptionChangeApplyResponse::Status }

#subscriptionOrb::Models::MutatedSubscription?

Parameters:

Returns:



32
# File 'lib/orb/models/subscription_change_apply_response.rb', line 32

required :subscription, -> { Orb::MutatedSubscription }, nil?: true

Instance Method Details

#to_hash{

Returns:

  • ({)


55
# File 'sig/orb/models/subscription_change_apply_response.rbs', line 55

def to_hash: -> {