def perform(signup)
      return unless NewsletterSignup.api_available?

      gibbon = Gibbon::Request.new(api_key: Settings.newsletter_api_key)
      request_body = { email_address: signup.email, status: 'subscribed' }
      gibbon.lists(newsletter_list_id(signup)).members.create(body: request_body)

      # Update signup when the response is successful (in this case - if no error returned)
      signup.update_attribute(:processed, true)
    end
def perform(signup)
      return unless NewsletterSignup.api_available?

      gibbon = Gibbon::Request.new(api_key: Settings.newsletter_api_key)
      request_body = { email_address: signup.email, status: 'subscribed' }
      gibbon.lists(newsletter_list_id(signup)).members.create(body: request_body)

      # Update signup when the response is successful (in this case - if no error returned)
      signup.update_attribute(:processed, true)
    end
Attempts to signup an email to newsletter