lib/fawry/fawry_request.rb in fawry-0.1.0 vs lib/fawry/fawry_request.rb in fawry-0.2.0
- old
+ new
@@ -14,19 +14,25 @@
build_request
end
private
+ # rubocop:disable Metrics/MethodLength
def build_request
case action
when 'charge'
self.class.include Requests::ChargeRequest
validate_charge_params!
@request = build_charge_request
when 'refund'
self.class.include Requests::RefundRequest
validate_refund_params!
@request = build_refund_request
+ when 'payment_status'
+ self.class.include Requests::PaymentStatusRequest
+ validate_payment_status_params!
+ @request = build_payment_status_request
end
+ # rubocop:enable Metrics/MethodLength
end
end
end