Class: Pago::V2026_04::Models::BenefitGrantCustomWebhook
- 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::BenefitCustom 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::BenefitGrantCustomProperties? readonly
- #properties ⇒ Models::BenefitGrantCustomProperties 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) ⇒ BenefitGrantCustomWebhook
constructor
A new instance of BenefitGrantCustomWebhook.
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) ⇒ BenefitGrantCustomWebhook
Returns a new instance of BenefitGrantCustomWebhook.
4863 4864 4865 4866 4867 4868 4869 4870 4871 4872 4873 4874 4875 4876 4877 4878 4879 4880 4881 4882 4883 4884 4885 4886 4887 4888 4889 4890 4891 4892 4893 4894 4895 4896 4897 4898 4899 4900 4901 4902 |
# File 'lib/pago/v2026_04/models.rb', line 4863 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::BenefitCustom (readonly)
4855 4856 4857 |
# File 'lib/pago/v2026_04/models.rb', line 4855 def benefit @benefit end |
#benefit_id ⇒ String (readonly)
The ID of the benefit concerned by this grant.
4842 4843 4844 |
# File 'lib/pago/v2026_04/models.rb', line 4842 def benefit_id @benefit_id end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
4798 4799 4800 |
# File 'lib/pago/v2026_04/models.rb', line 4798 def created_at @created_at end |
#customer ⇒ Object (readonly)
4849 4850 4851 |
# File 'lib/pago/v2026_04/models.rb', line 4849 def customer @customer end |
#customer_id ⇒ String (readonly)
The ID of the customer concerned by this grant.
4834 4835 4836 |
# File 'lib/pago/v2026_04/models.rb', line 4834 def customer_id @customer_id end |
#error ⇒ Models::BenefitGrantError? (readonly)
The error information if the benefit grant failed with an unrecoverable error.
4846 4847 4848 |
# File 'lib/pago/v2026_04/models.rb', line 4846 def error @error end |
#granted_at ⇒ String? (readonly)
The timestamp when the benefit was granted. If None, the benefit is not granted.
4810 4811 4812 |
# File 'lib/pago/v2026_04/models.rb', line 4810 def granted_at @granted_at end |
#id ⇒ String (readonly)
The ID of the grant.
4806 4807 4808 |
# File 'lib/pago/v2026_04/models.rb', line 4806 def id @id end |
#is_granted ⇒ Boolean (readonly)
Whether the benefit is granted.
4814 4815 4816 |
# File 'lib/pago/v2026_04/models.rb', line 4814 def is_granted @is_granted end |
#is_revoked ⇒ Boolean (readonly)
Whether the benefit is revoked.
4822 4823 4824 |
# File 'lib/pago/v2026_04/models.rb', line 4822 def is_revoked @is_revoked end |
#member ⇒ Models::Member? (readonly)
4852 4853 4854 |
# File 'lib/pago/v2026_04/models.rb', line 4852 def member @member end |
#member_id ⇒ String? (readonly)
The ID of the member concerned by this grant.
4838 4839 4840 |
# File 'lib/pago/v2026_04/models.rb', line 4838 def member_id @member_id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
4802 4803 4804 |
# File 'lib/pago/v2026_04/models.rb', line 4802 def modified_at @modified_at end |
#order_id ⇒ String? (readonly)
The ID of the order that granted this benefit.
4830 4831 4832 |
# File 'lib/pago/v2026_04/models.rb', line 4830 def order_id @order_id end |
#previous_properties ⇒ Models::BenefitGrantCustomProperties? (readonly)
4861 4862 4863 |
# File 'lib/pago/v2026_04/models.rb', line 4861 def previous_properties @previous_properties end |
#properties ⇒ Models::BenefitGrantCustomProperties (readonly)
4858 4859 4860 |
# File 'lib/pago/v2026_04/models.rb', line 4858 def properties @properties end |
#revoked_at ⇒ String? (readonly)
The timestamp when the benefit was revoked. If None, the benefit is not revoked.
4818 4819 4820 |
# File 'lib/pago/v2026_04/models.rb', line 4818 def revoked_at @revoked_at end |
#subscription_id ⇒ String? (readonly)
The ID of the subscription that granted this benefit.
4826 4827 4828 |
# File 'lib/pago/v2026_04/models.rb', line 4826 def subscription_id @subscription_id end |
Class Method Details
.from_json(data) ⇒ BenefitGrantCustomWebhook?
4906 4907 4908 4909 4910 4911 4912 4913 4914 4915 4916 4917 4918 4919 4920 4921 4922 4923 4924 4925 4926 4927 4928 4929 4930 4931 4932 4933 4934 |
# File 'lib/pago/v2026_04/models.rb', line 4906 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::BenefitCustom.from_json(data["benefit"]) : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitGrantCustomProperties.from_json(data["properties"]) : ::Pago::UNSET), previous_properties: (data.key?("previous_properties") ? Models::BenefitGrantCustomProperties.from_json(data["previous_properties"]) : ::Pago::UNSET) ), data ) end |