module PaymentComponent def fetch_payment_component(amount, constituent = 0, options = {}) card_brands = ['amex', 'mc', 'visa', 'discover'] parameters = { 'Amount': amount, 'ConstituentId': constituent, 'CardBrandsToInclude': card_brands, } options.merge!(basic_auth: @auth, headers: @headers) options.merge!(:body => parameters.to_json, :headers => { 'Content-Type' => 'application/json' }) self.class.post(base_api_endpoint('PaymentGateway/PaymentComponent'), options) end end