Class: Pago::V2026_04::Models::BenefitGitHubRepositorySubscriber
- 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::BenefitGitHubRepositorySubscriberProperties 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:) ⇒ BenefitGitHubRepositorySubscriber
constructor
A new instance of BenefitGitHubRepositorySubscriber.
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:) ⇒ BenefitGitHubRepositorySubscriber
Returns a new instance of BenefitGitHubRepositorySubscriber.
4436 4437 4438 4439 4440 4441 4442 4443 4444 4445 4446 4447 4448 4449 4450 4451 4452 4453 4454 4455 4456 4457 4458 4459 4460 4461 |
# File 'lib/pago/v2026_04/models.rb', line 4436 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.
4401 4402 4403 |
# File 'lib/pago/v2026_04/models.rb', line 4401 def created_at @created_at end |
#deletable ⇒ Boolean (readonly)
Whether the benefit is deletable.
4420 4421 4422 |
# File 'lib/pago/v2026_04/models.rb', line 4420 def deletable @deletable end |
#description ⇒ String (readonly)
The description of the benefit.
4412 4413 4414 |
# File 'lib/pago/v2026_04/models.rb', line 4412 def description @description end |
#id ⇒ String (readonly)
The ID of the benefit.
4397 4398 4399 |
# File 'lib/pago/v2026_04/models.rb', line 4397 def id @id end |
#is_deleted ⇒ Boolean (readonly)
Whether the benefit is deleted.
4424 4425 4426 |
# File 'lib/pago/v2026_04/models.rb', line 4424 def is_deleted @is_deleted end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
4405 4406 4407 |
# File 'lib/pago/v2026_04/models.rb', line 4405 def modified_at @modified_at end |
#organization ⇒ Models::BenefitSubscriberOrganization (readonly)
4431 4432 4433 |
# File 'lib/pago/v2026_04/models.rb', line 4431 def organization @organization end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the benefit.
4428 4429 4430 |
# File 'lib/pago/v2026_04/models.rb', line 4428 def organization_id @organization_id end |
#properties ⇒ Models::BenefitGitHubRepositorySubscriberProperties (readonly)
4434 4435 4436 |
# File 'lib/pago/v2026_04/models.rb', line 4434 def properties @properties end |
#selectable ⇒ Boolean (readonly)
Whether the benefit is selectable when creating a product.
4416 4417 4418 |
# File 'lib/pago/v2026_04/models.rb', line 4416 def selectable @selectable end |
#type ⇒ String (readonly)
4408 4409 4410 |
# File 'lib/pago/v2026_04/models.rb', line 4408 def type @type end |
Class Method Details
.from_json(data) ⇒ BenefitGitHubRepositorySubscriber?
4465 4466 4467 4468 4469 4470 4471 4472 4473 4474 4475 4476 4477 4478 4479 4480 4481 4482 4483 4484 4485 4486 |
# File 'lib/pago/v2026_04/models.rb', line 4465 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::BenefitGitHubRepositorySubscriberProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |