Class: Pago::V2026_04::Models::BenefitGrantDownloadablesWebhook
- 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::BenefitDownloadables 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::BenefitGrantDownloadablesProperties? readonly
- #properties ⇒ Models::BenefitGrantDownloadablesProperties 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) ⇒ BenefitGrantDownloadablesWebhook
constructor
A new instance of BenefitGrantDownloadablesWebhook.
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) ⇒ BenefitGrantDownloadablesWebhook
Returns a new instance of BenefitGrantDownloadablesWebhook.
5276 5277 5278 5279 5280 5281 5282 5283 5284 5285 5286 5287 5288 5289 5290 5291 5292 5293 5294 5295 5296 5297 5298 5299 5300 5301 5302 5303 5304 5305 5306 5307 5308 5309 5310 5311 5312 5313 5314 5315 |
# File 'lib/pago/v2026_04/models.rb', line 5276 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::BenefitDownloadables (readonly)
5268 5269 5270 |
# File 'lib/pago/v2026_04/models.rb', line 5268 def benefit @benefit end |
#benefit_id ⇒ String (readonly)
The ID of the benefit concerned by this grant.
5255 5256 5257 |
# File 'lib/pago/v2026_04/models.rb', line 5255 def benefit_id @benefit_id end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
5211 5212 5213 |
# File 'lib/pago/v2026_04/models.rb', line 5211 def created_at @created_at end |
#customer ⇒ Object (readonly)
5262 5263 5264 |
# File 'lib/pago/v2026_04/models.rb', line 5262 def customer @customer end |
#customer_id ⇒ String (readonly)
The ID of the customer concerned by this grant.
5247 5248 5249 |
# File 'lib/pago/v2026_04/models.rb', line 5247 def customer_id @customer_id end |
#error ⇒ Models::BenefitGrantError? (readonly)
The error information if the benefit grant failed with an unrecoverable error.
5259 5260 5261 |
# File 'lib/pago/v2026_04/models.rb', line 5259 def error @error end |
#granted_at ⇒ String? (readonly)
The timestamp when the benefit was granted. If None, the benefit is not granted.
5223 5224 5225 |
# File 'lib/pago/v2026_04/models.rb', line 5223 def granted_at @granted_at end |
#id ⇒ String (readonly)
The ID of the grant.
5219 5220 5221 |
# File 'lib/pago/v2026_04/models.rb', line 5219 def id @id end |
#is_granted ⇒ Boolean (readonly)
Whether the benefit is granted.
5227 5228 5229 |
# File 'lib/pago/v2026_04/models.rb', line 5227 def is_granted @is_granted end |
#is_revoked ⇒ Boolean (readonly)
Whether the benefit is revoked.
5235 5236 5237 |
# File 'lib/pago/v2026_04/models.rb', line 5235 def is_revoked @is_revoked end |
#member ⇒ Models::Member? (readonly)
5265 5266 5267 |
# File 'lib/pago/v2026_04/models.rb', line 5265 def member @member end |
#member_id ⇒ String? (readonly)
The ID of the member concerned by this grant.
5251 5252 5253 |
# File 'lib/pago/v2026_04/models.rb', line 5251 def member_id @member_id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
5215 5216 5217 |
# File 'lib/pago/v2026_04/models.rb', line 5215 def modified_at @modified_at end |
#order_id ⇒ String? (readonly)
The ID of the order that granted this benefit.
5243 5244 5245 |
# File 'lib/pago/v2026_04/models.rb', line 5243 def order_id @order_id end |
#previous_properties ⇒ Models::BenefitGrantDownloadablesProperties? (readonly)
5274 5275 5276 |
# File 'lib/pago/v2026_04/models.rb', line 5274 def previous_properties @previous_properties end |
#properties ⇒ Models::BenefitGrantDownloadablesProperties (readonly)
5271 5272 5273 |
# File 'lib/pago/v2026_04/models.rb', line 5271 def properties @properties end |
#revoked_at ⇒ String? (readonly)
The timestamp when the benefit was revoked. If None, the benefit is not revoked.
5231 5232 5233 |
# File 'lib/pago/v2026_04/models.rb', line 5231 def revoked_at @revoked_at end |
#subscription_id ⇒ String? (readonly)
The ID of the subscription that granted this benefit.
5239 5240 5241 |
# File 'lib/pago/v2026_04/models.rb', line 5239 def subscription_id @subscription_id end |
Class Method Details
.from_json(data) ⇒ BenefitGrantDownloadablesWebhook?
5319 5320 5321 5322 5323 5324 5325 5326 5327 5328 5329 5330 5331 5332 5333 5334 5335 5336 5337 5338 5339 5340 5341 5342 5343 5344 5345 5346 5347 |
# File 'lib/pago/v2026_04/models.rb', line 5319 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::BenefitDownloadables.from_json(data["benefit"]) : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitGrantDownloadablesProperties.from_json(data["properties"]) : ::Pago::UNSET), previous_properties: (data.key?("previous_properties") ? Models::BenefitGrantDownloadablesProperties.from_json(data["previous_properties"]) : ::Pago::UNSET) ), data ) end |