Class: Pago::V2026_04::Models::ValidatedLicenseKey
- 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", activation: "activation" }.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"].freeze
Instance Attribute Summary collapse
- #activation ⇒ 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:, activation: ::Pago::UNSET) ⇒ ValidatedLicenseKey
constructor
A new instance of ValidatedLicenseKey.
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:, activation: ::Pago::UNSET) ⇒ ValidatedLicenseKey
Returns a new instance of ValidatedLicenseKey.
43908 43909 43910 43911 43912 43913 43914 43915 43916 43917 43918 43919 43920 43921 43922 43923 43924 43925 43926 43927 43928 43929 43930 43931 43932 43933 43934 43935 43936 43937 43938 43939 43940 43941 43942 43943 43944 43945 |
# File 'lib/pago/v2026_04/models.rb', line 43908 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:, activation: ::Pago::UNSET ) 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(:activation, activation) end |
Instance Attribute Details
#activation ⇒ Models::LicenseKeyActivationBase? (readonly)
43906 43907 43908 |
# File 'lib/pago/v2026_04/models.rb', line 43906 def activation @activation end |
#benefit_id ⇒ String (readonly)
The benefit ID.
43876 43877 43878 |
# File 'lib/pago/v2026_04/models.rb', line 43876 def benefit_id @benefit_id end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
43859 43860 43861 |
# File 'lib/pago/v2026_04/models.rb', line 43859 def created_at @created_at end |
#customer ⇒ Models::LicenseKeyCustomer (readonly)
43872 43873 43874 |
# File 'lib/pago/v2026_04/models.rb', line 43872 def customer @customer end |
#customer_id ⇒ String (readonly)
43869 43870 43871 |
# File 'lib/pago/v2026_04/models.rb', line 43869 def customer_id @customer_id end |
#display_key ⇒ String (readonly)
43882 43883 43884 |
# File 'lib/pago/v2026_04/models.rb', line 43882 def display_key @display_key end |
#expires_at ⇒ String? (readonly)
43903 43904 43905 |
# File 'lib/pago/v2026_04/models.rb', line 43903 def expires_at @expires_at end |
#id ⇒ String (readonly)
The ID of the object.
43855 43856 43857 |
# File 'lib/pago/v2026_04/models.rb', line 43855 def id @id end |
#key ⇒ String (readonly)
43879 43880 43881 |
# File 'lib/pago/v2026_04/models.rb', line 43879 def key @key end |
#last_validated_at ⇒ String? (readonly)
43900 43901 43902 |
# File 'lib/pago/v2026_04/models.rb', line 43900 def last_validated_at @last_validated_at end |
#limit_activations ⇒ Integer? (readonly)
43888 43889 43890 |
# File 'lib/pago/v2026_04/models.rb', line 43888 def limit_activations @limit_activations end |
#limit_usage ⇒ Integer? (readonly)
43894 43895 43896 |
# File 'lib/pago/v2026_04/models.rb', line 43894 def limit_usage @limit_usage end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
43863 43864 43865 |
# File 'lib/pago/v2026_04/models.rb', line 43863 def modified_at @modified_at end |
#organization_id ⇒ String (readonly)
43866 43867 43868 |
# File 'lib/pago/v2026_04/models.rb', line 43866 def organization_id @organization_id end |
#status ⇒ String (readonly)
43885 43886 43887 |
# File 'lib/pago/v2026_04/models.rb', line 43885 def status @status end |
#usage ⇒ Integer (readonly)
43891 43892 43893 |
# File 'lib/pago/v2026_04/models.rb', line 43891 def usage @usage end |
#validations ⇒ Integer (readonly)
43897 43898 43899 |
# File 'lib/pago/v2026_04/models.rb', line 43897 def validations @validations end |
Class Method Details
.from_json(data) ⇒ ValidatedLicenseKey?
43949 43950 43951 43952 43953 43954 43955 43956 43957 43958 43959 43960 43961 43962 43963 43964 43965 43966 43967 43968 43969 43970 43971 43972 43973 43974 43975 43976 |
# File 'lib/pago/v2026_04/models.rb', line 43949 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), activation: (data.key?("activation") ? Models::LicenseKeyActivationBase.from_json(data["activation"]) : ::Pago::UNSET) ), data ) end |