Class: Paytureman::PaymentDescription

Inherits:
Object
  • Object
show all
Defined in:
lib/payments/payment_new.rb

Instance Method Summary collapse

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_hObject



17
18
19
# File 'lib/payments/payment_new.rb', line 17

def to_h
  @description.select { |_, v| v.present? }
end