Class: Paytureman::PaymentDescription
- Inherits:
-
Object
- Object
- Paytureman::PaymentDescription
- Defined in:
- lib/payments/payment_new.rb
Instance Method Summary collapse
-
#initialize(description = {}) ⇒ PaymentDescription
constructor
A new instance of PaymentDescription.
- #to_h ⇒ Object
Constructor Details
#initialize(description = {}) ⇒ PaymentDescription
Returns a new instance of PaymentDescription.
12 13 14 15 |
# File 'lib/payments/payment_new.rb', line 12 def initialize(description = {}) @description = description.dup @description.assert_valid_keys(*VALID_OPTIONS) end |
Instance Method Details
#to_h ⇒ Object
17 18 19 |
# File 'lib/payments/payment_new.rb', line 17 def to_h @description.select { |_, v| v.present? } end |