Class: Pago::V2026_04::Models::BenefitGrantDiscordWebhook
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ created_at: "created_at", modified_at: "modified_at", id: "id", granted_at: "granted_at", is_granted: "is_granted", revoked_at: "revoked_at", is_revoked: "is_revoked", subscription_id: "subscription_id", order_id: "order_id", customer_id: "customer_id", member_id: "member_id", benefit_id: "benefit_id", error: "error", customer: "customer", member: "member", benefit: "benefit", properties: "properties", previous_properties: "previous_properties" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "is_granted", "is_revoked", "subscription_id", "order_id", "customer_id", "benefit_id", "customer", "benefit", "properties"].freeze
Instance Attribute Summary collapse
- #benefit ⇒ Models::BenefitDiscord readonly
-
#benefit_id ⇒ String
readonly
The ID of the benefit concerned by this grant.
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
- #customer ⇒ Object readonly
-
#customer_id ⇒ String
readonly
The ID of the customer concerned by this grant.
-
#error ⇒ Models::BenefitGrantError?
readonly
The error information if the benefit grant failed with an unrecoverable error.
-
#granted_at ⇒ String?
readonly
The timestamp when the benefit was granted.
-
#id ⇒ String
readonly
The ID of the grant.
-
#is_granted ⇒ Boolean
readonly
Whether the benefit is granted.
-
#is_revoked ⇒ Boolean
readonly
Whether the benefit is revoked.
- #member ⇒ Models::Member? readonly
-
#member_id ⇒ String?
readonly
The ID of the member concerned by this grant.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#order_id ⇒ String?
readonly
The ID of the order that granted this benefit.
- #previous_properties ⇒ Models::BenefitGrantDiscordProperties? readonly
- #properties ⇒ Models::BenefitGrantDiscordProperties readonly
-
#revoked_at ⇒ String?
readonly
The timestamp when the benefit was revoked.
-
#subscription_id ⇒ String?
readonly
The ID of the subscription that granted this benefit.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, granted_at: ::Pago::UNSET, is_granted:, revoked_at: ::Pago::UNSET, is_revoked:, subscription_id:, order_id:, customer_id:, member_id: ::Pago::UNSET, benefit_id:, error: ::Pago::UNSET, customer:, member: ::Pago::UNSET, benefit:, properties:, previous_properties: ::Pago::UNSET) ⇒ BenefitGrantDiscordWebhook
constructor
A new instance of BenefitGrantDiscordWebhook.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(created_at:, modified_at:, id:, granted_at: ::Pago::UNSET, is_granted:, revoked_at: ::Pago::UNSET, is_revoked:, subscription_id:, order_id:, customer_id:, member_id: ::Pago::UNSET, benefit_id:, error: ::Pago::UNSET, customer:, member: ::Pago::UNSET, benefit:, properties:, previous_properties: ::Pago::UNSET) ⇒ BenefitGrantDiscordWebhook
Returns a new instance of BenefitGrantDiscordWebhook.
5080 5081 5082 5083 5084 5085 5086 5087 5088 5089 5090 5091 5092 5093 5094 5095 5096 5097 5098 5099 5100 5101 5102 5103 5104 5105 5106 5107 5108 5109 5110 5111 5112 5113 5114 5115 5116 5117 5118 5119 |
# File 'lib/pago/v2026_04/models.rb', line 5080 def initialize( created_at:, modified_at:, id:, granted_at: ::Pago::UNSET, is_granted:, revoked_at: ::Pago::UNSET, is_revoked:, subscription_id:, order_id:, customer_id:, member_id: ::Pago::UNSET, benefit_id:, error: ::Pago::UNSET, customer:, member: ::Pago::UNSET, benefit:, properties:, previous_properties: ::Pago::UNSET ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:granted_at, granted_at) assign(:is_granted, is_granted) assign(:revoked_at, revoked_at) assign(:is_revoked, is_revoked) assign(:subscription_id, subscription_id) assign(:order_id, order_id) assign(:customer_id, customer_id) assign(:member_id, member_id) assign(:benefit_id, benefit_id) assign(:error, error) assign(:customer, customer) assign(:member, member) assign(:benefit, benefit) assign(:properties, properties) assign(:previous_properties, previous_properties) end |
Instance Attribute Details
#benefit ⇒ Models::BenefitDiscord (readonly)
5072 5073 5074 |
# File 'lib/pago/v2026_04/models.rb', line 5072 def benefit @benefit end |
#benefit_id ⇒ String (readonly)
The ID of the benefit concerned by this grant.
5059 5060 5061 |
# File 'lib/pago/v2026_04/models.rb', line 5059 def benefit_id @benefit_id end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
5015 5016 5017 |
# File 'lib/pago/v2026_04/models.rb', line 5015 def created_at @created_at end |
#customer ⇒ Object (readonly)
5066 5067 5068 |
# File 'lib/pago/v2026_04/models.rb', line 5066 def customer @customer end |
#customer_id ⇒ String (readonly)
The ID of the customer concerned by this grant.
5051 5052 5053 |
# File 'lib/pago/v2026_04/models.rb', line 5051 def customer_id @customer_id end |
#error ⇒ Models::BenefitGrantError? (readonly)
The error information if the benefit grant failed with an unrecoverable error.
5063 5064 5065 |
# File 'lib/pago/v2026_04/models.rb', line 5063 def error @error end |
#granted_at ⇒ String? (readonly)
The timestamp when the benefit was granted. If None, the benefit is not granted.
5027 5028 5029 |
# File 'lib/pago/v2026_04/models.rb', line 5027 def granted_at @granted_at end |
#id ⇒ String (readonly)
The ID of the grant.
5023 5024 5025 |
# File 'lib/pago/v2026_04/models.rb', line 5023 def id @id end |
#is_granted ⇒ Boolean (readonly)
Whether the benefit is granted.
5031 5032 5033 |
# File 'lib/pago/v2026_04/models.rb', line 5031 def is_granted @is_granted end |
#is_revoked ⇒ Boolean (readonly)
Whether the benefit is revoked.
5039 5040 5041 |
# File 'lib/pago/v2026_04/models.rb', line 5039 def is_revoked @is_revoked end |
#member ⇒ Models::Member? (readonly)
5069 5070 5071 |
# File 'lib/pago/v2026_04/models.rb', line 5069 def member @member end |
#member_id ⇒ String? (readonly)
The ID of the member concerned by this grant.
5055 5056 5057 |
# File 'lib/pago/v2026_04/models.rb', line 5055 def member_id @member_id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
5019 5020 5021 |
# File 'lib/pago/v2026_04/models.rb', line 5019 def modified_at @modified_at end |
#order_id ⇒ String? (readonly)
The ID of the order that granted this benefit.
5047 5048 5049 |
# File 'lib/pago/v2026_04/models.rb', line 5047 def order_id @order_id end |
#previous_properties ⇒ Models::BenefitGrantDiscordProperties? (readonly)
5078 5079 5080 |
# File 'lib/pago/v2026_04/models.rb', line 5078 def previous_properties @previous_properties end |
#properties ⇒ Models::BenefitGrantDiscordProperties (readonly)
5075 5076 5077 |
# File 'lib/pago/v2026_04/models.rb', line 5075 def properties @properties end |
#revoked_at ⇒ String? (readonly)
The timestamp when the benefit was revoked. If None, the benefit is not revoked.
5035 5036 5037 |
# File 'lib/pago/v2026_04/models.rb', line 5035 def revoked_at @revoked_at end |
#subscription_id ⇒ String? (readonly)
The ID of the subscription that granted this benefit.
5043 5044 5045 |
# File 'lib/pago/v2026_04/models.rb', line 5043 def subscription_id @subscription_id end |
Class Method Details
.from_json(data) ⇒ BenefitGrantDiscordWebhook?
5123 5124 5125 5126 5127 5128 5129 5130 5131 5132 5133 5134 5135 5136 5137 5138 5139 5140 5141 5142 5143 5144 5145 5146 5147 5148 5149 5150 5151 |
# File 'lib/pago/v2026_04/models.rb', line 5123 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( created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), id: (data.key?("id") ? data["id"] : ::Pago::UNSET), granted_at: (data.key?("granted_at") ? data["granted_at"] : ::Pago::UNSET), is_granted: (data.key?("is_granted") ? data["is_granted"] : ::Pago::UNSET), revoked_at: (data.key?("revoked_at") ? data["revoked_at"] : ::Pago::UNSET), is_revoked: (data.key?("is_revoked") ? data["is_revoked"] : ::Pago::UNSET), subscription_id: (data.key?("subscription_id") ? data["subscription_id"] : ::Pago::UNSET), order_id: (data.key?("order_id") ? data["order_id"] : ::Pago::UNSET), customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET), member_id: (data.key?("member_id") ? data["member_id"] : ::Pago::UNSET), benefit_id: (data.key?("benefit_id") ? data["benefit_id"] : ::Pago::UNSET), error: (data.key?("error") ? Models::BenefitGrantError.from_json(data["error"]) : ::Pago::UNSET), customer: (data.key?("customer") ? Unions::Customer.from_json(data["customer"]) : ::Pago::UNSET), member: (data.key?("member") ? Models::Member.from_json(data["member"]) : ::Pago::UNSET), benefit: (data.key?("benefit") ? Models::BenefitDiscord.from_json(data["benefit"]) : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitGrantDiscordProperties.from_json(data["properties"]) : ::Pago::UNSET), previous_properties: (data.key?("previous_properties") ? Models::BenefitGrantDiscordProperties.from_json(data["previous_properties"]) : ::Pago::UNSET) ), data ) end |