Class: Pago::V2026_04::Models::BenefitPublic
- 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", type: "type", description: "description", selectable: "selectable", deletable: "deletable", is_deleted: "is_deleted", organization_id: "organization_id" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "type", "description", "selectable", "deletable", "is_deleted", "organization_id"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#deletable ⇒ Boolean
readonly
Whether the benefit is deletable.
-
#description ⇒ String
readonly
The description of the benefit.
-
#id ⇒ String
readonly
The ID of the benefit.
-
#is_deleted ⇒ Boolean
readonly
Whether the benefit is deleted.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#organization_id ⇒ String
readonly
The ID of the organization owning the benefit.
-
#selectable ⇒ Boolean
readonly
Whether the benefit is selectable when creating a product.
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:) ⇒ BenefitPublic
constructor
A new instance of BenefitPublic.
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:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:) ⇒ BenefitPublic
Returns a new instance of BenefitPublic.
7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906 7907 7908 7909 7910 7911 7912 |
# File 'lib/pago/v2026_04/models.rb', line 7891 def initialize( id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id: ) super() assign(:id, id) assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:type, type) assign(:description, description) assign(:selectable, selectable) assign(:deletable, deletable) assign(:is_deleted, is_deleted) assign(:organization_id, organization_id) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
7862 7863 7864 |
# File 'lib/pago/v2026_04/models.rb', line 7862 def created_at @created_at end |
#deletable ⇒ Boolean (readonly)
Whether the benefit is deletable.
7881 7882 7883 |
# File 'lib/pago/v2026_04/models.rb', line 7881 def deletable @deletable end |
#description ⇒ String (readonly)
The description of the benefit.
7873 7874 7875 |
# File 'lib/pago/v2026_04/models.rb', line 7873 def description @description end |
#id ⇒ String (readonly)
The ID of the benefit.
7858 7859 7860 |
# File 'lib/pago/v2026_04/models.rb', line 7858 def id @id end |
#is_deleted ⇒ Boolean (readonly)
Whether the benefit is deleted.
7885 7886 7887 |
# File 'lib/pago/v2026_04/models.rb', line 7885 def is_deleted @is_deleted end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
7866 7867 7868 |
# File 'lib/pago/v2026_04/models.rb', line 7866 def modified_at @modified_at end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the benefit.
7889 7890 7891 |
# File 'lib/pago/v2026_04/models.rb', line 7889 def organization_id @organization_id end |
#selectable ⇒ Boolean (readonly)
Whether the benefit is selectable when creating a product.
7877 7878 7879 |
# File 'lib/pago/v2026_04/models.rb', line 7877 def selectable @selectable end |
#type ⇒ String (readonly)
7869 7870 7871 |
# File 'lib/pago/v2026_04/models.rb', line 7869 def type @type end |
Class Method Details
.from_json(data) ⇒ BenefitPublic?
7916 7917 7918 7919 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 7932 7933 7934 7935 |
# File 'lib/pago/v2026_04/models.rb', line 7916 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), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), description: (data.key?("description") ? data["description"] : ::Pago::UNSET), selectable: (data.key?("selectable") ? data["selectable"] : ::Pago::UNSET), deletable: (data.key?("deletable") ? data["deletable"] : ::Pago::UNSET), is_deleted: (data.key?("is_deleted") ? data["is_deleted"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET) ), data ) end |