Class: Pago::V2026_04::Models::BenefitMeterCreditSubscriber
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Constant Summary collapse
- JSON_KEYS =
{ id: "id", created_at: "created_at", modified_at: "modified_at", type: "type", description: "description", selectable: "selectable", deletable: "deletable", is_deleted: "is_deleted", organization_id: "organization_id", organization: "organization", properties: "properties" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "type", "description", "selectable", "deletable", "is_deleted", "organization_id", "organization", "properties"].freeze
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
-
#deletable ⇒ Boolean
readonly
Whether the benefit is deletable.
-
#description ⇒ String
readonly
The description of the benefit.
-
#id ⇒ String
readonly
The ID of the benefit.
-
#is_deleted ⇒ Boolean
readonly
Whether the benefit is deleted.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
- #organization ⇒ Models::BenefitSubscriberOrganization readonly
-
#organization_id ⇒ String
readonly
The ID of the organization owning the benefit.
- #properties ⇒ Models::BenefitMeterCreditSubscriberProperties readonly
-
#selectable ⇒ Boolean
readonly
Whether the benefit is selectable when creating a product.
- #type ⇒ String readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:, organization:, properties:) ⇒ BenefitMeterCreditSubscriber
constructor
A new instance of BenefitMeterCreditSubscriber.
Methods inherited from Model
#==, #[], #field_set?, #hash, #inspect, json_keys, required_json_keys, #to_json, #to_json_hash, wrap_raw
Constructor Details
#initialize(id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:, organization:, properties:) ⇒ BenefitMeterCreditSubscriber
Returns a new instance of BenefitMeterCreditSubscriber.
7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 7679 7680 7681 7682 7683 7684 7685 7686 7687 7688 7689 7690 7691 7692 7693 7694 |
# File 'lib/pago/v2026_04/models.rb', line 7669 def initialize( id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:, organization:, properties: ) super() assign(:id, id) assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:type, type) assign(:description, description) assign(:selectable, selectable) assign(:deletable, deletable) assign(:is_deleted, is_deleted) assign(:organization_id, organization_id) assign(:organization, organization) assign(:properties, properties) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
7634 7635 7636 |
# File 'lib/pago/v2026_04/models.rb', line 7634 def created_at @created_at end |
#deletable ⇒ Boolean (readonly)
Whether the benefit is deletable.
7653 7654 7655 |
# File 'lib/pago/v2026_04/models.rb', line 7653 def deletable @deletable end |
#description ⇒ String (readonly)
The description of the benefit.
7645 7646 7647 |
# File 'lib/pago/v2026_04/models.rb', line 7645 def description @description end |
#id ⇒ String (readonly)
The ID of the benefit.
7630 7631 7632 |
# File 'lib/pago/v2026_04/models.rb', line 7630 def id @id end |
#is_deleted ⇒ Boolean (readonly)
Whether the benefit is deleted.
7657 7658 7659 |
# File 'lib/pago/v2026_04/models.rb', line 7657 def is_deleted @is_deleted end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
7638 7639 7640 |
# File 'lib/pago/v2026_04/models.rb', line 7638 def modified_at @modified_at end |
#organization ⇒ Models::BenefitSubscriberOrganization (readonly)
7664 7665 7666 |
# File 'lib/pago/v2026_04/models.rb', line 7664 def organization @organization end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the benefit.
7661 7662 7663 |
# File 'lib/pago/v2026_04/models.rb', line 7661 def organization_id @organization_id end |
#properties ⇒ Models::BenefitMeterCreditSubscriberProperties (readonly)
7667 7668 7669 |
# File 'lib/pago/v2026_04/models.rb', line 7667 def properties @properties end |
#selectable ⇒ Boolean (readonly)
Whether the benefit is selectable when creating a product.
7649 7650 7651 |
# File 'lib/pago/v2026_04/models.rb', line 7649 def selectable @selectable end |
#type ⇒ String (readonly)
7641 7642 7643 |
# File 'lib/pago/v2026_04/models.rb', line 7641 def type @type end |
Class Method Details
.from_json(data) ⇒ BenefitMeterCreditSubscriber?
7698 7699 7700 7701 7702 7703 7704 7705 7706 7707 7708 7709 7710 7711 7712 7713 7714 7715 7716 7717 7718 7719 |
# File 'lib/pago/v2026_04/models.rb', line 7698 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( id: (data.key?("id") ? data["id"] : ::Pago::UNSET), created_at: (data.key?("created_at") ? data["created_at"] : ::Pago::UNSET), modified_at: (data.key?("modified_at") ? data["modified_at"] : ::Pago::UNSET), type: (data.key?("type") ? data["type"] : ::Pago::UNSET), description: (data.key?("description") ? data["description"] : ::Pago::UNSET), selectable: (data.key?("selectable") ? data["selectable"] : ::Pago::UNSET), deletable: (data.key?("deletable") ? data["deletable"] : ::Pago::UNSET), is_deleted: (data.key?("is_deleted") ? data["is_deleted"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET), organization: (data.key?("organization") ? Models::BenefitSubscriberOrganization.from_json(data["organization"]) : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitMeterCreditSubscriberProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |