Class: Pago::V2026_04::Models::PendingSubscriptionUpdate
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Pending update to be applied to a subscription at the beginning of the next period.
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", applies_at: "applies_at", product_id: "product_id", seats: "seats" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "applies_at", "product_id", "seats"].freeze
Instance Attribute Summary collapse
-
#applies_at ⇒ String
readonly
The date and time when the subscription update will be applied.
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#id ⇒ String
readonly
The ID of the object.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#product_id ⇒ String?
readonly
ID of the new product to apply to the subscription.
-
#seats ⇒ Integer?
readonly
Number of seats to apply to the subscription.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, applies_at:, product_id:, seats:) ⇒ PendingSubscriptionUpdate
constructor
A new instance of PendingSubscriptionUpdate.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(created_at:, modified_at:, id:, applies_at:, product_id:, seats:) ⇒ PendingSubscriptionUpdate
Returns a new instance of PendingSubscriptionUpdate.
35881 35882 35883 35884 35885 35886 35887 35888 35889 35890 35891 35892 35893 35894 35895 35896 |
# File 'lib/pago/v2026_04/models.rb', line 35881 def initialize( created_at:, modified_at:, id:, applies_at:, product_id:, seats: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:applies_at, applies_at) assign(:product_id, product_id) assign(:seats, seats) end |
Instance Attribute Details
#applies_at ⇒ String (readonly)
The date and time when the subscription update will be applied.
35871 35872 35873 |
# File 'lib/pago/v2026_04/models.rb', line 35871 def applies_at @applies_at end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
35859 35860 35861 |
# File 'lib/pago/v2026_04/models.rb', line 35859 def created_at @created_at end |
#id ⇒ String (readonly)
The ID of the object.
35867 35868 35869 |
# File 'lib/pago/v2026_04/models.rb', line 35867 def id @id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
35863 35864 35865 |
# File 'lib/pago/v2026_04/models.rb', line 35863 def modified_at @modified_at end |
#product_id ⇒ String? (readonly)
ID of the new product to apply to the subscription. If null, the product won't be changed.
35875 35876 35877 |
# File 'lib/pago/v2026_04/models.rb', line 35875 def product_id @product_id end |
#seats ⇒ Integer? (readonly)
Number of seats to apply to the subscription. If null, the number of seats won't be changed.
35879 35880 35881 |
# File 'lib/pago/v2026_04/models.rb', line 35879 def seats @seats end |
Class Method Details
.from_json(data) ⇒ PendingSubscriptionUpdate?
35900 35901 35902 35903 35904 35905 35906 35907 35908 35909 35910 35911 35912 35913 35914 35915 35916 |
# File 'lib/pago/v2026_04/models.rb', line 35900 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( created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), id: (data.key?("id") ? data["id"] : ::Pago::UNSET), applies_at: (data.key?("applies_at") ? data["applies_at"] : ::Pago::UNSET), product_id: (data.key?("product_id") ? data["product_id"] : ::Pago::UNSET), seats: (data.key?("seats") ? data["seats"] : ::Pago::UNSET) ), data ) end |