Class: Pago::V2026_04::Models::CustomerBenefitGrantDownloadables
- 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::BenefitDownloadablesSubscriber 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::BenefitGrantDownloadablesProperties 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:) ⇒ CustomerBenefitGrantDownloadables
constructor
A new instance of CustomerBenefitGrantDownloadables.
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:) ⇒ CustomerBenefitGrantDownloadables
Returns a new instance of CustomerBenefitGrantDownloadables.
15170 15171 15172 15173 15174 15175 15176 15177 15178 15179 15180 15181 15182 15183 15184 15185 15186 15187 15188 15189 15190 15191 15192 15193 15194 15195 15196 15197 15198 15199 15200 15201 15202 15203 15204 15205 |
# File 'lib/pago/v2026_04/models.rb', line 15170 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::BenefitDownloadablesSubscriber (readonly)
15165 15166 15167 |
# File 'lib/pago/v2026_04/models.rb', line 15165 def benefit @benefit end |
#benefit_id ⇒ String (readonly)
15144 15145 15146 |
# File 'lib/pago/v2026_04/models.rb', line 15144 def benefit_id @benefit_id end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
15121 15122 15123 |
# File 'lib/pago/v2026_04/models.rb', line 15121 def created_at @created_at end |
#customer ⇒ Models::CustomerPortalCustomer (readonly)
15162 15163 15164 |
# File 'lib/pago/v2026_04/models.rb', line 15162 def customer @customer end |
#customer_id ⇒ String (readonly)
15138 15139 15140 |
# File 'lib/pago/v2026_04/models.rb', line 15138 def customer_id @customer_id end |
#error ⇒ Models::BenefitGrantError? (readonly)
15159 15160 15161 |
# File 'lib/pago/v2026_04/models.rb', line 15159 def error @error end |
#granted_at ⇒ String? (readonly)
15132 15133 15134 |
# File 'lib/pago/v2026_04/models.rb', line 15132 def granted_at @granted_at end |
#id ⇒ String (readonly)
The ID of the object.
15129 15130 15131 |
# File 'lib/pago/v2026_04/models.rb', line 15129 def id @id end |
#is_granted ⇒ Boolean (readonly)
15153 15154 15155 |
# File 'lib/pago/v2026_04/models.rb', line 15153 def is_granted @is_granted end |
#is_revoked ⇒ Boolean (readonly)
15156 15157 15158 |
# File 'lib/pago/v2026_04/models.rb', line 15156 def is_revoked @is_revoked end |
#member_id ⇒ String? (readonly)
15141 15142 15143 |
# File 'lib/pago/v2026_04/models.rb', line 15141 def member_id @member_id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
15125 15126 15127 |
# File 'lib/pago/v2026_04/models.rb', line 15125 def modified_at @modified_at end |
#order_id ⇒ String? (readonly)
15150 15151 15152 |
# File 'lib/pago/v2026_04/models.rb', line 15150 def order_id @order_id end |
#properties ⇒ Models::BenefitGrantDownloadablesProperties (readonly)
15168 15169 15170 |
# File 'lib/pago/v2026_04/models.rb', line 15168 def properties @properties end |
#revoked_at ⇒ String? (readonly)
15135 15136 15137 |
# File 'lib/pago/v2026_04/models.rb', line 15135 def revoked_at @revoked_at end |
#subscription_id ⇒ String? (readonly)
15147 15148 15149 |
# File 'lib/pago/v2026_04/models.rb', line 15147 def subscription_id @subscription_id end |
Class Method Details
.from_json(data) ⇒ CustomerBenefitGrantDownloadables?
15209 15210 15211 15212 15213 15214 15215 15216 15217 15218 15219 15220 15221 15222 15223 15224 15225 15226 15227 15228 15229 15230 15231 15232 15233 15234 15235 |
# File 'lib/pago/v2026_04/models.rb', line 15209 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::BenefitDownloadablesSubscriber.from_json(data["benefit"]) : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitGrantDownloadablesProperties.from_json(data["properties"]) : ::Pago::UNSET) ), data ) end |