Class: Pago::V2026_04::Models::SubscriptionUpdateBillingPeriod
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ current_billing_period_end: "current_billing_period_end" }.freeze
- REQUIRED_KEYS =
["current_billing_period_end"].freeze
Instance Attribute Summary collapse
-
#current_billing_period_end ⇒ String
readonly
Set a new date for the end of the current billing period.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(current_billing_period_end:) ⇒ SubscriptionUpdateBillingPeriod
constructor
A new instance of SubscriptionUpdateBillingPeriod.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(current_billing_period_end:) ⇒ SubscriptionUpdateBillingPeriod
Returns a new instance of SubscriptionUpdateBillingPeriod.
42718 42719 42720 42721 42722 42723 |
# File 'lib/pago/v2026_04/models.rb', line 42718 def initialize( current_billing_period_end: ) super() assign(:current_billing_period_end, current_billing_period_end) end |
Instance Attribute Details
#current_billing_period_end ⇒ String (readonly)
Set a new date for the end of the current billing period. The subscription will renew on this date. The new date can be earlier or later than the current period end, as long as it's in the future.
It is not possible to update the current billing period on a canceled subscription.
42716 42717 42718 |
# File 'lib/pago/v2026_04/models.rb', line 42716 def current_billing_period_end @current_billing_period_end end |
Class Method Details
.from_json(data) ⇒ SubscriptionUpdateBillingPeriod?
42727 42728 42729 42730 42731 42732 42733 42734 42735 42736 42737 42738 |
# File 'lib/pago/v2026_04/models.rb', line 42727 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( current_billing_period_end: (data.key?("current_billing_period_end") ? data["current_billing_period_end"] : ::Pago::UNSET) ), data ) end |