Class: Pago::V2026_04::Models::OrganizationSubscriptionSettings

Inherits:
Model
  • Object
show all
Defined in:
lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs

Constant Summary collapse

JSON_KEYS =

Returns:

  • (Hash[Symbol, String])
{
  allow_multiple_subscriptions: "allow_multiple_subscriptions",
  proration_behavior: "proration_behavior",
  benefit_revocation_grace_period: "benefit_revocation_grace_period",
  prevent_trial_abuse: "prevent_trial_abuse",
  allow_customer_updates: "allow_customer_updates"
}.freeze
REQUIRED_KEYS =

Returns:

  • (Array[String])
["allow_multiple_subscriptions", "proration_behavior", "benefit_revocation_grace_period", "prevent_trial_abuse", "allow_customer_updates"].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw

Constructor Details

#initialize(allow_multiple_subscriptions:, proration_behavior:, benefit_revocation_grace_period:, prevent_trial_abuse:, allow_customer_updates:) ⇒ OrganizationSubscriptionSettings

Returns a new instance of OrganizationSubscriptionSettings.

Parameters:

  • allow_multiple_subscriptions: (Boolean)
  • proration_behavior: (String)
  • benefit_revocation_grace_period: (Integer)
  • prevent_trial_abuse: (Boolean)
  • allow_customer_updates: (Boolean)


35121
35122
35123
35124
35125
35126
35127
35128
35129
35130
35131
35132
35133
35134
# File 'lib/pago/v2026_04/models.rb', line 35121

def initialize(
  allow_multiple_subscriptions:,
  proration_behavior:,
  benefit_revocation_grace_period:,
  prevent_trial_abuse:,
  allow_customer_updates:
)
  super()
  assign(:allow_multiple_subscriptions, allow_multiple_subscriptions)
  assign(:proration_behavior, proration_behavior)
  assign(:benefit_revocation_grace_period, benefit_revocation_grace_period)
  assign(:prevent_trial_abuse, prevent_trial_abuse)
  assign(:allow_customer_updates, allow_customer_updates)
end

Instance Attribute Details

#allow_customer_updatesBoolean (readonly)

Returns:

  • (Boolean)


35119
35120
35121
# File 'lib/pago/v2026_04/models.rb', line 35119

def allow_customer_updates
  @allow_customer_updates
end

#allow_multiple_subscriptionsBoolean (readonly)

Returns:

  • (Boolean)


35107
35108
35109
# File 'lib/pago/v2026_04/models.rb', line 35107

def allow_multiple_subscriptions
  @allow_multiple_subscriptions
end

#benefit_revocation_grace_periodInteger (readonly)

Returns:

  • (Integer)


35113
35114
35115
# File 'lib/pago/v2026_04/models.rb', line 35113

def benefit_revocation_grace_period
  @benefit_revocation_grace_period
end

#prevent_trial_abuseBoolean (readonly)

Returns:

  • (Boolean)


35116
35117
35118
# File 'lib/pago/v2026_04/models.rb', line 35116

def prevent_trial_abuse
  @prevent_trial_abuse
end

#proration_behaviorString (readonly)

Returns:

  • (String)


35110
35111
35112
# File 'lib/pago/v2026_04/models.rb', line 35110

def proration_behavior
  @proration_behavior
end

Class Method Details

.from_json(data) ⇒ OrganizationSubscriptionSettings?

Parameters:

  • data (Hash, String, nil)

Returns:



35138
35139
35140
35141
35142
35143
35144
35145
35146
35147
35148
35149
35150
35151
35152
35153
# File 'lib/pago/v2026_04/models.rb', line 35138

def self.from_json(data)
  data = ::JSON.parse(data) if data.is_a?(String)
  data = ::Pago::Serde.object(data)
  return nil if data.nil?

  wrap_raw(
    new(
      allow_multiple_subscriptions: (data.key?("allow_multiple_subscriptions") ? data["allow_multiple_subscriptions"] : ::Pago::UNSET),
      proration_behavior: (data.key?("proration_behavior") ? data["proration_behavior"] : ::Pago::UNSET),
      benefit_revocation_grace_period: (data.key?("benefit_revocation_grace_period") ? data["benefit_revocation_grace_period"] : ::Pago::UNSET),
      prevent_trial_abuse: (data.key?("prevent_trial_abuse") ? data["prevent_trial_abuse"] : ::Pago::UNSET),
      allow_customer_updates: (data.key?("allow_customer_updates") ? data["allow_customer_updates"] : ::Pago::UNSET)
    ),
    data
  )
end