Class: Pago::V2026_04::Models::BenefitGrantLicenseKeysWebhook
- 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::BenefitLicenseKeys 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::BenefitGrantLicenseKeysProperties? readonly
- #properties ⇒ Models::BenefitGrantLicenseKeysProperties 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) ⇒ BenefitGrantLicenseKeysWebhook
constructor
A new instance of BenefitGrantLicenseKeysWebhook.
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) ⇒ BenefitGrantLicenseKeysWebhook
Returns a new instance of BenefitGrantLicenseKeysWebhook.
5940 5941 5942 5943 5944 5945 5946 5947 5948 5949 5950 5951 5952 5953 5954 5955 5956 5957 5958 5959 5960 5961 5962 5963 5964 5965 5966 5967 5968 5969 5970 5971 5972 5973 5974 5975 5976 5977 5978 5979 |
# File 'lib/pago/v2026_04/models.rb', line 5940 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::BenefitLicenseKeys (readonly)
5932 5933 5934 |
# File 'lib/pago/v2026_04/models.rb', line 5932 def benefit @benefit end |
#benefit_id ⇒ String (readonly)
The ID of the benefit concerned by this grant.
5919 5920 5921 |
# File 'lib/pago/v2026_04/models.rb', line 5919 def benefit_id @benefit_id end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
5875 5876 5877 |
# File 'lib/pago/v2026_04/models.rb', line 5875 def created_at @created_at end |
#customer ⇒ Object (readonly)
5926 5927 5928 |
# File 'lib/pago/v2026_04/models.rb', line 5926 def customer @customer end |
#customer_id ⇒ String (readonly)
The ID of the customer concerned by this grant.
5911 5912 5913 |
# File 'lib/pago/v2026_04/models.rb', line 5911 def customer_id @customer_id end |
#error ⇒ Models::BenefitGrantError? (readonly)
The error information if the benefit grant failed with an unrecoverable error.
5923 5924 5925 |
# File 'lib/pago/v2026_04/models.rb', line 5923 def error @error end |
#granted_at ⇒ String? (readonly)
The timestamp when the benefit was granted. If None, the benefit is not granted.
5887 5888 5889 |
# File 'lib/pago/v2026_04/models.rb', line 5887 def granted_at @granted_at end |
#id ⇒ String (readonly)
The ID of the grant.
5883 5884 5885 |
# File 'lib/pago/v2026_04/models.rb', line 5883 def id @id end |
#is_granted ⇒ Boolean (readonly)
Whether the benefit is granted.
5891 5892 5893 |
# File 'lib/pago/v2026_04/models.rb', line 5891 def is_granted @is_granted end |
#is_revoked ⇒ Boolean (readonly)
Whether the benefit is revoked.
5899 5900 5901 |
# File 'lib/pago/v2026_04/models.rb', line 5899 def is_revoked @is_revoked end |
#member ⇒ Models::Member? (readonly)
5929 5930 5931 |
# File 'lib/pago/v2026_04/models.rb', line 5929 def member @member end |
#member_id ⇒ String? (readonly)
The ID of the member concerned by this grant.
5915 5916 5917 |
# File 'lib/pago/v2026_04/models.rb', line 5915 def member_id @member_id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
5879 5880 5881 |
# File 'lib/pago/v2026_04/models.rb', line 5879 def modified_at @modified_at end |
#order_id ⇒ String? (readonly)
The ID of the order that granted this benefit.
5907 5908 5909 |
# File 'lib/pago/v2026_04/models.rb', line 5907 def order_id @order_id end |
#previous_properties ⇒ Models::BenefitGrantLicenseKeysProperties? (readonly)
5938 5939 5940 |
# File 'lib/pago/v2026_04/models.rb', line 5938 def previous_properties @previous_properties end |
#properties ⇒ Models::BenefitGrantLicenseKeysProperties (readonly)
5935 5936 5937 |
# File 'lib/pago/v2026_04/models.rb', line 5935 def properties @properties end |
#revoked_at ⇒ String? (readonly)
The timestamp when the benefit was revoked. If None, the benefit is not revoked.
5895 5896 5897 |
# File 'lib/pago/v2026_04/models.rb', line 5895 def revoked_at @revoked_at end |
#subscription_id ⇒ String? (readonly)
The ID of the subscription that granted this benefit.
5903 5904 5905 |
# File 'lib/pago/v2026_04/models.rb', line 5903 def subscription_id @subscription_id end |
Class Method Details
.from_json(data) ⇒ BenefitGrantLicenseKeysWebhook?
5983 5984 5985 5986 5987 5988 5989 5990 5991 5992 5993 5994 5995 5996 5997 5998 5999 6000 6001 6002 6003 6004 6005 6006 6007 6008 6009 6010 6011 |
# File 'lib/pago/v2026_04/models.rb', line 5983 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::BenefitLicenseKeys.from_json(data["benefit"]) : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitGrantLicenseKeysProperties.from_json(data["properties"]) : ::Pago::UNSET), previous_properties: (data.key?("previous_properties") ? Models::BenefitGrantLicenseKeysProperties.from_json(data["previous_properties"]) : ::Pago::UNSET) ), data ) end |