Class: AbacatePay::Enums::Billings::Statuses
- Inherits:
-
Object
- Object
- AbacatePay::Enums::Billings::Statuses
- Defined in:
- lib/abacate_pay/enums/billings/statuses.rb
Overview
Enumeration defining billing statuses.
This enumeration is used to represent the various statuses that a billing process can have.
Constant Summary collapse
- PENDING =
Indicates that the billing is pending and has not yet been processed.
"PENDING"- EXPIRED =
Indicates that the billing has expired and is no longer valid.
"EXPIRED"- CANCELLED =
Indicates that the billing has been cancelled and will not be processed.
"CANCELLED"- PAID =
Indicates that the billing has been successfully paid.
"PAID"- REFUNDED =
Indicates that the billing has been refunded to the payer.
"REFUNDED"
Class Method Summary collapse
-
.valid?(value) ⇒ Boolean
Validates if a given value is a valid status.
-
.validate!(value) ⇒ String
Validates and returns the value if valid.
-
.values ⇒ Array<String>
Gets all valid status values.
Class Method Details
.valid?(value) ⇒ Boolean
Validates if a given value is a valid status
39 40 41 |
# File 'lib/abacate_pay/enums/billings/statuses.rb', line 39 def self.valid?(value) values.include?(value) end |
.validate!(value) ⇒ String
Validates and returns the value if valid
47 48 49 50 51 |
# File 'lib/abacate_pay/enums/billings/statuses.rb', line 47 def self.validate!(value) raise ArgumentError, "Invalid status: #{value}" unless valid?(value) value end |