Class: CoinsPaid::API::CallbackData
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- CoinsPaid::API::CallbackData
- Defined in:
- lib/coins_paid/api/callback_data.rb
Constant Summary collapse
- NOT_CONFIRMED =
'not_confirmed'
- CANCELLED =
'cancelled'
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.from_json(attributes) ⇒ Object
38 39 40 41 |
# File 'lib/coins_paid/api/callback_data.rb', line 38 def self.from_json(attributes) attributes[:foreign_id] ||= attributes.dig(:crypto_address, :foreign_id) || '' new(attributes) end |
Instance Method Details
#cancelled? ⇒ Boolean
47 48 49 |
# File 'lib/coins_paid/api/callback_data.rb', line 47 def cancelled? status == CANCELLED end |
#pending? ⇒ Boolean
43 44 45 |
# File 'lib/coins_paid/api/callback_data.rb', line 43 def pending? status == NOT_CONFIRMED end |