Class: Pago::V2026_04::Models::BenefitGrantMeterCreditWebhook
- 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", is_granted: "is_granted", revoked_at: "revoked_at", is_revoked: "is_revoked", subscription_id: "subscription_id", order_id: "order_id", customer_id: "customer_id", member_id: "member_id", benefit_id: "benefit_id", error: "error", customer: "customer", member: "member", benefit: "benefit", properties: "properties", previous_properties: "previous_properties" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "is_granted", "is_revoked", "subscription_id", "order_id", "customer_id", "benefit_id", "customer", "benefit", "properties"].freeze
Instance Attribute Summary collapse
- #benefit ⇒ Models::BenefitMeterCredit readonly
-
#benefit_id ⇒ String
readonly
The ID of the benefit concerned by this grant.
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
- #customer ⇒ Object readonly
-
#customer_id ⇒ String
readonly
The ID of the customer concerned by this grant.
-
#error ⇒ Models::BenefitGrantError?
readonly
The error information if the benefit grant failed with an unrecoverable error.
-
#granted_at ⇒ String?
readonly
The timestamp when the benefit was granted.
-
#id ⇒ String
readonly
The ID of the grant.
-
#is_granted ⇒ Boolean
readonly
Whether the benefit is granted.
-
#is_revoked ⇒ Boolean
readonly
Whether the benefit is revoked.
- #member ⇒ Models::Member? readonly
-
#member_id ⇒ String?
readonly
The ID of the member concerned by this grant.
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
-
#order_id ⇒ String?
readonly
The ID of the order that granted this benefit.
- #previous_properties ⇒ Models::BenefitGrantMeterCreditProperties? readonly
- #properties ⇒ Models::BenefitGrantMeterCreditProperties readonly
-
#revoked_at ⇒ String?
readonly
The timestamp when the benefit was revoked.
-
#subscription_id ⇒ String?
readonly
The ID of the subscription that granted this benefit.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, granted_at: ::Pago::UNSET, is_granted:, revoked_at: ::Pago::UNSET, is_revoked:, subscription_id:, order_id:, customer_id:, member_id: ::Pago::UNSET, benefit_id:, error: ::Pago::UNSET, customer:, member: ::Pago::UNSET, benefit:, properties:, previous_properties: ::Pago::UNSET) ⇒ BenefitGrantMeterCreditWebhook
constructor
A new instance of BenefitGrantMeterCreditWebhook.
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: ::Pago::UNSET, is_granted:, revoked_at: ::Pago::UNSET, is_revoked:, subscription_id:, order_id:, customer_id:, member_id: ::Pago::UNSET, benefit_id:, error: ::Pago::UNSET, customer:, member: ::Pago::UNSET, benefit:, properties:, previous_properties: ::Pago::UNSET) ⇒ BenefitGrantMeterCreditWebhook
Returns a new instance of BenefitGrantMeterCreditWebhook.
6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 6223 6224 6225 6226 6227 6228 6229 6230 6231 6232 6233 6234 6235 6236 6237 6238 6239 6240 6241 6242 |
# File 'lib/pago/v2026_04/models.rb', line 6203 def initialize( created_at:, modified_at:, id:, granted_at: ::Pago::UNSET, is_granted:, revoked_at: ::Pago::UNSET, is_revoked:, subscription_id:, order_id:, customer_id:, member_id: ::Pago::UNSET, benefit_id:, error: ::Pago::UNSET, customer:, member: ::Pago::UNSET, benefit:, properties:, previous_properties: ::Pago::UNSET ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:granted_at, granted_at) assign(:is_granted, is_granted) assign(:revoked_at, revoked_at) assign(:is_revoked, is_revoked) assign(:subscription_id, subscription_id) assign(:order_id, order_id) assign(:customer_id, customer_id) assign(:member_id, member_id) assign(:benefit_id, benefit_id) assign(:error, error) assign(:customer, customer) assign(:member, member) assign(:benefit, benefit) assign(:properties, properties) assign(:previous_properties, previous_properties) end |
Instance Attribute Details
#benefit ⇒ Models::BenefitMeterCredit (readonly)
6195 6196 6197 |
# File 'lib/pago/v2026_04/models.rb', line 6195 def benefit @benefit end |
#benefit_id ⇒ String (readonly)
The ID of the benefit concerned by this grant.
6182 6183 6184 |
# File 'lib/pago/v2026_04/models.rb', line 6182 def benefit_id @benefit_id end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
6138 6139 6140 |
# File 'lib/pago/v2026_04/models.rb', line 6138 def created_at @created_at end |
#customer ⇒ Object (readonly)
6189 6190 6191 |
# File 'lib/pago/v2026_04/models.rb', line 6189 def customer @customer end |
#customer_id ⇒ String (readonly)
The ID of the customer concerned by this grant.
6174 6175 6176 |
# File 'lib/pago/v2026_04/models.rb', line 6174 def customer_id @customer_id end |
#error ⇒ Models::BenefitGrantError? (readonly)
The error information if the benefit grant failed with an unrecoverable error.
6186 6187 6188 |
# File 'lib/pago/v2026_04/models.rb', line 6186 def error @error end |
#granted_at ⇒ String? (readonly)
The timestamp when the benefit was granted. If None, the benefit is not granted.
6150 6151 6152 |
# File 'lib/pago/v2026_04/models.rb', line 6150 def granted_at @granted_at end |
#id ⇒ String (readonly)
The ID of the grant.
6146 6147 6148 |
# File 'lib/pago/v2026_04/models.rb', line 6146 def id @id end |
#is_granted ⇒ Boolean (readonly)
Whether the benefit is granted.
6154 6155 6156 |
# File 'lib/pago/v2026_04/models.rb', line 6154 def is_granted @is_granted end |
#is_revoked ⇒ Boolean (readonly)
Whether the benefit is revoked.
6162 6163 6164 |
# File 'lib/pago/v2026_04/models.rb', line 6162 def is_revoked @is_revoked end |
#member ⇒ Models::Member? (readonly)
6192 6193 6194 |
# File 'lib/pago/v2026_04/models.rb', line 6192 def member @member end |
#member_id ⇒ String? (readonly)
The ID of the member concerned by this grant.
6178 6179 6180 |
# File 'lib/pago/v2026_04/models.rb', line 6178 def member_id @member_id end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
6142 6143 6144 |
# File 'lib/pago/v2026_04/models.rb', line 6142 def modified_at @modified_at end |
#order_id ⇒ String? (readonly)
The ID of the order that granted this benefit.
6170 6171 6172 |
# File 'lib/pago/v2026_04/models.rb', line 6170 def order_id @order_id end |
#previous_properties ⇒ Models::BenefitGrantMeterCreditProperties? (readonly)
6201 6202 6203 |
# File 'lib/pago/v2026_04/models.rb', line 6201 def previous_properties @previous_properties end |
#properties ⇒ Models::BenefitGrantMeterCreditProperties (readonly)
6198 6199 6200 |
# File 'lib/pago/v2026_04/models.rb', line 6198 def properties @properties end |
#revoked_at ⇒ String? (readonly)
The timestamp when the benefit was revoked. If None, the benefit is not revoked.
6158 6159 6160 |
# File 'lib/pago/v2026_04/models.rb', line 6158 def revoked_at @revoked_at end |
#subscription_id ⇒ String? (readonly)
The ID of the subscription that granted this benefit.
6166 6167 6168 |
# File 'lib/pago/v2026_04/models.rb', line 6166 def subscription_id @subscription_id end |
Class Method Details
.from_json(data) ⇒ BenefitGrantMeterCreditWebhook?
6246 6247 6248 6249 6250 6251 6252 6253 6254 6255 6256 6257 6258 6259 6260 6261 6262 6263 6264 6265 6266 6267 6268 6269 6270 6271 6272 6273 6274 |
# File 'lib/pago/v2026_04/models.rb', line 6246 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), is_granted: (data.key?("is_granted") ? data["is_granted"] : ::Pago::UNSET), revoked_at: (data.key?("revoked_at") ? data["revoked_at"] : ::Pago::UNSET), is_revoked: (data.key?("is_revoked") ? data["is_revoked"] : ::Pago::UNSET), subscription_id: (data.key?("subscription_id") ? data["subscription_id"] : ::Pago::UNSET), order_id: (data.key?("order_id") ? data["order_id"] : ::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), error: (data.key?("error") ? Models::BenefitGrantError.from_json(data["error"]) : ::Pago::UNSET), customer: (data.key?("customer") ? Unions::Customer.from_json(data["customer"]) : ::Pago::UNSET), member: (data.key?("member") ? Models::Member.from_json(data["member"]) : ::Pago::UNSET), benefit: (data.key?("benefit") ? Models::BenefitMeterCredit.from_json(data["benefit"]) : ::Pago::UNSET), properties: (data.key?("properties") ? Models::BenefitGrantMeterCreditProperties.from_json(data["properties"]) : ::Pago::UNSET), previous_properties: (data.key?("previous_properties") ? Models::BenefitGrantMeterCreditProperties.from_json(data["previous_properties"]) : ::Pago::UNSET) ), data ) end |