Class: Pago::V2026_04::Models::LicenseKeyWithActivations
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ id: "id", created_at: "created_at", modified_at: "modified_at", organization_id: "organization_id", customer_id: "customer_id", customer: "customer", benefit_id: "benefit_id", key: "key", display_key: "display_key", status: "status", limit_activations: "limit_activations", usage: "usage", limit_usage: "limit_usage", validations: "validations", last_validated_at: "last_validated_at", expires_at: "expires_at", activations: "activations" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "organization_id", "customer_id", "customer", "benefit_id", "key", "display_key", "status", "limit_activations", "usage", "limit_usage", "validations", "last_validated_at", "expires_at", "activations"].freeze
Instance Attribute Summary collapse
- #activations ⇒ Array<Models::LicenseKeyActivationBase> readonly
-
#benefit_id ⇒ String
readonly
The benefit ID.
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
- #customer ⇒ Models::LicenseKeyCustomer readonly
- #customer_id ⇒ String readonly
- #display_key ⇒ String readonly
- #expires_at ⇒ String? readonly
-
#id ⇒ String
readonly
The ID of the object.
- #key ⇒ String readonly
- #last_validated_at ⇒ String? readonly
- #limit_activations ⇒ Integer? readonly
- #limit_usage ⇒ Integer? readonly
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
- #organization_id ⇒ String readonly
- #status ⇒ String readonly
- #usage ⇒ Integer readonly
- #validations ⇒ Integer readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, modified_at:, organization_id:, customer_id:, customer:, benefit_id:, key:, display_key:, status:, limit_activations:, usage:, limit_usage:, validations:, last_validated_at:, expires_at:, activations:) ⇒ LicenseKeyWithActivations
constructor
A new instance of LicenseKeyWithActivations.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(id:, created_at:, modified_at:, organization_id:, customer_id:, customer:, benefit_id:, key:, display_key:, status:, limit_activations:, usage:, limit_usage:, validations:, last_validated_at:, expires_at:, activations:) ⇒ LicenseKeyWithActivations
Returns a new instance of LicenseKeyWithActivations.
27324 27325 27326 27327 27328 27329 27330 27331 27332 27333 27334 27335 27336 27337 27338 27339 27340 27341 27342 27343 27344 27345 27346 27347 27348 27349 27350 27351 27352 27353 27354 27355 27356 27357 27358 27359 27360 27361 |
# File 'lib/pago/v2026_04/models.rb', line 27324 def initialize( id:, created_at:, modified_at:, organization_id:, customer_id:, customer:, benefit_id:, key:, display_key:, status:, limit_activations:, usage:, limit_usage:, validations:, last_validated_at:, expires_at:, activations: ) super() assign(:id, id) assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:organization_id, organization_id) assign(:customer_id, customer_id) assign(:customer, customer) assign(:benefit_id, benefit_id) assign(:key, key) assign(:display_key, display_key) assign(:status, status) assign(:limit_activations, limit_activations) assign(:usage, usage) assign(:limit_usage, limit_usage) assign(:validations, validations) assign(:last_validated_at, last_validated_at) assign(:expires_at, expires_at) assign(:activations, activations) end |
Instance Attribute Details
#activations ⇒ Array<Models::LicenseKeyActivationBase> (readonly)
27322 27323 27324 |
# File 'lib/pago/v2026_04/models.rb', line 27322 def activations @activations end |
#benefit_id ⇒ String (readonly)
The benefit ID.
27292 27293 27294 |
# File 'lib/pago/v2026_04/models.rb', line 27292 def benefit_id @benefit_id end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
27275 27276 27277 |
# File 'lib/pago/v2026_04/models.rb', line 27275 def created_at @created_at end |
#customer ⇒ Models::LicenseKeyCustomer (readonly)
27288 27289 27290 |
# File 'lib/pago/v2026_04/models.rb', line 27288 def customer @customer end |
#customer_id ⇒ String (readonly)
27285 27286 27287 |
# File 'lib/pago/v2026_04/models.rb', line 27285 def customer_id @customer_id end |
#display_key ⇒ String (readonly)
27298 27299 27300 |
# File 'lib/pago/v2026_04/models.rb', line 27298 def display_key @display_key end |
#expires_at ⇒ String? (readonly)
27319 27320 27321 |
# File 'lib/pago/v2026_04/models.rb', line 27319 def expires_at @expires_at end |
#id ⇒ String (readonly)
The ID of the object.
27271 27272 27273 |
# File 'lib/pago/v2026_04/models.rb', line 27271 def id @id end |
#key ⇒ String (readonly)
27295 27296 27297 |
# File 'lib/pago/v2026_04/models.rb', line 27295 def key @key end |
#last_validated_at ⇒ String? (readonly)
27316 27317 27318 |
# File 'lib/pago/v2026_04/models.rb', line 27316 def last_validated_at @last_validated_at end |
#limit_activations ⇒ Integer? (readonly)
27304 27305 27306 |
# File 'lib/pago/v2026_04/models.rb', line 27304 def limit_activations @limit_activations end |
#limit_usage ⇒ Integer? (readonly)
27310 27311 27312 |
# File 'lib/pago/v2026_04/models.rb', line 27310 def limit_usage @limit_usage end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
27279 27280 27281 |
# File 'lib/pago/v2026_04/models.rb', line 27279 def modified_at @modified_at end |
#organization_id ⇒ String (readonly)
27282 27283 27284 |
# File 'lib/pago/v2026_04/models.rb', line 27282 def organization_id @organization_id end |
#status ⇒ String (readonly)
27301 27302 27303 |
# File 'lib/pago/v2026_04/models.rb', line 27301 def status @status end |
#usage ⇒ Integer (readonly)
27307 27308 27309 |
# File 'lib/pago/v2026_04/models.rb', line 27307 def usage @usage end |
#validations ⇒ Integer (readonly)
27313 27314 27315 |
# File 'lib/pago/v2026_04/models.rb', line 27313 def validations @validations end |
Class Method Details
.from_json(data) ⇒ LicenseKeyWithActivations?
27365 27366 27367 27368 27369 27370 27371 27372 27373 27374 27375 27376 27377 27378 27379 27380 27381 27382 27383 27384 27385 27386 27387 27388 27389 27390 27391 27392 |
# File 'lib/pago/v2026_04/models.rb', line 27365 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( id: (data.key?("id") ? data["id"] : ::Pago::UNSET), created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET), customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET), customer: (data.key?("customer") ? Models::LicenseKeyCustomer.from_json(data["customer"]) : ::Pago::UNSET), benefit_id: (data.key?("benefit_id") ? data["benefit_id"] : ::Pago::UNSET), key: (data.key?("key") ? data["key"] : ::Pago::UNSET), display_key: (data.key?("display_key") ? data["display_key"] : ::Pago::UNSET), status: (data.key?("status") ? data["status"] : ::Pago::UNSET), limit_activations: (data.key?("limit_activations") ? data["limit_activations"] : ::Pago::UNSET), usage: (data.key?("usage") ? data["usage"] : ::Pago::UNSET), limit_usage: (data.key?("limit_usage") ? data["limit_usage"] : ::Pago::UNSET), validations: (data.key?("validations") ? data["validations"] : ::Pago::UNSET), last_validated_at: (data.key?("last_validated_at") ? data["last_validated_at"] : ::Pago::UNSET), expires_at: (data.key?("expires_at") ? data["expires_at"] : ::Pago::UNSET), activations: (data.key?("activations") ? ::Pago::Serde.array(data["activations"]) { |item0| Models::LicenseKeyActivationBase.from_json(item0) } : ::Pago::UNSET) ), data ) end |