Class: Pago::V2026_04::Models::BenefitDiscordSubscriberProperties
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
Properties available to subscribers for a benefit of type discord.
Constant Summary collapse
- JSON_KEYS =
{ guild_id: "guild_id" }.freeze
- REQUIRED_KEYS =
["guild_id"].freeze
Instance Attribute Summary collapse
-
#guild_id ⇒ String
readonly
The ID of the Discord server.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(guild_id:) ⇒ BenefitDiscordSubscriberProperties
constructor
A new instance of BenefitDiscordSubscriberProperties.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(guild_id:) ⇒ BenefitDiscordSubscriberProperties
Returns a new instance of BenefitDiscordSubscriberProperties.
3037 3038 3039 3040 3041 3042 |
# File 'lib/pago/v2026_04/models.rb', line 3037 def initialize( guild_id: ) super() assign(:guild_id, guild_id) end |
Instance Attribute Details
#guild_id ⇒ String (readonly)
The ID of the Discord server.
3035 3036 3037 |
# File 'lib/pago/v2026_04/models.rb', line 3035 def guild_id @guild_id end |
Class Method Details
.from_json(data) ⇒ BenefitDiscordSubscriberProperties?
3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 |
# File 'lib/pago/v2026_04/models.rb', line 3046 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( guild_id: (data.key?("guild_id") ? data["guild_id"] : ::Pago::UNSET) ), data ) end |