Class: Pago::V2026_04::Models::CustomerBenefitGrantCustom
- 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", revoked_at: "revoked_at", customer_id: "customer_id", member_id: "member_id", benefit_id: "benefit_id", subscription_id: "subscription_id", order_id: "order_id", is_granted: "is_granted", is_revoked: "is_revoked", error: "error", customer: "customer", benefit: "benefit", properties: "properties" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "granted_at", "revoked_at", "customer_id", "benefit_id", "subscription_id", "order_id", "is_granted", "is_revoked", "customer", "benefit", "properties"].freeze
Instance Attribute Summary collapse
- #benefit ⇒ Models::BenefitCustomSubscriber readonly
- #benefit_id ⇒ String readonly
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
- #customer ⇒ Models::CustomerPortalCustomer readonly
- #customer_id ⇒ String readonly
- #error ⇒ Models::BenefitGrantError? readonly
- #granted_at ⇒ String? readonly
-
#id ⇒ String
readonly
The ID of the object.
- #is_granted ⇒ Boolean readonly
- #is_revoked ⇒ Boolean readonly
- #member_id ⇒ String? readonly
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
- #order_id ⇒ String? readonly
- #properties ⇒ Models::BenefitGrantCustomProperties readonly
- #revoked_at ⇒ String? readonly
- #subscription_id ⇒ String? readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, granted_at:, revoked_at:, customer_id:, member_id: ::Pago::UNSET, benefit_id:, subscription_id:, order_id:, is_granted:, is_revoked:, error: ::Pago::UNSET, customer:, benefit:, properties:) ⇒ CustomerBenefitGrantCustom
constructor
A new instance of CustomerBenefitGrantCustom.
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:, revoked_at:, customer_id:, member_id: ::Pago::UNSET, benefit_id:, subscription_id:, order_id:, is_granted:, is_revoked:, error: ::Pago::UNSET, customer:, benefit:, properties:) ⇒ CustomerBenefitGrantCustom
Returns a new instance of CustomerBenefitGrantCustom.
14787 14788 14789 14790 14791 14792 14793 14794 14795 14796 14797 14798 14799 14800 14801 14802 14803 14804 14805 14806 14807 14808 14809 14810 14811 14812 14813 14814 14815 14816 14817 14818 14819 14820 14821 14822 |
# File 'lib/pago/v2026_04/models.rb', line 14787 def initialize( created_at:, modified_at:, id:, granted_at:, revoked_at:, customer_id:, member_id: ::Pago::UNSET, benefit_id:, subscription_id:, order_id:, is_granted:, is_revoked:, error: ::Pago::UNSET, customer:, benefit:, properties: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:granted_at, granted_at) assign(:revoked_at, revoked_at) assign(:customer_id, customer_id) assign(:member_id, member_id) assign(:benefit_id, benefit_id) assign(:subscription_id, subscription_id) assign(:order_id, order_id) assign(:is_granted, is_granted) assign(:is_revoked, is_revoked) assign(:error, error) assign(:customer, customer) assign(:benefit, benefit) assign(:properties, properties) end |
Instance Attribute Details
#benefit ⇒ Models::BenefitCustomSubscriber (readonly)
14782 14783 14784 |
# File 'lib/pago/v2026_04/models.rb', line 14782 def benefit @benefit end |
#benefit_id ⇒ String (readonly)
14761 14762 14763 |
# File 'lib/pago/v2026_04/models.rb', line 14761 def benefit_id @benefit_id end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
14738 14739 14740 |
# File 'lib/pago/v2026_04/models.rb', line 14738 def created_at @created_at end |
#customer ⇒ Models::CustomerPortalCustomer (readonly)
14779 14780 14781 |
# File 'lib/pago/v2026_04/models.rb', line 14779 def customer @customer end |
#customer_id ⇒ String (readonly)
14755 14756 14757 |
# File 'lib/pago/v2026_04/models.rb', line 14755 def customer_id @customer_id end |
#error ⇒ Models::BenefitGrantError? (readonly)
14776 14777 14778 |
# File 'lib/pago/v2026_04/models.rb', line 14776 def error @error end |
#granted_at ⇒ String? (readonly)
14749 14750 14751 |
# File 'lib/pago/v2026_04/models.rb', line 14749 def granted_at @granted_at end |
#id ⇒ String (readonly)
The ID of the object.
14746 14747 14748 |
# File 'lib/pago/v2026_04/models.rb', line 14746 def id @id end |
#is_granted ⇒ Boolean (readonly)
14770 14771 14772 |
# File 'lib/pago/v2026_04/models.rb', line 14770 def is_granted @is_granted end |
#is_revoked ⇒ Boolean (readonly)
14773 14774 14775 |
# File 'lib/pago/v2026_04/models.rb', line 14773 def is_revoked @is_revoked end |
#member_id ⇒ String? (readonly)
14758 14759 14760 |
# File 'lib/pago/v2026_04/models.rb', line 14758 def member_id @member_id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
14742 14743 14744 |
# File 'lib/pago/v2026_04/models.rb', line 14742 def modified_at @modified_at end |
#order_id ⇒ String? (readonly)
14767 14768 14769 |
# File 'lib/pago/v2026_04/models.rb', line 14767 def order_id @order_id end |
#properties ⇒ Models::BenefitGrantCustomProperties (readonly)
14785 14786 14787 |
# File 'lib/pago/v2026_04/models.rb', line 14785 def properties @properties end |
#revoked_at ⇒ String? (readonly)
14752 14753 14754 |
# File 'lib/pago/v2026_04/models.rb', line 14752 def revoked_at @revoked_at end |
#subscription_id ⇒ String? (readonly)
14764 14765 14766 |
# File 'lib/pago/v2026_04/models.rb', line 14764 def subscription_id @subscription_id end |
Class Method Details
.from_json(data) ⇒ CustomerBenefitGrantCustom?
14826 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 14839 14840 14841 14842 14843 14844 14845 14846 14847 14848 14849 14850 14851 14852 |
# File 'lib/pago/v2026_04/models.rb', line 14826 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), revoked_at: (data.key?("revoked_at") ? data["revoked_at"] : ::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), subscription_id: (data.key?("subscription_id") ? data["subscription_id"] : ::Pago::UNSET), order_id: (data.key?("order_id") ? data["order_id"] : ::Pago::UNSET), is_granted: (data.key?("is_granted") ? data["is_granted"] : ::Pago::UNSET), is_revoked: (data.key?("is_revoked") ? data["is_revoked"] : ::Pago::UNSET), error: (data.key?("error") ? Models::BenefitGrantError.from_json(data["error"]) : ::Pago::UNSET), customer: (data.key?("customer") ? Models::CustomerPortalCustomer.from_json(data["customer"]) : ::Pago::UNSET), benefit: (data.key?("benefit") ? Models::BenefitCustomSubscriber.from_json(data["benefit"]) : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitGrantCustomProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |