Class: Pago::V2026_04::Models::BenefitGitHubRepository
- Defined in:
- lib/pago/v2026_04/models.rb,
sig/pago/v2026_04/generated.rbs
Overview
A benefit of type github_repository.
Use it to automatically invite your backers to a private GitHub repository.
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", metadata: "metadata", visibility: "visibility", properties: "properties", visibility_configurable: "visibility_configurable" }.freeze
- REQUIRED_KEYS =
["id", "created_at", "modified_at", "type", "description", "selectable", "deletable", "is_deleted", "organization_id", "metadata", "visibility", "properties", "visibility_configurable"].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.
- #metadata ⇒ Hash{String => String, Integer, Float, Boolean} readonly
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#organization_id ⇒ String
readonly
The ID of the organization owning the benefit.
- #properties ⇒ Models::BenefitGitHubRepositoryProperties readonly
-
#selectable ⇒ Boolean
readonly
Whether the benefit is selectable when creating a product.
- #type ⇒ String readonly
- #visibility ⇒ String readonly
- #visibility_configurable ⇒ Boolean readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:, metadata:, visibility:, properties:, visibility_configurable:) ⇒ BenefitGitHubRepository
constructor
A new instance of BenefitGitHubRepository.
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:, metadata:, visibility:, properties:, visibility_configurable:) ⇒ BenefitGitHubRepository
Returns a new instance of BenefitGitHubRepository.
4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 |
# File 'lib/pago/v2026_04/models.rb', line 4139 def initialize( id:, created_at:, modified_at:, type:, description:, selectable:, deletable:, is_deleted:, organization_id:, metadata:, visibility:, properties:, visibility_configurable: ) 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(:metadata, ) assign(:visibility, visibility) assign(:properties, properties) assign(:visibility_configurable, visibility_configurable) end |
Instance Attribute Details
#created_at ⇒ String (readonly)
Creation timestamp of the object.
4098 4099 4100 |
# File 'lib/pago/v2026_04/models.rb', line 4098 def created_at @created_at end |
#deletable ⇒ Boolean (readonly)
Whether the benefit is deletable.
4117 4118 4119 |
# File 'lib/pago/v2026_04/models.rb', line 4117 def deletable @deletable end |
#description ⇒ String (readonly)
The description of the benefit.
4109 4110 4111 |
# File 'lib/pago/v2026_04/models.rb', line 4109 def description @description end |
#id ⇒ String (readonly)
The ID of the benefit.
4094 4095 4096 |
# File 'lib/pago/v2026_04/models.rb', line 4094 def id @id end |
#is_deleted ⇒ Boolean (readonly)
Whether the benefit is deleted.
4121 4122 4123 |
# File 'lib/pago/v2026_04/models.rb', line 4121 def is_deleted @is_deleted end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
4128 4129 4130 |
# File 'lib/pago/v2026_04/models.rb', line 4128 def @metadata end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
4102 4103 4104 |
# File 'lib/pago/v2026_04/models.rb', line 4102 def modified_at @modified_at end |
#organization_id ⇒ String (readonly)
The ID of the organization owning the benefit.
4125 4126 4127 |
# File 'lib/pago/v2026_04/models.rb', line 4125 def organization_id @organization_id end |
#properties ⇒ Models::BenefitGitHubRepositoryProperties (readonly)
4134 4135 4136 |
# File 'lib/pago/v2026_04/models.rb', line 4134 def properties @properties end |
#selectable ⇒ Boolean (readonly)
Whether the benefit is selectable when creating a product.
4113 4114 4115 |
# File 'lib/pago/v2026_04/models.rb', line 4113 def selectable @selectable end |
#type ⇒ String (readonly)
4105 4106 4107 |
# File 'lib/pago/v2026_04/models.rb', line 4105 def type @type end |
#visibility ⇒ String (readonly)
4131 4132 4133 |
# File 'lib/pago/v2026_04/models.rb', line 4131 def visibility @visibility end |
#visibility_configurable ⇒ Boolean (readonly)
4137 4138 4139 |
# File 'lib/pago/v2026_04/models.rb', line 4137 def visibility_configurable @visibility_configurable end |
Class Method Details
.from_json(data) ⇒ BenefitGitHubRepository?
4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 |
# File 'lib/pago/v2026_04/models.rb', line 4172 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), metadata: (data.key?("metadata") ? data["metadata"] : ::Pago::UNSET), visibility: (data.key?("visibility") ? data["visibility"] : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitGitHubRepositoryProperties.from_json(data["properties"]) : ::Pago::UNSET), visibility_configurable: (data.key?("visibility_configurable") ? data["visibility_configurable"] : ::Pago::UNSET) ), data ) end |