Class: Pago::V2026_04::Models::BenefitGrantFeatureFlagWebhook
- 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::BenefitFeatureFlag 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::BenefitGrantFeatureFlagProperties? readonly
- #properties ⇒ Models::BenefitGrantFeatureFlagProperties 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) ⇒ BenefitGrantFeatureFlagWebhook
constructor
A new instance of BenefitGrantFeatureFlagWebhook.
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) ⇒ BenefitGrantFeatureFlagWebhook
Returns a new instance of BenefitGrantFeatureFlagWebhook.
5506 5507 5508 5509 5510 5511 5512 5513 5514 5515 5516 5517 5518 5519 5520 5521 5522 5523 5524 5525 5526 5527 5528 5529 5530 5531 5532 5533 5534 5535 5536 5537 5538 5539 5540 5541 5542 5543 5544 5545 |
# File 'lib/pago/v2026_04/models.rb', line 5506 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::BenefitFeatureFlag (readonly)
5498 5499 5500 |
# File 'lib/pago/v2026_04/models.rb', line 5498 def benefit @benefit end |
#benefit_id ⇒ String (readonly)
The ID of the benefit concerned by this grant.
5485 5486 5487 |
# File 'lib/pago/v2026_04/models.rb', line 5485 def benefit_id @benefit_id end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
5441 5442 5443 |
# File 'lib/pago/v2026_04/models.rb', line 5441 def created_at @created_at end |
#customer ⇒ Object (readonly)
5492 5493 5494 |
# File 'lib/pago/v2026_04/models.rb', line 5492 def customer @customer end |
#customer_id ⇒ String (readonly)
The ID of the customer concerned by this grant.
5477 5478 5479 |
# File 'lib/pago/v2026_04/models.rb', line 5477 def customer_id @customer_id end |
#error ⇒ Models::BenefitGrantError? (readonly)
The error information if the benefit grant failed with an unrecoverable error.
5489 5490 5491 |
# File 'lib/pago/v2026_04/models.rb', line 5489 def error @error end |
#granted_at ⇒ String? (readonly)
The timestamp when the benefit was granted. If None, the benefit is not granted.
5453 5454 5455 |
# File 'lib/pago/v2026_04/models.rb', line 5453 def granted_at @granted_at end |
#id ⇒ String (readonly)
The ID of the grant.
5449 5450 5451 |
# File 'lib/pago/v2026_04/models.rb', line 5449 def id @id end |
#is_granted ⇒ Boolean (readonly)
Whether the benefit is granted.
5457 5458 5459 |
# File 'lib/pago/v2026_04/models.rb', line 5457 def is_granted @is_granted end |
#is_revoked ⇒ Boolean (readonly)
Whether the benefit is revoked.
5465 5466 5467 |
# File 'lib/pago/v2026_04/models.rb', line 5465 def is_revoked @is_revoked end |
#member ⇒ Models::Member? (readonly)
5495 5496 5497 |
# File 'lib/pago/v2026_04/models.rb', line 5495 def member @member end |
#member_id ⇒ String? (readonly)
The ID of the member concerned by this grant.
5481 5482 5483 |
# File 'lib/pago/v2026_04/models.rb', line 5481 def member_id @member_id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
5445 5446 5447 |
# File 'lib/pago/v2026_04/models.rb', line 5445 def modified_at @modified_at end |
#order_id ⇒ String? (readonly)
The ID of the order that granted this benefit.
5473 5474 5475 |
# File 'lib/pago/v2026_04/models.rb', line 5473 def order_id @order_id end |
#previous_properties ⇒ Models::BenefitGrantFeatureFlagProperties? (readonly)
5504 5505 5506 |
# File 'lib/pago/v2026_04/models.rb', line 5504 def previous_properties @previous_properties end |
#properties ⇒ Models::BenefitGrantFeatureFlagProperties (readonly)
5501 5502 5503 |
# File 'lib/pago/v2026_04/models.rb', line 5501 def properties @properties end |
#revoked_at ⇒ String? (readonly)
The timestamp when the benefit was revoked. If None, the benefit is not revoked.
5461 5462 5463 |
# File 'lib/pago/v2026_04/models.rb', line 5461 def revoked_at @revoked_at end |
#subscription_id ⇒ String? (readonly)
The ID of the subscription that granted this benefit.
5469 5470 5471 |
# File 'lib/pago/v2026_04/models.rb', line 5469 def subscription_id @subscription_id end |
Class Method Details
.from_json(data) ⇒ BenefitGrantFeatureFlagWebhook?
5549 5550 5551 5552 5553 5554 5555 5556 5557 5558 5559 5560 5561 5562 5563 5564 5565 5566 5567 5568 5569 5570 5571 5572 5573 5574 5575 5576 5577 |
# File 'lib/pago/v2026_04/models.rb', line 5549 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::BenefitFeatureFlag.from_json(data["benefit"]) : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitGrantFeatureFlagProperties.from_json(data["properties"]) : ::Pago::UNSET), previous_properties: (data.key?("previous_properties") ? Models::BenefitGrantFeatureFlagProperties.from_json(data["previous_properties"]) : ::Pago::UNSET) ), data ) end |