Class: Pago::V2026_04::Models::Refund
- 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", metadata: "metadata", status: "status", reason: "reason", amount: "amount", tax_amount: "tax_amount", currency: "currency", organization_id: "organization_id", order_id: "order_id", subscription_id: "subscription_id", customer_id: "customer_id", revoke_benefits: "revoke_benefits", dispute: "dispute" }.freeze
- REQUIRED_KEYS =
["created_at", "modified_at", "id", "metadata", "status", "reason", "amount", "tax_amount", "currency", "organization_id", "order_id", "subscription_id", "customer_id", "revoke_benefits", "dispute"].freeze
Instance Attribute Summary collapse
- #amount ⇒ Integer readonly
-
#created_at ⇒ String
readonly
Creation timestamp of the object.
- #currency ⇒ String readonly
- #customer_id ⇒ String readonly
- #dispute ⇒ Models::RefundDispute? readonly
-
#id ⇒ String
readonly
The ID of the object.
- #metadata ⇒ Hash{String => String, Integer, Float, Boolean} readonly
-
#modified_at ⇒ String?
readonly
Last modification timestamp of the object.
- #order_id ⇒ String readonly
- #organization_id ⇒ String readonly
- #reason ⇒ String readonly
- #revoke_benefits ⇒ Boolean readonly
- #status ⇒ String readonly
- #subscription_id ⇒ String? readonly
- #tax_amount ⇒ Integer readonly
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(created_at:, modified_at:, id:, metadata:, status:, reason:, amount:, tax_amount:, currency:, organization_id:, order_id:, subscription_id:, customer_id:, revoke_benefits:, dispute:) ⇒ Refund
constructor
A new instance of Refund.
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:, metadata:, status:, reason:, amount:, tax_amount:, currency:, organization_id:, order_id:, subscription_id:, customer_id:, revoke_benefits:, dispute:) ⇒ Refund
Returns a new instance of Refund.
38265 38266 38267 38268 38269 38270 38271 38272 38273 38274 38275 38276 38277 38278 38279 38280 38281 38282 38283 38284 38285 38286 38287 38288 38289 38290 38291 38292 38293 38294 38295 38296 38297 38298 |
# File 'lib/pago/v2026_04/models.rb', line 38265 def initialize( created_at:, modified_at:, id:, metadata:, status:, reason:, amount:, tax_amount:, currency:, organization_id:, order_id:, subscription_id:, customer_id:, revoke_benefits:, dispute: ) super() assign(:created_at, created_at) assign(:modified_at, modified_at) assign(:id, id) assign(:metadata, ) assign(:status, status) assign(:reason, reason) assign(:amount, amount) assign(:tax_amount, tax_amount) assign(:currency, currency) assign(:organization_id, organization_id) assign(:order_id, order_id) assign(:subscription_id, subscription_id) assign(:customer_id, customer_id) assign(:revoke_benefits, revoke_benefits) assign(:dispute, dispute) end |
Instance Attribute Details
#amount ⇒ Integer (readonly)
38239 38240 38241 |
# File 'lib/pago/v2026_04/models.rb', line 38239 def amount @amount end |
#created_at ⇒ String (readonly)
Creation timestamp of the object.
38219 38220 38221 |
# File 'lib/pago/v2026_04/models.rb', line 38219 def created_at @created_at end |
#currency ⇒ String (readonly)
38245 38246 38247 |
# File 'lib/pago/v2026_04/models.rb', line 38245 def currency @currency end |
#customer_id ⇒ String (readonly)
38257 38258 38259 |
# File 'lib/pago/v2026_04/models.rb', line 38257 def customer_id @customer_id end |
#dispute ⇒ Models::RefundDispute? (readonly)
38263 38264 38265 |
# File 'lib/pago/v2026_04/models.rb', line 38263 def dispute @dispute end |
#id ⇒ String (readonly)
The ID of the object.
38227 38228 38229 |
# File 'lib/pago/v2026_04/models.rb', line 38227 def id @id end |
#metadata ⇒ Hash{String => String, Integer, Float, Boolean} (readonly)
38230 38231 38232 |
# File 'lib/pago/v2026_04/models.rb', line 38230 def @metadata end |
#modified_at ⇒ String? (readonly)
Last modification timestamp of the object.
38223 38224 38225 |
# File 'lib/pago/v2026_04/models.rb', line 38223 def modified_at @modified_at end |
#order_id ⇒ String (readonly)
38251 38252 38253 |
# File 'lib/pago/v2026_04/models.rb', line 38251 def order_id @order_id end |
#organization_id ⇒ String (readonly)
38248 38249 38250 |
# File 'lib/pago/v2026_04/models.rb', line 38248 def organization_id @organization_id end |
#reason ⇒ String (readonly)
38236 38237 38238 |
# File 'lib/pago/v2026_04/models.rb', line 38236 def reason @reason end |
#revoke_benefits ⇒ Boolean (readonly)
38260 38261 38262 |
# File 'lib/pago/v2026_04/models.rb', line 38260 def revoke_benefits @revoke_benefits end |
#status ⇒ String (readonly)
38233 38234 38235 |
# File 'lib/pago/v2026_04/models.rb', line 38233 def status @status end |
#subscription_id ⇒ String? (readonly)
38254 38255 38256 |
# File 'lib/pago/v2026_04/models.rb', line 38254 def subscription_id @subscription_id end |
#tax_amount ⇒ Integer (readonly)
38242 38243 38244 |
# File 'lib/pago/v2026_04/models.rb', line 38242 def tax_amount @tax_amount end |
Class Method Details
.from_json(data) ⇒ Refund?
38302 38303 38304 38305 38306 38307 38308 38309 38310 38311 38312 38313 38314 38315 38316 38317 38318 38319 38320 38321 38322 38323 38324 38325 38326 38327 |
# File 'lib/pago/v2026_04/models.rb', line 38302 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), metadata: (data.key?("metadata") ? data["metadata"] : ::Pago::UNSET), status: (data.key?("status") ? data["status"] : ::Pago::UNSET), reason: (data.key?("reason") ? data["reason"] : ::Pago::UNSET), amount: (data.key?("amount") ? data["amount"] : ::Pago::UNSET), tax_amount: (data.key?("tax_amount") ? data["tax_amount"] : ::Pago::UNSET), currency: (data.key?("currency") ? data["currency"] : ::Pago::UNSET), organization_id: (data.key?("organization_id") ? data["organization_id"] : ::Pago::UNSET), order_id: (data.key?("order_id") ? data["order_id"] : ::Pago::UNSET), subscription_id: (data.key?("subscription_id") ? data["subscription_id"] : ::Pago::UNSET), customer_id: (data.key?("customer_id") ? data["customer_id"] : ::Pago::UNSET), revoke_benefits: (data.key?("revoke_benefits") ? data["revoke_benefits"] : ::Pago::UNSET), dispute: (data.key?("dispute") ? Models::RefundDispute.from_json(data["dispute"]) : ::Pago::UNSET) ), data ) end |