lib/genesis_ruby/api/requests/base/reference.rb in genesis_ruby-0.1.7 vs lib/genesis_ruby/api/requests/base/reference.rb in genesis_ruby-0.1.8
- old
+ new
@@ -8,11 +8,12 @@
include Mixins::Requests::Financial::PaymentAttributes
include Mixins::Requests::Financial::ReferenceAttributes
protected
- def init_required_fields
- self.required_fields = %i[transaction_id reference_id amount currency]
+ def init_field_validations
+ required_fields.push *%i[transaction_id reference_id amount currency]
+ field_values.merge! currency: Api::Constants::Currencies::Iso4217.all.map(&:upcase)
end
# Reference transaction request structure
def reference_transaction_structure
raise NotImplementedError, 'Reference transaction structure must be implemented.'