Class: Pago::V2026_04::Models::BenefitDiscordSubscriber
- 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", organization: "organization", properties: "properties" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "type", "description", "selectable", "deletable", "is_deleted", "organization_id", "organization", "properties"].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 ⇒ Models::BenefitSubscriberOrganization readonly
-
#organization_id ⇒ String
readonly
The ID of the organization owning the benefit.
- #properties ⇒ Models::BenefitDiscordSubscriberProperties readonly
-
#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:, organization:, properties:) ⇒ BenefitDiscordSubscriber
constructor
A new instance of BenefitDiscordSubscriber.
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:, organization:, properties:) ⇒ BenefitDiscordSubscriber
Returns a new instance of BenefitDiscordSubscriber.
2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 |
# File 'lib/pago/v2026_04/models.rb', line 2973 def initialize( id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:, organization:, properties: ) 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) assign(:organization, organization) assign(:properties, properties) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
2938 2939 2940 |
# File 'lib/pago/v2026_04/models.rb', line 2938 def created_at @created_at end |
#deletable ⇒ Boolean (readonly)
Whether the benefit is deletable.
2957 2958 2959 |
# File 'lib/pago/v2026_04/models.rb', line 2957 def deletable @deletable end |
#description ⇒ String (readonly)
The description of the benefit.
2949 2950 2951 |
# File 'lib/pago/v2026_04/models.rb', line 2949 def description @description end |
#id ⇒ String (readonly)
The ID of the benefit.
2934 2935 2936 |
# File 'lib/pago/v2026_04/models.rb', line 2934 def id @id end |
#is_deleted ⇒ Boolean (readonly)
Whether the benefit is deleted.
2961 2962 2963 |
# File 'lib/pago/v2026_04/models.rb', line 2961 def is_deleted @is_deleted end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
2942 2943 2944 |
# File 'lib/pago/v2026_04/models.rb', line 2942 def modified_at @modified_at end |
#organization ⇒ Models::BenefitSubscriberOrganization (readonly)
2968 2969 2970 |
# File 'lib/pago/v2026_04/models.rb', line 2968 def organization @organization end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the benefit.
2965 2966 2967 |
# File 'lib/pago/v2026_04/models.rb', line 2965 def organization_id @organization_id end |
#properties ⇒ Models::BenefitDiscordSubscriberProperties (readonly)
2971 2972 2973 |
# File 'lib/pago/v2026_04/models.rb', line 2971 def properties @properties end |
#selectable ⇒ Boolean (readonly)
Whether the benefit is selectable when creating a product.
2953 2954 2955 |
# File 'lib/pago/v2026_04/models.rb', line 2953 def selectable @selectable end |
#type ⇒ String (readonly)
2945 2946 2947 |
# File 'lib/pago/v2026_04/models.rb', line 2945 def type @type end |
Class Method Details
.from_json(data) ⇒ BenefitDiscordSubscriber?
3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 |
# File 'lib/pago/v2026_04/models.rb', line 3002 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), organization: (data.key?("organization") ? Models::BenefitSubscriberOrganization.from_json(data["organization"]) : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitDiscordSubscriberProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |