Class: Pago::V2026_04::Models::SubscriptionUpdateSeats
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ seats: "seats", proration_behavior: "proration_behavior" }.freeze
- REQUIRED_KEYS =
["seats"].freeze
Instance Attribute Summary collapse
-
#proration_behavior ⇒ String?
readonly
Determine how to handle the proration billing.
-
#seats ⇒ Integer
readonly
Update the number of seats for this subscription.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(seats:, proration_behavior: ::Pago::UNSET) ⇒ SubscriptionUpdateSeats
constructor
A new instance of SubscriptionUpdateSeats.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(seats:, proration_behavior: ::Pago::UNSET) ⇒ SubscriptionUpdateSeats
Returns a new instance of SubscriptionUpdateSeats.
42958 42959 42960 42961 42962 42963 42964 42965 |
# File 'lib/pago/v2026_04/models.rb', line 42958 def initialize( seats:, proration_behavior: ::Pago::UNSET ) super() assign(:seats, seats) assign(:proration_behavior, proration_behavior) end |
Instance Attribute Details
#proration_behavior ⇒ String? (readonly)
Determine how to handle the proration billing. If not provided, will use the default organization setting.
42956 42957 42958 |
# File 'lib/pago/v2026_04/models.rb', line 42956 def proration_behavior @proration_behavior end |
#seats ⇒ Integer (readonly)
Update the number of seats for this subscription.
42952 42953 42954 |
# File 'lib/pago/v2026_04/models.rb', line 42952 def seats @seats end |
Class Method Details
.from_json(data) ⇒ SubscriptionUpdateSeats?
42969 42970 42971 42972 42973 42974 42975 42976 42977 42978 42979 42980 42981 |
# File 'lib/pago/v2026_04/models.rb', line 42969 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( seats: (data.key?("seats") ? data["seats"] : ::Pago::UNSET), proration_behavior: (data.key?("proration_behavior") ? data["proration_behavior"] : ::Pago::UNSET) ), data ) end |